Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Brodt2014-06-10 16:17:26 +0000
committerBob Brodt2014-06-10 16:17:26 +0000
commit3893d21bab6b6d39d6e2699ddfe1e87617f304a2 (patch)
tree35ec43fb71d0c9f4422ec9922090b2dc5d9117b6
parent8af93ab4bf2f309cb296e21af2b7e9a0224a6190 (diff)
parentfbd1d12a5b67e4932ef64e3c3dfedaa461d3176d (diff)
downloadorg.eclipse.bpmn2-modeler-3893d21bab6b6d39d6e2699ddfe1e87617f304a2.tar.gz
org.eclipse.bpmn2-modeler-3893d21bab6b6d39d6e2699ddfe1e87617f304a2.tar.xz
org.eclipse.bpmn2-modeler-3893d21bab6b6d39d6e2699ddfe1e87617f304a2.zip
Fix conflicts for Merge of 'API-Refactoring'
into 'master'
-rw-r--r--examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties4
-rw-r--r--examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml209
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/.classpath (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/.classpath)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/.project (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/.project)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/META-INF/MANIFEST.MF (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/META-INF/MANIFEST.MF)2
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/about.html (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/about.html)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/build.properties (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/build.properties)3
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/epl-v10.html (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/epl-v10.html)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyBoundaryEvent.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyBoundaryEvent.png)bin2833 -> 2833 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyEventDefinition.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyEventDefinition.png)bin3842 -> 3842 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyTask.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyTask.png)bin1930 -> 1930 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/TemporalDependency.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyAssocation.png)bin2716 -> 2716 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyBoundaryEvent.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyBoundaryEvent.png)bin666 -> 666 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyEventDefinition.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyEventDefinition.png)bin723 -> 723 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyTask.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyTask.png)bin513 -> 513 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/TemporalDependency.png (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyAssociation.png)bin574 -> 574 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.ecore (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.ecore)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.genmodel (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.genmodel)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties4
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml155
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/pom.xml (renamed from org.eclipse.bpmn2.modeler.runtime.example/pom.xml)17
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/Activator.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/Activator.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/CustomTemporalDependencyFeatureContainer.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/CustomTemporalDependencyFeatureContainer.java)23
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MessageStartEventFeatureContainer.java72
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyAssociationFeatureContainer.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyAssociationFeatureContainer.java)6
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventFeatureContainer.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventFeatureContainer.java)10
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventPropertySection.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventPropertySection.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionFeatureContainer.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionFeatureContainer.java)40
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionPropertiesAdapter.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionPropertiesAdapter.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/DocumentRoot.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/DocumentRoot.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyEventDefinition.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyEventDefinition.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelFactory.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelFactory.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelPackage.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelPackage.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/Parameter.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/Parameter.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TaskConfig.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TaskConfig.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TemporalDependency.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TemporalDependency.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/DocumentRootImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/DocumentRootImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyEventDefinitionImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyEventDefinitionImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelFactoryImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelFactoryImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelPackageImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelPackageImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/ParameterImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/ParameterImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TaskConfigImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TaskConfigImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TemporalDependencyImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TemporalDependencyImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelAdapterFactory.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelAdapterFactory.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceFactoryImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceFactoryImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceImpl.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceImpl.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelXMLProcessor.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelXMLProcessor.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyRuntimeExtension.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyRuntimeExtension.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskFeatureContainer.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskFeatureContainer.java)17
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskPropertySection.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskPropertySection.java)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/.classpath (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/.classpath)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/.project28
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/META-INF/MANIFEST.MF19
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/build.properties (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/build.properties)4
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.properties2
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.xml42
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/pom.xml27
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/Activator.java50
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/ColorChangeAdapter.java108
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/DataTypeRuntimeExtension.java66
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/EColorConversionDelegate.java132
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/.classpath (renamed from org.eclipse.bpmn2.modeler.core/.classpath)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/.project (renamed from org.eclipse.bpmn2.modeler.runtime.example/.project)2
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/META-INF/MANIFEST.MF (renamed from org.eclipse.bpmn2.modeler.runtime.example/META-INF/MANIFEST.MF)9
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/about.html (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/about.html)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/CallActivityExtension.xml19
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/readme.txt8
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/CharityOrganizationRequest.bpmn (renamed from org.eclipse.bpmn2.modeler.runtime.example/bpmnResources/CharityOrganizationRequest.bpmn)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/VacationRequest.bpmn (renamed from org.eclipse.bpmn2.modeler.runtime.example/bpmnResources/VacationRequest.bpmn)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/build.properties (renamed from org.eclipse.bpmn2.modeler.runtime.example/build.properties)1
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/epl-v10.html (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/epl-v10.html)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/flow.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/huge/flow.png)bin4694 -> 4694 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/mitigation.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/huge/mitigation.png)bin6463 -> 6463 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/risk.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/huge/risk.png)bin15896 -> 15896 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/flow.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/large/flow.png)bin2035 -> 2035 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/mitigation.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/large/mitigation.png)bin1491 -> 1491 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/risk.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/large/risk.png)bin2321 -> 2321 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/flow.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/small/flow.png)bin710 -> 710 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/mitigation.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/small/mitigation.png)bin730 -> 730 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/risk.png (renamed from org.eclipse.bpmn2.modeler.runtime.example/icons/small/risk.png)bin1004 -> 1004 bytes
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/plugin.properties (renamed from org.eclipse.bpmn2.modeler.runtime.example/plugin.properties)5
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/plugin.xml122
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/pom.xml (renamed from org.eclipse.bpmn2.modeler.core/pom.xml)17
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/Activator.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/Activator.java)2
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleCustomSequenceFlowFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleCustomSequenceFlowFeatureContainer.java)71
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleCustomTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleCustomTaskFeatureContainer.java)62
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleImageProvider.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleImageProvider.java)7
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleMitigationTaskPropertySection.java)9
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleRiskTaskPropertySection.java)10
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRuntimeExtension.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleRuntimeExtension.java)45
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleToolProvider.java (renamed from org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleToolProvider.java)6
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/.classpath (renamed from org.eclipse.bpmn2.modeler.wsil/.classpath)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/.project (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/.project)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/META-INF/MANIFEST.MF (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/META-INF/MANIFEST.MF)2
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/SampleProcess.bpmn (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/SampleProcess.bpmn)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/about.html (renamed from org.eclipse.bpmn2.modeler.core/about.html)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/build.properties5
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.core/epl-v10.html)0
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/pom.xml23
-rw-r--r--examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/src/org/eclipse/bpmn2/modeler/examples/modelreader/ModelReader.java (renamed from examples/org.eclipse.bpmn2.modeler.examples.modelreader/src/org/eclipse/bpmn2/modeler/examples/modelreader/ModelReader.java)0
-rw-r--r--examples/plugins/pom.xml30
-rw-r--r--examples/pom.xml28
-rw-r--r--examples/projects/pom.xml23
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/.project (renamed from org.eclipse.bpmn2.modeler.wsil.feature/.project)2
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/about.html (renamed from org.eclipse.bpmn2.modeler.examples.feature/about.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/build.properties (renamed from org.eclipse.bpmn2.modeler.examples.feature/build.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.examples.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/feature.properties (renamed from org.eclipse.bpmn2.modeler.examples.feature/feature.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/feature.xml (renamed from org.eclipse.bpmn2.modeler.examples.feature/feature.xml)22
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/license.html (renamed from org.eclipse.bpmn2.modeler.examples.feature/license.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.examples/pom.xml23
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/.project (renamed from org.eclipse.bpmn2.modeler.examples.feature/.project)2
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/about.html (renamed from org.eclipse.bpmn2.modeler.feature/about.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/build.properties (renamed from org.eclipse.bpmn2.modeler.feature/build.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/feature.properties (renamed from org.eclipse.bpmn2.modeler.feature/feature.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/feature.xml (renamed from org.eclipse.bpmn2.modeler.jboss.runtime.feature/feature.xml)4
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/license.html (renamed from org.eclipse.bpmn2.modeler.feature/license.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.runtime.jboss/pom.xml (renamed from org.eclipse.bpmn2.modeler.wsil.feature/pom.xml)23
-rw-r--r--features/org.eclipse.bpmn2.modeler.sdk/.project (renamed from org.eclipse.bpmn2.modeler.feature/.project)2
-rw-r--r--features/org.eclipse.bpmn2.modeler.sdk/about.html (renamed from org.eclipse.bpmn2.modeler.jboss.runtime.feature/about.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.sdk/build.properties7
-rw-r--r--features/org.eclipse.bpmn2.modeler.sdk/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.jboss.runtime.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.sdk/feature.xml48
-rw-r--r--features/org.eclipse.bpmn2.modeler.sdk/license.html (renamed from org.eclipse.bpmn2.modeler.jboss.runtime.feature/license.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.sdk/pom.xml (renamed from org.eclipse.bpmn2.modeler.feature/pom.xml)23
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/.project (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/.project)2
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/about.html (renamed from org.eclipse.bpmn2.modeler.runtime.example/about.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/build.properties (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/build.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/build.xml (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/build.xml)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/helios-sites.properties (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/helios-sites.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/index.html60
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/indigo-sites.properties (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/indigo-sites.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/juno-sites.properties (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/juno-sites.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/kepler-sites.properties (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/kepler-sites.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/license.html (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/license.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/luna-sites.properties (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/luna-sites.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/notice.html (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/notice.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/pom.xml (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/pom.xml)54
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/site.xml26
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/web/site.css12
-rw-r--r--features/org.eclipse.bpmn2.modeler.updatesite/web/site.xsl214
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/.project17
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/about.html (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/about.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/build.properties (renamed from org.eclipse.bpmn2.modeler.jboss.runtime.feature/build.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.wsil.feature/epl-v10.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/feature.properties (renamed from org.eclipse.bpmn2.modeler.jboss.runtime.feature/feature.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/feature.xml (renamed from org.eclipse.bpmn2.modeler.wsil.feature/feature.xml)4
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/license.html (renamed from org.eclipse.bpmn2.modeler.wsil.feature/license.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler.wsil/pom.xml23
-rw-r--r--features/org.eclipse.bpmn2.modeler/.project17
-rw-r--r--features/org.eclipse.bpmn2.modeler/about.html (renamed from org.eclipse.bpmn2.modeler.ui/about.html)0
-rw-r--r--features/org.eclipse.bpmn2.modeler/build.properties (renamed from org.eclipse.bpmn2.modeler.wsil.feature/build.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler/epl-v10.html269
-rw-r--r--features/org.eclipse.bpmn2.modeler/feature.properties (renamed from org.eclipse.bpmn2.modeler.wsil.feature/feature.properties)0
-rw-r--r--features/org.eclipse.bpmn2.modeler/feature.xml (renamed from org.eclipse.bpmn2.modeler.feature/feature.xml)4
-rw-r--r--features/org.eclipse.bpmn2.modeler/license.html164
-rw-r--r--features/org.eclipse.bpmn2.modeler/pom.xml23
-rw-r--r--features/pom.xml29
-rw-r--r--org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd915
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java69
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java312
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java382
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java17
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java273
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties2
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddFeature.java55
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java94
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ContextConstants.java21
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java101
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNShapeFeature.java59
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java24
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java82
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java149
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java82
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties2
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/MoveTextAnnotationFeature.java35
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyProperties.java39
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java86
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java15
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyNameFeature.java74
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties1
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java7
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java71
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java168
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java14
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddLabelFeature.java118
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java101
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java16
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveLabelFeature.java33
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java130
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties1
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/LayoutLaneFeature.java40
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/Messages.java16
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToDiagramFeature.java83
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToLaneFeature.java99
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveLaneFeature.java89
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/messages.properties2
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties10
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/LayoutParticipantFeature.java109
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/Messages.java17
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/messages.properties2
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java15
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties1
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties6
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java45
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java331
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java15
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java48
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java128
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java557
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java867
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties1
-rw-r--r--org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SiblingLaneComparator.java33
-rw-r--r--org.eclipse.bpmn2.modeler.examples.feature/pom.xml26
-rw-r--r--org.eclipse.bpmn2.modeler.jboss.runtime.feature/.project17
-rw-r--r--org.eclipse.bpmn2.modeler.jboss.runtime.feature/pom.xml26
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.ecore28
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.genmodel15
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/plugin.xml169
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationFeatureContainer.java47
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationPropertySection.java82
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/DocumentRoot.java84
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelFactory.java50
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelPackage.java1429
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/DocumentRootImpl.java224
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelFactoryImpl.java103
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelPackageImpl.java252
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelAdapterFactory.java146
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceFactoryImpl.java60
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceImpl.java36
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java150
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelXMLProcessor.java58
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleTaskFeatureContainer.java61
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java14
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties2
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties5
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties4
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties2
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties3
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties2
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmServiceTaskPropertiesAdapter.java59
-rw-r--r--org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties6
-rw-r--r--org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.pngbin251 -> 0 bytes
-rw-r--r--org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.pngbin278 -> 0 bytes
-rw-r--r--org.eclipse.bpmn2.modeler.ui/pom.xml26
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java53
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java50
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java192
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java121
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties7
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties13
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties9
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/LayoutBaseElementTextFeature.java65
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties4
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java86
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java85
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomConnectionFeatureContainer.java270
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java81
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties4
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java58
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java169
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddSubChoreographyFeature.java49
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyUtil.java948
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java58
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java67
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java97
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java76
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java74
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyParticipantRefsFeature.java86
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CreateConversationFeature.java85
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java18
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties4
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateDataObjectFeature.java120
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java81
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties5
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties6
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java652
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java133
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java14
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties4
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java22
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties8
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java187
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties21
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties3
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties5
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties6
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java14
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java31
-rw-r--r--org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties3
-rw-r--r--org.eclipse.bpmn2.modeler.updatesite.feature/feature.xml38
-rw-r--r--org.eclipse.bpmn2.modeler.updatesite.feature/site.xml23
-rw-r--r--parent/pom.xml410
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/.classpath (renamed from org.eclipse.bpmn2.modeler.help/.classpath)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/.gitignore (renamed from org.eclipse.bpmn2.modeler.core/.gitignore)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/.project (renamed from org.eclipse.bpmn2.modeler.core/.project)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF (renamed from org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/OSGI-INF/l10n/bundle.properties (renamed from org.eclipse.bpmn2.modeler.core/OSGI-INF/l10n/bundle.properties)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/about.html (renamed from org.eclipse.bpmn2.modeler.updatesite.feature/about.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/build.properties (renamed from org.eclipse.bpmn2.modeler.core/build.properties)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.runtime.example/epl-v10.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/add.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/add.png)bin450 -> 450 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/close.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/close.png)bin441 -> 441 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/delete.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/delete.png)bin750 -> 750 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/down.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/down.png)bin467 -> 467 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/edit.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/edit.png)bin515 -> 515 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/import.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/import.png)bin372 -> 372 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/remove.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/remove.png)bin591 -> 591 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/icons/20/up.png (renamed from org.eclipse.bpmn2.modeler.core/icons/20/up.png)bin466 -> 466 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/license.html164
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/plugin.properties (renamed from org.eclipse.bpmn2.modeler.core/plugin.properties)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/plugin.xml (renamed from org.eclipse.bpmn2.modeler.core/plugin.xml)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/pom.xml46
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd1631
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Activator.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Activator.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/DefaultConversionDelegate.java115
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EDataTypeConversionFactory.java88
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EditControlProvider.java138
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java55
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IConstants.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IConstants.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IToolTipProvider.java28
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/LifecycleEvent.java461
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Messages.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ToolTipProvider.java240
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractAdapter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractStatefulAdapter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractStatefulAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterProvider.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterRegistry.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterRegistry.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterUtil.java)28
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/BasicEObjectAdapter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/BasicEObjectAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java604
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java402
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java666
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IExtensionValueAdapter.java26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/INamespaceMap.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/INamespaceMap.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IProperty.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IProperty.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IPropertyHolder.java25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IResourceProvider.java23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IStatefullAdapter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IStatefullAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/InsertionAdapter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/InsertionAdapter.java)226
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java417
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectPropertyProvider.java184
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/package.html8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Builder.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Builder.java)172
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Nature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Nature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/Messages.java31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/ToggleNatureAction.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/ToggleNatureAction.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/messages.properties1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIGenerator.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIGenerator.java)52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIImport.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIImport.java)281
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java)331
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTree.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTree.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTreeNode.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTreeNode.java)50
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/ImportDiagnostics.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/ImportDiagnostics.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/MissingDIElementsDialog.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/MissingDIElementsDialog.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddElementFeature.java)332
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateConnectionFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateConnectionFeature.java)199
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateFeature.java)173
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2DirectEditingFeature.java126
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2UpdateFeature.java80
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractConnectionRouter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractConnectionRouter.java)78
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractCreateFlowElementFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractCreateFlowElementFeature.java)73
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractLayoutBpmn2ShapeFeature.java51
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BPMNDiagramFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BPMNDiagramFeatureContainer.java)89
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementConnectionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementConnectionFeatureContainer.java)54
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementFeatureContainer.java)52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BendpointConnectionRouter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BendpointConnectionRouter.java)141
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeature.java)126
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeaturePart.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeaturePart.java)144
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ConnectionRoute.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ConnectionRoute.java)155
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomConnectionFeatureContainer.java558
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomElementFeatureContainer.java)176
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomShapeFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomShapeFeatureContainer.java)212
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultConnectionRouter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultConnectionRouter.java)134
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultCopyBPMNElementFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultCopyBPMNElementFeature.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java180
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNConnectionFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNConnectionFeature.java)46
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultMoveBPMNShapeFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultMoveBPMNShapeFeature.java)102
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultPasteBPMNElementFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultPasteBPMNElementFeature.java)172
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultRemoveBPMNShapeFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultRemoveBPMNShapeFeature.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultResizeBPMNShapeFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultResizeBPMNShapeFeature.java)60
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DetourPoints.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DetourPoints.java)120
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DirectEditBaseElementFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DirectEditBaseElementFeature.java)34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/FeatureResolver.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/FeatureResolver.java)65
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/GraphitiConstants.java280
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2AddFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2AddFeature.java)25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2CreateFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2CreateFeature.java)48
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2FeatureProvider.java33
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionFeatureContainer.java)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionRouter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionRouter.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ICustomElementFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/ICustomElementFeatureContainer.java)32
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IFeatureContainer.java)76
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IShapeFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IShapeFeatureContainer.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java)128
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java72
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MoveFlowNodeFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MoveFlowNodeFeature.java)311
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java157
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/PropertyBasedFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/PropertyBasedFeatureContainer.java)30
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ReconnectBaseElementFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ReconnectBaseElementFeature.java)34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RouteSolver.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RouteSolver.java)117
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingLane.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingLane.java)147
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingNet.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingNet.java)166
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowDocumentationFeature.java252
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowPropertiesFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowPropertiesFeature.java)31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java119
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractCreateExpandableFlowNodeFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractCreateExpandableFlowNodeFeature.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java116
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/ActivitySelectionBehavior.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/ActivitySelectionBehavior.java)34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/LayoutActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/LayoutActivityFeature.java)87
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/MoveActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/MoveActivityFeature.java)82
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityCompensateMarkerFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityCompensateMarkerFeature.java)34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityLoopAndMultiInstanceMarkerFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityLoopAndMultiInstanceMarkerFeature.java)69
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractAddTaskFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AddTaskFeature.java)26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractCreateTaskFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractCreateTaskFeature.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AddTaskFeature.java40
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/DirectEditTaskFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/DirectEditTaskFeature.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AbstractCreateArtifactFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AbstractCreateArtifactFeature.java)9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AddTextAnnotationFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AddTextAnnotationFeature.java)67
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/DirectEditTextAnnotationFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/DirectEditTextAnnotationFeature.java)26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/LayoutTextAnnotationFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/LayoutTextAnnotationFeature.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/UpdateTextAnnotationFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/UpdateTextAnnotationFeature.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/AddBendpointFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/AddBendpointFeature.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/MoveBendpointFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/MoveBendpointFeature.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/RemoveBendpointFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/RemoveBendpointFeature.java)9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyProperties.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/Properties.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyUtil.java314
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java87
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java)39
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java.orig129
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyLabelFeature.java88
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantBandsFeature.java97
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantRefsFeature.java420
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/CustomKeyCommandFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/CustomKeyCommandFeature.java)44
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/AbstractResizeContainerFeature.java122
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/LayoutContainerFeature.java308
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/MoveContainerFeature.java69
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/UpdateContainerLabelFeature.java122
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/AddLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/AddLaneFeature.java)121
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/DirectEditLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/DirectEditLaneFeature.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/Messages.java26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromDiagramToLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromDiagramToLaneFeature.java)28
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromDiagramToParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromDiagramToParticipantFeature.java)55
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToDiagramFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToDiagramFeature.java)29
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToLaneFeature.java)46
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToParticipantFeature.java)35
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToDiagramFeature.java61
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToLaneFeature.java73
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToParticipantFeature.java)59
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveLaneFeature.java198
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/ResizeLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/ResizeLaneFeature.java)225
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/UpdateLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/UpdateLaneFeature.java)15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/AddParticipantFeature.java)72
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java.orig133
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/DirectEditParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/DirectEditParticipantFeature.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/Messages.java27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/ResizeParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/ResizeParticipantFeature.java)96
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantFeature.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantMultiplicityFeature.java)31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java.orig143
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateDataInputOutputFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateDataInputOutputFeature.java)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateRootElementFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateRootElementFeature.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java)62
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java.orig135
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java129
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractBoundaryEventOperation.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractBoundaryEventOperation.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractCreateEventFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractCreateEventFeature.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractUpdateEventFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractUpdateEventFeature.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java87
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java.orig (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java)45
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/EventSelectionBehavior.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/EventSelectionBehavior.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java101
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractCreateEventDefinitionFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractCreateEventDefinitionFeature.java)17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractEventDefinitionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractEventDefinitionFeatureContainer.java)41
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractUpdateEventDefinitionFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractUpdateEventDefinitionFeature.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/DecorationAlgorithm.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/DecorationAlgorithm.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java)71
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractReconnectFlowFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractReconnectFlowFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/messages.properties)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AbstractCreateGatewayFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AbstractCreateGatewayFeature.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java86
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java.orig (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java)40
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/GatewaySelectionBehavior.java78
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AbstractAddLabelFeature.java95
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddConnectionLabelFeature.java53
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddShapeLabelFeature.java58
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LabelFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LabelFeatureContainer.java)78
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java97
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java28
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveConnectionLabelFeature.java47
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveShapeLabelFeature.java74
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/RemoveLabelFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/RemoveLabelFeature.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java463
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/DefaultBusinessObjectDelegate.java250
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IBusinessObjectDelegate.java68
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IConstants.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IConstants.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java)51
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java)217
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDialogComposite.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDialogComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractListComposite.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractListComposite.java)44
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractPropertiesProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractPropertiesProvider.java)15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Bpmn2TabbedPropertySheetPage.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Bpmn2TabbedPropertySheetPage.java)39
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDialogComposite.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDialogComposite.java)40
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultListComposite.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultListComposite.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java)30
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/IPropertiesCompositeFactory.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/IPropertiesCompositeFactory.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListAndDetailCompositeBase.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListAndDetailCompositeBase.java)91
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeColumnProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeColumnProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/PropertiesCompositeFactory.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/PropertiesCompositeFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/TableColumn.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/TableColumn.java)17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/messages.properties)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/AbstractObjectEditingDialog.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/AbstractObjectEditingDialog.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/BooleanObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/BooleanObjectEditor.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ComboObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ComboObjectEditor.java)98
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/DelegatingObjectEditor.java76
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java)16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureListObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureListObjectEditor.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FloatObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FloatObjectEditor.java)34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/IntObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/IntObjectEditor.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ModelSubclassSelectionDialog.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ModelSubclassSelectionDialog.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/NCNameObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/NCNameObjectEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditingDialog.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditingDialog.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditor.java)221
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ReadonlyTextObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ReadonlyTextObjectEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/RefListEditingDialog.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/RefListEditingDialog.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextAndButtonObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextAndButtonObjectEditor.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextObjectEditor.java)31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/ColumnTableProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/ColumnTableProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableCursor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableCursor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableProvider.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/messages.properties)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeAdaptorFactory.java47
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeObjectFactory.java64
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerFactory.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerFactory.java)109
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceFactoryImpl.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceFactoryImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java)378
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java.orig1617
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceSetImpl.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceSetImpl.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/DIZorderComparator.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/DIZorderComparator.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecorator.java1364
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecoratorAdapter.java80
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelHandler.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ModelHandler.java)261
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelHandlerLocator.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ModelHandlerLocator.java)15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ProxyURIConverterImplExtension.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ProxyURIConverterImplExtension.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/RootElementComparator.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/RootElementComparator.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/package.html7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/AbstractPropertyChangeListenerProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/AbstractPropertyChangeListenerProvider.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Bpmn2Preferences.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Bpmn2Preferences.java)378
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java86
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablements.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablements.java)99
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java936
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/TristateCheckboxFieldEditor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/TristateCheckboxFieldEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/messages.properties)44
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/BaseRuntimeExtensionDescriptor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/BaseRuntimeDescriptor.java)129
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java)47
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskDescriptor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskDescriptor.java)52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskImageProvider.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskImageProvider.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/DataTypeDescriptor.java86
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ExpressionLanguageDescriptor.java56
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/FeatureContainerDescriptor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/FeatureContainerDescriptor.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IBpmn2PropertySection.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IBpmn2PropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IObjectDecorator.java25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IRuntimeExtensionDescriptor.java26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java86
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java156
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java828
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyExtensionDescriptor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyExtensionDescriptor.java)26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertySectionFilter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertySectionFilter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyTabDescriptor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2TabDescriptor.java)82
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ServiceImplementationDescriptor.java56
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java982
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntimeConfigurationException.java52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ToolPaletteDescriptor.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ToolPaletteDescriptor.java)90
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TypeLanguageDescriptor.java127
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/XMLConfigElement.java270
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/AnchorUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/AnchorUtil.java)322
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java)7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BusinessObjectUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BusinessObjectUtil.java)74
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/DiagramEditorAdapter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/DiagramEditorAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorDialog.java67
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorUtils.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorUtils.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java)1016
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FixDuplicateIdsDialog.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FixDuplicateIdsDialog.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/GraphicsUtil.java712
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ImportUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ImportUtil.java)101
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaProjectClassLoader.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaProjectClassLoader.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaReflectionUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaReflectionUtil.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java)1093
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/NamespaceUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/NamespaceUtil.java)80
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeDecoratorUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/GraphicsUtil.java)1150
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeLayoutManager.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeLayoutManager.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SimpleTreeIterator.java76
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/StyleUtil.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/StyleUtil.java)69
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Timer.java64
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Tuple.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Tuple.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ProjectValidator.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ProjectValidator.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java)126
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/FormalExpressionConstraint.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/FormalExpressionConstraint.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/LiveValidationListener.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/LiveValidationListener.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/Messages.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/Messages.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ResourcePropertyTester.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ResourcePropertyTester.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/TaskNameNotEmpty.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/TaskNameNotEmpty.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidIdConstraint.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidIdConstraint.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationDelegateClientSelector.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationDelegateClientSelector.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationErrorHandler.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationErrorHandler.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapter.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapterFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/messages.properties (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/messages.properties)32
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/util/enablements2xml.awk (renamed from org.eclipse.bpmn2.modeler.core/util/enablements2xml.awk)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/.classpath (renamed from org.eclipse.bpmn2.modeler.ui/.classpath)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/.project (renamed from org.eclipse.bpmn2.modeler.help/.project)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/BPMN2 Modeler User Guide.docx (renamed from org.eclipse.bpmn2.modeler.help/BPMN2 Modeler User Guide.docx)bin3468476 -> 3468476 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/META-INF/MANIFEST.MF (renamed from org.eclipse.bpmn2.modeler.help/META-INF/MANIFEST.MF)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/about.html (renamed from org.eclipse.bpmn2.modeler.wsil.feature/about.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/build.properties (renamed from org.eclipse.bpmn2.modeler.help/build.properties)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/context.xml (renamed from org.eclipse.bpmn2.modeler.help/context.xml)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/epl-v10.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER.htm (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image003.jpg)bin30888 -> 30888 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image004.jpg)bin34193 -> 34193 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image005.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image005.jpg)bin704 -> 704 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image006.jpg)bin718 -> 718 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image007.jpg)bin749 -> 749 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image008.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image008.jpg)bin1040 -> 1040 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image009.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image009.jpg)bin1296 -> 1296 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image010.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image010.jpg)bin732 -> 732 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE.htm (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ChoreographyDiagramType.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ChoreographyDiagramType.png)bin40855 -> 40855 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/CollaborationDiagramType.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/CollaborationDiagramType.png)bin93132 -> 93132 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ConversationDiagramType.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ConversationDiagramType.png)bin13186 -> 13186 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ProcessDiagramWithLanes.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ProcessDiagramWithLanes.jpg)bin34938 -> 34938 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image003.jpg)bin758 -> 758 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image004.jpg)bin887 -> 887 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image005.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image005.png)bin964 -> 964 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image006.jpg)bin1164 -> 1164 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image007.jpg)bin1085 -> 1085 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image008.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image008.png)bin1538 -> 1538 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image009.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image009.png)bin1237 -> 1237 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image010.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image010.png)bin1672 -> 1672 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image011.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image011.png)bin1536 -> 1536 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image012.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image012.png)bin1026 -> 1026 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image013.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image013.jpg)bin1139 -> 1139 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image014.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image014.png)bin2100 -> 2100 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image015.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image015.png)bin1734 -> 1734 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image016.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image016.png)bin1270 -> 1270 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image017.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image017.png)bin2188 -> 2188 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image018.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image018.png)bin6948 -> 6948 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image019.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image019.jpg)bin1504 -> 1504 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image020.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image020.png)bin1848 -> 1848 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image021.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image021.png)bin1729 -> 1729 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image022.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image022.png)bin1594 -> 1594 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image023.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image023.png)bin1825 -> 1825 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image024.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image024.png)bin1128 -> 1128 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image025.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image025.png)bin1609 -> 1609 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image026.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image026.png)bin2744 -> 2744 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image027.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image027.png)bin1496 -> 1496 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image028.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image028.png)bin2552 -> 2552 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image029.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image029.png)bin1371 -> 1371 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image030.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image030.png)bin845 -> 845 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image031.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image031.png)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image032.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image032.png)bin275 -> 275 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image033.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image033.png)bin2135 -> 2135 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image034.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image034.png)bin1682 -> 1682 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image035.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image035.png)bin1211 -> 1211 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image036.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image036.png)bin3312 -> 3312 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image037.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image037.png)bin3142 -> 3142 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image038.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image038.png)bin1507 -> 1507 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image039.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image039.png)bin1957 -> 1957 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image040.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image040.png)bin2142 -> 2142 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image041.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image041.png)bin430 -> 430 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image042.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image042.png)bin888 -> 888 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image043.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image043.png)bin1442 -> 1442 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image044.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image044.jpg)bin17745 -> 17745 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image045.png (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image045.png)bin79049 -> 79049 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image046.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image046.jpg)bin11521 -> 11521 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image047.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image047.jpg)bin4171 -> 4171 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS.htm (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image003.jpg)bin9466 -> 9466 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image004.jpg)bin3756 -> 3756 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image005.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image005.jpg)bin14073 -> 14073 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image006.jpg)bin7674 -> 7674 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image007.jpg)bin9493 -> 9493 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES.htm (renamed from org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING.htm (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image003.jpg)bin8722 -> 8722 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image004.jpg)bin381 -> 381 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image005.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image005.jpg)bin14220 -> 14220 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image006.jpg)bin14137 -> 14137 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image007.jpg)bin2791 -> 2791 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image008.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image008.png)bin556 -> 556 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image009.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image009.png)bin681 -> 681 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image010.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image010.png)bin436 -> 436 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image011.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image011.png)bin561 -> 561 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image012.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image012.png)bin584 -> 584 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image013.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image013.png)bin701 -> 701 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image014.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image014.png)bin190 -> 190 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image015.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image015.png)bin393 -> 393 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image016.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image016.png)bin452 -> 452 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image017.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image017.png)bin253 -> 253 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image018.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image018.png)bin324 -> 324 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image019.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image019.png)bin357 -> 357 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image020.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image020.png)bin294 -> 294 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image021.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image021.png)bin204 -> 204 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image022.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image022.png)bin281 -> 281 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image023.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image023.png)bin197 -> 197 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image024.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image024.png)bin270 -> 270 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image025.png (renamed from org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image025.png)bin258 -> 258 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES.htm (renamed from org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION.htm (renamed from org.eclipse.bpmn2.modeler.help/html/INTRODUCTION.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image003.png (renamed from org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image003.png)bin556 -> 556 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image004.jpg)bin24949 -> 24949 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/MsoStyles-modified.css (renamed from org.eclipse.bpmn2.modeler.help/html/MsoStyles-modified.css)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW.htm (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image003.jpg)bin2293 -> 2293 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image004.png (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image004.png)bin546 -> 546 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image005.png (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image005.png)bin868 -> 868 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image006.png (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image006.png)bin730 -> 730 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image007.jpg)bin6590 -> 6590 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image008.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image008.jpg)bin9198 -> 9198 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image009.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image009.jpg)bin7950 -> 7950 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image010.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image010.jpg)bin3117 -> 3117 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS.htm (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image003.jpg)bin13274 -> 13274 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image004.jpg)bin6817 -> 6817 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image005.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image005.jpg)bin7888 -> 7888 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image006.jpg)bin7171 -> 7171 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image007.jpg)bin6917 -> 6917 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image008.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image008.jpg)bin6115 -> 6115 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image009.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image009.jpg)bin6929 -> 6929 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image010.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image010.jpg)bin9321 -> 9321 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image011.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image011.jpg)bin12537 -> 12537 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image012.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image012.jpg)bin10112 -> 10112 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image013.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image013.jpg)bin770 -> 770 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image014.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image014.jpg)bin5306 -> 5306 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image015.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image015.jpg)bin11437 -> 11437 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image016.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image016.jpg)bin7501 -> 7501 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image017.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image017.jpg)bin7498 -> 7498 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image018.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image018.jpg)bin8510 -> 8510 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW.htm (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image003.jpg)bin9234 -> 9234 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image004.jpg)bin698 -> 698 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image005.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image005.jpg)bin6690 -> 6690 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image006.jpg)bin7292 -> 7292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image007.jpg)bin16268 -> 16268 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image008.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image008.jpg)bin736 -> 736 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image009.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image009.jpg)bin763 -> 763 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image010.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image010.jpg)bin779 -> 779 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image011.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image011.jpg)bin771 -> 771 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image012.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image012.jpg)bin731 -> 731 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image013.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image013.jpg)bin765 -> 765 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image014.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image014.jpg)bin749 -> 749 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image015.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image015.jpg)bin894 -> 894 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image016.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image016.jpg)bin8381 -> 8381 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image017.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image017.jpg)bin10900 -> 10900 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image018.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image018.jpg)bin7018 -> 7018 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image019.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image019.jpg)bin6996 -> 6996 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image020.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image020.jpg)bin9808 -> 9808 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image021.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image021.jpg)bin13510 -> 13510 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image022.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image022.jpg)bin13252 -> 13252 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image023.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image023.jpg)bin14773 -> 14773 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image024.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image024.jpg)bin11831 -> 11831 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image025.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image025.jpg)bin11794 -> 11794 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image026.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image026.jpg)bin12699 -> 12699 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image027.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image027.jpg)bin11633 -> 11633 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image028.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image028.jpg)bin11117 -> 11117 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image029.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image029.jpg)bin10084 -> 10084 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image030.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image030.jpg)bin14497 -> 14497 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image031.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image031.jpg)bin15732 -> 15732 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image032.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image032.jpg)bin8398 -> 8398 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image033.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image033.jpg)bin6859 -> 6859 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image034.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image034.jpg)bin5756 -> 5756 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image035.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image035.jpg)bin6256 -> 6256 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image036.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image036.jpg)bin6799 -> 6799 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image037.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image037.jpg)bin5338 -> 5338 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image038.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image038.png)bin6849 -> 6849 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image039.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image039.jpg)bin3245 -> 3245 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image040.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image040.png)bin13357 -> 13357 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image041.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image041.jpg)bin6127 -> 6127 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image042.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image042.jpg)bin18577 -> 18577 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image043.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image043.png)bin17180 -> 17180 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image044.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image044.png)bin19766 -> 19766 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image045.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image045.png)bin25890 -> 25890 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image046.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image046.png)bin28176 -> 28176 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image047.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image047.png)bin41567 -> 41567 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image048.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image048.png)bin32707 -> 32707 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image049.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image049.png)bin24483 -> 24483 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image050.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image050.png)bin21478 -> 21478 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image051.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image051.png)bin47351 -> 47351 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image052.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image052.png)bin22167 -> 22167 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image053.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image053.png)bin46854 -> 46854 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image054.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image054.png)bin50759 -> 50759 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image055.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image055.png)bin18665 -> 18665 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image056.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image056.png)bin20715 -> 20715 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image057.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image057.png)bin21790 -> 21790 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image058.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image058.jpg)bin12598 -> 12598 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image059.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image059.jpg)bin770 -> 770 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image060.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image060.jpg)bin3531 -> 3531 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image061.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image061.jpg)bin7129 -> 7129 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image062.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image062.jpg)bin13500 -> 13500 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image063.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image063.png)bin21475 -> 21475 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image064.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image064.jpg)bin7162 -> 7162 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image065.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image065.png)bin17964 -> 17964 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image066.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image066.png)bin24060 -> 24060 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image067.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image067.png)bin27838 -> 27838 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image068.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image068.png)bin17663 -> 17663 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image069.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image069.png)bin20248 -> 20248 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image070.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image070.png)bin19221 -> 19221 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image071.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image071.png)bin21773 -> 21773 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image072.png (renamed from org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image072.png)bin24617 -> 24617 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS.htm (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image003.jpg)bin49382 -> 49382 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image004.jpg)bin22458 -> 22458 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image005.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image005.jpg)bin730 -> 730 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image006.jpg)bin8743 -> 8743 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image007.jpg)bin10316 -> 10316 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image008.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image008.jpg)bin10844 -> 10844 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image009.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image009.jpg)bin13029 -> 13029 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image010.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image010.jpg)bin9246 -> 9246 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image011.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image011.jpg)bin10412 -> 10412 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES.htm (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES.htm)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image001.gif (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image001.gif)bin292 -> 292 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image002.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image002.jpg)bin569 -> 569 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image003.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image003.jpg)bin17194 -> 17194 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image004.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image004.jpg)bin19096 -> 19096 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image005.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image005.jpg)bin18306 -> 18306 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image006.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image006.jpg)bin18899 -> 18899 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image007.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image007.jpg)bin5844 -> 5844 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image008.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image008.jpg)bin23998 -> 23998 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image009.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image009.jpg)bin706 -> 706 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image010.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image010.jpg)bin19028 -> 19028 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image011.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image011.jpg)bin12777 -> 12777 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image012.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image012.jpg)bin15915 -> 15915 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image013.jpg (renamed from org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image013.jpg)bin10360 -> 10360 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/html/toc.html (renamed from org.eclipse.bpmn2.modeler.help/html/toc.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/license.html164
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/plugin.properties2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/plugin.xml (renamed from org.eclipse.bpmn2.modeler.help/plugin.xml)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/pom.xml (renamed from org.eclipse.bpmn2.modeler.help/pom.xml)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/scripts/buildlinks.sh (renamed from org.eclipse.bpmn2.modeler.help/scripts/buildlinks.sh)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/scripts/fixlinks.sh (renamed from org.eclipse.bpmn2.modeler.help/scripts/fixlinks.sh)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/scripts/links.txt (renamed from org.eclipse.bpmn2.modeler.help/scripts/links.txt)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/Activator.java (renamed from org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/Activator.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/IHelpContexts.java (renamed from org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/IHelpContexts.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.help/toc.xml (renamed from org.eclipse.bpmn2.modeler.help/toc.xml)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.classpath (renamed from org.eclipse.bpmn2.modeler.runtime.example/.classpath)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.project (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.project)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/about.html (renamed from org.eclipse.bpmn2.modeler.wsil/about.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/build.properties (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/build.properties)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.ui/epl-v10.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CancelEndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CancelEndEvent.png)bin599 -> 599 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationEndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationEndEvent.png)bin540 -> 540 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationStartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationStartEvent.png)bin597 -> 597 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalCatchEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalCatchEvent.png)bin547 -> 547 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalStartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalStartEvent.png)bin494 -> 494 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EndEvent.png)bin535 -> 535 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorCatchEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorCatchEvent.png)bin679 -> 679 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorEndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorEndEvent.png)bin641 -> 641 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorStartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorStartEvent.png)bin662 -> 662 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationCatchEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationCatchEvent.png)bin664 -> 664 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationEndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationEndEvent.png)bin620 -> 620 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationStartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationStartEvent.png)bin646 -> 646 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationThrowEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationThrowEvent.png)bin666 -> 666 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/IntermediateEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/IntermediateEvent.png)bin653 -> 653 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageCatchEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageCatchEvent.png)bin546 -> 546 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageEndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageEndEvent.png)bin425 -> 425 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageStartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageStartEvent.png)bin474 -> 474 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageThrowEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageThrowEvent.png)bin476 -> 476 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalCatchEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalCatchEvent.png)bin663 -> 663 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalEndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalEndEvent.png)bin549 -> 549 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalStartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalStartEvent.png)bin647 -> 647 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalThrowEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalThrowEvent.png)bin610 -> 610 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/StartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/StartEvent.png)bin528 -> 528 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TerminateEndEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TerminateEndEvent.png)bin597 -> 597 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerCatchEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerCatchEvent.png)bin669 -> 669 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerStartEvent.png (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerStartEvent.png)bin634 -> 634 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/wizard.gif (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/wizard.gif)bin875 -> 875 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/license.html164
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/README.txt (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/README.txt)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/bpsim.ecore (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/bpsim.ecore)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.ecore (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.ecore)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.genmodel (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.genmodel)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.genmodel (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.genmodel)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.xsd (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.xsd)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.ecore (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.ecore)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.genmodel (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.genmodel)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.xsd (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.xsd)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/drools.ecore (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/drools.ecore)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/oursimchanges.xml (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/oursimchanges.xml)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties)31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml)120
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/pom.xml (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/pom.xml)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Activator.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Activator.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5ImageProvider.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5ImageProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5RuntimeExtension.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5RuntimeExtension.java)226
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/ProcessVariableNameChangeAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/ProcessVariableNameChangeAdapter.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/EditBeanDialog.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/EditBeanDialog.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/SampleCustomEditor.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/SampleCustomEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/messages.properties (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/messages.properties)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/ParameterDefinition.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/ParameterDefinition.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/TypeObject.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/TypeObject.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/Work.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/Work.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinition.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinition.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinitionExtension.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinitionExtension.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkEditor.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeFactory.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeRegistry.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeRegistry.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/InstanceDataTypeFactory.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/InstanceDataTypeFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/NewInstanceDataTypeFactory.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/NewInstanceDataTypeFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/BooleanDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/BooleanDataType.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/EnumDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/EnumDataType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/FloatDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/FloatDataType.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/IntegerDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/IntegerDataType.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/StringDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/StringDataType.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/UndefinedDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/UndefinedDataType.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/ParameterDefinitionImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/ParameterDefinitionImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionExtensionImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionExtensionImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmBusinessRuleTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmBusinessRuleTaskFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmCustomTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmCustomTaskFeatureContainer.java)35
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmEndEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmEndEventFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmErrorEventDefinitionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmErrorEventDefinitionFeatureContainer.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateCatchEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateCatchEventFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateThrowEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateThrowEventFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmManualTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmManualTaskFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmReceiveTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmReceiveTaskFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmScriptTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmScriptTaskFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSendTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSendTaskFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSequenceFlowFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSequenceFlowFeatureContainer.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmServiceTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmServiceTaskFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSignalEventDefinitionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSignalEventDefinitionFeatureContainer.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmStartEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmStartEventFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTaskFeatureContainer.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTerminateEventDefinitionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTerminateEventDefinitionFeatureContainer.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTimerEventDefinitionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTimerEventDefinitionFeatureContainer.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmUserTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmUserTaskFeatureContainer.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BPSimDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BPSimDataType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BetaDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BetaDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BinomialDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BinomialDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BooleanParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BooleanParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimFactory.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimPackage.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimPackage.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Calendar.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Calendar.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ConstantParameter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ConstantParameter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ControlParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ControlParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/CostParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/CostParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DateTimeParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DateTimeParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DistributionParameter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DistributionParameter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DocumentRoot.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DocumentRoot.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DurationParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DurationParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParametersType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParametersType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/EnumParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/EnumParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ErlangDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ErlangDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ExpressionParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ExpressionParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/FloatingParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/FloatingParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/GammaDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/GammaDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/LogNormalDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/LogNormalDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NegativeExponentialDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NegativeExponentialDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NormalDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NormalDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NumericParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NumericParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Parameter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Parameter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ParameterValue.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ParameterValue.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PoissonDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PoissonDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PriorityParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PriorityParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResourceParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResourceParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResultType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResultType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Scenario.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Scenario.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParametersType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParametersType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/StringParameterType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/StringParameterType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeParameters.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeParameters.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeUnit.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeUnit.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TriangularDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TriangularDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TruncatedNormalDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TruncatedNormalDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UniformDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UniformDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionDataPointType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionDataPointType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/VendorExtension.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/VendorExtension.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/WeibullDistributionType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/WeibullDistributionType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BPSimDataTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BPSimDataTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BetaDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BetaDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BinomialDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BinomialDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BooleanParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BooleanParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimFactoryImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimFactoryImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimPackageImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimPackageImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CalendarImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CalendarImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ConstantParameterImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ConstantParameterImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ControlParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ControlParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CostParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CostParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DateTimeParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DateTimeParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DistributionParameterImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DistributionParameterImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DocumentRootImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DocumentRootImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DurationParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DurationParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/EnumParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/EnumParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ErlangDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ErlangDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ExpressionParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ExpressionParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/FloatingParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/FloatingParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/GammaDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/GammaDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/LogNormalDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/LogNormalDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NegativeExponentialDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NegativeExponentialDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NormalDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NormalDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NumericParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NumericParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterValueImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterValueImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PoissonDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PoissonDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PriorityParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PriorityParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ResourceParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ResourceParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/StringParameterTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/StringParameterTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TimeParametersImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TimeParametersImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TriangularDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TriangularDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TruncatedNormalDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TruncatedNormalDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UniformDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UniformDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionDataPointTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionDataPointTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/VendorExtensionImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/VendorExtensionImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/WeibullDistributionTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/WeibullDistributionTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimAdapterFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceFactoryImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceFactoryImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimSwitch.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimSwitch.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimXMLProcessor.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimXMLProcessor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/BPSimDataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/BPSimDataType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DocumentRoot.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DocumentRoot.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsFactory.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsPackage.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsPackage.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ExternalProcess.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ExternalProcess.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/GlobalType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/GlobalType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ImportType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ImportType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetadataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetadataType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetaentryType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetaentryType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnEntryScriptType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnEntryScriptType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnExitScriptType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnExitScriptType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/BPSimDataTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/BPSimDataTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DocumentRootImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DocumentRootImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsFactoryImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsFactoryImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsPackageImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsPackageImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ExternalProcessImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ExternalProcessImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/GlobalTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/GlobalTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ImportTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ImportTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetadataTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetadataTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetaentryTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetaentryTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnEntryScriptTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnEntryScriptTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnExitScriptTypeImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnExitScriptTypeImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsAdapterFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceFactoryImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceFactoryImpl.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceImpl.java)94
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsSwitch.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsSwitch.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsValidator.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsValidator.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsXMLProcessor.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsXMLProcessor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/JbpmPreferencePage.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/JbpmPreferencePage.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityDetailComposite.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmBusinessRuleTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmBusinessRuleTaskPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityDetailComposite.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataAssociationDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataAssociationDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsDetailComposite.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertyComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertyComposite.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportObjectEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportTypeDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportTypeDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfaceDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfaceDetailComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfacePropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfacePropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersDetailComposite.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersListComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersListComposite.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionDetailComposite.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionListComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionListComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmMultiInstanceDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmMultiInstanceDetailComposite.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmProcessDiagramPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmProcessDiagramPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskDetailComposite.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/Messages.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationDetailComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmCorrelationPropertyPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmCorrelationPropertyPropertiesAdapter.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataAssociationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataAssociationPropertiesAdapter.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataInputPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataInputPropertiesAdapter.java)25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataOutputPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataOutputPropertiesAdapter.java)25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmErrorPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmErrorPropertiesAdapter.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmEscalationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmEscalationPropertiesAdapter.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmFormalExpressionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmFormalExpressionPropertiesAdapter.java)15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGatewayPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGatewayPropertiesAdapter.java)7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGlobalTypePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGlobalTypePropertiesAdapter.java)41
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMessagePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMessagePropertiesAdapter.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java54
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnEntryScriptPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnEntryScriptPropertiesAdapter.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnExitScriptPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnExitScriptPropertiesAdapter.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmPropertyPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmPropertyPropertiesAdapter.java)43
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmResourceParameterPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmResourceParameterPropertiesAdapter.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmSignalPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmSignalPropertiesAdapter.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/messages.properties (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/messages.properties)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmInterfaceImportDialog.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmInterfaceImportDialog.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmModelUtil.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmModelUtil.java)112
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/messages.properties (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/BusinessRuleTaskConstraint.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/BusinessRuleTaskConstraint.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/CallActivityConstraint.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/CallActivityConstraint.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/DroolsPackage.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/DroolsPackage.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/GatewayConstraint.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/GatewayConstraint.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/IDiagramProfile.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/IDiagramProfile.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetadataType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetadataType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetaentryType.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetaentryType.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessConstraint.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessConstraint.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessVariableNameConstraint.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessVariableNameConstraint.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/TaskConstraint.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/TaskConstraint.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/UserTaskConstraint.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/UserTaskConstraint.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/messages.properties (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDException.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDException.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDHandler.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDHandler.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinition.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinition.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinitionImpl.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinitionImpl.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/Messages.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizard.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizard.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizardPage1.java (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizardPage1.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/messages.properties (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/.classpath (renamed from org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.classpath)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/.gitignore2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/.options (renamed from org.eclipse.bpmn2.modeler.ui/.options)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/.project (renamed from org.eclipse.bpmn2.modeler.ui/.project)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF (renamed from org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/about.html26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/build.properties (renamed from org.eclipse.bpmn2.modeler.ui/build.properties)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/epl-v10.html (renamed from org.eclipse.bpmn2.modeler.wsil/epl-v10.html)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/AdHocSubProcess.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/AdHocSubProcess.png)bin522 -> 522 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Association.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Association.png)bin538 -> 538 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNDiagram.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/BPMNDiagram.png)bin227 -> 227 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNEdge.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/BPMNEdge.png)bin102 -> 102 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNLabel.pngbin0 -> 323 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNShape.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/BPMNShape.png)bin219 -> 219 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNSubDiagram.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/BPMNSubDiagram.png)bin275 -> 275 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BoundaryEvent.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/BoundaryEvent.png)bin689 -> 689 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BusinessRuleTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/BusinessRuleTask.png)bin332 -> 332 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.pngbin0 -> 225 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallChoreography.pngbin0 -> 337 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallConversation.pngbin0 -> 394 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalBusinessRuleTask.pngbin0 -> 259 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalManualTask.pngbin0 -> 297 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalScriptTask.pngbin0 -> 335 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalTask.pngbin0 -> 236 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalUserTask.pngbin0 -> 308 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CancelEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/CancelEventDefinition.png)bin450 -> 450 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Category.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Category.png)bin365 -> 365 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Choreography.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Choreography.png)bin181 -> 181 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ChoreographyTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ChoreographyTask.png)bin280 -> 280 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Collaboration.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Collaboration.png)bin196 -> 196 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CompensateEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/CompensateEventDefinition.png)bin405 -> 405 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ComplexGateway.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ComplexGateway.png)bin576 -> 576 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ConditionalEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ConditionalEventDefinition.png)bin371 -> 371 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Conversation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Conversation.png)bin366 -> 366 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ConversationLink.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ConversationLink.png)bin237 -> 237 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CustomTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/CustomTask.png)bin337 -> 337 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataAssociation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataAssociation.png)bin248 -> 248 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataInput.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataInput.png)bin319 -> 319 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataInputAssociation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataInputAssociation.png)bin266 -> 266 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataObject.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataObject.png)bin301 -> 301 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataObjectReference.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataObjectReference.png)bin301 -> 301 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutput.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataOutput.png)bin330 -> 330 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutputAssociation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataOutputAssociation.png)bin272 -> 272 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataStore.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataStore.png)bin337 -> 337 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataStoreReference.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/DataStoreReference.png)bin337 -> 337 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EndEvent.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/EndEvent.png)bin427 -> 427 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Error.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Error.png)bin415 -> 415 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ErrorEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ErrorEventDefinition.png)bin415 -> 415 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Escalation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Escalation.png)bin372 -> 372 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EscalationEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/EscalationEventDefinition.png)bin372 -> 372 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EventBasedGateway.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/EventBasedGateway.png)bin736 -> 736 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ExclusiveGateway.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ExclusiveGateway.png)bin396 -> 396 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalBusinessRuleTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/GlobalBusinessRuleTask.png)bin241 -> 241 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalManualTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/GlobalManualTask.png)bin268 -> 268 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalScriptTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/GlobalScriptTask.png)bin344 -> 344 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalUserTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/GlobalUserTask.png)bin347 -> 347 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Group.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Group.png)bin338 -> 338 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/InMessage.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/InMessage.png)bin416 -> 416 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/InclusiveGateway.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/InclusiveGateway.png)bin513 -> 513 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Interface.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Interface.png)bin232 -> 232 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateCatchEvent.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateCatchEvent.png)bin676 -> 676 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateThrowEvent.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateThrowEvent.png)bin511 -> 511 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ItemDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ItemDefinition.png)bin303 -> 303 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Lane.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Lane.png)bin222 -> 222 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/LinkEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/LinkEventDefinition.png)bin313 -> 313 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ManualTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ManualTask.png)bin339 -> 339 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Message.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Message.png)bin408 -> 408 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/MessageEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/MessageEventDefinition.png)bin304 -> 304 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/MessageFlow.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/MessageFlow.png)bin374 -> 374 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Operation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Operation.png)bin520 -> 520 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/OutMessage.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/OutMessage.png)bin430 -> 430 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ParallelGateway.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ParallelGateway.png)bin369 -> 369 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Participant.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Participant.png)bin227 -> 227 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ParticipantBand.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ParticipantBand.png)bin128 -> 128 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerEntity.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/PartnerEntity.png)bin560 -> 560 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerRole.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/PartnerRole.png)bin249 -> 249 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Process.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Process.png)bin207 -> 207 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ReceiveTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ReceiveTask.png)bin319 -> 319 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Resource.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Resource.png)bin472 -> 472 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ScriptTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ScriptTask.png)bin409 -> 409 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SendTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/SendTask.png)bin348 -> 348 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SequenceFlow.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/SequenceFlow.png)bin221 -> 221 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ServiceTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/ServiceTask.png)bin467 -> 467 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Signal.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Signal.png)bin286 -> 286 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SignalEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/SignalEventDefinition.png)bin286 -> 286 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/StartEvent.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/StartEvent.png)bin405 -> 405 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubChoreography.pngbin0 -> 308 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubConversation.pngbin0 -> 371 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubProcess.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/SubProcess.png)bin483 -> 483 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Task.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/Task.png)bin422 -> 422 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TerminateEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/TerminateEventDefinition.png)bin294 -> 294 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TextAnnotation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/TextAnnotation.png)bin426 -> 426 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TimerEventDefinition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/TimerEventDefinition.png)bin555 -> 555 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.pngbin0 -> 252 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/UserTask.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/UserTask.png)bin411 -> 411 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/action.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/action.gif)bin955 -> 955 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/addmessage.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/addmessage.png)bin286 -> 286 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/addparticipant.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/addparticipant.png)bin289 -> 289 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/blackbox.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/blackbox.png)bin204 -> 204 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/close.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/close.png)bin315 -> 315 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/collapse.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/collapse.png)bin363 -> 363 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/configure.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/configure.png)bin764 -> 764 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/disabled.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/disabled.png)bin902 -> 902 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/expand.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/expand.png)bin404 -> 404 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/folder.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/folder.png)bin289 -> 289 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/folder_disabled.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/folder_disabled.png)bin331 -> 331 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/info.pngbin0 -> 675 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/morph.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/morph.png)bin606 -> 606 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/properties.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/properties.png)bin762 -> 762 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/pullup.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/pullup.png)bin255 -> 255 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/pushdown.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/pushdown.png)bin251 -> 251 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/removemessage.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/removemessage.png)bin275 -> 275 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/rotate.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/rotate.png)bin294 -> 294 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/16/whitebox.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/16/whitebox.png)bin248 -> 248 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/20/BusinessModel.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/20/BusinessModel.png)bin495 -> 495 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Condition.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/20/Condition.png)bin441 -> 441 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/20/InterchangeModel.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/20/InterchangeModel.png)bin952 -> 952 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Multiple.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/20/Multiple.png)bin476 -> 476 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Thumbnail.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/20/Thumbnail.png)bin479 -> 479 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Timer.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/20/Timer.png)bin815 -> 815 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/bpmn2_editor_16.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/bpmn2_editor_16.png)bin493 -> 493 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDAttributeDeclaration.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDAttributeDeclaration.gif)bin166 -> 166 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDComplexTypeDefinition.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDComplexTypeDefinition.gif)bin155 -> 155 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDElementDeclaration.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDElementDeclaration.gif)bin351 -> 351 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDSimpleTypeDefinition.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDSimpleTypeDefinition.gif)bin150 -> 150 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2error.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2error.png)bin455 -> 455 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2input.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2input.png)bin489 -> 489 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2interface.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2interface.png)bin240 -> 240 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2operation.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2operation.png)bin682 -> 682 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2output.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2output.png)bin499 -> 499 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2process.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2process.png)bin429 -> 429 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-checked.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-checked.png)bin197 -> 197 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-unchecked.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-unchecked.png)bin131 -> 131 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/input.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/input.gif)bin338 -> 338 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaClass.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/javaClass.png)bin554 -> 554 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaInterface.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/javaInterface.png)bin494 -> 494 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicField.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicField.png)bin186 -> 186 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicMethod.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicMethod.png)bin268 -> 268 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/message.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/message.gif)bin366 -> 366 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/message_part.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/message_part.gif)bin582 -> 582 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/operation.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/operation.gif)bin345 -> 345 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/output.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/output.gif)bin347 -> 347 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/throw.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/throw.gif)bin210 -> 210 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/wsdl_port_type.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj16/wsdl_port_type.gif)bin388 -> 388 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/message.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj20/message.png)bin575 -> 575 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/message_part.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj20/message_part.png)bin673 -> 673 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/throw.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj20/throw.png)bin485 -> 485 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/wsdl_port_type.png (renamed from org.eclipse.bpmn2.modeler.ui/icons/obj20/wsdl_port_type.png)bin849 -> 849 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography-pushed.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography-pushed.gif)bin3030 -> 3030 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography.gif)bin2877 -> 2877 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration-pushed.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration-pushed.gif)bin3119 -> 3119 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration.gif)bin3024 -> 3024 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/process-pushed.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/wizards/process-pushed.gif)bin2551 -> 2551 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/process.gif (renamed from org.eclipse.bpmn2.modeler.ui/icons/wizards/process.gif)bin2452 -> 2452 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/license.html164
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/plugin-old.xml (renamed from org.eclipse.bpmn2.modeler.ui/plugin.xml)82
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties (renamed from org.eclipse.bpmn2.modeler.ui/plugin.properties)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml1395
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/pom.xml46
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/schema/org.eclipse.bpmn2.modeler.ui.exsd (renamed from org.eclipse.bpmn2.modeler.ui/schema/org.eclipse.bpmn2.modeler.ui.exsd)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2ContentDescriber.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/BPMN2ContentDescriber.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultBpmn2RuntimeExtension.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultBpmn2RuntimeExtension.java)50
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultObjectDecorator.java48
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IConstants.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IConstants.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IFileChangeListener.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IFileChangeListener.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/ImageProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/ImageProvider.java)43
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java)212
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorDiItemProviderAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorDiItemProviderAdapterFactory.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorItemProviderAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorItemProviderAdapterFactory.java)41
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2WSDLAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2WSDLAdapterFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2XSDAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2XSDAdapterFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/DefinitionAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/DefinitionAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/FaultAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/FaultAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/ILabeledElement.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/ILabeledElement.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/INamedElement.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/INamedElement.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/InputMessageAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/InputMessageAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/MessageAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/MessageAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OperationAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OperationAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OutputMessageAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OutputMessageAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PartAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PartAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PortTypeAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PortTypeAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAbstractAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAbstractAdapter.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAttributeDeclarationAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAttributeDeclarationAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDComplexTypeDefinitionAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDComplexTypeDefinitionAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDElementDeclarationAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDElementDeclarationAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSchemaAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSchemaAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSimpleTypeDefinitionAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSimpleTypeDefinitionAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDTypeDefinitionAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDTypeDefinitionAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java88
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/BusinessRuleTaskPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/BusinessRuleTaskPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallActivityPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallActivityPropertiesAdapter.java)26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallChoreographyPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallChoreographyPropertiesAdapter.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallConversationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallConversationPropertiesAdapter.java)18
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CatchEventPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CatchEventPropertiesAdapter.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CategoryValuePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CategoryValuePropertiesAdapter.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CompensateEventDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CompensateEventDefinitionPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationKeyPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationKeyPropertiesAdapter.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyBindingPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyBindingPropertiesAdapter.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyPropertiesAdapter.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyREPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyRetrievalExpressionPropertiesAdapter.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java)119
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataInputPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataInputPropertiesAdapter.java)17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataObjectReferencePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataObjectReferencePropertiesAdapter.java)18
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataOutputPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataOutputPropertiesAdapter.java)17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataStoreReferencePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataStoreReferencePropertiesAdapter.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java112
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DocumentationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DocumentationPropertiesAdapter.java)32
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorEventDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorEventDefinitionPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorPropertiesAdapter.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationEventDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationEventDefinitionPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationPropertiesAdapter.java)17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventDefinitionPropertiesAdapter.java)7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventPropertiesAdapter.java)7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FlowElementPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FlowElementPropertiesAdapter.java)54
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FormalExpressionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FormalExpressionPropertiesAdapter.java)54
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GlobalScriptTaskPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GlobalScriptTaskPropertiesAdapter.java)20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GroupPropertiesAdapter.java84
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ImportPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ImportPropertiesAdapter.java)9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InputSetPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InputSetPropertiesAdapter.java)45
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InterfacePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InterfacePropertiesAdapter.java)86
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/IoSpecificationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/IoSpecificationPropertiesAdapter.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java)43
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionPropertiesAdapter.java)130
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java158
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageEventDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageEventDefinitionPropertiesAdapter.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java103
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessagePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessagePropertiesAdapter.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageRefFeatureDescriptor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageRefFeatureDescriptor.java)29
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/Messages.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java)35
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationPropertiesAdapter.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationRefFeatureDescriptor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationRefFeatureDescriptor.java)18
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OutputSetPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OutputSetPropertiesAdapter.java)43
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ParticipantPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ParticipantPropertiesAdapter.java)37
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ProcessPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ProcessPropertiesAdapter.java)68
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ReceiveTaskPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ReceiveTaskPropertiesAdapter.java)38
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceAssignmentExpressionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceAssignmentExpressionPropertiesAdapter.java)48
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterBindingPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterBindingPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterPropertiesAdapter.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceRolePropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceRolePropertiesAdapter.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementPropertiesAdapter.java)33
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementRefFeatureDescriptor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementRefFeatureDescriptor.java)30
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ScriptTaskPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ScriptTaskPropertiesAdapter.java)20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SendTaskPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SendTaskPropertiesAdapter.java)41
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SequenceFlowPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SequenceFlowPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ServiceTaskPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ServiceTaskPropertiesAdapter.java)39
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalEventDefinitionPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalEventDefinitionPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalPropertiesAdapter.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/TaskPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/TaskPropertiesAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ThrowEventPropertiesAdapter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ThrowEventPropertiesAdapter.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/messages.properties)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/CreateDiagramCommand.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/CreateDiagramCommand.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMNFeatureProvider.java)248
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2DiagramTypeProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/MainBPMNDiagramTypeProvider.java)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2FeatureMap.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/FeatureMap.java)98
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2ToolBehaviorProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMNToolBehaviorProvider.java)305
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Messages.java)17
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties28
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditingDomainListener.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditingDomainListener.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java)137
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorDiagramBehavior.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorDiagramBehavior.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorMatchingStrategy.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorMatchingStrategy.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java)25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MarkerChangeListener.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MarkerChangeListener.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/ConnectionLayerClippingStrategy.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/ConnectionLayerClippingStrategy.java)90
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java)40
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditorSite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditorSite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/Messages.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/SourceViewer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/SourceViewer.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractAppendNodeFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractAppendNodeFeature.java)16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractDefaultDeleteFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractDefaultDeleteFeature.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractMorphNodeFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractMorphNodeFeature.java)20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractRotateContainerFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractRotateContainerFeature.java)42
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AbstractActivityFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AbstractActivityFeatureContainer.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AppendActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AppendActivityFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/DeleteActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/DeleteActivityFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/MorphActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/MorphActivityFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AbstractExpandableActivityFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AbstractExpandableActivityFeatureContainer.java)87
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AdHocSubProcessFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AdHocSubProcessFeatureContainer.java)32
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java65
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CollapseFlowNodeFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CollapseFlowNodeFeature.java)29
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/DeleteExpandableActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/DeleteExpandableActivityFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ExpandFlowNodeFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ExpandFlowNodeFeature.java)18
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/LayoutExpandableActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/LayoutExpandableActivityFeature.java)34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PullupFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PullupFeature.java)7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PushdownFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PushdownFeature.java)9
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ResizeExpandableActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ResizeExpandableActivityFeature.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java279
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/TransactionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/TransactionFeatureContainer.java)35
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java)53
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java.orig144
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractAddDecoratedTaskFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractAddDecoratedTaskFeature.java)16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractTaskFeatureContainer.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/BusinessRuleTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/BusinessRuleTaskFeatureContainer.java)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ManualTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ManualTaskFeatureContainer.java)156
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/Messages.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ReceiveTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ReceiveTaskFeatureContainer.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ScriptTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ScriptTaskFeatureContainer.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/SendTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/SendTaskFeatureContainer.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ServiceTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ServiceTaskFeatureContainer.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/TaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/TaskFeatureContainer.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/UserTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/UserTaskFeatureContainer.java)156
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/messages.properties)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/CreateTextAnnotationFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/CreateTextAnnotationFeature.java)7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/GroupFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/GroupFeatureContainer.java)103
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java190
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCallGlobalTaskFeatureContainer.java68
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCreateCallGlobalTaskFeature.java56
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java292
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java.orig (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CallActivityFeatureContainer.java)114
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalBusinessRuleTaskFeatureContainer.java53
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalManualTaskFeatureContainer.java53
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalScriptTaskFeatureContainer.java54
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalTaskFeatureContainer.java52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalUserTaskFeatureContainer.java54
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java104
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractCreateChoreographyActivityFeature.java72
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddCallChoreographyFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddCallChoreographyFeature.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java118
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyMessageFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyMessageFeature.java)111
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyParticipantFeature.java)63
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyTaskFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyTaskFeature.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddSubChoreographyFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/UpdateTaskFeature.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/BlackboxFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/BlackboxFeature.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/CallChoreographyFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/CallChoreographyFeatureContainer.java)41
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyMessageLinkFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyMessageLinkFeatureContainer.java)32
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographySelectionBehavior.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographySelectionBehavior.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyTaskFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyTaskFeatureContainer.java)36
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/Messages.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java63
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyMessageFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyMessageFeature.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java97
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ResizeChoreographyFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ResizeChoreographyFeature.java)52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ShowDiagramPageFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ShowDiagramPageFeature.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java84
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java83
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java)104
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java.orig185
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java397
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/WhiteboxFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/WhiteboxFeature.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/messages.properties)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/AbstractCreateConversationNodeFeature.java85
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/AddConversationNodeFeature.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/conversation/AddConversationFeature.java)38
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CallConversationFeatureContainer.java117
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationFeatureContainer.java)31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationLinkFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationLinkFeatureContainer.java)29
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/SubConversationFeatureContainer.java110
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/AbstractDataFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/AbstractDataFeatureContainer.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataInputFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataInputFeatureContainer.java)37
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectFeatureContainer.java)167
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectReferenceFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectReferenceFeatureContainer.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataOutputFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataOutputFeatureContainer.java)42
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java)101
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java.orig326
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java)70
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java.orig415
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateItemAwareElementFeature.java111
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/messages.properties)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AbstractEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AbstractEventFeatureContainer.java)16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java)42
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java.orig155
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AppendEventFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AppendEventFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/BoundaryEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/BoundaryEventFeatureContainer.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/CreateBoundaryEventFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/CreateBoundaryEventFeature.java)48
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/EndEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/EndEventFeatureContainer.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateCatchEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateCatchEventFeatureContainer.java)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateThrowEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateThrowEventFeatureContainer.java)26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/LayoutBoundaryEventFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/LayoutBoundaryEventFeature.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/MoveBoundaryEventFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/MoveBoundaryEventFeature.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/StartEventFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/StartEventFeatureContainer.java)27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/UpdateBoundaryEventFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/UpdateBoundaryEventFeature.java)23
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CancelEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CancelEventDefinitionContainer.java)16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CompensateEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CompensateEventDefinitionContainer.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ConditionalEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ConditionalEventDefinitionContainer.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ErrorEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ErrorEventDefinitionContainer.java)31
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/EscalationEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/EscalationEventDefinitionContainer.java)20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/LinkEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/LinkEventDefinitionContainer.java)16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/MessageEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/MessageEventDefinitionContainer.java)24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/SignalEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/SignalEventDefinitionContainer.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TerminateEventDefinitionFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TerminateEventDefinitionFeatureContainer.java)20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TimerEventDefinitionContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TimerEventDefinitionContainer.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java)125
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java)70
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java)40
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/SequenceFlowFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/SequenceFlowFeatureContainer.java)35
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java)43
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java.orig202
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AppendGatewayFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AppendGatewayFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ComplexGatewayFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ComplexGatewayFeatureContainer.java)20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/EventBasedGatewayFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/EventBasedGatewayFeatureContainer.java)28
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ExclusiveGatewayFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ExclusiveGatewayFeatureContainer.java)16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/InclusiveGatewayFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/InclusiveGatewayFeatureContainer.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/MorphGatewayFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/MorphGatewayFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ParallelGatewayFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ParallelGatewayFeatureContainer.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java117
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java.orig (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java)41
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/CreateLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/CreateLaneFeature.java)44
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java191
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/LaneFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/LaneFeatureContainer.java)25
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/RotateLaneFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/RotateLaneFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties15
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/CreateParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/CreateParticipantFeature.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/DeleteParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/DeleteParticipantFeature.java)71
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/MoveParticipantFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/MoveParticipantFeature.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/ParticipantFeatureContainer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/ParticipantFeatureContainer.java)53
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/RotatePoolFeature.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/RotatePoolFeature.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties)179
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultCombo.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultCombo.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultComboFieldEditor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultComboFieldEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java1204
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorBehaviorPreferencePage.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorBehaviorPreferencePage.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorPreferencePage.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorPreferencePage.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2HomePreferencePage.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2HomePreferencePage.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2PropertyPage.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2PropertyPage.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Messages.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeEntry.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablementTreeEntry.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeViewer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeViewer.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/SelectableComboFieldEditor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/SelectableComboFieldEditor.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencePage.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencePage.java)306
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencesHelper.java (renamed from org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ToolProfilesPreferencesHelper.java)116
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/messages.properties)20
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedDetailComposite.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java222
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EColorConversionDelegate.java132
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EFontConversionDelegate.java229
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/ExtensionValueListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/ExtensionValueListComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/Messages.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyLabelProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyLabelProvider.java)7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTabDescriptorProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTabDescriptorProvider.java)74
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTreeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTreeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/StyleChangeAdapter.java156
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/CategoryDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/CategoryDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowDetailComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataAssignmentDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataAssignmentDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataInputPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataInputPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectReferencePropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectReferencePropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataOutputPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataOutputPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStorePropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStorePropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStoreReferencePropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStoreReferencePropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ExpressionDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ExpressionDetailComposite.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfaceDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfaceDetailComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ItemAwareElementDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ItemAwareElementDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageListComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/Messages.java)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/OperationDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/OperationDetailComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceAssignmentExpressionDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceAssignmentExpressionDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceParameterBindingDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceParameterBindingDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceRoleDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceRoleDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/messages.properties)11
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CorrelationPropertyREListComposite.java43
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertyComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertyComposite.java)164
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionDetailComposite.java)52
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionListComposite.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java41
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantDetailComposite.java)34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/PropertyListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/PropertyListComposite.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ResourceRoleListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ResourceRoleListComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties27
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/DefaultSchemaImportDialog.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/DefaultSchemaImportDialog.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/FileSelectionGroup.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/FileSelectionGroup.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/NamespacesEditingDialog.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/NamespacesEditingDialog.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaImportDialog.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaImportDialog.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaSelectionDialog.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaSelectionDialog.java)38
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/ViewerFileFilter.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/ViewerFileFilter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ItemDefinitionStructureEditor.java115
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/Messages.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/SchemaObjectEditor.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/SchemaObjectEditor.java)111
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java267
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties34
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CatchEventDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CatchEventDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventDetailComposite.java)39
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionDetailComposite.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataInputsListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataInputsListComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataOutputsListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataOutputsListComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EndEventDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EndEventDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java)49
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/StartEventDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/StartEventDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ThrowEventDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ThrowEventDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayDetailComposite.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/AbstractContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/AbstractContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2DefinitionsTreeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2DefinitionsTreeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ErrorTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ErrorTreeNode.java)4
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2MessageTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2MessageTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2OperationTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2OperationTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CachedTreeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CachedTreeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CompositeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CompositeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ITreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ITreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTreeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTreeContentProvider.java)21
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeContentProvider.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeTreeNode.java)1
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/MessageTypeTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/MessageTypeTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelLabelProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelLabelProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeLabelProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeLabelProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/OperationTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/OperationTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PartTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PartTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceTreeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceTreeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/TreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/TreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/VariableTypeTreeContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/VariableTypeTreeContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDAttributeDeclarationTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDAttributeDeclarationTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDElementDeclarationTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDElementDeclarationTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDSchemaTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDSchemaTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTypeDefinitionTreeNode.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTypeDefinitionTreeNode.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties16
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityInputDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityInputDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityOutputDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityOutputDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityPropertySection.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterMappingColumn.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterMappingColumn.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterNameColumn.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterNameColumn.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersListComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetNameColumn.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetNameColumn.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetsListComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetsListComposite.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskPropertySection.java)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/StandardLoopCharacteristicsDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/StandardLoopCharacteristicsDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskDetailComposite.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskDetailComposite.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskPropertySection.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskPropertySection.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/ListMap.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/ListMap.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/PropertyUtil.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/PropertyUtil.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/XSDUtils.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/XSDUtils.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BPMN2ModelView.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BPMN2ModelView.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BpmnModelViewerSelectionListener.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BpmnModelViewerSelectionListener.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java24
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeObject.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeObject.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeParent.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeParent.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewContentProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewContentProvider.java)12
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewLabelProvider.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewLabelProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/messages.properties)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/AbstractGraphicsTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/AbstractGraphicsTreeEditPart.java)22
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlinePage.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlinePage.java)70
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlineTreeViewer.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlineTreeViewer.java)26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java59
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPartFactory.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPartFactory.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNEdgeTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNEdgeTreeEditPart.java)5
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNLabelTreeEditPart.java56
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNShapeTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNShapeTreeEditPart.java)8
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BaseElementTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BaseElementTreeEditPart.java)6
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/DiagramTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/DiagramTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/FlowElementTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/FlowElementTreeEditPart.java)19
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/GroupTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/GroupTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/InterfaceTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/InterfaceTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/LaneTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/LaneTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/MessageTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/MessageTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/OperationTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/OperationTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/PoolTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/PoolTreeEditPart.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/RootElementTreeEditPart.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/RootElementTreeEditPart.java)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java)14
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizard.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizard.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage1.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage1.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage2.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage2.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/Messages.java (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/Messages.java)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/messages.properties (renamed from org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/messages.properties)10
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/.classpath7
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/.project (renamed from org.eclipse.bpmn2.modeler.wsil/.project)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/META-INF/MANIFEST.MF (renamed from org.eclipse.bpmn2.modeler.wsil/META-INF/MANIFEST.MF)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/about.html26
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/build.properties (renamed from org.eclipse.bpmn2.modeler.wsil/build.properties)3
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/epl-v10.html271
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/service.gif (renamed from org.eclipse.bpmn2.modeler.wsil/icons/obj16/service.gif)bin158 -> 158 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil.gif (renamed from org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil.gif)bin367 -> 367 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil_link.gif (renamed from org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil_link.gif)bin563 -> 563 bytes
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/license.html164
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/plugin.properties (renamed from org.eclipse.bpmn2.modeler.wsil/plugin.properties)2
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/plugin.xml (renamed from org.eclipse.bpmn2.modeler.wsil/plugin.xml)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/pom.xml (renamed from org.eclipse.bpmn2.modeler.wsil/pom.xml)13
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Activator.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Activator.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/IConstants.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/IConstants.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Messages.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Messages.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/messages.properties (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/messages.properties)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/Bpmn2WSILAdapterFactory.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/Bpmn2WSILAdapterFactory.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILInspectionAdapter.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILInspectionAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILLinkAdapter.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILLinkAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILServiceAdapter.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILServiceAdapter.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/dialogs/SchemaImportDialogWithWSIL.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/dialogs/SchemaImportDialogWithWSIL.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/preferences/WSILPreferencePage.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/preferences/WSILPreferencePage.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/Messages.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/Messages.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/WSILContentProvider.java (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/WSILContentProvider.java)0
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/messages.properties (renamed from org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/messages.properties)0
-rw-r--r--plugins/pom.xml29
-rw-r--r--pom.xml423
-rw-r--r--upversion.sh2
1895 files changed, 46980 insertions, 24224 deletions
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties b/examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties
deleted file mode 100644
index ce4faeea..00000000
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-
-pluginName = BPMN2 Modeler Custom Task Example
-providerName = Eclipse.org
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml b/examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml
deleted file mode 100644
index 523d072a..00000000
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="http://org.eclipse.bpmn2.modeler.examples.customtask"
- class="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyModelPackage"
- genModel="model/MyModel.genmodel"/>
- </extension>
-<!--
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="mymodel"
- class="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.util.MyModelResourceFactoryImpl"/>
- </extension>
--->
- <extension
- point="org.eclipse.bpmn2.modeler.runtime">
- <runtime
- class="org.eclipse.bpmn2.modeler.examples.customtask.MyRuntimeExtension"
- description="BPMN2 Modeler Runtime Extension - Custom Task Example"
- id="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- name="Custom Task Example Runtime Extension">
- </runtime>
- <model
- resourceFactory="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.util.MyModelResourceFactoryImpl"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- uri="http://org.eclipse.bpmn2.modeler.examples.customtask">
- </model>
-
- <customTask
- category="My Tools"
- description="This is a Custom Task that has been extended with runtime-specific configuration parameters. These parameters are defined in the &quot;My Task&quot; Property Tab"
- featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.MyTaskFeatureContainer"
- icon="MyTask.png"
- id="org.eclipse.bpmn2.modeler.examples.customtask.customTask1"
- name="My Task"
- propertyTabs="org.eclipse.bpmn2.modeler.examples.customtask.mytask.tab"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- type="Task">
- <!-- this extension feature used by the MyTaskFeatureContainer to determine this object's Custom Task ID -->
- <!-- which is the "customTask.id" value, above -->
- <property
- name="type"
- value="MyTask">
- </property>
- <property name="extensionValues">
- <value>
- <property name="taskConfig">
- <value>
- <property name="parameters">
- <value>
- <property name="name" value="taskName" />
- <property name="value" value="My Custom Task"/>
- </value>
- </property>
- <property name="parameters">
- <value>
- <property name="name" value="processingTime" />
- <property name="value" value="1 hr"/>
- </value>
- </property>
- </value>
- </property>
- </value>
- </property>
- </customTask>
-
- <customTask
- category="My Tools"
- description="This is a Custom Boundary Event that has been extended with a simple boolean flag."
- featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.MyBoundaryEventFeatureContainer"
- icon="MyBoundaryEvent.png"
- id="org.eclipse.bpmn2.modeler.examples.customtask.boundaryEvent1"
- name="My Boundary Event"
- propertyTabs="org.eclipse.bpmn2.modeler.examples.customtask.myBoundaryEvent.tab"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- type="BoundaryEvent">
- <!-- this extension feature used by the MyTaskFeatureContainer to determine this object's Custom Task ID -->
- <!-- which is the "customTask.id" value, above -->
- <property
- name="type"
- value="MyBoundaryEvent">
- </property>
- <property
- name="isEnabled"
- value="true"
- type="EBoolean">
- </property>
- </customTask>
-
- <customTask
- category="My Tools"
- description="This is a Custom Event Definition that has been extended with a simple string field."
- featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.MyEventDefinitionFeatureContainer"
- icon="MyEventDefinition.png"
- id="org.eclipse.bpmn2.modeler.examples.customtask.eventDefinition1"
- name="My Event Definition"
- propertyTabs="org.eclipse.bpmn2.modeler.examples.customtask.myEventDefinition.tab"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- type="EventDefinition">
- <!-- this extension feature used by the MyTaskFeatureContainer to determine this object's Custom Task ID -->
- <!-- which is the "customTask.id" value, above -->
- <property
- name="type"
- value="MyEventDefinition">
- </property>
- </customTask>
-
- <customTask
- category="Time-BPMN"
- description="TemporalDependency"
- featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.CustomTemporalDependencyFeatureContainer"
- icon="TemporalDepedency.png"
- id="org.eclipse.bpmn2.modeler.examples.timebpmn.temporalDependency"
- name="TemporalDependency"
- runtimeId="org.eclipse.bpmn2.modeler.examples.timebpmn.runtime"
- type="FlowElement">
- <property
- name="lagTime"
- type="EString"
- value="3hr">
- </property>
- </customTask>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.examples.customtask.mytask.tab"
- class="org.eclipse.bpmn2.modeler.examples.customtask.MyTaskPropertySection"
- label="My Task"
- type="org.eclipse.bpmn2.Task"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
- </propertyTab>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.examples.customtask.myBoundaryEvent.tab"
- class="org.eclipse.bpmn2.modeler.examples.customtask.MyBoundaryEventPropertySection"
- type="org.eclipse.bpmn2.Event"
- label="My Boundary Event"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
- </propertyTab>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.examples.customtask.myEventDefinition.tab"
- class="default"
- features="value"
- label="My Event Definition"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
- </propertyTab>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.examples.customtask.temporalDependency.tab"
- class="default"
- features="name lagTime"
- label="Temporal Dependency"
- type="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.TemporalDependency"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
- </propertyTab>
-
- <propertyExtension
- id="org.eclipse.bpmn2.modeler.examples.propertyExtension.MyEventDefinition"
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- type="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyEventDefinition"
- class="org.eclipse.bpmn2.modeler.examples.customtask.MyEventDefinitionPropertiesAdapter">
- </propertyExtension>
-
- <modelEnablement
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- type="Process"
- profile="Default Process"
- ref="org.eclipse.bpmn2.modeler.runtime.none:Process:Default Process">
-
- <!-- copy the enablements from Default Target Runtime -->
- <!-- and then add our extension features -->
- <enable object="Task" feature="taskConfig"/>
- <enable object="TaskConfig"/>
- <enable object="Parameter"/>
-
- <enable object="BoundaryEvent" feature="isEnabled"/>
- <enable object="MyEventDefinition" feature="value"/>
- <enable object="TemporalDependency" feature="name"/>
- <enable object="TemporalDependency" feature="lagTime"/>
-
- </modelEnablement>
-
- <modelEnablement
- runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
- type="Collaboration"
- profile="Default Collaboration"
- ref="org.eclipse.bpmn2.modeler.runtime.none:Process:Default Process">
-
- <!-- copy the enablements from Default Target Runtime -->
- <!-- and then add our extension features -->
- <enable object="Task" feature="taskConfig"/>
- <enable object="TaskConfig"/>
- <enable object="Parameter"/>
-
- <enable object="BoundaryEvent" feature="isEnabled"/>
- <enable object="MyEventDefinition" feature="value"/>
- <enable object="TemporalDependency"/>
-
- </modelEnablement>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/.classpath b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/.classpath
index ad32c83a..ad32c83a 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/.classpath
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/.classpath
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/.project b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/.project
index 5ba175c0..5ba175c0 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/.project
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/.project
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/META-INF/MANIFEST.MF
index 24120ae7..4c03421d 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/META-INF/MANIFEST.MF
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpmn2.modeler.examples.customtask;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/about.html b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/about.html
index 3408ea2e..3408ea2e 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/about.html
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/about.html
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/build.properties b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/build.properties
index 4465407f..32186a90 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/build.properties
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/build.properties
@@ -4,7 +4,8 @@ bin.includes = .,\
model/,\
META-INF/,\
plugin.xml,\
- plugin.properties
+ plugin.properties,\
+ build.properties
jars.compile.order = .
source.. = src/
output.. = bin/
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/epl-v10.html b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/epl-v10.html
index 91531ed4..91531ed4 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/epl-v10.html
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/epl-v10.html
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyBoundaryEvent.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyBoundaryEvent.png
index fc4f6a95..fc4f6a95 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyBoundaryEvent.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyBoundaryEvent.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyEventDefinition.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyEventDefinition.png
index f5b95dd3..f5b95dd3 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyEventDefinition.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyEventDefinition.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyTask.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyTask.png
index 64e4c42a..64e4c42a 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyTask.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyTask.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyAssocation.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/TemporalDependency.png
index 071cab81..071cab81 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/MyAssocation.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/large/TemporalDependency.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyBoundaryEvent.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyBoundaryEvent.png
index c166d4d8..c166d4d8 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyBoundaryEvent.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyBoundaryEvent.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyEventDefinition.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyEventDefinition.png
index 68968bab..68968bab 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyEventDefinition.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyEventDefinition.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyTask.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyTask.png
index e31c43ba..e31c43ba 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyTask.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyTask.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyAssociation.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/TemporalDependency.png
index 4008a0c2..4008a0c2 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/MyAssociation.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/icons/small/TemporalDependency.png
Binary files differ
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.ecore b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.ecore
index 903ca6b3..903ca6b3 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.ecore
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.ecore
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.genmodel b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.genmodel
index e3723659..e3723659 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.genmodel
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/model/MyModel.genmodel
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties
new file mode 100644
index 00000000..6d6853ad
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.properties
@@ -0,0 +1,4 @@
+#
+
+pluginName = BPMN2 Modeler Examples - EMF model extensions
+providerName = Eclipse SOA
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml
new file mode 100644
index 00000000..66c10aea
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/plugin.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://org.eclipse.bpmn2.modeler.examples.customtask"
+ class="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyModelPackage"
+ genModel="model/MyModel.genmodel" />
+ </extension>
+
+ <extension point="org.eclipse.bpmn2.modeler.runtime">
+ <runtime name="Sample Runtime - with EMF model"
+ id="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
+ class="org.eclipse.bpmn2.modeler.examples.customtask.MyRuntimeExtension"
+ description="BPMN2 Modeler Sample Runtime using EMF model extensions">
+ </runtime>
+
+ <model
+ resourceFactory="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.util.MyModelResourceFactoryImpl"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
+ uri="http://org.eclipse.bpmn2.modeler.examples.customtask">
+ </model>
+
+ <customTask
+ category="My Tools"
+ description="This is a Custom Task that has been extended with runtime-specific configuration parameters. These parameters are defined in the &quot;My Task&quot; Property Tab"
+ featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.MyTaskFeatureContainer"
+ icon="MyTask.png"
+ id="org.eclipse.bpmn2.modeler.examples.customtask.customTask1"
+ name="My Task"
+ propertyTabs="org.eclipse.bpmn2.modeler.examples.customtask.mytask.tab"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
+ type="Task">
+ <property name="type" value="MyTask" />
+ <property name="taskConfig" label="Task Configuration">
+ <value>
+ <property name="parameters">
+ <value>
+ <property
+ name="name"
+ value="taskName" />
+ <property
+ name="value"
+ value="My Custom Task" />
+ </value>
+ </property>
+ <property name="parameters">
+ <value>
+ <property
+ name="name"
+ value="processingTime" />
+ <property
+ name="value"
+ value="1 hr" />
+ </value>
+ </property>
+ </value>
+ </property>
+ </customTask>
+
+ <customTask
+ category="My Tools"
+ description="This is a Custom Boundary Event that has been extended with a simple boolean flag."
+ featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.MyBoundaryEventFeatureContainer"
+ icon="MyBoundaryEvent.png"
+ id="org.eclipse.bpmn2.modeler.examples.customtask.boundaryEvent1"
+ name="My Boundary Event"
+ propertyTabs="org.eclipse.bpmn2.modeler.examples.customtask.myBoundaryEvent.tab"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
+ type="BoundaryEvent">
+ <property name="type" value="MyBoundaryEvent"/>
+ <property name="isEnabled" value="true" type="EBoolean"/>
+ </customTask>
+
+ <customTask
+ category="My Tools"
+ description="This is a Custom Event Definition that has been extended with a simple string field."
+ featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.MyEventDefinitionFeatureContainer"
+ icon="MyEventDefinition.png"
+ id="org.eclipse.bpmn2.modeler.examples.customtask.eventDefinition1"
+ name="My Event Definition"
+ propertyTabs="org.eclipse.bpmn2.modeler.examples.customtask.myEventDefinition.tab"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
+ type="EventDefinition">
+ <property name="type" value="MyEventDefinition" />
+ </customTask>
+
+ <customTask
+ category="Time-BPMN"
+ description="Temporal Dependency"
+ featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.CustomTemporalDependencyFeatureContainer"
+ icon="TemporalDepedency.png"
+ id="org.eclipse.bpmn2.modeler.examples.customtask.temporalDependency"
+ name="Temporal Dependency"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.timebpmn.runtime"
+ type="FlowElement">
+ <property name="lagTime" type="EString" value="3hr">
+ </property>
+ </customTask>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.customtask.mytask.tab"
+ class="org.eclipse.bpmn2.modeler.examples.customtask.MyTaskPropertySection"
+ label="My Task"
+ type="org.eclipse.bpmn2.Task"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.customtask.myBoundaryEvent.tab"
+ class="org.eclipse.bpmn2.modeler.examples.customtask.MyBoundaryEventPropertySection"
+ type="org.eclipse.bpmn2.Event"
+ label="My Boundary Event"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.customtask.myEventDefinition.tab"
+ class="default"
+ features="value"
+ label="My Event Definition"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.customtask.temporalDependency.tab"
+ class="default"
+ features="name lagTime"
+ label="Temporal Dependency"
+ type="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.TemporalDependency"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime">
+ </propertyTab>
+
+ <propertyExtension
+ id="org.eclipse.bpmn2.modeler.examples.propertyExtension.MyEventDefinition"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.customtask.runtime"
+ type="org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyEventDefinition"
+ class="org.eclipse.bpmn2.modeler.examples.customtask.MyEventDefinitionPropertiesAdapter">
+ </propertyExtension>
+
+
+ <customTask
+ category="My Tools"
+ description="Message Start Event"
+ featureContainer="org.eclipse.bpmn2.modeler.examples.customtask.MessageStartEventFeatureContainer"
+ id="org.eclipse.bpmn2.modeler.examples.customtask.messageStartEvent"
+ name="Message Event"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.timebpmn.runtime"
+ type="StartEvent">
+ </customTask>
+
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/pom.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/pom.xml
index 43eb6d04..62304799 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/pom.xml
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/pom.xml
@@ -12,15 +12,16 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.runtime.example</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.customtask</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
- <name>Example Plug-ins</name>
- <description>BPMN2 Modeler Runtime Example Plug-ins</description>
+ <name>BPMN2 Modeler Example Plug-in: EMF Model</name>
+ <description>BPMN2 Modeler Runtime Example Plug-in using EMF extension model</description>
</project>
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/Activator.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/Activator.java
index 6e165571..6e165571 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/Activator.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/Activator.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/CustomTemporalDependencyFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/CustomTemporalDependencyFeatureContainer.java
index 1211a85d..0a474964 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/CustomTemporalDependencyFeatureContainer.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/CustomTemporalDependencyFeatureContainer.java
@@ -4,6 +4,7 @@ import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.modeler.core.features.BaseElementConnectionFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractAddFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractCreateFlowFeature;
@@ -12,7 +13,6 @@ import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyModelFactory;
import org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyModelPackage;
import org.eclipse.bpmn2.modeler.examples.customtask.MyModel.TemporalDependency;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomConnectionFeatureContainer;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IAddFeature;
@@ -29,7 +29,7 @@ import org.eclipse.graphiti.services.IPeService;
public class CustomTemporalDependencyFeatureContainer extends CustomConnectionFeatureContainer {
- public static String TEMPORAL_DEPENDENCY_ID = "org.eclipse.bpmn2.modeler.examples.timebpmn.temporalDependency";
+ public static String TEMPORAL_DEPENDENCY_ID = "org.eclipse.bpmn2.modeler.examples.customtask.temporalDependency";
public CustomTemporalDependencyFeatureContainer() {
setId(TEMPORAL_DEPENDENCY_ID);
@@ -65,12 +65,8 @@ public class CustomTemporalDependencyFeatureContainer extends CustomConnectionFe
public class CreateTemporalDependencyFeature extends AbstractCreateFlowFeature<TemporalDependency, BoundaryEvent, BoundaryEvent> {
- public CreateTemporalDependencyFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
- }
-
public CreateTemporalDependencyFeature(IFeatureProvider fp) {
- this(fp,"Temporal Dependency", "Create Temporal Dependency");
+ super(fp);
}
@Override
@@ -123,11 +119,6 @@ public class CustomTemporalDependencyFeatureContainer extends CustomConnectionFe
}
@Override
- protected Class<? extends BaseElement> getBoClass() {
- return TemporalDependency.class;
- }
-
- @Override
protected Polyline createConnectionLine(Connection connection) {
IPeService peService = Graphiti.getPeService();
IGaService gaService = Graphiti.getGaService();
@@ -148,6 +139,14 @@ public class CustomTemporalDependencyFeatureContainer extends CustomConnectionFe
return connectionLine;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class<? extends BaseElement> getBusinessObjectType() {
+ return TemporalDependency.class;
+ }
}
}
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MessageStartEventFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MessageStartEventFeatureContainer.java
new file mode 100644
index 00000000..c5427ac1
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MessageStartEventFeatureContainer.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.examples.customtask;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.MessageEventDefinition;
+import org.eclipse.bpmn2.StartEvent;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.ShowPropertiesFeature;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.ui.features.event.StartEventFeatureContainer.CreateStartEventFeature;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+
+/**
+ *
+ */
+public class MessageStartEventFeatureContainer extends CustomShapeFeatureContainer {
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new MessageStartEventCreateFeature(fp);
+ }
+
+ @Override
+ public String getId(EObject object) {
+ if (object instanceof StartEvent) {
+ return "org.eclipse.bpmn2.modeler.examples.customtask.messageStartEvent";
+ }
+
+ return null;
+ }
+
+ public class MessageStartEventCreateFeature extends CreateStartEventFeature {
+
+ public MessageStartEventCreateFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public StartEvent createBusinessObject(ICreateContext context) {
+ StartEvent startEvent = super.createBusinessObject(context);
+ EClass eClass = Bpmn2Package.eINSTANCE.getMessageEventDefinition();
+ MessageEventDefinition messageEventDefinition = (MessageEventDefinition) Bpmn2ModelerFactory.eINSTANCE.create(eClass);
+ ModelUtil.setID(messageEventDefinition);
+ startEvent.getEventDefinitions().add(messageEventDefinition);
+ return startEvent;
+ }
+
+ }
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+ return new ICustomFeature[0];
+ }
+}
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyAssociationFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyAssociationFeatureContainer.java
index b571fa7c..dbab533f 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyAssociationFeatureContainer.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyAssociationFeatureContainer.java
@@ -10,8 +10,8 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.examples.customtask;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -31,7 +31,7 @@ public class MyAssociationFeatureContainer extends CustomShapeFeatureContainer {
//
// Note that the object inspection can be arbitrarily complex and may include several
// object features. This simple case just demonstrates what needs to happen here.
- EStructuralFeature f = ModelUtil.getAnyAttribute(object, "type");
+ EStructuralFeature f = ModelDecorator.getAnyAttribute(object, "type");
if (f!=null) {
Object id = object.eGet(f);
if (TYPE_VALUE.equals(id))
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventFeatureContainer.java
index fcbe729a..c11aa34c 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventFeatureContainer.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventFeatureContainer.java
@@ -11,29 +11,29 @@
package org.eclipse.bpmn2.modeler.examples.customtask;
import org.eclipse.bpmn2.BoundaryEvent;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
public class MyBoundaryEventFeatureContainer extends CustomShapeFeatureContainer {
+ // these values must match what's in the plugin.xml
private final static String TYPE_VALUE = "MyBoundaryEvent";
private final static String CUSTOM_TASK_ID = "org.eclipse.bpmn2.modeler.examples.customtask.boundaryEvent1";
public MyBoundaryEventFeatureContainer() {
- // TODO Auto-generated constructor stub
}
@Override
public String getId(EObject object) {
// This is where we inspect the object to determine what its custom task ID should be.
// In this case, the "type" attribute will have a value of "MyBoundaryEvent".
- // If found, return the TEMPORAL_DEPENDENCY_ID string.
+ // If found, return the CUSTOM_TASK_ID string.
//
// Note that the object inspection can be arbitrarily complex and may include several
// object features. This simple case just demonstrates what needs to happen here.
- EStructuralFeature f = ModelUtil.getAnyAttribute(object, "type");
+ EStructuralFeature f = ModelDecorator.getAnyAttribute(object, "type");
if (f!=null) {
Object id = object.eGet(f);
if (TYPE_VALUE.equals(id))
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventPropertySection.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventPropertySection.java
index 1f22d56a..1f22d56a 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventPropertySection.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyBoundaryEventPropertySection.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionFeatureContainer.java
index a431a5df..0320e1bc 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionFeatureContainer.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionFeatureContainer.java
@@ -10,47 +10,29 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.examples.customtask;
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.Event;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractAddEventDefinitionFeature;
-import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateEventDefinitionFeature;
-import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer.AddEventDefinitionFeature;
+import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskImageProvider;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyEventDefinition;
import org.eclipse.bpmn2.modeler.examples.customtask.MyModel.MyModelPackage;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.MmPackage;
-import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.algorithms.Image;
-import org.eclipse.graphiti.mm.algorithms.Polygon;
-import org.eclipse.graphiti.mm.algorithms.Rectangle;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
public class MyEventDefinitionFeatureContainer extends CustomShapeFeatureContainer {
- private final static String TYPE_VALUE = "MyEventDefinition";
+ // this value must match what's in the plugin.xml
private final static String CUSTOM_TASK_ID = "org.eclipse.bpmn2.modeler.examples.customtask.eventDefinition1";
public MyEventDefinitionFeatureContainer() {
@@ -59,17 +41,9 @@ public class MyEventDefinitionFeatureContainer extends CustomShapeFeatureContain
@Override
public String getId(EObject object) {
// This is where we inspect the object to determine what its custom task ID should be.
- // In this case, the "type" attribute will have a value of "MyTask".
- // If found, return the TEMPORAL_DEPENDENCY_ID string.
- //
- // Note that the object inspection can be arbitrarily complex and may include several
- // object features. This simple case just demonstrates what needs to happen here.
- EStructuralFeature f = ModelUtil.getAnyAttribute(object, "type");
- if (f!=null) {
- Object id = object.eGet(f);
- if (TYPE_VALUE.equals(id))
- return CUSTOM_TASK_ID;
- }
+ // In this case, the object will be a MyEventDefinition instance.
+ if (object instanceof MyEventDefinition)
+ return CUSTOM_TASK_ID;
return null;
}
@@ -131,7 +105,7 @@ public class MyEventDefinitionFeatureContainer extends CustomShapeFeatureContain
public class CreateMyEventDefinitionFeature extends AbstractCreateEventDefinitionFeature<MyEventDefinition> {
public CreateMyEventDefinitionFeature(IFeatureProvider fp) {
- super(fp, "My Event Definition", "Create My Event Definition");
+ super(fp);
}
@Override
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionPropertiesAdapter.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionPropertiesAdapter.java
index c7c60154..c7c60154 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionPropertiesAdapter.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyEventDefinitionPropertiesAdapter.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/DocumentRoot.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/DocumentRoot.java
index b239e645..b239e645 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/DocumentRoot.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/DocumentRoot.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyEventDefinition.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyEventDefinition.java
index ecd401c6..ecd401c6 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyEventDefinition.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyEventDefinition.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelFactory.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelFactory.java
index 78198b74..78198b74 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelFactory.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelFactory.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelPackage.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelPackage.java
index c1230213..c1230213 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelPackage.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/MyModelPackage.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/Parameter.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/Parameter.java
index 20ff9d3d..20ff9d3d 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/Parameter.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/Parameter.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TaskConfig.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TaskConfig.java
index 0980f781..0980f781 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TaskConfig.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TaskConfig.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TemporalDependency.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TemporalDependency.java
index cad85ff7..cad85ff7 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TemporalDependency.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/TemporalDependency.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/DocumentRootImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/DocumentRootImpl.java
index cd4d794b..cd4d794b 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/DocumentRootImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/DocumentRootImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyEventDefinitionImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyEventDefinitionImpl.java
index 9a0eefb9..9a0eefb9 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyEventDefinitionImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyEventDefinitionImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelFactoryImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelFactoryImpl.java
index a4adc6d7..a4adc6d7 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelFactoryImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelFactoryImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelPackageImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelPackageImpl.java
index 1104fb73..1104fb73 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelPackageImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/MyModelPackageImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/ParameterImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/ParameterImpl.java
index 75c0a215..75c0a215 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/ParameterImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/ParameterImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TaskConfigImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TaskConfigImpl.java
index 2b2b0396..2b2b0396 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TaskConfigImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TaskConfigImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TemporalDependencyImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TemporalDependencyImpl.java
index 5ac4a0a4..5ac4a0a4 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TemporalDependencyImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/impl/TemporalDependencyImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelAdapterFactory.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelAdapterFactory.java
index 9af58929..9af58929 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelAdapterFactory.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelAdapterFactory.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceFactoryImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceFactoryImpl.java
index d3b70b0e..d3b70b0e 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceFactoryImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceFactoryImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceImpl.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceImpl.java
index 43f2fc95..43f2fc95 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceImpl.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelResourceImpl.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java
index 4192bc7d..4192bc7d 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelSwitch.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelXMLProcessor.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelXMLProcessor.java
index 5e03f672..5e03f672 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelXMLProcessor.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyModel/util/MyModelXMLProcessor.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyRuntimeExtension.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyRuntimeExtension.java
index 5ecc9c00..5ecc9c00 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyRuntimeExtension.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyRuntimeExtension.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskFeatureContainer.java
index b9eda662..505641cf 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskFeatureContainer.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskFeatureContainer.java
@@ -10,13 +10,17 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.examples.customtask;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.ShowPropertiesFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
public class MyTaskFeatureContainer extends CustomShapeFeatureContainer {
+ // these values must match what's in the plugin.xml
private final static String TYPE_VALUE = "MyTask";
private final static String CUSTOM_TASK_ID = "org.eclipse.bpmn2.modeler.examples.customtask.customTask1";
@@ -27,11 +31,11 @@ public class MyTaskFeatureContainer extends CustomShapeFeatureContainer {
public String getId(EObject object) {
// This is where we inspect the object to determine what its custom task ID should be.
// In this case, the "type" attribute will have a value of "MyTask".
- // If found, return the TEMPORAL_DEPENDENCY_ID string.
+ // If found, return the CUSTOM_TASK_ID string.
//
// Note that the object inspection can be arbitrarily complex and may include several
// object features. This simple case just demonstrates what needs to happen here.
- EStructuralFeature f = ModelUtil.getAnyAttribute(object, "type");
+ EStructuralFeature f = ModelDecorator.getAnyAttribute(object, "type");
if (f!=null) {
Object id = object.eGet(f);
if (TYPE_VALUE.equals(id))
@@ -41,4 +45,9 @@ public class MyTaskFeatureContainer extends CustomShapeFeatureContainer {
return null;
}
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+ return new ICustomFeature[] {new ShowPropertiesFeature(fp)};
+ }
}
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskPropertySection.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskPropertySection.java
index 395ad299..395ad299 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskPropertySection.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.customtask/src/org/eclipse/bpmn2/modeler/examples/customtask/MyTaskPropertySection.java
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/.classpath b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/.classpath
index 098194ca..098194ca 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/.classpath
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/.classpath
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/.project b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/.project
new file mode 100644
index 00000000..3d9470d2
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpmn2.modeler.examples.datatypes</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/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..29028da4
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Datatypes
+Bundle-SymbolicName: org.eclipse.bpmn2.modeler.examples.datatypes;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.bpmn2.modeler.examples.datatypes.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.transaction,
+ org.eclipse.bpmn2.modeler.core,
+ org.eclipse.bpmn2.modeler.ui,
+ org.eclipse.graphiti;bundle-version="0.11.0",
+ org.eclipse.graphiti.ui;bundle-version="0.11.0",
+ org.eclipse.bpmn2
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/build.properties b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/build.properties
index deccdb29..34d2e4d2 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/build.properties
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/build.properties
@@ -1,4 +1,4 @@
-bin.includes = META-INF/,\
- .
source.. = src/
output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.properties b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.properties
new file mode 100644
index 00000000..802fcb59
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.properties
@@ -0,0 +1,2 @@
+runtime.description = Data Type extension
+runtime.name = Data Type
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.xml
new file mode 100644
index 00000000..5508afad
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/plugin.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension point="org.eclipse.bpmn2.modeler.runtime">
+ <!-- is this necessary for this example? -->
+ <runtime
+ id="org.eclipse.bpmn2.modeler.runtime.none"
+ name="Data Types"
+ description="Data Types Example"
+ class="org.eclipse.bpmn2.modeler.examples.datatypes.DataTypeRuntimeExtension">
+ </runtime>
+
+ <modelExtension
+ id="org.eclipse.bpmn2.modeler.examples.datatypes.modelExtension.activity"
+ name="Activity Extension"
+ type="Activity">
+ <property name="fgcolor" type="EColor" label="Foreground Color" />
+ <property name="bgcolor" type="EColor" label="Background Color" />
+ </modelExtension>
+
+ <modelExtension
+ id="org.eclipse.bpmn2.modeler.examples.datatypes.modelExtension.event"
+ name="Event Extension"
+ type="Event">
+ <property name="fgcolor" type="EColor" label="Foreground Color" />
+ <property name="bgcolor" type="EColor" label="Background Color" />
+ </modelExtension>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.datatypes.activity.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="fgcolor bgcolor"
+ type="org.eclipse.bpmn2.Activity org.eclipse.bpmn2.Event"
+ label="Colors">
+ </propertyTab>
+
+ <dataType name="EColor" class="org.eclipse.bpmn2.modeler.examples.datatypes.EColorConversionDelegate"/>
+ </extension>
+
+</plugin>
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/pom.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/pom.xml
new file mode 100644
index 00000000..ee39cd0d
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/pom.xml
@@ -0,0 +1,27 @@
+<!--
+ Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
+ All rights reserved.
+ This program is made available under the terms of the
+ Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Red Hat, Inc. - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.datatypes</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <name>BPMN2 Modeler Example Plug-in: Data Types</name>
+ <description>BPMN2 Modeler Runtime Example Plug-in demonstrating custom EMF Data Types</description>
+</project>
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/Activator.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/Activator.java
new file mode 100644
index 00000000..ab8ca857
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.bpmn2.modeler.examples.datatypes;
+
+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.bpmn2.modeler.examples.datatypes"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/ColorChangeAdapter.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/ColorChangeAdapter.java
new file mode 100644
index 00000000..43080372
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/ColorChangeAdapter.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.examples.datatypes;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.impl.InternalTransactionalEditingDomain;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.util.IColorConstant;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ *
+ */
+public class ColorChangeAdapter extends AdapterImpl {
+
+ public static void adapt(ContainerShape containerShape) {
+ EObject be = BusinessObjectUtil.getBusinessObjectForPictogramElement(containerShape);
+ if (be!=null) {
+ for (Adapter a : be.eAdapters()) {
+ if (a instanceof ColorChangeAdapter)
+ return;
+ }
+ ColorChangeAdapter adapter = new ColorChangeAdapter();
+ adapter.setTarget(containerShape);
+ be.eAdapters().add(adapter);
+ adapter.setTarget(containerShape);
+ adapter.updateColor();
+ }
+ }
+
+ @Override
+ public void notifyChanged(Notification msg) {
+ EStructuralFeature feature = (msg.getFeature() instanceof EStructuralFeature ? (EStructuralFeature)msg.getFeature() : null);
+ if (msg.getEventType()==Notification.SET && feature!=null && feature.getName().contains("color")) {
+ updateColor();
+ }
+ }
+
+ private void updateColor() {
+ final ContainerShape containerShape = (ContainerShape) getTarget();
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(containerShape);
+ RGB foreground = null;
+ RGB background = null;
+ EStructuralFeature feature = ModelDecorator.getAnyAttribute(be, "bgcolor");
+ if (feature!=null) {
+ Object value = be.eGet(feature);
+ if (value instanceof RGB) {
+ background = (RGB) value;
+ }
+ }
+ feature = ModelDecorator.getAnyAttribute(be, "fgcolor");
+ if (feature!=null) {
+ Object value = be.eGet(feature);
+ if (value instanceof RGB) {
+ foreground = (RGB) value;
+ }
+ }
+ GraphicsAlgorithm ga = null;
+ if (containerShape.getChildren().size()>0) {
+ Shape shape = containerShape.getChildren().get(0);
+ ga = shape.getGraphicsAlgorithm();
+ }
+ else
+ ga = containerShape.getGraphicsAlgorithm();
+
+ Bpmn2Preferences pref = Bpmn2Preferences.getInstance(be);
+ ShapeStyle ss = new ShapeStyle( pref.getShapeStyle(be) );
+ if (background!=null) {
+ IColorConstant cc = ShapeStyle.RGBToColor(background);
+ ss.setShapeBackground(cc);
+ ss.setShapePrimarySelectedColor(ShapeStyle.darker(cc));
+ ss.setShapeSecondarySelectedColor(ShapeStyle.lighter(cc));
+ }
+ if (foreground!=null) {
+ IColorConstant cc = ShapeStyle.RGBToColor(foreground);
+ ss.setShapeForeground(cc);
+ }
+ StyleUtil.applyStyle(ga, be, ss);
+ }
+}
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/DataTypeRuntimeExtension.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/DataTypeRuntimeExtension.java
new file mode 100644
index 00000000..36629402
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/DataTypeRuntimeExtension.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.examples.datatypes;
+
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.ui.DefaultBpmn2RuntimeExtension;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.swt.graphics.RGB;
+
+/**
+ *
+ */
+public class DataTypeRuntimeExtension extends DefaultBpmn2RuntimeExtension {
+
+ @Override
+ public void notify(LifecycleEvent event) {
+ if (event.eventType.equals(EventType.BUSINESSOBJECT_CREATED)) {
+ // As soon as the Business Object is created initialize the foreground
+ // and background color attributes to their defaults as set in the
+ // User Preferences for this object type.
+ EObject be = (EObject) event.target;
+ // We need an adapter to do this:
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(be);
+ if (adapter!=null) {
+ // Fetch the colors from User Preferences
+ Bpmn2Preferences pref = Bpmn2Preferences.getInstance(be);
+ ShapeStyle ss = pref.getShapeStyle(be);
+ RGB foreground = ShapeStyle.colorToRGB(ss.getShapeForeground());
+ RGB background = ShapeStyle.colorToRGB(ss.getShapeBackground());
+ EStructuralFeature feature;
+ // does this object have a "bgcolor" extension attribute?
+ feature = adapter.getFeature("bgcolor");
+ if (feature!=null) {
+ // yes, set the default value
+ be.eSet(feature,background);
+ }
+ // does this object have a "fgcolor" extension attribute?
+ feature = adapter.getFeature("fgcolor");
+ if (feature!=null) {
+ // yes, set it
+ be.eSet(feature,foreground);
+ }
+ }
+ }
+ if (event.eventType.equals(EventType.PICTOGRAMELEMENT_ADDED) && event.target instanceof ContainerShape) {
+ ColorChangeAdapter.adapt((ContainerShape) event.target);
+ }
+ }
+}
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/EColorConversionDelegate.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/EColorConversionDelegate.java
new file mode 100644
index 00000000..d1d9f174
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.datatypes/src/org/eclipse/bpmn2/modeler/examples/datatypes/EColorConversionDelegate.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.examples.datatypes;
+
+import org.eclipse.bpmn2.modeler.core.DefaultConversionDelegate;
+import org.eclipse.jface.preference.ColorSelector;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * This is an example of an EDataType ConversionDelegate. In this example, the conversion is for
+ * RGB (color value) objects.
+ *
+ * The class is registered with our EDataTypeConversionFactory with the name of a data type;
+ * in this example the data type name is "EColor" in keeping with the EMF naming convention
+ * for primitive data types (e.g. "EString", "EBoolean", etc.)
+ */
+public class EColorConversionDelegate extends DefaultConversionDelegate {
+
+ private enum RGBComponent { RED, GREEN, BLUE };
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#convertToString(java.lang.Object)
+ */
+ @Override
+ public String convertToString(Object value) {
+ if (value instanceof RGB) {
+ RGB c = (RGB) value;
+ return "#" +
+ toHex(c.red) +
+ toHex(c.green) +
+ toHex(c.blue);
+ }
+ if (value==null)
+ return "";
+ return value.toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#createFromString(java.lang.String)
+ *
+ * This method MUST accept an empty String and construct a "default" object. This is required so that
+ * clients can determine the java type (class) of objects handled by this ConversionDelegate.
+ */
+ @Override
+ public Object createFromString(String literal) {
+ if (literal.startsWith("#")) {
+ String s = literal.substring(1);
+ RGB c = new RGB(
+ fromHex(s, RGBComponent.RED),
+ fromHex(s, RGBComponent.GREEN),
+ fromHex(s, RGBComponent.BLUE)
+ );
+ return c;
+ }
+ return new RGB(0,0,0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.EditControlProvider#createControl(org.eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ public EditControl createControl(Composite parent, int style) {
+ return new ColorControl(parent, style);
+ }
+
+ private String toHex(int i) {
+ String s = Integer.toHexString(i);
+ int l = s.length();
+ if (l==1)
+ s = "0" + s;
+ else if (l>2)
+ s = s.substring(l-2, l-1);
+ return s;
+ }
+
+ private int fromHex(String s, EColorConversionDelegate.RGBComponent cc) {
+ switch (cc) {
+ case RED:
+ s = s.substring(0,2);
+ break;
+ case GREEN:
+ s = s.substring(2,4);
+ break;
+ case BLUE:
+ s = s.substring(4,6);
+ break;
+ }
+ return Integer.parseInt(s, 16);
+ }
+
+
+ /**
+ * This is an EditControl that wraps a ColorSelector widget for editing RGB values.
+ */
+ public class ColorControl extends EditControl {
+ private ColorSelector colorSelector;
+
+ public ColorControl(Composite parent, int style) {
+ super(parent, style);
+ this.setLayout(new RowLayout());
+
+ colorSelector = new ColorSelector(this);
+ colorSelector.getButton().addSelectionListener(this);
+ }
+
+ @Override
+ public Object getValue() {
+ return colorSelector.getColorValue();
+ }
+
+ @Override
+ public boolean setValue(Object value) {
+ if (value instanceof RGB) {
+ colorSelector.setColorValue((RGB)value);
+ return true;
+ }
+ return false;
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/.classpath b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/.classpath
index ad32c83a..ad32c83a 100644
--- a/org.eclipse.bpmn2.modeler.core/.classpath
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/.classpath
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/.project b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/.project
index 13420e90..3c9a9008 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/.project
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.bpmn2.modeler.runtime.example</name>
+ <name>org.eclipse.bpmn2.modeler.examples.dynamic</name>
<comment></comment>
<projects>
</projects>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/META-INF/MANIFEST.MF
index 43cbfe43..d8db1beb 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/META-INF/MANIFEST.MF
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.bpmn2.modeler.runtime.example;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Activator: org.eclipse.bpmn2.modeler.runtime.example.Activator
+Bundle-SymbolicName: org.eclipse.bpmn2.modeler.examples.dynamic;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.bpmn2.modeler.examples.dynamic.Activator
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui.ide,
org.eclipse.core.runtime,
@@ -19,5 +19,4 @@ Require-Bundle: org.eclipse.ui.ide,
org.eclipse.bpmn2
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.eclipse.bpmn2;version="0.7.0",
- org.eclipse.core.resources
+Import-Package: org.eclipse.core.resources
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/about.html b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/about.html
index 3408ea2e..3408ea2e 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/about.html
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/about.html
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/CallActivityExtension.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/CallActivityExtension.xml
new file mode 100644
index 00000000..cae7af99
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/CallActivityExtension.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<runtime id="org.eclipse.bpmn2.modeler.runtime.none">
+ <modelExtension
+ id="org.foo.callactivity.extension"
+ uri="http://org.foo/extensions"
+ name="My CallActivity Extension"
+ type="CallActivity">
+ <property name="proxy" type="EString" label="Called Activity"/>
+ </modelExtension>
+
+ <propertyTab
+ id="org.foo.callActivity.tab"
+ replaceTab="org.eclipse.bpmn2.modeler.callActivity.tab"
+ class="default"
+ features="proxy isForCompensation loopCharacteristics properties resources"
+ type="org.eclipse.bpmn2.CallActivity"
+ label="Proxy">
+ </propertyTab>
+</runtime>
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/readme.txt b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/readme.txt
new file mode 100644
index 00000000..962e61fc
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/.bpmnconfig/readme.txt
@@ -0,0 +1,8 @@
+This folder contains examples of how to define extension point features for the BPMN2 Modeler.
+
+All files in this folder will be loaded by the BPMN2 Builder whenever a file changes,
+and will be applied to open editors. Note that the BPMN2 Nature must be added to the
+Eclipse ".project" file. To add the BPMN2 Nature, open the project Properties dialog
+(right-click on a project and select "Properties" from the context menu) then enable
+the "Check if project is configured for BPMN2 Project Nature" toggle. The next time
+the editor is saved, it will prompt to add the project nature. \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/bpmnResources/CharityOrganizationRequest.bpmn b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/CharityOrganizationRequest.bpmn
index f737075b..f737075b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/bpmnResources/CharityOrganizationRequest.bpmn
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/CharityOrganizationRequest.bpmn
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/bpmnResources/VacationRequest.bpmn b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/VacationRequest.bpmn
index 88b1c7fa..88b1c7fa 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/bpmnResources/VacationRequest.bpmn
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/bpmnResources/VacationRequest.bpmn
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/build.properties b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/build.properties
index bbb35fc8..caa5036d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/build.properties
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/build.properties
@@ -13,7 +13,6 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
- model/,\
icons/,\
about.html,\
plugin.properties
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/epl-v10.html b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/epl-v10.html
index 91531ed4..91531ed4 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/epl-v10.html
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/huge/flow.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/flow.png
index 2162a87f..2162a87f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/huge/flow.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/flow.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/huge/mitigation.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/mitigation.png
index 391597d3..391597d3 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/huge/mitigation.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/mitigation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/huge/risk.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/risk.png
index 98f5cfd4..98f5cfd4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/huge/risk.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/huge/risk.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/large/flow.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/flow.png
index bee9a357..bee9a357 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/large/flow.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/flow.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/large/mitigation.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/mitigation.png
index d8e6add0..d8e6add0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/large/mitigation.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/mitigation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/large/risk.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/risk.png
index 44834ac2..44834ac2 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/large/risk.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/large/risk.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/small/flow.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/flow.png
index d41bbe84..d41bbe84 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/small/flow.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/flow.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/small/mitigation.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/mitigation.png
index 3f407fc2..3f407fc2 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/small/mitigation.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/mitigation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/icons/small/risk.png b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/risk.png
index 5f10d3ea..5f10d3ea 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/icons/small/risk.png
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/icons/small/risk.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/plugin.properties b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/plugin.properties
index 536d046a..00e1d9eb 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/plugin.properties
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/plugin.properties
@@ -13,6 +13,5 @@
# </copyright>
#
# $Id$
-
-pluginName = BPMN2 Modeler Example Target Runtime
-providerName = Eclipse.org
+pluginName = BPMN2 Modeler Examples - dynamic model extensions
+providerName = Eclipse SOA
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/plugin.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/plugin.xml
new file mode 100644
index 00000000..4ead7a0f
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/plugin.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.bpmn2.modeler.runtime">
+
+ <runtime name="Sample Runtime - with dynamic model" versions="1.0"
+ id="org.eclipse.bpmn2.modeler.examples.dynamic"
+ class="org.eclipse.bpmn2.modeler.examples.dynamic.SampleRuntimeExtension"
+ description="BPMN2 Modeler Sample Runtime using dynamic model extensions">
+ </runtime>
+
+ <model runtimeId="org.eclipse.bpmn2.modeler.examples.dynamic"
+ uri="http://org.eclipse.bpmn2.modeler.examples.dynamic">
+ </model>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.association.tab"
+ replaceTab="org.eclipse.bpmn2.modeler.assocation.tab"
+ class="default"
+ features="affectsTaskExecution"
+ type="org.eclipse.bpmn2.Association"
+ label="Risk/Mitigation Association">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.risk.tab"
+ replaceTab="org.eclipse.bpmn2.modeler.textAnnotation.tab"
+ class="org.eclipse.bpmn2.modeler.examples.dynamic.SampleRiskTaskPropertySection"
+ type="org.eclipse.bpmn2.TextAnnotation"
+ label="Risk Task">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.mitigation.tab"
+ replaceTab="org.eclipse.bpmn2.modeler.textAnnotation.tab"
+ class="org.eclipse.bpmn2.modeler.examples.dynamic.SampleMitigationTaskPropertySection"
+ type="org.eclipse.bpmn2.TextAnnotation"
+ label="Mitigation Task">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.flow.tab"
+ class="default"
+ features="priority"
+ type="org.eclipse.bpmn2.SequenceFlow"
+ label="Risk Mitigation">
+ </propertyTab>
+
+ <customTask
+ description="This task represents a risk that can occur in the connected Elements."
+ featureContainer="org.eclipse.bpmn2.modeler.examples.dynamic.SampleCustomTaskFeatureContainer"
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.risk"
+ name="Risk Task"
+ category="Risk &amp; Mitigation"
+ icon="risk.png"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.dynamic"
+ type="TextAnnotation">
+ <property name="name" value="Risk Task" type="EString"/>
+ <property name="text" value="Risk Task" type="EString"/>
+ <property name="evaluate" value="true" type="EBoolean" description="Include this activity in Risk Calculations"/>
+ <property name="cost" value="0" type="EInt" description="Potential cost of this Risk"/>
+ </customTask>
+
+ <customTask
+ description="This task attempts to minimize the impact of risk."
+ featureContainer="org.eclipse.bpmn2.modeler.examples.dynamic.SampleCustomTaskFeatureContainer"
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.mitigation"
+ name="Mitigation Task"
+ category="Risk &amp; Mitigation"
+ icon="mitigation.png"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.dynamic"
+ type="TextAnnotation">
+ <property name="text" value="Mitigation Task" type="EString"/>
+ <property name="name" value="Mitigation Task" type="EString"/>
+ <property name="evaluate" value="true" type="EBoolean" description="Include this activity in Risk Calculations"/>
+ <property name="benefit" value="0" type="EInt" description="Potential benefit provided by this Mitigation activity"/>
+ </customTask>
+
+ <customTask
+ description="Associates a Risk or Mitigation with a Task."
+ featureContainer="org.eclipse.bpmn2.modeler.examples.dynamic.SampleCustomSequenceFlowFeatureContainer"
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.flow"
+ name="Mitigation Flow"
+ category="Risk &amp; Mitigation"
+ icon="flow.png"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.dynamic.flow"
+ type="SequenceFlow">
+ <property name="name" value="Mitigate" type="EString"/>
+ <property name="priority" value="1" type="EInt"/>
+ </customTask>
+
+ <modelExtension
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.modelExtension.Association"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.dynamic"
+ name="Association Extensions"
+ type="Association">
+ <property name="affectsTaskExecution" value="false" type="EBoolean"/>
+ </modelExtension>
+
+ <modelExtension
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.modelExtension.ManualTask"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.dynamic"
+ name="Manual Task Extensions"
+ type="ManualTask">
+ <property name="timeToComplete" value="1d" type="EString"/>
+ </modelExtension>
+
+ <style object="TextAnnotation" foreground="7F7F00" background="FFFF80" textColor="7F7F00" font="arial,10,-,-"/>
+
+ </extension>
+ <extension
+ point="org.eclipse.bpmn2.modeler.ui">
+ <toolProvider
+ class="org.eclipse.bpmn2.modeler.examples.dynamic.SampleToolProvider"
+ id="org.eclipse.bpmn2.modeler.examples.dynamic.toolProvider1"
+ runtimeId="org.eclipse.bpmn2.modeler.examples.dynamic">
+ </toolProvider>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.bpmn2.modeler.core/pom.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/pom.xml
index 3dc688fb..ad6e26cb 100644
--- a/org.eclipse.bpmn2.modeler.core/pom.xml
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/pom.xml
@@ -12,15 +12,16 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.core</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.dynamic</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
- <name>BPMN2 Modeler Core</name>
- <description>Common Core functionality for BPMN2 Modeler</description>
+ <name>BPMN2 Modeler Example Plug-in: Dynamic Model</name>
+ <description>BPMN2 Modeler Runtime Example Plug-in using dynamic model extensions</description>
</project>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/Activator.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/Activator.java
index 3c52968e..d3569aae 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/Activator.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/Activator.java
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleCustomSequenceFlowFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleCustomSequenceFlowFeatureContainer.java
index 7b19d813..34e86b9f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleCustomSequenceFlowFeatureContainer.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleCustomSequenceFlowFeatureContainer.java
@@ -11,18 +11,15 @@
* @author Bob Brodt
******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
-
-import java.util.List;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.modeler.core.features.CustomConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.runtime.example.SampleImageProvider.IconSize;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomConnectionFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.examples.dynamic.SampleImageProvider.IconSize;
import org.eclipse.bpmn2.modeler.ui.features.flow.SequenceFlowFeatureContainer;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
@@ -32,30 +29,36 @@ import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.mm.pictograms.Connection;
/**
- * Example implementation of a Custom Connection feature container. The main things to consider
- * here are:
- *
- * createFeatureContainer() - creates the Feature Container that is responsible for
- * building the "custom connection". This can be a subclass of an existing Feature Container
- * from the editor core, or a new one. Typically, this should be a subclass of the
- * Feature Container for the type of bpmn2 element defined in the "type" attribute
- * of this Custom Task extension point.
- *
- * If your Feature Container extends one of the existing classes from editor core, you should
- * override the following methods:
- *
- * getAddFeature() - this should override the Add Feature from the chosen Feature Container
- * base class (see above). Typically you will want to override the decorateShape() method
- * which allows you to customize the graphical representation of this Custom Connection figure.
- * getCreateFeature() - this MUST be overridden if you intend to add extension attributes to
- * your business object (bpmn2 element) - see the code example below. You will also want to
- * provide your own images for the tool palette by overriding getCreateImageId() and
- * getCreateLargeImageId() in your Create Feature.
+ * Example implementation of a Custom Connection feature container. The main
+ * things to consider here are:
+ * <p>
+ * <ul>
+ * <li>{@link createFeatureContainer()} - creates the Feature Container that is
+ * responsible for building the "custom connection". This can be a subclass of
+ * an existing Feature Container from the editor core, or a new one. Typically,
+ * this should be a subclass of the Feature Container for the type of bpmn2
+ * element defined in the "type" attribute of this Custom Task extension point.
+ * </ul>
+ * <p>
+ * If your Feature Container extends one of the existing classes from editor
+ * core, you should override the following methods:
+ * <ul>
+ * <li>{@link getAddFeature()} - this should override the Add Feature from the
+ * chosen Feature Container base class (see above). Typically you will want to
+ * override the decorateShape() method which allows you to customize the
+ * graphical representation of this Custom Connection figure.
+ * <li>{@link getCreateFeature()} - this MUST be overridden if you intend to add
+ * extension attributes to your business object (bpmn2 element) - see the code
+ * example below. You will also want to provide your own images for the tool
+ * palette by overriding getCreateImageId() and getCreateLargeImageId() in your
+ * Create Feature.
+ * </ul>
*
* @author Bob Brodt
*/
public class SampleCustomSequenceFlowFeatureContainer extends CustomConnectionFeatureContainer {
+ public final static String MITIGATION_FLOW_ID = "org.eclipse.bpmn2.modeler.examples.dynamic.flow";
@Override
protected IFeatureContainer createFeatureContainer(IFeatureProvider fp) {
return new SequenceFlowFeatureContainer()
@@ -101,6 +104,11 @@ public class SampleCustomSequenceFlowFeatureContainer extends CustomConnectionFe
public String getCreateLargeImageId() {
return SampleImageProvider.getImageId(customTaskDescriptor, IconSize.LARGE);
}
+
+ @Override
+ public String getCreateDescription() {
+ return "Create "+customTaskDescriptor.getName();
+ }
};
}
};
@@ -110,20 +118,15 @@ public class SampleCustomSequenceFlowFeatureContainer extends CustomConnectionFe
* @see org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomTaskFeatureContainer#getId(org.eclipse.emf.ecore.EObject)
*
* This method is called by the Feature Provider when it needs to find the Feature Container that will be handling the
- * creation of a new object. @see org.eclipse.bpmn2.modeler.ui.diagram.BPMNFeatureProvider.getAddFeature(IAddContext).
+ * creation of a new object. @see org.eclipse.bpmn2.modeler.ui.diagram.BPMN2FeatureProvider.getAddFeature(IAddContext).
* This method should inspect the object (which will be a bpmn2 element) and determine whether it is responsible for
* managing this object's lifecycle, typically by examining extension attributes, as shown in this example.
*/
public String getId(EObject object) {
if (object==null)
return null;
- List<EStructuralFeature> features = ModelUtil.getAnyAttributes(object);
- for (EStructuralFeature f : features) {
- if ("elementId".equals(f.getName())) {
- Object attrValue = object.eGet(f);
- if ("org.eclipse.bpmn2.modeler.runtime.example.flow".equals(attrValue))
- return attrValue.toString();
- }
+ if (ModelDecorator.getAnyAttribute(object, "priority")!=null) {
+ return MITIGATION_FLOW_ID;
}
return null;
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleCustomTaskFeatureContainer.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleCustomTaskFeatureContainer.java
index c464783d..c6228a4a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleCustomTaskFeatureContainer.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleCustomTaskFeatureContainer.java
@@ -11,21 +11,22 @@
* @author Bob Brodt
******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
import java.util.List;
import org.eclipse.bpmn2.TextAnnotation;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.artifact.AddTextAnnotationFeature;
import org.eclipse.bpmn2.modeler.core.features.artifact.UpdateTextAnnotationFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.bpmn2.modeler.runtime.example.SampleImageProvider.IconSize;
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.examples.dynamic.SampleImageProvider.IconSize;
import org.eclipse.bpmn2.modeler.ui.features.artifact.CreateTextAnnotationFeature;
import org.eclipse.bpmn2.modeler.ui.features.artifact.TextAnnotationFeatureContainer;
import org.eclipse.emf.ecore.EObject;
@@ -82,7 +83,10 @@ import org.eclipse.graphiti.util.IColorConstant;
* @author Bob Brodt
*/
public class SampleCustomTaskFeatureContainer extends CustomShapeFeatureContainer {
-
+
+ public final static String MITIGATION_ID = "org.eclipse.bpmn2.modeler.examples.dynamic.mitigation";
+ public final static String RISK_ID = "org.eclipse.bpmn2.modeler.examples.dynamic.risk";
+
@Override
protected IShapeFeatureContainer createFeatureContainer(IFeatureProvider fp) {
return new TextAnnotationFeatureContainer() {
@@ -159,6 +163,11 @@ public class SampleCustomTaskFeatureContainer extends CustomShapeFeatureContaine
public String getCreateLargeImageId() {
return SampleImageProvider.getImageId(customTaskDescriptor, IconSize.LARGE);
}
+
+ @Override
+ public String getCreateDescription() {
+ return "Create "+customTaskDescriptor.getName();
+ }
};
}
@@ -182,18 +191,17 @@ public class SampleCustomTaskFeatureContainer extends CustomShapeFeatureContaine
PictogramElement pe = context.getPictogramElement();
String propertyValue = Graphiti.getPeService().getPropertyValue(pe, "evaluate.property");
-
if (propertyValue==null || propertyValue.isEmpty())
propertyValue = "false";
- Boolean attributeValue;
+ Boolean attributeValue = false;
TextAnnotation ta = (TextAnnotation) getBusinessObjectForPictogramElement(pe);
- EStructuralFeature f = ModelUtil.getAnyAttribute(ta, "evaluate");
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(ta);
+ EStructuralFeature f = adapter.getFeature("evaluate");
if (f!=null) {
- attributeValue = (Boolean)ta.eGet(f);
- }
- else {
- attributeValue = Boolean.FALSE;
+ attributeValue = (Boolean)adapter.getFeatureDescriptor(f).getValue();
+ if (attributeValue==null)
+ attributeValue = false;
}
if (Boolean.parseBoolean(propertyValue) != attributeValue)
return Reason.createTrueReason("evalute property changed");
@@ -237,17 +245,12 @@ public class SampleCustomTaskFeatureContainer extends CustomShapeFeatureContaine
private void setFillColor(ContainerShape containerShape) {
TextAnnotation ta = BusinessObjectUtil.getFirstElementOfType(containerShape, TextAnnotation.class);
if (ta!=null) {
- EStructuralFeature f = ModelUtil.getAnyAttribute(ta, "evaluate");
- if (f==null) {
- f = ModelUtil.createDynamicAttribute(SampleModelPackage.eINSTANCE, ta, "evaluate", "EBoolean");
- ta.eSet(f, Boolean.FALSE);
- }
- Boolean attributeValue;
- attributeValue = (Boolean)ta.eGet(f);
- String propertyValue;
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(ta);
+ Boolean attributeValue = (Boolean)adapter.getFeatureDescriptor("evaluate").getValue();
Shape shape = containerShape.getChildren().get(0);
ShapeStyle ss = new ShapeStyle();
- if (attributeValue == true) {
+ String propertyValue;
+ if (Boolean.TRUE.equals(attributeValue)) {
propertyValue = Boolean.TRUE.toString();
ss.setDefaultColors(IColorConstant.LIGHT_GREEN);
}
@@ -266,20 +269,17 @@ public class SampleCustomTaskFeatureContainer extends CustomShapeFeatureContaine
* @see org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomTaskFeatureContainer#getId(org.eclipse.emf.ecore.EObject)
*
* This method is called by the Feature Provider when it needs to find the Feature Container that will be handling the
- * creation of a new object. @see org.eclipse.bpmn2.modeler.ui.diagram.BPMNFeatureProvider.getAddFeature(IAddContext).
+ * creation of a new object. @see org.eclipse.bpmn2.modeler.ui.diagram.BPMN2FeatureProvider.getAddFeature(IAddContext).
* This method should inspect the object (which will be a bpmn2 element) and determine whether it is responsible for
* managing this object's lifecycle, typically by examining extension attributes, as shown in this example.
*/
public String getId(EObject object) {
- if (object==null)
- return null;
- List<EStructuralFeature> features = ModelUtil.getAnyAttributes(object);
- for (EStructuralFeature f : features) {
- if ("elementId".equals(f.getName())) {
- Object attrValue = object.eGet(f);
- if ("org.eclipse.bpmn2.modeler.runtime.example.risk".equals(attrValue) ||
- "org.eclipse.bpmn2.modeler.runtime.example.mitigation".equals(attrValue))
- return attrValue.toString();
+ if (object instanceof TextAnnotation) {
+ if (ModelDecorator.getAnyAttribute(object, "benefit")!=null) {
+ return MITIGATION_ID;
+ }
+ if (ModelDecorator.getAnyAttribute(object, "cost")!=null) {
+ return RISK_ID;
}
}
return null;
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleImageProvider.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleImageProvider.java
index cc51bd2b..f1606986 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleImageProvider.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleImageProvider.java
@@ -8,13 +8,12 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
import java.net.URL;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
-import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
import org.eclipse.graphiti.mm.algorithms.Image;
import org.eclipse.graphiti.services.Graphiti;
@@ -60,7 +59,7 @@ public class SampleImageProvider extends AbstractImageProvider {
ImageRegistry imageRegistry = GraphitiUIPlugin.getDefault().getImageRegistry();
TargetRuntime rt = TargetRuntime.getRuntime(SampleRuntimeExtension.RUNTIME_ID);
for (IconSize size : IconSize.values()) {
- for (CustomTaskDescriptor ctd : rt.getCustomTasks()) {
+ for (CustomTaskDescriptor ctd : rt.getCustomTaskDescriptors()) {
String imageId = getImageId(ctd,size);
if (imageId != null) {
String filename = getImagePath(ctd,size);
@@ -78,7 +77,7 @@ public class SampleImageProvider extends AbstractImageProvider {
protected void addAvailableImages() {
TargetRuntime rt = TargetRuntime.getRuntime(SampleRuntimeExtension.RUNTIME_ID);
for (IconSize size : IconSize.values()) {
- for (CustomTaskDescriptor ctd : rt.getCustomTasks()) {
+ for (CustomTaskDescriptor ctd : rt.getCustomTaskDescriptors()) {
String imageId = getImageId(ctd,size);
if (imageId != null) {
addImageFilePath(imageId, getImagePath(ctd,size));
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleMitigationTaskPropertySection.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java
index 66ddb2db..ad4f6818 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleMitigationTaskPropertySection.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleMitigationTaskPropertySection.java
@@ -11,13 +11,14 @@
* @author Bob Brodt
******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
@@ -59,7 +60,7 @@ public class SampleMitigationTaskPropertySection extends DefaultPropertySection
if (super.appliesTo(part, selection)) {
EObject eObj = this.getBusinessObjectForSelection(selection);
if (eObj instanceof TextAnnotation) {
- EStructuralFeature f = ModelUtil.getAnyAttribute(eObj, "benefit");
+ EStructuralFeature f = ModelDecorator.getAnyAttribute(eObj, "benefit");
return f!=null;
}
}
@@ -91,8 +92,8 @@ public class SampleMitigationTaskPropertySection extends DefaultPropertySection
// update the TextAnnotation "text" attribute to reflect some changes in
// our extension attributes; "name" and "benefit" in this case.
final TextAnnotation ta = (TextAnnotation)getBusinessObject();
- final EStructuralFeature nameAttribute = ModelUtil.getAnyAttribute(ta, "name");
- final EStructuralFeature benefitAttribute = ModelUtil.getAnyAttribute(ta, "benefit");
+ final EStructuralFeature nameAttribute = ModelDecorator.getAnyAttribute(ta, "name");
+ final EStructuralFeature benefitAttribute = ModelDecorator.getAnyAttribute(ta, "benefit");
final TransactionalEditingDomain editingDomain = getDiagramEditor().getEditingDomain();
for (Notification n : event.getNotifications()) {
int et = n.getEventType();
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleRiskTaskPropertySection.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java
index 7e77d00d..d7b85237 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleRiskTaskPropertySection.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRiskTaskPropertySection.java
@@ -11,14 +11,14 @@
* @author Bob Brodt
******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -59,7 +59,7 @@ public class SampleRiskTaskPropertySection extends DefaultPropertySection {
if (super.appliesTo(part, selection)) {
EObject eObj = this.getBusinessObjectForSelection(selection);
if (eObj instanceof TextAnnotation) {
- EStructuralFeature f = ModelUtil.getAnyAttribute(eObj, "cost");
+ EStructuralFeature f = ModelDecorator.getAnyAttribute(eObj, "cost");
return f!=null;
}
}
@@ -86,8 +86,8 @@ public class SampleRiskTaskPropertySection extends DefaultPropertySection {
// update the TextAnnotation "text" attribute to reflect some changes in
// our extension attributes; "name" and "cost" in this case.
final TextAnnotation ta = (TextAnnotation)getBusinessObject();
- final EStructuralFeature nameAttribute = ModelUtil.getAnyAttribute(ta, "name");
- final EStructuralFeature costAttribute = ModelUtil.getAnyAttribute(ta, "cost");
+ final EStructuralFeature nameAttribute = ModelDecorator.getAnyAttribute(ta, "name");
+ final EStructuralFeature costAttribute = ModelDecorator.getAnyAttribute(ta, "cost");
final TransactionalEditingDomain editingDomain = getDiagramEditor().getEditingDomain();
for (Notification n : event.getNotifications()) {
int et = n.getEventType();
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleRuntimeExtension.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRuntimeExtension.java
index 1c0f1c4b..65438673 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleRuntimeExtension.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleRuntimeExtension.java
@@ -11,9 +11,11 @@
* @author Bob Brodt
******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
import org.eclipse.emf.ecore.EObject;
@@ -28,18 +30,9 @@ import org.eclipse.ui.IEditorInput;
public class SampleRuntimeExtension implements IBpmn2RuntimeExtension {
- public static final String RUNTIME_ID = "org.eclipse.bpmn2.modeler.runtime.example";
+ public static final String RUNTIME_ID = "org.eclipse.bpmn2.modeler.examples.dynamic";
- private static final String targetNamespace = "http://org.eclipse.bpmn2.modeler.runtime.example";
- private static final String[] typeLanguages = new String[] {
- "http://www.w3.org/2001/XMLSchema", "XML Schema",
- "http://www.java.com/javaTypes", "Java",
- };
- private static final String[] expressionLanguages = new String[] {
- "http://www.w3.org/1999/XPath", "XPath",
- "http://www.mvel.org/2.0", "mvel",
- "http://www.java.com/java", "java",
- };
+ private static final String targetNamespace = "http://org.eclipse.bpmn2.modeler.examples.dynamic";
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#getTargetNamespace(org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType)
@@ -50,25 +43,6 @@ public class SampleRuntimeExtension implements IBpmn2RuntimeExtension {
}
/* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#initialize()
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleImageProvider#registerAvailableImages()
- */
- @Override
- public void initialize(DiagramEditor editor) {
- SampleImageProvider.registerAvailableImages();
- }
-
- @Override
- public String[] getTypeLanguages() {
- return typeLanguages;
- }
-
- @Override
- public String[] getExpressionLanguages() {
- return expressionLanguages;
- }
-
- /* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#isContentForRuntime(org.eclipse.bpmn2.modeler.core.IFile)
*/
@Override
@@ -79,4 +53,13 @@ public class SampleRuntimeExtension implements IBpmn2RuntimeExtension {
// method must return FALSE.
return false;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#notify(org.eclipse.bpmn2.modeler.core.LifecycleEvent)
+ */
+ @Override
+ public void notify(LifecycleEvent event) {
+ if (event.eventType == EventType.EDITOR_INITIALIZED)
+ SampleImageProvider.registerAvailableImages();
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleToolProvider.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleToolProvider.java
index 1e74168c..24720779 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleToolProvider.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.dynamic/src/org/eclipse/bpmn2/modeler/examples/dynamic/SampleToolProvider.java
@@ -8,13 +8,13 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
+package org.eclipse.bpmn2.modeler.examples.dynamic;
-import org.eclipse.bpmn2.modeler.ui.diagram.BPMNToolBehaviorProvider;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2ToolBehaviorProvider;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-public class SampleToolProvider extends BPMNToolBehaviorProvider {
+public class SampleToolProvider extends Bpmn2ToolBehaviorProvider {
public SampleToolProvider(IDiagramTypeProvider diagramTypeProvider) {
super(diagramTypeProvider);
diff --git a/org.eclipse.bpmn2.modeler.wsil/.classpath b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/.classpath
index 098194ca..098194ca 100644
--- a/org.eclipse.bpmn2.modeler.wsil/.classpath
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/.classpath
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/.project b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/.project
index 811e2e3c..811e2e3c 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/.project
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/.project
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/META-INF/MANIFEST.MF b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/META-INF/MANIFEST.MF
index 54d52b61..219ccaea 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/META-INF/MANIFEST.MF
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Org.eclipse.bpmn2.modeler.examples.modelreader
Bundle-SymbolicName: org.eclipse.bpmn2.modeler.examples.modelreader
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
Export-Package: org.eclipse.bpmn2.modeler.examples.modelreader
Require-Bundle: org.eclipse.ui.ide,
org.eclipse.core.runtime,
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/SampleProcess.bpmn b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/SampleProcess.bpmn
index 2a10f1fa..2a10f1fa 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/SampleProcess.bpmn
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/SampleProcess.bpmn
diff --git a/org.eclipse.bpmn2.modeler.core/about.html b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.core/about.html
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/about.html
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/build.properties b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/build.properties
new file mode 100644
index 00000000..55e82707
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/build.properties
@@ -0,0 +1,5 @@
+bin.includes = META-INF/,\
+ .,\
+ about.html
+source.. = src/
+output.. = bin/
diff --git a/org.eclipse.bpmn2.modeler.core/epl-v10.html b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/epl-v10.html
index 91531ed4..91531ed4 100644
--- a/org.eclipse.bpmn2.modeler.core/epl-v10.html
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/epl-v10.html
diff --git a/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/pom.xml b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/pom.xml
new file mode 100644
index 00000000..5e6da5e8
--- /dev/null
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/pom.xml
@@ -0,0 +1,23 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.modelreader</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <name>BPMN2 Modeler Example Plug-in: Java Model Loader</name>
+ <description>BPMN2 Model Loader in Java</description>
+</project>
diff --git a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/src/org/eclipse/bpmn2/modeler/examples/modelreader/ModelReader.java b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/src/org/eclipse/bpmn2/modeler/examples/modelreader/ModelReader.java
index 8da799d3..8da799d3 100644
--- a/examples/org.eclipse.bpmn2.modeler.examples.modelreader/src/org/eclipse/bpmn2/modeler/examples/modelreader/ModelReader.java
+++ b/examples/plugins/org.eclipse.bpmn2.modeler.examples.modelreader/src/org/eclipse/bpmn2/modeler/examples/modelreader/ModelReader.java
diff --git a/examples/plugins/pom.xml b/examples/plugins/pom.xml
new file mode 100644
index 00000000..927639e3
--- /dev/null
+++ b/examples/plugins/pom.xml
@@ -0,0 +1,30 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.examples</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.examples.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.plugins.parent</artifactId>
+ <name>BPMN2 Modeler Examples: Plugins Parent</name>
+ <description>BPMN2 Modeler Example Plug-ins</description>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>org.eclipse.bpmn2.modeler.examples.customtask</module>
+ <module>org.eclipse.bpmn2.modeler.examples.dynamic</module>
+ <module>org.eclipse.bpmn2.modeler.examples.modelreader</module>
+ <module>org.eclipse.bpmn2.modeler.examples.datatypes</module>
+ </modules>
+</project> \ No newline at end of file
diff --git a/examples/pom.xml b/examples/pom.xml
new file mode 100644
index 00000000..e5f9b35b
--- /dev/null
+++ b/examples/pom.xml
@@ -0,0 +1,28 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.examples</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.parent</artifactId>
+ <name>BPMN2 Modeler: Examples Parent</name>
+ <description>BPMN2 Modeler Example Plug-ins and Projects</description>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>plugins</module>
+ <module>projects</module>
+ </modules>
+</project>
diff --git a/examples/projects/pom.xml b/examples/projects/pom.xml
new file mode 100644
index 00000000..a725001b
--- /dev/null
+++ b/examples/projects/pom.xml
@@ -0,0 +1,23 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.examples</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.examples.projects</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples.projects.modelreader</artifactId>
+ <name>BPMN2 Modeler Examples: Projects</name>
+ <description>BPMN2 Modeler Example Projects</description>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+</project>
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/.project b/features/org.eclipse.bpmn2.modeler.examples/.project
index a08a14a0..6ba36b80 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/.project
+++ b/features/org.eclipse.bpmn2.modeler.examples/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.bpmn2.modeler.wsil.feature</name>
+ <name>org.eclipse.bpmn2.modeler.examples</name>
<comment></comment>
<projects>
</projects>
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/about.html b/features/org.eclipse.bpmn2.modeler.examples/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.examples.feature/about.html
+++ b/features/org.eclipse.bpmn2.modeler.examples/about.html
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/build.properties b/features/org.eclipse.bpmn2.modeler.examples/build.properties
index abb2fd86..abb2fd86 100644
--- a/org.eclipse.bpmn2.modeler.examples.feature/build.properties
+++ b/features/org.eclipse.bpmn2.modeler.examples/build.properties
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/epl-v10.html b/features/org.eclipse.bpmn2.modeler.examples/epl-v10.html
index 76c1090c..76c1090c 100644
--- a/org.eclipse.bpmn2.modeler.examples.feature/epl-v10.html
+++ b/features/org.eclipse.bpmn2.modeler.examples/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/feature.properties b/features/org.eclipse.bpmn2.modeler.examples/feature.properties
index fc4d19aa..fc4d19aa 100644
--- a/org.eclipse.bpmn2.modeler.examples.feature/feature.properties
+++ b/features/org.eclipse.bpmn2.modeler.examples/feature.properties
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/feature.xml b/features/org.eclipse.bpmn2.modeler.examples/feature.xml
index d2b7d93a..0fbf4042 100644
--- a/org.eclipse.bpmn2.modeler.examples.feature/feature.xml
+++ b/features/org.eclipse.bpmn2.modeler.examples/feature.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.bpmn2.modeler.examples.feature"
- label="BPMN2 Modeler - Example Runtime Extensions Feature"
- version="1.0.2.qualifier"
+ id="org.eclipse.bpmn2.modeler.examples"
+ label="BPMN2 Modeler - Examples"
+ version="1.1.0.qualifier"
provider-name="Eclipse.org">
<copyright url="http://www.example.com/copyright">
@@ -25,7 +25,21 @@ Red Hat, Inc. - initial API and implementation
</requires>
<plugin
- id="org.eclipse.bpmn2.modeler.runtime.example"
+ id="org.eclipse.bpmn2.modeler.examples.customtask"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.bpmn2.modeler.examples.dynamic"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.bpmn2.modeler.examples.modelreader"
download-size="0"
install-size="0"
version="0.0.0"
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/license.html b/features/org.eclipse.bpmn2.modeler.examples/license.html
index 6e579a58..6e579a58 100644
--- a/org.eclipse.bpmn2.modeler.examples.feature/license.html
+++ b/features/org.eclipse.bpmn2.modeler.examples/license.html
diff --git a/features/org.eclipse.bpmn2.modeler.examples/pom.xml b/features/org.eclipse.bpmn2.modeler.examples/pom.xml
new file mode 100644
index 00000000..03b946ff
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.examples/pom.xml
@@ -0,0 +1,23 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.features.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.examples</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+ <name>BPMN2 Modeler Feature: Examples</name>
+ <description>BPMN2 Modeler Examples Feature</description>
+</project>
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/.project b/features/org.eclipse.bpmn2.modeler.runtime.jboss/.project
index 30cabc3c..1c1695de 100644
--- a/org.eclipse.bpmn2.modeler.examples.feature/.project
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.bpmn2.modeler.examples.feature</name>
+ <name>org.eclipse.bpmn2.modeler.runtime.jboss</name>
<comment></comment>
<projects>
</projects>
diff --git a/org.eclipse.bpmn2.modeler.feature/about.html b/features/org.eclipse.bpmn2.modeler.runtime.jboss/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.feature/about.html
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/about.html
diff --git a/org.eclipse.bpmn2.modeler.feature/build.properties b/features/org.eclipse.bpmn2.modeler.runtime.jboss/build.properties
index abb2fd86..abb2fd86 100644
--- a/org.eclipse.bpmn2.modeler.feature/build.properties
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/build.properties
diff --git a/org.eclipse.bpmn2.modeler.feature/epl-v10.html b/features/org.eclipse.bpmn2.modeler.runtime.jboss/epl-v10.html
index 76c1090c..76c1090c 100644
--- a/org.eclipse.bpmn2.modeler.feature/epl-v10.html
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.feature/feature.properties b/features/org.eclipse.bpmn2.modeler.runtime.jboss/feature.properties
index fc4d19aa..fc4d19aa 100644
--- a/org.eclipse.bpmn2.modeler.feature/feature.properties
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/feature.properties
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/feature.xml b/features/org.eclipse.bpmn2.modeler.runtime.jboss/feature.xml
index 62d78aa4..a4a45d2a 100644
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/feature.xml
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/feature.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.bpmn2.modeler.jboss.runtime.feature"
+ id="org.eclipse.bpmn2.modeler.runtime.jboss"
label="BPMN2 Modeler - jBPM Runtime Extension Feature"
- version="1.0.2.qualifier"
+ version="1.1.0.qualifier"
provider-name="Eclipse.org">
<copyright url="http://www.example.com/copyright">
diff --git a/org.eclipse.bpmn2.modeler.feature/license.html b/features/org.eclipse.bpmn2.modeler.runtime.jboss/license.html
index 6e579a58..6e579a58 100644
--- a/org.eclipse.bpmn2.modeler.feature/license.html
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/license.html
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/pom.xml b/features/org.eclipse.bpmn2.modeler.runtime.jboss/pom.xml
index 9eb65b6e..d92a411c 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/pom.xml
+++ b/features/org.eclipse.bpmn2.modeler.runtime.jboss/pom.xml
@@ -11,16 +11,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.features.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.wsil.feature</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
- <name>WSIL Support Feature</name>
- <description>Support for using WSIL registries in BPMN2 Modeler</description>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.runtime.jboss</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+ <name>BPMN2 Modeler Feature: jBPM5 Runtime</name>
+ <description>BPMN2 Modeler JBoss jBPM5 Runtime Feature</description>
</project>
diff --git a/org.eclipse.bpmn2.modeler.feature/.project b/features/org.eclipse.bpmn2.modeler.sdk/.project
index 3fb2d3d6..5024f112 100644
--- a/org.eclipse.bpmn2.modeler.feature/.project
+++ b/features/org.eclipse.bpmn2.modeler.sdk/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.bpmn2.modeler.feature</name>
+ <name>org.eclipse.bpmn2.modeler.sdk</name>
<comment></comment>
<projects>
</projects>
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/about.html b/features/org.eclipse.bpmn2.modeler.sdk/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/about.html
+++ b/features/org.eclipse.bpmn2.modeler.sdk/about.html
diff --git a/features/org.eclipse.bpmn2.modeler.sdk/build.properties b/features/org.eclipse.bpmn2.modeler.sdk/build.properties
new file mode 100644
index 00000000..08b3ff00
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.sdk/build.properties
@@ -0,0 +1,7 @@
+bin.includes = feature.xml,\
+ license.html,\
+ about.html,\
+ build.properties,\
+ epl-v10.html
+individualSourceBundles=true
+generate.feature@org.eclipse.bpmn2.modeler.source=org.eclipse.bpmn2.modeler
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/epl-v10.html b/features/org.eclipse.bpmn2.modeler.sdk/epl-v10.html
index 76c1090c..76c1090c 100644
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/epl-v10.html
+++ b/features/org.eclipse.bpmn2.modeler.sdk/epl-v10.html
diff --git a/features/org.eclipse.bpmn2.modeler.sdk/feature.xml b/features/org.eclipse.bpmn2.modeler.sdk/feature.xml
new file mode 100644
index 00000000..84cd118d
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.sdk/feature.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.bpmn2.modeler.sdk"
+ label="SDK Feature"
+ version="1.1.0.qualifier"
+ provider-name="Eclipse SOA">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <plugin
+ id="org.eclipse.bpmn2.modeler.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.bpmn2.modeler.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.bpmn2.modeler.core.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.bpmn2.modeler.ui.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/license.html b/features/org.eclipse.bpmn2.modeler.sdk/license.html
index 6e579a58..6e579a58 100644
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/license.html
+++ b/features/org.eclipse.bpmn2.modeler.sdk/license.html
diff --git a/org.eclipse.bpmn2.modeler.feature/pom.xml b/features/org.eclipse.bpmn2.modeler.sdk/pom.xml
index d7b42e93..fdba721a 100644
--- a/org.eclipse.bpmn2.modeler.feature/pom.xml
+++ b/features/org.eclipse.bpmn2.modeler.sdk/pom.xml
@@ -11,16 +11,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.features.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.feature</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
- <name>BPMN2 Modeler Feature</name>
- <description>Editor Feature for BPMN2 Modeler</description>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.sdk</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+ <name>BPMN2 Modeler Feature: Editor and Source</name>
+ <description>BPMN2 Modeler Editor and Source Feature</description>
</project>
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/.project b/features/org.eclipse.bpmn2.modeler.updatesite/.project
index 4c27ac08..2c04e98a 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/.project
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.bpmn2.modeler.updatesite.feature</name>
+ <name>org.eclipse.bpmn2.modeler.updatesite</name>
<comment></comment>
<projects>
</projects>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/about.html b/features/org.eclipse.bpmn2.modeler.updatesite/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/about.html
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/about.html
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/build.properties b/features/org.eclipse.bpmn2.modeler.updatesite/build.properties
index 1f667bec..1f667bec 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/build.properties
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/build.properties
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/build.xml b/features/org.eclipse.bpmn2.modeler.updatesite/build.xml
index 607fa923..607fa923 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/build.xml
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/build.xml
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/epl-v10.html b/features/org.eclipse.bpmn2.modeler.updatesite/epl-v10.html
index 76c1090c..76c1090c 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/epl-v10.html
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/helios-sites.properties b/features/org.eclipse.bpmn2.modeler.updatesite/helios-sites.properties
index f51e59b1..f51e59b1 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/helios-sites.properties
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/helios-sites.properties
diff --git a/features/org.eclipse.bpmn2.modeler.updatesite/index.html b/features/org.eclipse.bpmn2.modeler.updatesite/index.html
new file mode 100644
index 00000000..a1a789b3
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/index.html
@@ -0,0 +1,60 @@
+<html>
+<head>
+<title>org.eclipse.test.site</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<style>@import url("web/site.css");</style>
+<script type="text/javascript">
+ var returnval = 0;
+ var stylesheet, xmlFile, cache, doc;
+ function init(){
+ // NSCP 7.1+ / Mozilla 1.4.1+ / Safari
+ // Use the standard DOM Level 2 technique, if it is supported
+ if (document.implementation && document.implementation.createDocument) {
+ xmlFile = document.implementation.createDocument("", "", null);
+ stylesheet = document.implementation.createDocument("", "", null);
+ if (xmlFile.load){
+ xmlFile.load("site.xml");
+ stylesheet.load("web/site.xsl");
+ } else {
+ alert("Document could not be loaded by browser.");
+ }
+ xmlFile.addEventListener("load", transform, false);
+ stylesheet.addEventListener("load", transform, false);
+ }
+ //IE 6.0+ solution
+ else if (window.ActiveXObject) {
+ xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
+ xmlFile.async = false;
+ xmlFile.load("site.xml");
+ stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
+ stylesheet.async = false;
+ stylesheet.load("web/site.xsl");
+ cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
+ cache.stylesheet = stylesheet;
+ transformData();
+ }
+ }
+ // separate transformation function for IE 6.0+
+ function transformData(){
+ var processor = cache.createProcessor();
+ processor.input = xmlFile;
+ processor.transform();
+ data.innerHTML = processor.output;
+ }
+ // separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+
+ function transform(){
+ returnval+=1;
+ if (returnval==2){
+ var processor = new XSLTProcessor();
+ processor.importStylesheet(stylesheet);
+ doc = processor.transformToDocument(xmlFile);
+ document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
+ }
+ }
+</script>
+</head>
+<body onload="init();">
+<!--[insert static HTML here]-->
+<div id="data"><!-- this is where the transformed data goes --></div>
+</body>
+</html>
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/indigo-sites.properties b/features/org.eclipse.bpmn2.modeler.updatesite/indigo-sites.properties
index adc2a8f9..adc2a8f9 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/indigo-sites.properties
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/indigo-sites.properties
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/juno-sites.properties b/features/org.eclipse.bpmn2.modeler.updatesite/juno-sites.properties
index adc2a8f9..adc2a8f9 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/juno-sites.properties
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/juno-sites.properties
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/kepler-sites.properties b/features/org.eclipse.bpmn2.modeler.updatesite/kepler-sites.properties
index adc2a8f9..adc2a8f9 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/kepler-sites.properties
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/kepler-sites.properties
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/license.html b/features/org.eclipse.bpmn2.modeler.updatesite/license.html
index 6e579a58..6e579a58 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/license.html
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/license.html
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/luna-sites.properties b/features/org.eclipse.bpmn2.modeler.updatesite/luna-sites.properties
index adc2a8f9..adc2a8f9 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/luna-sites.properties
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/luna-sites.properties
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/notice.html b/features/org.eclipse.bpmn2.modeler.updatesite/notice.html
index 6e579a58..6e579a58 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/notice.html
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/notice.html
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/pom.xml b/features/org.eclipse.bpmn2.modeler.updatesite/pom.xml
index bd8001b6..eb144309 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/pom.xml
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/pom.xml
@@ -1,31 +1,29 @@
-<!--
- Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- All rights reserved.
- This program is made available under the terms of the
- Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Red Hat, Inc. - initial API and implementation
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.features.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.updatesite.feature</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- <packaging>eclipse-update-site</packaging>
- <name>BPMN2 Modeler Update Site</name>
- <description>Update Site feature for BPMN2 Modeler</description>
- <properties>
- <maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
- </properties>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.updatesite</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-update-site</packaging>
+ <name>BPMN2 Modeler Feature: Update Site</name>
+ <description>BPMN2 Modeler Update SiteFeature</description>
+
+ <properties>
+ <maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
+ </properties>
<build>
<plugins>
@@ -73,7 +71,9 @@
<tasks>
<!-- called AFTER generating update site + zip to add in extra content -->
<ant antfile="build.xml">
- <property name="platform-version-name" value="${platform-version-name}" />
+ <property
+ name="platform-version-name"
+ value="${platform-version-name}" />
</ant>
</tasks>
</configuration>
diff --git a/features/org.eclipse.bpmn2.modeler.updatesite/site.xml b/features/org.eclipse.bpmn2.modeler.updatesite/site.xml
new file mode 100644
index 00000000..3eb8158c
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/site.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description url="http://eclipse.org/bpmn2-modeler">
+ Eclipse BPMN2 Modeler.
+ </description>
+ <feature url="features/org.eclipse.bpmn2.modeler_0.0.0.jar" id="org.eclipse.bpmn2.modeler" version="0.0.0">
+ <category name="Eclipse BPMN2 Modeler"/>
+ </feature>
+ <feature url="features/org.eclipse.bpmn2.modeler.runtime.jboss_0.0.0.jar" id="org.eclipse.bpmn2.modeler.runtime.jboss" version="0.0.0">
+ <category name="Eclipse BPMN2 Modeler"/>
+ </feature>
+ <feature url="features/org.eclipse.bpmn2.modeler.examples_0.0.0.jar" id="org.eclipse.bpmn2.modeler.examples" version="0.0.0">
+ <category name="Eclipse BPMN2 Modeler"/>
+ </feature>
+ <feature url="org.eclipse.bpmn2.modeler.wsil_1.1.0.qualifier" id="org.eclipse.bpmn2.modeler.wsil" version="1.1.0.qualifier">
+ <category name="Eclipse BPMN2 Modeler"/>
+ </feature>
+ <feature url="features/org.eclipse.bpmn2.modeler.sdk_1.1.0.qualifier.jar" id="org.eclipse.bpmn2.modeler.sdk" version="1.1.0.qualifier">
+ <category name="Eclipse BPMN2 Modeler"/>
+ </feature>
+ <category-def name="Eclipse BPMN2 Modeler" label="Eclipse BPMN2 Modeler">
+ <description>
+ Eclipse BPMN2 Modeler
+ </description>
+ </category-def>
+</site>
diff --git a/features/org.eclipse.bpmn2.modeler.updatesite/web/site.css b/features/org.eclipse.bpmn2.modeler.updatesite/web/site.css
new file mode 100644
index 00000000..62c6f9ff
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/web/site.css
@@ -0,0 +1,12 @@
+<STYLE type="text/css">
+td.spacer {padding-bottom: 10px; padding-top: 10px;}
+.title { font-family: sans-serif; color: #99AACC;}
+.bodyText { font-family: sans-serif; font-size: 9pt; color:#000000; }
+.sub-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white;}
+.log-text {font-family: sans-serif; font-style: normal; font-weight: lighter; font-size: 8pt; color:black;}
+.big-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white; border-top:10px solid white;}
+.light-row {background:#FFFFFF}
+.dark-row {background:#EEEEFF}
+.header {background:#99AADD}
+#indent {word-wrap : break-word;width :300px;text-indent:10px;}
+</STYLE>
diff --git a/features/org.eclipse.bpmn2.modeler.updatesite/web/site.xsl b/features/org.eclipse.bpmn2.modeler.updatesite/web/site.xsl
new file mode 100644
index 00000000..92d6570a
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.updatesite/web/site.xsl
@@ -0,0 +1,214 @@
+<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl="urn:schemas-microsoft-com:xslt">
+<xsl:output method="html" encoding="UTF-8"/>
+<xsl:key name="cat" match="category" use="@name"/>
+<xsl:template match="/">
+<xsl:for-each select="site">
+ <html>
+ <head>
+ <title>org.eclipse.test.site</title>
+ <style>@import url("web/site.css");</style>
+ </head>
+ <body>
+ <h1 class="title">org.eclipse.test.site</h1>
+ <p class="bodyText"><xsl:value-of select="description"/></p>
+ <table width="100%" border="0" cellspacing="1" cellpadding="2">
+ <xsl:for-each select="category-def">
+ <xsl:sort select="@label" order="ascending" case-order="upper-first"/>
+ <xsl:sort select="@name" order="ascending" case-order="upper-first"/>
+ <xsl:if test="count(key('cat',@name)) != 0">
+ <tr class="header">
+ <td class="sub-header" width="30%">
+ <xsl:value-of select="@name"/>
+ </td>
+ <td class="sub-header" width="70%">
+ <xsl:value-of select="@label"/>
+ </td>
+ </tr>
+ <xsl:for-each select="key('cat',@name)">
+ <xsl:sort select="ancestor::feature//@version" order="ascending"/>
+ <xsl:sort select="ancestor::feature//@id" order="ascending" case-order="upper-first"/>
+ <tr>
+ <xsl:choose>
+ <xsl:when test="(position() mod 2 = 1)">
+ <xsl:attribute name="class">dark-row</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">light-row</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="log-text" id="indent">
+ <xsl:choose>
+ <xsl:when test="ancestor::feature//@label">
+ <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@label"/></a>
+ <br/>
+ <div id="indent">
+ (<xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/>)
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br />
+ </td>
+ <td>
+ <table>
+ <xsl:if test="ancestor::feature//@os">
+ <tr><td class="log-text" id="indent">Operating Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@os"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ancestor::feature//@ws">
+ <tr><td class="log-text" id="indent">Windows Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@ws"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ancestor::feature//@nl">
+ <tr><td class="log-text" id="indent">Languages:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@nl"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="ancestor::feature//@arch">
+ <tr><td class="log-text" id="indent">Architecture:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@arch"/></td>
+ </tr>
+ </xsl:if>
+ </table>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr><td class="spacer"><br/></td><td class="spacer"><br/></td></tr>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:if test="count(feature) &gt; count(feature/category)">
+ <tr class="header">
+ <td class="sub-header" colspan="2">
+ Uncategorized
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="function-available('msxsl:node-set')">
+ <xsl:variable name="rtf-nodes">
+ <xsl:for-each select="feature[not(category)]">
+ <xsl:sort select="@id" order="ascending" case-order="upper-first"/>
+ <xsl:sort select="@version" order="ascending" />
+ <xsl:value-of select="."/>
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="myNodeSet" select="msxsl:node-set($rtf-nodes)/*"/>
+ <xsl:for-each select="$myNodeSet">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 1">
+ <xsl:attribute name="class">dark-row</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">light-row</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="log-text" id="indent">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <a href="{@url}"><xsl:value-of select="@label"/></a>
+ <br />
+ <div id="indent">
+ (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br /><br />
+ </td>
+ <td>
+ <table>
+ <xsl:if test="@os">
+ <tr><td class="log-text" id="indent">Operating Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@ws">
+ <tr><td class="log-text" id="indent">Windows Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@nl">
+ <tr><td class="log-text" id="indent">Languages:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@arch">
+ <tr><td class="log-text" id="indent">Architecture:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
+ </tr>
+ </xsl:if>
+ </table>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="feature[not(category)]">
+ <xsl:sort select="@id" order="ascending" case-order="upper-first"/>
+ <xsl:sort select="@version" order="ascending" />
+ <tr>
+ <xsl:choose>
+ <xsl:when test="count(preceding-sibling::feature[not(category)]) mod 2 = 1">
+ <xsl:attribute name="class">dark-row</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">light-row</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td class="log-text" id="indent">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <a href="{@url}"><xsl:value-of select="@label"/></a>
+ <br />
+ <div id="indent">
+ (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ <br /><br />
+ </td>
+ <td>
+ <table>
+ <xsl:if test="@os">
+ <tr><td class="log-text" id="indent">Operating Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@ws">
+ <tr><td class="log-text" id="indent">Windows Systems:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@nl">
+ <tr><td class="log-text" id="indent">Languages:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="@arch">
+ <tr><td class="log-text" id="indent">Architecture:</td>
+ <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
+ </tr>
+ </xsl:if>
+ </table>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </table>
+ </body>
+ </html>
+</xsl:for-each>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/features/org.eclipse.bpmn2.modeler.wsil/.project b/features/org.eclipse.bpmn2.modeler.wsil/.project
new file mode 100644
index 00000000..3d429a26
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.wsil/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpmn2.modeler.wsil</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/about.html b/features/org.eclipse.bpmn2.modeler.wsil/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/about.html
+++ b/features/org.eclipse.bpmn2.modeler.wsil/about.html
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/build.properties b/features/org.eclipse.bpmn2.modeler.wsil/build.properties
index abb2fd86..abb2fd86 100644
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/build.properties
+++ b/features/org.eclipse.bpmn2.modeler.wsil/build.properties
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/epl-v10.html b/features/org.eclipse.bpmn2.modeler.wsil/epl-v10.html
index 76c1090c..76c1090c 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/epl-v10.html
+++ b/features/org.eclipse.bpmn2.modeler.wsil/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/feature.properties b/features/org.eclipse.bpmn2.modeler.wsil/feature.properties
index fc4d19aa..fc4d19aa 100644
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/feature.properties
+++ b/features/org.eclipse.bpmn2.modeler.wsil/feature.properties
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/feature.xml b/features/org.eclipse.bpmn2.modeler.wsil/feature.xml
index ae21ba5d..3215f268 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/feature.xml
+++ b/features/org.eclipse.bpmn2.modeler.wsil/feature.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.bpmn2.modeler.wsil.feature"
+ id="org.eclipse.bpmn2.modeler.wsil"
label="BPMN2 Modeler - WSIL Support Feature"
- version="1.0.2.qualifier"
+ version="1.1.0.qualifier"
provider-name="Eclipse.org">
<copyright url="http://www.example.com/copyright">
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/license.html b/features/org.eclipse.bpmn2.modeler.wsil/license.html
index 6e579a58..6e579a58 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/license.html
+++ b/features/org.eclipse.bpmn2.modeler.wsil/license.html
diff --git a/features/org.eclipse.bpmn2.modeler.wsil/pom.xml b/features/org.eclipse.bpmn2.modeler.wsil/pom.xml
new file mode 100644
index 00000000..86689f8c
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler.wsil/pom.xml
@@ -0,0 +1,23 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.features.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.wsil</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+ <name>BPMN2 Modeler Feature: WSIL Support</name>
+ <description>BPMN2 Modeler WSIL Support Feature</description>
+</project>
diff --git a/features/org.eclipse.bpmn2.modeler/.project b/features/org.eclipse.bpmn2.modeler/.project
new file mode 100644
index 00000000..615b7abd
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.bpmn2.modeler</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.bpmn2.modeler.ui/about.html b/features/org.eclipse.bpmn2.modeler/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.ui/about.html
+++ b/features/org.eclipse.bpmn2.modeler/about.html
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/build.properties b/features/org.eclipse.bpmn2.modeler/build.properties
index abb2fd86..abb2fd86 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/build.properties
+++ b/features/org.eclipse.bpmn2.modeler/build.properties
diff --git a/features/org.eclipse.bpmn2.modeler/epl-v10.html b/features/org.eclipse.bpmn2.modeler/epl-v10.html
new file mode 100644
index 00000000..76c1090c
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler/epl-v10.html
@@ -0,0 +1,269 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+
+
+</body></html>
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/feature.properties b/features/org.eclipse.bpmn2.modeler/feature.properties
index fc4d19aa..fc4d19aa 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/feature.properties
+++ b/features/org.eclipse.bpmn2.modeler/feature.properties
diff --git a/org.eclipse.bpmn2.modeler.feature/feature.xml b/features/org.eclipse.bpmn2.modeler/feature.xml
index de199300..e48937fd 100644
--- a/org.eclipse.bpmn2.modeler.feature/feature.xml
+++ b/features/org.eclipse.bpmn2.modeler/feature.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.eclipse.bpmn2.modeler.feature"
+ id="org.eclipse.bpmn2.modeler"
label="BPMN2 Modeler - Diagram Editor"
- version="1.0.2.qualifier"
+ version="1.1.0.qualifier"
provider-name="Eclipse.org">
<copyright>
diff --git a/features/org.eclipse.bpmn2.modeler/license.html b/features/org.eclipse.bpmn2.modeler/license.html
new file mode 100644
index 00000000..6e579a58
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ 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, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html> \ No newline at end of file
diff --git a/features/org.eclipse.bpmn2.modeler/pom.xml b/features/org.eclipse.bpmn2.modeler/pom.xml
new file mode 100644
index 00000000..f278b08e
--- /dev/null
+++ b/features/org.eclipse.bpmn2.modeler/pom.xml
@@ -0,0 +1,23 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.features.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+ <name>BPMN2 Modeler Feature: Editor</name>
+ <description>BPMN2 Modeler Editor Feature</description>
+</project>
diff --git a/features/pom.xml b/features/pom.xml
new file mode 100644
index 00000000..1521a742
--- /dev/null
+++ b/features/pom.xml
@@ -0,0 +1,29 @@
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.features</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.features.parent</artifactId>
+ <name>BPMN2 Modeler: Features Parent</name>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>org.eclipse.bpmn2.modeler</module>
+ <module>org.eclipse.bpmn2.modeler.sdk</module>
+ <module>org.eclipse.bpmn2.modeler.runtime.jboss</module>
+ <module>org.eclipse.bpmn2.modeler.wsil</module>
+ <module>org.eclipse.bpmn2.modeler.examples</module>
+ <module>org.eclipse.bpmn2.modeler.updatesite</module>
+ </modules>
+</project>
+
diff --git a/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd b/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd
deleted file mode 100644
index 764abcd7..00000000
--- a/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd
+++ /dev/null
@@ -1,915 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.bpmn2.modeler.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.bpmn2.modeler.core" id="org.eclipse.bpmn2.modeler.runtime" name="Runtime Specialization"/>
- </appinfo>
- <documentation>
- Provides customization of the BPMN2 Modeler for third-party runtimes.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="runtime"/>
- <element ref="model"/>
- <element ref="propertyTab"/>
- <element ref="customTask"/>
- <element ref="modelExtension"/>
- <element ref="modelEnablement"/>
- <element ref="propertyExtension"/>
- <element ref="featureContainer"/>
- <element ref="style" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="toolPalette" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="runtime">
- <annotation>
- <documentation>
- This extension point allows the BPMN2 Modeler graphical editor to be customized for a specific execution engine (a.k.a. &quot;Target Runtime&quot;).
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Descriptive name for this Runtime implementation. This will be displayed in the BPMN2 Modeler Preference Page under &quot;Runtimes&quot;.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="versions" type="string">
- <annotation>
- <documentation>
- A comma-separated list of versions of the runtime that are supported by this plug-in&apos;s contributions.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique ID for the Runtime.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Tooltip text displayed for this runtime name.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The class that implements IBpmn2RuntimeExtension for the Runtime. This class provides hooks for plug-in lifecycle events and Runtime-specific target namespace, data type and expression language URIs.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="model">
- <annotation>
- <documentation>
- Custom EMF Resource Factory based on the org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl class. This provides runtime-specific hooks for model serialization, proxy resolution, object customization, etc.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="runtimeId" type="string" use="required">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements for which this ResourceFactory will be used.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="uri" type="string">
- <annotation>
- <documentation>
- The namespace URI of the registered model EPackage.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="resourceFactory" type="string" use="required">
- <annotation>
- <documentation>
- ResourceFactory class for this model.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="propertyTab">
- <annotation>
- <documentation>
- Defines a class that will contribute to the tabbed property sheet page for a selected BPMN2 element.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique ID for the tab.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtimeId" type="string">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements for which this propertyTab will be used.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- A label to be displayed on the tab.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="category" type="string">
- <annotation>
- <documentation>
- The category used to group tabs.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="afterTab" type="string">
- <annotation>
- <documentation>
- When there is more than one tab in a category, tabs are sorted by the afterTab attribute.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="indented" type="boolean">
- <annotation>
- <documentation>
- If true, then this tab is indented. This is meant to indicate subtabs or categories of the parent tab.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="image" type="string">
- <annotation>
- <documentation>
- If an image is provided, the icon image is displayed on the tab when the tab is active.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="replaceTab" type="string">
- <annotation>
- <documentation>
- Identifies the ID of a property tab that will be replaced by this one. Typically this is used to override default tabs provided by the generic BPMN2 Modeler.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The class that implements the property section. This must extend AbstractBpmn2PropertySection and should provide a customized &quot;section root&quot; class which renders the desired BPMN2 element attributes. The section root must extend AbstractDetailComposite or one of the subclasses from the BPMN2 Modeler.
-
-This may also be set to the string &quot;default&quot; to indicate that the DefaultDetailSection will be used. The list of BPMN2 element attributes that will be rendered is then specified with the &quot;feature&quot; attribute (see below).
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection:"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="type" type="string">
- <annotation>
- <documentation>
- A space-delimited list of BPMN2 element classes or interfaces that will enable the display of this property sheet tab. These must be fully qualified class names, e.g. &quot;org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process&quot;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="popup" type="boolean">
- <annotation>
- <documentation>
- Exclude this Property Tab from popup dialogs if &quot;false&quot;. The default value is &quot;true&quot;. This allows miscellaneous property tabs, such as the Description to be hidden from configuration dialogs.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="features" type="string">
- <annotation>
- <documentation>
- A space separated list of features to be rendered by a default property tab. This is only used if the &quot;class&quot; attribute is set to &quot;default&quot;.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="customTask">
- <annotation>
- <documentation>
- Defines a Custom Task contributed by a third party runtime vendor. A Custom Task is typically backed by a business object model (e.g. EMF), identified by &quot;type&quot;.
- </documentation>
- </annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element ref="property"/>
- </choice>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique ID used to identify the Custom Task.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtimeId" type="string" use="required">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements in which this Custom Task is defined.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Descriptive name for this Custom Task. This will be displayed in the Tool Palette.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Description used in dialogs and tooltips.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="type" type="string">
- <annotation>
- <documentation>
- Identifies the business object model type. If the business object model is persisted as an EMF resource, this corresponds to the EMF EClass of the object representing this Custom Task.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="featureContainer" type="string" use="required">
- <annotation>
- <documentation>
- The Graphiti Feature Container that provides create, add and update functionality in the editor for this Custom Task.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomTaskFeatureContainer:"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="category" type="string">
- <annotation>
- <documentation>
- The Toolpalette Drawer name for this Custom Task
- </documentation>
- </annotation>
- </attribute>
- <attribute name="propertyTabs" type="string">
- <annotation>
- <documentation>
- The Property Tabs to be displayed when one of these Custom Tasks is selected. This can be a space-separated list of Property Tab IDs.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- An image that is associated with this Custom Task in the Toolpalette. The string value represents a plugin-relative path to an image file.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="property">
- <annotation>
- <documentation>
- Describes some property of the Custom Task. This may be either
- </documentation>
- </annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element ref="value"/>
- </choice>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The property name. If the property is mapped to an EMF model, this should correspond to an attribute name of the Custom Task type.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" type="string">
- <annotation>
- <documentation>
- Default value for the property.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Description used in dialogs and tooltips.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="ref" type="string">
- <annotation>
- <documentation>
- Identifies a reference to a previously created property (no forward references supported at this time). The reference string is a slash-separated name of a property followed by an optional #&lt;number&gt; used to index list objects; for example:
-
-rootFeature/childFeature_1/childFeature_2#0
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" type="string">
- <annotation>
- <documentation>
- If the EMF attribute is created dynamically (i.e. not defined in a model) then this is used as the attribute&apos;s data type.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="value">
- <annotation>
- <documentation>
- If a property type is complex then this will contain a list of the complex type&apos;s values. If multiple values are given the property is assumed to be a list of complex types.
- </documentation>
- </annotation>
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element ref="property"/>
- </choice>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="modelExtension">
- <complexType>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="property"/>
- </choice>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtimeId" type="string" use="required">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements in which this Model Extension is defined.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- Descriptive name for this Custom Task. This will be displayed in the Tool Palette.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Description used in dialogs and tooltips.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
- Identifies the business object model type. If the business object model is persisted as an EMF resource, this corresponds to the EMF EClass of the object representing this extensible element.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="modelEnablement">
- <complexType>
- <choice>
- <element ref="enable" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="disable" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <attribute name="runtimeId" type="string" use="required">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements in which this Model Enablement is defined.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" use="required">
- <annotation>
- <documentation>
- Required Diagram Type name: either Process, Collaboration, Choreography or Conversation.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="Process">
- </enumeration>
- <enumeration value="Collaboration">
- </enumeration>
- <enumeration value="Choreography">
- </enumeration>
- <enumeration value="Conversation">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="profile" type="string" use="required">
- <annotation>
- <documentation>
- Required Tool Profile name that can be used to define different BPMN 2 language subsets (enablements) within each Diagram Type.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="ref" type="string">
- <annotation>
- <documentation>
- Iniitalizes this modelEnablement set from a different Target Runtime, DiagramType and Tool Profile. This simplifies Model Enablement definitions by referencing a base set of enablements already defined.
-
-The value of this attribute string must be the referenced Target Runtime ID, a Diagram Type and a Tool Profile name defined in the referenced runtime, all separated by a colon (:), for example:
-
-ref=&quot;org.eclipse.bpmn2.modeler.runtime.none:Process:Default Process&quot;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="enable">
- <complexType>
- <attribute name="object" type="string" use="required">
- <annotation>
- <documentation>
- Name of the BPMN2 element to enable. All references made by this element to other BPMN2 elements are enabled also (note: if needed, the referenced element types can subsequently be disabled).
-
-This may also be a Custom Task ID to show it on the tool palette.
-
-The special object name &quot;all&quot; is used to refer to all BPMN2 elements.
-
-The value &quot;default&quot; is used by contributing plugins to refer to enablements in the Default Target Runtime defined in the editor core plugins.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="feature" type="string">
- <annotation>
- <documentation>
- The name of a structural feature defined by the BPMN2 element named in &quot;object&quot;.
-
-If &quot;object&quot; has the value &quot;default&quot;, then this refers to a diagram type in the modelEnablement section.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="disable">
- <complexType>
- <attribute name="object" type="string" use="required">
- <annotation>
- <documentation>
- Name of the BPMN2 element to disable. All references made by this element to other BPMN2 elements are also disabled (note: if needed, the referenced element types can subsequently be re-enabled).
-
-This may also be a Custom Task ID to hide it on the tool palette.
-
-The special object name &quot;all&quot; is used to refer to all BPMN2 elements.
-
-The value &quot;default&quot; is used by contributing plugins to refer to enablements in the Default Target Runtime defined in the editor core plugins.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="feature" type="string">
- <annotation>
- <documentation>
- The name of a structural feature defined by the BPMN2 element named in &quot;object&quot;.
-
-If &quot;object&quot; has the value &quot;default&quot;, then this refers to a diagram type in the modelEnablement section.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="propertyExtension">
- <annotation>
- <documentation>
- Provider classes for model objects and features.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique ID for the propertyExtension extension.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtimeId" type="string" use="required">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements for which this propertyExtension will be used.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The class that implements the property extension adapter, i.e. extends the org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter class.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.graphiti.ui.platform.GFPropertySection:"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
- The BPMN2 element EClass to which this propertyExtension applies. This must be a fully qualified class name, e.g. &quot;org.eclipse.bpmn2.SequenceFlow&quot;.
- </documentation>
- <appinfo>
- <meta.attribute kind="java"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="featureContainer">
- <complexType>
- <attribute name="runtimeId" type="string" use="required">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements for which this featureContainer will be used.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The class that implements the Graphiti Feature Container class. The class must implement the BPMN2 Code Feature Container interface.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.bpmn2.modeler.core.features.FeatureContainer"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
- The BPMN2 element EClass to which this featureContainer applies. This must be a fully qualified class name, e.g. &quot;org.eclipse.bpmn2.SequenceFlow&quot;.
- </documentation>
- <appinfo>
- <meta.attribute kind="java"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="style">
- <complexType>
- <attribute name="object" type="string" use="required">
- <annotation>
- <documentation>
- Name of the BPMN2 element to enable. All references made by this element to other BPMN2 elements are enabled also (note: if needed, the referenced element types can subsequently be disabled).
-
-This may also be a Custom Task ID to show it on the tool palette.
-
-The special object name &quot;all&quot; is used to refer to all BPMN2 elements.
-
-The value &quot;default&quot; is used by contributing plugins to refer to enablements in the Default Target Runtime defined in the editor core plugins.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="foreground" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="background" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="font" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="textColor" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="toolPalette">
- <complexType>
- <choice>
- <element ref="category" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique ID used to identify the Tool Palette.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="runtimeId" type="string" use="required">
- <annotation>
- <documentation>
- Identifies one of the previously defined runtime elements for which this propertyTab will be used.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" use="required">
- <annotation>
- <documentation>
- Optional diagram type name: either Process, Collaboration or Choreography.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="Process">
- </enumeration>
- <enumeration value="Collaboration">
- </enumeration>
- <enumeration value="Choreography">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="profile" type="string" use="required">
- <annotation>
- <documentation>
- A profile name that can be used to define different BPMN 2 language subsets within each diagram type. This may be a comma separated list to indicate that this tool palette should be included in more than one profile.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="category">
- <complexType>
- <choice>
- <element ref="tool" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique ID used to identify the Category
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- Toolpalette &quot;drawer&quot; label.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Description used in dialogs and tooltips.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- Toolpalette drawer icon.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="before" type="string">
- <annotation>
- <documentation>
- Inserts this category before the category whose name is equal to this attribute&apos;s value.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="after" type="string">
- <annotation>
- <documentation>
- Inserts this category after the category whose name is equal to this attribute&apos;s value.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="fromPalette" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="tool">
- <complexType>
- <choice>
- <element ref="object" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- Unique ID used to identify the Tool
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Tool label
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Description used in dialogs and tooltips.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- Tool icon
- </documentation>
- </annotation>
- </attribute>
- <attribute name="object" type="string">
- <annotation>
- <documentation>
- Name of the BPMN2 element that this tool will create.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="fromPalette" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="object">
- <annotation>
- <documentation>
- Used to create compound objects and templates.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
- Name of the BPMN2 element that this tool will create.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- Object ID
- </documentation>
- </annotation>
- </attribute>
- <attribute name="optional" type="boolean">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- Version 0.1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- This example illustrates all of the features of this extension point:
-
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.bpmn2.modeler.runtime&quot;&gt;
- &lt;!-- the runtime definition --&gt;
- &lt;runtime
- name=&quot;Sample Business Process Engine&quot;
- versions=&quot;1.0&quot;
- id=&quot;org.eclipse.bpmn2.modeler.runtime.example&quot;
- class=&quot;org.eclipse.bpmn2.modeler.runtime.example.SampsleRuntimeExtension&quot;
- description=&quot;BPMN2 Modeler customizations for a sample runtime engine&quot;&gt;
- &lt;/runtime&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
-
-
-</schema>
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java
deleted file mode 100644
index 7ba3c34b..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core;
-
-import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.ui.editor.DiagramEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-
-public interface IBpmn2RuntimeExtension {
-
- /**
- * Check if the given input file is specific to the runtime environment.
- * The implementation should check for specific extensions and namespaces that identify
- * the file for this runtime.
- *
- * @param input
- * @return true if the file is targeted for this runtime, false if the file is generic BPMN 2.0
- */
- public boolean isContentForRuntime(IEditorInput input);
-
- /**
- * Return the target namespace defined by this runtime for the given diagram type.
- *
- * @param diagramType
- * @return a targetNamespace URI
- */
- public String getTargetNamespace(Bpmn2DiagramType diagramType);
-
- /**
- * Return the default data types supported by this runtime. The first entry in the array
- * is used as the default data type assumed for ItemDefinitions that do not reference an
- * Import element. ItemDefinitions can override this data type by referencing an Import
- * where the structure as well as the type URI are defined.
- *
- * @return an array of String pairs for the list of supported type languages;
- * the first string is the type language URI, the second string is a descriptive
- * name used in the UI.
- */
- public String[] getTypeLanguages();
-
- /**
- * Return a string array of expression languages supported by this runtime. The first
- * entry in the array is used as the default expression language for the process, i.e. it
- * is used in the <definitions expressionLanguage="..."/> declaration.
- *
- * @return an array of String pairs for the list of supported expression languages;
- * the first string is the expression language URI, the second string is a descriptive
- * name used in the UI.
- */
- public String[] getExpressionLanguages();
-
- /**
- * @param editor
- */
- public void initialize(DiagramEditor editor);
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java
deleted file mode 100644
index 461bcb0e..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.core.adapters;
-
-import java.lang.reflect.Field;
-import java.util.Hashtable;
-
-import org.eclipse.bpmn2.Choreography;
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.FlowElement;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.modeler.core.utils.JavaReflectionUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author Bob Brodt
- *
- */
-public class ExtendedPropertiesAdapter<T extends EObject> extends AdapterImpl {
-
- // common property keys
- public final static String LONG_DESCRIPTION = "long.description"; //$NON-NLS-1$
- public final static String CUSTOM_DESCRIPTION = "custom.description"; //$NON-NLS-1$
- public final static String UI_CAN_EDIT = "ui.can.edit"; //$NON-NLS-1$
- // Any adapter that uses this must override setValue() which understands
- // how to convert a String to the required type.
- // This is used in ComboObjectEditor (maybe others in the future)
- public final static String UI_CAN_EDIT_INLINE = "ui.can.edit.inline"; //$NON-NLS-1$
- public final static String UI_CAN_CREATE_NEW = "ui.can.create.new"; //$NON-NLS-1$
- // For Combo boxes (ComboObjectEditor), this indicates that an empty selection will be added to the list of possible choices;
- // For Text fields (TextObjectEditor), this indicates that the actual value of a feature should be used as the edit field text
- // instead of its textual representation as returned by @link ModelUtil#getDisplayName(). In this case, if the value is null,
- // it will be replaced with an empty string.
- public final static String UI_CAN_SET_NULL = "ui.can.set.null"; //$NON-NLS-1$
- public final static String UI_IS_MULTI_CHOICE = "ui.is.multi.choice"; //$NON-NLS-1$
- public static final String PROPERTY_DESCRIPTOR = "property.descriptor"; //$NON-NLS-1$
- // Line number in XML document where this object is defined
- public static final String LINE_NUMBER = "line.number"; //$NON-NLS-1$
-
- protected static Hashtable<EClass,EObject> dummyObjects = new Hashtable<EClass,EObject>();
-
- protected Hashtable<
- EStructuralFeature, // feature ID
- Hashtable<String,Object>> // property key and value
- featureProperties = new Hashtable<EStructuralFeature, Hashtable<String,Object>>();
- protected Hashtable <
- String, // property key
- Object> // value
- objectProperties = new Hashtable <String,Object>();
-
- protected AdapterFactory adapterFactory;
-
- @SuppressWarnings("rawtypes")
- public ExtendedPropertiesAdapter(AdapterFactory adapterFactory, T object) {
- super();
- this.adapterFactory = adapterFactory;
- setTarget(object);
- }
-
- @SuppressWarnings("rawtypes")
- public static ExtendedPropertiesAdapter adapt(Object object) {
- return adapt(object,null);
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public static ExtendedPropertiesAdapter adapt(Object object, EStructuralFeature feature) {
- ExtendedPropertiesAdapter adapter = null;
- if (object instanceof EObject) {
- // If the EObject already has one of these adapters, find the "best" one for
- // the given feature. The "best" means the adapter will have defined a FeatureDescriptor
- // for the given feature.
- EObject eObject = (EObject) object;
- ExtendedPropertiesAdapter genericAdapter = null;
- for (Adapter a : eObject.eAdapters()) {
- if (a instanceof ExtendedPropertiesAdapter && ((ExtendedPropertiesAdapter)a).canAdapt(eObject, feature)) {
- if (a.getClass() == ExtendedPropertiesAdapter.class)
- genericAdapter = (ExtendedPropertiesAdapter) a;
- else
- adapter = (ExtendedPropertiesAdapter) a;
- }
- }
- // if no "best" adapter is found, use the generic adapter if one has been created for this EObject
- if (adapter==null && genericAdapter!=null)
- adapter = genericAdapter;
-
- EObject eclass = getFeatureClass(eObject,feature);
- if (adapter==null)
- adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(eclass, ExtendedPropertiesAdapter.class);
- if (adapter!=null) {
- if (eObject instanceof EClass) {
- EObject dummy = getDummyObject((EClass)eObject);
- if (dummy!=null)
- eObject = dummy;
- }
- adapter.setTarget(eObject);
- adapter.getObjectDescriptor().setObject(eObject);
- if (feature!=null)
- adapter.getFeatureDescriptor(feature).setObject(eObject);
-
- adapter.initializeDescription();
- }
- }
- return adapter;
- }
-
- /**
- * Dummy objects are constructed when needed for an ExtendedPropertiesAdapter. The adapter factory
- * (@see org.eclipse.bpmn2.modeler.ui.adapters.Bpmn2EditorItemProviderAdapterFactory) knows how to
- * construct an ExtendedPropertiesAdapter from an EClass, however the adapter itself needs an EObject.
- * This method constructs and caches these dummy objects as they are needed.
- *
- * @param featureEType
- * @return
- */
- public static EObject getDummyObject(EClass eclass) {
- EObject object = dummyObjects.get(eclass);
- if (object==null && eclass.eContainer() instanceof EPackage && !eclass.isAbstract()) {
- EPackage pkg = (EPackage)eclass.eContainer();
- object = pkg.getEFactoryInstance().create(eclass);
- dummyObjects.put(eclass, object);
- }
- return object;
- }
-
- public void setObjectDescriptor(ObjectDescriptor<T> pd) {
- setProperty(PROPERTY_DESCRIPTOR,pd);
- }
-
- private static EObject getFeatureClass(EObject object, EStructuralFeature feature) {
- EClass eclass = null;
- if (feature!=null && feature.eContainer() instanceof EClass) {
- eclass = (EClass)feature.eContainer();
- }
- if (eclass==null || eclass.isAbstract()) {
- return object;
- }
- return eclass;
- }
-
- @SuppressWarnings("unchecked")
- public ObjectDescriptor<T> getObjectDescriptor() {
- ObjectDescriptor<T> pd = (ObjectDescriptor<T>) getProperty(PROPERTY_DESCRIPTOR);
- if (pd==null) {
- pd = new ObjectDescriptor<T>(adapterFactory, (T)getTarget());
- setProperty(PROPERTY_DESCRIPTOR,pd);
- }
- return pd;
- }
-
- @SuppressWarnings("unchecked")
- public FeatureDescriptor<T> getFeatureDescriptor(EStructuralFeature feature) {
- FeatureDescriptor<T> pd = (FeatureDescriptor<T>) getProperty(feature,PROPERTY_DESCRIPTOR);
- if (pd==null) {
- pd = new FeatureDescriptor<T>(adapterFactory, (T)getTarget(), feature);
- setProperty(feature,PROPERTY_DESCRIPTOR,pd);
- }
- return pd;
- }
-
- public void setFeatureDescriptor(EStructuralFeature feature, FeatureDescriptor<T> pd) {
- Hashtable<String,Object> props = featureProperties.get(feature);
- if (props==null) {
- props = new Hashtable<String,Object>();
- featureProperties.put(feature,props);
- }
- props.put(PROPERTY_DESCRIPTOR, pd);
- }
-
- public Object getProperty(String key) {
- return objectProperties.get(key);
- }
-
- public boolean getBooleanProperty(String key) {
- Object result = getProperty(key);
- if (result instanceof Boolean)
- return ((Boolean)result);
- return false;
- }
-
- public void setProperty(String key, Object value) {
- objectProperties.put(key, value);
- }
-
- public Object getProperty(EStructuralFeature feature, String key) {
- Hashtable<String,Object> props = featureProperties.get(feature);
- if (props==null) {
- props = new Hashtable<String,Object>();
- featureProperties.put(feature,props);
- }
- return props.get(key);
- }
-
- public boolean getBooleanProperty(EStructuralFeature feature, String key) {
- Object result = getProperty(feature, key);
- if (result instanceof Boolean)
- return ((Boolean)result);
- return false;
- }
-
- public void setProperty(EStructuralFeature feature, String key, Object value) {
- Hashtable<String,Object> props = featureProperties.get(feature);
- if (props==null) {
- props = new Hashtable<String,Object>();
- featureProperties.put(feature,props);
- }
- props.put(key, value);
- }
-
- public void setTarget(Notifier newTarget) {
- super.setTarget(newTarget);
- if (newTarget instanceof EObject && !(newTarget instanceof EClass)) {
- EObject object = (EObject)newTarget;
- for (Adapter a : object.eAdapters()) {
- if (a instanceof ExtendedPropertiesAdapter)
- return;
- }
- object.eAdapters().add(this);
- }
- }
-
- public boolean canAdapt(EObject object, EStructuralFeature feature) {
- if (object!=null) {
- if (getObjectDescriptor().object.eClass() == object.eClass()) {
- if (feature==null)
- return true;
- // only TRUE if this adapter already has a FeatureDescriptor for this feature
- Hashtable<String,Object> props = featureProperties.get(feature);
- if (props!=null) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected String initializeDescription() {
- EObject object = (EObject)target;
- String name = ""; //$NON-NLS-1$
- String description = ""; //$NON-NLS-1$
- if (object instanceof BPMNDiagram) {
- switch(ModelUtil.getDiagramType(object)) {
- case NONE:
- name = "UnknownDiagram"; //$NON-NLS-1$
- break;
- case PROCESS:
- name = "Process"; //$NON-NLS-1$
- break;
- case CHOREOGRAPHY:
- name = "Choreography"; //$NON-NLS-1$
- break;
- case COLLABORATION:
- name = "Collaboration"; //$NON-NLS-1$
- break;
- }
- }
- else if (object instanceof Participant) {
- Participant participant = (Participant) target;
- EObject container = participant.eContainer();
- if (container instanceof Choreography) {
- for (FlowElement fe : ((Choreography)container).getFlowElements()) {
- if (fe instanceof ChoreographyActivity) {
- ChoreographyActivity ca = (ChoreographyActivity) fe;
- if (ca.getParticipantRefs().contains(participant)) {
- name = "ParticipantBand"; //$NON-NLS-1$
- break;
- }
- }
- }
- }
- }
- if (name.isEmpty()) {
- name = object.eClass().getName().replaceAll("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- // Set the model element's long description from the Messages class.
- // The field in Messages that contains the description will have the
- // form: "UI_<BPMN2ElementName>_long_description".
- // The Messages class must be contained somewhere in the package hierarchy
- // that contains the adapter factory class; by default, this will be the
- // BPMN2 modeler UI plug-in hierarchy, starting with org.eclipse.bpmn2.modeler.ui.adapters
- try {
- String fieldName = "UI_" + name + "_long_description"; //$NON-NLS-1$ //$NON-NLS-2$
- Class messages = JavaReflectionUtil.findClass(adapterFactory, "Messages"); //$NON-NLS-1$
- Field field = messages.getField(fieldName);
- description = (String)field.get(null);
- setProperty(LONG_DESCRIPTION, description);
- } catch (Exception e) {
- }
-
- return description;
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java
deleted file mode 100644
index e0cbe343..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.core.adapters;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.RootElement;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EObjectEList;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-
-/**
- * @author Bob Brodt
- *
- */
-public class FeatureDescriptor<T extends EObject> extends ObjectDescriptor<T> {
-
- protected EStructuralFeature feature;
- protected int multiline = 0; // -1 = false, +1 = true, 0 = unset
- protected Hashtable<String, Object> choiceOfValues; // for static lists
-
- public FeatureDescriptor(AdapterFactory adapterFactory, T object, EStructuralFeature feature) {
- super(adapterFactory, object);
- this.feature = feature;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public String getLabel(Object context) {
- EObject object = adopt(context);
- if (label==null) {
- IItemPropertyDescriptor propertyDescriptor = getPropertyDescriptor(feature);
- if (propertyDescriptor != null)
- label = propertyDescriptor.getDisplayName(object);
- else {
- // If the referenced type is an EObject, we'll get an "E Class" label
- // so use the feature name instead.
- if (feature instanceof EReference && (feature.getEType().getInstanceClass()!=EObject.class))
- label = ModelUtil.getLabel(feature.getEType());
- else
- label = ModelUtil.toDisplayName(feature.getName());
- }
- }
- return label;
- }
-
- @Override
- public void setDisplayName(String text) {
- this.name = text;
- }
-
- @Override
- public String getDisplayName(Object context) {
- EObject object = adopt(context);
- if (name==null) {
- String t = null;
- // derive text from feature's value: default behavior is
- // to use the "name" attribute if there is one;
- // if not, use the "id" attribute;
- // fallback is to use the feature's toString()
- EObject o = null;
- EStructuralFeature f = null;
- if (feature!=null) {
- Object value = object.eGet(feature);
- if (value instanceof EObject) {
- o = (EObject)value;
- }
- else if (value!=null)
- t = value.toString();
- }
- if (t==null && o!=null) {
- f = o.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
- if (f!=null) {
- String name = (String)o.eGet(f);
- if (name!=null && !name.isEmpty())
- t = name;
- }
- }
- if (t==null && o!=null) {
- f = o.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
- if (f!=null) {
- Object id = o.eGet(f);
- if (id!=null && !id.toString().isEmpty())
- t = id.toString();
- }
- }
- return t == null ? "" /*ModelUtil.getLabel(object)*/ : t; //$NON-NLS-1$
- }
- return name == null ? "" : name; //$NON-NLS-1$
- }
-
- public void setChoiceOfValues(Hashtable<String, Object> choiceOfValues) {
- this.choiceOfValues = choiceOfValues;
- }
-
- /**
- * Convenience method to set choice of values from an object list.
- * @param values
- */
- public void setChoiceOfValues(Collection values) {
- if (values!=null) {
- choiceOfValues = new Hashtable<String,Object>();
- Iterator iter = values.iterator();
- while (iter.hasNext()) {
- Object value = iter.next();
- if (value!=null) {
- String text = getChoiceString(value);
- while (choiceOfValues.containsKey(text))
- text += " "; //$NON-NLS-1$
- choiceOfValues.put(text, value);
- }
- }
- }
- }
-
- /**
- * Returns a list of name-value pairs for display in a combo box or selection list.
- * The String is what gets displayed in the selection list, while the Object is
- * implementation-specific: this can be a reference to an element, string or whatever.
- * The implementation is responsible for interpreting this value by overriding the
- * setValue() method, and must update the object feature accordingly.
- *
- * @param context
- * @return
- */
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- EObject object = context instanceof EObject ? (EObject)context : this.object;
- if (choiceOfValues==null) {
- List<String> names = null;
- Collection values = null;
-
- try {
- IItemPropertyDescriptor propertyDescriptor = getPropertyDescriptor(feature);
- if (propertyDescriptor!=null) {
- values = propertyDescriptor.getChoiceOfValues(object);
- }
- }
- catch (Exception e) {
- // ignore exceptions if we fail to resolve proxies;
- // e.g. and instance of a DynamicEObjectImpl with a bogus
- // URI is used for ItemDefinition.structureRef
- // fallback is to do our own search
- }
-
- if (values==null)
- values = ModelUtil.getAllReachableObjects(object, feature);
-
- if (values!=null) {
- Hashtable<String,Object> choices = new Hashtable<String,Object>();
- Iterator iter = values.iterator();
- while (iter.hasNext()) {
- Object value = iter.next();
- if (value!=null) {
- String text = getChoiceString(value);
- if (text==null)
- text = ""; //$NON-NLS-1$
- while (choices.containsKey(text))
- text += " "; //$NON-NLS-1$
- choices.put(text, value);
- }
- }
- return choices;
- }
- }
- return choiceOfValues;
- }
-
- // copied from PropertyUtil in UI plugin
- public String getChoiceString(Object value) {
- if (value instanceof EObject) {
- EObject eObject = (EObject)value;
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eObject);
- if (adapter!=null)
- return adapter.getObjectDescriptor().getDisplayName(eObject);
- return ModelUtil.toDisplayName( eObject.eClass().getName() );
- }
- return value.toString();
- }
-
- public void setMultiLine(boolean multiline) {
- this.multiline = multiline ? 1 : -1;
- }
-
- public boolean isMultiLine(Object context) {
- EObject object = adopt(context);
- if (multiline==0) {
- IItemPropertyDescriptor propertyDescriptor = getPropertyDescriptor(feature);
- if (propertyDescriptor!=null)
- multiline = propertyDescriptor.isMultiLine(object) ? 1 : -1;
- }
- return multiline == 1;
- }
-
- public EObject createFeature(Object context) {
- EObject object = adopt(context);
- if (context instanceof EClass)
- return createFeature(object, (EClass)context);
- return createFeature(context, null);
- }
-
- public EObject createFeature(Object context, EClass eclass) {
- EObject object = adopt(context);
- return createFeature(object.eResource(),context,eclass);
- }
-
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- T object = adopt(context);
- EObject newFeature = null;
- try {
- if (context instanceof EClass)
- eclass = (EClass)context;
- if (eclass==null)
- eclass = (EClass)feature.getEType();
-
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eclass);
- if (adapter!=null) {
- if (resource==null)
- resource = object.eResource();
- newFeature = adapter.getObjectDescriptor().createObject(resource, eclass);
- // can we set the new object into the parent object?
- if (newFeature.eContainer()!=null || // the new object is contained somewhere
- feature instanceof EAttribute || // the new object is an attribute
- // the feature is a containment reference which means the this.object owns it
- (feature instanceof EReference && ((EReference)feature).isContainment()))
- {
- if (object.eGet(feature) instanceof List) {
- ((List)object.eGet(feature)).add(newFeature);
- }
- else
- object.eSet(feature, newFeature);
- }
- }
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- return newFeature;
- }
-
- // NOTE: getValue() and setValue() must be symmetrical; that is, setValue()
- // must be able to handle the object type returned by getValue(), although
- // setValue() may also know how to convert from other types, e.g. String,
- // Integer, etc.
- public Object getValue() {
- return getValue(object);
- }
-
- public Object getValue(Object context) {
- EObject object = adopt(context);
- return object.eGet(feature);
- }
-
- public void setValue(Object value) {
- setValue(object,value);
- }
-
- public void setValue(Object context, final Object value) {
- final T object = adopt(context);
-
- if (object.eGet(feature) instanceof EObjectEList) {
- // the feature is a reference list - user must have meant to insert
- // the value into this list...
- final EObjectEList list = (EObjectEList)object.eGet(feature);
- TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- list.add(value);
- insertRootElementIfNeeded(value);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- list.add(value);
- insertRootElementIfNeeded(value);
- }
- });
- }
- }
- else {
- IItemPropertyDescriptor propertyDescriptor = getPropertyDescriptor(object, feature);
- if (propertyDescriptor != null) {
- propertyDescriptor.setPropertyValue(object, value);
- }
- else {
- TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- object.eSet(feature, value);
- insertRootElementIfNeeded(value);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- object.eSet(feature, value);
- insertRootElementIfNeeded(value);
- }
- });
- }
- }
- }
- }
-
- public void unset() {
- unset(object);
- }
-
- public void unset(Object context) {
- final T object = adopt(context);
- setValue(object, feature.getDefaultValue());
- }
-
- private void insertRootElementIfNeeded(Object value) {
- if (value instanceof RootElement && ((RootElement)value).eContainer()==null) {
- // stuff all root elements into Definitions.rootElements
- final Definitions definitions = ModelUtil.getDefinitions(object);
- if (definitions!=null) {
- definitions.getRootElements().add((RootElement)value);
- }
- }
- }
-
- @Override
- public boolean equals(Object obj) {
- Object thisValue = object.eGet(feature);
-
- if (thisValue==null && obj==null)
- return true;
-
- if (thisValue instanceof EObject && obj instanceof EObject) {
- return compare((EObject)thisValue, (EObject)obj, false);
- }
-
- if (thisValue!=null && obj!=null)
- return thisValue.equals(obj);
-
- return false;
- }
-
- @Override
- public boolean similar(Object obj) {
- Object thisValue = object.eGet(feature);
-
- if (thisValue==null && obj==null)
- return true;
-
- if (thisValue instanceof EObject && obj instanceof EObject) {
- return compare((EObject)thisValue, (EObject)obj, true);
- }
-
- if (thisValue!=null && obj!=null)
- return thisValue.equals(obj);
-
- return false;
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java
deleted file mode 100644
index bb19d7f0..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.adapters;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.adapters.messages"; //$NON-NLS-1$
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-
- public static String ObjectDescriptor_New;
- public static String ObjectDescriptor_Unnamed;
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java
deleted file mode 100644
index 317d6621..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.core.adapters;
-
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.impl.DynamicEObjectImpl;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @author Bob Brodt
- *
- */
-public class ObjectDescriptor<T extends EObject> {
-
- protected T object;
- protected String label;
- protected String name;
- protected AdapterFactory adapterFactory;
-
- public ObjectDescriptor(AdapterFactory adapterFactory, T object) {
- this.object = object;
- }
-
- public void setObject(T object) {
- this.object = object;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public String getLabel(Object context) {
- EObject object = (context instanceof EObject) ?
- (EObject)context :
- this.object;
- EClass eclass = (object instanceof EClass) ?
- (EClass)object :
- object.eClass();
- if (label==null) {
- label = ModelUtil.toDisplayName(eclass.getName());
- }
- return label;
- }
-
- public void setDisplayName(String name) {
- this.name = name;
- }
-
- public String getDisplayName(Object context) {
- if (name==null) {
- T object = adopt(context);
-
- // derive text from feature's value: default behavior is
- // to use the "name" attribute if there is one;
- // if not, use the "id" attribute;
- // fallback is to use the feature's toString()
- String text = ModelUtil.toDisplayName(object.eClass().getName());
- Object value = null;
- EStructuralFeature f = null;
- f = object.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
- if (f!=null) {
- value = object.eGet(f);
- if (value==null || value.toString().isEmpty())
- value = null;
- }
- if (value==null) {
- f = object.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
- if (f!=null) {
- value = object.eGet(f);
- if (value==null || value.toString().isEmpty())
- value = null;
- }
- }
- if (value==null)
- value = NLS.bind(Messages.ObjectDescriptor_Unnamed, text);
- return (String)value;
- }
- return name;
- }
-
- protected IItemPropertyDescriptor getPropertyDescriptor(EStructuralFeature feature) {
- return getPropertyDescriptor(object, feature);
- }
-
- protected IItemPropertyDescriptor getPropertyDescriptor(T object, EStructuralFeature feature) {
- ItemProviderAdapter adapter = null;
- for (Adapter a : object.eAdapters()) {
- if (a instanceof ItemProviderAdapter) {
- adapter = (ItemProviderAdapter)a;
- break;
- }
- }
- if (adapter!=null)
- return adapter.getPropertyDescriptor(object, feature);
- return null;
- }
-
- @SuppressWarnings("unchecked")
- protected EObject clone(T oldObject) {
- T newObject = null;
- if (oldObject!=null) {
- EClass eClass = oldObject.eClass();
- newObject = (T) eClass.getEPackage().getEFactoryInstance().create(eClass);
- for (EStructuralFeature f : eClass.getEAllAttributes()) {
- newObject.eSet(f, oldObject.eGet(f));
- }
- }
- return newObject;
- }
-
- @SuppressWarnings("unchecked")
- public boolean equals(Object otherObject) {
- EObject thisObject = this.object;
- if (otherObject instanceof EObject) {
- // compare feature values of both EObjects:
- // this should take care of most of the BPMN2 elements
- return compare(thisObject, (EObject)otherObject, false);
- }
- return super.equals(otherObject);
- }
-
- public boolean similar(Object otherObject) {
- EObject thisObject = this.object;
- if (otherObject instanceof EObject) {
- // compare feature values of both EObjects:
- // this should take care of most of the BPMN2 elements
- return compare(thisObject, (EObject)otherObject, true);
- }
- return super.equals(otherObject);
- }
-
- public static boolean compare(EObject thisObject, EObject otherObject, boolean similar) {
- for (EStructuralFeature f : thisObject.eClass().getEAllStructuralFeatures()) {
- // IDs are allowed to be different
- if (similar && "id".equals(f.getName())) //$NON-NLS-1$
- continue;
- Object v1 = otherObject.eGet(f);
- Object v2 = thisObject.eGet(f);
- // both null? equal!
- if (v1==null && v2==null)
- continue;
- // one or the other null? not equal!
- if (v1==null || v2==null)
- return false;
- // both not null? do a default compare...
- if (!v1.equals(v2)) {
- // the default Object.equals(obj) fails:
- // for Dynamic EObjects (used here as "proxies") only compare their proxy URIs
- if (ModelUtil.isStringWrapper(v1) && ModelUtil.isStringWrapper(v2)) {
- v1 = ModelUtil.getStringWrapperValue(v1);
- v2 = ModelUtil.getStringWrapperValue(v2);
- if (v1==null && v2==null)
- continue;
- if (v1==null || v2==null)
- return false;
- if (v1.equals(v2))
- continue;
- }
- else if (v1 instanceof EObject && v2 instanceof EObject) {
- // for all other EObjects, do a deep compare...
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt((EObject)v1);
- if (adapter!=null) {
- if (adapter.getObjectDescriptor().compare((EObject)v1,(EObject)v2,similar))
- continue;
- }
- }
- return false;
- }
- }
- return true;
- }
-
- /**
- * Many methods accept java Objects as a context variable. In many cases (especially the
- * default implementations) the context object must have the same type as the specialized
- * class.
- *
- * @param context
- * @return the context variable if it has the same type as this.object, or this.object if not.
- */
- @SuppressWarnings("unchecked")
- protected T adopt(Object context) {
- T result = (this.object.getClass().isInstance(context)) ? (T)context : this.object;
- return result;
- }
-
- public TransactionalEditingDomain getEditingDomain(Object context) {
- T object = adopt(context);
- EditingDomain result = AdapterFactoryEditingDomain.getEditingDomainFor(object);
- if (result == null) {
- if (adapterFactory instanceof IEditingDomainProvider) {
- result = ((IEditingDomainProvider) adapterFactory).getEditingDomain();
- }
-
- if (result == null && adapterFactory instanceof ComposeableAdapterFactory) {
- AdapterFactory rootAdapterFactory = ((ComposeableAdapterFactory) adapterFactory)
- .getRootAdapterFactory();
- if (rootAdapterFactory instanceof IEditingDomainProvider) {
- result = ((IEditingDomainProvider) rootAdapterFactory).getEditingDomain();
- }
- }
- }
- if (result instanceof TransactionalEditingDomain)
- return (TransactionalEditingDomain)result;
- return null;
- }
-
- public T createObject(Object context) {
- return createObject(null,context);
- }
-
- @SuppressWarnings("unchecked")
- public T createObject(Resource resource, Object context) {
-
- EClass eClass = null;
- if (context instanceof EClass) {
- eClass = (EClass)context;
- }
- else if (context instanceof EObject) {
- eClass = ((EObject)context).eClass();
- if (resource==null)
- resource = ((EObject)context).eResource();
- }
- else {
- eClass = object.eClass();
- }
- Assert.isTrue(object.eClass().isSuperTypeOf(eClass));
-
- T newObject = (T) eClass.getEPackage().getEFactoryInstance().create(eClass);
-
- if (resource==null)
- resource = object.eResource();
-
- // if the object has an "id", assign it now.
- String id = ModelUtil.setID(newObject,resource);
- // also set a default name
- EStructuralFeature feature = newObject.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
- if (feature!=null && !newObject.eIsSet(feature)) {
- if (id!=null)
- newObject.eSet(feature, ModelUtil.toDisplayName(id));
- else {
- String name = ModelUtil.toDisplayName(newObject.eClass().getName());
- newObject.eSet(feature, NLS.bind(Messages.ObjectDescriptor_New, name));
- }
- }
- return newObject;
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties
deleted file mode 100644
index 2c8e841b..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-ObjectDescriptor_New=New {0}
-ObjectDescriptor_Unnamed=Unnamed {0}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddFeature.java
deleted file mode 100644
index e9931975..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddFeature.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddConnectionContext;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.impl.AbstractAddPictogramElementFeature;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
-import org.eclipse.graphiti.mm.pictograms.Connection;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-
-public abstract class AbstractBpmn2AddFeature<T extends BaseElement>
- extends AbstractAddPictogramElementFeature
- implements IBpmn2AddFeature<T> {
-
- public AbstractBpmn2AddFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- /**
- * Helper function to return the GraphicsAlgorithm for a ContainerShape created by
- * one of the BPMN2 Modeler's Add features. This can be used by subclasses to decorate
- * the figure on the canvas.
- *
- * @param containerShape
- * @return
- */
- protected static GraphicsAlgorithmContainer getGraphicsAlgorithm(ContainerShape containerShape) {
- if (containerShape.getGraphicsAlgorithm() instanceof RoundedRectangle)
- return containerShape.getGraphicsAlgorithm();
- if (containerShape.getChildren().size()>0) {
- Shape shape = containerShape.getChildren().get(0);
- return shape.getGraphicsAlgorithm();
- }
- return null;
- }
-
- protected void decorateConnection(IAddConnectionContext context, Connection connection, T businessObject) {
- }
-
- protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject) {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java
deleted file mode 100644
index e50001ff..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features;
-
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-
-public abstract class AbstractUpdateBaseElementFeature extends AbstractUpdateFeature {
-
- public AbstractUpdateBaseElementFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public IReason updateNeeded(final IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
- PictogramElement pe = context.getPictogramElement();
- if (pe instanceof ContainerShape) {
- String shapeValue = FeatureSupport.getShapeValue(context);
- if (shapeValue==null)
- shapeValue = ""; //$NON-NLS-1$
- String businessValue = FeatureSupport.getBusinessValue(context);
- if (businessValue==null)
- businessValue = ""; //$NON-NLS-1$
-
- boolean updateNeeded = !shapeValue.equals(businessValue);
-
- if (updateNeeded) {
- // try to update immediately
- final boolean result[] = new boolean[1];
- TransactionalEditingDomain domain = getFeatureProvider().getDiagramTypeProvider().getDiagramBehavior().getEditingDomain();
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- result[0] = update(context);
- }
- });
- if (result[0]==false)
- return Reason.createTrueReason(Messages.AbstractUpdateBaseElementFeature_Name);
- }
- }
-
- return Reason.createFalseReason();
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- // TODO here it should get an updated picture from the element controller
-
- PictogramElement pe = context.getPictogramElement();
- if (pe instanceof ContainerShape) {
- ContainerShape cs = (ContainerShape) pe;
- for (Shape shape : cs.getChildren()) {
- if (shape.getGraphicsAlgorithm() instanceof AbstractText) {
- AbstractText text = (AbstractText) shape.getGraphicsAlgorithm();
- String value = FeatureSupport.getBusinessValue(context);
- if (value == null) {
- value = ""; //$NON-NLS-1$
- }
- text.setValue(value);
- return true;
- }
- }
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ContextConstants.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ContextConstants.java
deleted file mode 100644
index 8b4b84d7..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ContextConstants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features;
-
-public interface ContextConstants {
-
- public static final String LABEL_CONTEXT = "labelContext"; //$NON-NLS-1$
- public static final String WIDTH = "width"; //$NON-NLS-1$
- public static final String HEIGHT = "height"; //$NON-NLS-1$
- public static final String BUSINESS_OBJECT = "businessObject"; //$NON-NLS-1$
- public static final String LABEL_OWNER = "labelOwner"; //$NON-NLS-1$
-
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java
deleted file mode 100644
index a1603027..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IDeleteContext;
-import org.eclipse.graphiti.features.context.impl.DeleteContext;
-import org.eclipse.graphiti.mm.pictograms.Anchor;
-import org.eclipse.graphiti.mm.pictograms.Connection;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Diagram;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.ui.features.DefaultDeleteFeature;
-
-public class DefaultDeleteBPMNShapeFeature extends DefaultDeleteFeature {
-
- public DefaultDeleteBPMNShapeFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- protected boolean getUserDecision(IDeleteContext context) {
- return true;
- }
-
- public boolean canDelete(IDeleteContext context) {
- // don't delete the Diagram!
- if (context.getPictogramElement() instanceof Diagram)
- return false;
- return true;
- }
-
- @Override
- protected void deleteBusinessObject(Object bo) {
- EStructuralFeature reference = ((EObject)bo).eClass().getEStructuralFeature("categoryValueRef");
- if (reference!=null) {
- Object v = ((EObject)bo).eGet(reference);
- if (v instanceof EList) {
- ((EList)v).clear();
- }
- }
-
- List<PictogramElement> pictElements = Graphiti.getLinkService().getPictogramElements(getDiagram(), (EObject) bo);
- for (Iterator<PictogramElement> iterator = pictElements.iterator(); iterator.hasNext();) {
- PictogramElement pe = iterator.next();
- deletePeEnvironment(pe);
- Graphiti.getPeService().deletePictogramElement(pe);
- }
- super.deleteBusinessObject(bo);
- }
-
- protected void deletePeEnvironment(PictogramElement pictogramElement){
- if (pictogramElement instanceof ContainerShape) {
- ContainerShape cShape = (ContainerShape) pictogramElement;
- EList<Anchor> anchors = cShape.getAnchors();
- for (Anchor anchor : anchors) {
- deleteConnections(getFeatureProvider(), anchor.getIncomingConnections());
- deleteConnections(getFeatureProvider(), anchor.getOutgoingConnections());
- }
- deleteContainer(getFeatureProvider(), cShape);
- }
- }
-
- protected void deleteContainer(IFeatureProvider fp, ContainerShape cShape) {
- Object[] children = cShape.getChildren().toArray();
- for (Object shape : children) {
- if (shape instanceof ContainerShape) {
- DeleteContext context = new DeleteContext((PictogramElement) shape);
- fp.getDeleteFeature(context).delete(context);
- }
- }
- }
-
- protected void deleteConnections(IFeatureProvider fp, EList<Connection> connections) {
- List<Connection> con = new ArrayList<Connection>();
- con.addAll(connections);
- for (Connection connection : con) {
- IDeleteContext conDelete = new DeleteContext(connection);
- fp.getDeleteFeature(conDelete).delete(conDelete);
- }
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNShapeFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNShapeFeature.java
deleted file mode 100644
index 665a9d13..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNShapeFeature.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features;
-
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ILayoutContext;
-import org.eclipse.graphiti.features.impl.AbstractLayoutFeature;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-
-public class DefaultLayoutBPMNShapeFeature extends AbstractLayoutFeature {
-
- public DefaultLayoutBPMNShapeFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canLayout(ILayoutContext context) {
- return true;
- }
-
- @Override
- public boolean layout(ILayoutContext context) {
- layoutConnections(context.getPictogramElement());
- return true;
- }
-
- public void layoutConnections(PictogramElement shape) {
-// Diagram diagram = getDiagram();
-// if (diagram!=null) {
-// if (shape.getLink()!=null) {
-// for (Object object : shape.getLink().getBusinessObjects()) {
-// if (object instanceof BPMNShape || object instanceof BPMNEdge) {
-// AnchorUtil.reConnect((DiagramElement) object, diagram);
-// }
-// }
-// }
-//
-// if (shape instanceof ContainerShape) {
-// for (PictogramElement pe : FeatureSupport.getContainerChildren((ContainerShape)shape)) {
-// if (pe.getLink()!=null) {
-// for (Object object : pe.getLink().getBusinessObjects()) {
-// if (object instanceof BPMNShape || object instanceof BPMNEdge) {
-// AnchorUtil.reConnect((DiagramElement) object, diagram);
-// }
-// }
-// }
-// }
-// }
-// }
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java
deleted file mode 100644
index 620215a3..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.messages"; //$NON-NLS-1$
- public static String AbstractBpmn2CreateConnectionFeature_Create;
- public static String AbstractBpmn2CreateFeature_Create;
- public static String AbstractUpdateBaseElementFeature_Name;
- public static String BPMNDiagramFeatureContainer_Disable_Enable_Description;
- public static String BPMNDiagramFeatureContainer_Disable_Name;
- public static String BPMNDiagramFeatureContainer_Enable_Name;
- public static String BPMNDiagramFeatureContainer_Reroute_All_Description;
- public static String BPMNDiagramFeatureContainer_Reroute_All_Name;
- public static String ShowPropertiesFeature_Name;
- public static String ShowPropertiesFeature_Title;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java
deleted file mode 100644
index 278b37bd..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-
-public class MultiUpdateFeature extends AbstractUpdateFeature {
-
- public final static String FORCE_UPDATE_ALL = "force.update.all";
-
- protected List<IUpdateFeature> features = new ArrayList<IUpdateFeature>();
-
- public MultiUpdateFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- for (IUpdateFeature p : features) {
- if (p.canUpdate(context)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- String text = null;
- for (IUpdateFeature p : features) {
- IReason reason = p.updateNeeded(context);
- if (reason.toBoolean()) {
- if (text==null) {
- text = reason.getText();
- }
- else
- text += "\n" + reason.getText(); //$NON-NLS-1$
- }
- }
- if (text!=null)
- return Reason.createTrueReason(text);
- return Reason.createFalseReason();
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- boolean updated = false;
- boolean forceUpdate = Boolean.TRUE.equals(context.getProperty(FORCE_UPDATE_ALL));
-
- for (IUpdateFeature p : features) {
- if ((p.updateNeeded(context).toBoolean() || forceUpdate) && p.update(context)) {
- updated = true;
- }
- }
-
- return updated;
- }
-
- public void addUpdateFeature(IUpdateFeature feature) {
- if (feature != null) {
- features.add(feature);
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java
deleted file mode 100644
index 577b0c87..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.activity;
-
-import static org.eclipse.bpmn2.modeler.core.features.activity.UpdateActivityCompensateMarkerFeature.IS_COMPENSATE_PROPERTY;
-import static org.eclipse.bpmn2.modeler.core.features.activity.UpdateActivityLoopAndMultiInstanceMarkerFeature.IS_LOOP_OR_MULTI_INSTANCE;
-
-import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.activity.UpdateActivityLoopAndMultiInstanceMarkerFeature.LoopCharacteristicType;
-import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.impl.AddContext;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.Rectangle;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-
-public abstract class AbstractAddActivityFeature<T extends Activity>
- extends AbstractBpmn2AddElementFeature<T> {
-
- public static final String ACTIVITY_DECORATOR = "activity-decorator"; //$NON-NLS-1$
- public static final String IS_ACTIVITY = "activity"; //$NON-NLS-1$
-
- protected final IGaService gaService = Graphiti.getGaService();
- protected final IPeService peService = Graphiti.getPeService();
-
- protected Bpmn2Preferences preferences;
-
- public AbstractAddActivityFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canAdd(IAddContext context) {
- /*
- * TODO: rethink this: it's causing all kinds of DI import problems
- * also see AbstractCreateFlowElementFeature
- *
- if (intoParticipant) {
- // don't allow flow elements to be added to a Pool if it is a "whitebox"
- // (i.e. if it has its own BPMNDiagram page.) Flow elements should be added
- // to the Process page instead.
- Participant participant = FeatureSupport.getTargetParticipant(context);
- if (FeatureSupport.hasBpmnDiagram(participant))
- return false;
- }
- else if (intoFlowElementContainer) {
- FlowElementsContainer flowElementsContainer = FeatureSupport.getTargetFlowElementsContainer(context);
- if (FeatureSupport.hasBpmnDiagram(flowElementsContainer))
- return false;
- }
- */
- return FeatureSupport.isValidFlowElementTarget(context);
- }
-
- @Override
- public PictogramElement add(IAddContext context) {
- preferences = Bpmn2Preferences.getInstance((EObject)context.getNewObject());
-
- T businessObject = getBusinessObject(context);
-
- int width = context.getWidth() > 0 ? context.getWidth() : this.getWidth();
- int height = context.getHeight() > 0 ? context.getHeight() : this.getHeight();
-
- GraphicsAlgorithm targetAlgorithm = context.getTargetContainer().getGraphicsAlgorithm();
-
- if (targetAlgorithm != null) {
- width = Math.min(targetAlgorithm.getWidth(), width);
- height = Math.min(targetAlgorithm.getHeight(), height);
- }
-
- adjustLocation(context,width,height);
-
- int x = context.getX();
- int y = context.getY();
-
- ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
- Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
- gaService.setLocationAndSize(invisibleRect, x, y, width, height);
-
- Shape rectShape = peService.createShape(containerShape, false);
- RoundedRectangle rect = gaService.createRoundedRectangle(rectShape, 5, 5);
- StyleUtil.applyStyle(rect, businessObject);
- gaService.setLocationAndSize(rect, 0, 0, width, height);
- link(rectShape, businessObject);
-
- peService.setPropertyValue(rectShape, IS_ACTIVITY, Boolean.toString(true));
-
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
- createDIShape(containerShape, businessObject, !isImport);
-
- Graphiti.getPeService().setPropertyValue(containerShape, IS_COMPENSATE_PROPERTY, Boolean.toString(false));
- Graphiti.getPeService().setPropertyValue(containerShape, IS_LOOP_OR_MULTI_INSTANCE, LoopCharacteristicType.NULL.getName());
-
- // set a property on the decorators so we can distinguish them from the real children (i.e. tasks, etc.)
- for (PictogramElement pe : containerShape.getChildren()) {
- Graphiti.getPeService().setPropertyValue(pe, ACTIVITY_DECORATOR, "true"); //$NON-NLS-1$
- }
-
- // hook for subclasses to inject extra code
- ((AddContext)context).setWidth(width);
- ((AddContext)context).setHeight(height);
- decorateShape(context, containerShape, businessObject);
-
- peService.createChopboxAnchor(containerShape);
- AnchorUtil.addFixedPointAnchors(containerShape, rect);
-
- // set a property on the decorators so we can distinguish them from the real children (i.e. tasks, etc.)
- for (PictogramElement pe : containerShape.getChildren()) {
- Graphiti.getPeService().setPropertyValue(pe, ACTIVITY_DECORATOR, "true"); //$NON-NLS-1$
- }
-
- splitConnection(context, containerShape);
- updatePictogramElement(context, containerShape);
- layoutPictogramElement(context, containerShape);
-
- return containerShape;
- }
-
- protected int getMarkerContainerOffset() {
- return 0;
- }
-
- public abstract int getWidth();
-
- public abstract int getHeight();
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java
deleted file mode 100644
index 66dc5fdc..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.activity;
-
-import java.util.Iterator;
-
-import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.FlowElement;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeService;
-
-public abstract class AbstractUpdateMarkerFeature<T extends FlowElement> extends AbstractUpdateFeature {
-
- public AbstractUpdateMarkerFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
- return bo != null && bo instanceof Activity && context.getPictogramElement() instanceof ContainerShape;
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
- IPeService peService = Graphiti.getPeService();
- PictogramElement element = context.getPictogramElement();
- String property = peService.getPropertyValue(element, getPropertyKey());
- if(property == null) {
- return Reason.createFalseReason();
- }
- T activity = (T) getBusinessObjectForPictogramElement(context.getPictogramElement());
- boolean changed = isPropertyChanged(activity, property);
- return changed ? Reason.createTrueReason("Marker changed") : Reason.createFalseReason();
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- IPeService peService = Graphiti.getPeService();
- ContainerShape container = (ContainerShape) context.getPictogramElement();
- T element = (T) getBusinessObjectForPictogramElement(context.getPictogramElement());
-
- doUpdate(element, container);
- peService.setPropertyValue(container, getPropertyKey(), convertPropertyToString(element));
- return true;
- }
-
- protected abstract String getPropertyKey();
-
- protected abstract boolean isPropertyChanged(T element, String propertyValue);
-
- protected abstract void doUpdate(T element, ContainerShape markerContainer);
-
- protected abstract String convertPropertyToString(T element);
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties
deleted file mode 100644
index f149b28f..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-DirectEditTaskFeature_Invalid_Empty=Please enter any text as Task name.
-DirectEditTaskFeature_Invalid_Linebreak=Line breakes are not allowed in Task names.
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/MoveTextAnnotationFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/MoveTextAnnotationFeature.java
deleted file mode 100644
index 87c0128c..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/MoveTextAnnotationFeature.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.artifact;
-
-import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
-
-public class MoveTextAnnotationFeature extends DefaultMoveBPMNShapeFeature {
-
- public MoveTextAnnotationFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canMoveShape(IMoveShapeContext context) {
- return FeatureSupport.isValidArtifactTarget(context);
- }
-
- @Override
- protected void internalMove(IMoveShapeContext context) {
- super.internalMove(context);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyProperties.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyProperties.java
deleted file mode 100644
index 52ed6ff2..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyProperties.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.choreography;
-
-public interface ChoreographyProperties {
-
- final static int PARTICIPANT_BAND_HEIGHT = 20;
- final static int ENV_W = 30;
- final static int ENV_H = 18;
- final static int ENVELOPE_HEIGHT_MODIFIER = 30;
- final static int R = 10;
- final static int TEXT_H = 15;
- final static int MARKER_H = 20;
-
- final static String CHOREOGRAPHY_ACTIVITY_PROPERTY = "choreography.activity"; //$NON-NLS-1$
- final static String PARTICIPANT_REF = "choreography.activity.participant.ref"; //$NON-NLS-1$
- final static String PARTICIPANT_REF_ID = "choreography.activity.participant.ref.id"; //$NON-NLS-1$
- final static String PARTICIPANT_REF_IDS = "choreography.activity.participant.ref.ids"; //$NON-NLS-1$
- final static String INITIATING_PARTICIPANT_REF = "choreography.activity.initiating.participant.ref"; //$NON-NLS-1$
- final static String MESSAGE_VISIBLE = "choreography.activity.band.message.visible"; //$NON-NLS-1$
- final static String BAND = "choreography.activity.band"; //$NON-NLS-1$
- final static String MESSAGE_LINK = "choreography.messageLink"; //$NON-NLS-1$
- final static String MESSAGE_NAME = "choreography.messageName"; //$NON-NLS-1$
- final static String CHOREOGRAPHY_NAME = "choreography.name"; //$NON-NLS-1$
- final static String CALL_CHOREO_BORDER = "call.choreography.border"; //$NON-NLS-1$
- final static String CHOREOGRAPHY_MARKER = "choreography.marker"; //$NON-NLS-1$
- final static String CHOREOGRAPHY_MARKER_SHAPE = "choreography.marker.shape"; //$NON-NLS-1$
- final static String MESSAGE_REF_IDS = "choreography.message.ref.ids"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java
deleted file mode 100644
index 59e4ba29..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.choreography;
-
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.TEXT_H;
-
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ILayoutContext;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-
-public class LayoutChoreographyFeature extends DefaultLayoutBPMNShapeFeature {
-
- protected IPeService peService = Graphiti.getPeService();
- protected IGaService gaService = Graphiti.getGaService();
-
- public LayoutChoreographyFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canLayout(ILayoutContext context) {
- return BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), ChoreographyActivity.class) != null;
- }
-
- @Override
- public boolean layout(ILayoutContext context) {
- ContainerShape choreographyContainer = (ContainerShape) context.getPictogramElement();
- GraphicsAlgorithm parentGa = choreographyContainer.getGraphicsAlgorithm();
-
- int newWidth = parentGa.getWidth();
- int newHeight = parentGa.getHeight();
-
- for (Shape s : peService.getAllContainedShapes(choreographyContainer)) {
- String property = peService.getPropertyValue(s, ChoreographyProperties.CHOREOGRAPHY_NAME);
- if (property != null && new Boolean(property)) {
- GraphicsAlgorithm ga = s.getGraphicsAlgorithm();
- setTextLocation(choreographyContainer, (AbstractText) ga, newWidth, newHeight);
- }
- property = peService.getPropertyValue(s, ChoreographyProperties.CALL_CHOREO_BORDER);
- if (property != null && new Boolean(property)) {
- GraphicsAlgorithm ga = s.getGraphicsAlgorithm();
- gaService.setSize(ga, newWidth, newHeight);
- GraphicsUtil.sendToFront(s);
- }
- // use it when property editor supports enums
- // property = peService.getPropertyValue(s, ChoreographyProperties.CHOREOGRAPHY_MARKER_SHAPE);
- // if (property != null && new Boolean(property)) {
- // List<ContainerShape> bands = ChoreographyUtil.getParticipantBandContainerShapes(choreographyContainer);
- // List<ContainerShape> bottomBands = ChoreographyUtil.getTopAndBottomBands(bands).getSecond();
- // int x = (newWidth / 2) - (MARKER_H / 2);
- // int y = newHeight - MARKER_H;
- // if (!bottomBands.isEmpty()) {
- // ContainerShape b = bottomBands.get(0);
- // y = b.getGraphicsAlgorithm().getY() - MARKER_H;
- // }
- // gaService.setLocation(s.getGraphicsAlgorithm(), x, y);
- // }
- }
-
- return super.layout(context);
- }
-
- protected void setTextLocation(ContainerShape choreographyContainer, AbstractText text, int w, int h) {
- gaService.setLocationAndSize(text, 5, 5, w - 5, h);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java
deleted file mode 100644
index 07b9059c..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.choreography;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.choreography.messages"; //$NON-NLS-1$
- public static String UpdateChoreographyNameFeature_Name;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyNameFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyNameFeature.java
deleted file mode 100644
index 4709cd29..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyNameFeature.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.choreography;
-
-import java.util.Iterator;
-
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeService;
-
-public class UpdateChoreographyNameFeature extends AbstractUpdateFeature {
-
- private static final IPeService peService = Graphiti.getPeService();
-
- public UpdateChoreographyNameFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- return BusinessObjectUtil.containsElementOfType(context.getPictogramElement(), ChoreographyActivity.class);
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- ChoreographyActivity activity = (ChoreographyActivity) BusinessObjectUtil.getFirstElementOfType(
- context.getPictogramElement(), ChoreographyActivity.class);
- if (activity.getName().equals(getBodyText(context).getValue())) {
- return Reason.createFalseReason();
- } else {
- return Reason.createTrueReason(Messages.UpdateChoreographyNameFeature_Name);
- }
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- ChoreographyActivity task = (ChoreographyActivity) BusinessObjectUtil.getFirstElementOfType(
- context.getPictogramElement(), ChoreographyActivity.class);
- getBodyText(context).setValue(task.getName());
- return true;
- }
-
- private AbstractText getBodyText(IUpdateContext context) {
- Iterator<Shape> iterator = peService.getAllContainedShapes((ContainerShape) context.getPictogramElement())
- .iterator();
- while (iterator.hasNext()) {
- Shape shape = (Shape) iterator.next();
- String property = peService.getPropertyValue(shape, ChoreographyProperties.CHOREOGRAPHY_NAME);
- if (property != null && Boolean.parseBoolean(property)) {
- return (AbstractText) shape.getGraphicsAlgorithm();
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties
deleted file mode 100644
index f915b9b7..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties
+++ /dev/null
@@ -1 +0,0 @@
-UpdateChoreographyNameFeature_Name=Name is out of date
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java
deleted file mode 100644
index b10c27ae..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.command;
-
-public interface ICustomCommandFeature {
-
- public final static String COMMAND_HINT = "command.hint";
- boolean isAvailable(String hint);
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java
deleted file mode 100644
index 508e06c6..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.data;
-
-import org.eclipse.bpmn2.Choreography;
-import org.eclipse.bpmn2.Collaboration;
-import org.eclipse.bpmn2.FlowElement;
-import org.eclipse.bpmn2.FlowElementsContainer;
-import org.eclipse.bpmn2.ItemAwareElement;
-import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-
-public class MoveDataFeature extends DefaultMoveBPMNShapeFeature {
-
- public MoveDataFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- public boolean canMoveShape(IMoveShapeContext context) {
- EObject bo = BusinessObjectUtil.getBusinessObjectForPictogramElement(context.getShape());
- if (bo instanceof ItemAwareElement && bo instanceof FlowElement) {
- if (FeatureSupport.isValidDataTarget(context))
- return true;
- }
- return super.canMoveShape(context);
- }
-
- protected void postMoveShape(IMoveShapeContext context) {
- Shape shape = context.getShape();
- FlowElement dataElement = (FlowElement) BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
- ContainerShape sourceContainer = context.getSourceContainer();
- ContainerShape targetContainer = context.getTargetContainer();
- if (sourceContainer!=targetContainer) {
- EObject targetObject = BusinessObjectUtil.getBusinessObjectForPictogramElement(targetContainer);
- if (targetObject instanceof BPMNDiagram) {
- targetObject = ((BPMNDiagram)targetObject).getPlane().getBpmnElement();
- }
- if (targetObject instanceof Lane) {
- while (targetObject!=null) {
- targetObject = targetObject.eContainer();
- if (targetObject instanceof FlowElementsContainer)
- break;
- }
- }
- if (targetObject instanceof Collaboration && !(targetObject instanceof Choreography)) {
- Collaboration collaboration = (Collaboration)targetObject;
- for (Participant p : collaboration.getParticipants()) {
- if (p.getProcessRef()!=null) {
- targetObject = p.getProcessRef();
- break;
- }
- }
-
- }
- if (targetObject instanceof Participant) {
- targetObject = ((Participant)targetObject).getProcessRef();
- }
- if (targetObject instanceof FlowElementsContainer) {
- ((FlowElementsContainer)targetObject).getFlowElements().add(dataElement);
- }
- }
- super.postMoveShape(context);
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java
deleted file mode 100644
index bd0d0d0c..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.event.definitions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.CancelEventDefinition;
-import org.eclipse.bpmn2.CatchEvent;
-import org.eclipse.bpmn2.ConditionalEventDefinition;
-import org.eclipse.bpmn2.Event;
-import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.MessageEventDefinition;
-import org.eclipse.bpmn2.SignalEventDefinition;
-import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.ThrowEvent;
-import org.eclipse.bpmn2.TimerEventDefinition;
-import org.eclipse.bpmn2.Transaction;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.IExecutionInfo;
-import org.eclipse.graphiti.features.IFeature;
-import org.eclipse.graphiti.features.IFeatureAndContext;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.IContext;
-import org.eclipse.graphiti.features.context.impl.AddContext;
-import org.eclipse.graphiti.mm.algorithms.Polygon;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-
-public abstract class AbstractAddEventDefinitionFeature<T extends EventDefinition>
- extends AbstractBpmn2AddFeature<T> {
-
-
- public AbstractAddEventDefinitionFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canAdd(IAddContext context) {
- Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
- Object ed = context.getNewObject();
- if (bo instanceof Event && ed instanceof EventDefinition) {
- List<EClass> allowedItems = FeatureSupport.getAllowedEventDefinitions((Event) bo);
- if (allowedItems.contains(((EventDefinition)ed).eClass()))
- return true;
- }
- return false;
- }
-
- @Override
- public PictogramElement add(IAddContext context) {
- ContainerShape containerShape = context.getTargetContainer();
- T businessObject = getBusinessObject(context);
-
- // hook for subclasses to inject extra code
- decorateShape(context, containerShape, businessObject);
- return null;
- }
-
- protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject) {
- Event event = (Event) getBusinessObjectForPictogramElement(containerShape);
- draw(event, businessObject, containerShape);
- }
-
- public void draw(Event event, EventDefinition eventDef, ContainerShape container) {
- if (FeatureSupport.isLabelShape(container)) {
- // don't draw decorators on Labels
- return;
- }
-
- List<EventDefinition> eventDefinitions = ModelUtil.getEventDefinitions(event);
- int size = eventDefinitions.size();
-
- GraphicsUtil.deleteEventShape(container);
- if (size > 1) {
- Shape multipleShape = Graphiti.getPeService().createShape(container, false);
- drawForEvent(event, multipleShape);
- link(multipleShape, eventDefinitions.toArray(new EventDefinition[size]));
- } else {
- Shape addedShape = getDecorationAlgorithm(event).draw(container);
- if (addedShape==null) {
- addedShape = Graphiti.getPeService().createShape(container, false);
- GraphicsUtil.createEventNotAllowed(addedShape);
- }
- link(addedShape, eventDef);
- }
- }
-
- public abstract DecorationAlgorithm getDecorationAlgorithm(Event event);
-
- private void drawForEvent(Event event, Shape shape) {
- if(event instanceof CatchEvent && ((CatchEvent) event).isParallelMultiple()) {
- drawParallelMultiple(event, shape);
- } else {
- drawMultiple(event, shape);
- }
- }
-
- private void drawMultiple(Event event, Shape shape) {
- BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
- Polygon pentagon = GraphicsUtil.createEventPentagon(shape);
- if (event instanceof ThrowEvent) {
- StyleUtil.setFillStyle(pentagon, FillStyle.FILL_STYLE_FOREGROUND);
- } else {
- StyleUtil.setFillStyle(pentagon, FillStyle.FILL_STYLE_BACKGROUND);
- }
- StyleUtil.applyStyle(pentagon, be);
- }
-
- private void drawParallelMultiple(Event event, Shape shape) {
- BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
- Polygon cross = GraphicsUtil.createEventParallelMultiple(shape);
- StyleUtil.setFillStyle(cross, FillStyle.FILL_STYLE_BACKGROUND);
- StyleUtil.applyStyle(cross, be);
- }
-
- @Override
- public T getBusinessObject(IAddContext context) {
- Object businessObject = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (businessObject instanceof EventDefinition)
- return (T)businessObject;
- return (T)context.getNewObject();
- }
-
- @Override
- public void putBusinessObject(IAddContext context, T businessObject) {
- context.putProperty(ContextConstants.BUSINESS_OBJECT, businessObject);
- }
-
- @Override
- public void postExecute(IExecutionInfo executionInfo) {
- List<PictogramElement> pes = new ArrayList<PictogramElement>();
- for (IFeatureAndContext fc : executionInfo.getExecutionList()) {
- IContext context = fc.getContext();
- IFeature feature = fc.getFeature();
- if (context instanceof AddContext) {
- AddContext ac = (AddContext)context;
- pes.add(ac.getTargetContainer());
- }
- }
- getDiagramEditor().setPictogramElementsForSelection(pes.toArray(new PictogramElement[pes.size()]));
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java
deleted file mode 100644
index e0783cef..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.flow;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.flow.messages"; //$NON-NLS-1$
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddLabelFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddLabelFeature.java
deleted file mode 100644
index 63093aa1..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddLabelFeature.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.label;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.BoundaryEvent;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.impl.AbstractAddShapeFeature;
-import org.eclipse.graphiti.mm.algorithms.MultiText;
-import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-
-public class AddLabelFeature extends AbstractAddShapeFeature {
-
- public AddLabelFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canAdd(IAddContext context) {
- return FeatureSupport.isValidFlowElementTarget(context);
- }
-
- @Override
- public PictogramElement add(IAddContext context) {
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
-
- int width = (Integer) context.getProperty(ContextConstants.WIDTH);
- int height = (Integer) context.getProperty(ContextConstants.HEIGHT);
-
- int x = context.getX();
- int y = context.getY();
-
- BaseElement baseElement = (BaseElement) context.getProperty(ContextConstants.BUSINESS_OBJECT);
-
- ContainerShape targetContainer = getTargetContainer(context);
- PictogramElement labelOwner = (PictogramElement) context.getProperty(ContextConstants.LABEL_OWNER);
- final ContainerShape textContainerShape = peService.createContainerShape(targetContainer, true);
- gaService.createInvisibleRectangle(textContainerShape);
-
- Shape textShape = peService.createShape(textContainerShape, false);
- peService.setPropertyValue(textShape, UpdateLabelFeature.TEXT_ELEMENT, Boolean.toString(true));
- String name = ModelUtil.getDisplayName(baseElement);
- MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, name);
- StyleUtil.applyStyle(text, baseElement);
- text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
- link(textShape, baseElement);
-
- // Boundary events get a different add context, so use the context coodinates relative
- if ( (baseElement instanceof BoundaryEvent) && !isImport(context) ){
- x = context.getTargetContainer().getGraphicsAlgorithm().getX() + context.getX()-width/2;
- y = context.getTargetContainer().getGraphicsAlgorithm().getY() + context.getY()-height/2;
- }
-
- GraphicsUtil.alignWithShape(text, textContainerShape, width, height, x, y, 0, 0);
-
- // if this label has an owner, link the two to each other
- if (labelOwner!=null) {
- link(labelOwner, new Object[] {textContainerShape});
- link(textContainerShape, new Object[] {baseElement, labelOwner});
- }
- else {
- link(textContainerShape, baseElement);
- }
-
- Graphiti.getPeService().setPropertyValue(textContainerShape, GraphicsUtil.LABEL_PROPERTY, "true"); //$NON-NLS-1$
-
- updatePictogramElement(textContainerShape);
- layoutPictogramElement(textContainerShape);
-
- return textContainerShape;
- }
-
- private boolean isImport(IAddContext context) {
- return context.getProperty(DIImport.IMPORT_PROPERTY) == null ? false : (Boolean) context.getProperty(DIImport.IMPORT_PROPERTY);
- }
-
- /**
- * Get the correct target control, boundary events need special handling, because we need to find a parent,
- * where the label is visible.
- *
- * @param context
- * @return the target control for the current context
- */
- ContainerShape getTargetContainer(IAddContext context) {
- boolean isBoundary = context.getProperty(ContextConstants.BUSINESS_OBJECT) instanceof BoundaryEvent;
-
- if ( isBoundary && !isImport(context) ){
- if (context.getTargetContainer()!=null){
- return context.getTargetContainer().getContainer();
- }
- }
- return context.getTargetContainer();
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java
deleted file mode 100644
index 2dd01e3b..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.label;
-
-import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IResizeShapeFeature;
-import org.eclipse.graphiti.features.context.ILayoutContext;
-import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
-import org.eclipse.graphiti.features.impl.AbstractLayoutFeature;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-
-public class LayoutLabelFeature extends AbstractLayoutFeature {
-
- public LayoutLabelFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canLayout(ILayoutContext context) {
-// Object bo = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), BaseElement.class);
-// return bo != null && bo instanceof Activity;
- // TODO Auto-generated method stub
-// return false;
- return true;
- }
-
- @Override
- public boolean layout(ILayoutContext context) {
- PictogramElement pictogramElement = context.getPictogramElement();
- SubProcess subProcess = BusinessObjectUtil.getFirstElementOfType(pictogramElement, SubProcess.class);
- if (subProcess!=null && pictogramElement instanceof ContainerShape) {
- try {
- ContainerShape containerShape = (ContainerShape)pictogramElement;
- BPMNShape shape = DIUtils.findBPMNShape(subProcess);
-
- if (shape.isIsExpanded()) {
-
- // SubProcess is expanded
-
- boolean needResize = false;
- GraphicsAlgorithm parentGa = containerShape.getGraphicsAlgorithm();
-
- for (PictogramElement pe : FeatureSupport.getContainerChildren(containerShape)) {
- GraphicsAlgorithm ga = pe.getGraphicsAlgorithm();
- if (ga!=null) {
- if (ga.getX() < 0 || ga.getY() < 0) {
- needResize = true;
- break;
- }
- if (ga.getX() + ga.getWidth() > parentGa.getWidth()) {
- needResize = true;
- break;
- }
- if (ga.getY() + ga.getHeight() > parentGa.getHeight()) {
- needResize = true;
- break;
- }
- }
- }
- if (needResize) {
- ResizeShapeContext resizeContext = new ResizeShapeContext(containerShape);
- resizeContext.setX(parentGa.getX());
- resizeContext.setY(parentGa.getY());
- resizeContext.setWidth(parentGa.getWidth());
- resizeContext.setHeight(parentGa.getHeight());
- IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(resizeContext);
- resizeFeature.resizeShape(resizeContext);
- }
-
- FeatureSupport.setContainerChildrenVisible(containerShape, true);
- }
- else {
-
- // SubProcess is collapsed
-
- FeatureSupport.setContainerChildrenVisible(containerShape, false);
- }
-
- } catch (Exception e) {
- // It's OK, I've played a programmer before...
- // e.printStackTrace();
- }
- }
- return true;
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java
deleted file mode 100644
index 73e45cbb..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.label;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.label.messages"; //$NON-NLS-1$
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-
- public static String UpdateLabelFeature_Label;
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveLabelFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveLabelFeature.java
deleted file mode 100644
index 93e6972a..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveLabelFeature.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.label;
-
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
-import org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-
-public class MoveLabelFeature extends DefaultMoveShapeFeature {
-
- public MoveLabelFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public void moveShape(IMoveShapeContext context) {
- // if this Label Shape is part of a multiselection, and if its owner is included
- // in that multiselection, then do not move the label. Moving the label is
- // already handled by the label's owner.
- PictogramElement pes[] = getFeatureProvider().getDiagramTypeProvider().
- getDiagramBehavior().getDiagramContainer().getSelectedPictogramElements();
- Shape shape = context.getShape();
- for (PictogramElement pe : pes) {
- ContainerShape s = BusinessObjectUtil.getFirstElementOfType(pe, ContainerShape.class);
- if (s==shape)
- return;
- }
- super.moveShape(context);
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java
deleted file mode 100644
index 3f118fc2..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.label;
-
-import static org.eclipse.bpmn2.modeler.core.utils.FeatureSupport.getChildElementOfType;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-
-public class UpdateLabelFeature extends AbstractUpdateFeature {
-
- public static final String TEXT_ELEMENT = "baseelement.text"; //$NON-NLS-1$
-
- public UpdateLabelFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- BaseElement.class);
- if (element == null) {
- return false;
- }
- return ModelUtil.hasName(element);
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- PictogramElement container = context.getPictogramElement();
-
- BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(container,
- BaseElement.class);
-
- Shape textShape = getChildElementOfType(container, TEXT_ELEMENT, Boolean.toString(true), Shape.class);
- if (textShape!=null) {
- String oldLabel = ModelUtil.getName(element);
- if (oldLabel==null || oldLabel.isEmpty())
- oldLabel = ""; //$NON-NLS-1$
- String newLabel = ""; //$NON-NLS-1$
- if (textShape.getGraphicsAlgorithm() instanceof AbstractText) {
- AbstractText text = (AbstractText) textShape.getGraphicsAlgorithm();
- newLabel = text.getValue();
- }
- if (newLabel==null || newLabel.isEmpty())
- newLabel = ""; //$NON-NLS-1$
-
- if (!oldLabel.equals(newLabel))
- return Reason.createTrueReason(Messages.UpdateLabelFeature_Label);
- }
- return Reason.createFalseReason();
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- PictogramElement pe = (PictogramElement) context.getPictogramElement();
- BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- BaseElement.class);
- Shape textShape = getChildElementOfType(pe, TEXT_ELEMENT, Boolean.toString(true), Shape.class);
- if (textShape!=null) {
- AbstractText text = (AbstractText) textShape.getGraphicsAlgorithm();
- String name = ModelUtil.getName(element);
- if (name == null) {
- name = ""; //$NON-NLS-1$
- }
- text.setValue(name);
-
- // TODO: figure out why this causes the undo stack to be flushed if Text old value == new value
- layoutPictogramElement(context.getPictogramElement());
- }
-
- if (pe instanceof ContainerShape) {
- IGaService gaService = Graphiti.getGaService();
- ContainerShape container = (ContainerShape)pe;
-
- Shape shape = container.getChildren().get(0); // Otherwise, this would never be reached!
- if (!(shape.getGraphicsAlgorithm() instanceof AbstractText))
- return true;
-
- GraphicsAlgorithm textGA = container.getGraphicsAlgorithm();
- AbstractText text = (AbstractText) shape.getGraphicsAlgorithm();
-
- int oldWidth = textGA.getWidth() - GraphicsUtil.SHAPE_PADDING;
- int x = textGA.getX() + ((oldWidth + GraphicsUtil.SHAPE_PADDING) / 2);
- int y = textGA.getY();
-
- BaseElement o = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), BaseElement.class);
- String name = ModelUtil.getName(o);
-
- if (name == null) {
- gaService.setLocationAndSize(textGA, x, y, 0, 0);
- gaService.setLocationAndSize(text, 0, 0, 0, 0);
- container.setVisible(false);
- } else {
- int newWidth = GraphicsUtil.getLabelWidth(text);
- int newHeight = GraphicsUtil.getLabelHeight(text);
- x = x - ((newWidth + GraphicsUtil.SHAPE_PADDING) / 2);
- gaService.setLocationAndSize(textGA, x, y, newWidth + GraphicsUtil.SHAPE_PADDING, newHeight + GraphicsUtil.SHAPE_PADDING);
- gaService.setLocationAndSize(text, 0, 0, newWidth + GraphicsUtil.TEXT_PADDING, newHeight + GraphicsUtil.TEXT_PADDING);
- container.setVisible(true);
- }
- }
-
- return true;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties
deleted file mode 100644
index 43f21d1c..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties
+++ /dev/null
@@ -1 +0,0 @@
-UpdateLabelFeature_Label=Label changed
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/LayoutLaneFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/LayoutLaneFeature.java
deleted file mode 100644
index c881c52b..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/LayoutLaneFeature.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ILayoutContext;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-
-public class LayoutLaneFeature extends DefaultLayoutBPMNShapeFeature {
-
- public LayoutLaneFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canLayout(ILayoutContext context) {
- return FeatureSupport.isLane(context.getPictogramElement());
- }
-
- @Override
- public boolean layout(ILayoutContext context) {
- FeatureSupport.redraw((ContainerShape) context.getPictogramElement());
- DIUtils.updateDIShape(context.getPictogramElement());
-
- return super.layout(context);
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/Messages.java
deleted file mode 100644
index 046a5fa0..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/Messages.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.lane.messages"; //$NON-NLS-1$
- public static String DirectEditLaneFeature_Invalid_Empty;
- public static String DirectEditLaneFeature_Invalid_Linebreak;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToDiagramFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToDiagramFeature.java
deleted file mode 100644
index 0a5c833d..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToDiagramFeature.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import java.io.IOException;
-
-import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.LaneSet;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
-
-public class MoveFromParticipantToDiagramFeature extends MoveLaneFeature {
-
- public MoveFromParticipantToDiagramFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canMoveShape(IMoveShapeContext context) {
- return true;
- }
-
- @Override
- protected void internalMove(IMoveShapeContext context) {
- modifyModelStructure(context);
- FeatureSupport.redraw(context.getSourceContainer());
- }
-
- private void modifyModelStructure(IMoveShapeContext context) {
- Lane movedLane = getMovedLane(context);
- Participant sourceParticipant = (Participant) getBusinessObjectForPictogramElement(context.getSourceContainer());
- Participant internalParticipant = null;
-
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- internalParticipant = handler.getInternalParticipant();
- handler.moveLane(movedLane, internalParticipant);
- } catch (IOException e) {
- Activator.logError(e);
- }
-
- LaneSet laneSet = null;
- for (LaneSet set : sourceParticipant.getProcessRef().getLaneSets()) {
- if (set.getLanes().contains(movedLane)) {
- laneSet = set;
- break;
- }
- }
-
- if (laneSet != null) {
- laneSet.getLanes().remove(movedLane);
- if (laneSet.getLanes().isEmpty()) {
- sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
- }
-
- Process process = internalParticipant.getProcessRef();
- if (process.getLaneSets().isEmpty()) {
- LaneSet createLaneSet = Bpmn2ModelerFactory.create(LaneSet.class);
-// createLaneSet.setId(EcoreUtil.generateUUID());
- process.getLaneSets().add(createLaneSet);
- ModelUtil.setID(createLaneSet);
- }
- process.getLaneSets().get(0).getLanes().add(movedLane);
- }
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToLaneFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToLaneFeature.java
deleted file mode 100644
index 9c7b68f0..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToLaneFeature.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import java.io.IOException;
-
-import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.LaneSet;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-
-public class MoveFromParticipantToLaneFeature extends MoveLaneFeature {
-
- public MoveFromParticipantToLaneFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canMoveShape(IMoveShapeContext context) {
- Lane movedLane = getMovedLane(context);
- boolean moveableHasFlowNodes = movedLane.getFlowNodeRefs().size() > 0;
-
- Lane targetLane = getTargetLane(context);
- boolean targetHasFlowNodeRefs = targetLane.getFlowNodeRefs().size() > 0;
-
- if (!moveableHasFlowNodes && !targetHasFlowNodeRefs) {
- return true;
- }
-
- return moveableHasFlowNodes ^ targetHasFlowNodeRefs;
- }
-
- @Override
- protected void internalMove(IMoveShapeContext context) {
- modifyModelStructure(context);
- FeatureSupport.redraw(context.getSourceContainer());
- FeatureSupport.redraw(context.getTargetContainer());
- }
-
- private Lane getTargetLane(IMoveShapeContext context) {
- ContainerShape targetContainer = context.getTargetContainer();
- return (Lane) getBusinessObjectForPictogramElement(targetContainer);
- }
-
- private void modifyModelStructure(IMoveShapeContext context) {
- Lane movedLane = getMovedLane(context);
- Lane toLane = getTargetLane(context);
-
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- Participant participant = handler.getParticipant(toLane);
- handler.moveLane(movedLane, participant);
- } catch (IOException e) {
- Activator.logError(e);
- }
-
- Participant sourceParticipant = (Participant) getBusinessObjectForPictogramElement(context.getSourceContainer());
-
- LaneSet laneSet = null;
- for (LaneSet set : sourceParticipant.getProcessRef().getLaneSets()) {
- if (set.getLanes().contains(movedLane)) {
- laneSet = set;
- break;
- }
- }
-
- if (laneSet != null) {
- laneSet.getLanes().remove(movedLane);
- if (laneSet.getLanes().isEmpty()) {
- sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
- }
- }
-
- if (toLane.getChildLaneSet() == null) {
- LaneSet createLaneSet = Bpmn2ModelerFactory.create(LaneSet.class);
-// createLaneSet.setId(EcoreUtil.generateUUID());
- toLane.setChildLaneSet(createLaneSet);
- ModelUtil.setID(createLaneSet);
- }
- toLane.getChildLaneSet().getLanes().add(movedLane);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveLaneFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveLaneFeature.java
deleted file mode 100644
index 415e1385..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveLaneFeature.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
-
-public class MoveLaneFeature extends DefaultMoveBPMNShapeFeature {
-
- private MoveLaneFeature moveStrategy;
-
- public MoveLaneFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canMoveShape(IMoveShapeContext context) {
- if (context.getSourceContainer() == null) {
- return false;
- }
-
- moveStrategy = getStrategy(context);
-
- if (moveStrategy == null) {
- return super.canMoveShape(context);
- }
-
- return moveStrategy.canMoveShape(context);
- }
-
- @Override
- protected void internalMove(IMoveShapeContext context) {
- super.internalMove(context);
- if (moveStrategy != null) {
- moveStrategy.internalMove(context);
- }
- }
-
- private MoveLaneFeature getStrategy(IMoveShapeContext context) {
-
- if (context.getSourceContainer().equals(getDiagram())) { // from diagram
-
- if (FeatureSupport.isTargetLane(context)) { // to lane
- return new MoveFromDiagramToLaneFeature(getFeatureProvider());
- } else if (FeatureSupport.isTargetParticipant(context)) { // to participant
- return new MoveFromDiagramToParticipantFeature(getFeatureProvider());
- }
-
- } else if (FeatureSupport.isLane(context.getSourceContainer())) { // from lane
-
- if (context.getTargetContainer().equals(getDiagram())) { // to diagram
- return new MoveFromLaneToDiagramFeature(getFeatureProvider());
- } else if (FeatureSupport.isTargetLane(context)) { // to another lane
- return new MoveFromLaneToLaneFeature(getFeatureProvider());
- } else if (FeatureSupport.isTargetParticipant(context)) { // to participant
- return new MoveFromLaneToParticipantFeature(getFeatureProvider());
- }
-
- } else if (FeatureSupport.isParticipant(context.getSourceContainer())) { // from participant
-
- if (context.getTargetContainer().equals(getDiagram())) { // to diagram
- return new MoveFromParticipantToDiagramFeature(getFeatureProvider());
- } else if (FeatureSupport.isTargetLane(context)) { // to another lane
- return new MoveFromParticipantToLaneFeature(getFeatureProvider());
- } else if (FeatureSupport.isTargetParticipant(context)) { // to another participant
- return new MoveFromParticipantToParticipantFeature(getFeatureProvider());
- }
- }
-
- return null;
- }
-
- protected Lane getMovedLane(IMoveShapeContext context) {
- return (Lane) getBusinessObjectForPictogramElement(context.getShape());
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/messages.properties
deleted file mode 100644
index 7b3f4e41..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-DirectEditLaneFeature_Invalid_Empty=Please enter a descriptive name.
-DirectEditLaneFeature_Invalid_Linebreak=Line breakes are not allowed.
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties
deleted file mode 100644
index 23d265c5..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-AbstractBpmn2CreateConnectionFeature_Create=Create {0}
-AbstractBpmn2CreateFeature_Create=Create {0}
-AbstractUpdateBaseElementFeature_Name=Name out of date
-BPMNDiagramFeatureContainer_Disable_Enable_Description=
-BPMNDiagramFeatureContainer_Disable_Name=Disable automatic Connection Routing
-BPMNDiagramFeatureContainer_Enable_Name=Enable automatic Connection Routing
-BPMNDiagramFeatureContainer_Reroute_All_Description=Re-route all connections in the current diagram using the selected routing strategy
-BPMNDiagramFeatureContainer_Reroute_All_Name=Re-route all Connections
-ShowPropertiesFeature_Name=Show Properties
-ShowPropertiesFeature_Title=Display a Property configuration popup dialog for the selected item
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/LayoutParticipantFeature.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/LayoutParticipantFeature.java
deleted file mode 100644
index c500e96b..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/LayoutParticipantFeature.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.participant;
-
-import java.util.Iterator;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.graphiti.datatypes.IDimension;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ILayoutContext;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.Polyline;
-import org.eclipse.graphiti.mm.algorithms.Text;
-import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
-import org.eclipse.graphiti.mm.algorithms.styles.Point;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-
-public class LayoutParticipantFeature extends DefaultLayoutBPMNShapeFeature {
-
- public LayoutParticipantFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canLayout(ILayoutContext context) {
- Object bo = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), BaseElement.class);
- return bo != null && bo instanceof Participant;
- }
-
- @Override
- public boolean layout(ILayoutContext context) {
- ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
-
- GraphicsAlgorithm containerGa = containerShape.getGraphicsAlgorithm();
- IGaService gaService = Graphiti.getGaService();
-
- boolean horz = FeatureSupport.isHorizontal(containerShape);
-
- int containerHeight = containerGa.getHeight();
- int containerWidth = containerGa.getWidth();
- Iterator<Shape> iterator = containerShape.getChildren().iterator();
- while (iterator.hasNext()) {
- Shape shape = iterator.next();
- GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
- IDimension size = gaService.calculateSize(ga);
-
- if (ga instanceof Polyline) {
- Polyline line = (Polyline) ga;
- Point p0 = line.getPoints().get(0);
- Point p1 = line.getPoints().get(1);
- if (horz) {
- p0.setX(30); p0.setY(0);
- p1.setX(30); p1.setY(containerHeight);
- }
- else {
- p0.setX(0); p0.setY(30);
- p1.setX(containerWidth); p1.setY(30);
- }
- } else if (ga instanceof Text) {
- if (horz) {
- Text text = (Text)ga;
- text.setAngle(-90);
- gaService.setLocationAndSize(ga, 5, 0, 15, containerHeight);
- }
- else {
- Text text = (Text)ga;
- text.setAngle(0);
- gaService.setLocationAndSize(ga, 0, 5, containerWidth, 15);
- }
- }
- }
-
- Shape shape = FeatureSupport.getShape(containerShape, UpdateParticipantMultiplicityFeature.MULTIPLICITY_MARKER,
- Boolean.toString(true));
- if (shape != null) {
- GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
- int x = (containerGa.getWidth() / 2) - 10;
- int y = containerGa.getHeight() - 20;
- gaService.setLocation(ga, x, y);
- }
-
- DIUtils.updateDIShape(containerShape);
-
- // make sure this Pool does not obscure any of its contained shapes
- GraphicsUtil.sendToBack(containerShape);
-
- return super.layout(context);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/Messages.java
deleted file mode 100644
index 3124b880..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/Messages.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.features.participant;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.participant.messages"; //$NON-NLS-1$
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-
- public static String DirectEditParticipantFeature_Invalid_Empty;
- public static String DirectEditParticipantFeature_Invalid_Linebreak;
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/messages.properties
deleted file mode 100644
index 14e5782b..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-DirectEditParticipantFeature_Invalid_Empty=Please enter descriptive name.
-DirectEditParticipantFeature_Invalid_Linebreak=Line breakes are not allowed.
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java
deleted file mode 100644
index 70a1559a..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.merrimac.providers;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.merrimac.providers.messages"; //$NON-NLS-1$
- public static String TableCursor_Edit;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties
deleted file mode 100644
index 7f164701..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties
+++ /dev/null
@@ -1 +0,0 @@
-TableCursor_Edit=Edit field
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties
deleted file mode 100644
index b86bfd8f..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-Bpmn2ModelerResourceImpl_Illegal_QName=Illegal QName: {0}
-Bpmn2ModelerResourceImpl_Invalid_Reference=Invalid or unknown reference from object:\n {0}\nfeature:\n {1}\nto:\n {2}
-Bpmn2ModelerResourceSetImpl_Loading_Error_Message=Loading Resource {0} failed\!\nCause: {1}
-Bpmn2ModelerResourceSetImpl_Loading_Error=Cannot load Resource
-Bpmn2ModelerResourceSetImpl_Loading_Resource_Not_Found=Resource not found
-Bpmn2ModelerResourceSetImpl_Loading_Title=Loading Resource
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java
deleted file mode 100644
index 5ac3c4ac..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.preferences;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.preferences.messages"; //$NON-NLS-1$
- public static String Bpmn2Preferences_No_Runtime_Plugin_Title;
- public static String Bpmn2Preferences_Activities;
- public static String Bpmn2Preferences_Always_False;
- public static String Bpmn2Preferences_Always_true;
- public static String Bpmn2Preferences_Check_Project_Nature;
- public static String Bpmn2Preferences_Use_Popup_Dialog_For_Lists;
- public static String Bpmn2Preferences_Config_Dialog;
- public static String Bpmn2Preferences_Containers;
- public static String Bpmn2Preferences_Data_Items;
- public static String Bpmn2Preferences_Do_Core_Validation;
- public static String Bpmn2Preferences_Propagate_Group_Categories;
- public static String Bpmn2Preferences_Allow_Mutliple_Connections;
- public static String Bpmn2Preferences_Event_Definitions;
- public static String Bpmn2Preferences_Events;
- public static String Bpmn2Preferences_Expand;
- public static String Bpmn2Preferences_False_if_not_set;
- public static String Bpmn2Preferences_Gateways;
- public static String Bpmn2Preferences_Horizontal;
- public static String Bpmn2Preferences_Marker_Visible;
- public static String Bpmn2Preferences_Message_Visible;
- public static String Bpmn2Preferences_No_Runtime_Plugin_Message;
- public static String Bpmn2Preferences_None;
- public static String Bpmn2Preferences_Show_Advanced_Properties;
- public static String Bpmn2Preferences_Show_Descriptions;
- public static String Bpmn2Preferences_Show_ID_Attribute;
- public static String Bpmn2Preferences_Simplify_Lists;
- public static String Bpmn2Preferences_Target_Runtime;
- public static String Bpmn2Preferences_Timeout;
- public static String Bpmn2Preferences_True_if_not_set;
- public static String ToolEnablementPreferences_BPMN_Extensions;
- public static String ToolEnablementPreferences_Target_Extensions;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java
deleted file mode 100644
index dac5719c..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.core.preferences;
-
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.graphiti.mm.algorithms.styles.Font;
-import org.eclipse.graphiti.mm.algorithms.styles.StylesFactory;
-import org.eclipse.graphiti.mm.algorithms.styles.StylesPackage;
-import org.eclipse.graphiti.util.ColorConstant;
-import org.eclipse.graphiti.util.ColorUtil;
-import org.eclipse.graphiti.util.IColorConstant;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * @author Bob Brodt
- *
- */
-public class ShapeStyle {
-
- public static IColorConstant DEFAULT_COLOR = new ColorConstant(212, 231, 248);
- public static String DEFAULT_FONT_STRING = "arial,10,-,-"; //$NON-NLS-1$
- public static enum RoutingStyle { ManualBendpoint, AutomaticBendpoint, Manhattan};
- IColorConstant shapeBackground;
- IColorConstant shapePrimarySelectedColor;
- IColorConstant shapeSecondarySelectedColor;
- IColorConstant shapeForeground;
- Font textFont;
- IColorConstant textColor;
- RoutingStyle routingStyle = RoutingStyle.Manhattan;
- boolean defaultSize;
- boolean dirty;
-
- public ShapeStyle() {
- setDefaultColors(DEFAULT_COLOR);
- textFont = stringToFont(DEFAULT_FONT_STRING);
- }
-
- public ShapeStyle(ShapeStyle other) {
- this(encode(other));
- }
-
- public ShapeStyle(String foreground, String background, String textColor, String font) {
- // only background color is required to set up default color scheme
- shapeBackground = stringToColor(background);
- setDefaultColors(shapeBackground);
-
- // optional:
- if (foreground!=null && !foreground.isEmpty())
- shapeForeground = stringToColor(foreground);
- if (textColor!=null && !textColor.isEmpty())
- this.textColor = stringToColor(textColor);
- if (font==null || font.isEmpty())
- font = DEFAULT_FONT_STRING;
- textFont = stringToFont(font);
- defaultSize = false;
- }
-
- protected ShapeStyle(String s) {
- String[] a = s.trim().split(";"); //$NON-NLS-1$
- if (a.length>0)
- shapeBackground = stringToColor(a[0]);
- if (a.length>1)
- shapePrimarySelectedColor = stringToColor(a[1]);
- if (a.length>2)
- shapeSecondarySelectedColor = stringToColor(a[2]);
- if (a.length>3)
- shapeForeground = stringToColor(a[3]);
- if (a.length>4)
- textFont = stringToFont(a[4]);
- if (a.length>5)
- textColor = stringToColor(a[5]);
- if (a.length>6)
- defaultSize = stringToBoolean(a[6]);
- else
- defaultSize = false;
- if (a.length>7) {
- try {
- routingStyle = RoutingStyle.valueOf(a[7]);
- }
- catch (Exception e) {
- routingStyle = RoutingStyle.ManualBendpoint;
- }
- }
- else
- routingStyle = RoutingStyle.ManualBendpoint;
- }
-
- public void setDefaultColors(IColorConstant defaultColor) {
- setShapeBackground(defaultColor);
- setShapePrimarySelectedColor(StyleUtil.shiftColor(defaultColor, 32));
- setShapeSecondarySelectedColor(StyleUtil.shiftColor(defaultColor, -32));
- setShapeForeground(StyleUtil.shiftColor(defaultColor, -128));
- setTextColor(StyleUtil.shiftColor(defaultColor, -128));
- }
-
- public boolean isDirty() {
- return dirty;
- }
-
- public void setDirty(boolean dirty) {
- this.dirty = dirty;
- }
-
- public IColorConstant getShapeBackground() {
- return shapeBackground;
- }
-
- public void setShapeBackground(IColorConstant shapeDefaultColor) {
- if (!compare(this.shapeBackground, shapeDefaultColor)) {
- this.shapeBackground = shapeDefaultColor;
- setDirty(true);
- }
- }
-
- public IColorConstant getShapePrimarySelectedColor() {
- return shapePrimarySelectedColor;
- }
-
- public void setShapePrimarySelectedColor(IColorConstant shapePrimarySelectedColor) {
- if (!compare(this.shapePrimarySelectedColor, shapePrimarySelectedColor)) {
- this.shapePrimarySelectedColor = shapePrimarySelectedColor;
- setDirty(true);
- }
- }
-
- public IColorConstant getShapeSecondarySelectedColor() {
- return shapeSecondarySelectedColor;
- }
-
- public void setShapeSecondarySelectedColor(IColorConstant shapeSecondarySelectedColor) {
- if (!compare(this.shapeSecondarySelectedColor, shapeSecondarySelectedColor)) {
- this.shapeSecondarySelectedColor = shapeSecondarySelectedColor;
- setDirty(true);
- }
- }
-
- public IColorConstant getShapeForeground() {
- return shapeForeground;
- }
-
- public void setShapeForeground(IColorConstant shapeBorderColor) {
- if (!compare(this.shapeForeground, shapeBorderColor)) {
- this.shapeForeground = shapeBorderColor;
- setDirty(true);
- }
- }
-
- public Font getTextFont() {
- return textFont;
- }
-
- public void setTextFont(Font textFont) {
- if (!compare(this.textFont, textFont)) {
- this.textFont = textFont;
- setDirty(true);
- }
- }
-
- public IColorConstant getTextColor() {
- return textColor;
- }
-
- public void setTextColor(IColorConstant textColor) {
- if (!compare(this.textColor, textColor)) {
- this.textColor = textColor;
- setDirty(true);
- }
- }
-
- public RoutingStyle getRoutingStyle() {
- return routingStyle;
- }
-
- public void setRoutingStyle(RoutingStyle routingStyle) {
- if (this.routingStyle != routingStyle) {
- this.routingStyle = routingStyle;
- setDirty(true);
- }
- }
-
-
- public boolean isDefaultSize() {
- return defaultSize;
- }
-
- public void setDefaultSize(boolean b) {
- if (defaultSize != b) {
- defaultSize = b;
- setDirty(true);
- }
- }
-
- public static String colorToString(IColorConstant c) {
- return new String(
- String.format("%02X",c.getRed()) + //$NON-NLS-1$
- String.format("%02X",c.getGreen()) + //$NON-NLS-1$
- String.format("%02X",c.getBlue()) //$NON-NLS-1$
- );
- }
-
- public static IColorConstant stringToColor(String s) {
- if (s.contains(",")) { //$NON-NLS-1$
- String[] a = s.split(","); //$NON-NLS-1$
- int r = Integer.parseInt(a[0]);
- int g = Integer.parseInt(a[1]);
- int b = Integer.parseInt(a[2]);
- return new ColorConstant(r, g, b);
- }
- if (s.length()<6)
- return new ColorConstant(0,0,0);
- return new ColorConstant(
- ColorUtil.getRedFromHex(s),
- ColorUtil.getGreenFromHex(s),
- ColorUtil.getBlueFromHex(s)
- );
- }
-
- public static String booleanToString(boolean b) {
- return b ? "1" : "0"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static boolean stringToBoolean(String s) {
- return "1".equals(s); //$NON-NLS-1$
- }
-
- public static RGB colorToRGB(IColorConstant c) {
- return new RGB(c.getRed(),c.getGreen(),c.getBlue());
- }
-
- public static IColorConstant RGBToColor(RGB rgb) {
- return new ColorConstant(rgb.red, rgb.green, rgb.blue);
- }
-
- public static String fontToString(Font f) {
- return new String(
- f.getName() + "," + //$NON-NLS-1$
- f.getSize() + "," + //$NON-NLS-1$
- (f.isItalic() ? "I" : "-") + "," + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- (f.isBold() ? "B" : "-") //$NON-NLS-1$ //$NON-NLS-2$
- );
- }
-
- public static Font stringToFont(String s) {
- String[] a = s.split(","); //$NON-NLS-1$
- Font f = StylesFactory.eINSTANCE.createFont();
- f.eSet(StylesPackage.eINSTANCE.getFont_Name(), a[0]);
- f.eSet(StylesPackage.eINSTANCE.getFont_Size(), Integer.valueOf(a[1]));
- f.eSet(StylesPackage.eINSTANCE.getFont_Italic(), a[2].equals("I")); //$NON-NLS-1$
- f.eSet(StylesPackage.eINSTANCE.getFont_Bold(), a[3].equals("B")); //$NON-NLS-1$
- return f;
- }
-
- public static FontData fontToFontData(Font f) {
- int style = 0;
- if (f.isItalic())
- style |= SWT.ITALIC;
- if (f.isBold())
- style |= SWT.BOLD;
- return new FontData(f.getName(), f.getSize(), style);
- }
-
- public static Font fontDataToFont(FontData fd) {
- Font f = StylesFactory.eINSTANCE.createFont();
- f.eSet(StylesPackage.eINSTANCE.getFont_Name(),fd.getName());
- f.eSet(StylesPackage.eINSTANCE.getFont_Size(), fd.getHeight());
- f.eSet(StylesPackage.eINSTANCE.getFont_Italic(), (fd.getStyle() & SWT.ITALIC)!=0);
- f.eSet(StylesPackage.eINSTANCE.getFont_Bold(), (fd.getStyle() & SWT.BOLD)!=0);
- return f;
- }
-
- public static String encode(ShapeStyle sp) {
- if (sp==null)
- return encode(new ShapeStyle());
- return new String(
- colorToString(sp.shapeBackground) + ";" + //$NON-NLS-1$
- colorToString(sp.shapePrimarySelectedColor) + ";" + //$NON-NLS-1$
- colorToString(sp.shapeSecondarySelectedColor) + ";" + //$NON-NLS-1$
- colorToString(sp.shapeForeground) + ";" + //$NON-NLS-1$
- fontToString(sp.textFont) + ";" + //$NON-NLS-1$
- colorToString(sp.textColor) + ";" + //$NON-NLS-1$
- booleanToString(sp.defaultSize) + ";" + //$NON-NLS-1$
- sp.routingStyle.name()
- );
- }
-
- public static ShapeStyle decode(String s) {
- if (s==null || s.trim().split(";").length<6) //$NON-NLS-1$
- return new ShapeStyle();
- return new ShapeStyle(s);
- }
-
- public static boolean compare(IColorConstant c1, IColorConstant c2) {
- if (c1==c2)
- return true;
- if (c1==null || c2==null)
- return false;
- return c1.getRed() == c2.getRed() &&
- c1.getGreen() == c2.getGreen() &&
- c1.getBlue() == c2.getBlue();
- }
-
- public static boolean compare(Font f1, Font f2) {
- String s1 = fontToString(f1);
- String s2 = fontToString(f2);
- return s1.equals(s2);
- }
-
- public static boolean compare(ShapeStyle s1, ShapeStyle s2) {
- return
- compare(s1.shapeBackground, s2.shapeBackground) ||
- compare(s1.shapePrimarySelectedColor, s2.shapePrimarySelectedColor) ||
- compare(s1.shapeSecondarySelectedColor, s2.shapeSecondarySelectedColor) ||
- compare(s1.shapeForeground, s2.shapeForeground) ||
- compare(s1.textFont, s2.textFont) ||
- compare(s1.textColor, s2.textColor) ||
- (s1.defaultSize != s2.defaultSize);
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java
deleted file mode 100644
index e65f8ea5..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.bpmn2.modeler.core.runtime;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.runtime.messages"; //$NON-NLS-1$
- public static String ModelExtensionDescriptor_Create;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java
deleted file mode 100644
index 74bcb7f9..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.runtime;
-
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-public class ModelDescriptor extends BaseRuntimeDescriptor {
-
- protected EPackage ePackage;
- protected EFactory eFactory;
- protected ResourceFactoryImpl resourceFactory;
-
- public EFactory getEFactory() {
- return eFactory;
- }
-
- public ResourceFactoryImpl getResourceFactory() {
- return resourceFactory;
- }
-
- public EPackage getEPackage() {
- return ePackage;
- }
-
- public void setEPackage(EPackage ePackage) {
- this.ePackage = ePackage;
- }
-
- public void setEFactory(EFactory eFactory) {
- this.eFactory = eFactory;
- }
-
- public void setResourceFactory(ResourceFactoryImpl resourceFactory) {
- this.resourceFactory = resourceFactory;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java
deleted file mode 100644
index d5e877ea..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.core.runtime;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.di.BpmnDiPackage;
-import org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature;
-import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
-import org.eclipse.bpmn2.modeler.core.preferences.ToolProfilesPreferencesHelper;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.graphiti.features.IFeature;
-
-/**
- * @author Bob Brodt
- *
- */
-public class ModelEnablementDescriptor extends BaseRuntimeDescriptor {
-
- // Model Types that are enabled
- private ModelEnablements modelEnablements;
- // BPMN Diagram Type
- private Bpmn2DiagramType diagramType;
- // Tool Profile name
- private String profile;
-
-
- // require a TargetRuntime!
- private ModelEnablementDescriptor() {
- }
-
- public ModelEnablementDescriptor(TargetRuntime rt) {
- super(rt);
- modelEnablements = new ModelEnablements(rt, null, null);
-// modelEnablements.setEnabledAll(true);
- }
-
- public void setDiagramType(Bpmn2DiagramType type) {
- this.diagramType = type;
- }
-
- public Bpmn2DiagramType getDiagramType() {
- return diagramType;
- }
-
- public String getProfile() {
- return profile;
- }
-
- public void setProfile(String profile) {
- this.profile = profile;
- }
-
- public void setEnabled(EClass eClass, boolean enabled) {
- modelEnablements.setEnabled(eClass, enabled);
- }
-
- public void setEnabled(String className, boolean enabled) {
- modelEnablements.setEnabled(className, enabled);
- }
-
- public void setEnabled(String className, String featureName, boolean enabled) {
- modelEnablements.setEnabled(className, featureName, enabled);
- }
-
- public void initializeFromTargetRuntime(TargetRuntime rt, Bpmn2DiagramType type, String profile) {
- ModelEnablementDescriptor med = rt.getModelEnablements(type, profile);
- Collection<String> enabledClasses = med.modelEnablements.getAllEnabledClasses();
- for (String c : enabledClasses) {
- Collection<String> enabledFeatures = med.modelEnablements.getAllEnabledFeatures(c);
- for (String f : enabledFeatures) {
- setEnabled(c, f, true);
- }
- }
- }
-
- public boolean isEnabled(String className, String featureName) {
- return modelEnablements.isEnabled(className, featureName);
- }
-
- public boolean isEnabled(EClass eClass, EStructuralFeature feature) {
- return modelEnablements.isEnabled(eClass, feature);
- }
-
- public boolean isEnabled(EClass eClass) {
- return modelEnablements.isEnabled(eClass);
- }
-
- public boolean isEnabled(String className) {
- return modelEnablements.isEnabled(className);
- }
-
- public boolean isEnabled(IFeature feature) {
- return modelEnablements.isEnabled(feature);
- }
-
- public Collection<String> getAllEnabled() {
- return modelEnablements.getAllEnabled();
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java
deleted file mode 100644
index fcb58c52..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.core.runtime;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ExtensionAttributeValue;
-import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.SimpleFeatureMapEntry;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author Bob Brodt
- *
- */
-public class ModelExtensionDescriptor extends BaseRuntimeDescriptor {
-
- // Container class for property values
- public static class Value {
-
- static int ID = 0;
- String id;
- public List<Object>values;
-
- public Value() {
- setDefaultId();
- }
-
- public Value(String id) {
- if (id==null || id.isEmpty())
- setDefaultId();
- else
- this.id = id;
- }
-
- public List<Object> getValues() {
- if (values==null) {
- values = new ArrayList<Object>();
- }
- return values;
- }
-
- private void setDefaultId() {
- id = "V-" + ID++; //$NON-NLS-1$
- }
- }
-
- // name/value pairs constructed from Custom Task extension point
- public static class Property {
- public String name;
- public String description;
- public List<Object>values;
- public String ref;
- public String type;
-
- public Property() {
- this.name = "unknown"; //$NON-NLS-1$
- }
-
- public Property(String name, String description) {
- super();
- this.name = name;
- this.description = description;
- }
-
- public List<Object> getValues() {
- if (values==null) {
- values = new ArrayList<Object>();
- }
- return values;
- }
-
- public String getFirstStringValue() {
-
- if (!this.getValues().isEmpty()) {
- // simple attribute - find a String value for it
- for (Object propValue : this.getValues()) {
- if (propValue instanceof String) {
- return (String)propValue;
- }
- else if (propValue instanceof Property) {
- String s = ((Property)propValue).getFirstStringValue();
- if (s!=null)
- return s;
- }
- }
- }
- return null;
- }
- }
-
- public class ModelExtensionAdapter extends AdapterImpl {
-
- ModelExtensionDescriptor descriptor;
-
- public ModelExtensionAdapter(ModelExtensionDescriptor descriptor) {
- super();
- this.descriptor = descriptor;
- }
-
- public Property getProperty(String name) {
- return descriptor.getProperty(name);
- }
-
- public List<Property> getProperties(String path) {
- return descriptor.getProperties(path);
- }
-
- public ModelExtensionDescriptor getDescriptor() {
- return descriptor;
- }
- }
-
- protected String id;
- protected String name;
- protected String type;
- protected String description;
- protected List<Property> properties = new ArrayList<Property>();
- protected Resource containingResource;
- protected EObject modelObject;
-
- public ModelExtensionDescriptor(String id, String name) {
- this.id = id;
- this.name = name;
- }
-
- public String getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public String getType() {
- return type;
- }
-
- public String getDescription() {
- return description;
- }
-
- public List<Property> getProperties() {
- return properties;
- }
-
-
- /**
- * Creates a custom Task object from a definition in the currently selected
- * Target Runtime plugin's "modelExtension" extension point.
- *
- * @param container - the EObject which will eventually contain the new Task.
- * No changes are made to this object, it is only used to
- * locate the EMF Resource which will eventually contain
- * the new Task object.
- * @return an initialized Task object
- */
- public EObject createObject(EObject container) {
- if (container!=null)
- containingResource = container.eResource();
- modelObject = createObject(getType());
- populateObject(modelObject, true);
- return modelObject;
- }
-
- /**
- * Create and initialize an object of the given EClass name.
- * The runtime's EPackage is searched first for the given ECLass; if not
- * found, the Bpmn2Package is searched.
- *
- * @param className
- * @return an initialized EObject or null if the EClass name was not found
- */
- private EObject createObject(String className) {
- // look in the extension model package for the class name first
- EClass eClass = (EClass) getEPackage().getEClassifier(className);
- if (eClass==null) {
- // if not found, look in BPMN2 package
- eClass = (EClass) Bpmn2Package.eINSTANCE.getEClassifier(className);
- }
- if (eClass!=null)
- return createObject(eClass);
- return null;
- }
-
- /**
- * Create and initialize an object of the given EClass. Initialization consists
- * of assigning an ID and setting a default name if the EClass has those features.
- *
- * @param eClass - type of object to create
- * @return an initialized EObject
- */
- private EObject createObject(EClass eClass) {
- EObject eObject = null;
- EPackage pkg = eClass.getEPackage();
- if (pkg==Bpmn2Package.eINSTANCE) {
- eObject = Bpmn2ModelerFactory.create(containingResource, eClass);
- }
- else {
- eObject = pkg.getEFactoryInstance().create(eClass);
- }
-
- // if the object has an "id", assign it now.
- String id = ModelUtil.setID(eObject,containingResource);
- // also set a default name
- EStructuralFeature feature = eObject.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
- if (feature!=null) {
- if (id!=null)
- eObject.eSet(feature, ModelUtil.toDisplayName(id));
- else
- eObject.eSet(feature, NLS.bind(Messages.ModelExtensionDescriptor_Create,
- ModelUtil.toDisplayName(eObject.eClass().getName())));
- }
-
- return eObject;
- }
-
- /**
- * Search the Target Runtime's EPackage for a structural feature with the specified name.
- * If the feature is not found in the runtime package, search the Bpmn2Package.
- *
- * @param type - the feature type, either EAttribute or EReference
- * @param name - name of the feature
- * @return an EStructuralFeature or null if not found
- */
- private EStructuralFeature getFeature(Class type, String name) {
- EStructuralFeature feature = getFeature(getEPackage(), type, name);
- if (feature==null) {
- // try the bpmn2 package
- feature = getFeature(Bpmn2Package.eINSTANCE, type, name);
- }
- return feature;
- }
-
- /**
- * Search the given EPackage for a structural feature with the specified name.
- *
- * @param pkg - the EPackage to search
- * @param type - the feature type, either EAttribute or EReference
- * @param name - name of the feature
- * @return an EStructuralFeature or null if not found
- */
- private EStructuralFeature getFeature(EPackage pkg, Class type, String name) {
- TreeIterator<EObject> it = pkg.eAllContents();
- while (it.hasNext()) {
- EObject o = it.next();
- if (type.isInstance(o)) {
- EStructuralFeature fName = o.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
- if (fName!=null && o.eGet(fName)!=null && o.eGet(fName).equals(name)) {
- return (EStructuralFeature)o;
- }
- }
- }
- return null;
- }
-
- /**
- * Populate the given EObject with a list of values which must be Property objects.
- *
- * @param object - the object to initialize
- * @param values - list of Property values
- */
- public void populateObjectFromValues(EObject object, List<Object> values, boolean all) {
-
- for (Object value : values) {
- if (value instanceof Property)
- populateObject(object,(Property)value, all);
- }
- }
-
- public EObject populateObject(EObject object, Resource resource, boolean all) {
- containingResource = resource;
- modelObject = object;
- populateObject(modelObject, all);
- return modelObject;
- }
-
- public void populateObject(EObject object, boolean all) {
- modelObject = object;
- populateObject(object, getProperties(), all);
- adaptObject(object);
- }
-
- /**
- * Populate the given EObject with a list of Property objects.
- *
- * @param object - the object to initialize
- * @param values - list of Property objects
- */
- public void populateObject(EObject object, List<Property> properties, boolean all) {
-
- for (Property prop : properties) {
- populateObject(object,prop, all);
- }
- }
-
- /**
- * Set the value of the structural feature. If the feature is a list,
- * the value is added to the list.
- *
- * @param object
- * @param feature
- * @param value
- */
- private void setValue(EObject object, EStructuralFeature feature, Object value, boolean force, Property property) {
- this.setValueFromString(object, feature, value, force);
- }
-
- /**
- * Return the value of the specified feature from the given EObject.
- * If the feature is a list, return the indexed value.
- *
- * @param object
- * @param feature
- * @param index
- * @return the feature's value
- */
- private Object getValue(EObject object, EStructuralFeature feature, int index) {
- if (feature.isMany()) {
- return ((EList)object.eGet(feature)).get(index<0 ? 0 : index);
- }
- return object.eGet(feature);
- }
-
- public EStructuralFeature getFeature(EClass eclass, Property property) {
- EStructuralFeature feature = eclass.getEStructuralFeature(property.name);
-
- Object firstValue = property.getValues().isEmpty() ? null : property.getValues().get(0);
-
- if (feature==null) {
- EPackage pkg = getEPackage();
- // if the Property has a "ref" or if its value is a Property
- // then this must be an EReference
- if (property.ref!=null || firstValue instanceof Property) {
- feature = ModelUtil.createDynamicReference(pkg, eclass, property.name, property.type);
- }
- else
- feature = ModelUtil.createDynamicAttribute(pkg, eclass, property.name, property.type);
- }
- return feature;
- }
-
- /**
- * Populate the given EObject from the Property tree defined in this runtime
- * plugin's "modelObject" extension point.
- *
- * @param object
- * @param property
- */
- public EStructuralFeature populateObject(EObject object, Property property, boolean all) {
-
- EObject childObject = null;
- EStructuralFeature childFeature = null;
- EStructuralFeature feature = object.eClass().getEStructuralFeature(property.name);
-
- Object firstValue = property.getValues().isEmpty() ? null : property.getValues().get(0);
-
- if (feature==null) {
- EPackage pkg = getEPackage();
- // if the Property has a "ref" or if its value is a Property
- // then this must be an EReference
- if (property.ref!=null || firstValue instanceof Property) {
- feature = ModelUtil.createDynamicReference(pkg, object, property.name, property.type);
- }
- else
- feature = ModelUtil.createDynamicAttribute(pkg, object, property.name, property.type);
- }
-
- if (feature instanceof EAttribute) {
- if ( all && feature.getEType().getInstanceClass() == FeatureMap.Entry.class ) {
- // special handling for FeatureMaps
- for (Object value : property.getValues()) {
- if (value instanceof Property) {
- Property p = (Property)value;
- childFeature = getFeature(p.name);
- if (childFeature instanceof EAttribute) {
- childObject = createObject(((EReference) childFeature));
- setValue(childObject, childFeature, firstValue, true, property);
- }
- else if (childFeature instanceof EReference) {
- childObject = createObject(((EReference) childFeature).getEReferenceType());
- FeatureMap.Entry entry = new SimpleFeatureMapEntry((EStructuralFeature.Internal)childFeature, childObject);
- setValue(object, feature, entry, true, property);
- populateObjectFromValues(childObject,p.getValues(), true);
- }
- }
- }
- }
- else
- setValue(object, feature, firstValue, all, property);
- }
- else if (feature instanceof EReference) {
- if (all) {
- EReference ref = (EReference)feature;
- if (property.ref!=null) {
- // navigate down the newly created custom task to find the object reference
- childObject = modelObject;
- String[] segments = property.ref.split("/"); //$NON-NLS-1$
- for (String s : segments) {
- // is the feature an Elist?
- int index = s.indexOf('#');
- if (index>0) {
- index = Integer.parseInt(s.substring(index+1));
- s = s.split("#")[0]; //$NON-NLS-1$
- }
- childFeature = childObject.eClass().getEStructuralFeature(s);
- childObject = (EObject)getValue(childObject, childFeature, index);
- }
- setValue(object, feature, childObject, true, property);
- }
- else if (firstValue instanceof Property)
- {
- EClassifier reftype = property.type == null || property.type.length() == 0 ? null : ModelUtil
- .getEClassifierFromString(getEPackage(), property.type);
- if (reftype == null || !(reftype instanceof EClass)) {
- reftype = ref.getEReferenceType();
- }
- childObject = createObject((EClass) reftype);
- setValue(object, feature, childObject, true, property);
- populateObjectFromValues(childObject, property.getValues(), all);
- }
- }
- }
- return feature;
- }
-
- /**
- * Return the value of the given root Property name.
- *
- * @param name
- * @return
- */
- public Object getPropertyValue(String name) {
-
- for (Property prop : getProperties()) {
- if (prop.name.equals(name)) {
- if (!prop.getValues().isEmpty()) {
- return prop.getValues().get(0);
- }
- }
- }
- return null;
- }
-
- public List<Property> getProperties(String path) {
- List<Property> result = new ArrayList<Property>();
- List<Property> props = new ArrayList<Property>();
- props.addAll(getProperties());
- String names[] = path.split("/"); //$NON-NLS-1$
- getProperties(props,names,0,result);
- return result;
- }
-
- private void getProperties(List<Property>props, String names[], int index, List<Property>result) {
- String name = names[index];
- for (Property p : props) {
- if (p.name.equals(name)) {
- if (index==names.length-1)
- result.add(p);
- else {
- List<Property>childProps = new ArrayList<Property>();
- for (Object v : p.values) {
- if (v instanceof Property) {
- childProps.add((Property)v);
- }
- }
- getProperties(childProps, names, index+1, result);
- }
- }
- }
- }
-
- public Property getProperty(String name) {
- for (Property prop : getProperties()) {
- if (prop.name.equals(name)) {
- return prop;
- }
- }
- return null;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setProperties(List<Property> properties) {
- this.properties = properties;
- }
-
- public static ModelExtensionAdapter getModelExtensionAdapter(EObject object) {
- for (Adapter a : object.eAdapters()) {
- if (a instanceof ModelExtensionAdapter) {
- return (ModelExtensionAdapter)a;
- }
- }
- return null;
- }
-
- public void adaptObject(EObject object) {
- addModelExtensionAdapter(object);
- if (description!=null && !description.isEmpty()) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
- if (adapter!=null) {
- adapter.setProperty(ExtendedPropertiesAdapter.CUSTOM_DESCRIPTION, description);
- }
- }
- }
-
- private void addModelExtensionAdapter(EObject object) {
- if (!object.eAdapters().contains(this))
- object.eAdapters().add( new ModelExtensionAdapter(this) );
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java
deleted file mode 100644
index 1f31c48c..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java
+++ /dev/null
@@ -1,867 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.runtime;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.modeler.core.AbstractPropertyChangeListenerProvider;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.ICustomElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl;
-import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Value;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
-import org.eclipse.bpmn2.util.Bpmn2Resource;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IContributor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-import org.eclipse.graphiti.ui.editor.DiagramEditor;
-
-
-public class TargetRuntime extends AbstractPropertyChangeListenerProvider {
-
- // extension point ID for Target Runtimes
- public static final String RUNTIME_EXTENSION_ID = "org.eclipse.bpmn2.modeler.runtime"; //$NON-NLS-1$
- public static final String DEFAULT_RUNTIME_ID = "org.eclipse.bpmn2.modeler.runtime.none"; //$NON-NLS-1$
- // ID for BPMN2 specific problem markers
- public static final String BPMN2_MARKER_ID = "org.eclipse.bpmn2.modeler.core.problemMarker"; //$NON-NLS-1$
-
- // our cached registry of target runtimes contributed by other plugins
- protected static TargetRuntime targetRuntimes[];
- protected static TargetRuntime currentRuntime;
-
- protected String name;
- protected String[] versions;
- protected String id;
- protected String description;
- private IBpmn2RuntimeExtension runtimeExtension;
- protected ModelDescriptor modelDescriptor;
- protected ArrayList<Bpmn2TabDescriptor> tabDescriptors;
- protected ArrayList<CustomTaskDescriptor> customTasks;
- protected ArrayList<ModelExtensionDescriptor> modelExtensions;
- protected ArrayList<ModelEnablementDescriptor> modelEnablements;
- protected ModelEnablementDescriptor defaultModelEnablements;
- protected ArrayList<PropertyExtensionDescriptor> propertyExtensions;
- protected ArrayList<FeatureContainerDescriptor> featureContainers;
- protected ArrayList<ToolPaletteDescriptor> toolPalettes;
- protected HashMap<Class, ShapeStyle> shapeStyles;
- protected Bpmn2Resource bpmnResource;
- protected String problemMarkerId;
-
- public TargetRuntime(String id, String name, String versions, String description) {
- this.id = id;
- this.name = name;
- if (versions!=null)
- this.versions = versions.split("[, ]"); //$NON-NLS-1$
- this.description = description;
- }
-
- public static TargetRuntime getRuntime(String id) {
- if (getAllRuntimes() == null) {
- return null;
- }
-
- for (TargetRuntime rt : getAllRuntimes()) {
- if (rt.id.equals(id))
- return rt;
- }
- return null;
- }
-
- public static TargetRuntime getCurrentRuntime() {
- return currentRuntime;
- }
-
- public static void setCurrentRuntime(TargetRuntime rt) {
- currentRuntime = rt;
- }
-
- public static TargetRuntime getDefaultRuntime() {
- return getRuntime(DEFAULT_RUNTIME_ID);
- }
-
- /**
- *
- * @return the first runtime which is non default, if there are more than on runtime or if there is only the default runtime
- * return the DEFAULT_RUNTIME_ID
- */
- public static String getFirstNonDefaultId(){
- String runtimeId = null;
- int nonDefaultRuntimeCount = 0;
-
- if (TargetRuntime.getAllRuntimes() == null) {
- return TargetRuntime.DEFAULT_RUNTIME_ID;
- }
-
- for (TargetRuntime rt :TargetRuntime.getAllRuntimes()) {
- if (!rt.getId().equals(TargetRuntime.DEFAULT_RUNTIME_ID)){
- nonDefaultRuntimeCount++;
- runtimeId = rt.getId();
- }
- }
-
- if (nonDefaultRuntimeCount == 1 && runtimeId != null){
- return runtimeId;
- }else{
- return TargetRuntime.DEFAULT_RUNTIME_ID;
- }
- }
-
- public void setResourceSet(ResourceSet resourceSet) {
- resourceSet.getResourceFactoryRegistry().getContentTypeToFactoryMap().put(
- Bpmn2ModelerResourceImpl.BPMN2_CONTENT_TYPE_ID, modelDescriptor.getResourceFactory());
- }
-
- public static TargetRuntime[] getAllRuntimes() {
- if (targetRuntimes==null) {
- // load runtimes contributions from other plugins
- ArrayList<TargetRuntime> rtList = new ArrayList<TargetRuntime>();
-
- IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(
- RUNTIME_EXTENSION_ID);
-
- try {
- // first create all the Target Runtimes because other
- // extension elements refer to these by runtimeId
- for (IConfigurationElement e : config) {
- if (e.getName().equals("runtime")) { //$NON-NLS-1$
- String id = e.getAttribute("id"); //$NON-NLS-1$
- String name = e.getAttribute("name"); //$NON-NLS-1$
- String versions = e.getAttribute("versions"); //$NON-NLS-1$
- String description = e.getAttribute("description"); //$NON-NLS-1$
- TargetRuntime rt = new TargetRuntime(id,name,versions,description);
-
- rt.setRuntimeExtension((IBpmn2RuntimeExtension) e.createExecutableExtension("class")); //$NON-NLS-1$
-
- rtList.add(rt);
-
- // add validation problem marker IDs
- IContributor contributor = e.getDeclaringExtension().getContributor();
- IConfigurationElement[] markers = Platform.getExtensionRegistry().getConfigurationElementsFor(
- "org.eclipse.core.resources.markers"); //$NON-NLS-1$
- for (IConfigurationElement m : markers) {
- if (m.getDeclaringExtension().getContributor() == contributor) {
- rt.setProblemMarkerId(m.getDeclaringExtension().getUniqueIdentifier());
- }
- }
- }
- }
-
- targetRuntimes = rtList.toArray(new TargetRuntime[rtList.size()]);
-
- // process model first
- for (IConfigurationElement e : config) {
- if (!e.getName().equals("runtime")) { //$NON-NLS-1$
- currentRuntime = getRuntime(e);
-
- if (e.getName().equals("model")) { //$NON-NLS-1$
- ModelDescriptor md = new ModelDescriptor();
- if (e.getAttribute("uri")!=null) { //$NON-NLS-1$
- String uri = e.getAttribute("uri"); //$NON-NLS-1$
- md.setEPackage(EPackage.Registry.INSTANCE.getEPackage(uri));
- md.setEFactory(md.getEPackage().getEFactoryInstance());
- }
- if (e.getAttribute("resourceFactory")!=null) //$NON-NLS-1$
- md.setResourceFactory((ResourceFactoryImpl) e.createExecutableExtension("resourceFactory")); //$NON-NLS-1$
- currentRuntime.setModelDescriptor(md);
- }
- }
- }
-
- // need to process the Default Runtime first (defined in o.e.b.m.ui) because
- // other plugins can refer to this.
- for (IConfigurationElement e : config) {
- if (!e.getName().equals("runtime")) { //$NON-NLS-1$
- currentRuntime = getRuntime(e);
- if (currentRuntime.getId().equals(TargetRuntime.DEFAULT_RUNTIME_ID)) {
- if (e.getName().equals("propertyTab")) { //$NON-NLS-1$
- Bpmn2TabDescriptor td = new Bpmn2TabDescriptor(e);
- Bpmn2SectionDescriptor sd = new Bpmn2SectionDescriptor(td,e);
- currentRuntime.getTabs().add(td);
- }
- if (e.getName().equals("modelEnablement")) { //$NON-NLS-1$
- ModelEnablementDescriptor me;
- String type = e.getAttribute("type"); //$NON-NLS-1$
- String profile = e.getAttribute("profile"); //$NON-NLS-1$
- String ref = e.getAttribute("ref"); //$NON-NLS-1$
- currentRuntime.addModelEnablements(me = new ModelEnablementDescriptor(currentRuntime));
- me.setDiagramType(Bpmn2DiagramType.fromString(type));
- me.setProfile(profile);
- if (ref!=null) {
- String a[] = ref.split(":"); //$NON-NLS-1$
- TargetRuntime rt = TargetRuntime.getRuntime(a[0]);
- type = a[1];
- profile = a[2];
- me.initializeFromTargetRuntime(rt, Bpmn2DiagramType.fromString(type), profile);
- }
-
- for (IConfigurationElement c : e.getChildren()) {
- String object = c.getAttribute("object"); //$NON-NLS-1$
- String feature = c.getAttribute("feature"); //$NON-NLS-1$
- if (c.getName().equals("enable")) { //$NON-NLS-1$
- me.setEnabled(object, feature, true);
- } else if (c.getName().equals("disable")) { //$NON-NLS-1$
- me.setEnabled(object, feature, false);
- }
- }
-
- }
- }
- }
- }
-
- // process propertyTab, propertyExtension, customTask, modelExtension and modelEnablement next
- for (IConfigurationElement e : config) {
- if (!e.getName().equals("runtime")) { //$NON-NLS-1$
- currentRuntime = getRuntime(e);
-
- if (e.getName().equals("propertyTab")) { //$NON-NLS-1$
- if (currentRuntime.getId().equals(TargetRuntime.DEFAULT_RUNTIME_ID)) {
- // already done
- continue;
- }
- Bpmn2TabDescriptor td = new Bpmn2TabDescriptor(e);
- Bpmn2SectionDescriptor sd = new Bpmn2SectionDescriptor(td,e);
- currentRuntime.getTabs().add(td);
- }
- else if (e.getName().equals("customTask")) { //$NON-NLS-1$
- String id = e.getAttribute("id"); //$NON-NLS-1$
- String name = e.getAttribute("name"); //$NON-NLS-1$
- CustomTaskDescriptor ct = new CustomTaskDescriptor(id,name);
- ct.type = e.getAttribute("type"); //$NON-NLS-1$
- ct.description = e.getAttribute("description"); //$NON-NLS-1$
- ct.category = e.getAttribute("category"); //$NON-NLS-1$
- ct.icon = e.getAttribute("icon"); //$NON-NLS-1$
- String tabs = e.getAttribute("propertyTabs"); //$NON-NLS-1$
- if (tabs!=null) {
- ct.propertyTabs = tabs.split(" "); //$NON-NLS-1$
- }
- ct.featureContainer = (ICustomElementFeatureContainer) e.createExecutableExtension("featureContainer"); //$NON-NLS-1$
- ct.featureContainer.setCustomTaskDescriptor(ct);
- ct.featureContainer.setId(id);
- ct.setPermanent(true);
- getModelExtensionProperties(ct,e);
- currentRuntime.addCustomTask(ct);
- }
- else if (e.getName().equals("propertyExtension")) { //$NON-NLS-1$
- String id = e.getAttribute("id"); //$NON-NLS-1$
- PropertyExtensionDescriptor pe = new PropertyExtensionDescriptor(currentRuntime, e);
- pe.type = e.getAttribute("type"); //$NON-NLS-1$
- pe.adapterClassName = e.getAttribute("class"); //$NON-NLS-1$
- currentRuntime.addPropertyExtension(pe);
- }
- else if (e.getName().equals("featureContainer")) { //$NON-NLS-1$
- String id = e.getAttribute("id"); //$NON-NLS-1$
- FeatureContainerDescriptor fc = new FeatureContainerDescriptor(currentRuntime);
- fc.type = e.getAttribute("type"); //$NON-NLS-1$
- fc.containerClassName = e.getAttribute("class"); //$NON-NLS-1$
- currentRuntime.addFeatureContainer(fc);
- }
- else if (e.getName().equals("modelExtension")) { //$NON-NLS-1$
- String id = e.getAttribute("id"); //$NON-NLS-1$
- String name = e.getAttribute("name"); //$NON-NLS-1$
- ModelExtensionDescriptor me = new ModelExtensionDescriptor(id,name);
- me.type = e.getAttribute("type"); //$NON-NLS-1$
- me.description = e.getAttribute("description"); //$NON-NLS-1$
- getModelExtensionProperties(me,e);
- currentRuntime.addModelExtension(me);
- }
- else if (e.getName().equals("modelEnablement")) { //$NON-NLS-1$
- if (currentRuntime.getId().equals(TargetRuntime.DEFAULT_RUNTIME_ID)) {
- // already done
- continue;
- }
- ModelEnablementDescriptor me;
- String type = e.getAttribute("type"); //$NON-NLS-1$
- String profile = e.getAttribute("profile"); //$NON-NLS-1$
- String ref = e.getAttribute("ref"); //$NON-NLS-1$
- currentRuntime.addModelEnablements(me = new ModelEnablementDescriptor(currentRuntime));
- me.setDiagramType(Bpmn2DiagramType.fromString(type));
- me.setProfile(profile);
- if (ref!=null) {
- String a[] = ref.split(":"); //$NON-NLS-1$
- TargetRuntime rt = TargetRuntime.getRuntime(a[0]);
- type = a[1];
- profile = a[2];
- me.initializeFromTargetRuntime(rt, Bpmn2DiagramType.fromString(type), profile);
- }
-
- for (IConfigurationElement c : e.getChildren()) {
- String object = c.getAttribute("object"); //$NON-NLS-1$
- String feature = c.getAttribute("feature"); //$NON-NLS-1$
- if (c.getName().equals("enable")) { //$NON-NLS-1$
- me.setEnabled(object, feature, true);
- } else if (c.getName().equals("disable")) { //$NON-NLS-1$
- me.setEnabled(object, feature, false);
- }
- }
-
- }
- else if (e.getName().equals("style")) { //$NON-NLS-1$
- String object = e.getAttribute("object"); //$NON-NLS-1$
- String foreground = e.getAttribute("foreground"); //$NON-NLS-1$
- String background = e.getAttribute("background"); //$NON-NLS-1$
- String textColor = e.getAttribute("textColor"); //$NON-NLS-1$
- String font = e.getAttribute("font"); //$NON-NLS-1$
- EClass eclass = (EClass)Bpmn2Package.eINSTANCE.getEClassifier(object);
- ShapeStyle ss = new ShapeStyle(foreground, background, textColor, font);
- currentRuntime.getShapeStyles().put(eclass.getInstanceClass(), ss);
- }
- else if (e.getName().equals("toolPalette")) { //$NON-NLS-1$
- ToolPaletteDescriptor toolPalette = null;
- String id = e.getAttribute("id"); //$NON-NLS-1$
- for (ToolPaletteDescriptor tp : currentRuntime.getToolPalettes()) {
- if (tp.id.equals(id)) {
- toolPalette = tp;
- break;
- }
- }
- if (toolPalette==null) {
- toolPalette = new ToolPaletteDescriptor();
- currentRuntime.addToolPalette(toolPalette);
- }
- toolPalette.create(e);
- }
- }
- }
-
-
- // All done parsing configuration elements
- // now go back and fix up some things...
- for (TargetRuntime rt : targetRuntimes) {
-
- if (rt.modelDescriptor==null) {
- rt.modelDescriptor = getDefaultRuntime().getModelDescriptor();
- }
- for (ToolPaletteDescriptor tp : rt.getToolPalettes()) {
- tp.sortCategories();
- }
-
- // add customTask and modelExtension features to modelEnablements
-// for (ModelEnablementDescriptor me : rt.getModelEnablements()) {
-// for (ModelExtensionDescriptor med : rt.getModelExtensions()) {
-// for (Property p : med.getProperties()) {
-// me.setEnabled(med.getType(), p.name, true);
-// EClassifier eClass = ModelUtil.getEClassifierFromString(med.getEPackage(), med.getType());
-// ModelUtil.createDynamicAttribute(med.getEPackage(),
-// eClass, p.name, p.type);
-// }
-// }
-
-// for (CustomTaskDescriptor ct : rt.getCustomTasks()) {
-// // the tool palette checks for enablement of this custom task ID
-// me.setEnabled(ct.getId(), true);
-// for (Property p : ct.getProperties()) {
-// me.setEnabled(ct.getType(), p.name, true);
-// }
-// }
-
- // DEBUG:
-// for (ModelEnablementDescriptor me : rt.getModelEnablements()) {
-// System.out.println("Runtime: '"+rt.getName()+
-// "'\nEnablement type: '"+me.getType()+
-// "' Profile: '"+me.getProfile()+
-// "'\nNumber of enabled model elements: "+me.getAllEnabled().size());
-// List<String> classes = new ArrayList<String>(me.getAllEnabled().size());
-// classes.addAll(me.getAllEnabled());
-// Collections.sort(classes);
-// for (String c : classes) {
-// System.out.println(c);
-// List<String> features = new ArrayList<String>(me.getAllEnabled(c).size());
-// features.addAll(me.getAllEnabled(c));
-// Collections.sort(features);
-// for (String f : features) {
-// System.out.println(" "+f);
-// }
-// }
-// System.out.println("");
-// }
-// System.out.println("");
-
- }
-
- } catch (Exception ex) {
- Activator.logError(ex);
- }
-
- currentRuntime = getDefaultRuntime();
-
- CustomTaskImageProvider.registerAvailableImages();
- }
- return targetRuntimes;
- }
-
- private static Object getModelExtensionProperties(ModelExtensionDescriptor ct, IConfigurationElement e) {
-
- String elem = e.getName();
- if ("value".equals(elem)) { //$NON-NLS-1$
- String id = e.getAttribute("id"); //$NON-NLS-1$
- Value val = new Value(id);
- for (IConfigurationElement c : e.getChildren()) {
- Object propValue = getModelExtensionProperties(null, c);
- val.getValues().add(propValue);
- }
- return val;
- }
- else if ("property".equals(elem)) { //$NON-NLS-1$
- String name = e.getAttribute("name"); //$NON-NLS-1$
- String value = e.getAttribute("value"); //$NON-NLS-1$
- String ref = e.getAttribute("ref"); //$NON-NLS-1$
- String type = e.getAttribute("type"); //$NON-NLS-1$
- String description = e.getAttribute("description"); //$NON-NLS-1$
- Property prop = new Property(name,description);
- prop.type = type;
- if (value!=null)
- prop.getValues().add(value);
- else if (ref!=null) {
- prop.ref = ref;
- }
- else if(e.getChildren().length > 0){
- Object o = getModelExtensionProperties(null, e.getChildren()[0]);
- if (o instanceof Value)
- prop.getValues().addAll(((Value)o).getValues());
- }
- return prop;
- }
- else {
- for (IConfigurationElement c : e.getChildren()) {
- Object o = getModelExtensionProperties(null, c);
- if (o instanceof Property && ct!=null)
- ct.getProperties().add((Property)o);
- }
- }
- return null;
- }
-
- private static TargetRuntime getRuntime(IConfigurationElement e) {
- String runtimeId = e.getAttribute("runtimeId"); //$NON-NLS-1$
- TargetRuntime rt = getRuntime(runtimeId);
- if (rt==null)
- return currentRuntime;
- return rt;
- }
-
- public ModelDescriptor getModelDescriptor() {
- return modelDescriptor;
- }
-
- public void setModelDescriptor(ModelDescriptor md) {
- md.setRuntime(this);
- this.modelDescriptor = md;
- }
-
- public String getName() {
- return name;
- }
-
- public String getId() {
- return id;
- }
-
- public String getDescription() {
- return description;
- }
-
- public ArrayList<CustomTaskDescriptor> getCustomTasks()
- {
- if (customTasks==null) {
- customTasks = new ArrayList<CustomTaskDescriptor>();
- }
- return customTasks;
- }
-
- public CustomTaskDescriptor getCustomTask( String id ) {
- Iterator<CustomTaskDescriptor> ctIter = customTasks.iterator();
- while (ctIter.hasNext()) {
- CustomTaskDescriptor ctd = ctIter.next();
- if (ctd.getId().equalsIgnoreCase(id))
- return ctd;
- }
- return null;
- }
-
- public boolean customTaskExists ( String id ) {
- Iterator<CustomTaskDescriptor> ctIter = customTasks.iterator();
- while (ctIter.hasNext()) {
- CustomTaskDescriptor ctd = ctIter.next();
- if (ctd.getId().equalsIgnoreCase(id))
- return true;
- }
- return false;
- }
-
- public void addCustomTask(CustomTaskDescriptor ct) {
- ct.setRuntime(this);
- getCustomTasks().add(ct);
- }
-
- public ArrayList<ModelExtensionDescriptor> getModelExtensions()
- {
- if (modelExtensions==null) {
- modelExtensions = new ArrayList<ModelExtensionDescriptor>();
- }
- return modelExtensions;
- }
-
- public void addModelExtension(ModelExtensionDescriptor me) {
- me.setRuntime(this);
- getModelExtensions().add(me);
- }
-
- public ArrayList<PropertyExtensionDescriptor> getPropertyExtensions()
- {
- if (propertyExtensions==null) {
- propertyExtensions = new ArrayList<PropertyExtensionDescriptor>();
- }
- return propertyExtensions;
- }
-
- public void addPropertyExtension(PropertyExtensionDescriptor me) {
- me.setRuntime(this);
- getPropertyExtensions().add(me);
- }
-
- public PropertyExtensionDescriptor getPropertyExtension(Class clazz) {
- for (PropertyExtensionDescriptor ped : getPropertyExtensions()) {
- String className = clazz.getName();
- if (className.equals(ped.type))
- return ped;
- // well, that didn't work...
- // The "type" name should be the BPMN2 element's interface definition;
- // if it's an implementation class name, try to convert it to its
- // interface name.
- className = className.replaceFirst("\\.impl\\.", "."); //$NON-NLS-1$ //$NON-NLS-2$
- className = className.replaceFirst("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if (className.equals(ped.type))
- return ped;
- }
- return null;
- }
-
- public ArrayList<FeatureContainerDescriptor> getFeatureContainers()
- {
- if (featureContainers==null) {
- featureContainers = new ArrayList<FeatureContainerDescriptor>();
- }
- return featureContainers;
- }
-
- public void addFeatureContainer(FeatureContainerDescriptor me) {
- me.setRuntime(this);
- getFeatureContainers().add(me);
- }
-
- public FeatureContainerDescriptor getFeatureContainer(EClass clazz) {
- for (FeatureContainerDescriptor fcd : getFeatureContainers()) {
- String className = clazz.getInstanceClassName();
- if (className.equals(fcd.type))
- return fcd;
- // well, that didn't work...
- // The "type" name should be the BPMN2 element's interface definition;
- // if it's an implementation class name, try to convert it to its
- // interface name.
- className = className.replaceFirst("\\.impl\\.", "."); //$NON-NLS-1$ //$NON-NLS-2$
- className = className.replaceFirst("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if (className.equals(fcd.type))
- return fcd;
- }
- return null;
- }
-
- public ArrayList<ModelEnablementDescriptor> getModelEnablements()
- {
- if (modelEnablements==null) {
- modelEnablements = new ArrayList<ModelEnablementDescriptor>();
- }
- return modelEnablements;
- }
-
- /**
- * @param object
- * @return
- * @deprecated
- */
- public ModelEnablementDescriptor getModelEnablements(EObject object)
- {
- // TODO: At some point the separation of "Core" and "UI" plugins is going to become
- // an unmanageable problem: I am having to resort to using DiagramEditor.getAdapter()
- // more and more just to get things done.
- // Think about either reorganizing these two plugins, or simply combining them...
- TargetRuntime rt = this;
- DiagramEditor diagramEditor = ModelUtil.getEditor(object);
- if (diagramEditor!=null) {
- rt = (TargetRuntime) diagramEditor.getAdapter(TargetRuntime.class);
- }
- ArrayList<ModelEnablementDescriptor> meds = rt.getModelEnablements();
- if (meds.size()>0)
- return meds.get(0);
- return null;
- }
-
- public ArrayList<ModelEnablementDescriptor> getModelEnablements(Bpmn2DiagramType diagramType)
- {
- ArrayList<ModelEnablementDescriptor> list = new ArrayList<ModelEnablementDescriptor>();
- for (ModelEnablementDescriptor me : getModelEnablements()) {
- if (diagramType == Bpmn2DiagramType.NONE && me.getDiagramType()==null) {
- list.add(me);
- }
- else if (diagramType == me.getDiagramType()) {
- list.add(me);
- }
- }
- return list;
- }
-
- public ModelEnablementDescriptor getModelEnablements(Bpmn2DiagramType diagramType, String profile)
- {
- if (profile!=null && profile.isEmpty())
- profile = null;
-
- for (ModelEnablementDescriptor me : getModelEnablements()) {
- if (diagramType == Bpmn2DiagramType.NONE && me.getDiagramType()==null) {
- if (profile==null || profile.equalsIgnoreCase(me.getProfile()))
- return me;
- }
- if (diagramType == me.getDiagramType()) {
- if (profile==null || profile.equalsIgnoreCase(me.getProfile()))
- return me;
- }
- }
- if (this != getDefaultRuntime()) {
- // fall back to enablements from Default Runtime
- return getDefaultRuntime().getModelEnablements(diagramType, profile);
- }
-
- if (defaultModelEnablements==null)
- defaultModelEnablements = new ModelEnablementDescriptor(getDefaultRuntime());
- return defaultModelEnablements;
- }
-
- public void addModelEnablements(ModelEnablementDescriptor me) {
- me.setRuntime(this);
- getModelEnablements().add(me);
- }
-
-
- //////////////////////
-
- public ArrayList<ToolPaletteDescriptor> getToolPalettes()
- {
- if (toolPalettes==null) {
- toolPalettes = new ArrayList<ToolPaletteDescriptor>();
- }
- return toolPalettes;
- }
-
- public ToolPaletteDescriptor getToolPalette(EObject object)
- {
- DiagramEditor diagramEditor = ModelUtil.getEditor(object);
- return (ToolPaletteDescriptor) diagramEditor.getAdapter(ToolPaletteDescriptor.class);
- }
-
- public ToolPaletteDescriptor getToolPalette(Bpmn2DiagramType diagramType, String profile)
- {
- ToolPaletteDescriptor defaultToolPalette = null;
- for (ToolPaletteDescriptor tp : getToolPalettes()) {
- String s = diagramType.name();
- if (diagramType == Bpmn2DiagramType.NONE && tp.getType()==null) {
- if (profile==null)
- return tp;
- for (String p : tp.getProfiles()) {
- if (profile.equalsIgnoreCase(p))
- return tp;
- }
- }
- if (s.equalsIgnoreCase(tp.getType())) {
- if (profile==null)
- return tp;
- for (String p : tp.getProfiles()) {
- if (profile.equalsIgnoreCase(p))
- return tp;
- }
- }
- if (tp.getType()==null || tp.getType().isEmpty())
- defaultToolPalette = tp;
- }
-
- if (defaultToolPalette!=null)
- return defaultToolPalette;
-
- if (this != getDefaultRuntime()) {
- // fall back to toolPalettes from Default Runtime
- return getDefaultRuntime().getToolPalette(diagramType, profile);
- }
- return null;
- }
-
- public void addToolPalette(ToolPaletteDescriptor tp) {
- tp.setRuntime(this);
- getToolPalettes().add(tp);
- }
- /////////////////////
-
-
- public Map<Class, ShapeStyle> getShapeStyles() {
- if (shapeStyles==null) {
- shapeStyles = new HashMap<Class, ShapeStyle>();
- }
- return shapeStyles;
- }
-
- public ShapeStyle getShapeStyle(Class c) {
- ShapeStyle ss = getShapeStyles().get(c);
- if (ss==null) {
- ss = new ShapeStyle(ss);
- }
- return ss;
- }
-
- private void addAfterTab(ArrayList<Bpmn2TabDescriptor> list, Bpmn2TabDescriptor tab) {
-
- getAllRuntimes();
- String afterTab = tab.getAfterTab();
- if (afterTab!=null && !afterTab.isEmpty() && !afterTab.equals("top")) { //$NON-NLS-1$
- String id = tab.getId();
- for (TargetRuntime rt : targetRuntimes) {
- for (Bpmn2TabDescriptor td : rt.getTabs()) {
- if (tab!=td) {
- if (td.getId().equals(afterTab) || td.isReplacementForTab(afterTab)) {
- addAfterTab(list,td);
- if (rt==this || rt==TargetRuntime.getDefaultRuntime()) {
- if (!list.contains(td))
- list.add(td);
- }
- }
- }
- }
- }
- }
- }
-
- private ArrayList<Bpmn2TabDescriptor> getTabs() {
- if (tabDescriptors==null)
- tabDescriptors = new ArrayList<Bpmn2TabDescriptor>();
- return tabDescriptors;
- }
-
- public static Bpmn2TabDescriptor findTabDescriptor(String id) {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
- Bpmn2TabDescriptor tab = rt.getTabDescriptor(id);
- if (tab!=null)
- return tab;
- }
- return null;
- }
-
- public Bpmn2TabDescriptor getTabDescriptor(String id) {
- for (Bpmn2TabDescriptor tab : getTabs()) {
- if (tab.getId().equals(id))
- return tab;
- }
- return null;
- }
-
- /**
- * @return
- */
- public ArrayList<Bpmn2TabDescriptor> getTabDescriptors() {
- ArrayList<Bpmn2TabDescriptor> list = new ArrayList<Bpmn2TabDescriptor>();
- for (Bpmn2TabDescriptor tab : getTabs()) {
- addAfterTab(list, tab);
- if (!list.contains(tab))
- list.add(tab);
- }
-
- return list;
- }
-
- public IBpmn2RuntimeExtension getRuntimeExtension() {
- return runtimeExtension;
- }
-
- public void setRuntimeExtension(IBpmn2RuntimeExtension runtimeExtension) {
- this.runtimeExtension = runtimeExtension;
- }
-
- public void setResource(Bpmn2Resource bpmnResource) {
- this.bpmnResource = bpmnResource;
-
- TreeIterator<EObject> iter = bpmnResource.getAllContents();
- while (iter.hasNext()) {
- EObject object = iter.next();
- String className = object.eClass().getName();
- // attach ModelExtensionDescriptor.Property adapters to all <modelExtension>
- // objects defined in the target runtime's plugin.xml
- for (ModelExtensionDescriptor med : getModelExtensions()) {
- if (className.equals(med.getType())) {
- med.adaptObject(object);
- break;
- }
- }
- // do the same thing for all <customTask> elements, but only if the object
- // is identified by the CustomTaskFeatureContainer as a genuine "custom task"
- for (CustomTaskDescriptor ctd : getCustomTasks()) {
- if (className.equals(ctd.getType())) {
- if (ctd.getFeatureContainer().getId(object)!=null) {
- ctd.adaptObject(object);
- break;
- }
- }
- }
- }
- }
-
- public Bpmn2Resource getResource() {
- return bpmnResource;
- }
-
- protected void setProblemMarkerId(String id) {
- problemMarkerId = id;
- }
-
- public String getProblemMarkerId() {
- if (problemMarkerId==null)
- return BPMN2_MARKER_ID;
- return problemMarkerId;
- }
-
- @Override
- public boolean equals(Object arg0) {
- if (arg0 instanceof TargetRuntime) {
- if (id!=null && id.equals(((TargetRuntime)arg0).getId()))
- return true;
- }
- else if (arg0 instanceof String) {
- return ((String)arg0).equals(id);
- }
- return super.equals(arg0);
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties
deleted file mode 100644
index e324051d..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties
+++ /dev/null
@@ -1 +0,0 @@
-ModelExtensionDescriptor_Create=New {0}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SiblingLaneComparator.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SiblingLaneComparator.java
deleted file mode 100644
index 2fc5d47b..00000000
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SiblingLaneComparator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Ivar Meikas
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.utils;
-
-import java.util.Comparator;
-
-import org.eclipse.bpmn2.Lane;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-
-final class SiblingLaneComparator implements Comparator<Shape> {
- @Override
- public int compare(Shape o1, Shape o2) {
- Lane l1 = BusinessObjectUtil.getFirstElementOfType(o1, Lane.class);
- Lane l2 = BusinessObjectUtil.getFirstElementOfType(o2, Lane.class);
-
- if (l1 != null && l2 != null && l1.eContainer().equals(l2.eContainer())) {
- int y1 = o1.getGraphicsAlgorithm().getY();
- int y2 = o2.getGraphicsAlgorithm().getY();
- return new Integer(y1).compareTo(y2);
- }
- return 0;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.examples.feature/pom.xml b/org.eclipse.bpmn2.modeler.examples.feature/pom.xml
deleted file mode 100644
index feeb6250..00000000
--- a/org.eclipse.bpmn2.modeler.examples.feature/pom.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
- Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- All rights reserved.
- This program is made available under the terms of the
- Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Red Hat, Inc. - initial API and implementation
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
- </parent>
-
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.examples.feature</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
- <name>Example Runtime Extensions Feature</name>
- <description>BPMN2 Modeler Runtime Extension plug-in examples</description>
-</project>
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/.project b/org.eclipse.bpmn2.modeler.jboss.runtime.feature/.project
deleted file mode 100644
index 61bc021a..00000000
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.bpmn2.modeler.jboss.runtime.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/pom.xml b/org.eclipse.bpmn2.modeler.jboss.runtime.feature/pom.xml
deleted file mode 100644
index d393b2f4..00000000
--- a/org.eclipse.bpmn2.modeler.jboss.runtime.feature/pom.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
- Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- All rights reserved.
- This program is made available under the terms of the
- Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Red Hat, Inc. - initial API and implementation
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
- </parent>
-
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.jboss.runtime.feature</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
- <name>JBoss jBPM Runtime Extension Feature</name>
- <description>BPMN2 Modeler Runtime Extension plug-in for JBoss jBPM</description>
-</project>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.ecore b/org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.ecore
deleted file mode 100644
index 50721fbf..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.ecore
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="SampleModel"
- nsURI="http://org.eclipse.bpmn2.modeler.runtime.example" nsPrefix="tns">
- <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot" eSuperTypes="../../org.eclipse.bpmn2/model/BPMN20.ecore#//DocumentRoot">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="mixed"/>
- <details key="name" value=""/>
- <details key="namespace" value="##targetNamespace"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="elementId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="elementId"/>
- <details key="namespace" value="##targetNamespace"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="sampleCustomFlowValue"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="flowValue"/>
- <details key="namespace" value="##targetNamespace"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.genmodel b/org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.genmodel
deleted file mode 100644
index 14fb8d77..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/model/SampleModel.genmodel
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.bpmn2.modeler.runtime.example/src"
- modelPluginID="org.eclipse.bpmn2.modeler.runtime.example.model" forceOverwrite="true"
- modelName="SampleModel" modelPluginClass="" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="6.0" copyrightFields="false" usedGenPackages="../../org.eclipse.bpmn2/model/BPMN20.genmodel#//bpmn2 ../../org.eclipse.bpmn2/model/BPMN20.genmodel#//di ../../org.eclipse.bpmn2/model/BPMN20.genmodel#//di.1 ../../org.eclipse.bpmn2/model/BPMN20.genmodel#//dc">
- <foreignModel>SampleModel.ecore</foreignModel>
- <genPackages prefix="SampleModel" basePackage="org.eclipse.bpmn2.modeler.runtime.example"
- resource="XML" disposableProviderFactory="true" ecorePackage="SampleModel.ecore#/">
- <genClasses ecoreClass="SampleModel.ecore#//DocumentRoot">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SampleModel.ecore#//DocumentRoot/elementId"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/plugin.xml b/org.eclipse.bpmn2.modeler.runtime.example/plugin.xml
deleted file mode 100644
index 3873f2db..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/plugin.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage"
- genModel="model/SampleModel.genmodel"
- uri="http://org.eclipse.bpmn2.modeler.runtime.example">
- </package>
- </extension>
-
- <extension
- point="org.eclipse.bpmn2.modeler.runtime">
-
- <runtime name="Sample Business Process Engine" versions="1.0"
- id="org.eclipse.bpmn2.modeler.runtime.example"
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleRuntimeExtension"
- description="BPMN2 Modeler customizations for a sample runtime engine">
- </runtime>
-
- <model runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- uri="http://org.eclipse.bpmn2.modeler.runtime.example"
- resourceFactory="org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceFactoryImpl">
- </model>
-
- <featureContainer
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- type="org.eclipse.bpmn2.Association"
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleAssociationFeatureContainer">
- </featureContainer>
-
- <featureContainer
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- type="org.eclipse.bpmn2.Task"
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleTaskFeatureContainer">
- </featureContainer>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.runtime.example.association.tab"
- replaceTab="org.eclipse.bpmn2.modeler.assocation.tab"
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleAssociationPropertySection"
- type="org.eclipse.bpmn2.Association"
- label="Risk/Mitigation Association">
- </propertyTab>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.runtime.example.risk.tab"
- replaceTab="org.eclipse.bpmn2.modeler.textAnnotation.tab"
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleRiskTaskPropertySection"
- type="org.eclipse.bpmn2.TextAnnotation"
- label="Risk Task">
- </propertyTab>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.runtime.example.mitigation.tab"
- replaceTab="org.eclipse.bpmn2.modeler.textAnnotation.tab"
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleMitigationTaskPropertySection"
- type="org.eclipse.bpmn2.TextAnnotation"
- label="Mitigation Task">
- </propertyTab>
-
- <propertyTab
- id="org.eclipse.bpmn2.modeler.runtime.example.flow.tab"
- class="default"
- features="priority"
- type="org.eclipse.bpmn2.SequenceFlow"
- label="Risk Mitigation">
- </propertyTab>
-
- <customTask
- description="This task represents a risk that can occur in the connected Elements."
- featureContainer="org.eclipse.bpmn2.modeler.runtime.example.SampleCustomTaskFeatureContainer"
- id="org.eclipse.bpmn2.modeler.runtime.example.risk"
- name="Risk Task"
- category="Risk &amp; Mitigation"
- icon="risk.png"
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- type="TextAnnotation">
- <property name="elementId" value="org.eclipse.bpmn2.modeler.runtime.example.risk" type="EString"/>
- <property name="name" value="Risk Task" type="EString"/>
- <property name="text" value="Risk Task" type="EString"/>
- <property name="evaluate" value="true" type="EBoolean"/>
- <property name="cost" value="0" type="EInt"/>
- </customTask>
-
- <customTask
- description="This task attempts to minimize the impact of risk."
- featureContainer="org.eclipse.bpmn2.modeler.runtime.example.SampleCustomTaskFeatureContainer"
- id="org.eclipse.bpmn2.modeler.runtime.example.mitigation"
- name="Mitigation Task"
- category="Risk &amp; Mitigation"
- icon="mitigation.png"
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- type="TextAnnotation">
- <property name="elementId" value="org.eclipse.bpmn2.modeler.runtime.example.mitigation" type="EString"/>
- <property name="text" value="Mitigation Task" type="EString"/>
- <property name="name" value="Mitigation Task" type="EString"/>
- <property name="evaluate" value="true" type="EBoolean"/>
- <property name="benefit" value="0" type="EInt"/>
- </customTask>
-
- <customTask
- description="Associates a Risk or Mitigation with a Task."
- featureContainer="org.eclipse.bpmn2.modeler.runtime.example.SampleCustomSequenceFlowFeatureContainer"
- id="org.eclipse.bpmn2.modeler.runtime.example.flow"
- name="Mitigation Flow"
- category="Risk &amp; Mitigation"
- icon="flow.png"
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example.flow"
- type="SequenceFlow">
- <property name="name" value="Mitigate" type="EString"/>
- <property name="priority" value="1" type="EInt"/>
- <property name="elementId" value="org.eclipse.bpmn2.modeler.runtime.example.flow" type="EString"/>
- </customTask>
-
- <modelExtension
- id="org.eclipse.bpmn2.modeler.runtime.example.modelExtension.Association"
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- name="Association Extensions"
- type="Association">
- <property name="affectsTaskExecution" value="false" type="EBoolean"/>
- </modelExtension>
-
- <modelExtension
- id="org.eclipse.bpmn2.modeler.runtime.example.modelExtension.ManualTask"
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- name="Manual Task Extensions"
- type="ManualTask">
- <property name="timeToComplete" value="1d" type="EString"/>
- </modelExtension>
-
- <modelEnablement
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example"
- type="Process"
- profile="Default Process"
- ref="org.eclipse.bpmn2.modeler.runtime.none:Process:Default Process">
-
- <!-- copy the enablements from Default Target Runtime -->
- <!-- and then add our extension features -->
- <enable object="TextAnnotation"/>
- <enable object="TextAnnotation" feature="text"/>
- <enable object="TextAnnotation" feature="name"/>
- <enable object="TextAnnotation" feature="evaluate"/>
- <enable object="TextAnnotation" feature="cost"/>
- <enable object="TextAnnotation" feature="benefit"/>
-
- <enable object="SequenceFlow"/>
- <enable object="SequenceFlow" feature="priority"/>
-
- <enable object="Association" feature="anyAttribute"/>
- <enable object="Association" feature="affectsTaskExecution"/>
-
- <enable object="ManualTask" feature="timeToComplete"/>
- </modelEnablement>
-
- <style object="TextAnnotation" foreground="7F7F00" background="FFFF80" textColor="7F7F00" font="arial,10,-,-"/>
-
- </extension>
- <extension
- point="org.eclipse.bpmn2.modeler.ui">
- <toolProvider
- class="org.eclipse.bpmn2.modeler.runtime.example.SampleToolProvider"
- id="org.eclipse.bpmn2.modeler.runtime.example.toolProvider1"
- runtimeId="org.eclipse.bpmn2.modeler.runtime.example">
- </toolProvider>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationFeatureContainer.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationFeatureContainer.java
deleted file mode 100644
index 936dfc32..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationFeatureContainer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
-
-import org.eclipse.bpmn2.Association;
-import org.eclipse.bpmn2.Task;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.features.flow.AssociationFeatureContainer;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.graphiti.features.ICreateConnectionFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateConnectionContext;
-import org.eclipse.graphiti.mm.pictograms.Connection;
-
-public class SampleAssociationFeatureContainer extends AssociationFeatureContainer {
-
- @Override
- public ICreateConnectionFeature getCreateConnectionFeature(IFeatureProvider fp) {
- return new CreateAssociationFeature(fp) {
-
- @Override
- public Connection create(ICreateConnectionContext context) {
- return super.create(context);
- }
-
- @Override
- public Association createBusinessObject(ICreateConnectionContext context) {
- Association assoc = super.createBusinessObject(context);
- if (assoc.getSourceRef() instanceof Task) {
- EStructuralFeature attr = ModelUtil.getAnyAttribute(assoc, "affectsTaskExecution");
- assoc.eSet(attr, true);
- }
- return assoc;
- }
-
- };
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationPropertySection.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationPropertySection.java
deleted file mode 100644
index 4e4bbfc1..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleAssociationPropertySection.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.runtime.example;
-
-import org.eclipse.bpmn2.Association;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
-import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.BooleanObjectEditor;
-import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @author Bob Brodt
- *
- */
-public class SampleAssociationPropertySection extends DefaultPropertySection {
-
- @Override
- protected AbstractDetailComposite createSectionRoot() {
- return new SampleAssociationDetailComposite(this);
- }
-
- @Override
- public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
- return new SampleAssociationDetailComposite(parent,style);
- }
-
- @Override
- public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
- if (super.appliesTo(part, selection)) {
- EObject eObj = this.getBusinessObjectForSelection(selection);
- if (eObj instanceof Association) {
- EStructuralFeature f = ModelUtil.getAnyAttribute(eObj, "affectsTaskExecution");
- return f!=null;
- }
- }
- return false;
- }
-
- public class SampleAssociationDetailComposite extends DefaultDetailComposite {
-
- /**
- * @param section
- */
- public SampleAssociationDetailComposite(AbstractBpmn2PropertySection section) {
- super(section);
- }
-
- public SampleAssociationDetailComposite(Composite parent, int style) {
- super(parent, style);
- }
-
- @Override
- public void createBindings(EObject be) {
- EStructuralFeature attr = ModelUtil.getAnyAttribute(be, "affectsTaskExecution");
- if (attr!=null) {
- ObjectEditor editor = new BooleanObjectEditor(this,be,attr);
- editor.createControl( getAttributesParent(), "Affects Task");
- }
- else
- super.createBindings(be);
- }
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/DocumentRoot.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/DocumentRoot.java
deleted file mode 100644
index f84f1276..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/DocumentRoot.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Document Root</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getelementId <em>Sample Custom Task Id</em>}</li>
- * <li>{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getSampleCustomFlowValue <em>Sample Custom Flow Value</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage#getDocumentRoot()
- * @model extendedMetaData="kind='mixed' name='' namespace='##targetNamespace'"
- * @generated
- */
-public interface DocumentRoot extends org.eclipse.bpmn2.DocumentRoot {
- /**
- * Returns the value of the '<em><b>Sample Custom Task Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sample Custom Task Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sample Custom Task Id</em>' attribute.
- * @see #setelementId(String)
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage#getDocumentRoot_elementId()
- * @model extendedMetaData="kind='attribute' name='taskId' namespace='##targetNamespace'"
- * @generated
- */
- String getelementId();
-
- /**
- * Sets the value of the '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getelementId <em>Sample Custom Task Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sample Custom Task Id</em>' attribute.
- * @see #getelementId()
- * @generated
- */
- void setelementId(String value);
-
- /**
- * Returns the value of the '<em><b>Sample Custom Flow Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sample Custom Flow Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sample Custom Flow Value</em>' attribute.
- * @see #setSampleCustomFlowValue(String)
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage#getDocumentRoot_SampleCustomFlowValue()
- * @model extendedMetaData="kind='attribute' name='flowValue' namespace='##targetNamespace'"
- * @generated
- */
- String getSampleCustomFlowValue();
-
- /**
- * Sets the value of the '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getSampleCustomFlowValue <em>Sample Custom Flow Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sample Custom Flow Value</em>' attribute.
- * @see #getSampleCustomFlowValue()
- * @generated
- */
- void setSampleCustomFlowValue(String value);
-
-} // DocumentRoot
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelFactory.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelFactory.java
deleted file mode 100644
index 8f03a8e3..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage
- * @generated
- */
-public interface SampleModelFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- SampleModelFactory eINSTANCE = org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.SampleModelFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Document Root</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Document Root</em>'.
- * @generated
- */
- DocumentRoot createDocumentRoot();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- SampleModelPackage getSampleModelPackage();
-
-} //SampleModelFactory
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelPackage.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelPackage.java
deleted file mode 100644
index 318299b7..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/SampleModelPackage.java
+++ /dev/null
@@ -1,1429 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelFactory
- * @model kind="package"
- * @generated
- */
-public interface SampleModelPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "SampleModel";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://org.eclipse.bpmn2.modeler.runtime.example";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "tns";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- SampleModelPackage eINSTANCE = org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.SampleModelPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.DocumentRootImpl <em>Document Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.DocumentRootImpl
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.SampleModelPackageImpl#getDocumentRoot()
- * @generated
- */
- int DOCUMENT_ROOT = 0;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MIXED = Bpmn2Package.DOCUMENT_ROOT__MIXED;
-
- /**
- * The feature id for the '<em><b>XMLNS Prefix Map</b></em>' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = Bpmn2Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP;
-
- /**
- * The feature id for the '<em><b>XSI Schema Location</b></em>' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = Bpmn2Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION;
-
- /**
- * The feature id for the '<em><b>Activity</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ACTIVITY = Bpmn2Package.DOCUMENT_ROOT__ACTIVITY;
-
- /**
- * The feature id for the '<em><b>Ad Hoc Sub Process</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__AD_HOC_SUB_PROCESS = Bpmn2Package.DOCUMENT_ROOT__AD_HOC_SUB_PROCESS;
-
- /**
- * The feature id for the '<em><b>Flow Element</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__FLOW_ELEMENT = Bpmn2Package.DOCUMENT_ROOT__FLOW_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Artifact</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ARTIFACT = Bpmn2Package.DOCUMENT_ROOT__ARTIFACT;
-
- /**
- * The feature id for the '<em><b>MultipleAssignments</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ASSIGNMENT = Bpmn2Package.DOCUMENT_ROOT__ASSIGNMENT;
-
- /**
- * The feature id for the '<em><b>Association</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ASSOCIATION = Bpmn2Package.DOCUMENT_ROOT__ASSOCIATION;
-
- /**
- * The feature id for the '<em><b>Auditing</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__AUDITING = Bpmn2Package.DOCUMENT_ROOT__AUDITING;
-
- /**
- * The feature id for the '<em><b>Base Element</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__BASE_ELEMENT = Bpmn2Package.DOCUMENT_ROOT__BASE_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Base Element With Mixed Content</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__BASE_ELEMENT_WITH_MIXED_CONTENT = Bpmn2Package.DOCUMENT_ROOT__BASE_ELEMENT_WITH_MIXED_CONTENT;
-
- /**
- * The feature id for the '<em><b>Boundary Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__BOUNDARY_EVENT = Bpmn2Package.DOCUMENT_ROOT__BOUNDARY_EVENT;
-
- /**
- * The feature id for the '<em><b>Business Rule Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__BUSINESS_RULE_TASK = Bpmn2Package.DOCUMENT_ROOT__BUSINESS_RULE_TASK;
-
- /**
- * The feature id for the '<em><b>Callable Element</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CALLABLE_ELEMENT = Bpmn2Package.DOCUMENT_ROOT__CALLABLE_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Call Activity</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CALL_ACTIVITY = Bpmn2Package.DOCUMENT_ROOT__CALL_ACTIVITY;
-
- /**
- * The feature id for the '<em><b>Call Choreography</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CALL_CHOREOGRAPHY = Bpmn2Package.DOCUMENT_ROOT__CALL_CHOREOGRAPHY;
-
- /**
- * The feature id for the '<em><b>Call Conversation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CALL_CONVERSATION = Bpmn2Package.DOCUMENT_ROOT__CALL_CONVERSATION;
-
- /**
- * The feature id for the '<em><b>Conversation Node</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CONVERSATION_NODE = Bpmn2Package.DOCUMENT_ROOT__CONVERSATION_NODE;
-
- /**
- * The feature id for the '<em><b>Cancel Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CANCEL_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__CANCEL_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Root Element</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ROOT_ELEMENT = Bpmn2Package.DOCUMENT_ROOT__ROOT_ELEMENT;
-
- /**
- * The feature id for the '<em><b>Catch Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CATCH_EVENT = Bpmn2Package.DOCUMENT_ROOT__CATCH_EVENT;
-
- /**
- * The feature id for the '<em><b>Category</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CATEGORY = Bpmn2Package.DOCUMENT_ROOT__CATEGORY;
-
- /**
- * The feature id for the '<em><b>Category Value</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CATEGORY_VALUE = Bpmn2Package.DOCUMENT_ROOT__CATEGORY_VALUE;
-
- /**
- * The feature id for the '<em><b>Choreography</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CHOREOGRAPHY = Bpmn2Package.DOCUMENT_ROOT__CHOREOGRAPHY;
-
- /**
- * The feature id for the '<em><b>Collaboration</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__COLLABORATION = Bpmn2Package.DOCUMENT_ROOT__COLLABORATION;
-
- /**
- * The feature id for the '<em><b>Choreography Activity</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CHOREOGRAPHY_ACTIVITY = Bpmn2Package.DOCUMENT_ROOT__CHOREOGRAPHY_ACTIVITY;
-
- /**
- * The feature id for the '<em><b>Choreography Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CHOREOGRAPHY_TASK = Bpmn2Package.DOCUMENT_ROOT__CHOREOGRAPHY_TASK;
-
- /**
- * The feature id for the '<em><b>Compensate Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__COMPENSATE_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__COMPENSATE_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Complex Behavior Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__COMPLEX_BEHAVIOR_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__COMPLEX_BEHAVIOR_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Complex Gateway</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__COMPLEX_GATEWAY = Bpmn2Package.DOCUMENT_ROOT__COMPLEX_GATEWAY;
-
- /**
- * The feature id for the '<em><b>Conditional Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Conversation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CONVERSATION = Bpmn2Package.DOCUMENT_ROOT__CONVERSATION;
-
- /**
- * The feature id for the '<em><b>Conversation Association</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CONVERSATION_ASSOCIATION = Bpmn2Package.DOCUMENT_ROOT__CONVERSATION_ASSOCIATION;
-
- /**
- * The feature id for the '<em><b>Conversation Link</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CONVERSATION_LINK = Bpmn2Package.DOCUMENT_ROOT__CONVERSATION_LINK;
-
- /**
- * The feature id for the '<em><b>Correlation Key</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CORRELATION_KEY = Bpmn2Package.DOCUMENT_ROOT__CORRELATION_KEY;
-
- /**
- * The feature id for the '<em><b>Correlation Property</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CORRELATION_PROPERTY = Bpmn2Package.DOCUMENT_ROOT__CORRELATION_PROPERTY;
-
- /**
- * The feature id for the '<em><b>Correlation Property Binding</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CORRELATION_PROPERTY_BINDING = Bpmn2Package.DOCUMENT_ROOT__CORRELATION_PROPERTY_BINDING;
-
- /**
- * The feature id for the '<em><b>Correlation Property Retrieval SingleAssignment</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CORRELATION_PROPERTY_RETRIEVAL_EXPRESSION = Bpmn2Package.DOCUMENT_ROOT__CORRELATION_PROPERTY_RETRIEVAL_EXPRESSION;
-
- /**
- * The feature id for the '<em><b>Correlation Subscription</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__CORRELATION_SUBSCRIPTION = Bpmn2Package.DOCUMENT_ROOT__CORRELATION_SUBSCRIPTION;
-
- /**
- * The feature id for the '<em><b>Data Association</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_ASSOCIATION = Bpmn2Package.DOCUMENT_ROOT__DATA_ASSOCIATION;
-
- /**
- * The feature id for the '<em><b>Data Input</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_INPUT = Bpmn2Package.DOCUMENT_ROOT__DATA_INPUT;
-
- /**
- * The feature id for the '<em><b>Data Input Association</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_INPUT_ASSOCIATION = Bpmn2Package.DOCUMENT_ROOT__DATA_INPUT_ASSOCIATION;
-
- /**
- * The feature id for the '<em><b>Data Object</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_OBJECT = Bpmn2Package.DOCUMENT_ROOT__DATA_OBJECT;
-
- /**
- * The feature id for the '<em><b>Data Object Reference</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_OBJECT_REFERENCE = Bpmn2Package.DOCUMENT_ROOT__DATA_OBJECT_REFERENCE;
-
- /**
- * The feature id for the '<em><b>Data Output</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_OUTPUT = Bpmn2Package.DOCUMENT_ROOT__DATA_OUTPUT;
-
- /**
- * The feature id for the '<em><b>Data Output Association</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_OUTPUT_ASSOCIATION = Bpmn2Package.DOCUMENT_ROOT__DATA_OUTPUT_ASSOCIATION;
-
- /**
- * The feature id for the '<em><b>Data State</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_STATE = Bpmn2Package.DOCUMENT_ROOT__DATA_STATE;
-
- /**
- * The feature id for the '<em><b>Data Store</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_STORE = Bpmn2Package.DOCUMENT_ROOT__DATA_STORE;
-
- /**
- * The feature id for the '<em><b>Data Store Reference</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DATA_STORE_REFERENCE = Bpmn2Package.DOCUMENT_ROOT__DATA_STORE_REFERENCE;
-
- /**
- * The feature id for the '<em><b>Definitions</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DEFINITIONS = Bpmn2Package.DOCUMENT_ROOT__DEFINITIONS;
-
- /**
- * The feature id for the '<em><b>Documentation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__DOCUMENTATION = Bpmn2Package.DOCUMENT_ROOT__DOCUMENTATION;
-
- /**
- * The feature id for the '<em><b>End Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__END_EVENT = Bpmn2Package.DOCUMENT_ROOT__END_EVENT;
-
- /**
- * The feature id for the '<em><b>End Point</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__END_POINT = Bpmn2Package.DOCUMENT_ROOT__END_POINT;
-
- /**
- * The feature id for the '<em><b>Error</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ERROR = Bpmn2Package.DOCUMENT_ROOT__ERROR;
-
- /**
- * The feature id for the '<em><b>Error Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ERROR_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__ERROR_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Escalation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ESCALATION = Bpmn2Package.DOCUMENT_ROOT__ESCALATION;
-
- /**
- * The feature id for the '<em><b>Escalation Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ESCALATION_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__ESCALATION_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__EVENT = Bpmn2Package.DOCUMENT_ROOT__EVENT;
-
- /**
- * The feature id for the '<em><b>Event Based Gateway</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__EVENT_BASED_GATEWAY = Bpmn2Package.DOCUMENT_ROOT__EVENT_BASED_GATEWAY;
-
- /**
- * The feature id for the '<em><b>Exclusive Gateway</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__EXCLUSIVE_GATEWAY = Bpmn2Package.DOCUMENT_ROOT__EXCLUSIVE_GATEWAY;
-
- /**
- * The feature id for the '<em><b>SingleAssignment</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__EXPRESSION = Bpmn2Package.DOCUMENT_ROOT__EXPRESSION;
-
- /**
- * The feature id for the '<em><b>Extension</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__EXTENSION = Bpmn2Package.DOCUMENT_ROOT__EXTENSION;
-
- /**
- * The feature id for the '<em><b>Extension Elements</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__EXTENSION_ELEMENTS = Bpmn2Package.DOCUMENT_ROOT__EXTENSION_ELEMENTS;
-
- /**
- * The feature id for the '<em><b>Flow Node</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__FLOW_NODE = Bpmn2Package.DOCUMENT_ROOT__FLOW_NODE;
-
- /**
- * The feature id for the '<em><b>Formal SingleAssignment</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__FORMAL_EXPRESSION = Bpmn2Package.DOCUMENT_ROOT__FORMAL_EXPRESSION;
-
- /**
- * The feature id for the '<em><b>Gateway</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GATEWAY = Bpmn2Package.DOCUMENT_ROOT__GATEWAY;
-
- /**
- * The feature id for the '<em><b>Global Business Rule Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GLOBAL_BUSINESS_RULE_TASK = Bpmn2Package.DOCUMENT_ROOT__GLOBAL_BUSINESS_RULE_TASK;
-
- /**
- * The feature id for the '<em><b>Global Choreography Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GLOBAL_CHOREOGRAPHY_TASK = Bpmn2Package.DOCUMENT_ROOT__GLOBAL_CHOREOGRAPHY_TASK;
-
- /**
- * The feature id for the '<em><b>Global Conversation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GLOBAL_CONVERSATION = Bpmn2Package.DOCUMENT_ROOT__GLOBAL_CONVERSATION;
-
- /**
- * The feature id for the '<em><b>Global Manual Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GLOBAL_MANUAL_TASK = Bpmn2Package.DOCUMENT_ROOT__GLOBAL_MANUAL_TASK;
-
- /**
- * The feature id for the '<em><b>Global Script Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GLOBAL_SCRIPT_TASK = Bpmn2Package.DOCUMENT_ROOT__GLOBAL_SCRIPT_TASK;
-
- /**
- * The feature id for the '<em><b>Global Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GLOBAL_TASK = Bpmn2Package.DOCUMENT_ROOT__GLOBAL_TASK;
-
- /**
- * The feature id for the '<em><b>Global User Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GLOBAL_USER_TASK = Bpmn2Package.DOCUMENT_ROOT__GLOBAL_USER_TASK;
-
- /**
- * The feature id for the '<em><b>Group</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GROUP = Bpmn2Package.DOCUMENT_ROOT__GROUP;
-
- /**
- * The feature id for the '<em><b>Human Performer</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__HUMAN_PERFORMER = Bpmn2Package.DOCUMENT_ROOT__HUMAN_PERFORMER;
-
- /**
- * The feature id for the '<em><b>Performer</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PERFORMER = Bpmn2Package.DOCUMENT_ROOT__PERFORMER;
-
- /**
- * The feature id for the '<em><b>Resource Role</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RESOURCE_ROLE = Bpmn2Package.DOCUMENT_ROOT__RESOURCE_ROLE;
-
- /**
- * The feature id for the '<em><b>Implicit Throw Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__IMPLICIT_THROW_EVENT = Bpmn2Package.DOCUMENT_ROOT__IMPLICIT_THROW_EVENT;
-
- /**
- * The feature id for the '<em><b>Import</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__IMPORT = Bpmn2Package.DOCUMENT_ROOT__IMPORT;
-
- /**
- * The feature id for the '<em><b>Inclusive Gateway</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__INCLUSIVE_GATEWAY = Bpmn2Package.DOCUMENT_ROOT__INCLUSIVE_GATEWAY;
-
- /**
- * The feature id for the '<em><b>Input Set</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__INPUT_SET = Bpmn2Package.DOCUMENT_ROOT__INPUT_SET;
-
- /**
- * The feature id for the '<em><b>Interface</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__INTERFACE = Bpmn2Package.DOCUMENT_ROOT__INTERFACE;
-
- /**
- * The feature id for the '<em><b>Intermediate Catch Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__INTERMEDIATE_CATCH_EVENT = Bpmn2Package.DOCUMENT_ROOT__INTERMEDIATE_CATCH_EVENT;
-
- /**
- * The feature id for the '<em><b>Intermediate Throw Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__INTERMEDIATE_THROW_EVENT = Bpmn2Package.DOCUMENT_ROOT__INTERMEDIATE_THROW_EVENT;
-
- /**
- * The feature id for the '<em><b>Io Binding</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__IO_BINDING = Bpmn2Package.DOCUMENT_ROOT__IO_BINDING;
-
- /**
- * The feature id for the '<em><b>Io Specification</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__IO_SPECIFICATION = Bpmn2Package.DOCUMENT_ROOT__IO_SPECIFICATION;
-
- /**
- * The feature id for the '<em><b>Item Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__ITEM_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__ITEM_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Lane</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__LANE = Bpmn2Package.DOCUMENT_ROOT__LANE;
-
- /**
- * The feature id for the '<em><b>Lane Set</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__LANE_SET = Bpmn2Package.DOCUMENT_ROOT__LANE_SET;
-
- /**
- * The feature id for the '<em><b>Link Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__LINK_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__LINK_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Loop Characteristics</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__LOOP_CHARACTERISTICS = Bpmn2Package.DOCUMENT_ROOT__LOOP_CHARACTERISTICS;
-
- /**
- * The feature id for the '<em><b>Manual Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MANUAL_TASK = Bpmn2Package.DOCUMENT_ROOT__MANUAL_TASK;
-
- /**
- * The feature id for the '<em><b>Message</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MESSAGE = Bpmn2Package.DOCUMENT_ROOT__MESSAGE;
-
- /**
- * The feature id for the '<em><b>Message Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MESSAGE_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__MESSAGE_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Message Flow</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MESSAGE_FLOW = Bpmn2Package.DOCUMENT_ROOT__MESSAGE_FLOW;
-
- /**
- * The feature id for the '<em><b>Message Flow Association</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MESSAGE_FLOW_ASSOCIATION = Bpmn2Package.DOCUMENT_ROOT__MESSAGE_FLOW_ASSOCIATION;
-
- /**
- * The feature id for the '<em><b>Monitoring</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MONITORING = Bpmn2Package.DOCUMENT_ROOT__MONITORING;
-
- /**
- * The feature id for the '<em><b>Multi Instance Loop Characteristics</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MULTI_INSTANCE_LOOP_CHARACTERISTICS = Bpmn2Package.DOCUMENT_ROOT__MULTI_INSTANCE_LOOP_CHARACTERISTICS;
-
- /**
- * The feature id for the '<em><b>Operation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__OPERATION = Bpmn2Package.DOCUMENT_ROOT__OPERATION;
-
- /**
- * The feature id for the '<em><b>Output Set</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__OUTPUT_SET = Bpmn2Package.DOCUMENT_ROOT__OUTPUT_SET;
-
- /**
- * The feature id for the '<em><b>Parallel Gateway</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PARALLEL_GATEWAY = Bpmn2Package.DOCUMENT_ROOT__PARALLEL_GATEWAY;
-
- /**
- * The feature id for the '<em><b>Participant</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PARTICIPANT = Bpmn2Package.DOCUMENT_ROOT__PARTICIPANT;
-
- /**
- * The feature id for the '<em><b>Participant Association</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PARTICIPANT_ASSOCIATION = Bpmn2Package.DOCUMENT_ROOT__PARTICIPANT_ASSOCIATION;
-
- /**
- * The feature id for the '<em><b>Participant Multiplicity</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PARTICIPANT_MULTIPLICITY = Bpmn2Package.DOCUMENT_ROOT__PARTICIPANT_MULTIPLICITY;
-
- /**
- * The feature id for the '<em><b>Partner Entity</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PARTNER_ENTITY = Bpmn2Package.DOCUMENT_ROOT__PARTNER_ENTITY;
-
- /**
- * The feature id for the '<em><b>Partner Role</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PARTNER_ROLE = Bpmn2Package.DOCUMENT_ROOT__PARTNER_ROLE;
-
- /**
- * The feature id for the '<em><b>Potential Owner</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__POTENTIAL_OWNER = Bpmn2Package.DOCUMENT_ROOT__POTENTIAL_OWNER;
-
- /**
- * The feature id for the '<em><b>Process</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PROCESS = Bpmn2Package.DOCUMENT_ROOT__PROCESS;
-
- /**
- * The feature id for the '<em><b>Property</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__PROPERTY = Bpmn2Package.DOCUMENT_ROOT__PROPERTY;
-
- /**
- * The feature id for the '<em><b>Receive Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RECEIVE_TASK = Bpmn2Package.DOCUMENT_ROOT__RECEIVE_TASK;
-
- /**
- * The feature id for the '<em><b>Relationship</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RELATIONSHIP = Bpmn2Package.DOCUMENT_ROOT__RELATIONSHIP;
-
- /**
- * The feature id for the '<em><b>Rendering</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RENDERING = Bpmn2Package.DOCUMENT_ROOT__RENDERING;
-
- /**
- * The feature id for the '<em><b>Resource</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RESOURCE = Bpmn2Package.DOCUMENT_ROOT__RESOURCE;
-
- /**
- * The feature id for the '<em><b>Resource MultipleAssignments SingleAssignment</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RESOURCE_ASSIGNMENT_EXPRESSION = Bpmn2Package.DOCUMENT_ROOT__RESOURCE_ASSIGNMENT_EXPRESSION;
-
- /**
- * The feature id for the '<em><b>Resource Parameter</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RESOURCE_PARAMETER = Bpmn2Package.DOCUMENT_ROOT__RESOURCE_PARAMETER;
-
- /**
- * The feature id for the '<em><b>Resource Parameter Binding</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__RESOURCE_PARAMETER_BINDING = Bpmn2Package.DOCUMENT_ROOT__RESOURCE_PARAMETER_BINDING;
-
- /**
- * The feature id for the '<em><b>Script</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SCRIPT = Bpmn2Package.DOCUMENT_ROOT__SCRIPT;
-
- /**
- * The feature id for the '<em><b>Script Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SCRIPT_TASK = Bpmn2Package.DOCUMENT_ROOT__SCRIPT_TASK;
-
- /**
- * The feature id for the '<em><b>Send Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SEND_TASK = Bpmn2Package.DOCUMENT_ROOT__SEND_TASK;
-
- /**
- * The feature id for the '<em><b>Sequence Flow</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SEQUENCE_FLOW = Bpmn2Package.DOCUMENT_ROOT__SEQUENCE_FLOW;
-
- /**
- * The feature id for the '<em><b>Service Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SERVICE_TASK = Bpmn2Package.DOCUMENT_ROOT__SERVICE_TASK;
-
- /**
- * The feature id for the '<em><b>Signal</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SIGNAL = Bpmn2Package.DOCUMENT_ROOT__SIGNAL;
-
- /**
- * The feature id for the '<em><b>Signal Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__SIGNAL_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Standard Loop Characteristics</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__STANDARD_LOOP_CHARACTERISTICS = Bpmn2Package.DOCUMENT_ROOT__STANDARD_LOOP_CHARACTERISTICS;
-
- /**
- * The feature id for the '<em><b>Start Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__START_EVENT = Bpmn2Package.DOCUMENT_ROOT__START_EVENT;
-
- /**
- * The feature id for the '<em><b>Sub Choreography</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SUB_CHOREOGRAPHY = Bpmn2Package.DOCUMENT_ROOT__SUB_CHOREOGRAPHY;
-
- /**
- * The feature id for the '<em><b>Sub Conversation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SUB_CONVERSATION = Bpmn2Package.DOCUMENT_ROOT__SUB_CONVERSATION;
-
- /**
- * The feature id for the '<em><b>Sub Process</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SUB_PROCESS = Bpmn2Package.DOCUMENT_ROOT__SUB_PROCESS;
-
- /**
- * The feature id for the '<em><b>Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__TASK = Bpmn2Package.DOCUMENT_ROOT__TASK;
-
- /**
- * The feature id for the '<em><b>Terminate Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__TERMINATE_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__TERMINATE_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Text</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__TEXT = Bpmn2Package.DOCUMENT_ROOT__TEXT;
-
- /**
- * The feature id for the '<em><b>Text Annotation</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__TEXT_ANNOTATION = Bpmn2Package.DOCUMENT_ROOT__TEXT_ANNOTATION;
-
- /**
- * The feature id for the '<em><b>Throw Event</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__THROW_EVENT = Bpmn2Package.DOCUMENT_ROOT__THROW_EVENT;
-
- /**
- * The feature id for the '<em><b>Timer Event Definition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__TIMER_EVENT_DEFINITION = Bpmn2Package.DOCUMENT_ROOT__TIMER_EVENT_DEFINITION;
-
- /**
- * The feature id for the '<em><b>Transaction</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__TRANSACTION = Bpmn2Package.DOCUMENT_ROOT__TRANSACTION;
-
- /**
- * The feature id for the '<em><b>User Task</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__USER_TASK = Bpmn2Package.DOCUMENT_ROOT__USER_TASK;
-
- /**
- * The feature id for the '<em><b>Sample Custom Task Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID = Bpmn2Package.DOCUMENT_ROOT_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Sample Custom Flow Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE = Bpmn2Package.DOCUMENT_ROOT_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Document Root</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT_FEATURE_COUNT = Bpmn2Package.DOCUMENT_ROOT_FEATURE_COUNT + 2;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot <em>Document Root</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Document Root</em>'.
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot
- * @generated
- */
- EClass getDocumentRoot();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getelementId <em>Sample Custom Task Id</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Sample Custom Task Id</em>'.
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getelementId()
- * @see #getDocumentRoot()
- * @generated
- */
- EAttribute getDocumentRoot_elementId();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getSampleCustomFlowValue <em>Sample Custom Flow Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Sample Custom Flow Value</em>'.
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot#getSampleCustomFlowValue()
- * @see #getDocumentRoot()
- * @generated
- */
- EAttribute getDocumentRoot_SampleCustomFlowValue();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- SampleModelFactory getSampleModelFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.DocumentRootImpl <em>Document Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.DocumentRootImpl
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.SampleModelPackageImpl#getDocumentRoot()
- * @generated
- */
- EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot();
-
- /**
- * The meta object literal for the '<em><b>Sample Custom Task Id</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID = eINSTANCE.getDocumentRoot_elementId();
-
- /**
- * The meta object literal for the '<em><b>Sample Custom Flow Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE = eINSTANCE.getDocumentRoot_SampleCustomFlowValue();
-
- }
-
-} //SampleModelPackage
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/DocumentRootImpl.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/DocumentRootImpl.java
deleted file mode 100644
index 21a58ce0..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/DocumentRootImpl.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl;
-
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot;
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Document Root</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.DocumentRootImpl#getelementId <em>Sample Custom Task Id</em>}</li>
- * <li>{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl.DocumentRootImpl#getSampleCustomFlowValue <em>Sample Custom Flow Value</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DocumentRootImpl extends org.eclipse.bpmn2.impl.DocumentRootImpl implements DocumentRoot {
- /**
- * The default value of the '{@link #getelementId() <em>Sample Custom Task Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getelementId()
- * @generated
- * @ordered
- */
- protected static final String SAMPLE_CUSTOM_TASK_ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getelementId() <em>Sample Custom Task Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getelementId()
- * @generated
- * @ordered
- */
- protected String elementId = SAMPLE_CUSTOM_TASK_ID_EDEFAULT;
-
- /**
- * The default value of the '{@link #getSampleCustomFlowValue() <em>Sample Custom Flow Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSampleCustomFlowValue()
- * @generated
- * @ordered
- */
- protected static final String SAMPLE_CUSTOM_FLOW_VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getSampleCustomFlowValue() <em>Sample Custom Flow Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSampleCustomFlowValue()
- * @generated
- * @ordered
- */
- protected String sampleCustomFlowValue = SAMPLE_CUSTOM_FLOW_VALUE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DocumentRootImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return SampleModelPackage.Literals.DOCUMENT_ROOT;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getelementId() {
- return elementId;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setelementId(String newelementId) {
- String oldelementId = elementId;
- elementId = newelementId;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID, oldelementId, elementId));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getSampleCustomFlowValue() {
- return sampleCustomFlowValue;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSampleCustomFlowValue(String newSampleCustomFlowValue) {
- String oldSampleCustomFlowValue = sampleCustomFlowValue;
- sampleCustomFlowValue = newSampleCustomFlowValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE, oldSampleCustomFlowValue, sampleCustomFlowValue));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID:
- return getelementId();
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE:
- return getSampleCustomFlowValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID:
- setelementId((String)newValue);
- return;
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE:
- setSampleCustomFlowValue((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID:
- setelementId(SAMPLE_CUSTOM_TASK_ID_EDEFAULT);
- return;
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE:
- setSampleCustomFlowValue(SAMPLE_CUSTOM_FLOW_VALUE_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID:
- return SAMPLE_CUSTOM_TASK_ID_EDEFAULT == null ? elementId != null : !SAMPLE_CUSTOM_TASK_ID_EDEFAULT.equals(elementId);
- case SampleModelPackage.DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE:
- return SAMPLE_CUSTOM_FLOW_VALUE_EDEFAULT == null ? sampleCustomFlowValue != null : !SAMPLE_CUSTOM_FLOW_VALUE_EDEFAULT.equals(sampleCustomFlowValue);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (elementId: ");
- result.append(elementId);
- result.append(", sampleCustomFlowValue: ");
- result.append(sampleCustomFlowValue);
- result.append(')');
- return result.toString();
- }
-
-} //DocumentRootImpl
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelFactoryImpl.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelFactoryImpl.java
deleted file mode 100644
index 06c5a981..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelFactoryImpl.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl;
-
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.*;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class SampleModelFactoryImpl extends EFactoryImpl implements SampleModelFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static SampleModelFactory init() {
- try {
- SampleModelFactory theSampleModelFactory = (SampleModelFactory)EPackage.Registry.INSTANCE.getEFactory("http://org.eclipse.bpmn2.modeler.runtime.example");
- if (theSampleModelFactory != null) {
- return theSampleModelFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new SampleModelFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SampleModelFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case SampleModelPackage.DOCUMENT_ROOT: return createDocumentRoot();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DocumentRoot createDocumentRoot() {
- DocumentRootImpl documentRoot = new DocumentRootImpl();
- return documentRoot;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SampleModelPackage getSampleModelPackage() {
- return (SampleModelPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static SampleModelPackage getPackage() {
- return SampleModelPackage.eINSTANCE;
- }
-
-} //SampleModelFactoryImpl
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelPackageImpl.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelPackageImpl.java
deleted file mode 100644
index d8c8f0ce..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/impl/SampleModelPackageImpl.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.impl;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-
-import org.eclipse.bpmn2.di.BpmnDiPackage;
-
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot;
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelFactory;
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage;
-
-import org.eclipse.dd.dc.DcPackage;
-
-import org.eclipse.dd.di.DiPackage;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class SampleModelPackageImpl extends EPackageImpl implements SampleModelPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass documentRootEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private SampleModelPackageImpl() {
- super(eNS_URI, SampleModelFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link SampleModelPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static SampleModelPackage init() {
- if (isInited) return (SampleModelPackage)EPackage.Registry.INSTANCE.getEPackage(SampleModelPackage.eNS_URI);
-
- // Obtain or create and register package
- SampleModelPackageImpl theSampleModelPackage = (SampleModelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SampleModelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SampleModelPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- Bpmn2Package.eINSTANCE.eClass();
- BpmnDiPackage.eINSTANCE.eClass();
- DiPackage.eINSTANCE.eClass();
- DcPackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theSampleModelPackage.createPackageContents();
-
- // Initialize created meta-data
- theSampleModelPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theSampleModelPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(SampleModelPackage.eNS_URI, theSampleModelPackage);
- return theSampleModelPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getDocumentRoot() {
- return documentRootEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDocumentRoot_elementId() {
- return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDocumentRoot_SampleCustomFlowValue() {
- return (EAttribute)documentRootEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SampleModelFactory getSampleModelFactory() {
- return (SampleModelFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- documentRootEClass = createEClass(DOCUMENT_ROOT);
- createEAttribute(documentRootEClass, DOCUMENT_ROOT__SAMPLE_CUSTOM_TASK_ID);
- createEAttribute(documentRootEClass, DOCUMENT_ROOT__SAMPLE_CUSTOM_FLOW_VALUE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- Bpmn2Package theBpmn2Package = (Bpmn2Package)EPackage.Registry.INSTANCE.getEPackage(Bpmn2Package.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- documentRootEClass.getESuperTypes().add(theBpmn2Package.getDocumentRoot());
-
- // Initialize classes and features; add operations and parameters
- initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getDocumentRoot_elementId(), ecorePackage.getEString(), "elementId", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getDocumentRoot_SampleCustomFlowValue(), ecorePackage.getEString(), "sampleCustomFlowValue", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
-
- // Create annotations
- // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
- createExtendedMetaDataAnnotations();
- }
-
- /**
- * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void createExtendedMetaDataAnnotations() {
- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
- addAnnotation
- (documentRootEClass,
- source,
- new String[] {
- "kind", "mixed",
- "name", "",
- "namespace", "##targetNamespace"
- });
- addAnnotation
- (getDocumentRoot_elementId(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "elementId",
- "namespace", "##targetNamespace"
- });
- addAnnotation
- (getDocumentRoot_SampleCustomFlowValue(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "flowValue",
- "namespace", "##targetNamespace"
- });
- }
-
-} //SampleModelPackageImpl
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelAdapterFactory.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelAdapterFactory.java
deleted file mode 100644
index d6601fc1..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelAdapterFactory.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util;
-
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.*;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage
- * @generated
- */
-public class SampleModelAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static SampleModelPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SampleModelAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = SampleModelPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SampleModelSwitch<Adapter> modelSwitch =
- new SampleModelSwitch<Adapter>() {
- @Override
- public Adapter caseDocumentRoot(DocumentRoot object) {
- return createDocumentRootAdapter();
- }
- @Override
- public Adapter caseBpmn2_DocumentRoot(org.eclipse.bpmn2.DocumentRoot object) {
- return createBpmn2_DocumentRootAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot <em>Document Root</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.DocumentRoot
- * @generated
- */
- public Adapter createDocumentRootAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.bpmn2.DocumentRoot <em>Document Root</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.bpmn2.DocumentRoot
- * @generated
- */
- public Adapter createBpmn2_DocumentRootAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //SampleModelAdapterFactory
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceFactoryImpl.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceFactoryImpl.java
deleted file mode 100644
index 12851114..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceFactoryImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util.SampleModelResourceImpl
- * @generated
- */
-public class SampleModelResourceFactoryImpl extends ResourceFactoryImpl {
- /**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SampleModelResourceFactoryImpl() {
- super();
- }
-
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Resource createResource(URI uri) {
- XMLResource result = new SampleModelResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
- return result;
- }
-
-} //SampleModelResourceFactoryImpl
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceImpl.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceImpl.java
deleted file mode 100644
index 49743915..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelResourceImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util.SampleModelResourceFactoryImpl
- * @generated
- */
-public class SampleModelResourceImpl extends XMLResourceImpl {
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
- * @generated
- */
- public SampleModelResourceImpl(URI uri) {
- super(uri);
- }
-
-} //SampleModelResourceImpl
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java
deleted file mode 100644
index c2b12b2f..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util;
-
-import java.util.List;
-
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.*;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage
- * @generated
- */
-public class SampleModelSwitch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static SampleModelPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SampleModelSwitch() {
- if (modelPackage == null) {
- modelPackage = SampleModelPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case SampleModelPackage.DOCUMENT_ROOT: {
- DocumentRoot documentRoot = (DocumentRoot)theEObject;
- T result = caseDocumentRoot(documentRoot);
- if (result == null) result = caseBpmn2_DocumentRoot(documentRoot);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Document Root</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Document Root</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseDocumentRoot(DocumentRoot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Document Root</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Document Root</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseBpmn2_DocumentRoot(org.eclipse.bpmn2.DocumentRoot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //SampleModelSwitch
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelXMLProcessor.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelXMLProcessor.java
deleted file mode 100644
index 3a4d2e42..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelXMLProcessor.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util;
-
-import java.util.Map;
-
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage;
-
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
-
-/**
- * This class contains helper methods to serialize and deserialize XML documents
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class SampleModelXMLProcessor extends XMLProcessor {
-
- /**
- * Public constructor to instantiate the helper.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SampleModelXMLProcessor() {
- super((EPackage.Registry.INSTANCE));
- SampleModelPackage.eINSTANCE.eClass();
- }
-
- /**
- * Register for "*" and "xml" file extensions the SampleModelResourceFactoryImpl factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Map<String, Resource.Factory> getRegistrations() {
- if (registrations == null) {
- super.getRegistrations();
- registrations.put(XML_EXTENSION, new SampleModelResourceFactoryImpl());
- registrations.put(STAR_EXTENSION, new SampleModelResourceFactoryImpl());
- }
- return registrations;
- }
-
-} //SampleModelXMLProcessor
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleTaskFeatureContainer.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleTaskFeatureContainer.java
deleted file mode 100644
index 6f96c262..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleTaskFeatureContainer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.runtime.example;
-
-import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.RootElement;
-import org.eclipse.bpmn2.Task;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.TaskFeatureContainer;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.graphiti.features.ICreateFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateContext;
-
-public class SampleTaskFeatureContainer extends TaskFeatureContainer {
-
- @Override
- public ICreateFeature getCreateFeature(IFeatureProvider fp) {
- return new CreateTaskFeature(fp) {
-
- @Override
- public Object[] create(ICreateContext context) {
- Object[] objects = super.create(context);
-
- if (objects.length>0 && objects[0] instanceof Task) {
- Task task = (Task)objects[0];
- Definitions defs = ModelUtil.getDefinitions(task);
- for (RootElement re : defs.getRootElements()) {
- System.out.println(re.getId());
- }
- }
-
- return objects;
- }
-
- @Override
- public Task createBusinessObject(ICreateContext context) {
- Task task = super.createBusinessObject(context);
-
- EStructuralFeature attr = SampleModelPackage.eINSTANCE.getDocumentRoot_elementId();
- task.eSet(attr, "task.id");
-
- attr = ModelUtil.createDynamicAttribute(SampleModelPackage.eINSTANCE, task, "execute", "EBoolean");
- task.eSet(attr, new Boolean(true));
-
- return task;
- }
-
- };
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java
deleted file mode 100644
index 6cb67db2..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.customeditor;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.customeditor.messages"; //$NON-NLS-1$
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties
deleted file mode 100644
index e4bd29c7..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-InstanceDataTypeFactory_Cannot_Create=Could not create data type for class {0}
-NewInstanceDataTypeFactory_Cannot_Create=Could not create data type for class {0}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties
deleted file mode 100644
index 0e190e8a..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-EnumDataType_3=Could not find data type {0}
-EnumDataType_4=IllegalAccessException {0}
-EnumDataType_5=InvocationTargetException {0}
-EnumDataType_6=NoSuchMethodException {0}
-UndefinedDataType_Undefined=Undefined datatype
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties
deleted file mode 100644
index 41dc4dac..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-ParameterDefinitionImpl_Null_Name=Name cannot be null
-ParameterDefinitionImpl_Null_Parameter=Data type cannot be null
-WorkImpl_Null_Parameter=Parameter name is null
-WorkImpl_Work_Item_Name=Work {0}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties
deleted file mode 100644
index 5189aa36..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-JbpmCustomTaskFeatureContainer_Description=Configure the Parameters for this Custom Task
-JbpmCustomTaskFeatureContainer_Name=Configure Work Item
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties
deleted file mode 100644
index c608c6c6..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-Activator_Error=An error occured
-JBPM5RuntimeExtension_Duplicate_Task_Message=A Custom Task with id {0} was already defined.\nThe new Custom Task defined in the file {1} will be ignored.
-JBPM5RuntimeExtension_Duplicate_Task_Title=Duplicate Custom Task
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties
deleted file mode 100644
index 7eefd94c..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-JbpmPreferencePage_Enable_Simulation=Enable Simulation Parameters
-JbpmPreferencePage_JBPM_Settings=jBPM Runtime-specific Settings
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmServiceTaskPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmServiceTaskPropertiesAdapter.java
deleted file mode 100644
index 84e64bf3..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmServiceTaskPropertiesAdapter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters;
-
-import java.util.Hashtable;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ServiceTask;
-import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.bpmn2.modeler.ui.adapters.properties.ServiceTaskPropertiesAdapter;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * @author Bob Brodt
- *
- *
- * This class needs to go into the SwitchYard extension for the jBPM Target Runtime extension
- *
- */
-public class JbpmServiceTaskPropertiesAdapter extends ServiceTaskPropertiesAdapter{
-
- /**
- * @param adapterFactory
- * @param object
- */
- public JbpmServiceTaskPropertiesAdapter(AdapterFactory adapterFactory, ServiceTask object) {
- super(adapterFactory, object);
-
- EStructuralFeature feature = Bpmn2Package.eINSTANCE.getServiceTask_Implementation();
- setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
-
- setFeatureDescriptor(feature,
- new FeatureDescriptor<ServiceTask>(adapterFactory,object,feature) {
-
- @Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- if (choiceOfValues==null) {
- choiceOfValues = super.getChoiceOfValues(context);
- choiceOfValues.put("SwitchYard Service", "##SwitchYard"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return choiceOfValues;
- }
- }
- );
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties
deleted file mode 100644
index 501d3ad6..00000000
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-JbpmFormalExpressionPropertiesAdapter_Condition_Language=Condition Language
-JbpmFormalExpressionPropertiesAdapter_Rule=Rule
-JbpmFormalExpressionPropertiesAdapter_Script_Language=Script Language
-JbpmGlobalTypePropertiesAdapter_Data_Type_Label=Data Type
-JbpmGlobalTypePropertiesAdapter_Label=Global Variable
-JbpmGlobalTypePropertiesAdapter_Name=Name
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.png b/org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.png
deleted file mode 100644
index c4744bba..00000000
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.png b/org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.png
deleted file mode 100644
index 67f0777c..00000000
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/pom.xml b/org.eclipse.bpmn2.modeler.ui/pom.xml
deleted file mode 100644
index 864e093c..00000000
--- a/org.eclipse.bpmn2.modeler.ui/pom.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
- Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- All rights reserved.
- This program is made available under the terms of the
- Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Red Hat, Inc. - initial API and implementation
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
- </parent>
-
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.ui</artifactId>
- <version>1.0.2-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
- <name>BPMN2 Modeler UI</name>
- <description>Main UI for BPMN2 Modeler</description>
-</project>
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java
deleted file mode 100644
index 42e40e9c..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.adapters.properties;
-
-import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-
-/**
- * @author Bob Brodt
- *
- */
-public class ActivityPropertiesAdapter<T extends Activity> extends ExtendedPropertiesAdapter<T> {
-
- /**
- * @param adapterFactory
- * @param object
- */
- public ActivityPropertiesAdapter(AdapterFactory adapterFactory, T object) {
- super(adapterFactory, object);
- setProperty(Bpmn2Package.eINSTANCE.getActivity_LoopCharacteristics(), UI_CAN_CREATE_NEW, Boolean.FALSE);
- setProperty(Bpmn2Package.eINSTANCE.getActivity_LoopCharacteristics(), UI_CAN_EDIT, Boolean.FALSE);
-
- EStructuralFeature feature = Bpmn2Package.eINSTANCE.getActivity_Properties();
- setFeatureDescriptor(feature,
- new FeatureDescriptor<T>(adapterFactory,object,feature) {
- @Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- T activity = adopt(context);
- return PropertyPropertiesAdapter.createProperty(activity.getProperties());
- }
- }
- );
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java
deleted file mode 100644
index 8947decf..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.adapters.properties;
-
-import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.resource.Resource;
-
-/**
- * @author Bob Brodt
- *
- */
-public class DefinitionsPropertiesAdapter extends ExtendedPropertiesAdapter<Definitions> {
-
- /**
- * @param adapterFactory
- * @param object
- */
- public DefinitionsPropertiesAdapter(AdapterFactory adapterFactory, Definitions object) {
- super(adapterFactory, object);
-
- setObjectDescriptor(new ObjectDescriptor<Definitions>(adapterFactory, object) {
- @Override
- public Definitions createObject(Resource resource, Object context) {
- Definitions definitions = Bpmn2ModelerFactory.create(Definitions.class);
- IBpmn2RuntimeExtension rte = TargetRuntime.getCurrentRuntime().getRuntimeExtension();
- definitions.setTypeLanguage(rte.getTypeLanguages()[0]);
- definitions.setExpressionLanguage(rte.getExpressionLanguages()[0]);
- return definitions;
- }
- });
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java
deleted file mode 100644
index 2ea02adc..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.adapters.properties;
-
-import java.util.Hashtable;
-import java.util.List;
-
-import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.CatchEvent;
-import org.eclipse.bpmn2.DataInput;
-import org.eclipse.bpmn2.DataInputAssociation;
-import org.eclipse.bpmn2.DataOutput;
-import org.eclipse.bpmn2.DataOutputAssociation;
-import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.InputOutputSpecification;
-import org.eclipse.bpmn2.ItemDefinition;
-import org.eclipse.bpmn2.RootElement;
-import org.eclipse.bpmn2.ThrowEvent;
-import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-
-/**
- * @author Bob Brodt
- *
- */
-public class ItemDefinitionRefFeatureDescriptor<T extends BaseElement> extends FeatureDescriptor<T> {
-
- /**
- * @param adapterFactory
- * @param object
- * @param feature
- */
- public ItemDefinitionRefFeatureDescriptor(AdapterFactory adapterFactory, T object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
- // I found a couple of instances where this class was used for references that were NOT
- // RootElements - just check to make sure here...
- Assert.isTrue( RootElement.class.isAssignableFrom(feature.getEType().getInstanceClass()) );
- }
-
- @Override
- public String getLabel(Object context) {
- return ItemDefinitionPropertiesAdapter.getLabel();
- }
-
- @Override
- public String getDisplayName(Object context) {
- T object = adopt(context);
- ItemDefinition itemDefinition = (ItemDefinition) object.eGet(feature);
- return ItemDefinitionPropertiesAdapter.getDisplayName(itemDefinition);
- }
-
- @Override
- public EObject createFeature(Resource resource, Object context, EClass eClass) {
- T object = adopt(context);
- ItemDefinition itemDefinition = ItemDefinitionPropertiesAdapter.createItemDefinition(object.eResource());
- return itemDefinition;
- }
-
- @Override
- public Object getValue(Object context) {
- T object = adopt(context);
- ItemDefinition itemDefinition = (ItemDefinition) object.eGet(feature);
- return ItemDefinitionPropertiesAdapter.getStructureRef(itemDefinition);
- }
-
- @Override
- public void setValue(final Object context, final Object value) {
- TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- internalSetValue(context, value);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- internalSetValue(context, value);
- }
- });
- }
- }
-
- private void internalSetValue(Object context, Object value) {
- T object = adopt(context);
- ItemDefinition itemDefinition = null;
- if (value instanceof ItemDefinition) {
- itemDefinition = (ItemDefinition) value;
- if (itemDefinition.eResource()==null) {
- final Definitions defs = ModelUtil.getDefinitions(object);
- if (defs!=null) {
- itemDefinition = (ItemDefinition) value;
- TransactionalEditingDomain editingDomain = getEditingDomain(itemDefinition);
- if (editingDomain == null) {
- defs.getRootElements().add(itemDefinition);
- } else {
- final ItemDefinition id = itemDefinition;
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- defs.getRootElements().add(id);
- }
- });
- }
- }
- }
- super.setValue(object, itemDefinition);
- }
- else if (value==null)
- super.setValue(object, null);
-
- // if there are any DataInputAssociations or DataOutputAssociations that map to this object
- // then change their ItemDefinitions to match.
- Definitions definitions = ModelUtil.getDefinitions(object);
- if (definitions!=null) {
- TreeIterator<EObject> iter = definitions.eAllContents();
- while (iter.hasNext()) {
- EObject o = iter.next();
- if (o instanceof DataInput) {
- DataInput input = (DataInput) o;
- if (input.eContainer() instanceof InputOutputSpecification) {
- InputOutputSpecification ioSpec = (InputOutputSpecification) input.eContainer();
- if (ioSpec.eContainer() instanceof Activity) {
- Activity activity = (Activity) ioSpec.eContainer();
- for (DataInputAssociation dia : activity.getDataInputAssociations()) {
- if (!dia.getSourceRef().isEmpty() && dia.getSourceRef().get(0) == object) {
- input.setItemSubjectRef(itemDefinition);
- }
- }
- }
- }
- else if (input.eContainer() instanceof ThrowEvent) {
- ThrowEvent event = (ThrowEvent) input.eContainer();
- for (DataInputAssociation dia : event.getDataInputAssociation()) {
- if (!dia.getSourceRef().isEmpty() && dia.getSourceRef().get(0) == object) {
- input.setItemSubjectRef(itemDefinition);
- }
- }
- }
- }
- else if (o instanceof DataOutput) {
- DataOutput output = (DataOutput) o;
- if (output.eContainer() instanceof InputOutputSpecification) {
- InputOutputSpecification ioSpec = (InputOutputSpecification) output.eContainer();
- if (ioSpec.eContainer() instanceof Activity) {
- Activity activity = (Activity) ioSpec.eContainer();
- for (DataOutputAssociation doa : activity.getDataOutputAssociations()) {
- if (doa.getTargetRef() == object) {
- output.setItemSubjectRef(itemDefinition);
- }
- }
- }
- }
- else if (output.eContainer() instanceof CatchEvent) {
- CatchEvent event = (CatchEvent) output.eContainer();
- for (DataOutputAssociation doa : event.getDataOutputAssociation()) {
- if (doa.getTargetRef() == object) {
- output.setItemSubjectRef(itemDefinition);
- }
- }
- }
- }
- }
- }
- }
-
- @Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- T object = adopt(context);
- return ItemDefinitionPropertiesAdapter.getChoiceOfValues(object);
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java
deleted file mode 100644
index 870c8727..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.adapters.properties;
-
-import java.util.List;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.Message;
-import org.eclipse.bpmn2.MessageFlow;
-import org.eclipse.bpmn2.ReceiveTask;
-import org.eclipse.bpmn2.SendTask;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.graphiti.mm.pictograms.Anchor;
-import org.eclipse.graphiti.mm.pictograms.Connection;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-
-/**
- * @author Gary Brown
- *
- */
-public class MessageFlowPropertiesAdapter extends ExtendedPropertiesAdapter<MessageFlow> {
-
- /**
- * @param adapterFactory
- * @param object
- */
- public MessageFlowPropertiesAdapter(AdapterFactory adapterFactory, MessageFlow object) {
- super(adapterFactory, object);
-
- EStructuralFeature ref = Bpmn2Package.eINSTANCE.getMessageFlow_MessageRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<MessageFlow>(adapterFactory,object,ref) {
-
- public void setValue(Object context, final Object value) {
- if (value instanceof Message || value==null) {
- final MessageFlow object = adopt(context);
- final Message message = (Message)value;
- final TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- setMessageRef(object, message);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- setMessageRef(object, message);
- }
- });
- }
- }
- }
-
- });
-
- setObjectDescriptor(new ObjectDescriptor<MessageFlow>(adapterFactory, object) {
- @Override
- public String getDisplayName(Object context) {
- final MessageFlow flow = adopt(context);
- String text = ""; //$NON-NLS-1$
- if (flow.getName()!=null)
- text = flow.getName();
- else {
- if (flow.getMessageRef()!=null) {
- text += ChoreographyUtil.getMessageFlowName(flow);
- }
-
- if (flow.getSourceRef() != null) {
- text += "(" + ModelUtil.getDisplayName(flow.getSourceRef())+"->"; //$NON-NLS-1$ //$NON-NLS-2$
-
- if (flow.getTargetRef() != null) {
- text += ModelUtil.getDisplayName(flow.getTargetRef());
- }
- text += ")"; //$NON-NLS-1$
- }
- }
- return text;
- }
- });
- }
-
- private void setMessageRef(MessageFlow messageFlow, Message message) {
- ResourceSet resourceSet = messageFlow.eResource().getResourceSet();
-
- // first change the MessageRef on the SendTask
- messageFlow.setMessageRef(message);
-
- // If the source and/or target of this Message Flow are a SendTask
- // or ReceiveTask make sure the messageRef is the same as ours
- List<Connection> connections = DIUtils.getConnections(resourceSet, messageFlow);
- for (Connection connection : connections) {
- Object o = BusinessObjectUtil.getFirstBaseElement(connection.getEnd().getParent());
- if (o instanceof ReceiveTask) {
- ((ReceiveTask)o).setMessageRef(message);
- }
- o = BusinessObjectUtil.getFirstBaseElement(connection.getStart().getParent());
- if (o instanceof SendTask) {
- ((SendTask)o).setMessageRef(message);
- }
- }
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties
deleted file mode 100644
index 40dfab7e..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-CreateDiagramCommand_Title=New {0} Diagram
-CreateDiagramCommand_Message=Enter {0} Name
-CreateDiagramCommand_Choreography=Choreography
-CreateDiagramCommand_Collaboration=Collaboration
-CreateDiagramCommand_Invalid_Duplicate=The {0} already exists.
-CreateDiagramCommand_Invalid_Empty=Name must not be empty
-CreateDiagramCommand_Process=Process
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties
deleted file mode 100644
index 3e5dfa43..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-BPMNToolBehaviorProvider_Click_Drag_Prompt=Click and drag to create a\n
-BPMNToolBehaviorProvider_Click_Drag_Prompt_Last_Separator=\ or
-BPMNToolBehaviorProvider_Click_Drag_Prompt_Separator=,
-BPMNToolBehaviorProvider_Connectors_Drawer_Label=Connectors
-BPMNToolBehaviorProvider_Custom_Tasks_Drawer_Label=Custom Tasks
-BPMNToolBehaviorProvider_Data_Items_Drawer_Label=Data Items
-BPMNToolBehaviorProvider_Event_Definitions_Drawer_Label=Event Definitions
-BPMNToolBehaviorProvider_Events_Drawer_Label=Events
-BPMNToolBehaviorProvider_Gateways_Drawer_Label=Gateways
-BPMNToolBehaviorProvider_Other_Drawer_Label=Other
-BPMNToolBehaviorProvider_Profiles_Drawer_Label=Profiles
-BPMNToolBehaviorProvider_Tasks_Drawer_Label=Tasks
-BPMNToolBehaviorProvider_Unnamed_Profile=Unnamed
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties
deleted file mode 100644
index 73d10a97..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-BPMN2Editor_Cannot_Create_Editor_Input=Can't create BPMN2Editor Input
-BPMN2MultiPageEditor_Source_Tab=Source
-BPMN2PersistencyBehavior_Cannot_Save_Title=Can not save file
-DesignEditor_Delete_Diagram_Action=Delete Diagram {0}
-DesignEditor_Delete_Page_Title=Delete Page
-DesignEditor_DeletePage_Message=Are you sure you want to delete the page {0}?
-DesignEditor_Diagram_Tab=Diagram
-DesignEditor_Hide_Source_View_Action=Hide Source View
-DesignEditor_Show_Source_View_Action=Show Source View
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/LayoutBaseElementTextFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/LayoutBaseElementTextFeature.java
deleted file mode 100644
index 484e1877..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/LayoutBaseElementTextFeature.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ILayoutContext;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-
-public abstract class LayoutBaseElementTextFeature extends DefaultLayoutBPMNShapeFeature {
-
-// private static IGaService gaService = Graphiti.getGaService();
-
- public LayoutBaseElementTextFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canLayout(ILayoutContext context) {
- PictogramElement pictoElem = context.getPictogramElement();
- if (!(pictoElem instanceof ContainerShape)) {
- return false;
- }
- return BusinessObjectUtil.containsElementOfType(pictoElem, BaseElement.class);
- }
-
- @Override
- public boolean layout(ILayoutContext context) {
- ContainerShape container = (ContainerShape) context.getPictogramElement();
-
-// Shape textShape = getShape(control, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
-// Text textGa = (Text) textShape.getGraphicsAlgorithm();
-// String text = textGa.getValue() == null ? "" : textGa.getValue();
-// IDimension size = GraphitiUi.getUiLayoutService().calculateTextSize(text, textGa.getFont());
-
-// GraphicsAlgorithm parentGa = control.getGraphicsAlgorithm();
-
-// if (size.getWidth() > getMinimumWidth()) {
-// gaService.setSize(parentGa, parentGa.getWidth(), parentGa.getHeight());
-// } else {
-// gaService.setSize(parentGa, getMinimumWidth(), parentGa.getHeight());
-// }
-
-// gaService.setSize(textGa, size.getWidth() + 3, textGa.getHeight());
-
- return super.layout(context);
- }
-
- public abstract int getMinimumWidth();
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties
deleted file mode 100644
index f0280bf3..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-AppendActivityFeature_Description=Create a new Activity and connect it to this item
-AppendActivityFeature_Name=Append Activity
-MorphActivityFeature_Description=Change the Activity type
-MorphActivityFeature_Name=Morph Activity
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java
deleted file mode 100644
index 25bcc0cb..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
-
-import static org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessFeatureContainer.IS_EXPANDED;
-import static org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessFeatureContainer.TRIGGERED_BY_EVENT;
-
-import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.activity.AbstractAddActivityFeature;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.mm.algorithms.MultiText;
-import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-
-public class AddExpandableActivityFeature<T extends Activity>
- extends AbstractAddActivityFeature<T> {
-
- public AddExpandableActivityFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject) {
- boolean isTriggeredByEvent = false;
- boolean isExpanded = true;
-
- if (businessObject instanceof SubProcess) {
- SubProcess subprocess = (SubProcess) businessObject;
- isTriggeredByEvent = subprocess.isTriggeredByEvent();
-
- BPMNShape bpmnShape = DIUtils.findBPMNShape(subprocess);
- if (bpmnShape != null) {
- isExpanded = bpmnShape.isIsExpanded();
- }
- }
- peService.setPropertyValue(containerShape, TRIGGERED_BY_EVENT, Boolean.toString(isTriggeredByEvent));
- peService.setPropertyValue(containerShape, IS_EXPANDED, Boolean.toString(isExpanded));
-
- Shape textShape = peService.createShape(containerShape, false);
- MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, businessObject.getName());
- gaService.setLocationAndSize(text, 5, 5, context.getWidth() - 10, 15);
- StyleUtil.applyStyle(text, businessObject);
- text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
-// text.setFont(gaService.manageFont(getDiagram(), GaServiceImpl.DEFAULT_FONT, 8, false, true));
- link(textShape, businessObject);
-
- if (!isExpanded){
- GraphicsUtil.showActivityMarker(containerShape, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
- }
- else {
- GraphicsUtil.hideActivityMarker(containerShape, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
- }
- }
-
- @Override
- public int getWidth() {
- if (preferences.isExpandedDefault())
- return GraphicsUtil.SUB_PROCEESS_DEFAULT_WIDTH;
- return GraphicsUtil.TASK_DEFAULT_WIDTH;
- }
-
- @Override
- public int getHeight() {
- if (preferences.isExpandedDefault())
- return GraphicsUtil.SUB_PROCESS_DEFAULT_HEIGHT;
- return GraphicsUtil.TASK_DEFAULT_HEIGHT;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java
deleted file mode 100644
index b31a7b68..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
-
-import org.eclipse.bpmn2.AdHocSubProcess;
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.SubChoreography;
-import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.Transaction;
-import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
-import org.eclipse.bpmn2.modeler.core.features.activity.AbstractCreateExpandableFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.graphiti.features.IAddFeature;
-import org.eclipse.graphiti.features.ICreateFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.features.custom.ICustomFeature;
-
-public class SubProcessFeatureContainer extends AbstractExpandableActivityFeatureContainer {
-
- public static final String TRIGGERED_BY_EVENT = "triggered-by-event-key"; //$NON-NLS-1$
- public static final String IS_EXPANDED = "is-expanded-key"; //$NON-NLS-1$
-
- @Override
- public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof SubProcess &&
- !(o instanceof AdHocSubProcess || o instanceof Transaction);
- }
-
- @Override
- public ICreateFeature getCreateFeature(IFeatureProvider fp) {
- return new CreateSubProcessFeature(fp);
- }
-
- @Override
- public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddExpandableActivityFeature<SubProcess>(fp);
- }
-
- @Override
- public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- IUpdateFeature updateFeature = super.getUpdateFeature(fp);
- MultiUpdateFeature multiUpdate;
- if (updateFeature instanceof MultiUpdateFeature)
- multiUpdate = (MultiUpdateFeature)updateFeature;
- else
- multiUpdate = new MultiUpdateFeature(fp);
- UpdateExpandableActivityFeature ueaf = new UpdateExpandableActivityFeature(fp);
- multiUpdate.addUpdateFeature(ueaf);
- return multiUpdate;
- }
-
- public static class CreateSubProcessFeature extends AbstractCreateExpandableFlowNodeFeature<SubProcess> {
-
- public CreateSubProcessFeature(IFeatureProvider fp) {
- super(fp, Messages.SubProcessFeatureContainer_Name, Messages.SubProcessFeatureContainer_Description);
- }
-
- @Override
- protected String getStencilImageId() {
- return ImageProvider.IMG_16_SUB_PROCESS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
- */
- @Override
- public EClass getBusinessObjectClass() {
- return Bpmn2Package.eINSTANCE.getSubProcess();
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomConnectionFeatureContainer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomConnectionFeatureContainer.java
deleted file mode 100644
index a8ebfb44..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomConnectionFeatureContainer.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.task;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateConnectionFeature;
-import org.eclipse.bpmn2.modeler.core.features.IConnectionFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskImageProvider.IconSize;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.IExecutionInfo;
-import org.eclipse.graphiti.features.IAddFeature;
-import org.eclipse.graphiti.features.ICreateConnectionFeature;
-import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.ILayoutFeature;
-import org.eclipse.graphiti.features.IReconnectionFeature;
-import org.eclipse.graphiti.features.IRemoveFeature;
-import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.IAreaContext;
-import org.eclipse.graphiti.features.context.IContext;
-import org.eclipse.graphiti.features.context.ICreateConnectionContext;
-import org.eclipse.graphiti.features.context.impl.AddContext;
-import org.eclipse.graphiti.features.custom.ICustomFeature;
-import org.eclipse.graphiti.mm.pictograms.Connection;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.services.Graphiti;
-
-public class CustomConnectionFeatureContainer extends CustomElementFeatureContainer implements IConnectionFeatureContainer {
-
- public String getDescription() {
- if (customTaskDescriptor!=null)
- return customTaskDescriptor.getDescription();
- return Messages.CustomConnectionFeatureContainer_Description;
- }
-
- @Override
- public ICreateConnectionFeature getCreateConnectionFeature(IFeatureProvider fp) {
- return new CreateCustomConnectionFeature(fp);
- }
-
- @Override
- public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddCustomConnectionFeature(fp);
- }
-
- /**
- * @author bbrodt
- *
- * Base class for Custom Connection Feature construction. Custom Connections contributed to
- * the editor MUST subclass this!
- *
- * This class is intended for creation of BPMN2 objects that have custom model
- * extensions. This is for any object considered to be a "connection", e.g.
- * Sequence Flows, Associations, Message Flows and Conversation Links
- *
- * The creation process copies the modelObject ID string into the Graphiti create
- * context during the construction phase, then migrates that ID into the created
- * PictogramElement. This is necessary because the ID must be associated with the
- * PE to allow our BPMNFeatureProvider to correctly identify the Custom Task.
- */
- public class CreateCustomConnectionFeature extends AbstractBpmn2CreateConnectionFeature<BaseElement, EObject, EObject> {
-
- protected AbstractBpmn2CreateConnectionFeature createFeatureDelegate;
-
- public CreateCustomConnectionFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
- IConnectionFeatureContainer fc = (IConnectionFeatureContainer)getFeatureContainer(fp);
- createFeatureDelegate = (AbstractBpmn2CreateConnectionFeature)fc.getCreateConnectionFeature(fp);
- Assert.isNotNull(createFeatureDelegate);
- }
-
- public CreateCustomConnectionFeature(IFeatureProvider fp) {
- this(fp, customTaskDescriptor.getName(), customTaskDescriptor.getDescription());
- }
-
- @Override
- public boolean isAvailable(IContext context) {
- // Custom Elements are not available to the Context Button Pad:
- // The Graphiti CreateConnectionCommand constructs a single ICreateConnectionContext, and reuses
- // it for all command/context pairs that are collected for display and user selection in a popup
- // menu (@see org.eclipse.graphiti.ui.internal.command.CreateConnectionCommand#execute()).
- // Each command/context pair is first tested with @link org.eclipse.graphiti.internal.command#canExecute()
- // which eventually calls our @link CreateCustomConnectionFeature#canCreate() where we insert the
- // Custom Element ID into the context properties.
- // Thus, all command/context pairs will contain this ID and will attempt to create a Custom Element
- // when executed.
- return false;
- }
-
- @Override
- protected PictogramElement addGraphicalRepresentation(IAreaContext context, Object newObject) {
-
- // create a new AddContext and copy our ID into it.
- IAddContext addContext = new AddContext(context, newObject);
- setId(addContext, getId());
-
- // create the PE and copy our ID into its properties.
- PictogramElement pe = getFeatureProvider().addIfPossible(addContext);
- Graphiti.getPeService().setPropertyValue(pe,CUSTOM_ELEMENT_ID,id);
-
- return pe;
- }
-
- @Override
- public boolean canCreate(ICreateConnectionContext context) {
- // copy our ID into the CreateContext - this is where it all starts!
- setId(context, id);
- return createFeatureDelegate.canCreate(context);
- }
-
- @Override
- public boolean canStartConnection(ICreateConnectionContext context) {
- setId(context, id);
- return createFeatureDelegate.canStartConnection(context);
- }
-
- @Override
- public BaseElement createBusinessObject(ICreateConnectionContext context) {
- BaseElement businessObject = createFeatureDelegate.createBusinessObject(context);
- customTaskDescriptor.populateObject(businessObject, false);
- return businessObject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
- */
- @Override
- public EClass getBusinessObjectClass() {
- return createFeatureDelegate.getBusinessObjectClass();
- }
-
- @Override
- public Connection create(ICreateConnectionContext context) {
- // Our Custom Task ID should have already been set in canCreate()
- // if not, we have a problem; in other words, canCreate() MUST have
- // been called by the framework before create()
- Assert.isNotNull(getId(context));
- return createFeatureDelegate.create(context);
- }
-
- @Override
- public String getCreateImageId() {
- String icon = customTaskDescriptor.getIcon();
- if (icon!=null) {
- String id = customTaskDescriptor.getImageId(icon, IconSize.SMALL);
- if (id!=null)
- return id;
- }
- return createFeatureDelegate.getCreateImageId();
- }
-
- @Override
- public String getCreateLargeImageId() {
- String icon = customTaskDescriptor.getIcon();
- if (icon!=null) {
- String id = customTaskDescriptor.getImageId(icon, IconSize.LARGE);
- if (id!=null)
- return id;
- }
- return createFeatureDelegate.getCreateLargeImageId();
- }
-
- @Override
- protected Class<EObject> getSourceClass() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- protected Class<EObject> getTargetClass() {
- // TODO Auto-generated method stub
- return null;
- }
- }
-
- public class AddCustomConnectionFeature extends AbstractBpmn2AddFeature<BaseElement> {
-
- protected AbstractBpmn2AddFeature<BaseElement> addFeatureDelegate;
-
- /**
- * @param fp
- */
- public AddCustomConnectionFeature(IFeatureProvider fp) {
- super(fp);
- addFeatureDelegate = (AbstractBpmn2AddFeature)getFeatureContainer(fp).getAddFeature(fp);
- Assert.isNotNull(addFeatureDelegate);
- }
-
- @Override
- public PictogramElement add(IAddContext context) {
- PictogramElement pe = addFeatureDelegate.add(context);
- // make sure everyone knows that this PE is a custom task
- if (pe!=null)
- Graphiti.getPeService().setPropertyValue(pe,CUSTOM_ELEMENT_ID,getId());
-
- return pe;
- }
-
- @Override
- public BaseElement getBusinessObject(IAddContext context) {
- // TODO Auto-generated method stub
- return addFeatureDelegate.getBusinessObject(context);
- }
-
- @Override
- public void putBusinessObject(IAddContext context, BaseElement businessObject) {
- addFeatureDelegate.putBusinessObject(context, businessObject);
- }
-
- @Override
- public void postExecute(IExecutionInfo executionInfo) {
- addFeatureDelegate.postExecute(executionInfo);
- }
-
- @Override
- public boolean canAdd(IAddContext context) {
- return addFeatureDelegate.canAdd(context);
- }
- }
-
- @Override
- public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return getFeatureContainer(fp).getUpdateFeature(fp);
- }
-
- @Override
- public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
- return getFeatureContainer(fp).getDirectEditingFeature(fp);
- }
-
- @Override
- public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return getFeatureContainer(fp).getLayoutFeature(fp);
- }
-
- @Override
- public IRemoveFeature getRemoveFeature(IFeatureProvider fp) {
- return getFeatureContainer(fp).getRemoveFeature(fp);
- }
-
- @Override
- public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
- return getFeatureContainer(fp).getDeleteFeature(fp);
- }
-
- @Override
- public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
- return getFeatureContainer(fp).getCustomFeatures(fp);
- }
-
- @Override
- public IReconnectionFeature getReconnectionFeature(IFeatureProvider fp) {
- IConnectionFeatureContainer fc = (IConnectionFeatureContainer)getFeatureContainer(fp);
- return fc.getReconnectionFeature(fp);
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java
deleted file mode 100644
index 21a111c9..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.artifact;
-
-import org.eclipse.bpmn2.TextAnnotation;
-import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.features.artifact.AddTextAnnotationFeature;
-import org.eclipse.bpmn2.modeler.core.features.artifact.DirectEditTextAnnotationFeature;
-import org.eclipse.bpmn2.modeler.core.features.artifact.LayoutTextAnnotationFeature;
-import org.eclipse.bpmn2.modeler.core.features.artifact.MoveTextAnnotationFeature;
-import org.eclipse.bpmn2.modeler.core.features.artifact.UpdateTextAnnotationFeature;
-import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.graphiti.features.IAddFeature;
-import org.eclipse.graphiti.features.ICreateFeature;
-import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.ILayoutFeature;
-import org.eclipse.graphiti.features.IMoveShapeFeature;
-import org.eclipse.graphiti.features.IResizeShapeFeature;
-import org.eclipse.graphiti.features.IUpdateFeature;
-
-public class TextAnnotationFeatureContainer extends BaseElementFeatureContainer {
-
- @Override
- public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof TextAnnotation;
- }
-
- @Override
- public ICreateFeature getCreateFeature(IFeatureProvider fp) {
- return new CreateTextAnnotationFeature(fp);
- }
-
- @Override
- public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddTextAnnotationFeature(fp);
- }
-
- @Override
- public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return new UpdateTextAnnotationFeature(fp);
- }
-
- @Override
- public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
- return new DirectEditTextAnnotationFeature(fp);
- }
-
- @Override
- public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutTextAnnotationFeature(fp);
- }
-
- @Override
- public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
- return new MoveTextAnnotationFeature(fp);
- }
-
- @Override
- public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
- return new DefaultResizeBPMNShapeFeature(fp);
- }
-
- @Override
- public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
- return new AbstractDefaultDeleteFeature(fp);
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties
deleted file mode 100644
index 97b441dd..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-CreateTextAnnotationFeature_Description=Create Annotation
-CreateTextAnnotationFeature_Name=Annotation
-GroupFeatureContainer_Description=Create Group
-GroupFeatureContainer_Name=Group
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java
deleted file mode 100644
index dfe25239..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
-import org.eclipse.bpmn2.modeler.core.features.choreography.LayoutChoreographyFeature;
-import org.eclipse.bpmn2.modeler.core.features.choreography.UpdateChoreographyNameFeature;
-import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.ILayoutFeature;
-import org.eclipse.graphiti.features.IMoveShapeFeature;
-import org.eclipse.graphiti.features.IResizeShapeFeature;
-
-public abstract class AbstractChoreographyFeatureContainer extends BaseElementFeatureContainer {
-
- @Override
- public MultiUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateChoreographyNameFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateChoreographyParticipantRefsFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateChoreographyInitiatingParticipantFeature(fp));
- // multiUpdate.addUpdateFeature(new UpdateChoreographyMarkerFeature(fp)); use it when prop editor supports enums
- return multiUpdate;
- }
-
- @Override
- public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutChoreographyFeature(fp);
- }
-
- @Override
- public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
- return new MoveChoreographyFeature(fp);
- }
-
- @Override
- public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
- return new ResizeChoreographyFeature(fp);
- }
-
- @Override
- public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
- return new AbstractDefaultDeleteFeature(fp);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java
deleted file mode 100644
index 8dca8f4a..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.INITIATING_PARTICIPANT_REF;
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.MESSAGE_REF_IDS;
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.PARTICIPANT_REF_IDS;
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.R;
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.TEXT_H;
-import static org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil.drawMultiplicityMarkers;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.ChoreographyTask;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.di.ParticipantBandKind;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.algorithms.MultiText;
-import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-
-public class AddChoreographyActivityFeature<T extends ChoreographyActivity>
- extends AbstractBpmn2AddElementFeature<T> {
-
- protected final IGaService gaService = Graphiti.getGaService();
- protected final IPeService peService = Graphiti.getPeService();
-
- public AddChoreographyActivityFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canAdd(IAddContext context) {
- return context.getTargetContainer().equals(getDiagram());
- }
-
- @Override
- public PictogramElement add(IAddContext context) {
- T businessObject = getBusinessObject(context);
-
- int width = this.getWidth(context);
- int height = this.getHeight(context);
-
- ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
- RoundedRectangle containerRect = gaService.createRoundedRectangle(containerShape, R, R);
- gaService.setLocationAndSize(containerRect, context.getX(), context.getY(), width, height);
- StyleUtil.applyStyle(containerRect, businessObject);
-
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
- if (isImport) {
- addedFromImport(businessObject, containerShape, context);
- }
-
- Shape nameShape = peService.createShape(containerShape, false);
-
- MultiText text = gaService.createDefaultMultiText(getDiagram(), nameShape);
- text.setValue(businessObject.getName());
- StyleUtil.applyStyle(text, businessObject);
- text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
- setTextLocation(containerShape, text, width, height);
- peService.setPropertyValue(nameShape, ChoreographyProperties.CHOREOGRAPHY_NAME, Boolean.toString(true));
- GraphicsUtil.hideActivityMarker(containerShape, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
-
- if (businessObject instanceof ChoreographyTask) {
- peService.setPropertyValue(containerShape, MESSAGE_REF_IDS,
- ChoreographyUtil.getMessageRefIds((ChoreographyTask) businessObject));
- }
-
- peService.createChopboxAnchor(containerShape);
- createDIShape(containerShape, businessObject, !isImport);
-
- decorateShape(context, containerShape, businessObject);
-
- AnchorUtil.addFixedPointAnchors(containerShape, containerRect);
- ChoreographyUtil.drawMessageLinks(getFeatureProvider(),containerShape);
-
- return containerShape;
- }
-
- protected void addedFromImport(T choreographyActivity, ContainerShape containerShape,
- IAddContext context) {
-
- List<Participant> participants = choreographyActivity.getParticipantRefs();
- List<BPMNShape> allShapes = ModelUtil.getAllObjectsOfType(choreographyActivity.eResource(), BPMNShape.class);
- List<BPMNShape> participantBandShapes = new ArrayList<BPMNShape>();
- BPMNShape choreoBpmnShape = null;
-
- for (BPMNShape bpmnShape : allShapes) {
- if (choreographyActivity.equals(bpmnShape.getBpmnElement())) {
- choreoBpmnShape = bpmnShape;
- break;
- }
- }
-
- for (BPMNShape bpmnShape : allShapes) {
- if (participants.contains(bpmnShape.getBpmnElement())
- && choreoBpmnShape.equals(bpmnShape.getChoreographyActivityShape())) {
- participantBandShapes.add(bpmnShape);
- }
- }
-
- for (BPMNShape bpmnShape : participantBandShapes) {
- ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
- ContainerShape createdShape = ChoreographyUtil.createParticipantBandContainerShape(bandKind,
- containerShape, bpmnShape, isShowNames());
- createDIShape(createdShape, bpmnShape.getBpmnElement(), bpmnShape, false);
- Participant p = (Participant) bpmnShape.getBpmnElement();
- if (p.getParticipantMultiplicity() != null && p.getParticipantMultiplicity().getMaximum() > 1) {
- drawMultiplicityMarkers(createdShape);
- }
- }
-
- peService.setPropertyValue(containerShape, PARTICIPANT_REF_IDS,
- ChoreographyUtil.getParticipantRefIds(choreographyActivity));
- Participant initiatingParticipant = choreographyActivity.getInitiatingParticipantRef();
- String id = initiatingParticipant == null ? "null" : initiatingParticipant.getId(); //$NON-NLS-1$
- peService.setPropertyValue(containerShape, INITIATING_PARTICIPANT_REF, id);
- }
-
- protected void setTextLocation(ContainerShape choreographyContainer, AbstractText text, int w, int h) {
- gaService.setLocationAndSize(text, 5, 5, w - 5, h);
- }
-
- protected boolean isShowNames() {
- return true;
- }
-
- @Override
- public int getHeight() {
- return GraphicsUtil.CHOREOGRAPHY_HEIGHT;
- }
-
- @Override
- public int getWidth() {
- return GraphicsUtil.CHOREOGRAPHY_WIDTH;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddSubChoreographyFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddSubChoreographyFeature.java
deleted file mode 100644
index fff09220..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddSubChoreographyFeature.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.TEXT_H;
-
-import java.util.List;
-
-import org.eclipse.bpmn2.SubChoreography;
-import org.eclipse.bpmn2.modeler.core.utils.Tuple;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-
-public class AddSubChoreographyFeature extends AddChoreographyActivityFeature<SubChoreography> {
-
- public AddSubChoreographyFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- protected void setTextLocation(ContainerShape choreographyContainer, AbstractText text, int w, int h) {
- List<ContainerShape> bandContainers = ChoreographyUtil.getParticipantBandContainerShapes(choreographyContainer);
- Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottomBands = ChoreographyUtil
- .getTopAndBottomBands(bandContainers);
- List<ContainerShape> topBands = topAndBottomBands.getFirst();
-
- int y = 3;
- if (!topBands.isEmpty()) {
- ContainerShape containerShape = topBands.get(topBands.size() - 1);
- GraphicsAlgorithm ga = containerShape.getGraphicsAlgorithm();
- y = ga.getY() + ga.getHeight() + 3;
- }
-
- gaService.setLocationAndSize(text, 0, y, w, h);
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyUtil.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyUtil.java
deleted file mode 100644
index 584600bc..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyUtil.java
+++ /dev/null
@@ -1,948 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.ChoreographyLoopType;
-import org.eclipse.bpmn2.ChoreographyTask;
-import org.eclipse.bpmn2.InteractionNode;
-import org.eclipse.bpmn2.Message;
-import org.eclipse.bpmn2.MessageFlow;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.di.ParticipantBandKind;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.BoundaryAnchor;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Envelope;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.bpmn2.modeler.core.utils.Tuple;
-import org.eclipse.dd.dc.Bounds;
-import org.eclipse.dd.di.DiagramElement;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.datatypes.IDimension;
-import org.eclipse.graphiti.datatypes.ILocation;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IPictogramElementContext;
-import org.eclipse.graphiti.mm.PropertyContainer;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.Polyline;
-import org.eclipse.graphiti.mm.algorithms.Rectangle;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
-import org.eclipse.graphiti.mm.algorithms.Text;
-import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
-import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
-import org.eclipse.graphiti.mm.pictograms.Anchor;
-import org.eclipse.graphiti.mm.pictograms.Connection;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Diagram;
-import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-import org.eclipse.graphiti.ui.services.GraphitiUi;
-import org.eclipse.graphiti.util.IColorConstant;
-
-public class ChoreographyUtil implements ChoreographyProperties {
-
- private static IGaService gaService = Graphiti.getGaService();
- private static IPeService peService = Graphiti.getPeService();
-
- public static List<ContainerShape> getParticipantBandContainerShapes(
- ContainerShape choreographyActivityContainerShape) {
- List<ContainerShape> containers = new ArrayList<ContainerShape>();
- Collection<Shape> shapes = peService.getAllContainedShapes(choreographyActivityContainerShape);
- for (Shape s : shapes) {
- String property = peService.getPropertyValue(s, ChoreographyProperties.BAND);
- if (property != null && new Boolean(property)) {
- containers.add((ContainerShape) s);
- }
- }
- return containers;
- }
-
- public static List<BPMNShape> getParicipantBandBpmnShapes(ContainerShape choreographyActivityContainerShape) {
- List<BPMNShape> bpmnShapes = new ArrayList<BPMNShape>();
- List<ContainerShape> containers = getParticipantBandContainerShapes(choreographyActivityContainerShape);
- for (ContainerShape container : containers) {
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
- bpmnShapes.add(bpmnShape);
- }
- return bpmnShapes;
- }
-
- public static boolean isChoreographyParticipantBand(PictogramElement element) {
- EObject container = element.eContainer();
- if (container instanceof PictogramElement) {
- PictogramElement containerElem = (PictogramElement) container;
- Object bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(containerElem);
- if (bo instanceof ChoreographyActivity) {
- return true;
- }
- }
- return false;
- }
-
- public static boolean isChoreographyMessageLink(PictogramElement pe) {
- EObject o = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
- if (o instanceof MessageFlow && pe instanceof Connection) {
- Connection c = (Connection)pe;
- if (peService.getPropertyValue(c.getStart().getParent(),MESSAGE_LINK) != null)
- return true;
- if (peService.getPropertyValue(c.getEnd().getParent(),MESSAGE_LINK) != null)
- return true;
- }
- return false;
- }
-
- public static boolean isChoreographyMessage(PictogramElement pe) {
- EObject o = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
- if (o instanceof Message && pe instanceof ContainerShape) {
- if (peService.getPropertyValue(pe,MESSAGE_LINK) != null)
- return true;
- }
- return false;
- }
-
- public static boolean removeChoreographyMessageLink(PictogramElement pe) {
- if (isChoreographyMessageLink(pe)) {
- Connection connection = (Connection)pe;
- // remove the Message figure
- peService.deletePictogramElement( connection.getEnd().getParent() );
- // remove the connection
- peService.deletePictogramElement(connection);
- return true;
- }
- return false;
- }
-
- public static Tuple<List<ContainerShape>, List<ContainerShape>> getTopAndBottomBands(
- List<ContainerShape> participantBands) {
- List<ContainerShape> top = new ArrayList<ContainerShape>();
- List<ContainerShape> bottom = new ArrayList<ContainerShape>();
-
- if (participantBands.size() == 1) {
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(participantBands.get(0), BPMNShape.class);
- ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
- if (bandKind == ParticipantBandKind.TOP_INITIATING || bandKind == ParticipantBandKind.TOP_NON_INITIATING) {
- top.add(participantBands.get(0));
- } else if (bandKind == ParticipantBandKind.BOTTOM_INITIATING
- || bandKind == ParticipantBandKind.BOTTOM_NON_INITIATING) {
- bottom.add(participantBands.get(0));
- } else {
- top.add(participantBands.get(0));
- }
- } else {
- Collections.sort(participantBands, getParticipantBandComparator());
- int n = participantBands.size();
- int divider = n / 2;
- top.addAll(participantBands.subList(0, divider));
- bottom.addAll(participantBands.subList(divider, n));
- }
- return new Tuple<List<ContainerShape>, List<ContainerShape>>(top, bottom);
- }
-
- private static Comparator<ContainerShape> getParticipantBandComparator() {
- return new Comparator<ContainerShape>() {
-
- @Override
- public int compare(ContainerShape c1, ContainerShape c2) {
- BPMNShape bpmnShape1 = BusinessObjectUtil.getFirstElementOfType(c1, BPMNShape.class);
- Bounds bounds1 = bpmnShape1.getBounds();
- BPMNShape bpmnShape2 = BusinessObjectUtil.getFirstElementOfType(c2, BPMNShape.class);
- Bounds bounds2 = bpmnShape2.getBounds();
- return new Float(bounds1.getY()).compareTo(new Float(bounds2.getY()));
- }
-
- };
- }
-
- public static void resizePartipantBandContainerShapes(int w, int h, List<ContainerShape> top,
- List<ContainerShape> bottom, Diagram diagram) {
-
- int y = 0;
- for (ContainerShape container : top) {
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
- Bounds bounds = bpmnShape.getBounds();
- int hAcc = (int) bounds.getHeight();
- gaService.setLocationAndSize(container.getGraphicsAlgorithm(), 0, y, w, hAcc);
- y += hAcc;
- resizeParticipantBandChildren(container, w);
- DIUtils.updateDIShape(container);
- AnchorUtil.relocateFixPointAnchors(container, w, (int) bounds.getHeight());
- }
-
- Collections.reverse(bottom); // start from bottom towards center
- y = h;
- for (ContainerShape container : bottom) {
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
- Bounds bounds = bpmnShape.getBounds();
- y -= bounds.getHeight();
- gaService.setLocationAndSize(container.getGraphicsAlgorithm(), 0, y, w, (int) bounds.getHeight());
- resizeParticipantBandChildren(container, w);
- DIUtils.updateDIShape(container);
- AnchorUtil.relocateFixPointAnchors(container, w, (int) bounds.getHeight());
- }
- }
-
- private static void resizeParticipantBandChildren(ContainerShape container, int w) {
- for (Shape s : container.getChildren()) {
- GraphicsAlgorithm ga = s.getGraphicsAlgorithm();
- if (ga instanceof Text) {
- gaService.setSize(ga, w, ga.getHeight());
- } else if (ga instanceof Rectangle) {
- gaService.setLocation(ga, (w / 2) - (ga.getWidth() / 2), ga.getY());
- }
- }
- }
-
- public static String getParticipantRefIds(ChoreographyActivity choreography) {
- if (choreography.getParticipantRefs() == null) {
- return new String();
- }
- Iterator<Participant> iterator = choreography.getParticipantRefs().iterator();
- String delim = ":"; //$NON-NLS-1$
- StringBuilder sb = new StringBuilder();
- while (iterator.hasNext()) {
- Participant participant = iterator.next();
- sb.append(participant.getId());
- if (iterator.hasNext()) {
- sb.append(delim);
- }
- }
- return sb.toString();
- }
-
- public static String getMessageRefIds(ChoreographyTask choreography) {
- if (choreography.getMessageFlowRef() == null) {
- return new String();
- }
- Iterator<MessageFlow> iterator = choreography.getMessageFlowRef().iterator();
- String delim = ":"; //$NON-NLS-1$
- StringBuilder sb = new StringBuilder();
- while (iterator.hasNext()) {
- MessageFlow message = iterator.next();
- sb.append(message.getId());
- if (iterator.hasNext()) {
- sb.append(delim);
- }
- }
- return sb.toString();
- }
-
- public static void updateParticipantReferences(ContainerShape choreographyContainer,
- List<ContainerShape> currentParticipantContainers, List<Participant> newParticipants, IFeatureProvider fp,
- boolean showNames) {
-
- Diagram diagram = peService.getDiagramForShape(choreographyContainer);
- ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
- ChoreographyActivity.class);
-
- BPMNDiagram dia = BusinessObjectUtil.getFirstElementOfType(diagram, BPMNDiagram.class);
- List<DiagramElement> diElements = dia.getPlane().getPlaneElement();
- for (int i = 0; i < currentParticipantContainers.size(); i++) {
- ContainerShape container = currentParticipantContainers.get(i);
- for (Connection c : peService.getOutgoingConnections(container)) {
- EObject parent = c.getEnd().eContainer();
- if (parent instanceof PictogramElement) {
- peService.deletePictogramElement((PictogramElement) parent);
- }
- }
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
- diElements.remove(bpmnShape);
- peService.deletePictogramElement(container);
- }
-
- GraphicsAlgorithm ga = choreographyContainer.getGraphicsAlgorithm();
- IDimension size = gaService.calculateSize(ga);
-
- List<ContainerShape> newContainers = new ArrayList<ContainerShape>();
- int y = 0;
- boolean first = true;
-
- List<InteractionNode> sources = new ArrayList<InteractionNode>();
- if (choreography instanceof ChoreographyTask) {
- for (MessageFlow message : ((ChoreographyTask) choreography).getMessageFlowRef()) {
- sources.add(message.getSourceRef());
- }
- }
-
- Iterator<Participant> iterator = newParticipants.iterator();
- while (iterator.hasNext()) {
- Participant participant = iterator.next();
-
- ContainerShape bandShape = peService.createContainerShape(choreographyContainer, true);
-
- ParticipantBandKind bandKind = getNewParticipantBandKind(choreography, participant, first,
- !iterator.hasNext());
-
- boolean multiple = participant.getParticipantMultiplicity() != null
- && participant.getParticipantMultiplicity().getMaximum() > 1;
-
- int w = size.getWidth();
- int h = multiple ? 40 : 20;
-
- BPMNShape bpmnShape = DIUtils.createDIShape(bandShape, participant, 0, y + h, w, h, fp, diagram);
- bpmnShape.setChoreographyActivityShape(BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
- BPMNShape.class));
- bpmnShape.setIsMarkerVisible(multiple);
- bpmnShape.setParticipantBandKind(bandKind);
- bpmnShape.setIsMessageVisible(sources.contains(participant));
- createParticipantBandContainerShape(bandKind, choreographyContainer, bandShape, bpmnShape, showNames);
- if (multiple) {
- drawMultiplicityMarkers(bandShape);
- }
- newContainers.add(bandShape);
-
- y += h;
- first = false;
- }
-
- Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottom = getTopAndBottomBands(newContainers);
- resizePartipantBandContainerShapes(size.getWidth(), size.getHeight(), topAndBottom.getFirst(),
- topAndBottom.getSecond(), diagram);
- }
-
- private static ContainerShape createTopShape(ContainerShape parent, ContainerShape bandShape, BPMNShape bpmnShape,
- boolean initiating, boolean showNames) {
-
- if (bandShape == null) {
- bandShape = peService.createContainerShape(parent, true);
- }
-
- Bounds bounds = bpmnShape.getBounds();
- int w = (int) bounds.getWidth();
- int h = (int) bounds.getHeight();
-
- Diagram diagram = peService.getDiagramForPictogramElement(parent);
- RoundedRectangle band = gaService.createRoundedRectangle(bandShape, R, R);
- band.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
- band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
- diagram, IColorConstant.LIGHT_GRAY));
- gaService.setLocationAndSize(band, 0, 0, w, h);
-
- Participant p = (Participant) bpmnShape.getBpmnElement();
- if (showNames) {
- addBandLabel(bandShape, p.getName(), w, h);
- }
- Graphiti.getPeCreateService().createChopboxAnchor(bandShape);
- AnchorUtil.addFixedPointAnchors(bandShape, band);
- peService.setPropertyValue(bandShape, ChoreographyProperties.BAND, Boolean.toString(true));
- peService.setPropertyValue(bandShape, ChoreographyProperties.MESSAGE_VISIBLE,
- Boolean.toString(bpmnShape.isIsMessageVisible()));
- return bandShape;
- }
-
- private static ContainerShape createBottomShape(ContainerShape parent, ContainerShape bandShape,
- BPMNShape bpmnShape, boolean initiating, boolean showNames) {
-
- if (bandShape == null) {
- bandShape = peService.createContainerShape(parent, true);
- }
-
- Bounds bounds = bpmnShape.getBounds();
- int w = (int) bounds.getWidth();
- int h = (int) bounds.getHeight();
-
- ILocation parentLoc = peService.getLocationRelativeToDiagram(parent);
- int y = (int) bounds.getY() - parentLoc.getY();
-
- Diagram diagram = peService.getDiagramForPictogramElement(parent);
- RoundedRectangle band = gaService.createRoundedRectangle(bandShape, R, R);
- band.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
- band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
- diagram, IColorConstant.LIGHT_GRAY));
- gaService.setLocationAndSize(band, 0, y, w, h);
-
- Participant p = (Participant) bpmnShape.getBpmnElement();
- if (showNames) {
- addBandLabel(bandShape, p.getName(), w, h);
- }
- Graphiti.getPeCreateService().createChopboxAnchor(bandShape);
- AnchorUtil.addFixedPointAnchors(bandShape, band);
- peService.setPropertyValue(bandShape, ChoreographyProperties.BAND, Boolean.toString(true));
- peService.setPropertyValue(bandShape, ChoreographyProperties.MESSAGE_VISIBLE,
- Boolean.toString(bpmnShape.isIsMessageVisible()));
- return bandShape;
- }
-
- private static ContainerShape createMiddleShape(ContainerShape parent, ContainerShape bandShape,
- BPMNShape bpmnShape, boolean initiating, boolean showNames) {
-
- if (bandShape == null) {
- bandShape = peService.createContainerShape(parent, true);
- }
-
- Bounds bounds = bpmnShape.getBounds();
- int w = (int) bounds.getWidth();
- int h = (int) bounds.getHeight();
-
- ILocation parentLoc = peService.getLocationRelativeToDiagram(parent);
- int y = (int) bounds.getY() - parentLoc.getY();
-
- Diagram diagram = peService.getDiagramForPictogramElement(parent);
- Rectangle band = gaService.createRectangle(bandShape);
- band.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
- band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
- diagram, IColorConstant.LIGHT_GRAY));
- gaService.setLocationAndSize(band, 0, y, w, h);
-
- Participant p = (Participant) bpmnShape.getBpmnElement();
- if (showNames) {
- addBandLabel(bandShape, p.getName(), w, h);
- }
- Graphiti.getPeCreateService().createChopboxAnchor(bandShape);
- AnchorUtil.addFixedPointAnchors(bandShape, band);
- peService.setPropertyValue(bandShape, ChoreographyProperties.BAND, Boolean.toString(true));
- peService.setPropertyValue(bandShape, ChoreographyProperties.MESSAGE_VISIBLE,
- Boolean.toString(bpmnShape.isIsMessageVisible()));
- return bandShape;
- }
-
- private static void addBandLabel(ContainerShape container, String name, int w, int h) {
- Diagram diagram = peService.getDiagramForShape(container);
- Shape labelShape = peService.createShape(container, false);
- Text label = gaService.createDefaultText(diagram, labelShape);
- BaseElement be = BusinessObjectUtil.getFirstBaseElement(container);
- label.setValue(name);
- gaService.setLocationAndSize(label, 0, 0, w, h);
- StyleUtil.applyStyle(label, be);
- label.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- label.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
- }
-
- private static ParticipantBandKind getNewParticipantBandKind(ChoreographyActivity choreography,
- Participant participant, boolean first, boolean last) {
- boolean initiating = choreography.getInitiatingParticipantRef() != null
- && choreography.getInitiatingParticipantRef().equals(participant);
- if (first) {
- return initiating ? ParticipantBandKind.TOP_INITIATING : ParticipantBandKind.TOP_NON_INITIATING;
- } else if (last) {
- return initiating ? ParticipantBandKind.BOTTOM_INITIATING : ParticipantBandKind.BOTTOM_NON_INITIATING;
- } else {
- return initiating ? ParticipantBandKind.MIDDLE_INITIATING : ParticipantBandKind.MIDDLE_NON_INITIATING;
- }
- }
-
- private static ContainerShape drawMessageLink(String name, BoundaryAnchor boundaryAnchor, int x, int y, boolean filled) {
- Diagram diagram = peService.getDiagramForAnchor(boundaryAnchor.anchor);
-
- FreeFormConnection connection = peService.createFreeFormConnection(diagram);
- Polyline connectionLine = gaService.createPolyline(connection);
- connectionLine.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
- connectionLine.setLineStyle(LineStyle.DOT);
- connectionLine.setLineWidth(2);
-
- ContainerShape envelope = peService.createContainerShape(diagram, true);
- Rectangle invisibleRectangle = gaService.createInvisibleRectangle(envelope);
- gaService.setLocation(invisibleRectangle, x, y);
- gaService.setSize(invisibleRectangle, ENV_W + 50, ENV_H);
-
- Shape envelopeShape = peService.createShape(envelope, false);
- Envelope envelopeGa = GraphicsUtil.createEnvelope(envelopeShape, 0, 0, ENV_W, ENV_H);
- IColorConstant color = filled ? IColorConstant.LIGHT_GRAY : IColorConstant.WHITE;
- envelopeGa.rect.setFilled(true);
- envelopeGa.rect.setBackground(gaService.manageColor(diagram, color));
- envelopeGa.rect.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
- envelopeGa.line.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
- AnchorUtil.addFixedPointAnchors(envelope, envelopeGa.rect);
-
- Shape textShape = peService.createShape(envelope, false);
- Text text = gaService.createDefaultText(diagram, textShape);
- IDimension size = GraphitiUi.getUiLayoutService().calculateTextSize(name, text.getFont());
- gaService.setLocationAndSize(text, ENV_W + 3, 3, size.getWidth(), size.getHeight());
- text.setValue(name);
-
- gaService.setSize(invisibleRectangle, ENV_W + size.getWidth() + 3, ENV_H);
-
- AnchorLocation envelopeAnchorLoc = null;
- if (boundaryAnchor.locationType == AnchorLocation.TOP) {
- envelopeAnchorLoc = AnchorLocation.BOTTOM;
- } else {
- envelopeAnchorLoc = AnchorLocation.TOP;
- }
-
- connection.setStart(boundaryAnchor.anchor);
- connection.setEnd(AnchorUtil.getBoundaryAnchors(envelope).get(envelopeAnchorLoc).anchor);
- peService.setPropertyValue(envelope, MESSAGE_LINK, Boolean.toString(true));
- return envelope;
- }
-
- public static void drawMultiplicityMarkers(ContainerShape container) {
- Diagram diagram = peService.getDiagramForPictogramElement(container);
- Shape multiplicityShape = peService.createShape(container, false);
- Rectangle rect = gaService.createInvisibleRectangle(multiplicityShape);
-
- IDimension size = gaService.calculateSize(container.getGraphicsAlgorithm());
- int w = 10;
- int h = 10;
- int x = (size.getWidth() / 2) - (w / 2);
- int y = size.getHeight() - h - 1;
- gaService.setLocationAndSize(rect, x, y, w, h);
-
- int[][] coorinates = { new int[] { 0, 0, 0, h }, new int[] { 4, 0, 4, h }, new int[] { 8, 0, 8, h } };
- for (int[] xy : coorinates) {
- Polyline line = gaService.createPolyline(rect, xy);
- line.setLineWidth(2);
- line.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
- }
- }
-
- public static ContainerShape createParticipantBandContainerShape(ParticipantBandKind bandKind,
- ContainerShape container, ContainerShape bandContainer, BPMNShape bpmnShape, boolean showNames) {
-
- switch (bandKind) {
- case TOP_INITIATING:
- return createTopShape(container, bandContainer, bpmnShape, true, showNames);
- case TOP_NON_INITIATING:
- return createTopShape(container, bandContainer, bpmnShape, false, showNames);
- case MIDDLE_INITIATING:
- return createMiddleShape(container, bandContainer, bpmnShape, true, showNames);
- case MIDDLE_NON_INITIATING:
- return createMiddleShape(container, bandContainer, bpmnShape, false, showNames);
- case BOTTOM_INITIATING:
- return createBottomShape(container, bandContainer, bpmnShape, true, showNames);
- case BOTTOM_NON_INITIATING:
- return createBottomShape(container, bandContainer, bpmnShape, false, showNames);
- }
-
- return bandContainer;
- }
-
- public static ContainerShape createParticipantBandContainerShape(ParticipantBandKind bandKind,
- ContainerShape container, BPMNShape bpmnShape, boolean showNames) {
- return createParticipantBandContainerShape(bandKind, container, null, bpmnShape, showNames);
- }
-
- public static void drawMessageLinks(IFeatureProvider fp, ContainerShape choreographyContainer) {
-
- List<MessageFlow> messageFlows = new ArrayList<MessageFlow>();
- ChoreographyTask choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
- ChoreographyTask.class);
- if (choreography != null) {
- messageFlows.addAll(choreography.getMessageFlowRef());
- }
-
- List<ContainerShape> bandContainers = getParticipantBandContainerShapes(choreographyContainer);
- Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottom = getTopAndBottomBands(bandContainers);
- List<ContainerShape> shapesWithVisibleMessages = new ArrayList<ContainerShape>();
-
- Map<AnchorLocation, BoundaryAnchor> boundaryAnchors = AnchorUtil.getBoundaryAnchors(choreographyContainer);
- BoundaryAnchor topBoundaryAnchor = boundaryAnchors.get(AnchorLocation.TOP);
- BoundaryAnchor bottomBoundaryAnchor = boundaryAnchors.get(AnchorLocation.BOTTOM);
- int topConnectionIndex = 0;
- int bottomConnectionIndex = 0;
-
- boolean hasTopMessage = false;
- EList<Connection> topConnections = topBoundaryAnchor.anchor.getOutgoingConnections();
- for (int i = 0; i < topConnections.size(); i++) {
- Connection connection = topConnections.get(i);
- EObject container = connection.getEnd().eContainer();
- if (container instanceof PropertyContainer) {
- String property = peService.getPropertyValue((PropertyContainer) container, MESSAGE_LINK);
- if (Boolean.parseBoolean(property)) {
- topConnectionIndex = i;
- hasTopMessage = true;
- break;
- }
- }
- }
-
- boolean hasBottomMessage = false;
- EList<Connection> bottomConnections = bottomBoundaryAnchor.anchor.getOutgoingConnections();
- for (int i = 0; i < bottomConnections.size(); i++) {
- Connection connection = bottomConnections.get(i);
- EObject container = connection.getEnd().eContainer();
- if (container instanceof PropertyContainer) {
- String property = peService.getPropertyValue((PropertyContainer) container, MESSAGE_LINK);
- if (Boolean.parseBoolean(property)) {
- bottomConnectionIndex = i;
- hasBottomMessage = true;
- break;
- }
- }
- }
-
- Iterator<ContainerShape> iterator = bandContainers.iterator();
- while (iterator.hasNext()) {
- ContainerShape bandContainer = iterator.next();
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(bandContainer, BPMNShape.class);
- if (bpmnShape.isIsMessageVisible()) {
- shapesWithVisibleMessages.add(bandContainer);
- }
- }
-
- boolean shouldDrawTopMessage = !Collections.disjoint(topAndBottom.getFirst(), shapesWithVisibleMessages);
- boolean shouldDrawBottomMessage = !Collections.disjoint(topAndBottom.getSecond(), shapesWithVisibleMessages);
- ContainerShape envelope;
-
- String topMessageName = null;
- String bottomMessageName = null;
- Message topMessage = null;
- Message bottomMessage = null;
-
- if (shouldDrawTopMessage) {
- topMessage = getMessage(messageFlows, topAndBottom.getFirst(), false);
- topMessageName = getMessageName(messageFlows, topAndBottom.getFirst());
- }
- if (topMessageName == null) {
- topMessageName = new String();
- }
-
- if (shouldDrawBottomMessage) {
- bottomMessage = getMessage(messageFlows, topAndBottom.getSecond(), false);
- bottomMessageName = getMessageName(messageFlows, topAndBottom.getSecond());
- }
- if (bottomMessageName == null) {
- bottomMessageName = new String();
- }
-
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(choreographyContainer, BPMNShape.class);
- Bounds bounds = bpmnShape.getBounds();
- int x = (int) ((bounds.getX() + bounds.getWidth() / 2) - (ENV_W / 2));
-
- MessageFlow flow = getMessageFlow(messageFlows, topAndBottom.getFirst());
- envelope = null;
- if (!hasTopMessage && shouldDrawTopMessage && flow!=null) {
- int y = (int) (bounds.getY() - ENVELOPE_HEIGHT_MODIFIER - ENV_H);
- envelope = drawMessageLink(topMessageName, topBoundaryAnchor, x, y, isFilled(topAndBottom.getFirst()));
- if (topMessage!=null)
- fp.link(envelope, topMessage);
- peService.setPropertyValue(envelope, MESSAGE_NAME, topMessageName);
- } else if (hasTopMessage && !shouldDrawTopMessage) {
- envelope = (ContainerShape) topConnections.get(topConnectionIndex).getEnd().eContainer();
- peService.deletePictogramElement(topConnections.get(topConnectionIndex));
- peService.deletePictogramElement(envelope);
- envelope = null;
- } else if (hasTopMessage && shouldDrawTopMessage && flow!=null) {
- envelope = (ContainerShape) topConnections.get(topConnectionIndex).getEnd().eContainer();
- setMessageLabel(topMessageName, envelope);
- }
- if (envelope!=null) {
- // link up the message flow
- linkMessageFlow(fp, flow, envelope);
- }
-
- envelope = null;
- flow = getMessageFlow(messageFlows, topAndBottom.getSecond());
- if (!hasBottomMessage && shouldDrawBottomMessage && flow!=null) {
- int y = (int) (bounds.getY() + bounds.getHeight() + ENVELOPE_HEIGHT_MODIFIER);
- envelope = drawMessageLink(bottomMessageName, bottomBoundaryAnchor, x, y, isFilled(topAndBottom.getSecond()));
- if (bottomMessage!=null)
- fp.link(envelope, bottomMessage);
- peService.setPropertyValue(envelope, MESSAGE_NAME, bottomMessageName);
- } else if (hasBottomMessage && !shouldDrawBottomMessage) {
- envelope = (ContainerShape) bottomConnections.get(bottomConnectionIndex).getEnd()
- .eContainer();
- peService.deletePictogramElement(bottomConnections.get(bottomConnectionIndex));
- peService.deletePictogramElement(envelope);
- envelope = null;
- } else if (hasBottomMessage && shouldDrawBottomMessage && flow!=null) {
- envelope = (ContainerShape) bottomConnections.get(bottomConnectionIndex).getEnd()
- .eContainer();
- setMessageLabel(bottomMessageName, envelope);
- }
- if (envelope!=null) {
- // link up the message flow
- linkMessageFlow(fp, flow, envelope);
- }
-
- return;
- }
-
- private static void linkMessageFlow(IFeatureProvider fp, MessageFlow flow,ContainerShape envelope) {
- for (Anchor a : envelope.getAnchors()) {
- for (Connection c : a.getIncomingConnections()) {
- fp.link(c, flow);
- }
- for (Connection c : a.getOutgoingConnections()) {
- fp.link(c, flow);
- }
- }
- }
-
- private static boolean isFilled(List<ContainerShape> bands) {
- boolean filled = true;
- for (ContainerShape band : bands) {
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
- if (!bpmnShape.isIsMessageVisible()) {
- continue;
- }
- ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
- if (bandKind == ParticipantBandKind.TOP_INITIATING || bandKind == ParticipantBandKind.BOTTOM_INITIATING
- || bandKind == ParticipantBandKind.MIDDLE_INITIATING) {
- filled = false;
- break;
- }
- }
- return filled;
- }
-
- private static void setMessageLabel(String label, PictogramElement message) {
- ContainerShape containerShape = (ContainerShape) message;
- Iterator<Shape> iterator = peService.getAllContainedShapes(containerShape).iterator();
- while (iterator.hasNext()) {
- Shape shape = iterator.next();
- if (shape.getGraphicsAlgorithm() instanceof Text) {
- Text text = (Text) shape.getGraphicsAlgorithm();
- text.setValue(label);
- IDimension size = GraphitiUi.getUiLayoutService().calculateTextSize(label, text.getFont());
- gaService.setSize(containerShape.getGraphicsAlgorithm(), ENV_W + size.getWidth() + 3, ENV_H);
- gaService.setSize(text, size.getWidth(), size.getHeight());
- peService.setPropertyValue(containerShape, MESSAGE_NAME, label);
- break;
- }
- }
- }
-
- private static String getMessageName(List<MessageFlow> messageFlows, List<ContainerShape> bands) {
- for (ContainerShape band : bands) {
- Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
- if (bpmnShape.isIsMessageVisible()) {
- for (MessageFlow flow : messageFlows) {
- if (flow.getSourceRef().equals(participant)) {
- return getMessageFlowName(flow);
- }
- }
- }
- }
- return null;
- }
-
- private static MessageFlow getMessageFlow(List<MessageFlow> messageFlows, List<ContainerShape> bands) {
- for (ContainerShape band : bands) {
- Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
- if (bpmnShape.isIsMessageVisible()) {
- for (MessageFlow flow : messageFlows) {
- if (flow.getSourceRef().equals(participant)) {
- return flow;
- }
- }
- }
- }
- return null;
- }
-
- private static Message getMessage(List<MessageFlow> messageFlows, List<ContainerShape> bands, boolean create) {
- MessageFlow flow = getMessageFlow(messageFlows, bands);
- if (flow!=null) {
- if (flow.getMessageRef()==null && create) {
- Message msg = Bpmn2ModelerFactory.create(Message.class);
- msg.setName(Messages.ChoreographyUtil_Undefined_Message);
- ModelUtil.getDefinitions(flow).getRootElements().add(msg);
- flow.setMessageRef(msg);
- ModelUtil.setID(msg);
- }
- return flow.getMessageRef();
- }
- return null;
- }
-
- public static String getMessageFlowName(MessageFlow flow) {
- if (flow.getMessageRef() == null) {
- return flow.getName();
- } else if (flow.getMessageRef().getItemRef()==null ||
- flow.getMessageRef().getItemRef().getStructureRef()==null) {
- return flow.getMessageRef().getName();
- } else {
- String messageName = flow.getMessageRef().getName();
- String itemDefinitionName = ModelUtil.getDisplayName(flow.getMessageRef().getItemRef());
- String text = itemDefinitionName;
- if (messageName!=null && !messageName.isEmpty())
- text += "/" + messageName; //$NON-NLS-1$
- text = messageName;
- return text;
- }
- }
-
- public static String getMessageName(Message mesg) {
- if (mesg.getItemRef()==null ||
- mesg.getItemRef().getStructureRef()==null) {
- if (mesg.getName()==null)
- return mesg.getId();
- return mesg.getName();
- } else {
- String type = "(" + ModelUtil.getDisplayName(mesg.getItemRef()) +")"; //$NON-NLS-1$ //$NON-NLS-2$
- if (mesg.getName()==null)
- return type;
- return mesg.getName() + type;
- }
- }
-
- public static void updateChoreographyMessageLinks(IPictogramElementContext context) {
- ContainerShape choreographyTaskShape = (ContainerShape)context.getPictogramElement();
- if (true) {
- moveChoreographyMessageLinks(choreographyTaskShape);
- return;
- }
- // FIXME: when/if we figure out how to save the location for a Message attached to
- // a Participant Band (the BPMNShape.isMessageVisible==true for the Participant Band)
- // this code. Until then, it doesn't make sense to allow the Message to be moved.
- /*
- int dxTop = 0, dyTop = 0;
- int dxBottom = 0, dyBottom = 0;
- if (context instanceof IMoveShapeContext) {
- dxTop = dxBottom = ((IMoveShapeContext)context).getDeltaX();
- dyTop = dyBottom = ((IMoveShapeContext)context).getDeltaY();
- }
- else if (context instanceof IResizeShapeContext) {
- // If/when this code is implemented, we will have to figure out something
- // different for Graphiti 0.8.2 because the API has changed:
- // IResizeShapeContext.getDirection() was added in 0.9.0
- IDimension oldSize = GraphicsUtil.calculateSize(choreographyTaskShape);
- int direction = ((IResizeShapeContext)context).getDirection();
- int x = ((IResizeShapeContext)context).getX();
- int y = ((IResizeShapeContext)context).getY();
- int w = ((IResizeShapeContext)context).getWidth();
- int h = ((IResizeShapeContext)context).getHeight();
-
- if ((direction & IResizeShapeContext.DIRECTION_NORTH) != 0) {
- dyTop = (oldSize.getHeight() - h);
- }
- if ((direction & IResizeShapeContext.DIRECTION_EAST) != 0) {
- dxTop = dxBottom = (w - oldSize.getWidth())/2;
- }
- if ((direction & IResizeShapeContext.DIRECTION_SOUTH) != 0) {
- dyBottom = (h - oldSize.getHeight());
- }
- if ((direction & IResizeShapeContext.DIRECTION_WEST) != 0) {
- dxTop = dxBottom = (oldSize.getWidth() - w)/2;
- }
- }
- Map<AnchorLocation, BoundaryAnchor> boundaryAnchors = AnchorUtil.getBoundaryAnchors(choreographyTaskShape);
- BoundaryAnchor topBoundaryAnchor = boundaryAnchors.get(AnchorLocation.TOP);
- BoundaryAnchor bottomBoundaryAnchor = boundaryAnchors.get(AnchorLocation.BOTTOM);
-
- for (Connection connection : topBoundaryAnchor.anchor.getOutgoingConnections()) {
- EObject container = connection.getEnd().eContainer();
- if (container instanceof ContainerShape) {
- String property = peService.getPropertyValue((PropertyContainer) container, MESSAGE_LINK);
- if (property != null && new Boolean(property)) {
- ILocation loc = peService.getLocationRelativeToDiagram((ContainerShape)container);
- int x = loc.getX() + dxTop;
- int y = loc.getY() + dyTop;
- gaService.setLocation(((ContainerShape) container).getGraphicsAlgorithm(), x, y);
- break;
- }
- }
- }
-
- for (Connection connection : bottomBoundaryAnchor.anchor.getOutgoingConnections()) {
- EObject container = connection.getEnd().eContainer();
- if (container instanceof ContainerShape) {
- String property = peService.getPropertyValue((PropertyContainer) container, MESSAGE_LINK);
- if (property != null && new Boolean(property)) {
- ILocation loc = peService.getLocationRelativeToDiagram((ContainerShape)container);
- int x = loc.getX() + dxBottom;
- int y = loc.getY() + dyBottom;
- gaService.setLocation(((ContainerShape) container).getGraphicsAlgorithm(), x, y);
- break;
- }
- }
- }
- */
- }
-
- public static void moveChoreographyMessageLinks(ContainerShape choreographyTaskShape) {
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(choreographyTaskShape, BPMNShape.class);
- Bounds bounds = bpmnShape.getBounds();
- int x = (int) ((bounds.getX() + bounds.getWidth() / 2) - (ENV_W / 2));
-
- Map<AnchorLocation, BoundaryAnchor> boundaryAnchors = AnchorUtil.getBoundaryAnchors(choreographyTaskShape);
- BoundaryAnchor topBoundaryAnchor = boundaryAnchors.get(AnchorLocation.TOP);
- BoundaryAnchor bottomBoundaryAnchor = boundaryAnchors.get(AnchorLocation.BOTTOM);
-
- for (Connection connection : topBoundaryAnchor.anchor.getOutgoingConnections()) {
- EObject container = connection.getEnd().eContainer();
- if (container instanceof PropertyContainer) {
- String property = peService.getPropertyValue((PropertyContainer) container, MESSAGE_LINK);
- if (property != null && new Boolean(property)) {
- int y = (int) (bounds.getY() - ENVELOPE_HEIGHT_MODIFIER - ENV_H);
- gaService.setLocation(((ContainerShape) container).getGraphicsAlgorithm(), x, y);
- break;
- }
- }
- }
-
- for (Connection connection : bottomBoundaryAnchor.anchor.getOutgoingConnections()) {
- EObject container = connection.getEnd().eContainer();
- if (container instanceof PropertyContainer) {
- String property = peService.getPropertyValue((PropertyContainer) container, MESSAGE_LINK);
- if (property != null && new Boolean(property)) {
- int y = (int) (bounds.getY() + bounds.getHeight() + ENVELOPE_HEIGHT_MODIFIER);
- gaService.setLocation(((ContainerShape) container).getGraphicsAlgorithm(), x, y);
- break;
- }
- }
- }
- }
-
- public static void drawChoreographyLoopType(ContainerShape markerShape, ChoreographyLoopType type) {
- Collection<Shape> shapes = peService.getAllContainedShapes(markerShape);
- Shape drawingShape = null;
-
- if (shapes.size() == 1) { // remove previous shape
- Iterator<Shape> iterator = shapes.iterator();
- while (iterator.hasNext()) {
- Shape shape = iterator.next();
- drawingShape = shape;
- break;
- }
- }
-
- if (drawingShape != null) {
- peService.deletePictogramElement(drawingShape);
- }
-
- drawingShape = peService.createShape(markerShape, false);
- Rectangle rectangle = gaService.createInvisibleRectangle(drawingShape);
- gaService.setLocationAndSize(rectangle, 0, 0, MARKER_H, MARKER_H);
-
- if (type == null || type == ChoreographyLoopType.NONE) {
- return;
- }
-
- switch (type) {
- case STANDARD:
- // TODO implement when property editors supports enums
- break;
- case MULTI_INSTANCE_PARALLEL:
- // TODO implement when property editors supports enums
- break;
- case MULTI_INSTANCE_SEQUENTIAL:
- // TODO implement when property editors supports enums
- break;
- }
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java
deleted file mode 100644
index 6599ad89..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import java.util.Collection;
-
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.dd.dc.Bounds;
-import org.eclipse.graphiti.datatypes.ILocation;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeService;
-
-public class MoveChoreographyFeature extends MoveFlowNodeFeature {
-
- public MoveChoreographyFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- protected void postMoveShape(final IMoveShapeContext context) {
- super.postMoveShape(context);
- IPeService peService = Graphiti.getPeService();
- Collection<Shape> shapes = peService.getAllContainedShapes((ContainerShape) context.getShape());
- for (Shape s : shapes) {
- Participant participant = BusinessObjectUtil.getFirstElementOfType(s, Participant.class);
- if (participant != null) {
- ContainerShape container = (ContainerShape) s;
- GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
-
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(s, BPMNShape.class);
- ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(context.getShape());
-
- Bounds bounds = bpmnShape.getBounds();
- bounds.setX(loc.getX() + ga.getX());
- bounds.setY(loc.getY() + ga.getY());
- }
- }
- ChoreographyUtil.updateChoreographyMessageLinks(context);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java
deleted file mode 100644
index bf053c01..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import org.eclipse.bpmn2.ChoreographyTask;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IContext;
-import org.eclipse.graphiti.features.context.IRemoveContext;
-import org.eclipse.graphiti.features.impl.DefaultRemoveFeature;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-
-/**
- * @author Bob Brodt
- *
- */
-public class RemoveChoreographyParticipantFeature extends DefaultRemoveFeature {
-
- /**
- * @param fp
- */
- public RemoveChoreographyParticipantFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canRemove(IRemoveContext context) {
- // participant bands in a ChoreographyTask CAN be "removed" (from the modelObject's
- // participantRef list) but not "deleted" (from the model)
- if (ChoreographyUtil.isChoreographyParticipantBand(context.getPictogramElement())) {
- return true;
- }
- return false;
- }
-
- @Override
- public void execute(IContext context) {
- IRemoveContext dc = (IRemoveContext)context;
- if (ChoreographyUtil.isChoreographyParticipantBand(dc.getPictogramElement())) {
- PictogramElement pe = dc.getPictogramElement();
- Participant participant = (Participant)getBusinessObjectForPictogramElement(pe);
- ContainerShape container = (ContainerShape)pe.eContainer();
- Object bo = getBusinessObjectForPictogramElement(container);
- if (bo instanceof ChoreographyTask) {
- ChoreographyTask task = (ChoreographyTask)bo;
- task.getParticipantRefs().remove(participant);
- if (task.getInitiatingParticipantRef() == participant) {
- task.setInitiatingParticipantRef(null);
- }
- }
- }
- super.execute(context);
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java
deleted file mode 100644
index e56166ff..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.TEXT_H;
-
-import java.util.List;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ChoreographyLoopType;
-import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.SubChoreography;
-import org.eclipse.bpmn2.modeler.core.features.activity.AbstractCreateExpandableFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.core.features.choreography.LayoutChoreographyFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.Tuple;
-import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.graphiti.features.IAddFeature;
-import org.eclipse.graphiti.features.ICreateFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.ILayoutFeature;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-
-public class SubChoreographyFeatureContainer extends AbstractChoreographyFeatureContainer {
-
- @Override
- public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof SubChoreography;
- }
-
- @Override
- public ICreateFeature getCreateFeature(IFeatureProvider fp) {
- return new CreateSubChoreographyFeature(fp);
- }
-
- @Override
- public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddSubChoreographyFeature(fp);
- }
-
- @Override
- public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutChoreographyFeature(fp) {
- @Override
- protected void setTextLocation(ContainerShape choreographyContainer, AbstractText text, int w, int h) {
- List<ContainerShape> bandContainers = ChoreographyUtil
- .getParticipantBandContainerShapes(choreographyContainer);
- Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottomBands = ChoreographyUtil
- .getTopAndBottomBands(bandContainers);
- List<ContainerShape> topBands = topAndBottomBands.getFirst();
-
- int y = 3;
- if (!topBands.isEmpty()) {
- ContainerShape containerShape = topBands.get(topBands.size() - 1);
- GraphicsAlgorithm ga = containerShape.getGraphicsAlgorithm();
- y = ga.getY() + ga.getHeight() + 3;
- }
-
- gaService.setLocationAndSize(text, 0, y, w, h);
- }
- };
- }
-
- public static class CreateSubChoreographyFeature extends AbstractCreateExpandableFlowNodeFeature<SubChoreography> {
-
- public CreateSubChoreographyFeature(IFeatureProvider fp) {
- super(fp, Messages.SubChoreographyFeatureContainer_Name, Messages.SubChoreographyFeatureContainer_Description);
- }
-
- @Override
- public String getStencilImageId() {
- return ImageProvider.IMG_16_CHOREOGRAPHY_TASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
- */
- @Override
- public EClass getBusinessObjectClass() {
- return Bpmn2Package.eINSTANCE.getSubChoreography();
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java
deleted file mode 100644
index ca7ee348..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeService;
-
-public class UpdateChoreographyMarkerFeature extends AbstractUpdateFeature {
-
- private final IPeService peService = Graphiti.getPeService();
-
- public UpdateChoreographyMarkerFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- return BusinessObjectUtil.containsElementOfType(context.getPictogramElement(), ChoreographyActivity.class);
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- ContainerShape choreographyContainer = (ContainerShape) context.getPictogramElement();
- ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
- ChoreographyActivity.class);
-
- String loopType = choreography.getLoopType() == null ? "null" : choreography.getLoopType().getName(); //$NON-NLS-1$
- String property = peService.getPropertyValue(choreographyContainer, ChoreographyProperties.CHOREOGRAPHY_MARKER);
-
- if (!loopType.equals(property)) {
- return Reason.createTrueReason();
- } else {
- return Reason.createFalseReason();
- }
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- ContainerShape choreographyContainer = (ContainerShape) context.getPictogramElement();
- ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
- ChoreographyActivity.class);
-
- for (Shape s : peService.getAllContainedShapes(choreographyContainer)) {
- String property = peService.getPropertyValue(s, ChoreographyProperties.CHOREOGRAPHY_MARKER_SHAPE);
- if (property != null && new Boolean(property)) {
- ChoreographyUtil.drawChoreographyLoopType((ContainerShape) s, choreography.getLoopType());
- }
- }
-
- String loopType = choreography.getLoopType() == null ? "null" : choreography.getLoopType().getName(); //$NON-NLS-1$
- peService.setPropertyValue(choreographyContainer, ChoreographyProperties.CHOREOGRAPHY_MARKER, loopType);
-
- return true;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java
deleted file mode 100644
index f52c7719..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.MESSAGE_VISIBLE;
-
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-
-public class UpdateChoreographyMessageLinkFeature extends AbstractUpdateFeature {
-
- public UpdateChoreographyMessageLinkFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- return ChoreographyUtil.isChoreographyParticipantBand(context.getPictogramElement());
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
- if (!ChoreographyUtil.isChoreographyParticipantBand(context.getPictogramElement())) {
- return Reason.createFalseReason();
- }
-
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), BPMNShape.class);
- boolean visible = new Boolean(Graphiti.getPeService().getPropertyValue(context.getPictogramElement(),
- MESSAGE_VISIBLE));
-
- return bpmnShape.isIsMessageVisible() != visible ? Reason.createTrueReason() : Reason.createFalseReason();
- }
-
- @Override
- public boolean update(IUpdateContext context) {
-
- if (!canUpdate(context))
- return false;
-
- ChoreographyUtil.drawMessageLinks(getFeatureProvider(), (ContainerShape) context.getPictogramElement().eContainer());
-
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), BPMNShape.class);
- Graphiti.getPeService().setPropertyValue(context.getPictogramElement(), MESSAGE_VISIBLE,
- Boolean.toString(bpmnShape.isIsMessageVisible()));
-
- return true;
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyParticipantRefsFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyParticipantRefsFeature.java
deleted file mode 100644
index e329c6f4..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyParticipantRefsFeature.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.PARTICIPANT_REF_IDS;
-
-import java.util.List;
-
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeService;
-
-public class UpdateChoreographyParticipantRefsFeature extends AbstractUpdateFeature {
-
- private final IPeService peService = Graphiti.getPeService();
-
- public UpdateChoreographyParticipantRefsFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- return BusinessObjectUtil.containsElementOfType(context.getPictogramElement(), ChoreographyActivity.class);
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- ChoreographyActivity.class);
-
- if (!ChoreographyUtil.getParticipantRefIds(choreography).equals(getParticipantRefIds(context))) {
- return Reason.createTrueReason();
- } else {
- return Reason.createFalseReason();
- }
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- ChoreographyActivity.class);
- ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
- List<Participant> participants = choreography.getParticipantRefs();
- List<ContainerShape> bandContainerShapes = ChoreographyUtil
- .getParticipantBandContainerShapes((ContainerShape) context.getPictogramElement());
-
- ChoreographyUtil.updateParticipantReferences(containerShape, bandContainerShapes, participants,
- getFeatureProvider(), isShowNames());
-
- peService.setPropertyValue(context.getPictogramElement(), PARTICIPANT_REF_IDS,
- ChoreographyUtil.getParticipantRefIds(choreography));
-
- ChoreographyUtil.drawMessageLinks(getFeatureProvider(), (ContainerShape) context.getPictogramElement());
- return true;
- }
-
- private String getParticipantRefIds(IUpdateContext context) {
- String property = peService.getPropertyValue(context.getPictogramElement(), PARTICIPANT_REF_IDS);
- if (property == null) {
- return new String(); // return empty string
- }
- return property;
- }
-
- protected boolean isShowNames() {
- return true;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CreateConversationFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CreateConversationFeature.java
deleted file mode 100644
index 876d6097..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CreateConversationFeature.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.conversation;
-
-import java.io.IOException;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.Conversation;
-import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateContext;
-
-public class CreateConversationFeature extends AbstractBpmn2CreateFeature<Conversation> {
-
- public CreateConversationFeature(IFeatureProvider fp) {
- super(fp, Messages.CreateConversationFeature_Name, Messages.CreateConversationFeature_Description);
- }
-
- @Override
- public boolean canCreate(ICreateContext context) {
- return context.getTargetContainer().equals(getDiagram());
- }
-
- @Override
- public Object[] create(ICreateContext context) {
- Conversation c = createBusinessObject(context);
- addGraphicalRepresentation(context, c);
- return new Object[] { c };
- }
-
- @Override
- public String getCreateImageId() {
- return ImageProvider.IMG_16_CONVERSATION;
- }
-
- @Override
- public String getCreateLargeImageId() {
- return ImageProvider.IMG_16_CONVERSATION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getBusinessObjectClass()
- */
- @Override
- public EClass getBusinessObjectClass() {
- return Bpmn2Package.eINSTANCE.getConversation();
- }
-
- @Override
- public Conversation createBusinessObject(ICreateContext context) {
- Conversation bo = null;
- try {
- Resource resource = ModelUtil.getResource(getDiagram());
- bo = Bpmn2ModelerFactory.create(Conversation.class);
- ModelHandler mh = ModelHandler.getInstance(getDiagram());
- bo.setName(Messages.CreateConversationFeature_Name);
- BPMNDiagram bpmnDiagram = BusinessObjectUtil.getFirstElementOfType(context.getTargetContainer(), BPMNDiagram.class);
- mh.addConversationNode(bpmnDiagram,bo);
- ModelUtil.setID(bo);
- putBusinessObject(context, bo);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return bo;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java
deleted file mode 100644
index 2a2af98d..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.bpmn2.modeler.ui.features.conversation;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.features.conversation.messages"; //$NON-NLS-1$
- public static String ConversationLinkFeatureContainer_Description;
- public static String ConversationLinkFeatureContainer_Name;
- public static String CreateConversationFeature_Description;
- public static String CreateConversationFeature_Name;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties
deleted file mode 100644
index 66f77b7a..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-ConversationLinkFeatureContainer_Description=Create Conversation Link
-ConversationLinkFeatureContainer_Name=Conversation Link
-CreateConversationFeature_Description=Create Conversation
-CreateConversationFeature_Name=Conversation
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateDataObjectFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateDataObjectFeature.java
deleted file mode 100644
index 1410d603..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateDataObjectFeature.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.data;
-
-import java.util.Iterator;
-
-import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.DataObject;
-import org.eclipse.bpmn2.DataObjectReference;
-import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.RootElement;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
-import org.eclipse.bpmn2.modeler.core.features.data.Properties;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IReason;
-import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.context.impl.UpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
-import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.algorithms.Polyline;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeService;
-
-public class UpdateDataObjectFeature extends AbstractUpdateFeature {
-
-
- public UpdateDataObjectFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public boolean canUpdate(IUpdateContext context) {
- Object o = getBusinessObjectForPictogramElement(context.getPictogramElement());
- return o instanceof DataObject || o instanceof DataObjectReference;
- }
-
- @Override
- public IReason updateNeeded(IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
- IPeService peService = Graphiti.getPeService();
- ContainerShape container = (ContainerShape) context.getPictogramElement();
- Object bo = getBusinessObjectForPictogramElement(container);
- DataObject data = null;
- if (bo instanceof DataObject)
- data = (DataObject) bo;
- else if (bo instanceof DataObjectReference)
- data = ((DataObjectReference)bo).getDataObjectRef();
-
- boolean isCollection = Boolean.parseBoolean(peService.getPropertyValue(container,
- Properties.COLLECTION_PROPERTY));
- return data.isIsCollection() != isCollection ? Reason.createTrueReason() : Reason.createFalseReason();
- }
-
- @Override
- public boolean update(IUpdateContext context) {
- IPeService peService = Graphiti.getPeService();
- ContainerShape container = (ContainerShape) context.getPictogramElement();
- Object bo = getBusinessObjectForPictogramElement(container);
- DataObject data = null;
- if (bo instanceof DataObject)
- data = (DataObject) bo;
- else if (bo instanceof DataObjectReference)
- data = ((DataObjectReference)bo).getDataObjectRef();
-
- boolean drawCollectionMarker = data.isIsCollection();
-
- Iterator<Shape> iterator = peService.getAllContainedShapes(container).iterator();
- while (iterator.hasNext()) {
- Shape shape = iterator.next();
- String prop = peService.getPropertyValue(shape, Properties.HIDEABLE_PROPERTY);
- if (prop != null && new Boolean(prop)) {
- Polyline line = (Polyline) shape.getGraphicsAlgorithm();
- line.setLineVisible(drawCollectionMarker);
- }
- }
-
- peService.setPropertyValue(container, Properties.COLLECTION_PROPERTY,
- Boolean.toString(data.isIsCollection()));
-
- // Also update any DataObjectReferences
- if (bo instanceof DataObject) {
- Definitions definitions = ModelUtil.getDefinitions(data);
- TreeIterator<EObject> iter = definitions.eAllContents();
- while (iter.hasNext()) {
- EObject o = iter.next();
- if (o instanceof DataObjectReference) {
- for (PictogramElement pe : Graphiti.getLinkService().getPictogramElements(getDiagram(), o)) {
- if (pe instanceof ContainerShape) {
- UpdateContext newContext = new UpdateContext(pe);
- IUpdateFeature f = this.getFeatureProvider().getUpdateFeature(newContext);
- f.update(newContext);
- }
- }
- }
- }
- }
-
- return true;
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java
deleted file mode 100644
index f012ec6e..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.features.lane;
-
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.IResizeShapeFeature;
-import org.eclipse.graphiti.features.context.IDeleteContext;
-import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-
-/**
- * @author Bob Brodt
- *
- */
-public class DeleteLaneFeature extends AbstractDefaultDeleteFeature {
-
- /**
- * @param fp
- */
- public DeleteLaneFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public void delete(IDeleteContext context) {
- ContainerShape laneContainerShape = (ContainerShape) context.getPictogramElement();
- ContainerShape parentContainerShape = laneContainerShape.getContainer();
-
- if (parentContainerShape != null) {
- boolean before = false;
- ContainerShape neighborContainerShape = FeatureSupport.getLaneAfter(laneContainerShape);
- if (neighborContainerShape == null) {
- neighborContainerShape = FeatureSupport.getLaneBefore(laneContainerShape);
- if (neighborContainerShape == null) {
- super.delete(context);
- return;
- } else {
- before = true;
- }
- }
- boolean isHorizontal = FeatureSupport.isHorizontal(laneContainerShape);
- GraphicsAlgorithm ga = laneContainerShape.getGraphicsAlgorithm();
- GraphicsAlgorithm neighborGA = neighborContainerShape.getGraphicsAlgorithm();
- ResizeShapeContext newContext = new ResizeShapeContext(neighborContainerShape);
- if (!before) {
- Graphiti.getGaService().setLocation(neighborGA, ga.getX(), ga.getY());
- }
- newContext.setLocation(neighborGA.getX(), neighborGA.getY());
- if (isHorizontal) {
- newContext.setHeight(neighborGA.getHeight() + ga.getHeight());
- newContext.setWidth(neighborGA.getWidth());
- } else {
- newContext.setHeight(neighborGA.getHeight());
- newContext.setWidth(neighborGA.getWidth() + ga.getWidth());
- }
-
- IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(newContext);
- if (resizeFeature.canResizeShape(newContext)) {
- super.delete(context);
- resizeFeature.resizeShape(newContext);
- return;
- }
- }
- super.delete(context);
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties
deleted file mode 100644
index 3836c244..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-CreateLaneFeature_Default_Name=Lane
-CreateLaneFeature_Description=Create Lane
-CreateLaneFeature_Name=Lane
-RotateLaneFeature_Description=Switch the orientation of this Lane between horizontal and vertical
-RotateLaneFeature_Name=Change Lane Orientation
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties
deleted file mode 100644
index fb451247..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-CreateParticipantFeature_Default_Pool_Name=Pool
-CreateParticipantFeature_Default_Process_Name=\ Process
-CreateParticipantFeature_Description=Create Pool
-CreateParticipantFeature_Name=Pool
-RotatePoolFeature_Description=Switch the orientation of this Pool between horizontal and vertical
-RotatePoolFeature_Name=Change Pool Orientation
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java
deleted file mode 100644
index 3b442124..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java
+++ /dev/null
@@ -1,652 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.preferences;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map.Entry;
-
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
-import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.RoutingStyle;
-import org.eclipse.bpmn2.modeler.ui.FeatureMap;
-import org.eclipse.bpmn2.modeler.ui.Messages;
-import org.eclipse.graphiti.mm.algorithms.styles.Font;
-import org.eclipse.graphiti.util.IColorConstant;
-import org.eclipse.jface.preference.ColorSelector;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.resource.StringConverter;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FontDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.osgi.service.prefs.BackingStoreException;
-
-
-@SuppressWarnings("nls")
-public class Bpmn2EditorAppearancePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- class ShapeStyleCategoryList extends LinkedHashMap<String, ShapeStyleList> {
- }
- class ShapeStyleList extends LinkedHashMap<Class, ShapeStyle> {
- }
-
- Bpmn2Preferences preferences;
- TreeViewer elementsTreeViewer;
- List<Class> allElements;
- Composite styleEditors;
- Composite container;
- ShapeStyleList allShapeStyles;
- ShapeStyleCategoryList categories;
- Class currentSelection;
- ColorControl shapeBackground;
- ColorControl shapePrimarySelectedColor;
- ColorControl shapeSecondarySelectedColor;
- ColorControl shapeForeground;
- Button defaultSize;
- FontControl textFont;
- ColorControl textColor;
- Label routingStyleLabel;
- Combo routingStyle;
-
-
- public Bpmn2EditorAppearancePreferencePage() {
- setPreferenceStore(Activator.getDefault().getPreferenceStore());
- preferences = Bpmn2Preferences.getInstance();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- @Override
- public void init(IWorkbench workbench) {
- allElements = new ArrayList<Class>();
- allElements.addAll(FeatureMap.CONNECTORS);
- allElements.addAll(FeatureMap.EVENTS);
- allElements.addAll(FeatureMap.GATEWAYS);
- allElements.addAll(FeatureMap.TASKS);
- allElements.addAll(FeatureMap.DATA);
- allElements.addAll(FeatureMap.OTHER);
- Collections.sort(allElements, new Comparator<Class>() {
-
- @Override
- public int compare(Class arg0, Class arg1) {
- return arg0.getSimpleName().compareTo(arg1.getSimpleName());
- }
-
- });
- }
-
- @Override
- protected Control createContents(Composite parent) {
-
- GridLayout layout = (GridLayout)parent.getLayout();
- GridData data;
-
- container = new Composite(parent, SWT.NONE);
- container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- container.setLayout(new GridLayout(2, false));
-
- final Group elementsGroup = new Group(container, SWT.NONE);
- elementsGroup.setText(Messages.Bpmn2EditorAppearancePreferencePage_GraphicalElements_Group);
- data = new GridData(SWT.FILL,SWT.TOP,true,true,1,1);
- data.heightHint = 50;
- elementsGroup.setLayoutData(data);
- elementsGroup.setLayout(new GridLayout(1,false));
-
- elementsTreeViewer = new TreeViewer(elementsGroup, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- Tree elementsTree = elementsTreeViewer.getTree();
- data = new GridData(SWT.FILL,SWT.TOP,true,true,1,1);
- data.heightHint = 50;
- elementsTree.setLayoutData(data);
-
- elementsTreeViewer.setContentProvider(new BEListContentProvider());
- elementsTreeViewer.setLabelProvider(new BEListLabelProvider());
- elementsTreeViewer.addSelectionChangedListener(new BEListSelectionChangedListener());
- parent.addControlListener(new ControlAdapter() {
- @Override
- public void controlResized(ControlEvent e) {
- GridData gd = (GridData) elementsGroup.getLayoutData();
- gd.heightHint = 1000;
- gd = (GridData) elementsTreeViewer.getTree().getLayoutData();
- gd.heightHint = 1000;
- container.layout();
- }
- });
-
- Group styleGroup = new Group(container, SWT.NONE);
- styleGroup.setText(Messages.Bpmn2EditorAppearancePreferencePage_Colors_Group);
- styleGroup.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false,1,1));
- styleGroup.setLayout(new GridLayout(1,false));
-
- styleEditors = new Composite(styleGroup, SWT.NONE);
- styleEditors.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false,1,1));
- layout = new GridLayout(1,false);
- layout.verticalSpacing = 0;
- styleEditors.setLayout(layout);
- styleEditors.setFont(parent.getFont());
- styleEditors.setVisible(false);
-
- shapeBackground = new ColorControl(Messages.Bpmn2EditorPreferencePage_Fill_Color_Label,styleEditors);
- shapeBackground.addSelectionListener( new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- ShapeStyle ss = allShapeStyles.get(currentSelection);
- IColorConstant c = shapeBackground.getSelectedColor();
- if (!ShapeStyle.compare(ss.getShapeBackground(),c)) {
- // update secondary colors
- ss.setDefaultColors(c);
- shapePrimarySelectedColor.setSelectedColor(ss.getShapePrimarySelectedColor());
- shapeSecondarySelectedColor.setSelectedColor(ss.getShapeSecondarySelectedColor());
- shapeForeground.setSelectedColor(ss.getShapeForeground());
- textColor.setSelectedColor(ss.getTextColor());
- }
- }
- });
- shapeForeground = new ColorControl(Messages.Bpmn2EditorPreferencePage_Foreground_Color_Label,styleEditors);
- shapePrimarySelectedColor = new ColorControl(Messages.Bpmn2EditorPreferencePage_Selected_Color_Label,styleEditors);
- shapeSecondarySelectedColor = new ColorControl(Messages.Bpmn2EditorPreferencePage_MultiSelected_Color_Label,styleEditors);
- textColor = new ColorControl(Messages.Bpmn2EditorPreferencePage_Label_Color_Label,styleEditors);
- textFont = new FontControl(Messages.Bpmn2EditorPreferencePage_Label_Font_Label,styleEditors);
- defaultSize = new Button(styleEditors, SWT.CHECK);
- defaultSize.setText(Messages.Bpmn2EditorPreferencePage_Override_Size_Label);
- GridData gd = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
- gd.horizontalIndent = 5;
- gd.verticalIndent = 10;
- defaultSize.setLayoutData(gd);
-
- Composite routingStyleComposite = new Composite(styleEditors, SWT.NONE);
- routingStyleComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,1,1));
- layout = new GridLayout(2,false);
- routingStyleComposite.setLayout(layout);
-
- routingStyleLabel = new Label(routingStyleComposite, SWT.LEFT);
- routingStyleLabel.setText(Messages.Bpmn2EditorPreferencePage_Routing_Style_Label);
- routingStyleLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
- routingStyle = new Combo(routingStyleComposite, SWT.READ_ONLY);
- routingStyle.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
-
- loadStyleEditors();
-
- return container;
- }
-
- private void saveStyleEditors() {
- if (currentSelection!=null) {
- ShapeStyle ss = allShapeStyles.get(currentSelection);
- ss.setShapeBackground(shapeBackground.getSelectedColor());
- ss.setShapePrimarySelectedColor(shapePrimarySelectedColor.getSelectedColor());
- ss.setShapeSecondarySelectedColor(shapeSecondarySelectedColor.getSelectedColor());
- ss.setShapeForeground(shapeForeground.getSelectedColor());
- ss.setDefaultSize(defaultSize.getSelection());
- ss.setTextFont(textFont.getSelectedFont());
- ss.setTextColor(textColor.getSelectedColor());
- RoutingStyle rs = ss.getRoutingStyle();
- int i = routingStyle.getSelectionIndex();
- if (i>=0) {
- rs = RoutingStyle.values()[i];
- }
- ss.setRoutingStyle(rs);
- }
- }
-
- private void loadStyleEditors() {
- if (allShapeStyles == null) {
- categories = new ShapeStyleCategoryList();
- ShapeStyleList connectorShapeStyles = new ShapeStyleList();
- ShapeStyleList eventShapeStyles = new ShapeStyleList();
- ShapeStyleList gatewayShapeStyles = new ShapeStyleList();
- ShapeStyleList taskShapeStyles = new ShapeStyleList();
- ShapeStyleList dataShapeStyles = new ShapeStyleList();
- ShapeStyleList otherShapeStyles = new ShapeStyleList();
- categories.put(Messages.Bpmn2EditorPreferencePage_Connections, connectorShapeStyles);
- categories.put(Messages.Bpmn2EditorPreferencePage_Events, eventShapeStyles);
- categories.put(Messages.Bpmn2EditorPreferencePage_Gateways, gatewayShapeStyles);
- categories.put(Messages.Bpmn2EditorPreferencePage_Activities, taskShapeStyles);
- categories.put(Messages.Bpmn2EditorPreferencePage_Data_Elements, dataShapeStyles);
- categories.put(Messages.Bpmn2EditorPreferencePage_Containers, otherShapeStyles);
-
- allShapeStyles = new ShapeStyleList();
- for (Class c : allElements) {
- ShapeStyle ss = preferences.getShapeStyle(c);
- allShapeStyles.put(c, ss);
-
- if (FeatureMap.CONNECTORS.contains(c))
- connectorShapeStyles.put(c, ss);
- if (FeatureMap.EVENTS.contains(c))
- eventShapeStyles.put(c, ss);
- if (FeatureMap.GATEWAYS.contains(c))
- gatewayShapeStyles.put(c, ss);
- if (FeatureMap.TASKS.contains(c))
- taskShapeStyles.put(c, ss);
- if (FeatureMap.DATA.contains(c))
- dataShapeStyles.put(c, ss);
- if (FeatureMap.OTHER.contains(c))
- otherShapeStyles.put(c, ss);
-
- if (Activator.getDefault().isDebugging()) {
- IColorConstant foreground = ss.getShapeForeground();
- IColorConstant background = ss.getShapeBackground();
- IColorConstant textColor = ss.getTextColor();
- Font font = ss.getTextFont();
- System.out.println("\t\t<style object=\"" + c.getSimpleName() + "\"" + " foreground=\"" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + ShapeStyle.colorToString(foreground) + "\"" + " background=\"" //$NON-NLS-1$ //$NON-NLS-2$
- + ShapeStyle.colorToString(background) + "\"" + " textColor=\"" //$NON-NLS-1$ //$NON-NLS-2$
- + ShapeStyle.colorToString(textColor) + "\"" + " font=\"" + ShapeStyle.fontToString(font) //$NON-NLS-1$ //$NON-NLS-2$
- + "\"/>"); //$NON-NLS-1$
- }
- }
-
- currentSelection = null;
- elementsTreeViewer.setInput(categories);
- elementsTreeViewer.setSelection(null);
-// styleEditors.setVisible(false);
- }
-
- if (currentSelection instanceof Class) {
- Class c = (Class)currentSelection;
- ShapeStyle ss = allShapeStyles.get(c);
-
- shapeBackground.setSelectedColor(ss.getShapeBackground());
- shapePrimarySelectedColor.setSelectedColor(ss.getShapePrimarySelectedColor());
- shapeSecondarySelectedColor.setSelectedColor(ss.getShapeSecondarySelectedColor());
- shapeForeground.setSelectedColor(ss.getShapeForeground());
- defaultSize.setSelection(ss.isDefaultSize());
- textFont.setSelectedFont(ss.getTextFont());
- textColor.setSelectedColor(ss.getTextColor());
-
- boolean isShape = true;
- if (FeatureMap.CONNECTORS.contains(c)) {
- isShape = false;
- }
- shapeBackground.setVisible(isShape);
- ((GridData)shapeBackground.getLayoutData()).exclude = !isShape;
- shapePrimarySelectedColor.setVisible(isShape);
- ((GridData)shapePrimarySelectedColor.getLayoutData()).exclude = !isShape;
- shapeSecondarySelectedColor.setVisible(isShape);
- ((GridData)shapeSecondarySelectedColor.getLayoutData()).exclude = !isShape;
- defaultSize.setVisible(isShape);
- ((GridData)defaultSize.getLayoutData()).exclude = !isShape;
- routingStyle.setVisible(!isShape);
- ((GridData)routingStyle.getLayoutData()).exclude = isShape;
- routingStyleLabel.setVisible(!isShape);
- ((GridData)routingStyleLabel.getLayoutData()).exclude = isShape;
- if (!isShape) {
- routingStyle.removeAll();
- int i = 0;
- for (RoutingStyle rs : RoutingStyle.values()) {
- routingStyle.add(rs.name());
- if (ss.getRoutingStyle() == rs)
- routingStyle.select(i);
- ++i;
- }
- }
- container.layout();
- }
- }
-
- @Override
- protected void performDefaults() {
- try {
- preferences.setToDefault(Bpmn2Preferences.PREF_SHAPE_STYLE);
- allShapeStyles = null;
- loadStyleEditors();
- preferences.flush();
- }
- catch(Exception e) {
- }
- super.performDefaults();
- }
-
- @Override
- public boolean performOk() {
- saveStyleEditors();
- for (Entry<Class, ShapeStyle> entry : allShapeStyles.entrySet()) {
- preferences.setShapeStyle(entry.getKey(), entry.getValue());
- }
- try {
- preferences.flush();
- } catch (BackingStoreException e) {
- e.printStackTrace();
- }
- return super.performOk();
- }
-
- public class BEListContentProvider implements ITreeContentProvider {
-
- ShapeStyleCategoryList categories;
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof ShapeStyleCategoryList) {
- categories = (ShapeStyleCategoryList) newInput;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- @Override
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof Entry) {
- Entry entry = (Entry)inputElement;
- if (entry.getKey() instanceof String) {
-
- }
- }
- if (inputElement instanceof ShapeStyleCategoryList) {
- ShapeStyleCategoryList categories = (ShapeStyleCategoryList)inputElement;
- return categories.entrySet().toArray();
- }
- if (inputElement instanceof ShapeStyleList) {
- ShapeStyleList shapeStyles = (ShapeStyleList)inputElement;
- return shapeStyles.keySet().toArray();
- }
- return null;
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof Entry) {
- Entry entry = (Entry)parentElement;
- if (entry.getKey() instanceof String) {
- String key = (String)entry.getKey();
- return categories.get(key).entrySet().toArray();
- }
- }
- return null;
- }
-
- @Override
- public Object getParent(Object element) {
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof Entry) {
- Entry entry = (Entry)element;
- if (entry.getKey() instanceof String)
- return true;
- }
- return false;
- }
-
- }
-
- public class BEListLabelProvider extends LabelProvider {
-
- @Override
- public String getText(Object element) {
- if (element instanceof Entry) {
- Entry entry = (Entry)element;
- if (entry.getKey() instanceof String)
- return (String) entry.getKey();
- if (entry.getKey() instanceof Class)
- return ((Class)entry.getKey()).getSimpleName();
- }
- return element.toString();
- }
- }
-
- public class BEListSelectionChangedListener implements ISelectionChangedListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection sel = (IStructuredSelection)elementsTreeViewer.getSelection();
- if (currentSelection!=null) {
- saveStyleEditors();
- }
-
- Object element = sel.getFirstElement();
- if (sel!=null && element!=null) {
- if (element instanceof Entry) {
- Entry entry = (Entry)element;
- element = entry.getKey();
- if (element instanceof String) {
- styleEditors.setVisible(false);
- currentSelection = null;
- }
- else if (element instanceof Class) {
- styleEditors.setVisible(true);
- currentSelection = (Class)element;
- }
- }
- }
- else
- styleEditors.setVisible(false);
-
- loadStyleEditors();
- }
-
- }
-
- public class ColorControl extends Composite {
- private ColorSelector colorSelector;
- private Label selectorLabel;
- private List<SelectionListener> listeners;
-
- public ColorControl(String labelText, Composite parent) {
- super(parent, SWT.NONE);
- this.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
- this.setLayout(new GridLayout(2, false));
-
- selectorLabel = new Label(this, SWT.LEFT);
- selectorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
- selectorLabel.setFont(parent.getFont());
- selectorLabel.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- selectorLabel = null;
- }
- });
- selectorLabel.setText(labelText);
-
- colorSelector = new ColorSelector(this);
- colorSelector.getButton().setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
- colorSelector.getButton().addSelectionListener( new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (listeners!=null) {
- for (SelectionListener listener : listeners)
- listener.widgetSelected(e);
- }
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- });
- }
-
- public void addSelectionListener(SelectionListener listener) {
- if (listeners==null)
- listeners = new ArrayList<SelectionListener>();
- listeners.add(listener);
- }
-
- public void removeSelectionListener(SelectionListener listener) {
- if (listeners==null)
- return;
- listeners.remove(listener);
- if (listeners.size()==0)
- listeners = null;
- }
-
- /**
- * @return
- */
- public IColorConstant getSelectedColor() {
- return ShapeStyle.RGBToColor(colorSelector.getColorValue());
- }
-
- public void setSelectedColor(IColorConstant c) {
- RGB rgb = ShapeStyle.colorToRGB(c);
- colorSelector.setColorValue(rgb);
- }
- }
-
- public class FontControl extends Composite {
-
- /**
- * The change font button, or <code>null</code> if none
- * (before creation and after disposal).
- */
- private Button changeFontButton = null;
-
- /**
- * Font data for the chosen font button, or <code>null</code> if none.
- */
- private FontData[] selectedFont;
-
- /**
- * The label that displays the selected font, or <code>null</code> if none.
- */
- private Label previewLabel;
- private Label selectorLabel;
-
- public FontControl(String labelText, Composite parent) {
- super(parent, SWT.NONE);
- this.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
- this.setLayout(new GridLayout(3, false));
-
- selectorLabel = new Label(this, SWT.LEFT);
- selectorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
- selectorLabel.setFont(parent.getFont());
- selectorLabel.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- selectorLabel = null;
- }
- });
- selectorLabel.setText(labelText);
-
- previewLabel = new Label(this, SWT.LEFT);
- previewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- previewLabel.setFont(parent.getFont());
- previewLabel.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- previewLabel = null;
- }
- });
-
- changeFontButton = new Button(this, SWT.PUSH);
- changeFontButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
- changeFontButton.setText(Messages.Bpmn2EditorPreferencePage_Change_Button);
- changeFontButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- FontDialog fontDialog = new FontDialog(changeFontButton
- .getShell());
- if (selectedFont != null) {
- fontDialog.setFontList(selectedFont);
- }
- FontData font = fontDialog.open();
- if (font != null) {
- FontData[] oldFont = selectedFont;
- if (oldFont == null) {
- oldFont = JFaceResources.getDefaultFont().getFontData();
- }
- setSelectedFont(font);
-// fireValueChanged(VALUE, oldFont[0], font);
- }
-
- }
- });
- changeFontButton.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- changeFontButton = null;
- }
- });
- changeFontButton.setFont(parent.getFont());
-
- }
-
- public Font getSelectedFont() {
- if (selectedFont!=null && selectedFont.length>0)
- return ShapeStyle.fontDataToFont(selectedFont[0]);
- return null;
- }
-
- public void setSelectedFont(Font f) {
- setSelectedFont(ShapeStyle.fontToFontData(f));
- }
-
- public void setSelectedFont(FontData fd) {
-
- FontData[] bestFont = JFaceResources.getFontRegistry().filterData(
- new FontData[]{fd}, previewLabel.getDisplay());
-
- //if we have nothing valid do as best we can
- if (bestFont == null) {
- bestFont = getDefaultFontData();
- }
-
- //Now cache this value in the receiver
- this.selectedFont = bestFont;
-
- if (previewLabel != null) {
- previewLabel.setText(StringConverter.asString(selectedFont[0]));
- }
- }
-
- /**
- * Get the system default font data.
- * @return FontData[]
- */
- private FontData[] getDefaultFontData() {
- return previewLabel.getDisplay().getSystemFont().getFontData();
- }
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java
deleted file mode 100644
index f171ea5c..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.property;
-
-import org.eclipse.bpmn2.Group;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
-import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.FeatureListObjectEditor;
-import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
-import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-
-/**
- * @author Bob Brodt
- *
- */
-public class DescriptionPropertySection extends DefaultPropertySection implements ITabbedPropertyConstants {
-
- /* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertySection#createSectionRoot()
- */
- @Override
- protected AbstractDetailComposite createSectionRoot() {
- return new DescriptionDetailComposite(this);
- }
-
- @Override
- public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
- return new DescriptionDetailComposite(parent, style);
- }
-
- public class DescriptionDetailComposite extends DefaultDetailComposite {
-
- /**
- * @param section
- */
- public DescriptionDetailComposite(AbstractBpmn2PropertySection section) {
- super(section);
- }
-
- public DescriptionDetailComposite(Composite parent, int style) {
- super(parent,style);
- }
-
- @Override
- protected void cleanBindings() {
- super.cleanBindings();
- descriptionText = null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2DetailComposite
- * #createBindings(org.eclipse.emf.ecore.EObject)
- */
- @Override
- public void createBindings(EObject object) {
-
- bindDescription(object);
- bindAttribute(object,"id"); //$NON-NLS-1$
- bindAttribute(object,"name"); //$NON-NLS-1$
- bindList(object, "documentation"); //$NON-NLS-1$
- if (!(object instanceof Group)) {
- EStructuralFeature reference = object.eClass().getEStructuralFeature("categoryValueRef");
- if (reference!=null) {
- if (isModelObjectEnabled(object.eClass(), reference)) {
- String displayName = getPropertiesProvider().getLabel(object, reference);
-
- ObjectEditor editor = new FeatureListObjectEditor(this,object,reference) {
- @Override
- protected boolean canEdit() {
- return !Bpmn2Preferences.getInstance(object).getPropagateGroupCategories();
- }
- };
- editor.createControl(getAttributesParent(),displayName);
- }
- }
- }
- }
-
- protected boolean isModelObjectEnabled(String className, String featureName) {
- if (featureName!=null && "name".equals(featureName)) //$NON-NLS-1$
- return true;
- return super.isModelObjectEnabled(className,featureName);
- }
-
- protected void bindDescription(EObject be) {
- // don't display the description text if disabled in preferences,
- // or if this is a popup configuration dialog.
- if (Bpmn2Preferences.getInstance(be).getShowDescriptions()) {
- String description = getDescription(be);
-
- if (description != null) {
- descriptionText = createDescription(this, description);
- }
- }
- }
-
- public String getDescription(EObject object) {
- String description = null;
-
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
- if (adapter!=null) {
- // if this is a Custom Task, use the description provided by the <customTask> extension
- if (ModelExtensionDescriptor.getModelExtensionAdapter(object) != null)
- description = (String) adapter.getProperty(ExtendedPropertiesAdapter.CUSTOM_DESCRIPTION);
- if (description==null)
- description = (String) adapter.getProperty(ExtendedPropertiesAdapter.LONG_DESCRIPTION);
- }
- return description;
- }
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java
deleted file mode 100644
index 7a438413..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.bpmn2.modeler.ui.property;
-
-import java.util.ArrayList;
-
-import org.eclipse.bpmn2.modeler.core.runtime.Bpmn2TabDescriptor;
-
-public class TabDescriptorList extends ArrayList<Bpmn2TabDescriptor> {
- private static final long serialVersionUID = -296768469891312674L;
-
- @Override
- public Bpmn2TabDescriptor[] toArray() {
- return this.toArray(new Bpmn2TabDescriptor[this.size()]);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties
deleted file mode 100644
index 2fb01618..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-SequenceFlowDetailComposite_Add_Button=Add Condition
-SequenceFlowDetailComposite_Condition_Expression_Title=Condition Expression
-SequenceFlowDetailComposite_Default_Flow_Label=Default Flow for {0} {1}
-SequenceFlowDetailComposite_Remove_Button=Remove Condition
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java
deleted file mode 100644
index 3756482b..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.bpmn2.modeler.ui.property.diagrams;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.property.diagrams.messages"; //$NON-NLS-1$
- public static String DefinitionsPropertyComposite_Change_Namespace_Title;
- public static String DefinitionsPropertyComposite_Create_Namespace_Title;
- public static String DefinitionsPropertyComposite_Invalid_Duplicate;
- public static String DefinitionsPropertyComposite_Namespace_Details_Title;
- public static String DefinitionsPropertyComposite_Namespace_Label;
- public static String DefinitionsPropertyComposite_Prefix_Label;
- public static String DefinitionsPropertyComposite_Prefix_Message;
- public static String ResourceRoleListComposite_Roles_Label;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties
deleted file mode 100644
index d2447d3e..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-DefinitionsPropertyComposite_Change_Namespace_Title=Change Namespace Prefix
-DefinitionsPropertyComposite_Create_Namespace_Title=Create New Namespace
-DefinitionsPropertyComposite_Invalid_Duplicate=Prefix {0} is already used for namespace\n{1}
-DefinitionsPropertyComposite_Namespace_Details_Title=Namespace Details
-DefinitionsPropertyComposite_Namespace_Label=Namespace
-DefinitionsPropertyComposite_Prefix_Label=Prefix
-DefinitionsPropertyComposite_Prefix_Message=Enter a namespace prefix
-ResourceRoleListComposite_Roles_Label=Roles
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java
deleted file mode 100644
index bee8a702..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.property.editors;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
-import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ComboObjectEditor;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-public class ServiceImplementationObjectEditor extends ComboObjectEditor {
-
- public static String UNSPECIFIED_LABEL = Messages.ServiceImplementationObjectEditor_Unspecified_Label;
- public static String UNSPECIFIED_VALUE = "##unspecified"; //$NON-NLS-1$
- public static String WEBSERVICE_LABEL = Messages.ServiceImplementationObjectEditor_Web_Service_Label;
- public static String WEBSERVICE_VALUE = "##WebService"; //$NON-NLS-1$
-
- public ServiceImplementationObjectEditor(AbstractDetailComposite parent, EObject object, EStructuralFeature feature) {
- super(parent, object, feature);
- }
-
- public ServiceImplementationObjectEditor(AbstractDetailComposite parent, EObject object, EStructuralFeature feature,
- EClass featureEType) {
- super(parent, object, feature, featureEType);
- }
-
- protected boolean canEdit() {
- if (editButton==null)
- return true;
- Object value = object.eGet(feature);
- if (value instanceof String && ((String)value).startsWith("##")) //$NON-NLS-1$
- return false;
- return true;
- }
-
- protected boolean canCreateNew() {
- return true;
- }
-
- @Override
- public boolean setValue(Object result) {
- if (ModelUtil.isStringWrapper(result)) {
- result = ModelUtil.getStringWrapperValue(result);
- }
- return super.setValue(result);
- }
-
- public Object getValue() {
- Object value = object.eGet(feature);
- if (UNSPECIFIED_VALUE.equals(value)) {
- value = UNSPECIFIED_LABEL;
- }
- else if (WEBSERVICE_VALUE.equals(value)) {
- value = WEBSERVICE_LABEL;
- }
- return value;
- }
-
- protected EObject createObject() throws Exception {
- Hashtable<String,Object> choices = getChoiceOfValues(object, feature);
- ImplementationEditingDialog dialog = new ImplementationEditingDialog(
- getDiagramEditor().getEditorSite().getShell(),
- Messages.ServiceImplementationObjectEditor_Create_New_Title,
- choices, null);
- if ( dialog.open() == Window.OK)
- return ModelUtil.createStringWrapper( dialog.getValue() );
- throw new OperationCanceledException(Messages.ServiceImplementationObjectEditor_Dialog_Cancelled);
- }
-
- protected EObject editObject(EObject value) throws Exception {
- Hashtable<String,Object> choices = getChoiceOfValues(object, feature);
- final String oldValue = ModelUtil.getStringWrapperValue(value);
- ImplementationEditingDialog dialog = new ImplementationEditingDialog(
- getDiagramEditor().getEditorSite().getShell(),
- Messages.ServiceImplementationObjectEditor_Edit_Title,
- choices, oldValue);
- if ( dialog.open() == Window.OK) {
- final String newValue = dialog.getValue();
- if (!newValue.equals(value)) {
- final Definitions definitions = ModelUtil.getDefinitions(object);
- if (definitions!=null) {
- TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- TreeIterator<EObject> iter = definitions.eAllContents();
- while (iter.hasNext()) {
- EObject o = iter.next();
- EStructuralFeature f = o.eClass().getEStructuralFeature("implementation"); //$NON-NLS-1$
- if (f!=null) {
- String implementation = (String)o.eGet(f);
- if (oldValue.equals(implementation)) {
- o.eSet(f, newValue);
- }
- }
- }
- }
- });
- }
-
- return ModelUtil.createStringWrapper( dialog.getValue() );
- }
- }
- throw new OperationCanceledException(Messages.ServiceImplementationObjectEditor_Dialog_Cancelled);
- }
-
- protected Hashtable<String,Object> getChoiceOfValues(EObject object, EStructuralFeature feature) {
- Hashtable<String, Object> choices = new Hashtable<String, Object>();
- choices.put(UNSPECIFIED_LABEL, ModelUtil.createStringWrapper(UNSPECIFIED_VALUE));
- choices.put(WEBSERVICE_LABEL, ModelUtil.createStringWrapper(WEBSERVICE_VALUE));
- Hashtable<String, Object> otherChoices = ModelUtil.getChoiceOfValues(object, feature);
- if (otherChoices!=null)
- choices.putAll(otherChoices);
-
- Definitions definitions = ModelUtil.getDefinitions(object);
- if (definitions!=null) {
- TreeIterator<EObject> iter = definitions.eAllContents();
- while (iter.hasNext()) {
- EObject o = iter.next();
- EStructuralFeature f = o.eClass().getEStructuralFeature("implementation"); //$NON-NLS-1$
- if (f!=null) {
- String implementation = (String)o.eGet(f);
- if (implementation!=null && !implementation.isEmpty() &&
- !implementation.startsWith("##")) { //$NON-NLS-1$
- if (!choices.containsKey(implementation)) {
- choices.put(implementation, ModelUtil.createStringWrapper(implementation));
- }
- }
- }
- }
- }
- return choices;
- }
-
- public class ImplementationEditingDialog extends InputDialog {
- public ImplementationEditingDialog(Shell shell, String title, final Map<String,Object> choices, final String uriString) {
- super(
- shell,
- title,
- Messages.ServiceImplementationObjectEditor_Implementation_Title,
- uriString,
- new IInputValidator() {
-
- @Override
- public String isValid(String newText) {
- if (newText==null || newText.isEmpty())
- return Messages.ServiceImplementationObjectEditor_Invalid_Empty;
- if (newText.equals(uriString))
- return null;
- if (choices.containsKey(newText) || choices.containsValue(newText))
- return NLS.bind(Messages.ServiceImplementationObjectEditor_Invalid_Duplicate,newText);
- URI uri = URI.createURI(newText);
- if (!(uri.hasAuthority() && uri.scheme()!=null)) {
- return Messages.ServiceImplementationObjectEditor_Invalid_URI;
- }
- return null;
- }
- }
- );
- }
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties
deleted file mode 100644
index 6609cbdc..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-SchemaObjectEditor_0=\ is not a valid type definition.
-SchemaObjectEditor_Browse_Button=Browse...
-SchemaObjectEditor_Invalid_Selection_Message=The selection {0} is not a valid type definition.
-SchemaObjectEditor_Invalid_Selection_Title=Invalid Selection
-SchemaObjectEditor_WSDL_Fault=WSDL Fault
-SchemaObjectEditor_WSDL_Input=WSDL Input
-SchemaObjectEditor_WSDL_Message=WSDL Message
-SchemaObjectEditor_WSDL_Message_Part=WSDL Message Part
-SchemaObjectEditor_WSDL_Operation=WSDL Operation
-SchemaObjectEditor_WSDL_Output=WSDL Output
-SchemaObjectEditor_WSDL_Port=WSDL Port Type
-SchemaObjectEditor_XML_Attribute=XML Attribute
-ServiceImplementationObjectEditor_Create_New_Title=Create New Implementation URI
-ServiceImplementationObjectEditor_Dialog_Cancelled=Dialog Cancelled
-ServiceImplementationObjectEditor_Edit_Title=Edit Implementation URI
-ServiceImplementationObjectEditor_Implementation_Title=Implementation
-ServiceImplementationObjectEditor_Invalid_Duplicate=The Implementation URI {0} is already defined.
-ServiceImplementationObjectEditor_Invalid_Empty=Implementation can not be empty
-ServiceImplementationObjectEditor_Invalid_URI=Implementation URI must be in the form 'http://absolute/path'
-ServiceImplementationObjectEditor_Unspecified_Label=Unspecified
-ServiceImplementationObjectEditor_Web_Service_Label=Web Service
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties
deleted file mode 100644
index 3893f584..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-GatewayDetailComposite_Condition_Header=Condition
-GatewayDetailComposite_Is_Default_Header=Is Default
-GatewayDetailComposite_Sequence_Flow_Header=Sequence Flow
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties
deleted file mode 100644
index f8859c1f..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-AdvancedDetailComposite_Add_Action=Add
-AdvancedDetailComposite_Advanced_Button=Show advanced details
-AdvancedDetailComposite_Details_Title=\ Details
-AdvancedDetailComposite_Properties_Title=Properties
-AdvancedDetailComposite_Remove_Action=Remove
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties
deleted file mode 100644
index fedbfbaa..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-BPMN2ErrorTreeNode_Unnamed=Unnamed Error
-BPMN2InterfaceTreeNode_Unnamed=Unnamed Interface
-BPMN2MessageTreeNode_Unnamed=Unnamed Message
-BPMN2OperationTreeNode_Unnamed=Unnamed Operation
-BPMN2ProcessTreeNode_Unnamed=Unnamed Process
-ModelLabelProvider_Unknown=Unknown
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java
deleted file mode 100644
index 1731d153..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.bpmn2.modeler.ui.views;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.views.messages"; //$NON-NLS-1$
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java
deleted file mode 100644
index 62e010d6..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.views.outline;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.ui.parts.SelectionSynchronizer;
-
-public class BPMN2EditorSelectionSynchronizer extends SelectionSynchronizer {
-
- protected EditPart convert(EditPartViewer viewer, EditPart part) {
- if (viewer instanceof BPMN2EditorOutlineTreeViewer) {
- BPMN2EditorOutlineTreeViewer ov = (BPMN2EditorOutlineTreeViewer)viewer;
- return ov.convert(part);
- }
- else if (viewer instanceof GraphicalViewer && part instanceof AbstractGraphicsTreeEditPart) {
- return BPMN2EditorOutlineTreeViewer.convert((GraphicalViewer)viewer, (AbstractGraphicsTreeEditPart)part);
- }
- return super.convert(viewer,part);
- }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties
deleted file mode 100644
index 9d2a265f..00000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-BPMN2EditorOutlinePage_Business_Model_Title=Business Model
-BPMN2EditorOutlinePage_DI_Model_Title=Diagram Interchange Model
-BPMN2EditorOutlinePage_Thumbnail_Title=Thumbnail
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/feature.xml b/org.eclipse.bpmn2.modeler.updatesite.feature/feature.xml
deleted file mode 100644
index e469ce89..00000000
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.bpmn2.modeler.updatesite.feature"
- label="BPMN2 Modeler - Updatesite"
- version="1.0.1.qualifier"
- provider-name="Eclipse.org">
-
- <copyright url="http://www.example.com/copyright">
- Copyright (c) 2011 Red Hat, Inc.
-All rights reserved.
-This program is made available under the terms of the
-Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html
-Contributors:
-Red Hat, Inc. - initial API and implementation
- </copyright>
-
- <license url="license.html">
- %license
- </license>
-
- <includes
- id="org.eclipse.bpmn2.modeler.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.bpmn2.modeler.jboss.runtime.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.bpmn2.modeler.examples.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.bpmn2.modeler.wsil.feature"
- version="0.0.0"/>
-
-</feature>
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/site.xml b/org.eclipse.bpmn2.modeler.updatesite.feature/site.xml
deleted file mode 100644
index 412fc2bd..00000000
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/site.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description url="http://eclipse.org/bpmn2-modeler">
- Eclipse BPMN2 Modeler.
- </description>
- <feature url="features/org.eclipse.bpmn2.modeler.feature_0.0.0.jar" id="org.eclipse.bpmn2.modeler.feature" version="0.0.0">
- <category name="Eclipse BPMN2 Modeler"/>
- </feature>
- <feature url="features/org.eclipse.bpmn2.modeler.jboss.runtime.feature_0.0.0.jar" id="org.eclipse.bpmn2.modeler.jboss.runtime.feature" version="0.0.0">
- <category name="Eclipse BPMN2 Modeler"/>
- </feature>
- <feature url="features/org.eclipse.bpmn2.modeler.examples.feature_0.0.0.jar" id="org.eclipse.bpmn2.modeler.examples.feature" version="0.0.0">
- <category name="Eclipse BPMN2 Modeler"/>
- </feature>
- <feature url="org.eclipse.bpmn2.modeler.wsil.feature_1.0.2.qualifier" id="org.eclipse.bpmn2.modeler.wsil.feature" version="1.0.2.qualifier">
- <category name="Eclipse BPMN2 Modeler"/>
- </feature>
- <category-def name="Eclipse BPMN2 Modeler" label="Eclipse BPMN2 Modeler">
- <description>
- Eclipse BPMN2 Modeler
- </description>
- </category-def>
-</site>
diff --git a/parent/pom.xml b/parent/pom.xml
new file mode 100644
index 00000000..55616395
--- /dev/null
+++ b/parent/pom.xml
@@ -0,0 +1,410 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <prerequisites>
+ <maven>3.0</maven>
+ </prerequisites>
+
+ <groupId>org.eclipse.bpmn2.modeler</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>BPMN2 Modeler Parent</name>
+ <description>Parent POM for the Eclipse BPMN2 Modeler Project</description>
+
+ <licenses>
+ <license>
+ <name>Eclipse Public License v1.0</name>
+ <comments>
+ All rights reserved.
+
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.htm
+ </comments>
+ </license>
+ </licenses>
+
+ <properties>
+ <tycho-version>0.16.0</tycho-version>
+ <tycho-extras-version>${tycho-version}</tycho-extras-version>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>platform-helios</id>
+ <activation>
+ <property>
+ <name>platform-version-name</name>
+ <value>helios</value>
+ </property>
+ </activation>
+ <properties>
+ <eclipse-site>http://download.eclipse.org/releases/helios</eclipse-site>
+ <platform-version>[3.6,3.7)</platform-version>
+ <platform-version-name>helios</platform-version-name>
+ </properties>
+ </profile>
+ <profile>
+ <id>platform-indigo</id>
+ <activation>
+ <property>
+ <name>platform-version-name</name>
+ <value>indigo</value>
+ </property>
+ </activation>
+ <properties>
+ <eclipse-site>http://download.eclipse.org/releases/indigo</eclipse-site>
+ <platform-version>[3.7,3.8)</platform-version>
+ <platform-version-name>indigo</platform-version-name>
+ </properties>
+ </profile>
+ <profile>
+ <id>platform-juno</id>
+ <activation>
+ <property>
+ <name>platform-version-name</name>
+ <value>juno</value>
+ </property>
+ </activation>
+ <properties>
+ <eclipse-site>http://download.eclipse.org/releases/juno</eclipse-site>
+ <platform-version>[4.2,4.3)</platform-version>
+ <platform-version-name>juno</platform-version-name>
+ </properties>
+ </profile>
+ <profile>
+ <id>platform-kepler</id>
+ <activation>
+ <property>
+ <name>platform-version-name</name>
+ <value>kepler</value>
+ </property>
+ </activation>
+ <properties>
+ <eclipse-site>http://download.eclipse.org/releases/kepler</eclipse-site>
+ <platform-version>[4.3,4.4)</platform-version>
+ <platform-version-name>kepler</platform-version-name>
+ </properties>
+ </profile>
+ <profile>
+ <id>platform-luna</id>
+ <activation>
+ <property>
+ <name>platform-version-name</name>
+ <value>luna</value>
+ </property>
+ </activation>
+ <properties>
+ <eclipse-site>http://download.eclipse.org/releases/luna</eclipse-site>
+ <platform-version>[4.4,4.5)</platform-version>
+ <platform-version-name>luna</platform-version-name>
+ </properties>
+ </profile>
+ </profiles>
+
+ <repositories>
+ <repository>
+ <id>eclipse-platform</id>
+ <layout>p2</layout>
+ <url>${eclipse-site}</url>
+ </repository>
+
+ <repository>
+ <id>eclipse-bpmn2</id>
+ <url>http://download.eclipse.org/modeling/mdt/bpmn2/updates/luna/1.0.0/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-bpel</id>
+ <url>http://download.eclipse.org/bpel/site/1.0.4</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-graphiti-helios</id>
+ <url>http://archive.eclipse.org/graphiti/updates/0.8.2</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-graphiti-indigo</id>
+ <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-graphiti-juno</id>
+ <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-graphiti-kepler</id>
+ <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-graphiti-luna</id>
+ <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-emf</id>
+ <url>http://download.eclipse.org/modeling/emf/updates/releases/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>eclipse-gef</id>
+ <url>http://download.eclipse.org/tools/gef/updates/releases/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ </repositories>
+
+ <pluginRepositories>
+
+ <pluginRepository>
+ <id>repo.eclipse.org.cbi-releases</id>
+ <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
+ </pluginRepository>
+
+ <pluginRepository>
+ <!-- need maven-findbugs-2.3.2-SNAPSHOT, see http://jira.codehaus.org/browse/MFINDBUGS-122
+ remove this when this version is released -->
+ <id>codehaus.snapshots</id>
+ <url>http://snapshots.repository.codehaus.org/</url>
+ </pluginRepository>
+
+ <pluginRepository>
+ <id>m2e-cbi</id>
+ <url>http://download.eclipse.org/technology/m2e/maven/</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <includePackedArtifacts>true</includePackedArtifacts>
+ </configuration>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tycho-extras-version}</version>
+ <executions>
+ <execution>
+ <id>pack200-normalize</id>
+ <goals>
+ <goal>normalize</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>1.0.5</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tycho-extras-version}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>p2-metadata</id>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>plugin-source</id>
+ <goals>
+ <goal>plugin-source</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>maven-osgi-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.4.1</version>
+ <configuration>
+ <encoding>ISO-8859-1</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.3.2-SNAPSHOT</version>
+ <configuration>
+ <findbugsXmlOutput>true</findbugsXmlOutput>
+ <failOnError>false</failOnError>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <sourceEncoding>utf-8</sourceEncoding>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.5</targetJdk>
+ <format>xml</format>
+ <failOnViolation>false</failOnViolation>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>cpd-check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <strictSrcIncludes>false</strictSrcIncludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+
+</project>
diff --git a/org.eclipse.bpmn2.modeler.help/.classpath b/plugins/org.eclipse.bpmn2.modeler.core/.classpath
index ad32c83a..ad32c83a 100644
--- a/org.eclipse.bpmn2.modeler.help/.classpath
+++ b/plugins/org.eclipse.bpmn2.modeler.core/.classpath
diff --git a/org.eclipse.bpmn2.modeler.core/.gitignore b/plugins/org.eclipse.bpmn2.modeler.core/.gitignore
index e934adfd..c438aa30 100644
--- a/org.eclipse.bpmn2.modeler.core/.gitignore
+++ b/plugins/org.eclipse.bpmn2.modeler.core/.gitignore
@@ -1 +1,2 @@
cache/
+doc/
diff --git a/org.eclipse.bpmn2.modeler.core/.project b/plugins/org.eclipse.bpmn2.modeler.core/.project
index 7cf94edb..7cf94edb 100644
--- a/org.eclipse.bpmn2.modeler.core/.project
+++ b/plugins/org.eclipse.bpmn2.modeler.core/.project
diff --git a/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF
index 15f22db2..dde42024 100644
--- a/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpmn2.modeler.core;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.bpmn2.modeler.core.Activator
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.emf.transaction,
@@ -48,15 +48,15 @@ Export-Package: org.eclipse.bpmn2.modeler.core,
org.eclipse.bpmn2.modeler.core.features.bendpoint,
org.eclipse.bpmn2.modeler.core.features.choreography,
org.eclipse.bpmn2.modeler.core.features.command,
- org.eclipse.bpmn2.modeler.core.features.conversation,
+ org.eclipse.bpmn2.modeler.core.features.containers,
+ org.eclipse.bpmn2.modeler.core.features.containers.lane,
+ org.eclipse.bpmn2.modeler.core.features.containers.participant,
org.eclipse.bpmn2.modeler.core.features.data,
org.eclipse.bpmn2.modeler.core.features.event,
org.eclipse.bpmn2.modeler.core.features.event.definitions,
org.eclipse.bpmn2.modeler.core.features.flow,
org.eclipse.bpmn2.modeler.core.features.gateway,
org.eclipse.bpmn2.modeler.core.features.label,
- org.eclipse.bpmn2.modeler.core.features.lane,
- org.eclipse.bpmn2.modeler.core.features.participant,
org.eclipse.bpmn2.modeler.core.merrimac,
org.eclipse.bpmn2.modeler.core.merrimac.clad,
org.eclipse.bpmn2.modeler.core.merrimac.dialogs,
diff --git a/org.eclipse.bpmn2.modeler.core/OSGI-INF/l10n/bundle.properties b/plugins/org.eclipse.bpmn2.modeler.core/OSGI-INF/l10n/bundle.properties
index 694940fd..fe4c846a 100644
--- a/org.eclipse.bpmn2.modeler.core/OSGI-INF/l10n/bundle.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/OSGI-INF/l10n/bundle.properties
@@ -1,4 +1,6 @@
#Properties file for org.eclipse.bpmn2.modeler.core
+pluginName = BPMN2 Modeler Core
+providerName = Eclipse SOA
category.name = Core BPMN 2.0 Constraints
constraint.name = Valid IDs
constraint.description = IDs must be valid.
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/about.html b/plugins/org.eclipse.bpmn2.modeler.core/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/about.html
+++ b/plugins/org.eclipse.bpmn2.modeler.core/about.html
diff --git a/org.eclipse.bpmn2.modeler.core/build.properties b/plugins/org.eclipse.bpmn2.modeler.core/build.properties
index 8ec7d8af..a6741c0d 100644
--- a/org.eclipse.bpmn2.modeler.core/build.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/build.properties
@@ -17,3 +17,7 @@ bin.includes = META-INF/,\
schema/,\
about.html,\
OSGI-INF/l10n/bundle.properties
+src.includes = doc/,\
+ schema/,\
+ src/,\
+ doc/
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/epl-v10.html b/plugins/org.eclipse.bpmn2.modeler.core/epl-v10.html
index 91531ed4..91531ed4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/epl-v10.html
+++ b/plugins/org.eclipse.bpmn2.modeler.core/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/add.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/add.png
index 33f2c911..33f2c911 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/add.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/add.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/close.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/close.png
index fbd60fb6..fbd60fb6 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/close.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/close.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/delete.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/delete.png
index e5355c8b..e5355c8b 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/delete.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/delete.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/down.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/down.png
index 209b06e8..209b06e8 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/down.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/down.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/edit.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/edit.png
index 55b647d6..55b647d6 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/edit.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/edit.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/import.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/import.png
index 025403c4..025403c4 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/import.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/import.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/remove.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/remove.png
index 7ffb4402..7ffb4402 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/remove.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/remove.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.core/icons/20/up.png b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/up.png
index 7a3462b4..7a3462b4 100644
--- a/org.eclipse.bpmn2.modeler.core/icons/20/up.png
+++ b/plugins/org.eclipse.bpmn2.modeler.core/icons/20/up.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/license.html b/plugins/org.eclipse.bpmn2.modeler.core/license.html
new file mode 100644
index 00000000..6e579a58
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ 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, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.core/plugin.properties
index ba0a1111..ba0a1111 100644
--- a/org.eclipse.bpmn2.modeler.core/plugin.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/plugin.properties
diff --git a/org.eclipse.bpmn2.modeler.core/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.core/plugin.xml
index eabf18fa..d4256d50 100644
--- a/org.eclipse.bpmn2.modeler.core/plugin.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.core/plugin.xml
@@ -122,11 +122,11 @@
lang="Java"
mode="Live"
name="%constraint.name.5"
- severity="INFO"
+ severity="ERROR"
statusCode="1">
<message>%constraint.message.5</message>
<description>%constraint.description.5</description>
- <target class="Definitions"/>
+ <target class="Process"/>
<target class="BaseElement"/>
</constraint>
<constraint
@@ -286,4 +286,11 @@
type="org.eclipse.emf.ecore.EObject">
</propertyTester>
</extension>
+ <extension
+ point="org.eclipse.emf.ecore.conversion_delegate">
+ <factory
+ class="org.eclipse.bpmn2.modeler.core.EDataTypeConversionFactory"
+ uri="http://org.eclipse.bpmn2.modeler.EDataTypeConversionFactory">
+ </factory>
+ </extension>
</plugin>
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/pom.xml b/plugins/org.eclipse.bpmn2.modeler.core/pom.xml
new file mode 100644
index 00000000..9e6d7dcf
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/pom.xml
@@ -0,0 +1,46 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.core</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <name>BPMN2 Modeler Plugins: Core</name>
+ <description>Common Core functionality for BPMN2 Modeler</description>
+<!--
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9.1</version>
+ <configuration>
+ <finalName>core</finalName>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ -->
+</project>
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd b/plugins/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd
new file mode 100644
index 00000000..56bbe690
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/schema/org.eclipse.bpmn2.modeler.runtime.exsd
@@ -0,0 +1,1631 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.bpmn2.modeler.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.bpmn2.modeler.core" id="org.eclipse.bpmn2.modeler.runtime" name="BPMN2 Modeler Runtime Specialization"/>
+ </appinfo>
+ <documentation>
+ &lt;p&gt;This extension point is used to customize and extend the BPMN2 Modeler UI as well as the BPMN2 model itself. The following aspects of the editor can be customized; note that some extension points may affect more than one of these aspects:
+&lt;/p&gt;
+&lt;ul&gt;
+ &lt;li&gt;
+ &lt;b&gt;Tabbed Property Sheets&lt;/b&gt;
+ &lt;ul&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.propertyTab&quot;&gt;propertyTab&lt;/a&gt; is used to define additional Property Sheet tabs, or replacements for existing default tabs provided by the editor. A Java class may be provided by the extension plug-in to control the behavior of these tabs.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.modelEnablement&quot;&gt;modelEnablement&lt;/a&gt; controls which BPMN2 model elements and attributes are visible in Property Sheets and dialogs.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.propertyExtension&quot;&gt;propertyExtension&lt;/a&gt; allows the extension plug-in to define the visual presentation of BPMN2 model attributes and elements by overriding the BPMN2 Modeler core functionality. This extension point may also be used to override the default BPMN2 model object creation behavior. A Java class that implements this behavior must be provided by the extension plug-in.
+ &lt;/li&gt;
+ &lt;/ul&gt;
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;b&gt;Graphical Editing Tool Palette&lt;/b&gt;
+ &lt;ul&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.toolPalette&quot;&gt;toolPalette&lt;/a&gt; is used to define custom Tool Palettes, Tool Drawers and Creation Tools. A simple composition language allows the creation of arbitrarily complex elements and workflow fragments.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.modelEnablement&quot;&gt;modelEnablement&lt;/a&gt; controls which BPMN2 model elements are available in Tool Palettes.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.customTask&quot;&gt;customTask&lt;/a&gt; is used to define extended BPMN2 model elements that can be made available as Creation Tools in the Tool Palette. A Java class that manages the custom element lifecycle may also be provided by the extension plug-in.
+ &lt;/li&gt;
+ &lt;/ul&gt;
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;b&gt;Visual presentation of graphical elements&lt;/b&gt;
+ &lt;ul&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.featureContainer&quot;&gt;featureContainer&lt;/a&gt; allows the extension plug-in to override the creation and drawing behavior of BPMN2 elements on the editing canvas. A Java class that implements the override behavior must be provided by the extension plug-in.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.style&quot;&gt;style&lt;/a&gt; is used to define colors, line styles and label fonts of graphical elements on the editing canvas.
+ &lt;/li&gt;
+ &lt;/ul&gt;
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;b&gt;BPMN2 model&lt;/b&gt;
+ &lt;ul&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.model&quot;&gt;model&lt;/a&gt; is used by an extension plug-in to define a model that augments the BPMN2 model elements. This may be either a traditional EMF model defined by an .ecore file and generated Java implementation classes, or simply a namespace URI for dynamically creating elements and attributes.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.modelExtension&quot;&gt;modelExtension&lt;/a&gt; is used to dynamically extend BPMN2 elements. The extension elements and attributes must provide their own namespace URI (i.e. they may not use the BPMN2 model namespace &quot;http://www.omg.org/spec/BPMN/20100524/MODEL&quot;) The extension point may also be used to populate existing BPMN2 attributes and elements with non-default values during object creation.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.customTask&quot;&gt;customTask&lt;/a&gt; is similar to &lt;b&gt;modelExtension&lt;/b&gt; except that these objects appear on the Tool Palette.
+ &lt;/li&gt;
+ &lt;li&gt;
+&lt;a href=&quot;#e.dataType&quot;&gt;dataType&lt;/a&gt; may be used by an extension plug-in to define its own EMF data types and conversion delegates. These data types can then be used in model extension attributes.
+ &lt;/li&gt;
+ &lt;/ul&gt;
+ &lt;/li&gt;
+&lt;/ul&gt;
+
+All of these extension elements may also be defined within a Workspace Project instead of, or in addition to, an extension plug-in. When the editor starts up, all XML files contained in the project folder named &quot;.bpmn2config&quot; are loaded. These configuration files override default behavior provided by the editor core or other contributing plug-ins defining the Target Runtime for which the Project is configured.
+
+As an example, suppose that you have installed the BPMN2 Modeler from eclipse.org along with a third-party vendor supplied extension plug-in for the &quot;Foo Target Runtime&quot; with the ID &lt;code&gt;org.foo.runtime&lt;/code&gt;. Also, the &quot;Foo Target Runtime&quot; defines the target namespace &quot;http://org.foo&quot; for BPMN2 extensions.
+
+After configuring your Workspace Project to use the &quot;Foo Target Runtime&quot; (see the discussion about setting Project Preferences in the User&apos;s Guide), it is possible to customize the editor behavior using the following configuration file placed in the Project&apos;s &quot;.bpmn2config&quot; folder:
+
+&lt;pre&gt;
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+ &lt;runtime id=&quot;org.foo.runtime&quot;&gt;
+ &lt;modelExtension
+ id=&quot;org.foo.runtime.my.endpoint.extension&quot;
+ uri=&quot;http://org.foo/extensions&quot;
+ name=&quot;My Webservice EndPoint Extension&quot;
+ type=&quot;EndPoint&quot;&gt;
+ &lt;property name=&quot;serviceAddress&quot; type=&quot;ServiceAddress&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;port&quot; type=&quot;EString&quot; /&gt;
+ &lt;property name=&quot;binding&quot; type=&quot;BindingType:EEnum&quot; value=&quot;SOAP HTTP&quot; /&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+ &lt;/modelExtension&gt;
+ &lt;/runtime&gt;
+&lt;/pre&gt;
+
+This will decorate the BPMN2 &lt;code&gt;EndPoint&lt;/code&gt; model element with an extension element named &quot;serviceAddress&quot;; that element will have two attributes named &quot;port&quot; and &quot;binding&quot;. The resulting EndPoint definition XML might look like this in a bpmn2 file:
+
+&lt;pre&gt;
+ &lt;bpmn2:endPoint id=&quot;EndPoint_1&quot;&gt;
+ &lt;bpmn2:extensionElements&gt;
+ &lt;extensions:serviceAddress extensions:port=&quot;RequestPortType&quot; extensions:binding=&quot;HTTP&quot;/&gt;
+ &lt;/bpmn2:extensionElements&gt;
+ &lt;/bpmn2:endPoint&gt;
+&lt;/pre&gt;
+
+There are a couple of issues to consider, however, when using configuration files to extend model elemnts:
+
+&lt;ul&gt;
+&lt;li&gt;
+Existing process files may no longer be readable if model extension definitions are removed from configuration files; these extension elements may have to be removed from process files &quot;by hand&quot; using a text or XML editor.
+&lt;/li&gt;
+&lt;li&gt;
+The BPMN2 editor may have to be closed and reopened for some of these configuration file changes to take effect.
+&lt;/li&gt;
+&lt;li&gt;
+Your configuration files will have to be distributed along with your bpmn2 process files if you are collaborating on a process definition.
+&lt;/li&gt;
+&lt;/ul&gt;
+
+A final note: these configuration files are intended to be used primarily by plug-in developers to test out various BPMN2 Modeler extension points, rather than in a production environment where process file integrity is crucial.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="runtime"/>
+ <element ref="model"/>
+ <element ref="propertyTab" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="customTask" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="modelExtension" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="modelEnablement" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="propertyExtension" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="featureContainer" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="style" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="toolPalette" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="dataType" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="typeLanguage" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="expressionLanguage" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="serviceImplementation"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="runtime">
+ <annotation>
+ <documentation>
+ This element defines a namespace for a specific execution engine, referred to as a &quot;Target Runtime&quot; in this documentation.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ Descriptive name for this Target Runtime implementation. This text will be displayed in the BPMN2 Modeler Preference Pages under &quot;Target Runtimes&quot;.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="versions" type="string">
+ <annotation>
+ <documentation>
+ A comma-separated list of versions of the runtime that are supported by this plug-in&apos;s contributions.
+
+This feature is not currently implemented, but is planned for a future version.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this Target Runtime.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Tooltip text displayed for this Target Runtime.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class that implements the &lt;code&gt;org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension&lt;/code&gt; interface for the Target Runtime. This class provides hooks for plug-in lifecycle events, bpmn2 file content type definition, and Runtime-specific target namespace, data type and expression language URIs.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="model">
+ <annotation>
+ <documentation>
+ This element specifies an extension model URI that will be used by the Target Runtime plug-in. The &lt;b&gt;model&lt;/b&gt; extension may refer to an actual Java implementation, generated the traditional way from an EMF ecore file, or it may just define a namespace URI which will be used to create dynamic classes and features from &lt;b&gt;modelExtension&lt;/b&gt; and &lt;b&gt;customClass&lt;/b&gt; definitions.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;model&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="uri" type="string" use="required">
+ <annotation>
+ <documentation>
+ The namespace URI of the model EPackage. This may refer to an acutal EMF model implemented with Java classes, or it may simply be a namespace URI.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="resourceFactory" type="string">
+ <annotation>
+ <documentation>
+ The fully qualified EMF Resource Factory class name for the extension model. This must subclass &lt;code&gt;org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl&lt;/code&gt;. The Resource Factory provides Target Runtime-specific hooks for model serialization, proxy resolution, object customization, etc.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="propertyTab">
+ <annotation>
+ <documentation>
+ Defines contributions to the Tabbed Property Sheet Page for a selected BPMN2 element.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;propertyTab&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;propertyTab&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string">
+ <annotation>
+ <documentation>
+ A label to be displayed on the tab.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="category" type="string">
+ <annotation>
+ <documentation>
+ The category used to group tabs.
+
+This feature is not yet implemented.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="afterTab" type="string">
+ <annotation>
+ <documentation>
+ The ID of the &lt;b&gt;propertyTab&lt;/b&gt; after which this tab will be inserted
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="indented" type="boolean">
+ <annotation>
+ <documentation>
+ If true, then this tab is indented. This is meant to indicate subtabs or categories of a parent tab.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="image" type="string">
+ <annotation>
+ <documentation>
+ If an image is provided, the icon image is displayed on the tab when the tab is active.
+
+This feature is not yet implemented.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="replaceTab" type="string">
+ <annotation>
+ <documentation>
+ The ID of a &lt;b&gt;propertyTab&lt;/b&gt; that will be replaced by this one. Typically this is used to override default tabs provided by the generic BPMN2 Modeler.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class that implements the property section. This must extend AbstractBpmn2PropertySection and should provide a customized &quot;section root&quot; class which renders the desired BPMN2 element attributes. The section root must extend &lt;code&gt;org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection&lt;/code&gt; or one of the subclasses from the BPMN2 Modeler.
+
+This may also be set to the string &quot;default&quot; to indicate that the &lt;code&gt;DefaultDetailComposite&lt;/code&gt; implementation will be used. The list of BPMN2 element attributes that will be rendered is then specified with the &lt;b&gt;features&lt;/b&gt; attribute.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="features" type="string">
+ <annotation>
+ <documentation>
+ A space separated list of model object features to be rendered by the default property tab. This is only used if the &lt;b&gt;class&lt;/b&gt; attribute is set to &quot;default&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string">
+ <annotation>
+ <documentation>
+ A space-delimited list of BPMN2 element classes or interfaces that will enable the display of this property sheet tab. These must be fully qualified class names. For example:
+
+&lt;pre&gt;
+ type=&quot;org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process&quot;
+ &lt;/pre&gt;
+
+will activate the property tab whenever the editor canvas is selected, or when a Process element is selected.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="popup" type="boolean">
+ <annotation>
+ <documentation>
+ If &quot;false&quot;, this &lt;b&gt;propertyTab&lt;/b&gt; will be excluded from popup dialogs. This allows incidental property tabs, such as the Description to be hidden from configuration dialogs. The default value is &quot;true&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="modelExtension">
+ <annotation>
+ <documentation>
+ Defines extension attributes and elements to the BPMN2 model. Any BPMN2 class that derives from &quot;BaseElement&quot; may be extended. The extension features and classes are defined by &lt;b&gt;property&lt;/b&gt; elements contained in this &lt;b&gt;modelExtension&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="property"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;modelExtension&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;modelExtension&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Descriptive text label that will be displayed in the UI.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Long description that will be displayed in the UI.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ Name of a BPMN2 model type on which this &lt;b&gt;modelExtension&lt;/b&gt; is based. This must be the name of a class that is derived from the BPMN2 &quot;BaseElement&quot; class.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="decorator" type="string">
+ <annotation>
+ <documentation>
+ An optional decorator class provided by a contributing plugin for this &lt;b&gt;modelExtension&lt;/b&gt;. This class must implement the &lt;code&gt;org.eclipse.bpmn2.modeler.core.runtime.IObjectDecorator&lt;/code&gt; interface.
+
+This class can be used to filter extension objects or perform additional intiailzation of the extended model object.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.bpmn2.modeler.core.runtime.IObjectDecorator"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="uri" type="string">
+ <annotation>
+ <documentation>
+ The namespace URI of a model EPackage. If the EPackage does not exist it will be created dynamically. This namespace URI will be included in the BPMN2 file when it is saved.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="customTask">
+ <annotation>
+ <documentation>
+ Defines extension attributes and elements for BPMN2 objects. The difference between this and the &lt;b&gt;modelExtension&lt;/b&gt; extension element is that that &lt;b&gt;customTask&lt;/b&gt; extensions will appear in the Tool Palette.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="property"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;customTask&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;customTask&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ Descriptive text label that will be displayed in the Tool Palette.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Long description used in dialogs and tooltips.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ Name of a BPMN2 model type on which this &lt;b&gt;customTask&lt;/b&gt; is based. This must be a concrete activity, event, gateway or connection type, for example &quot;BusinessRuleTask&quot;, &quot;ExclusiveGateway&quot;, &quot;StartEvent&quot; or &quot;SequenceFlow&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="featureContainer" type="string" use="required">
+ <annotation>
+ <documentation>
+ The Graphiti Feature Container that provides create, add and update functionality in the editor for this &lt;b&gt;customTask&lt;/b&gt;. This class must implement the &lt;code&gt;org.eclipse.bpmn2.modeler.core.features.ICustomElementFeatureContainer&lt;/code&gt; interface.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.bpmn2.modeler.core.features.ICustomElementFeatureContainer"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="category" type="string">
+ <annotation>
+ <documentation>
+ The Tool Palette Drawer name for this &lt;b&gt;customTask&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="propertyTabs" type="string">
+ <annotation>
+ <documentation>
+ The Property Tabs to be displayed when one of the graphical elements represented by this &lt;b&gt;customTask&lt;/b&gt; is selected. This is a space-separated list of &lt;b&gt;propertyTab&lt;/b&gt; IDs.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+ An image that is associated with this &lt;b&gt;customTask&lt;/b&gt; entry in the TooTool Palettehe string value represents a plugin-relative path to an image file.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="uri" type="string">
+ <annotation>
+ <documentation>
+ The namespace URI of a model EPackage. If the EPackage does not exist it will be created dynamically. Any &lt;b&gt;property&lt;/b&gt; elements defined within this &lt;b&gt;customTask&lt;/b&gt; will be used to extend the BPMN2 model type defined by the &lt;b&gt;type&lt;/b&gt; attribute.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="property">
+ <annotation>
+ <documentation>
+ Describes an extension to a BPMN2 model feature. If the feature already exists in an EMF model, then this &lt;b&gt;property&lt;/b&gt; element can be used to initialize the feature&apos;s value when a new instance of the object is created. If the feature does not exist, it is created using dynamic EMF and extends the existing type, but in a different namespace.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="value"/>
+ </choice>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The feature name.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="string">
+ <annotation>
+ <documentation>
+ String representation of the default value for this feature. Type conversion is done based on the &lt;b&gt;type&lt;/b&gt; attribute.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="label" type="string">
+ <annotation>
+ <documentation>
+ An optional label to use for this feature in Property Sheets and dialogs.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Description used in dialogs and tooltips.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="ref" type="string">
+ <annotation>
+ <documentation>
+ Identifies a reference to a previously defined &lt;b&gt;property&lt;/b&gt; (no forward references supported at this time). The reference string is a slash-separated name of a property followed by an optional #number used to index list objects; for example:
+
+&lt;pre&gt;
+ &lt;property name=&quot;ioSpecification&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;dataInputs&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;name&quot; value=&quot;TaskName&quot; type=&quot;EString&quot;/&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+ &lt;property name=&quot;dataInputs&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;name&quot; value=&quot;Priority&quot; type=&quot;EInt&quot;/&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+
+ &lt;property name=&quot;inputSets&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;dataInputRefs&quot; ref=&quot;ioSpecification/dataInputs#0&quot;/&gt;
+ &lt;property name=&quot;dataInputRefs&quot; ref=&quot;ioSpecification/dataInputs#1&quot;/&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+&lt;/pre&gt;
+
+This is interpreted as follows:
+&lt;br/&gt;
+&lt;ol&gt;
+&lt;li&gt;create an InputOutputSpecification object&lt;/li&gt;
+&lt;li&gt;create two DataInput objects, and set their &quot;name&quot; attributes to &quot;TaskName&quot; and &quot;Priority&quot; respectively&lt;/li&gt;
+&lt;li&gt;insert these into the InputOutputSpecification&apos;s &quot;dataInputs&quot; list&lt;/li&gt;
+&lt;li&gt;create an InputSet object and add the two references to the previously created DataInput objects&lt;/li&gt;
+&lt;li&gt;insert the new InputSet object into the InputOutputSpecification object&apos;s &quot;inputSets&quot; list&lt;/li&gt;
+&lt;/ol&gt;
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string">
+ <annotation>
+ <documentation>
+ Specifies the attribute&apos;s data type. All of the primitive data types defined by EMF are supported, i.e.:
+
+&lt;ul&gt;
+&lt;li&gt;EBoolean&lt;/li&gt;
+&lt;li&gt;EEnum&lt;/li&gt;
+&lt;li&gt;EFloat&lt;/li&gt;
+&lt;li&gt;EDouble&lt;/li&gt;
+&lt;li&gt;EDate&lt;/li&gt;
+&lt;li&gt;EInt&lt;/li&gt;
+&lt;li&gt;ELong&lt;/li&gt;
+&lt;li&gt;EString&lt;/li&gt;
+&lt;li&gt;etc.&lt;/li&gt;
+&lt;/ul&gt;
+
+ If special data type conversion is required, a converter can be contributed with the &lt;b&gt;dataType&lt;/b&gt; element. This attribute is optional and will default to &quot;EString&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="value">
+ <annotation>
+ <documentation>
+ If a &lt;b&gt;property&lt;/b&gt; represents a complex element instead of a simple attribute, then a &lt;b&gt;value&lt;/b&gt; may be used to define and populate the contents of the &lt;b&gt;property&lt;/b&gt;. For example:
+
+&lt;pre&gt;
+ &lt;property name=&quot;device&quot; type=&quot;Device&quot; label=&quot;Device Definition&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;type&quot; type=&quot;DeviceType:EEnum&quot; value=&quot;Phone Tablet Computer Banana&quot; label=&quot;Device Type&quot;/&gt;
+ &lt;property name=&quot;deviceID&quot; type=&quot;DeviceIdentifier&quot; label=&quot;Device Details&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;carrier&quot; type=&quot;EString&quot; value=&quot;&quot; label=&quot;Carrier or Service Provider&quot;/&gt;
+ &lt;property name=&quot;identifier&quot; type=&quot;EInt&quot; value=&quot;0&quot; label=&quot;Device Identifier&quot;/&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+&lt;/pre&gt;
+
+This is interpreted as follows:
+
+&lt;br/&gt;
+&lt;ol&gt;
+&lt;li&gt;create a dynamic EClass structure called &quot;Device&quot;&lt;/li&gt;
+&lt;li&gt;create a dynamic EEnum called &quot;DeviceType&quot;&lt;/li&gt;
+&lt;li&gt;create the EEnum literal values &quot;Phone&quot;, &quot;Tablet&quot;, &quot;Computer&quot; and &quot;Banana&quot;. These will be the only valid values for the DeviceType EEnum&lt;/li&gt;
+&lt;li&gt;create a DeviceType feature in the Device class called &quot;type&quot;&lt;/li&gt;
+&lt;li&gt;create a dynamic EClass structure called &quot;DeviceIdentifier&quot;&lt;/li&gt;
+&lt;li&gt;create two features in DeviceIdentifier called &quot;carrier&quot; (a string) and &quot;identifier&quot; (an integer) and initialize them with an empty string and 0, respectively&lt;/li&gt;
+&lt;li&gt;create a DeviceIdentifier feature in the Device class called &quot;deviceID&quot;&lt;/li&gt;
+&lt;/ol&gt;
+
+Note the use of the special notation&quot;DeviceType:EEnum&quot; to create the &quot;DeviceType&quot; enumeration class.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="property"/>
+ </choice>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;value&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="modelEnablement">
+ <annotation>
+ <documentation>
+ This element is used to select which model classes and features are visible in the editor Tool Palette and Property Sheets. This allows the editor to be tailored to a subset of BPMN2 language elements supported by a particular BPMN2 execution engine.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="enable" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="disable" minOccurs="0" maxOccurs="unbounded"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;modelEnablement&lt;/b&gt; profile. The ID is used by the &quot;ref&quot; attribute and also to sort the Tool Palette profiles.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;modelEnablement&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="profile" type="string" use="required">
+ <annotation>
+ <documentation>
+ Required Tool Profile name that can be used to define different BPMN 2 language subsets (enablements) within each Diagram Type. See the &lt;b&gt;toolPalette&lt;/b&gt; element for more information about Tool Profiles.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="ref" type="string">
+ <annotation>
+ <documentation>
+ Initializes this &lt;b&gt;modelEnablement&lt;/b&gt; set from a different Target Runtime, DiagramType and Tool Profile. This simplifies Model Enablement definitions by referencing a base set of enablements already defined.
+
+The value of this attribute string must be the referenced Target Runtime ID, and Tool Profile ID defined in the referenced runtime, separated by a colon (:), for example:
+
+&lt;pre&gt;
+ ref=&quot;org.eclipse.bpmn2.modeler.runtime.none:default.full&quot;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Long description used in dialogs and tooltips.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="enable">
+ <annotation>
+ <documentation>
+ Enables visibility of a specific BPMN2 model class and feature.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="object" type="string" use="required">
+ <annotation>
+ <documentation>
+ Name of the BPMN2 model element to enable. All references made by this element to other BPMN2 elements are enabled also (note: if necessary, the referenced element types can subsequently be disabled).
+
+The special object name &quot;all&quot; is used to refer to all BPMN2 elements.
+
+The value &quot;default&quot; is used by contributing plugins to refer to enablements in the Default Target Runtime defined in the editor core plugin.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="feature" type="string">
+ <annotation>
+ <documentation>
+ The name of a structural feature defined by the BPMN2 element named in &lt;b&gt;object&lt;/b&gt;.
+
+If &lt;b&gt;object&lt;/b&gt; has the value &quot;default&quot;, then this refers to a diagram type in the &lt;b&gt;modelEnablement&lt;/b&gt; section.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="disable">
+ <annotation>
+ <documentation>
+ Disables visibility of a specific BPMN2 model class and feature.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="object" type="string" use="required">
+ <annotation>
+ <documentation>
+ Name of the BPMN2 element to disable. All references made by this element to other BPMN2 elements are also disabled (note: if necessary, the referenced element types can subsequently be re-enabled).
+
+The special object name &quot;all&quot; is used to refer to all BPMN2 elements.
+
+The value &quot;default&quot; is used by contributing plugins to refer to enablements in the Default Target Runtime defined in the editor core plugins.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="feature" type="string">
+ <annotation>
+ <documentation>
+ The name of a structural feature defined by the BPMN2 element named in &lt;b&gt;object&lt;/b&gt;.
+
+If &lt;b&gt;object&lt;/b&gt; has the value &quot;default&quot;, then this refers to a diagram type in the &lt;b&gt;modelEnablement&lt;/b&gt; section.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="propertyExtension">
+ <annotation>
+ <documentation>
+ Defines a provider class for model object and feature properties. The provider class allows extension plug-ins to define specialized behaviors and properties for BPMN2 model objects.
+
+Property Extensions are typically used to define custom labels for objects and features, convert values to and from different types, manage related objects, etc.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;propertyExtension&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;propertyExtension&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class that implements the property extension adapter inteface &lt;code&gt;org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter&lt;/code&gt;.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ The model type to which this &lt;b&gt;propertyExtension&lt;/b&gt; applies. This must be a fully qualified class name, e.g. &lt;code&gt;org.eclipse.bpmn2.SequenceFlow&lt;/code&gt;. Note that this may also refer to an extension model class if the Target Runtime defines a Java implementation for an extension model.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.emf.ecore.EObject"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="featureContainer">
+ <annotation>
+ <documentation>
+ Defines custom behavior for graphical components managed by the editor. FeatureContainers are the providers of lifecycle behavior for all graphical components, including creation of a component, adding a component to a diagram, updating the visual presentation of a component, resizing and moving the component, etc.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;featureContainer&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class that implements the Graphiti Feature Container class. The class must implement the &lt;code&gt;org.eclipse.bpmn2.modeler.core.features.IFeatureContainer&lt;/code&gt; interface.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.bpmn2.modeler.core.features.IFeatureContainer"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ The BPMN2 model element to which this &lt;b&gt;featureContainer&lt;/b&gt; applies. This must be a fully qualified class name, e.g. &lt;code&gt;org.eclipse.bpmn2.SequenceFlow&lt;/code&gt;
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.bpmn2.BaseElement"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="style">
+ <annotation>
+ <documentation>
+ Defines the visual properties of a BPMN2 element, including colors and text fonts.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="object" type="string" use="required">
+ <annotation>
+ <documentation>
+ Name of the model element to which this style applies.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="shapeForeground" type="string">
+ <annotation>
+ <documentation>
+ The foreground color of the graphical element. For shapes, this is the border and text color; for connections, this is the line color.
+
+Colors are a string of six hexadecimal digits representing the red, green and blue color components respectively. For example 00FF00 represents the fully saturated color green.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="shapeBackground" type="string">
+ <annotation>
+ <documentation>
+ The background or fill color of the graphical element. Connection lines do not use a background color.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="labelFont" type="string">
+ <annotation>
+ <documentation>
+ The font style and size for text labels. Fonts are encoded as:
+
+&lt;pre&gt;
+ fontFamilyName,pointSize,italic,bold
+&lt;/pre&gt;
+
+where:
+
+&lt;ul&gt;
+&lt;li&gt;
+fontFamilyName = the system name of a font for example &quot;arial&quot; or &quot;times&quot;
+&lt;/li&gt;
+&lt;li&gt;
+pointSize = the size of the font
+&lt;/li&gt;
+&lt;li&gt;
+italic = the letter &quot;I&quot; if italic font should be used, or a dash (&quot;-&quot;) if roman
+&lt;/li&gt;
+&lt;li&gt;
+bold = the letter &quot;B&quot; if a bold font should be used, or a dash (&quot;-&quot;) if normal
+&lt;/li&gt;
+&lt;/ul&gt;
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="labelForeground" type="string">
+ <annotation>
+ <documentation>
+ The foreground color of the Label.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="labelBackground" type="string">
+ <annotation>
+ <documentation>
+ The background or fill color of the Label.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;style&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="labelPosition" type="string">
+ <annotation>
+ <documentation>
+ The position of the Label relative to the graphical element. This can be one of the following:
+
+&lt;ul&gt;
+&lt;li&gt;
+NORTH - above the figure
+&lt;/li&gt;
+&lt;li&gt;
+SOUTH - below the figure
+&lt;/li&gt;
+&lt;li&gt;
+WEST - left of figure
+&lt;/li&gt;
+&lt;li&gt;
+EAST - right of figure
+&lt;/li&gt;
+&lt;li&gt;
+TOP - top inside the figure
+&lt;/li&gt;
+&lt;li&gt;
+BOTTOM - bottom inside the figure
+&lt;/li&gt;
+&lt;li&gt;
+CENTER - centered inside the figure
+&lt;/li&gt;
+&lt;li&gt;
+LEFT - left inside the figure
+&lt;/li&gt;
+&lt;li&gt;
+RIGHT - right inside the figure
+&lt;/li&gt;
+&lt;li&gt;
+MOVABLE - the Label may be moved independently of its figure. Moving the figure will keep the Label&apos;s relative position the same.
+&lt;/li&gt;
+&lt;/ul&gt;
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="routingStyle" type="string">
+ <annotation>
+ <documentation>
+ This only applies to Connections. The routing style determines how the editor will layou out connections between figures. This can be one of the following:
+
+&lt;ul&gt;
+&lt;li&gt;
+ManualBendpoint - Connections are initially drawn as straight lines between the source and target figure, but they can be adjust by dragging sections of the figure, thereby manually creating bendpoints.
+&lt;/li&gt;
+&lt;li&gt;
+AutomaticBendpoint - Connections are drawn as straight lines between the source and target if possible, but bendpoints will be inserted to avoid collisions with other figures.
+&lt;/li&gt;
+&lt;li&gt;
+Manhattan - Connections are drawn as orthogonal line segments, and bendpoints will be inserted to avoid collisions.
+&lt;/li&gt;
+&lt;/ul&gt;
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="useDefaultSize" type="boolean">
+ <annotation>
+ <documentation>
+ This can be used to override the size specifications contained in the BPMN2 file, with default values. See &lt;b&gt;defaultHeight&lt;/b&gt; and &lt;b&gt;defaultWidth&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="defaultHeight" type="string">
+ <annotation>
+ <documentation>
+ The height of the figure when a new one is created, or the default height used if &lt;b&gt;useDefaultSize&lt;/b&gt; is &quot;true&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="defaultWidth" type="string">
+ <annotation>
+ <documentation>
+ The width of the figure when a new one is created, or the default width used if &lt;b&gt;useDefaultSize&lt;/b&gt; is &quot;true&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="toolPalette">
+ <annotation>
+ <documentation>
+ Defines a custom Tool Palette for the BPMN2 editor. Tool Palettes are associated with a diagram type and a tool profile name combination. An extension plug-in may define any number of tool profiles and hence, Tool Palettes.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="category" minOccurs="0" maxOccurs="unbounded"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;toolPalette&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;toolPalette&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="profile" type="string" use="required">
+ <annotation>
+ <documentation>
+ A profile ID that references one of the &lt;b&gt;modelEnablement&lt;/b&gt; entries. This can be used to define different Tool Palettes for a selected &lt;b&gt;modelEnablement&lt;/b&gt; profile.This may be a space-separated list to indicate that this tool palette should be included in more than one profile.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="category">
+ <annotation>
+ <documentation>
+ Defines a &quot;category&quot; or Tool Palette Drawer. A &lt;b&gt;toolPalette&lt;/b&gt; may have any number of &lt;b&gt;category&lt;/b&gt; elements.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="tool" minOccurs="0" maxOccurs="unbounded"/>
+ </choice>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;category&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Tool Palette drawer label.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Description used in dialogs and tooltips.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+ Tool Palette drawer icon.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="before" type="string">
+ <annotation>
+ <documentation>
+ Inserts this category before the category whose name is equal to this attribute&apos;s value.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="after" type="string">
+ <annotation>
+ <documentation>
+ Inserts this category after the category whose name is equal to this attribute&apos;s value.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="fromPalette" type="string">
+ <annotation>
+ <documentation>
+ This can be used to reference another &lt;b&gt;toolPalette&lt;/b&gt; by its id. The &lt;b&gt;toolPalette&lt;/b&gt; definition may be in any contributing plug-in. If used, then the &lt;b&gt;id&lt;/b&gt; attribute in this &lt;b&gt;category&lt;/b&gt; must reference a &lt;b&gt;category&lt;/b&gt; in the &lt;b&gt;fromPalette&lt;/b&gt; Tool Palette definition.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="tool">
+ <annotation>
+ <documentation>
+ Defines a Tool Palette &quot;tool&quot; which may be used to construct arbitrarily complex sequences of BPMN2 elements. A &lt;b&gt;tool&lt;/b&gt; definition may define just a simple object:
+
+&lt;pre&gt;
+ &lt;tool name=&quot;Create a Task&quot; object=&quot;Task[$name=&apos;My Simple Task&apos;]&quot;/&gt;
+&lt;/pre&gt;
+
+or it may contain compound object definitions:
+
+&lt;pre&gt;
+ &lt;tool name=&quot;Two Tasks&quot; description=&quot;Two Tasks connected by a SequenceFlow&quot;&gt;
+ &lt;object type=&quot;Task&quot; id=&quot;task1&quot;/&gt;
+ &lt;object type=&quot;Task&quot; id=&quot;task2&quot;/&gt;
+ &lt;object type=&quot;SequenceFlow[source=&apos;task1&apos;,target=&apos;task2&apos;]&quot;/&gt;
+ &lt;/tool&gt;
+&lt;/pre&gt;
+
+See the &lt;a href=&quot;#e.object&quot;&gt;object&lt;/a&gt; extension element for more information.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="object" minOccurs="0" maxOccurs="unbounded"/>
+ </choice>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ Unique ID for this &lt;b&gt;tool&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ Tool label.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ Description used in dialogs and tooltips.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+ Tool icon.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="object" type="string">
+ <annotation>
+ <documentation>
+ Definition of the object to be created by this tool. See the description of &lt;b&gt;object&lt;/b&gt; for more information: the &quot;object&quot; attribute of this &lt;b&gt;tool&lt;/b&gt; definition is the same as the &quot;type&quot; attribute of the &lt;b&gt;object&lt;/b&gt; definition.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="fromPalette" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="object">
+ <annotation>
+ <documentation>
+ Used to create compound objects and templates.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ Object type definition. This consists of a sequence of BPMN2 element types with optional configuration parameters. The BNF is as follows:
+
+&lt;div style=&quot;white-space: pre-wrap&quot;&gt;
+&lt;code&gt;
+type = TypeList
+TypeDefList = TypeDef | TypeDefList &apos;,&apos; TypeDef | PushDef | PushDef PopDef
+PushDef = TypeDefList &apos;+&apos; TypeDefList
+PopDef = TypeDefList &apos;-&apos; TypeDefList
+TypeDef = TYPE | TYPE &apos;[&apos; ParamDefList &apos;]&apos;
+ParamDefList = ParamDef | ParamDefList &apos;,&apos; ParamDef
+ParamDef = Param &apos;=&apos; Value
+Param = &apos;$&apos; FEATURE | VAR
+
+TYPE = any BPMN2 element type, for example &quot;Task&quot;, &quot;StartEvent&quot;, &quot;SequenceFlow&quot;, etc.
+FEATURE = the name of a simple data type feature in the BPMN2 element specified by TYPE, for example &quot;name&quot;, &quot;implementation&quot;, etc.
+VAR = a predefined variable used in the construction of the object. This may be one of the following:
+ x = x-coordinate where the graphical object will be placed, relative to the mouse cursor position
+ y = y-coordinate where the graphical object will be placed, relative to the mouse cursor position
+ width = the width of the graphical object
+ height = the height o the graphical object
+ source = the ID of another &lt;b&gt;object&lt;/b&gt; definition that will be used as the source of a connection
+ target = the ID of another &lt;b&gt;object&lt;/b&gt; definition that will be used as the target of a connection
+&lt;/code&gt;
+&lt;/div&gt;
+
+&lt;p/&gt;
+In its simplest form, a &lt;b&gt;type&lt;/b&gt; is simply the name of a BPMN2 element type, for example:
+&lt;pre&gt;
+ &lt;object type=&quot;Task&quot;/&gt;
+&lt;/pre&gt;
+
+To assign an initial value to the Task name:
+
+&lt;pre&gt;
+ &lt;object type=&quot;Task[$name=&apos;This is a new Task&apos;]&quot;/&gt;
+&lt;/pre&gt;
+
+To set the initial size and location of the Task (relative to the mouse cursor):
+
+&lt;pre&gt;
+ &lt;object type=&quot;Task[x=100,y=100,width=200,height=150]&quot;/&gt;
+&lt;/pre&gt;
+
+Multiple objects can be created by separating them with a comma:
+
+&lt;pre&gt;
+ &lt;object type=&quot;Task,IntermediateCatchEvent[x=200],Task[x=400]&quot;/&gt;
+&lt;/pre&gt;
+
+Note that this requires the specification of some location offset to prevent all objects being created at the same location.
+&lt;br/&gt;
+&lt;br/&gt;
+The &apos;+&apos; or Push operator can be used within a &lt;b&gt;type&lt;/b&gt; definition to create objects within objects, for example this:
+
+&lt;pre&gt;
+ &lt;object type=&quot;SubProcess+Task&quot;/&gt;
+&lt;/pre&gt;
+
+will create a SubProcess that contains a single Task. This also works for adding EventDefinitions to Event objects, for example:
+
+&lt;pre&gt;
+ &lt;object type=&quot;IntermediateCatchEvent+MessageEventDefinition&quot;/&gt;
+&lt;/pre&gt;
+
+Multiple objects can be constructed in the same container by separating them with a comma:
+
+&lt;pre&gt;
+ &lt;object type=&quot;SubProcess+Task,IntermediateCatchEvent[x=200],Task[x=400]&quot;/&gt;
+&lt;/pre&gt;
+
+The Push operator &apos;+&apos; can be used to create additional objects inside the SubProcess. The Pop or &apos;-&apos; operator can be used to restore the target container of subsequent objects (in this case the diagram) like so:
+
+&lt;pre&gt;
+ &lt;object type=&quot;SubProcess+Task,IntermediateCatchEvent[x=200],Task[x=400]-ExclusiveGateway[x=600]&quot;/&gt;
+ &lt;/pre&gt;
+
+This is interpreted as follows: create a SubProcess in the Diagram, then within that SubProcess create a Task, an IntermediateCatchEvent and another Task, then pop back to the Diagram and create an ExclusiveGateway. The Push/Pop operators can be nested as deeply as required.
+
+Creating connections between objects can be done in two ways, the first method uses the previous two objects as source and target:
+
+&lt;pre&gt;
+ &lt;tool name=&quot;SubProcess Split&quot; description=&quot;SubProcess containing two Tasks, and connected to an ExclusiveGateway&quot;&gt;
+ &lt;object type=&quot;SubProcess+Task,Task,SequenceFlow-ExclusiveGateway[x=300],SequenceFlow&quot;/&gt;
+ &lt;/tool&gt;
+&lt;/pre&gt;
+
+The second method references previous &lt;b&gt;object&lt;/b&gt; definitions by their IDs:
+
+&lt;pre&gt;
+ &lt;tool name=&quot;Two Tasks&quot; description=&quot;Two Tasks connected by a SequenceFlow&quot;&gt;
+ &lt;object type=&quot;Task&quot; id=&quot;task1&quot;/&gt;
+ &lt;object type=&quot;Task&quot; id=&quot;task2&quot;/&gt;
+ &lt;object type=&quot;SequenceFlow[source=&apos;task1&apos;,target=&apos;task2&apos;]&quot;/&gt;
+ &lt;/tool&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ Optional ID which may be referenced by other &lt;b&gt;object&lt;/b&gt; definitions, for example when creating a connection between two shapes.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="optional" type="boolean">
+ <annotation>
+ <documentation>
+ If &quot;true&quot;, then this object may be substituted by a selected graphical element from the editor. This allows the user to select one or more Activities and have them &quot;wired in&quot; with other objects created by the &lt;b&gt;tool&lt;/b&gt;.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="dataType">
+ <annotation>
+ <documentation>
+ Defines a Data Type Conversion delegate. This is used to convert a Target Runtime-specific data type to and from String representations.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the data type. This can be used as the &quot;type&quot; attrinbute in &lt;b&gt;property&lt;/b&gt;definitions.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A class that handles the conversion of the data type to and from String types. This class must extend &lt;code&gt;org.eclipse.bpmn2.modeler.core.DefaultConversionDelegate&lt;/code&gt;.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.bpmn2.modeler.core.DefaultConversionDelegate:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="typeLanguage">
+ <annotation>
+ <documentation>
+ This extension element identifies a data type system supported by the Target Runtime. A Target Runtime may define any number of these type systems. The definition element that appears first is used as the default.
+
+The Default Target Runtime provides support for XSD Schema and Java types only.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="type" minOccurs="0" maxOccurs="unbounded"/>
+ </choice>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;typeLanguage&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Descriptive text label that will be displayed in the UI.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="uri" type="string">
+ <annotation>
+ <documentation>
+ A URI that identifies a specific data type system.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="prefix" type="string">
+ <annotation>
+ <documentation>
+ Optional namespace prefix to use for creating QName references for the primitive data types (if any) defined by the type language.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="expressionLanguage">
+ <annotation>
+ <documentation>
+ This extension element identifies an expression language supported by the Target Runtime. A Target Runtime may define any number of these expression languages. The definition element that appears first is used as the default.
+
+The Default Target Runtime provides support for XPath and Java only.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;expressionLanguage&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Descriptive text label that will be displayed in the UI.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="uri" type="string">
+ <annotation>
+ <documentation>
+ A URI that identifies a specific expression language.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="serviceImplementation">
+ <annotation>
+ <documentation>
+ This extension element identifies a Service Task implementation supported by the Target Runtime. A Target Runtime may define any number of these implementations. The definition element that appears first is used as the default.
+
+The Default Target Runtime provides support for ##WebService and ##Unspecified only.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="runtimeId" type="string">
+ <annotation>
+ <documentation>
+ Identifies one of the previously defined &lt;b&gt;runtime&lt;/b&gt; extensions for which this &lt;b&gt;serviceImplementation&lt;/b&gt; definition will be used.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Descriptive text label that will be displayed in the UI.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="uri" type="string">
+ <annotation>
+ <documentation>
+ A URI that identifies a specific service implementation.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="type">
+ <annotation>
+ <documentation>
+ Specification of a data type supported by the type system.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Name of the data type.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="qname" type="string">
+ <annotation>
+ <documentation>
+ A fully qualified name for the data type. For example, if the type system implements Java types, this would be the fully qualified name of a primitive Java data type, e.g. &quot;java.lang.String&quot;.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 1.1.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ This example illustrates some of the features of this extension point:
+
+&lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.bpmn2.modeler.runtime&quot;&gt;
+ &lt;!-- the runtime definition --&gt;
+ &lt;runtime name=&quot;Sample Business Process Engine&quot; versions=&quot;1.0&quot;
+ id=&quot;org.eclipse.bpmn2.modeler.examples.dynamic&quot; class=&quot;org.eclipse.bpmn2.modeler.examples.dynamic.SampleRuntimeExtension&quot;
+ description=&quot;BPMN2 Modeler customizations for a sample runtime engine&quot;&gt;
+ &lt;/runtime&gt;
+
+ &lt;!-- In this example, there is no extension model per-se. This model definition
+ only provides a default namespace URI for extension attributes and elements
+ that are defined in the &lt;modelExtension&gt; and &lt;customTask&gt; elements below.
+ We could have provided a namespace URI in each of those elements, but it&apos;s
+ more convenient to do so here.
+ --&gt;
+ &lt;model runtimeId=&quot;org.eclipse.bpmn2.modeler.examples.dynamic&quot;
+ uri=&quot;http://org.eclipse.bpmn2.modeler.examples.dynamic&quot;&gt;
+ &lt;/model&gt;
+
+ &lt;!-- This &lt;customTask&gt; item extends the BPMN2 TextAnnotation element by adding
+ &quot;name&quot;, &quot;evaluate&quot; and &quot;cost&quot; attributes. In addition, the &quot;text&quot; attribute
+ which is a feature of TextAnnotation, will be initialized to &quot;Risk Task&quot;
+ whenever a new instance of this item is created. This item will appear as
+ a tool entry in a tool palette drawer named &quot;Risk &amp; Mitigation&quot;.
+ --&gt;
+ &lt;customTask
+ description=&quot;This task represents a risk that can occur in the connected Elements.&quot;
+ featureContainer=&quot;org.eclipse.bpmn2.modeler.examples.dynamic.SampleCustomTaskFeatureContainer&quot;
+ id=&quot;org.eclipse.bpmn2.modeler.examples.dynamic.risk&quot; name=&quot;Risk Task&quot;
+ category=&quot;Risk &amp;amp; Mitigation&quot; icon=&quot;risk.png&quot;
+ runtimeId=&quot;org.eclipse.bpmn2.modeler.examples.dynamic&quot; type=&quot;TextAnnotation&quot;&gt;
+ &lt;property name=&quot;name&quot; value=&quot;Risk Task&quot; type=&quot;EString&quot; /&gt;
+ &lt;property name=&quot;text&quot; value=&quot;Risk Task&quot; type=&quot;EString&quot; /&gt;
+ &lt;property name=&quot;evaluate&quot; value=&quot;true&quot; type=&quot;EBoolean&quot; /&gt;
+ &lt;property name=&quot;cost&quot; value=&quot;0&quot; type=&quot;EInt&quot; /&gt;
+ &lt;/customTask&gt;
+
+ &lt;!-- This &lt;modelExtension&gt; extends BPMN2 Activity elements and all subclasses
+ (Task, UserTask, etc.) Besides the boolean &quot;isDevice&quot;, the extension adds
+ a new type called &quot;Device&quot; which contains a &quot;type&quot; attribute (an enum) and
+ a &quot;DeviceIdentifier&quot; type which itself contains two attributes, a String
+ and an Integer. Note that a specialized &lt;propertyTab&gt; is needed to display/edit
+ these extensions (see below).
+ --&gt;
+ &lt;modelExtension id=&quot;org.eclipse.bpmn2.modeler.examples.dynamic.activity&quot;
+ uri=&quot;http://org.eclipse.bpmn2/default&quot; name=&quot;Activity Extension&quot;
+ type=&quot;Activity&quot;&gt;
+ &lt;property name=&quot;isDevice&quot; type=&quot;EBoolean&quot; value=&quot;true&quot;
+ label=&quot;Is Device&quot; /&gt;
+ &lt;property name=&quot;device&quot; type=&quot;Device&quot; label=&quot;Device Definition&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;type&quot; type=&quot;DeviceType:EEnum&quot; value=&quot;Phone Tablet Computer Banana&quot;
+ label=&quot;Device Type&quot; /&gt;
+ &lt;property name=&quot;deviceID&quot; type=&quot;DeviceIdentifier&quot; label=&quot;Device Details&quot;&gt;
+ &lt;value&gt;
+ &lt;property name=&quot;carrier&quot; type=&quot;EString&quot; value=&quot;&quot;
+ label=&quot;Carrier or Service Provider&quot; /&gt;
+ &lt;property name=&quot;identifier&quot; type=&quot;EInt&quot; value=&quot;0&quot;
+ label=&quot;Device Identifier&quot; /&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+ &lt;/value&gt;
+ &lt;/property&gt;
+ &lt;/modelExtension&gt;
+
+ &lt;!-- This &lt;propertyTab&gt; will add a new tab to the Property Sheet called &quot;Activity
+ Extensions&quot;. The tab will be visible for all BPMN2 Activity objects and their
+ subclasses (type=&quot;org.eclipse.bpmn2.Activity&quot;) In this case, the Default
+ property sheet page (class=&quot;default&quot;) is sufficient to display the attributes
+ and elements, although we could have supplied our own Java class to handle
+ these extensions.
+ --&gt;
+ &lt;propertyTab id=&quot;org.eclipse.bpmn2.modeler.examples.dynamic.activity.tab&quot;
+ afterTab=&quot;org.eclipse.bpmn2.modeler.description.tab&quot; class=&quot;default&quot;
+ features=&quot;isDevice device carrier identifier&quot; type=&quot;org.eclipse.bpmn2.Activity&quot;
+ label=&quot;Activity Extensions&quot;&gt;
+ &lt;/propertyTab&gt;
+
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+
+
+
+</schema>
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Activator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Activator.java
index 0028ad0d..cbd51f0b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Activator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Activator.java
@@ -16,11 +16,9 @@ import java.lang.reflect.Field;
import java.net.MalformedURLException;
import java.net.URL;
-import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
@@ -74,7 +72,8 @@ public class Activator extends AbstractUIPlugin {
}
public static void logStatus(IStatus status) {
- Platform.getLog(plugin.getBundle()).log(status);
+ if (plugin!=null)
+ Platform.getLog(plugin.getBundle()).log(status);
}
public static void logError(Exception e) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/DefaultConversionDelegate.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/DefaultConversionDelegate.java
new file mode 100644
index 00000000..32343fbb
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/DefaultConversionDelegate.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core;
+
+import org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * A EDataType Conversion Delegate archetype for Strings.
+ * <p>
+ * This class is intended to serve as an example for EDataType conversions
+ * classes. It demonstrates a simple implementation of String to String data
+ * type and uses a simple SWT Text widget for editing.
+ */
+public class DefaultConversionDelegate implements ConversionDelegate, EditControlProvider {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.EditControlProvider#createControl(org.
+ * eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ public EditControl createControl(Composite parent, int style) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#convertToString
+ * (java.lang.Object)
+ */
+ @Override
+ public String convertToString(Object value) {
+ if (value == null)
+ return ""; //$NON-NLS-1$
+ return value.toString();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#createFromString(java.lang.String)
+ */
+ @Override
+ public Object createFromString(String literal) {
+ return literal;
+ }
+
+ /**
+ * A Simple SWT Text widget wrapper for editing instances of this data type.
+ */
+ public static class TextControl extends EditControl {
+
+ Text text;
+
+ /**
+ * The constructor that creates the Text widget
+ *
+ * @param parent
+ * parent container for our Text widget
+ * @param style
+ * style bits
+ */
+ public TextControl(Composite parent, int style) {
+ super(parent, style);
+ this.setLayout(new RowLayout());
+ text = new Text(parent, style);
+ text.addSelectionListener(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.EditControlProvider.EditControl#getValue()
+ */
+ @Override
+ public Object getValue() {
+ return text.getText();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.EditControlProvider.EditControl#setValue(java.lang.Object)
+ */
+ @Override
+ public boolean setValue(Object value) {
+ String s = value == null ? "" : value.toString(); //$NON-NLS-1$
+ text.setText(s);
+ return true;
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EDataTypeConversionFactory.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EDataTypeConversionFactory.java
new file mode 100644
index 00000000..bd5ae47c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EDataTypeConversionFactory.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core;
+
+import java.util.Hashtable;
+
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate;
+import org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate.Factory;
+
+public class EDataTypeConversionFactory implements Factory {
+
+ public static EDataTypeConversionFactory INSTANCE = new EDataTypeConversionFactory();
+
+ /**
+ * The URI for our EDataType conversion factory. This must be the same as the "uri" specified in
+ * the {@code org.eclipse.emf.ecore.conversion_delegate} extension point in the implementation's plugin.xml.
+ */
+ public final static String DATATYPE_CONVERSION_FACTORY_URI = "http://org.eclipse.bpmn2.modeler.EDataTypeConversionFactory"; //$NON-NLS-1$
+
+ /**
+ * A registry that maps a data type name to a conversion delegate.
+ * Clients may register their own types and conversion delegates
+ * with {@code EDataTypeConversionFactory#registerConversionDelegate(String,Class)}.
+ */
+ private static Hashtable<String, Class<? extends ConversionDelegate>> registry =
+ new Hashtable<String, Class<? extends ConversionDelegate>>();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate.Factory#createConversionDelegate(org.eclipse.emf.ecore.EDataType)
+ *
+ * Consult our registry for the name of the given data type.
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public ConversionDelegate createConversionDelegate(EDataType eDataType) {
+ Class clazz = registry.get(eDataType.getName());
+ if (clazz!=null) {
+ try {
+ return (DefaultConversionDelegate) clazz.getConstructor().newInstance();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Register a Data Type Conversion Delegate class.
+ *
+ * @param type the data type name.
+ * @param delegate the Conversion Delegate class.
+ */
+ public static void registerConversionDelegate(String type, Class<? extends ConversionDelegate> delegate) {
+ registry.put(type,delegate);
+ }
+
+ /**
+ * Remove a Data Type Conversion Delegate from the registry.
+ *
+ * @param type the data type name.
+ */
+ public static void unregisterConversionDelegate(String type) {
+ registry.remove(type);
+ }
+
+ /**
+ * Check if the given data type has been registered.
+ *
+ * @param type the data type name.
+ * @return true if a Conversion Delegate has been registered for the given data type name.
+ */
+ public static boolean isFactoryFor(String type) {
+ if (type!=null)
+ return registry.get(type) != null;
+ return false;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EditControlProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EditControlProvider.java
new file mode 100644
index 00000000..27159741
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/EditControlProvider.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * The interface that defines a provider for an EditControl.
+ * <p>
+ * An EditControl is an SWT Composite that can be embedded in a Viewer or
+ * Dialog, just like any other Composite.
+ * <p>
+ * EditControl must implement setValue() and getValue() methods which are used
+ * to initialize the EditControl's widget with data, and fetch data from the
+ * widget.
+ * <p>
+ * Listeners are used to notify the client when the widget's data has changed,
+ * therefore the implementation must add "this" as a widget Selection Listener
+ * in the createControl() method.
+ */
+public interface EditControlProvider {
+
+ /**
+ * An wrapper class for SWT widgets.
+ * <p>
+ * Clients must extend this class and provide appropriate editing widgets.
+ */
+ public abstract class EditControl extends Composite implements SelectionListener {
+ protected List<SelectionListener> listeners;
+
+ public EditControl(Composite parent, int style) {
+ super(parent, style);
+ }
+
+ /**
+ * The implementation must return the value of the object being edited,
+ * performing data type conversion if necessary.
+ *
+ * @return the value of the object being edited, in the correct data
+ * type.
+ */
+ public abstract Object getValue();
+
+ /**
+ * The implementation must convert the given object value to a form that
+ * can be represented by the SWT editing widget.
+ *
+ * @param value
+ * the object value
+ * @return true if the value is valid, false if not.
+ */
+ public abstract boolean setValue(Object value);
+
+ /**
+ * The implementation must add this EditControl as a selection listener.
+ * This will notify the parent when the value changes in the editing
+ * widget.
+ *
+ * @param listener
+ * should be this EditControl, or some proxy.
+ */
+ public void addSelectionListener(SelectionListener listener) {
+ if (listeners == null)
+ listeners = new ArrayList<SelectionListener>();
+ listeners.add(listener);
+ }
+
+ /**
+ * Remove the selection listener previously added.
+ *
+ * @param listener
+ * a listener previously added by
+ * {@code EditControl#addSelectionListener(SelectionListener)}
+ */
+ public void removeSelectionListener(SelectionListener listener) {
+ if (listeners == null)
+ return;
+ listeners.remove(listener);
+ if (listeners.size() == 0)
+ listeners = null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse
+ * .swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (listeners != null) {
+ for (SelectionListener listener : listeners)
+ listener.widgetSelected(e);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org
+ * .eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ }
+
+ /**
+ * The implementation must create the editing widget(s) in the given parent
+ * container and apply the given style bits if appropriate.
+ *
+ * @param parent
+ * the parent Composite container widget.
+ * @param style
+ * style bits for the editing widget.
+ * @return the editing widget control. If more than one widget is required
+ * for editing the data object, the one returned should be the same
+ * widget that was registered as the selection listener.
+ */
+ public EditControl createControl(Composite parent, int style);
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java
new file mode 100644
index 00000000..8089e1f8
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IBpmn2RuntimeExtension.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core;
+
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
+import org.eclipse.ui.IEditorInput;
+
+/**
+ * Interface that defines certain behavior of a Target Runtime specialization
+ * that must be implemented by a contributing plug-in.
+ */
+public interface IBpmn2RuntimeExtension {
+
+ /**
+ * Check if the given input file is specific to the Target Runtime. The
+ * implementation should check for specific extensions and namespaces that
+ * identify the file for this runtime.
+ *
+ * @param input
+ * the editor input object instance. This is created and passed
+ * to the BPMN2 editor by the Eclipse framework.
+ * @return true if the file is targeted for this runtime, false if the file
+ * is generic BPMN 2.0 or belongs to some other Target Runtime.
+ */
+ public boolean isContentForRuntime(IEditorInput input);
+
+ /**
+ * Return the target namespace defined by this Target Runtime for the given
+ * diagram type.
+ *
+ * @param diagramType
+ * one of the pre-defined Diagram Types. The Target Runtime may
+ * use different namespace URIs for different Diagram Types.
+ * @return a targetNamespace URI
+ */
+ public String getTargetNamespace(Bpmn2DiagramType diagramType);
+
+ /**
+ * Used to notify the Target Runtime of BPMN2 editor lifecycle events.
+ *
+ * @param event
+ * an event object sent by the BPMN2 editor framework.
+ */
+ public void notify(LifecycleEvent event);
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IConstants.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IConstants.java
index 7d9e2e4e..258baf8d 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IConstants.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IConstants.java
@@ -10,9 +10,11 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.core;
+/**
+ * This interface defines some constants used for locating image files in the BPMN2 Modeler core plug-in.
+ */
public interface IConstants {
public final String ICON_PATH = "icons/"; //$NON-NLS-1$
-
public final String ICON_ADD_20 = "20/add.png"; //$NON-NLS-1$
public final String ICON_CLOSE_20 = "20/close.png"; //$NON-NLS-1$
public final String ICON_DELETE_20 = "20/delete.png"; //$NON-NLS-1$
@@ -21,4 +23,5 @@ public interface IConstants {
public final String ICON_REMOVE_20 = "20/remove.png"; //$NON-NLS-1$
public final String ICON_UP_20 = "20/up.png"; //$NON-NLS-1$
public final String ICON_PROPERTIES_16 = "org.eclipse.bpmn2.modeler.icons." + "properties" + ".16"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ public final String ICON_INFO_16 = "org.eclipse.bpmn2.modeler.icons." + "info" + ".16"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IToolTipProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IToolTipProvider.java
new file mode 100644
index 00000000..f2caaf7e
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/IToolTipProvider.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * Provides ToolTip text and longer descriptions of the tool or operation.
+ */
+public interface IToolTipProvider {
+
+ String getToolTip(Object context, EObject object);
+ String getLongDescription(Object context, EObject object);
+ String getToolTip(Object context, EObject object, EStructuralFeature feature);
+ String getLongDescription(Object context, EObject object, EStructuralFeature feature);
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/LifecycleEvent.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/LifecycleEvent.java
new file mode 100644
index 00000000..161a2e50
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/LifecycleEvent.java
@@ -0,0 +1,461 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core;
+
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.ui.part.WorkbenchPart;
+
+/**
+ * BPMN2 Editor Lifecycle Event object.
+ * <p>
+ * These events are sent to the Target Runtime Extension implementation class
+ * during the life of the editor. The method {@see
+ * org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#notify(LifecycleEvent)}
+ * will be notified about these events.
+ * <p>
+ * Event notifications include Editor Events, Business Object Events, Graphiti
+ * PictogramElement Events, Editing Domain Transaction Events and Command Stack
+ * Events. Additional information may be available, depending on the event
+ * type as described in {@see EventType}.
+ */
+public class LifecycleEvent {
+
+ /**
+ * Lifecycle Event Types.
+ */
+ public enum EventType {
+ // Editor Events:
+ /**
+ * Sent immediately after the BPMN2 editor starts and just before the
+ * BPMN2 Resource is loaded.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the BPMN2 model
+ * object instance.
+ */
+ EDITOR_STARTUP,
+ /**
+ * Sent by the BPMN2 editor after EDITOR_STARTUP and just before the
+ * graphical elements are created.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the BPMN2 model
+ * object instance.
+ */
+ EDITOR_INITIALIZED,
+ /**
+ * Sent by the BPMN2 editor before shutting down during the
+ * {@link WorkbenchPart#dispose()} method.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the BPMN2 model
+ * object instance.
+ */
+ EDITOR_SHUTDOWN,
+ // Business Object Events:
+ /**
+ * Sent by the BPMN2 Object Factory immediately after a business object
+ * has been created. This event is always sent, even during file loading.
+ * <p>
+ * This is a good place to do any additional BPMN2 model object
+ * initialization, or hook adapters.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the BPMN2 model
+ * object instance.
+ */
+ BUSINESSOBJECT_CREATED,
+ /**
+ * Sent by the BPMN2 Create Feature immediately after a business object
+ * has been created and initialized by the editor framework. Only create
+ * actions from the user will trigger this event. This event will not be
+ * sent during file loading, or as a result of a redo action.
+ * <p>
+ * This is a good place to do any additional BPMN2 model object
+ * initialization, or hook adapters.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the BPMN2 model
+ * object instance.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IAddContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ BUSINESSOBJECT_INITIALIZED,
+ /**
+ * Sent by the BPMN2 Delete Feature immediately before the business
+ * object is destroyed. Only delete actions from the user will trigger
+ * this event. This event will not be sent as a result of an undo action.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the BPMN2 model
+ * object instance.
+ */
+ BUSINESSOBJECT_DELETED,
+ // Pictogram Element Events:
+ /**
+ * Sent by the BPMN2 Feature Provider to test if a Pictogram Element can
+ * be added. This event is sent only if the editor model constraints
+ * have already determined that the element can be added.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IAddContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ * {@see org.eclipse.graphiti.ui.features.DefaultFeatureProvider}
+ * <p>
+ * The Target Runtime client may set {@code LifecycleEvent.doit} to
+ * false to prevent the action from being performed.
+ */
+ PICTOGRAMELEMENT_CAN_ADD,
+ /**
+ * Sent by the BPMN2 Feature Provider immediately after the Pictogram
+ * Element has been be added.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IAddContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_ADDED,
+ /**
+ * Sent by the BPMN2 Feature Provider to test if a Pictogram Element needs
+ * to be updated. This event is sent even if the editor model constraints
+ * have already determined that an update is <strong>not</strong> required.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IUpdateContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ * <p>
+ * The Target Runtime client may set {@code LifecycleEvent.doit} to
+ * true to force the update action, even if the model constraints
+ * have determined no update is required.
+ */
+ PICTOGRAMELEMENT_UPDATE_NEEDED,
+ /**
+ * Sent by the BPMN2 Feature Provider to test if a Pictogram Element can
+ * be updated. This event is sent even if the editor model constraints
+ * have already determined that an update can <strong>not</strong> be performed.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IUpdateContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ * <p>
+ * The Target Runtime client may set {@code LifecycleEvent.doit} to
+ * true to force the update action, even if the model constraints
+ * have determined that an update can not be performed.
+ */
+ PICTOGRAMELEMENT_CAN_UPDATE,
+ /**
+ * Sent by the BPMN2 Feature Provider immediately before a Pictogram Element is
+ * updated.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IUpdateContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_UPDATE,
+ /**
+ * Sent by the BPMN2 Feature Provider to test if a Pictogram Element can
+ * be laid out. This event is sent even if the editor model constraints
+ * have already determined that a layout can <strong>not</strong> be performed.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.ILayoutContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ * <p>
+ * The Target Runtime client may set {@code LifecycleEvent.doit} to
+ * true to force the layout action, even if the model constraints
+ * have determined that a layout can not be performed.
+ */
+ PICTOGRAMELEMENT_CAN_LAYOUT,
+ /**
+ * Sent by the BPMN2 Feature Provider immediately before a Pictogram Element has
+ * been laid out.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.ILayoutContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_LAYOUT,
+ /**
+ * Sent by the default BPMN2 Move Feature to test if a Pictogram Element can
+ * be moved. This event is sent even if the editor model constraints
+ * have already determined that the element can <strong>not</strong> be moved.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IMoveContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ * <p>
+ * The Target Runtime client may set {@code LifecycleEvent.doit} to
+ * true to force the move action, even if the model constraints
+ * have determined that it can not be moved.
+ */
+ PICTOGRAMELEMENT_CAN_MOVE,
+ /**
+ * Sent by the default BPMN2 Move Feature immediately
+ * <strong>before</strong> a Pictogram Element is moved. This is a good
+ * place to save size and location information just prior to the move in
+ * case other graphical elements depend on this object's size or
+ * location.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IMoveContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_PRE_MOVE,
+ /**
+ * Sent by the default BPMN2 Move Feature immediately <strong>after</strong>
+ * a Pictogram Element is moved. This is a good place to adjust the size
+ * or location of other graphical elements that may depend on this
+ * object's size or location.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IMoveContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_POST_MOVE,
+ /**
+ * Sent by the default BPMN2 Resize Feature to test if a Pictogram Element can
+ * be resized. This event is sent even if the editor model constraints
+ * have already determined that the element can <strong>not</strong> be resized.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IResizeShapeContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ * <p>
+ * The Target Runtime client may set {@code LifecycleEvent.doit} to
+ * true to force the resize action, even if the model constraints
+ * have determined that it can not be resized.
+ */
+ PICTOGRAMELEMENT_CAN_RESIZE,
+ /**
+ * Sent by the default BPMN2 Resize Feature immediately
+ * <strong>before</strong> a Pictogram Element is resized. This is a good
+ * place to save size and location information just prior to the resize in
+ * case other graphical elements depend on this object's size or
+ * location.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IResizeShapeContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_PRE_RESIZE,
+ /**
+ * Sent by the default BPMN2 Resize Feature immediately <strong>after</strong>
+ * a Pictogram Element is resized. This is a good place to adjust the size
+ * or location of other graphical elements that may depend on this
+ * object's size or location.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IResizeShapeContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_POST_RESIZE,
+ /**
+ * Sent by the default BPMN2 Delete Feature to test if a Pictogram Element can
+ * be deleted. This event is sent only if the editor model constraints
+ * have already determined that the element can be deleted.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IDeleteContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ * {@see org.eclipse.graphiti.ui.features.DefaultFeatureProvider}
+ * <p>
+ * The Target Runtime client may set {@code LifecycleEvent.doit} to
+ * false to prevent the action from being performed.
+ */
+ PICTOGRAMELEMENT_CAN_DELETE,
+ /**
+ * Sent by the default BPMN2 Delete Feature immediately after the Pictogram
+ * Element has been be deleted.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Pictogram
+ * Element.
+ * <p>
+ * The {@code LifecycleEvent.context} field will contain an
+ * {@code org.eclipse.graphiti.features.context.IDeleteContext} instance.
+ * <p>
+ * The {@code LifecycleEvent.featureProvider} field will be set to the
+ * BPMN2 Modeler Feature Provider instance.
+ */
+ PICTOGRAMELEMENT_DELETED,
+ // Transaction Events:
+ /**
+ * Sent by the editor framework immediately <strong>after</strong> a
+ * new transaction is started. This indicates that some change is about
+ * to be made to the model.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Transaction
+ * object.
+ */
+ TRANSACTION_STARTING,
+ /**
+ * Sent by the editor framework immediately <strong>after</strong> a
+ * transaction has been rolled back. This indicates that the user has canceled
+ * the operation and no changes were made to the model.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Transaction
+ * object.
+ */
+ TRANSACTION_INTERRUPTED,
+ /**
+ * Sent by the editor framework immediately <strong>after</strong> a
+ * transaction has been committed.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the Transaction
+ * object.
+ */
+ TRANSACTION_CLOSED,
+ // Command Stack Events:
+ /**
+ * Sent by the editor's operation command stack immediately <strong>after</strong>
+ * the user has performed an UNDO action.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the command stack Operation
+ * object.
+ */
+ COMMAND_UNDO,
+ /**
+ * Sent by the editor's operation command stack immediately <strong>after</strong>
+ * the user has performed a REDO action.
+ * <p>
+ * The {@code LifecycleEvent.target} field will contain the command stack Operation
+ * object.
+ */
+ COMMAND_REDO,
+ };
+
+ /** An Event Type. {@see LifecycleEvent.EventType} */
+ public EventType eventType;
+ /** The object affected by the event */
+ public Object target;
+ /** A Graphiti Context for Pictogram Element events*/
+ public IContext context;
+ /** The BPMN2 Feature Provider for Pictogram Element events*/
+ public IFeatureProvider featureProvider;
+ /** An override flag to force (or prevent) certain Pictogram Element actions */
+ public boolean doit = true;
+
+ /**
+ * Constructor for a simple event type and event object.
+ *
+ * @param eventType one of the EventType enumerations.
+ * @param target object affected by the event.
+ */
+ public LifecycleEvent(EventType eventType, Object target) {
+ this.eventType = eventType;
+ this.target = target;
+ }
+
+ /**
+ * Constructor for a Pictogram Element event.
+ *
+ * @param eventType one of the EventType enumerations.
+ * @param featureProvider the BPMN2 Feature Provider instance.
+ * @param context a Graphiti Context for the event.
+ * @param target object affected by the event.
+ */
+ public LifecycleEvent(EventType eventType, IFeatureProvider featureProvider, IContext context, Object target) {
+ this.eventType = eventType;
+ this.featureProvider = featureProvider;
+ this.context = context;
+ this.target = target;
+ }
+
+ @Override
+ public String toString() {
+ String s = Messages.LifecycleEvent_Event_Prefix+eventType;
+ if (target instanceof PictogramElement) {
+ EObject o = BusinessObjectUtil.getBusinessObjectForPictogramElement((PictogramElement)target);
+ if (o!=null) {
+ s += " " +o.eClass().getName(); //$NON-NLS-1$
+ }
+ }
+ else if (target instanceof EObject) {
+ EObject o = (EObject) target;
+ s += " " +o.eClass().getName(); //$NON-NLS-1$
+ }
+ return s;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Messages.java
index a6a0be57..626d707b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Messages.java
@@ -1,9 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core;
import org.eclipse.osgi.util.NLS;
+/**
+ * Contains externalized String constants.
+ */
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.messages"; //$NON-NLS-1$
+ public static String LifecycleEvent_Event_Prefix;
public static String ModelHandler_20;
public static String ModelHandler_21;
public static String ModelHandler_Choreography;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ToolTipProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ToolTipProvider.java
new file mode 100644
index 00000000..ba175a28
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ToolTipProvider.java
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core;
+
+import java.lang.reflect.Field;
+
+import org.eclipse.bpmn2.Choreography;
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.FlowElement;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.utils.JavaReflectionUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ */
+public class ToolTipProvider extends NLS implements IToolTipProvider {
+
+ public final static ToolTipProvider INSTANCE = new ToolTipProvider();
+
+ /**
+ *
+ */
+ public ToolTipProvider() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IToolTipProvider#getToolTip(java.lang.Object, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public String getToolTip(Object context, EObject object) {
+ // TODO Auto-generated method stub
+ return getUIText(context, object, "tooltip");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IToolTipProvider#getLongDescription(java.lang.Object, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public String getLongDescription(Object context, EObject object) {
+ // TODO Auto-generated method stub
+ return getUIText(context, object, "description");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IToolTipProvider#getToolTip(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature)
+ */
+ @Override
+ public String getToolTip(Object context, EObject object, EStructuralFeature feature) {
+ return getUIText(context, object, feature, "tooltip");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IToolTipProvider#getLongDescription(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature)
+ */
+ @Override
+ public String getLongDescription(Object context, EObject object, EStructuralFeature feature) {
+ return getUIText(context, object, feature, "description");
+ }
+
+ /**
+ * Get the verbose description for a given object. If the object is a
+ * {@code org.eclipse.bpmn2.di.BPMNDiagram} instance, the DiagramType name
+ * is prepended to the object description. If the object represents a
+ * {@code org.eclipse.bpmn2.ParticipantBand} the description is prefixed with
+ * "ParticipantBand".
+ *
+ *
+ * @param context any object in the defining plug-in. This object's
+ * Class Loader is used to search for a {@code Messages} class
+ * which is assumed to contain String fields in the form
+ *
+ * <pre>
+ * UI_<i>ObjectTypeName</i>_description
+ * </pre>
+ *
+ * where <i>ObjectTypeName</i> is the name of the model object's
+ * type (the EClass).
+ * @param object the object to search for.
+ * @return a verbose description string or an empty string if no description is found.
+ */
+ private String getUIText(Object context, EObject object, String type) {
+ String name = ""; //$NON-NLS-1$
+ String description = ""; //$NON-NLS-1$
+ if (object instanceof BPMNDiagram) {
+ switch(ModelUtil.getDiagramType(object)) {
+ case NONE:
+ name = "UnknownDiagram"; //$NON-NLS-1$
+ break;
+ case PROCESS:
+ name = "Process"; //$NON-NLS-1$
+ break;
+ case CHOREOGRAPHY:
+ name = "Choreography"; //$NON-NLS-1$
+ break;
+ case COLLABORATION:
+ name = "Collaboration"; //$NON-NLS-1$
+ break;
+ case CONVERSATION:
+ name = "Conversation"; //$NON-NLS-1$
+ break;
+ default:
+ break;
+ }
+ }
+ else if (object instanceof Participant) {
+ Participant participant = (Participant) object;
+ EObject container = participant.eContainer();
+ if (container instanceof Choreography) {
+ for (FlowElement fe : ((Choreography)container).getFlowElements()) {
+ if (fe instanceof ChoreographyActivity) {
+ ChoreographyActivity ca = (ChoreographyActivity) fe;
+ if (ca.getParticipantRefs().contains(participant)) {
+ name = "ParticipantBand"; //$NON-NLS-1$
+ break;
+ }
+ }
+ }
+ }
+ }
+ // Get the model object's long description from the Messages class.
+ // The field in Messages that contains the description will have the
+ // form: "UI_<objectName>_description".
+ // The Messages class must be contained somewhere in the package hierarchy
+ // that contains the searchObject's class.
+ try {
+ if (name.isEmpty()) {
+ description = getUIText(context,object,null, type);
+ }
+ else {
+ String fieldName = "UI_" + name + "_" + type; //$NON-NLS-1$ //$NON-NLS-2$
+ Class messages = JavaReflectionUtil.findClass(context, "Messages"); //$NON-NLS-1$
+ Field field = messages.getField(fieldName);
+ description = (String)field.get(null);
+ }
+ } catch (Exception e) {
+ description = getUIText(context,object,null, type);
+ }
+
+ return description;
+ }
+
+ /**
+ * Get the verbose description for a given object feature.
+ *
+ * @param context any object in the defining plug-in. This object's
+ * Class Loader is used to search for a {@code Messages} class
+ * which is assumed to contain String fields in the form
+ *
+ * <pre>
+ * UI_<i>ObjectTypeName</i>_<i>FeatureName</i>_description
+ * </pre>
+ *
+ * where <i>ObjectTypeName</i> is the name of the model object's
+ * type (the EClass) and <i>FeatureName</i> is the feature name.
+ * @param object the object to search for.
+ * @param feature the object's feature.
+ * @return a verbose description string or an empty string if no description is found.
+ */
+ private String getUIText(Object context, EObject object, EStructuralFeature feature, String type) {
+ String fieldName;
+ Field field;
+ String description = ""; //$NON-NLS-1$
+
+ // Get the model feature's long description from the Messages class.
+ // The field in Messages that contains the description will have the
+ // form: "UI_<objectName>_<featureName>_description".
+ // If that entry is not found, try looking for something in the form:
+ // "UI_Any_<featureName>_description".
+ // The Messages class must be contained somewhere in the package hierarchy
+ // that contains the searchObject's class.
+ Class messages = JavaReflectionUtil.findClass(context, "Messages"); //$NON-NLS-1$
+ if (messages!=null) {
+ ClassLoader classLoader = messages.getClassLoader();
+ boolean found = false;
+ do {
+ try {
+ // fetch the description for this EClass and feature
+ EClass eClass = object instanceof EClass ? (EClass)object : object.eClass();
+ String className = eClass.getName().replaceAll("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ if (feature==null)
+ fieldName = "UI_" + className + "_" + type; //$NON-NLS-1$ //$NON-NLS-2$
+ else
+ fieldName = "UI_" + className + "_" + feature.getName() + "_" + type; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ field = messages.getField(fieldName);
+ description += (String)field.get(null);
+ found = true;
+ }
+ catch (Exception e) {
+ try {
+ // if a description is not found for this EClass, try "Any"
+ if (feature!=null) {
+ fieldName = "UI_Any_" + feature.getName() + "_" + type; //$NON-NLS-1$ //$NON-NLS-2$
+ field = messages.getField(fieldName);
+ description += (String)field.get(null);
+ found = true;
+ }
+ }
+ catch (Exception e2) {
+ }
+ }
+ if (!found) {
+ // try looking for a Messages class in the parent package
+ String packageName = messages.getPackage().getName();
+ messages = null;
+ int index;
+ while ((index = packageName.lastIndexOf(".")) != -1) { //$NON-NLS-1$
+ packageName = packageName.substring(0, index);
+ String className = packageName + ".Messages"; //$NON-NLS-1$
+ try {
+ messages = Class.forName(className, true, classLoader);
+ break;
+ }
+ catch (Exception e3) {
+ }
+ }
+ }
+ }
+ while (!found && messages!=null);
+ }
+ return description;
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractAdapter.java
index 03b733a3..03b733a3 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractStatefulAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractStatefulAdapter.java
index 2102ec35..2102ec35 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractStatefulAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AbstractStatefulAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterProvider.java
index 3c3786c8..56b13314 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterProvider.java
@@ -16,16 +16,16 @@ import org.eclipse.emf.common.notify.Adapter;
/**
* The primary motivation for this class is to delegate the decision
- * of whether an adapter is stateless or statefull.
- *
+ * of whether an adapter is stateless or statefull.
+ * <p>
* In the case of a stateless adapter, the singleton instance is
* always returned.
- *
+ * <p>
* The factory classes simply call
* <pre>
* adapter.getAdatper ( Class )
* </pre>
- *
+ * <p>
* An adapter is considered stateful if it implements IStatefullAdapter
*
* @author Michal Chmielewski (michal.chmielewski@oracle.com)
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterRegistry.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterRegistry.java
index e0b7d464..583ecd96 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterRegistry.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterRegistry.java
@@ -14,8 +14,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import org.eclipse.bpmn2.di.impl.BpmnDiPackageImpl;
-import org.eclipse.bpmn2.di.provider.BpmnDiItemProviderAdapterFactory;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.Platform;
@@ -219,7 +217,6 @@ public class AdapterRegistry {
}
Object adapter = null;
-
if (target instanceof EObject) {
EObject eObj = (EObject) target;
@@ -355,7 +352,7 @@ public class AdapterRegistry {
/**
* @param factory
- * @param class1
+ * @param clazz
*/
public void registerAdapterFactory(IAdapterFactory factory, Class<?> clazz) {
fAdapterManager.registerAdapters(factory, clazz);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterUtil.java
index 400007ae..2d87f0fe 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/AdapterUtil.java
@@ -15,18 +15,17 @@ package org.eclipse.bpmn2.modeler.core.adapters;
/**
- * @author Bob Brodt
- *
+ * Provides convenience methods for adapting model objects.
*/
public class AdapterUtil {
/**
- * @param <T>
- * @param target
- * @param clazz
- * @return the adapted interface or object
+ * Get or create an adapter of the given type for the model object.
+ *
+ * @param target the model object to be adapted.
+ * @param clazz type of the adapter.
+ * @return the adapted interface or object.
*/
- @SuppressWarnings("unchecked")
public static <T extends Object> T adapt ( Object target, Class<T> clazz) {
return AdapterRegistry.INSTANCE.adapt(target, clazz);
}
@@ -35,6 +34,7 @@ public class AdapterUtil {
* This method tries the registered adapter factories one by one, returning
* the first non-null result it gets. If none of the factories can adapt
* the result, it returns null.
+ *
* @param target target object
* @param type type of the adapter to find
* @return the adapter for the target.
@@ -47,19 +47,19 @@ public class AdapterUtil {
/**
* Create an adapter for the given target of the given type.
* In addition, pass a context object to the adapter(s) of the target.
- *
+ * <p>
* The idea is that some adapters can be stateful and depend not only
* on the objects that they wrap, button also on some other context that is needed
* to completely and correctly implement the interface for which the adaptor is
* needed.
- *
+ * <p>
* Adapters that are stateless, should ignore any notifications sent to them.
- *
- * @param target the target object
- * @param type the type it wants to adapt to
- * @param context the context object
*
- * @return the adapter
+ * @param target the target object.
+ * @param type the type it wants to adapt to.
+ * @param context the context object.
+ *
+ * @return the adapter.
*/
public static Object adapt (Object target, Object type, Object context) {
return AdapterRegistry.INSTANCE.adapt(target, type,context);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/BasicEObjectAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/BasicEObjectAdapter.java
index 5b6f5a9f..5b6f5a9f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/BasicEObjectAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/BasicEObjectAdapter.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java
new file mode 100644
index 00000000..0fa84551
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesAdapter.java
@@ -0,0 +1,604 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.bpmn2.ExtensionAttributeValue;
+import org.eclipse.bpmn2.modeler.core.ToolTipProvider;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * This class is a light weight replacement for the {@code ItemProviderAdapter}
+ * classes generated by EMF for the BPMN2 model. It uses Java generics to
+ * specialize the adapter for a given model object. This allows extension
+ * plug-ins to provide their own implementations for BPMN2 types.
+ *
+ * This can be extended by contributing plug-ins using the
+ * {@code <propertyExtension>} extension point. See the
+ * {@code org.eclipse.bpmn2.modeler.runtime} extension point documentation for
+ * more details.
+ */
+public class ExtendedPropertiesAdapter<T extends EObject> extends ObjectPropertyProvider {
+
+ /** Property key for the verbose description of this model object */
+ public final static String LONG_DESCRIPTION = "long.description"; //$NON-NLS-1$
+ /** Property key indicating if this object can be edited, or is read-only */
+ public final static String UI_CAN_EDIT = "ui.can.edit"; //$NON-NLS-1$
+ /**
+ * Any adapter that uses this must override setValue() which understands
+ * how to convert a String to the required type. This is used in
+ * ComboObjectEditor (maybe others in the future)
+ */
+ public final static String UI_CAN_EDIT_INLINE = "ui.can.edit.inline"; //$NON-NLS-1$
+ public final static String UI_CAN_CREATE_NEW = "ui.can.create.new"; //$NON-NLS-1$
+ /**
+ * For Combo boxes (ComboObjectEditor), this indicates that an empty
+ * selection will be added to the list of possible choices; For Text fields
+ * (TextObjectEditor), this indicates that the actual value of a feature
+ * should be used as the edit field text instead of its textual
+ * representation as returned by @link ModelUtil#getDisplayName(). In this
+ * case, if the value is null, it will be replaced with an empty string.
+ */
+ public final static String UI_CAN_SET_NULL = "ui.can.set.null"; //$NON-NLS-1$
+ /**
+ * Property key indicating if this object is multi-valued (i.e. requires a
+ * Comob box or similar selection widget)
+ */
+ public final static String UI_IS_MULTI_CHOICE = "ui.is.multi.choice"; //$NON-NLS-1$
+ /** Property key for the the {@code ObjectDescriptor} object */
+ public static final String OBJECT_DESCRIPTOR = "object.descriptor"; //$NON-NLS-1$
+ /** Property key for the {@code FeatureDescriptor} object */
+ public static final String FEATURE_DESCRIPTOR = "feature.descriptor"; //$NON-NLS-1$
+ /** Property key for the line number in XML document where this object is defined */
+ public static final String LINE_NUMBER = "line.number"; //$NON-NLS-1$
+ public static final String IS_EXTENSION_FEATURE = "is.extension.feature"; //$NON-NLS-1$
+
+ /**
+ * An {@code ExtendedPropertiesAdapter} may be created with a type (EClass) and then later
+ * receive the actual object that is to be adapted {@see ExtendedPropertiesAdapter#setTarget(Notifier)}.
+ * Since we can't actually adapt the EClass itself, we need to construct dummy objects
+ * that will temporarily hold the adapter until it can receive the actual target object.
+ */
+ private static Hashtable<EClass,EObject> dummyObjects = new Hashtable<EClass,EObject>();
+
+ /**
+ * The map of EStructuralFeatures that need {@code FeatureDescriptor}
+ * provider classes.
+ */
+ private Hashtable<
+ EStructuralFeature, // feature type
+ Hashtable<String,Object>> // property key and value
+ featureProperties = new Hashtable<EStructuralFeature, Hashtable<String,Object>>();
+
+ /**
+ * The Adapter Factory that was used to construct this
+ * {@code ExtendedPropertiesAdapter}
+ */
+ private AdapterFactory adapterFactory;
+
+ /**
+ * Constructor that adapts the given model object.
+ *
+ * @param adapterFactory the Adapter Factory instance.
+ * @param object the object to be adapted.
+ */
+ public ExtendedPropertiesAdapter(AdapterFactory adapterFactory, T object) {
+ super(object.eResource());
+ this.adapterFactory = adapterFactory;
+ setTarget(object);
+ }
+
+ /**
+ * Convenience method for creating and adapting a model object for an
+ * {@code ExtendedPropertiesAdapter}.
+ *
+ * @param object the object to be adapted.
+ * @return the {@code ExtendedPropertiesAdapter}
+ */
+ @SuppressWarnings("rawtypes")
+ public static ExtendedPropertiesAdapter adapt(Object object) {
+ return adapt(object,null);
+ }
+
+ /**
+ * Convenience method for creating and adapting a feature of a model object
+ * for an {@code ExtendedPropertiesAdapter}.
+ *
+ * @param object the object to be adapted.
+ * @param feature a feature of the given object.
+ * @return the {@code ExtendedPropertiesAdapter}
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public static ExtendedPropertiesAdapter adapt(Object object, EStructuralFeature feature) {
+ ExtendedPropertiesAdapter adapter = null;
+ if (object instanceof ExtensionAttributeValue)
+ object = ((ExtensionAttributeValue) object).eContainer();
+ if (object instanceof EObject) {
+ // If the EObject already has one of these adapters, find the "best" one for
+ // the given feature. The "best" means the adapter will have defined a FeatureDescriptor
+ // for the given feature.
+ EObject eObject = (EObject) object;
+ ExtendedPropertiesAdapter genericAdapter = null;
+ for (Adapter a : eObject.eAdapters()) {
+ if (a instanceof ExtendedPropertiesAdapter && ((ExtendedPropertiesAdapter)a).canAdapt(eObject, feature)) {
+ if (a.getClass() == ExtendedPropertiesAdapter.class)
+ genericAdapter = (ExtendedPropertiesAdapter) a;
+ else
+ adapter = (ExtendedPropertiesAdapter) a;
+ }
+ }
+ // if no "best" adapter is found, use the generic adapter if one has been created for this EObject
+ if (adapter==null && genericAdapter!=null)
+ adapter = genericAdapter;
+
+ EObject eclass = getFeatureClass(eObject,feature);
+ if (adapter==null)
+ adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(eclass, ExtendedPropertiesAdapter.class);
+ if (adapter!=null) {
+ if (eObject instanceof EClass) {
+ EObject dummy = getDummyObject((EClass)eObject);
+ if (dummy!=null)
+ eObject = dummy;
+ }
+ adapter.setTarget(eObject);
+ adapter.getObjectDescriptor().setObject(eObject);
+ if (feature!=null)
+ adapter.getFeatureDescriptor(feature).setObject(eObject);
+
+ // load the description for this object from Messages
+// if (adapter.getProperty(LONG_DESCRIPTION)==null) {
+// String description = getDescription(adapter.adapterFactory, eObject);
+// if (description!=null && !description.isEmpty())
+// adapter.setProperty(LONG_DESCRIPTION, description);
+// }
+ }
+ }
+ return adapter;
+ }
+
+ /**
+ * Dummy objects are constructed when needed for an
+ * {@code ExtendedPropertiesAdapter}. The adapter factory (@see
+ * org.eclipse.bpmn2
+ * .modeler.ui.adapters.Bpmn2EditorItemProviderAdapterFactory) knows how to
+ * construct an ExtendedPropertiesAdapter from an EClass, however the
+ * adapter itself needs an EObject. This method constructs and caches these
+ * dummy objects as they are needed.
+ *
+ * @param eclass EClass of the object to create.
+ * @return an orphan EObject of the given EClass type.
+ */
+ public static EObject getDummyObject(EClass eclass) {
+ EObject object = dummyObjects.get(eclass);
+ if (object==null && eclass.eContainer() instanceof EPackage && !eclass.isAbstract()) {
+ EPackage pkg = (EPackage)eclass.eContainer();
+ object = pkg.getEFactoryInstance().create(eclass);
+ dummyObjects.put(eclass, object);
+ }
+ return object;
+ }
+
+ /**
+ * Returns the Adapter Factory that created this
+ * {@code ExtendedPropertiesAdapter}
+ *
+ * @return the Adapter Factory.
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * Sets the Object Descriptor for this adapter. See {@code ObjectDescriptor}
+ * for details.
+ *
+ * @param od the ObjectDescriptor instance.
+ */
+ public void setObjectDescriptor(ObjectDescriptor<T> od) {
+ setProperty(OBJECT_DESCRIPTOR,od);
+ od.setOwner(this);
+ }
+
+ /**
+ * Returns the EClass of the given object's feature. If the EClass is
+ * abstract, returns the EObject itself.
+ *
+ * @param object an EObject
+ * @param feature an EStructuralFeature of the object
+ * @return a feature EClass, or the object if the feature is abstract.
+ */
+ private static EObject getFeatureClass(EObject object, EStructuralFeature feature) {
+ EClass eclass = null;
+ if (feature!=null && feature.eContainer() instanceof EClass) {
+ eclass = (EClass)feature.eContainer();
+ }
+ if (eclass==null || eclass.isAbstract()) {
+ return object;
+ }
+ return eclass;
+ }
+
+ /**
+ * Returns the Object Descriptor for this adapter. If an Object Descriptor
+ * has not been set, a default implementation is created and set for this
+ * adapter.
+ *
+ * @return the Object Descriptor instance.
+ */
+ @SuppressWarnings("unchecked")
+ public ObjectDescriptor<T> getObjectDescriptor() {
+ ObjectDescriptor<T> od = (ObjectDescriptor<T>) getProperty(OBJECT_DESCRIPTOR);
+ if (od==null) {
+ setObjectDescriptor(od = new ObjectDescriptor<T>(this, (T)getTarget()));
+ }
+ return od;
+ }
+
+ /**
+ * Check if a FeatureDescriptor exists for the given feature.
+ *
+ * @param feature an EStructuralFeature
+ * @return true if the adapter has a FeatureDescriptor, false if not.
+ */
+ @SuppressWarnings("unchecked")
+ public boolean hasFeatureDescriptor(EStructuralFeature feature) {
+ FeatureDescriptor<T> fd = (FeatureDescriptor<T>) getProperty(feature,FEATURE_DESCRIPTOR);
+ return fd!=null;
+ }
+
+ /**
+ * Returns the Feature Descriptor for this adapter. If a Feature Descriptor has not been
+ * set, a default implementation is created and set for this adapter.
+ *
+ * @param feature an EStructuralFeature
+ * @return the FeatureDescriptor instance.
+ */
+ @SuppressWarnings("unchecked")
+ public FeatureDescriptor<T> getFeatureDescriptor(EStructuralFeature feature) {
+ FeatureDescriptor<T> fd = (FeatureDescriptor<T>) getProperty(feature,FEATURE_DESCRIPTOR);
+ if (fd==null) {
+ setFeatureDescriptor(feature, fd = new FeatureDescriptor<T>(this, (T)getTarget(), feature));
+ }
+ return fd;
+ }
+
+ /**
+ * Convenience method for getting the Feature Descriptor by feature name.
+ *
+ * @param featureName name of a feature.
+ * @return same as {@code getFeatureDescriptor(EStructuralFeature)}
+ */
+ public FeatureDescriptor<T> getFeatureDescriptor(String featureName) {
+ EStructuralFeature feature = getFeature(featureName);
+ return getFeatureDescriptor(feature);
+ }
+
+ /**
+ * Sets the Feature Descriptor for the given feature. Clients may use this to override
+ * default behavior for specific object features.
+ *
+ * @param feature an EStructuralFeature
+ * @param fd the Feature Descriptor instance
+ */
+ public void setFeatureDescriptor(EStructuralFeature feature, FeatureDescriptor<T> fd) {
+ Hashtable<String,Object> props = featureProperties.get(feature);
+ if (props==null) {
+ props = new Hashtable<String,Object>();
+ featureProperties.put(feature,props);
+ }
+ fd.setOwner(this);
+ props.put(FEATURE_DESCRIPTOR, fd);
+ }
+
+ /**
+ * Lookup method for the given feature name.
+ *
+ * @param name name of a feature
+ * @return the EStructuralFeature of the object provided by the Object Descriptor.
+ */
+ public EStructuralFeature getFeature(String name) {
+ EObject object = getObjectDescriptor().object;
+ if (object instanceof ExtensionAttributeValue) {
+ EObject container = ((ExtensionAttributeValue)object).eContainer();
+ if (container!=null) {
+ ExtendedPropertiesAdapter adapter = this.adapt(container);
+ if (adapter!=null)
+ return adapter.getFeature(name);
+ }
+ }
+ for (Entry<EStructuralFeature, Hashtable<String, Object>> entry : featureProperties.entrySet()) {
+ EStructuralFeature feature = entry.getKey();
+ if (feature.getName().equals(name)) {
+ return feature;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns a list of all features that have Feature Descriptors in this adapter.
+ *
+ * @return a list of EStructuralFeatures
+ */
+ public List<EStructuralFeature> getFeatures() {
+ EObject object = getObjectDescriptor().object;
+ if (object instanceof ExtensionAttributeValue) {
+ EObject container = ((ExtensionAttributeValue)object).eContainer();
+ if (container!=null) {
+ ExtendedPropertiesAdapter adapter = this.adapt(container);
+ if (adapter!=null)
+ return adapter.getFeatures();
+ }
+ }
+ List<EStructuralFeature> features = new ArrayList<EStructuralFeature>();
+ features.addAll(featureProperties.keySet());
+ return features;
+ }
+
+ public List<EStructuralFeature> getExtensionFeatures() {
+ List<EStructuralFeature> features = new ArrayList<EStructuralFeature>();
+ for (EStructuralFeature f : getFeatures()) {
+ FeatureDescriptor fd = getFeatureDescriptor(f);
+ if (fd.getProperty(IS_EXTENSION_FEATURE)!=null)
+ features.add(f);
+ }
+ return features;
+ }
+
+ /**
+ * Return a list of all Object Properties.
+ *
+ * @return a list of Object Properties
+ */
+ private Hashtable <String, Object> getObjectProperties() {
+ if (properties==null)
+ properties = new Hashtable <String,Object>();
+ return properties;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider#getProperty(java.lang.String)
+ */
+ public Object getProperty(String key) {
+ return getObjectProperties().get(key);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider#setProperty(java.lang.String, java.lang.Object)
+ *
+ * Set the value for an Object Property.
+ *
+ * @param key property name.
+ * @param value property value.
+ */
+ public void setProperty(String key, Object value) {
+ if (value==null)
+ getObjectProperties().remove(key);
+ else
+ getObjectProperties().put(key, value);
+ }
+
+ /**
+ * Gets the value of the Feature Property.
+ *
+ * @param feature the feature
+ * @param key the key
+ * @return the property value
+ */
+ public Object getProperty(EStructuralFeature feature, String key) {
+ Hashtable<String,Object> props = featureProperties.get(feature);
+ if (props==null) {
+ props = new Hashtable<String,Object>();
+ featureProperties.put(feature,props);
+ }
+ return props.get(key);
+ }
+
+ /**
+ * Convenience method to get the boolean value of an Object Property.
+ *
+ * @param key the Object Property key
+ * @return true or false depending on the Object Property value. If this is
+ * not a boolean property, return false.
+ */
+ public boolean getBooleanProperty(String key) {
+ Object result = getProperty(key);
+ if (result instanceof Boolean)
+ return ((Boolean)result);
+ return false;
+ }
+
+ /**
+ * Convenience method to get the boolean value of a Feature Property.
+ *
+ * @param feature the object's feature
+ * @param key the Feature Property key
+ * @return true or false depending on the Object Property value. If this is
+ * not a boolean property, return false.
+ */
+ public boolean getBooleanProperty(EStructuralFeature feature, String key) {
+ Object result = getProperty(feature, key);
+ if (result instanceof Boolean)
+ return ((Boolean)result);
+ return false;
+ }
+
+ /**
+ * Set the value of a Feature Property.
+ *
+ * @param feature the object's feature
+ * @param key the Feature Property key
+ * @param value the property value
+ */
+ public void setProperty(EStructuralFeature feature, String key, Object value) {
+ Hashtable<String,Object> props = featureProperties.get(feature);
+ if (props==null) {
+ props = new Hashtable<String,Object>();
+ featureProperties.put(feature,props);
+ }
+ props.put(key, value);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.common.notify.impl.AdapterImpl#setTarget(org.eclipse.emf.common.notify.Notifier)
+ */
+ public void setTarget(Notifier newTarget) {
+ super.setTarget(newTarget);
+ if (newTarget instanceof EObject && !(newTarget instanceof EClass)) {
+ EObject object = (EObject)newTarget;
+ for (Adapter a : object.eAdapters()) {
+ if (a instanceof ExtendedPropertiesAdapter)
+ return;
+ }
+ object.eAdapters().add(this);
+ }
+ }
+
+ /**
+ * Check if the given object feature can be adapted.
+ *
+ * @param object the object
+ * @param feature the feature
+ * @return true, if the object has a Feature Descriptor for the given feature.
+ */
+ public boolean canAdapt(EObject object, EStructuralFeature feature) {
+ if (object!=null) {
+ if (getObjectDescriptor().object.eClass() == object.eClass()) {
+ if (feature==null)
+ return true;
+ // only TRUE if this adapter already has a FeatureDescriptor for this feature
+ Hashtable<String,Object> props = featureProperties.get(feature);
+ if (props!=null) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public String getDescription(EObject object) {
+ return ToolTipProvider.INSTANCE.getLongDescription(adapterFactory,object);
+ }
+
+ /**
+ * Compare two EObjects. The default implementation of this method compares the values of
+ * identical features of both objects. This method recognizes features that are {@code StringWrapper}
+ * (proxy) objects and compares their string values.
+ *
+ * @param thisObject an EObject
+ * @param otherObject an EObject to be compared against thisObject.
+ * @param similar if true, then the ID attributes of the objects being compared <b>may</b> be different.
+ * @return
+ */
+ @SuppressWarnings("rawtypes")
+ public static boolean compare(EObject thisObject, EObject otherObject, boolean similar) {
+ for (EStructuralFeature f : thisObject.eClass().getEAllStructuralFeatures()) {
+ // IDs are allowed to be different
+ if (similar && "id".equals(f.getName())) //$NON-NLS-1$
+ continue;
+ Object v1 = otherObject.eGet(f);
+ Object v2 = thisObject.eGet(f);
+ // both null? equal!
+ if (v1==null && v2==null)
+ continue;
+ // one or the other null? not equal!
+ if (v1==null || v2==null)
+ return false;
+ // both not null? do a default compare...
+ if (!v1.equals(v2)) {
+ // the default Object.equals(obj) fails:
+ // for Dynamic EObjects (used here as "proxies") only compare their proxy URIs
+ if (ModelUtil.isStringWrapper(v1) && ModelUtil.isStringWrapper(v2)) {
+ v1 = ModelUtil.getStringWrapperValue(v1);
+ v2 = ModelUtil.getStringWrapperValue(v2);
+ if (v1==null && v2==null)
+ continue;
+ if (v1==null || v2==null)
+ return false;
+ if (v1.equals(v2))
+ continue;
+ }
+ else if (v1 instanceof EObject && v2 instanceof EObject) {
+ // for all other EObjects, do a deep compare...
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt((EObject)v1);
+ if (adapter!=null) {
+ if (adapter.getObjectDescriptor().compare((EObject)v2,similar))
+ continue;
+ }
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider#getResource()
+ */
+ @Override
+ public Resource getResource() {
+ Resource resource = super.getResource();
+ if (resource==null) {
+ ObjectDescriptor<T> od = (ObjectDescriptor<T>) getProperty(OBJECT_DESCRIPTOR);
+ if (od!=null) {
+ IResourceProvider rp = AdapterRegistry.INSTANCE.adapt(od.object.eContainer(), IResourceProvider.class);
+ if (rp!=null && rp!=this)
+ resource = rp.getResource();
+ }
+ }
+ if (resource==null)
+ return super.getResource();
+ return resource;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider#getEditingDomain()
+ */
+ public TransactionalEditingDomain getEditingDomain() {
+ EditingDomain result = null;
+ if (adapterFactory instanceof IEditingDomainProvider) {
+ result = ((IEditingDomainProvider) adapterFactory).getEditingDomain();
+ }
+ if (result == null) {
+ if (adapterFactory instanceof ComposeableAdapterFactory) {
+ AdapterFactory rootAdapterFactory = ((ComposeableAdapterFactory) adapterFactory)
+ .getRootAdapterFactory();
+ if (rootAdapterFactory instanceof IEditingDomainProvider) {
+ result = ((IEditingDomainProvider) rootAdapterFactory).getEditingDomain();
+ }
+ }
+ }
+ // it's gotta be a Transactional Editing Domain or nothing!
+ if (result instanceof TransactionalEditingDomain)
+ return (TransactionalEditingDomain)result;
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java
new file mode 100644
index 00000000..8c89d76f
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ExtendedPropertiesProvider.java
@@ -0,0 +1,402 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * A convenience wrapper class for <b>most</b> of the ExtendedPropertiesAdapter methods.
+ * <p>
+ * Most methods provide reasonable defaults for EObjects that can <b>not</b> be adapted
+ * for {@code ExtendedPropertiesAdapter}
+ */
+@SuppressWarnings({ "rawtypes", "unchecked" })
+public class ExtendedPropertiesProvider {
+
+ /**
+ * See {@link ObjectDescriptor#getLabel()}
+ */
+ public static String getLabel(EObject object) {
+ String label = ""; //$NON-NLS-1$
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter != null)
+ label = adapter.getObjectDescriptor().getLabel();
+ else if (object!=null)
+ label = ModelUtil.toCanonicalString(object.eClass().getName());
+ return label;
+ }
+
+ /**
+ * See {@link ObjectDescriptor#setLabel(String)}
+ */
+ public static void setLabel(EObject object, String label) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter != null)
+ adapter.getObjectDescriptor().setLabel(label);
+ }
+
+ /**
+ * See {@link FeatureDescriptor#getLabel()}
+ */
+ public static String getLabel(EObject object, EStructuralFeature feature) {
+ String label = ""; //$NON-NLS-1$
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null)
+ label = adapter.getFeatureDescriptor(feature).getLabel();
+ else
+ label = ModelUtil.toCanonicalString(feature.getName());
+ label = label.replaceAll(" Ref$", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ return label;
+ }
+
+ /**
+ * See {@link FeatureDescriptor#setLabel()}
+ */
+ public static void setLabel(EObject object, EStructuralFeature feature, String label) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null)
+ adapter.getFeatureDescriptor(feature).setLabel(label);
+ }
+
+ /**
+ * See {@link ObjectDescriptor#getTextValue()}
+ */
+ public static String getTextValue(EObject object) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter != null) {
+ String text = adapter.getObjectDescriptor().getTextValue();
+ if (text != null && !text.isEmpty()) {
+ return text;
+ }
+ }
+ return ModelUtil.toCanonicalString(object);
+ }
+
+ /**
+ * See {@link ObjectDescriptor#setTextValue(String)}
+ */
+ public static boolean setTextValue(EObject object, String value) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ adapter.getObjectDescriptor().setTextValue(value);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * See {@link FeatureDescriptor#getTextValue()}
+ */
+ public static String getTextValue(EObject object, EStructuralFeature feature) {
+ if (feature == null)
+ return getTextValue(object);
+
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null)
+ return adapter.getFeatureDescriptor(feature).getTextValue();
+ try {
+ Object value = object.eGet(feature);
+ return value.toString();
+ } catch (Exception e) {
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * See {@link FeatureDescriptor#getValue()}
+ */
+ public static Object getValue(final EObject object, final EStructuralFeature feature) {
+ return getValue(object, feature, -1);
+ }
+
+ /**
+ * See {@link FeatureDescriptor#getValueList()}
+ */
+ public static List<Object> getValueList(EObject object, EStructuralFeature feature) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ return adapter.getFeatureDescriptor(feature).getValueList();
+ }
+
+ /**
+ * See {@link FeatureDescriptor#getValue(int)}
+ */
+ public static Object getValue(final EObject object, final EStructuralFeature feature, int index) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ Object value = adapter == null ? object.eGet(feature) : adapter.getFeatureDescriptor(feature).getValue(index);
+ return value;
+ }
+
+ /**
+ * See {@link FeatureDescriptor#setValue(Object)}
+ */
+ public static boolean setValue(EObject object, EStructuralFeature feature, Object value) {
+ return setValue(object, feature, value, -1);
+ }
+
+ /**
+ * See {@link FeatureDescriptor#setValue(Object,int)}
+ */
+ public static boolean setValue(EObject object, EStructuralFeature feature, Object value, int index) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ return adapter.getFeatureDescriptor(feature).setValue(value, index);
+ }
+
+ /**
+ * See {@link FeatureDescriptor#isMultiLine()}
+ */
+ public static boolean isMultiLineText(EObject object, EStructuralFeature feature) {
+ if (feature == null)
+ return false;
+
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null)
+ return adapter.getFeatureDescriptor(feature).isMultiLine();
+ return false;
+ }
+
+ /**
+ * See {@link FeatureDescriptor#setMultiLine(boolean)}
+ */
+ public static boolean setMultiLineText(EObject object, EStructuralFeature feature, boolean multiLine) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null) {
+ adapter.getFeatureDescriptor(feature).setMultiLine(multiLine);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * See {@link FeatureDescriptor#getChoiceOfValues()}
+ */
+ public static Hashtable<String, Object> getChoiceOfValues(EObject object, EStructuralFeature feature) {
+ if (feature == null)
+ return null;
+
+ if (feature.getEType() instanceof EEnum) {
+ EEnum en = (EEnum) feature.getEType();
+ Hashtable<String, Object> choices = new Hashtable<String, Object>();
+ for (EEnumLiteral el : en.getELiterals()) {
+ choices.put(el.getLiteral(), el.getInstance());
+ }
+ return choices;
+ }
+
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null)
+ return adapter.getFeatureDescriptor(feature).getChoiceOfValues();
+ return null;
+ }
+
+ /**
+ * See {@link ExtendedPropertiesAdapter.UI_IS_MULTI_CHOICE}
+ */
+ public static boolean isMultiChoice(EObject object, EStructuralFeature feature) {
+ if (feature == null) {
+ return false;
+ }
+
+ if (feature.getEType() instanceof EEnum) {
+ return true;
+ }
+
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null) {
+ Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_IS_MULTI_CHOICE);
+ if (result instanceof Boolean)
+ return ((Boolean) result);
+ }
+
+ if (feature instanceof EReference && feature.isMany()) {
+ return !((EReference)feature).isContainment();
+ }
+
+ return getChoiceOfValues(object, feature) != null;
+ }
+
+ /**
+ * See {@link ExtendedPropertiesAdapter.UI_CAN_EDIT}
+ */
+ public static boolean canEdit(EObject object, EStructuralFeature feature) {
+ if (feature != null && feature.getEType() instanceof EClass) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null) {
+ Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_EDIT);
+ if (result instanceof Boolean)
+ return ((Boolean) result);
+ }
+ if (feature instanceof EReference) {
+ if (((EReference) feature).isContainment())
+ return true;
+ if (Bpmn2Package.eINSTANCE.getRootElement().isSuperTypeOf((EClass) feature.getEType()))
+ return true;
+ if (feature.isMany())
+ return true;
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * See {@link ExtendedPropertiesAdapter.UI_CAN_CREATE_NEW}
+ */
+ public static boolean canCreateNew(EObject object, EStructuralFeature feature) {
+ if (feature != null && feature.getEType() instanceof EClass) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null) {
+ Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_CREATE_NEW);
+ if (result instanceof Boolean)
+ return ((Boolean) result);
+ }
+ if (feature instanceof EReference) {
+ if (((EReference) feature).isContainment())
+ return true;
+ if (Bpmn2Package.eINSTANCE.getRootElement().isSuperTypeOf((EClass) feature.getEType()))
+ return true;
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * See {@link ExtendedPropertiesAdapter.UI_CAN_EDIT_INLINE}
+ */
+ public static boolean canEditInline(EObject object, EStructuralFeature feature) {
+ if (feature != null && feature.getEType() instanceof EClass) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null) {
+ Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_EDIT_INLINE);
+ if (result instanceof Boolean)
+ return ((Boolean) result);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * See {@link ExtendedPropertiesAdapter.UI_CAN_SET_NULL}
+ */
+ public static boolean canSetNull(EObject object, EStructuralFeature feature) {
+ if (feature != null && feature.getEType() instanceof EClass) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
+ if (adapter != null) {
+ Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_SET_NULL);
+ if (result instanceof Boolean)
+ return ((Boolean) result);
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Check if the given object feature is a containment list.
+ *
+ * @param object the EObject
+ * @param feature the object's feature
+ * @return true if the feature is a reference, and is a containment list.
+ */
+ public static boolean isList(EObject object, EStructuralFeature feature) {
+ if (feature instanceof EReference) {
+ return feature.isMany() && ((EReference)feature).isContainment();
+ }
+ return false;
+ }
+
+ /**
+ * Check if the given object feature is a containment feature.
+ *
+ * @param object the EObject
+ * @param feature the object's feature
+ * @return true if the feature is a reference, and is a containment feature.
+ */
+ public static boolean isContainmentFeature(EObject object, EStructuralFeature feature) {
+ if (feature instanceof EReference) {
+ if (((EReference)feature).isContainment()) {
+ if (feature.getEType() instanceof EClass)
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check if the given object feature is an attribute.
+ *
+ * @param object the EObject
+ * @param feature the object's feature
+ * @return true if the feature is an attribute.
+ */
+ public static boolean isAttribute(EObject object, EStructuralFeature feature) {
+ if (feature instanceof EAttribute)
+ return true;
+ return false;
+ }
+
+ /**
+ * Check if the given object feature is a reference.
+ *
+ * @param object the EObject
+ * @param feature the object's feature
+ * @return true if the feature is a reference.
+ */
+ public static boolean isReference(EObject object, EStructuralFeature feature) {
+ if (feature instanceof EReference)
+ return true;
+ return false;
+ }
+
+ /**
+ * Get the given object feature's type.
+ *
+ * @param object the EObject
+ * @param feature the object's feature
+ * @return the feature's type.
+ */
+ public static EClassifier getEType(EObject object, EStructuralFeature feature) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ adapter.getFeatureDescriptor(feature).getEType();
+ }
+ return feature.getEType();
+ }
+
+ /**
+ * See {@link ExtendedPropertiesAdapter#compare(EObject, EObject, boolean)}
+ */
+ public static boolean compare(EObject object1, EObject object2, boolean similar) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object1);
+ if (adapter!=null) {
+ adapter.getObjectDescriptor().compare(object2, similar);
+ }
+ return ExtendedPropertiesAdapter.compare(object1, object2, similar);
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java
new file mode 100644
index 00000000..410a68bf
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/FeatureDescriptor.java
@@ -0,0 +1,666 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.FormalExpression;
+import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecoratorAdapter;
+import org.eclipse.bpmn2.modeler.core.utils.ErrorUtils;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * Item property provider for a specific feature of an object. Clients may replace the default implementation
+ * by defining their own ExtendPropertiesAdapter and setting their own FeatureDescriptors for features that
+ * need special handling.
+ *
+ * See also the <propertyExtension> element of the org.eclipse.bpmn2.modeler.runtime extension point.
+ */
+public class FeatureDescriptor<T extends EObject> extends ObjectDescriptor<T> {
+
+ /** The feature for this ObjectDescriptor */
+ protected EStructuralFeature feature;
+ /** Flag that determines if a Text feature should be rendered as a mulitline text widget */
+ protected int multiline = 0; // -1 = false, +1 = true, 0 = unset
+ /** Default list of values if this feature is a multi-valued object */
+ protected Hashtable<String, Object> choiceOfValues; // for static lists
+
+ /**
+ * Construct a new FeatureDescriptor for the given feature of the given object.
+ *
+ * @param owner - the ExtendedPropertiesAdapter that owns this FeatureDescriptor
+ * @param object - an EObject subclass
+ * @param feature - this must be a defined EStructuralFeature of the above EObject.
+ */
+ public FeatureDescriptor(ExtendedPropertiesAdapter<T> owner, T object, EStructuralFeature feature) {
+ super(owner, object);
+ this.feature = feature;
+ Assert.isNotNull(object);
+ Assert.isNotNull(feature);
+ }
+
+ /**
+ * Gets the feature whose properties are managed by this class.
+ *
+ * @return an EStructuralFeature
+ */
+ public EStructuralFeature getFeature() {
+ return feature;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor#getLabel()
+ */
+ public String getLabel() {
+ String s = ModelDecorator.getLabel(feature);
+ if (s!=null) {
+ return s;
+ }
+ if (label==null) {
+ IItemPropertyDescriptor propertyDescriptor = getPropertyDescriptor(feature);
+ if (propertyDescriptor != null)
+ label = propertyDescriptor.getDisplayName(object);
+ else {
+ // If the referenced type is an EObject, we'll get an "E Class" label
+ // so use the feature name instead.
+// if (feature instanceof EReference && !(getEType().getInstanceClass()==EObject.class))
+// label = ExtendedPropertiesProvider.getLabel(getEType());
+// else
+ label = ModelUtil.toCanonicalString(feature.getName());
+ }
+ }
+ return label;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor#getTextValue()
+ */
+ @Override
+ public String getTextValue() {
+ if (textValue==null) {
+ String t = null;
+ // derive text from feature's value: default behavior is
+ // to use the "name" attribute if there is one;
+ // if not, use the "id" attribute;
+ // fallback is to use the feature's toString()
+ EObject o = null;
+ EStructuralFeature f = null;
+ if (feature!=null) {
+ Object value = object.eGet(feature);
+ if (value instanceof EObject) {
+ o = (EObject)value;
+ }
+ else if (value!=null)
+ t = value.toString();
+ }
+ if (t==null && o!=null) {
+ f = o.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+ if (f!=null) {
+ String name = (String)o.eGet(f);
+ if (name!=null && !name.isEmpty())
+ t = name;
+ }
+ else if (o instanceof FormalExpression) {
+ t = ModelUtil.getExpressionBody((FormalExpression)o);
+ }
+ }
+ if (t==null && o!=null) {
+ f = o.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
+ if (f!=null) {
+ Object id = o.eGet(f);
+ if (id!=null && !id.toString().isEmpty())
+ t = id.toString();
+ }
+ }
+ return t == null ? "" /*ModelUtil.getLabel(object)*/ : t; //$NON-NLS-1$
+ }
+ return textValue == null ? "" : textValue; //$NON-NLS-1$
+ }
+
+ /**
+ * Set the list of valid values for this feature. This assumes the feature is
+ * multi-valued.
+ *
+ * @param choiceOfValues a list of text/value pairs. The text string is displayed by
+ * the UI in a selection list (Combo box) and the value is the actual feature value
+ * that corresponds to that string.
+ */
+ public void setChoiceOfValues(Hashtable<String, Object> choiceOfValues) {
+ this.choiceOfValues = choiceOfValues;
+ }
+
+ /**
+ * Convenience method to set choice of values from an object list.
+ * See also {@link getChoiceOfValues()}
+ *
+ * @param values a list of text/value pairs. The text string is displayed by
+ * the UI in a selection list (Combo box) and the value is the actual feature value
+ * that corresponds to that string.
+ */
+ public void setChoiceOfValues(Collection values) {
+ if (values!=null) {
+ choiceOfValues = new Hashtable<String,Object>();
+ Iterator iter = values.iterator();
+ while (iter.hasNext()) {
+ Object value = iter.next();
+ if (value!=null) {
+ String text = getChoiceString(value);
+ while (choiceOfValues.containsKey(text))
+ text += " "; //$NON-NLS-1$
+ choiceOfValues.put(text, value);
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns a list of name-value pairs for display in a combo box or selection list.
+ * The String is what gets displayed in the selection list, while the Object is
+ * implementation-specific: this can be a reference to an element, string or whatever.
+ * The implementation is responsible for interpreting this value by overriding the
+ * setValue() method, and must update the object feature accordingly.
+ *
+ * @return the list of text/value pairs.
+ */
+ public Hashtable<String, Object> getChoiceOfValues() {
+ if (choiceOfValues==null) {
+ List<String> names = null;
+ Collection values = null;
+
+ try {
+ IItemPropertyDescriptor propertyDescriptor = getPropertyDescriptor(feature);
+ if (propertyDescriptor!=null) {
+ values = propertyDescriptor.getChoiceOfValues(object);
+ }
+ }
+ catch (Exception e) {
+ // ignore exceptions if we fail to resolve proxies;
+ // e.g. and instance of a DynamicEObjectImpl with a bogus
+ // URI is used for ItemDefinition.structureRef
+ // fallback is to do our own search
+ }
+
+ if (values==null)
+ values = ModelUtil.getAllReachableObjects(object, feature);
+
+ if (values!=null) {
+ Hashtable<String,Object> choices = new Hashtable<String,Object>();
+ Iterator iter = values.iterator();
+ while (iter.hasNext()) {
+ Object value = iter.next();
+ if (value!=null) {
+ String text = getChoiceString(value);
+ if (text==null)
+ text = ""; //$NON-NLS-1$
+ while (choices.containsKey(text))
+ text += " "; //$NON-NLS-1$
+ choices.put(text, value);
+ }
+ }
+ return choices;
+ }
+ }
+ return choiceOfValues;
+ }
+
+ /**
+ * Gets the text representation of the given object. This uses
+ * {@code ObjectDescriptor#getTextValue()} if the value is an EObject and
+ * can be adapted to an {@link ExtendedPropertiesAdapter}.
+ *
+ * @param value the value
+ * @return text representation of the value
+ */
+ public String getChoiceString(Object value) {
+ if (value instanceof EObject) {
+ EObject eObject = (EObject)value;
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eObject);
+ if (adapter!=null)
+ return adapter.getObjectDescriptor().getTextValue();
+ return ModelUtil.toCanonicalString( eObject.eClass().getName() );
+ }
+ return value.toString();
+ }
+
+ /**
+ * Sets the MultiLine attribute.
+ *
+ * @param multiline
+ */
+ public void setMultiLine(boolean multiline) {
+ this.multiline = multiline ? 1 : -1;
+ }
+
+ /**
+ * Gets the MultiLine attribute.
+ *
+ * @return true if the feature should be rendered in a MultiLine text widget,
+ * false if a single line text widget should be used.
+ */
+ public boolean isMultiLine() {
+ if (multiline==0) {
+ IItemPropertyDescriptor propertyDescriptor = getPropertyDescriptor(feature);
+ if (propertyDescriptor!=null)
+ multiline = propertyDescriptor.isMultiLine(object) ? 1 : -1;
+ }
+ return multiline == 1;
+ }
+
+ /**
+ * Check if the feature is a containment list.
+ *
+ * @return true if the feature is a containment list, false if not.
+ */
+ public boolean isList() {
+ return
+ feature.isMany() &&
+ feature instanceof EReference &&
+ ((EReference)feature).isContainment();
+ }
+
+ /**
+ * Gets the feature's type (an EClassifier)
+ *
+ * @return the feature type
+ */
+ public EClassifier getEType() {
+ return feature.getEType();
+ }
+
+ /**
+ * Create a new instance of the feature and set it in the object managed by
+ * this FeatureDesciptor.
+ *
+ * @param resource the EMF Resource in which to create the new object.
+ * @param eclass an optional type for the new object in case the feature
+ * type is abstract. Note that this must be a subtype of the
+ * feature type as returned by {@code getEType()}.
+ * @return the new object.
+ */
+ public EObject createFeature(Resource resource, EClass eclass) {
+ EObject newFeature = null;
+ if (eclass==null)
+ eclass = (EClass)getEType();
+
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eclass);
+ if (adapter!=null) {
+ if (resource==null)
+ resource = object.eResource();
+ newFeature = adapter.getObjectDescriptor().createObject(resource, eclass);
+ // can we set the new object into the parent object?
+ if (newFeature.eContainer()!=null || // the new object is contained somewhere
+ feature instanceof EAttribute || // the new object is an attribute
+ // the feature is a containment reference which means the this.object owns it
+ (feature instanceof EReference && ((EReference)feature).isContainment()))
+ {
+ if (object.eGet(feature) instanceof List) {
+ ((List)object.eGet(feature)).add(newFeature);
+ }
+ else
+ object.eSet(feature, newFeature);
+ }
+ }
+ return newFeature;
+ }
+
+ // NOTE: getValue() and setValue() must be symmetrical; that is, setValue()
+ // must be able to handle the object type returned by getValue(), although
+ // setValue() may also know how to convert from other types, e.g. String,
+ // Integer, etc.
+ /**
+ * Gets the value of the object's feature.
+ *
+ * @return value of the object's feature.
+ */
+ public Object getValue() {
+ return getValue(-1);
+ }
+
+ /**
+ * Gets the value of the object's feature at the given list index.
+ *
+ * @param index the list index. If less than 0 returns the first list item.
+ * @return value of the object's feature.
+ */
+ public Object getValue(int index) {
+ if (hasStructuralFeatureFeature(object, feature)) {
+ if (index >= 0 && isList()) {
+ return ((List) object.eGet(feature)).get(index);
+ }
+ return object.eGet(feature);
+ }
+ if (isAnyAttribute(object, feature)) {
+ Object value = null;
+ try {
+ value = object.eGet(feature);
+ } catch (Exception e1) {
+ }
+ return value;
+ }
+ if (isExtensionAttribute(object, feature)) {
+ List result = ModelDecorator.getAllExtensionAttributeValues(object, feature);
+ if (result.size() == 0) {
+ return null;
+ }
+ if (index >= 0)
+ return result.get(index);
+ return result.get(0);
+ }
+ return null;
+ }
+
+ /**
+ * Gets the List represented by the feature. Note that the feature must be a
+ * list and therefore {@code isList()} must be true.
+ *
+ * @return a List of values or an empty list.
+ */
+ public List<Object> getValueList() {
+ if (isList()) {
+ return ((List)object.eGet(feature));
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * Sets the value for the object's feature.
+ *
+ * @param value the value
+ * @return true if the value is valid, false if not or if the value could not be set.
+ */
+ public boolean setValue(Object value) {
+ return setValue(value, -1);
+ }
+
+
+ /**
+ * Sets the value for the object's feature at the given list index.
+ *
+ * @param value the value
+ * @param index the list index. If less than 0 sets the first list item.
+ * @return true if the value is valid, false if not or if the value could not be set.
+ */
+ public boolean setValue(Object value, final int index) {
+ try {
+ InsertionAdapter.executeIfNeeded(object);
+ if (value instanceof EObject) {
+ // make sure the new object is added to its control first
+ // so that it inherits the control's Resource and EditingDomain
+ // before we try to change its value.
+ InsertionAdapter.executeIfNeeded((EObject)value);
+ }
+ if (value instanceof String) {
+ // handle String to EDataType conversions
+ if (((String) value).isEmpty()) {
+ if (!(feature.getDefaultValue() instanceof String))
+ value = null;
+ }
+ else {
+ if (getEType() instanceof EDataType) {
+ EDataType eDataType = (EDataType)getEType();
+ try {
+ EFactory factory = eDataType.getEPackage().getEFactoryInstance();
+ value = factory.createFromString(eDataType, (String)value);
+ }
+ catch (Exception e)
+ {
+ EFactory factory = EcorePackage.eINSTANCE.getEFactoryInstance();
+ value = factory.createFromString(eDataType, (String)value);
+ }
+ }
+ }
+ }
+
+ TransactionalEditingDomain domain = getEditingDomain(object);
+ if (domain!=null) {
+ final Object v = value;
+ domain.getCommandStack().execute(new RecordingCommand(domain) {
+ @Override
+ protected void doExecute() {
+ internalSet(object,feature,v, index);
+ internalPostSet(v);
+ }
+ });
+ }
+ else {
+ internalSet(object,feature,value, index);
+ internalPostSet(value);
+ }
+ } catch (Exception e) {
+ ErrorUtils.showErrorMessage(e.getMessage());
+ Activator.logError(e);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Check if the given feature in the specified object is a dynamic feature.
+ *
+ * @param object
+ * @param feature
+ * @return true if the feature is <b>not</b> a dynamic feature, i.e. it is defined in the
+ * containing object's EClass feature list.
+ */
+ private boolean hasStructuralFeatureFeature(EObject object, EStructuralFeature feature) {
+ String name = feature.getName();
+ if (object instanceof EClass)
+ return ((EClass)object).getEStructuralFeature(name) != null;
+ return object.eClass().getEStructuralFeature(name) != null;
+ }
+
+ /**
+ * Check if the given feature in the specified object is a dynamic attribute.
+ *
+ * @param object
+ * @param feature
+ * @return true if the feature is an attribute, and has been defined as an extension
+ * by the Target Runtime plug-in. See also {@code ModelExtensionDescriptor}.
+ */
+ private boolean isAnyAttribute(EObject object, EStructuralFeature feature) {
+ if (hasStructuralFeatureFeature(object,feature))
+ return false;
+ String name = feature.getName();
+ feature = ModelDecorator.getAnyAttribute(object, name);
+ if (feature!=null)
+ return true;
+ return false;
+ }
+
+ /**
+ * Check if the given feature in the specified object is a dynamic element.
+ *
+ * @param object
+ * @param feature
+ * @return true if the feature is an element, and has been defined as an extension
+ * by the Target Runtime plug-in. See also {@code ModelExtensionDescriptor}.
+ */
+ private boolean isExtensionAttribute(EObject object, EStructuralFeature feature) {
+ if (hasStructuralFeatureFeature(object,feature))
+ return false;
+ String name = feature.getName();
+ feature = ModelDecorator.getExtensionAttribute(object, name);
+ if (feature!=null)
+ return true;
+ return false;
+ }
+
+ private ModelDecorator getModelDecorator() {
+ ModelDecorator modelDecorator = ModelDecoratorAdapter.getModelDecorator(feature.getEContainingClass().getEPackage());
+ return modelDecorator;
+ }
+
+ /**
+ * Set the value of the feature managed by this FeatureDescriptor. If the
+ * feature is a dynamic feature, the value is set in either the
+ * "anyAttribute" feature map if it is an attribute, or in the
+ * {@code BaseElementImpl.extensionValues} container.
+ *
+ * This method may be overridden and will be wrapped in an EMF Transaction by
+ * {@link setValue(Object,int)) if necessary.
+ *
+ * @param object the object
+ * @param feature the feature. This must be an extension defined by the Target Runtime.
+ * @param value the value to set for the object feature
+ * @param index the list index if the feature is a list. If this is less than 0, set the first list item.
+ */
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ protected void internalSet(T object, EStructuralFeature feature, Object value, int index) {
+ if (hasStructuralFeatureFeature(object,feature) || isList()) {
+ if (feature.isMany()) {
+ // NB: setting a List item to null into a List will clear the List!
+ if (value==null)
+ ((List)object.eGet(feature)).clear();
+ else if (index<0)
+ ((List)object.eGet(feature)).add(value);
+ else
+ ((List)object.eGet(feature)).set(index,value);
+ }
+ else
+ object.eSet(feature, value);
+ }
+ else {
+ // the feature does not exist in this object, so we either need to
+ // create an "anyAttribute" entry or, if the object is an ExtensionAttributeValue,
+ // create an entry in its "value" feature map.
+ String name = feature.getName();
+ if (feature instanceof EAttribute) {
+ EStructuralFeature f = ModelDecorator.getAnyAttribute(object, name);
+ if (f!=null) {
+ object.eSet(f, value);
+ }
+ else {
+ String namespace = ExtendedMetaData.INSTANCE.getNamespace(feature);
+ String type = feature.getEType().getName();
+ ModelDecorator modelDecorator = getModelDecorator();
+ if (modelDecorator==null)
+ modelDecorator = getModelDecorator();
+ modelDecorator.addAnyAttribute(object, namespace, name, type, value);
+ }
+ }
+ else {
+ // FIXME: access to ExtensionAttributeValues MUST go through the ModelExtensionDescriptor's
+ // modelDecorator so that we can properly find, and optionally create and initialize
+ // the EPackage that contains the extensions
+ ModelDecorator.addExtensionAttributeValue(object, feature, value, index, false);
+ }
+ }
+ }
+
+ /**
+ * Performs additional initialization of the new feature value if necessary.
+ *
+ * The default implementation initializes the ID of the new feature value, if it has one.
+ *
+ * This method may be overridden and will be wrapped in an EMF Transaction by
+ * {@link setValue(Object,int)) if necessary.
+ *
+ * @param value the feature value that was set.
+ */
+ protected void internalPostSet(Object value) {
+ if (value instanceof EObject) {
+ ModelUtil.setID((EObject)value);
+ if (value instanceof RootElement && ((RootElement)value).eContainer()==null) {
+ // stuff all root elements into Definitions.rootElements
+ final Definitions definitions = ModelUtil.getDefinitions(object);
+ if (definitions!=null) {
+ if (!definitions.getRootElements().contains(value))
+ definitions.getRootElements().add((RootElement)value);
+ }
+ }
+ }
+ }
+
+ /**
+ * Unsets the feature by setting it to its default value.
+ */
+ public void unset() {
+ setValue(feature.getDefaultValue());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ Object thisValue = object.eGet(feature);
+
+ if (thisValue==null && obj==null)
+ return true;
+
+ if (thisValue instanceof EObject && obj instanceof EObject) {
+ return ExtendedPropertiesAdapter.compare((EObject)thisValue, (EObject)obj, false);
+ }
+
+ if (thisValue!=null && obj!=null)
+ return thisValue.equals(obj);
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor#similar(java.lang.Object)
+ */
+ @Override
+ public boolean similar(Object obj) {
+ Object thisValue = object.eGet(feature);
+
+ if (thisValue==null && obj==null)
+ return true;
+
+ if (thisValue instanceof EObject && obj instanceof EObject) {
+ return ExtendedPropertiesAdapter.compare((EObject)thisValue, (EObject)obj, true);
+ }
+
+ if (thisValue!=null && obj!=null)
+ return thisValue.equals(obj);
+
+ return false;
+ }
+
+ /**
+ * This method has been deprecated. Use {@code getChoiceOfValues()} instead.
+ *
+ * @param context
+ * @return
+ */
+ @Deprecated
+ public Hashtable<String, Object> getChoiceOfValues(Object context) {
+ return getChoiceOfValues();
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IExtensionValueAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IExtensionValueAdapter.java
new file mode 100644
index 00000000..c4fb2a13
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IExtensionValueAdapter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ *
+ */
+public interface IExtensionValueAdapter {
+
+ public boolean shouldSaveElement(EObject o);
+ public boolean shouldSaveFeature(EObject o, EStructuralFeature f);
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/INamespaceMap.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/INamespaceMap.java
index 70d7d3b2..70d7d3b2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/INamespaceMap.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/INamespaceMap.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IProperty.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IProperty.java
index d8b99a73..d8b99a73 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IProperty.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IProperty.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IPropertyHolder.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IPropertyHolder.java
new file mode 100644
index 00000000..f2e80648
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IPropertyHolder.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+/**
+ * A generic name/value pair holder interface.
+ * <p>
+ * The implementation should maintain a collection that maps a unique String
+ * (name) to an Object (value).
+ */
+public interface IPropertyHolder {
+ public void setProperty(String key, Object value);
+ public Object getProperty(String key);
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IResourceProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IResourceProvider.java
new file mode 100644
index 00000000..5e71069b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IResourceProvider.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+/**
+ * An EMF Resource provider interface. This is also an Editing Domain provider since
+ * the Resource <b>may</b> have a reference to an Editing Domain.
+ */
+public interface IResourceProvider extends IEditingDomainProvider {
+ Resource getResource();
+ void setResource(Resource resource);
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IStatefullAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IStatefullAdapter.java
index 1a63bf10..1a63bf10 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IStatefullAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/IStatefullAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/InsertionAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/InsertionAdapter.java
index 0e9cb889..5706950f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/InsertionAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/InsertionAdapter.java
@@ -17,7 +17,6 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.ExtensionAttributeValue;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
@@ -25,62 +24,49 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
-import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
/**
- * This adapter will insert an EObject into its container feature when the EObject's
- * content changes. This allows the UI to construct new objects without inserting
- * them into their container unless the user changes some feature in the new object.
- * Thus, an empty EObject is available for use by the UI for rendering only, without
- * creating an EMF transaction, and hence, a useless entry on the undo stack.
+ * This adapter will insert a new value into its container feature when the
+ * owning object's content changes. This allows the UI to construct new objects
+ * without inserting them into their container unless the user changes some
+ * feature in the new object. Thus, an empty EObject is available for use by the
+ * UI for rendering only, without creating an EMF transaction, and hence, a
+ * useless entry on the undo stack.
*/
-public class InsertionAdapter extends EContentAdapter {
+public class InsertionAdapter extends EContentAdapter implements IResourceProvider {
protected Resource resource;
protected EObject object;
protected EStructuralFeature feature;
protected EObject value;
- protected Object extensionValue;
- protected EStructuralFeature extensionFeature;
private InsertionAdapter(EObject object, EStructuralFeature feature, EObject value) {
- this(null,object,feature,value, null, null);
- }
-
- private InsertionAdapter(Resource resource, EObject object, EStructuralFeature feature, EObject value, EStructuralFeature extensionFeature, Object extensionValue) {
- // in order for this to work, the object must be contained in a Resource,
- // the value must NOT YET be contained in a Resource,
- // and the value must be an instance of the feature EType.
-// assert(object.eResource()!=null);
-// assert(value.eResource()==null);
-// assert(feature.getEType().isInstance(value));
- if (resource==null)
- this.resource = object.eResource();
- else
- this.resource = resource;
+ this.resource = object.eResource();
this.object = object;
this.feature = feature;
this.value = value;
- this.extensionFeature = extensionFeature;
- this.extensionValue = extensionValue;
}
private InsertionAdapter(EObject object, String featureName, EObject value) {
this(object, object.eClass().getEStructuralFeature(featureName), value);
}
-
- public static EObject add(Resource resource, EObject object, EStructuralFeature feature, EObject value, EStructuralFeature extensionFeature, Object extensionValue) {
- if (object!=null) {
- value.eAdapters().add(
- new InsertionAdapter(resource, object, feature, value, extensionFeature, extensionValue));
- }
- return value;
- }
+ /**
+ * Create an InsertionAdapter that will add the value into the given
+ * object's containment feature as soon as some feature in the value is
+ * changed by the user.
+ * <p>
+ * In order for this to work, the object being adapted must be contained in
+ * a Resource, the value must <b>not yet</b> be contained in a Resource, and
+ * the value must be an instance of the feature's EType.
+ *
+ * @param object the object being adapted
+ * @param feature a containment feature of the object
+ * @param value the value to be inserted
+ * @return the value to be inserted
+ */
public static EObject add(EObject object, EStructuralFeature feature, EObject value) {
if (object!=null) {
value.eAdapters().add(
@@ -88,15 +74,15 @@ public class InsertionAdapter extends EContentAdapter {
}
return value;
}
-
- public static EObject add(EObject object, EStructuralFeature feature, EObject value, EStructuralFeature extensionFeature, Object extensionValue) {
- if (object!=null) {
- value.eAdapters().add(
- new InsertionAdapter(null, object, feature, value, extensionFeature, extensionValue));
- }
- return value;
- }
+ /**
+ * Convenience method for creating an InsertionAdapter given a feature name.
+ *
+ * @param object the object being adapted
+ * @param featureName the name of a containment feature of the object
+ * @param value the value to be inserted
+ * @return the value to be inserted
+ */
public static EObject add(EObject object, String featureName, EObject value) {
if (object!=null) {
value.eAdapters().add(
@@ -105,6 +91,9 @@ public class InsertionAdapter extends EContentAdapter {
return value;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.util.EContentAdapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
public void notifyChanged(Notification notification) {
if (notification.getNotifier() == value && !(notification.getOldValue() instanceof InsertionAdapter)) {
// execute if an attribute in the new value has changed
@@ -147,22 +136,25 @@ public class InsertionAdapter extends EContentAdapter {
}
@SuppressWarnings("unchecked")
- public void execute() {
+ private void execute() {
// if the object into which this value is being added has other adapters execute those first
executeIfNeeded(object);
// remove this adapter from the value - this adapter is a one-shot deal!
value.eAdapters().remove(this);
+
try {
Object o = object.eGet(feature);
}
catch (Exception e1) {
try {
- Object o = value.eGet(feature);
- // this is the inverse add of object into value
- o = value;
- value = object;
- object = (EObject)o;
+ if (value.eClass().getEStructuralFeature(feature.getName())!=null) {
+ Object o = value.eGet(feature);
+ // this is the inverse add of object into value
+ o = value;
+ value = object;
+ object = (EObject)o;
+ }
}
catch (Exception e2) {
}
@@ -173,82 +165,31 @@ public class InsertionAdapter extends EContentAdapter {
// set the value in the object
boolean valueChanged = false;
final EList<EObject> list = feature.isMany() ? (EList<EObject>)object.eGet(feature) : null;
- if (list==null)
- valueChanged = object.eGet(feature)!=value;
+ if (list==null) {
+ try {
+ valueChanged = object.eGet(feature)!=value;
+ }
+ catch (Exception e) {
+ // feature does not exist, it's a dynamic feature
+ valueChanged = true;
+ }
+ }
else
valueChanged = !list.contains(value) || value instanceof ExtensionAttributeValue;
if (valueChanged) {
- TransactionalEditingDomain domain = getEditingDomain();
- if (domain==null) {
- if (list==null)
- object.eSet(feature, value);
- else
- list.add(value);
- // assign the value's ID if it has one:
- // because of changes made by cascading InsertionAdapters,
- // the object could now be contained in a resource and hence
- // the setID() will need to be executed on the command stack.
- domain = getEditingDomain();
- if (domain==null) {
- ModelUtil.setID(value);
- }
- else {
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- ModelUtil.setID(value);
- }
- });
- }
- }
- else {
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- if (value instanceof ExtensionAttributeValue) {
- if (list.size()==0)
- list.add(value);
- else
- value = list.get(0);
- FeatureMap map = ((ExtensionAttributeValue)value).getValue();
- map.add(extensionFeature, extensionValue);
- }
- else {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
- if (adapter!=null) {
- adapter.getFeatureDescriptor(feature).setValue(value);
- }
- else {
- if (list==null)
- object.eSet(feature, value);
- else
- list.add(value);
- }
- // assign the value's ID if it has one
- ModelUtil.setID(value);
- }
- }
- });
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ adapter.getFeatureDescriptor(feature).setValue(value);
}
}
}
- private TransactionalEditingDomain getEditingDomain() {
- // If a transaction is already active, we want to run this
- // inside that transaction instead of creating a new one.
- if (resource==null) {
- resource = getResource(object);
- if (resource==null)
- return null;
- }
- TransactionalEditingDomainImpl domain = (TransactionalEditingDomainImpl)
- TransactionUtil.getEditingDomain(resource);
- if (domain.getActiveTransaction()!=null && domain.getActiveTransaction().isActive())
- return null;
- return domain;
- }
-
+ /**
+ * Adds the value to the object's containment feature.
+ *
+ * @param value
+ */
public static void executeIfNeeded(EObject value) {
List<InsertionAdapter> allAdapters = new ArrayList<InsertionAdapter>();
@@ -262,6 +203,10 @@ public class InsertionAdapter extends EContentAdapter {
adapter.execute();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.IResourceProvider#getResource()
+ */
+ @Override
public Resource getResource() {
if (resource==null) {
Resource res = object.eResource();
@@ -274,6 +219,21 @@ public class InsertionAdapter extends EContentAdapter {
return resource;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.IResourceProvider#setResource(org.eclipse.emf.ecore.resource.Resource)
+ */
+ @Override
+ public void setResource(Resource resource) {
+ this.resource = resource;
+ }
+
+ /**
+ * Gets the EMF Resource that contains the given object. If the object has been adapted
+ * for InsertionAdapter, the Resource defined by that adapter is returned.
+ *
+ * @param object the object.
+ * @return an EMF Resource or null.
+ */
public static Resource getResource(EObject object) {
InsertionAdapter adapter = AdapterUtil.adapt(object, InsertionAdapter.class);
if (adapter!=null) {
@@ -284,15 +244,41 @@ public class InsertionAdapter extends EContentAdapter {
return null;
}
+ /**
+ * Gets the object managed by this InsertionAdapter.
+ *
+ * @return the object
+ */
public EObject getObject() {
return object;
}
+ /**
+ * Gets the object's containment feature managed by this InsertionAdapter
+ *
+ * @return the containment feature
+ */
public EStructuralFeature getFeature() {
return feature;
}
+ /**
+ * Gets the object to be inserted into the containment feature.
+ *
+ * @return the value
+ */
public EObject getValue() {
return value;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.edit.domain.IEditingDomainProvider#getEditingDomain()
+ */
+ @Override
+ public EditingDomain getEditingDomain() {
+ getResource();
+ if (resource!=null)
+ return AdapterFactoryEditingDomain.getEditingDomainFor(resource);
+ return null;
+ }
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java
new file mode 100644
index 00000000..ff022daa
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/Messages.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.adapters.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+
+ public static String ObjectDescriptor_New;
+ public static String ObjectDescriptor_Unnamed;
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java
new file mode 100644
index 00000000..25ba9ca3
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectDescriptor.java
@@ -0,0 +1,417 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import java.util.Hashtable;
+
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Item property provider for a specific object. Clients may replace the default
+ * implementation by defining their own ExtendPropertiesAdapter and setting
+ * their own ObjectDescriptors for objects that need special handling.
+ *
+ * See also the <pre><propertyExtension></pre> element of the
+ * {@code org.eclipse.bpmn2.modeler.runtime} extension point.
+ */
+public class ObjectDescriptor<T extends EObject> {
+
+ /** the object managed by this {@code ObjectDescriptor} */
+ protected T object;
+ /** a default text label used by the UI in Property Sheets and dialogs */
+ protected String label;
+ /** a default string representation for this object's value */
+ protected String textValue;
+ /** the {@link ExtendedPropertiesAdapter} that owns this {@code ObjectDescriptor} */
+ protected ExtendedPropertiesAdapter<T> owner;
+
+ protected Hashtable<String, Object> properties = null;
+
+ public ObjectDescriptor(ExtendedPropertiesAdapter<T> owner, T object) {
+ this.owner = owner;
+ this.object = object;
+ }
+
+// public ObjectDescriptor(T object) {
+// this.object = object;
+// }
+
+ /**
+ * Gets the {@link ExtendedPropertiesAdapter} owner for this ObjectDescriptor.
+ *
+ * @return the owner
+ */
+ public ExtendedPropertiesAdapter<T> getOwner() {
+ return owner;
+ }
+
+ /**
+ * Sets the {@link ExtendedPropertiesAdapter} owner for this ObjectDescriptor.
+ *
+ * @param owner
+ */
+ public void setOwner(ExtendedPropertiesAdapter<T> owner) {
+ this.owner = owner;
+ }
+
+ /**
+ * Gets the object managed by this ObjectDescriptor.
+ *
+ * @return the object.
+ */
+ public T getObject() {
+ return object;
+ }
+
+ /**
+ * Sets the object.
+ *
+ * @param object the object.
+ */
+ public void setObject(T object) {
+ this.object = object;
+ }
+
+ /**
+ * Sets the Label for this object.
+ *
+ * @param label the label.
+ */
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ /**
+ * Gets the Label for this object. The default implementation returns the object's type name
+ *
+ * @return text label for the object.
+ */
+ public String getLabel() {
+ String s = ModelDecorator.getLabel(object.eClass());
+ if (s!=null) {
+ return s;
+ }
+ if (label==null) {
+ EClass eclass = (object instanceof EClass) ?
+ (EClass)object :
+ object.eClass();
+ label = ModelUtil.toCanonicalString(eclass.getName());
+ }
+ return label;
+ }
+
+ /**
+ * Sets the text representation of the object managed by this ObjectDescriptor.
+ *
+ * @param textValue the text string representation of this object.
+ */
+ public void setTextValue(String textValue) {
+ this.textValue = textValue;
+ }
+
+ /**
+ * Gets the text representation of the object managed by this ObjectDescriptor.
+ *
+ * @return a text string representation of this object.
+ */
+ public String getTextValue() {
+ if (textValue==null) {
+ // derive text from feature's value: default behavior is
+ // to use the "name" attribute if there is one;
+ // if not, use the "id" attribute;
+ // fallback is to use the feature's toString()
+ String text = ModelUtil.toCanonicalString(object.eClass().getName());
+ Object value = null;
+ EStructuralFeature f = null;
+ f = object.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+ if (f==null) {
+ f = ModelDecorator.getAnyAttribute(object, "name"); //$NON-NLS-1$
+ }
+ if (f!=null) {
+ value = object.eGet(f);
+ if (value==null || value.toString().isEmpty())
+ value = null;
+ }
+ if (value==null) {
+ f = object.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
+ if (f!=null) {
+ value = object.eGet(f);
+ if (value==null || value.toString().isEmpty())
+ value = null;
+ }
+ }
+ if (value==null)
+ value = NLS.bind(Messages.ObjectDescriptor_Unnamed, text);
+ return (String)value;
+ }
+ return textValue;
+ }
+
+ /**
+ * Convenience method for
+ * {@code getPropertyDescriptor(Object,EStructuralFeature)} for returning
+ * the feature Property Descriptor for the object managed by this
+ * ObjectDescriptor.
+ *
+ * @param feature the feature
+ * @return an ItemPropertyDescriptor.
+ */
+ protected IItemPropertyDescriptor getPropertyDescriptor(EStructuralFeature feature) {
+ return getPropertyDescriptor(object, feature);
+ }
+
+ /**
+ * Gets the EMF-generated Property Descriptor for the given object and feature.
+ *
+ * @param object the object
+ * @param feature the feature
+ * @return an ItemPropertyDescriptor.
+ */
+ protected IItemPropertyDescriptor getPropertyDescriptor(T object, EStructuralFeature feature) {
+ ItemProviderAdapter adapter = null;
+ for (Adapter a : object.eAdapters()) {
+ if (a instanceof ItemProviderAdapter) {
+ adapter = (ItemProviderAdapter)a;
+ break;
+ }
+ }
+ if (adapter!=null)
+ return adapter.getPropertyDescriptor(object, feature);
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object otherObject) {
+ EObject thisObject = this.object;
+ if (otherObject instanceof EObject) {
+ // compare feature values of both EObjects:
+ // this should take care of most of the BPMN2 elements
+ return ExtendedPropertiesAdapter.compare(thisObject, (EObject)otherObject, false);
+ }
+ return super.equals(otherObject);
+ }
+
+ /**
+ * Convenience method to check if a given object is similar to the object
+ * managed by this ObjectDescriptor.
+ *
+ * @param other
+ * @return
+ */
+ public boolean similar(Object other) {
+ EObject thisObject = this.object;
+ if (other instanceof EObject) {
+ // compare feature values of both EObjects:
+ // this should take care of most of the BPMN2 elements
+ return ExtendedPropertiesAdapter.compare(thisObject, (EObject)other, true);
+ }
+ return super.equals(other);
+ }
+
+ /**
+ * Convenience method to compare the object managed by this ObjectDescriptor
+ * with the given object.
+ *
+ * @param other another object to compare against this one.
+ * @param similar if true, then ignore IDs when doing the compare.
+ * @return true if the objects are equal.
+ */
+ protected boolean compare(EObject other, boolean similar) {
+ return ExtendedPropertiesAdapter.compare(object, other, similar);
+ }
+
+ /**
+ * Some methods accept java Objects as a context variable. In many cases (especially the
+ * default implementations) the context object must have the same type as the specialized
+ * class.
+ *
+ * @param context
+ * @return the context variable if it has the same type as this.object, or this.object if not.
+ */
+ @SuppressWarnings("unchecked")
+ protected T adopt(Object context) {
+ T result = (this.object.getClass().isInstance(context)) ? (T)context : this.object;
+ return result;
+ }
+
+ /**
+ * Gets the Editing Domain for the given EObject. See also
+ * {@link AdapterFactoryEditingDomain}
+ *
+ * If an Editing Domain can not be determined for the given context object,
+ * then consult our {@link ExtendedPropertiesAdapter} owner.
+ *
+ * @param context an EObject which must be contained in an EMF Resource.
+ * @return
+ */
+ public TransactionalEditingDomain getEditingDomain(EObject context) {
+ T object = adopt(context);
+ // check the EObject's contained Resource
+ EditingDomain result = AdapterFactoryEditingDomain.getEditingDomainFor(object);
+ if (result == null) {
+ if (object instanceof IEditingDomainProvider) {
+ // the object itself may be a provider
+ result = ((IEditingDomainProvider) object).getEditingDomain();
+ }
+ if (result == null) {
+ // check the object's adapters for providers
+ IEditingDomainProvider provider = AdapterUtil.adapt(object, IEditingDomainProvider.class);
+ if (provider!=null) {
+ result = provider.getEditingDomain();
+ }
+ if (result == null) {
+ // finally, check our adapter factory
+ result = owner.getEditingDomain();
+ }
+ }
+ }
+ // it's gotta be a Transactional Editing Domain or nothing!
+ if (result instanceof TransactionalEditingDomain)
+ return (TransactionalEditingDomain)result;
+ return null;
+ }
+
+ /**
+ * Create a new instance of the object that is managed by this
+ * ObjectDescriptor.
+ *
+ * @param eclass an optional type for the new object. Note that this must be
+ * a subtype of the feature type as returned by
+ * {@code getEType()}.
+ * @return the new object.
+ */
+ public T createObject(EClass eclass) {
+ return createObject(getResource(),eclass);
+ }
+
+ /**
+ * Gets the EMF Resource managed by our {@link ExtendedPropertiesAdapter}
+ *
+ * @return and EMF Resource or null if not set.
+ */
+ public Resource getResource() {
+ return owner.getResource();
+ }
+
+ /**
+ * Create a new instance of the object that is managed by this ObjectDescriptor.
+ *
+ * @param resource the EMF Resource in which to create the new object.
+ * @param eclass an optional type for the new object. Note that this must be
+ * a subtype of the feature type as returned by
+ * {@code getEType()}.
+ * @return the new object.
+ */
+ @SuppressWarnings("unchecked")
+ public T createObject(Resource resource, EClass eclass) {
+
+ EClass eClass = null;
+ if (eclass instanceof EClass) {
+ eClass = (EClass)eclass;
+ }
+ else if (eclass instanceof EObject) {
+ eClass = ((EObject)eclass).eClass();
+ }
+ else {
+ eClass = object.eClass();
+ }
+ Assert.isTrue(object.eClass().isSuperTypeOf(eClass));
+
+ if (resource==null)
+ resource = getResource();
+
+ // set the Resource into the Factory's adapter temporarily for use during
+ // object construction and initialization (@see ModelExtensionDescriptor)
+ EFactory factory = eClass.getEPackage().getEFactoryInstance();
+ ObjectPropertyProvider adapter = ObjectPropertyProvider.adapt(factory, resource);
+ Object value = owner.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
+ if (value!=null)
+ adapter.setProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, value);
+ T newObject = null;
+ synchronized(factory) {
+ newObject = (T) factory.create(eClass);
+ }
+
+ // if the object has an "id", assign it now.
+ String id = ModelUtil.setID(newObject,resource);
+ // also set a default name
+ EStructuralFeature feature = newObject.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+ if (feature!=null && !newObject.eIsSet(feature)) {
+ if (id!=null)
+ newObject.eSet(feature, ModelUtil.toCanonicalString(id));
+ else {
+ String name = ModelUtil.toCanonicalString(newObject.eClass().getName());
+ newObject.eSet(feature, NLS.bind(Messages.ObjectDescriptor_New, name));
+ }
+ }
+
+ adapter = ExtendedPropertiesAdapter.adapt(newObject);
+ if (adapter!=null)
+ adapter.setResource(resource);
+
+ return newObject;
+ }
+
+
+ /**
+ * Sets the property.
+ *
+ * @param key the key
+ * @param value the value
+ */
+ public void setProperty(String key, Object value) {
+ if (value==null) {
+ if (properties!=null) {
+ properties.remove(key);
+ if (properties.isEmpty())
+ properties = null;
+ }
+ }
+ else {
+ if (properties==null)
+ properties = new Hashtable<String, Object>();
+ properties.put(key, value);
+ }
+ }
+
+ /**
+ * Gets the property.
+ *
+ * @param key the key
+ * @return the property
+ */
+ public Object getProperty(String key) {
+ if (properties==null)
+ return null;
+ return properties.get(key);
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectPropertyProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectPropertyProvider.java
new file mode 100644
index 00000000..fa280c18
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/ObjectPropertyProvider.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.adapters;
+
+import java.util.Hashtable;
+
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.util.Bpmn2Resource;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * A Default Resource and Property Provider class for linking an EMF Resource.
+ * <p>
+ * This adapter links any EObject with an EMF Resource. The adapter is also a
+ * Property (name/value pair) holder so it can be used to pass additional
+ * information along with the EObject. This is useful for sending object
+ * construction details to the BPMN2 Modeler object factory. See
+ * {@link Bpmn2ModelerFactory#create(EClass)}
+ */
+public class ObjectPropertyProvider extends AdapterImpl implements IResourceProvider, IPropertyHolder {
+
+ /** Property key for the EMF Resource that the object will eventually be (or already is) contained in */
+ public static final String RESOURCE = "resource"; //$NON-NLS-1$
+
+ protected Hashtable<String, Object> properties = new Hashtable<String, Object>();
+
+ /**
+ * Add this adapter to the given EObject and link it with the given Resource.
+ *
+ * @param object the object
+ * @param resource the resource
+ * @return this Resource Provider adapter
+ */
+ public static ObjectPropertyProvider adapt(EObject object, Resource resource) {
+ ObjectPropertyProvider adapter = getAdapter(object);
+ if (adapter!=null)
+ adapter.setResource(resource);
+ else {
+ adapter = new ObjectPropertyProvider(resource);
+ object.eAdapters().add(adapter);
+ }
+ return adapter;
+ }
+
+ /**
+ * Gets the adapter.
+ *
+ * @param object the object
+ * @return the adapter
+ */
+ public static ObjectPropertyProvider getAdapter(EObject object) {
+ for (Adapter a : object.eAdapters()) {
+ if (a instanceof ObjectPropertyProvider) {
+ return (ObjectPropertyProvider)a;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Instantiates a new resource provider.
+ *
+ * @param resource the resource
+ */
+ protected ObjectPropertyProvider(Resource resource) {
+ if (resource!=null)
+ setResource(resource);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.edit.domain.IEditingDomainProvider#getEditingDomain()
+ */
+ @Override
+ public EditingDomain getEditingDomain() {
+ Resource resource = getResource();
+ if (resource!=null) {
+ EditingDomain result = AdapterFactoryEditingDomain.getEditingDomainFor(resource);
+ if (result instanceof TransactionalEditingDomain)
+ return result;
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.IResourceProvider#getResource()
+ */
+ @Override
+ public Resource getResource() {
+ return (Resource) getProperty(RESOURCE);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.IResourceProvider#setResource(org.eclipse.emf.ecore.resource.Resource)
+ */
+ @Override
+ public void setResource(Resource resource) {
+ setProperty(RESOURCE, resource);
+ }
+
+ /**
+ * Sets the property.
+ *
+ * @param key the key
+ * @param value the value
+ */
+ public void setProperty(String key, Object value) {
+ if (value==null)
+ properties.remove(key);
+ else
+ properties.put(key, value);
+ }
+
+ /**
+ * Gets the property.
+ *
+ * @param key the key
+ * @return the property
+ */
+ public Object getProperty(String key) {
+ return properties.get(key);
+ }
+
+ /**
+ * Given an EObject always returns the BPMN2 Resource that is associated
+ * with that object. This may involve searching for all Resources in the
+ * ResourceSet that the EObject belongs to. This also searches for a
+ * Resource in the object's {@link InsertionAdapter} if the object is not
+ * yet contained in any Resource.
+ *
+ * @param object
+ * @return
+ */
+ public static Resource getResource(EObject object) {
+ Resource resource = null;
+ if (object!=null) {
+ resource = object.eResource();
+ if (resource==null) {
+ IResourceProvider rp = AdapterRegistry.INSTANCE.adapt(object, IResourceProvider.class);
+ if (rp!=null)
+ resource = rp.getResource();
+ }
+
+ if (resource==null) {
+ for (Adapter a : object.eAdapters()) {
+ if (a instanceof IResourceProvider) {
+ resource = ((IResourceProvider)a).getResource();
+ if (resource!=null)
+ break;
+ }
+ }
+ }
+
+ // make sure we get a BPMN2 Resource
+ if (resource!=null && !(resource instanceof Bpmn2Resource)) {
+ ResourceSet rs = resource.getResourceSet();
+ if (rs!=null) {
+ for (Resource r : rs.getResources()) {
+ if (r instanceof Bpmn2Resource) {
+ resource = r;
+ break;
+ }
+ }
+ }
+ }
+ }
+ return resource;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties
new file mode 100644
index 00000000..ffd6ffff
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+ObjectDescriptor_New=New {0}
+ObjectDescriptor_Unnamed=Unnamed {0}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/package.html b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/package.html
new file mode 100644
index 00000000..064d247c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/adapters/package.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head></head>
+<body>
+ Provides EObject adapters and utilities for monitoring changes to model objects and extending objects with
+ customized property providers for the UI.
+</body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Builder.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Builder.java
index b251c379..cabc6aab 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Builder.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Builder.java
@@ -10,14 +10,25 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.core.builder;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Hashtable;
import java.util.Map;
+import java.util.Stack;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.runtime.XMLConfigElement;
+import org.eclipse.bpmn2.modeler.core.utils.ErrorDialog;
import org.eclipse.bpmn2.modeler.core.validation.BPMN2ProjectValidator;
+import org.eclipse.bpmn2.presentation.Bpmn2EditorPlugin;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -26,7 +37,11 @@ import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;
@@ -35,26 +50,47 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
public static final String BUILDER_ID = "org.eclipse.bpmn2.modeler.core.bpmn2Builder"; //$NON-NLS-1$
private static final String MARKER_TYPE = "org.eclipse.bpmn2.modeler.core.xmlProblem"; //$NON-NLS-1$
+ public static final String CONFIG_FOLDER = ".bpmn2config"; //$NON-NLS-1$
+
private SAXParserFactory parserFactory;
+ private Hashtable<IFolder, Long> timestamps = new Hashtable<IFolder, Long>();
+
+ public static final BPMN2Builder INSTANCE = new BPMN2Builder();
-
class BPMN2DeltaVisitor implements IResourceDeltaVisitor {
IProgressMonitor monitor;
-
+
public BPMN2DeltaVisitor(IProgressMonitor monitor) {
this.monitor = monitor;
}
-
+
/*
* (non-Javadoc)
*
- * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)
+ * @see
+ * org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse
+ * .core.resources.IResourceDelta)
*/
public boolean visit(IResourceDelta delta) throws CoreException {
+ IResource resource = delta.getResource();
+ if (resource instanceof IFile) {
+ IContainer container = resource.getParent();
+ if (CONFIG_FOLDER.equals(container.getName()) && container.getParent() instanceof IProject) {
+ int kind = delta.getKind();
+ if (kind==IResourceDelta.REMOVED) {
+ unloadExtension((IFile) resource);
+ }
+ else {
+ loadExtension((IFile) resource);
+ }
+ return true;
+ }
+ }
+
switch (delta.getKind()) {
case IResourceDelta.ADDED:
// handle added resource
-// checkXML(resource);
+ // checkXML(resource);
validate(delta, monitor);
break;
case IResourceDelta.REMOVED:
@@ -62,26 +98,26 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
break;
case IResourceDelta.CHANGED:
// handle changed resource
-// checkXML(resource);
+ // checkXML(resource);
validate(delta, monitor);
break;
}
- //return true to continue visiting children.
+ // return true to continue visiting children.
return true;
}
}
class BPMN2ResourceVisitor implements IResourceVisitor {
IProgressMonitor monitor;
-
+
public BPMN2ResourceVisitor(IProgressMonitor monitor) {
this.monitor = monitor;
}
-
+
public boolean visit(IResource resource) {
-// checkXML(resource);
+ // checkXML(resource);
validate(resource, monitor);
- //return true to continue visiting children.
+ // return true to continue visiting children.
return true;
}
}
@@ -90,10 +126,9 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
* (non-Javadoc)
*
* @see org.eclipse.core.internal.events.InternalBuilder#build(int,
- * java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+ * java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
*/
- protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
- throws CoreException {
+ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
if (kind == FULL_BUILD) {
fullBuild(monitor);
} else {
@@ -120,8 +155,7 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
BPMN2ProjectValidator.validate(resource, monitor);
}
- protected void fullBuild(final IProgressMonitor monitor)
- throws CoreException {
+ protected void fullBuild(final IProgressMonitor monitor) throws CoreException {
try {
getProject().accept(new BPMN2ResourceVisitor(monitor));
} catch (CoreException e) {
@@ -129,22 +163,104 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
}
/**
- * This was generated by the Project Builder/Nature wizard. No longer used, but keeping
- * this around just in case...
+ * Load all extension definition files contained in the given IProject's CONFIG_FOLDER folder.
+ * The timestamp of this folder is cached so that it only gets loaded once.
+ * Individual extension definition files are loaded by the builder if/when they are modified.
*
- * @deprecated
+ * @param project
*/
+ public void loadExtensions(IProject project) {
+ try {
+ IFolder folder = project.getFolder(CONFIG_FOLDER);
+ if (folder.exists()) {
+ Long timestamp = timestamps.get(folder);
+ if (timestamp==null || timestamp.longValue() < folder.getLocalTimeStamp()) {
+ timestamps.put(folder, new Long(folder.getLocalTimeStamp()));
+ for (IResource r : folder.members()) {
+ if (r instanceof IFile && r.exists()) {
+ loadExtension((IFile) r);
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void loadExtension(IFile file) {
+ XMLConfigElementHandler handler = new XMLConfigElementHandler(file);
+ try {
+ SAXParser parser = getParser();
+ if (file.exists()) {
+ FileInputStream fis = new FileInputStream(file.getLocation().makeAbsolute().toOSString());
+ parser.parse(fis, handler);
+ TargetRuntime rt = Bpmn2Preferences.getInstance(file.getProject()).getRuntime();
+ IConfigurationElement element = handler.root.getChildren()[0];
+ TargetRuntime.loadExtensions(rt, element.getChildren(), file);
+ }
+ } catch (Exception e) {
+ ErrorDialog dlg = new ErrorDialog(Messages.BPMN2Builder_ConfigFileError_Title, e);
+ dlg.show();
+ }
+ }
+
+ public void unloadExtension(IFile file) {
+ TargetRuntime.unloadExtensions(file);
+ }
+
+ private class XMLConfigElementHandler extends XMLErrorHandler {
+ public XMLConfigElement root;
+ private Stack<XMLConfigElement> stack = new Stack<XMLConfigElement>();
+
+ public XMLConfigElementHandler(IFile file) {
+ super(file);
+ }
+
+ @Override
+ public void characters(char[] ch, int start, int length) throws SAXException {
+ String value = new String(ch, start, length).trim();
+ if (!value.isEmpty()) {
+ stack.peek().setValue(value);
+ }
+ }
+
+ @Override
+ public void endDocument() throws SAXException {
+ stack.pop();
+ }
+
+ @Override
+ public void endElement(String arg0, String arg1, String arg2) throws SAXException {
+ stack.pop();
+ }
+
+ @Override
+ public void startDocument() throws SAXException {
+ root = new XMLConfigElement(file.getProject());
+ stack.push(root);
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+ XMLConfigElement element = new XMLConfigElement(stack.peek(), qName);
+ for (int i = 0; i < attributes.getLength(); ++i) {
+ element.setAttribute(attributes.getQName(i), attributes.getValue(i));
+ }
+ stack.push(element);
+ }
+ }
+
private class XMLErrorHandler extends DefaultHandler {
-
- private IFile file;
+
+ protected IFile file;
public XMLErrorHandler(IFile file) {
this.file = file;
}
private void addMarker(SAXParseException e, int severity) {
- BPMN2Builder.this.addMarker(file, e.getMessage(), e
- .getLineNumber(), severity);
+ BPMN2Builder.this.addMarker(file, e.getMessage(), e.getLineNumber(), severity);
}
public void error(SAXParseException exception) throws SAXException {
@@ -165,10 +281,8 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
* @param message
* @param lineNumber
* @param severity
- * @deprecated
*/
- private void addMarker(IFile file, String message, int lineNumber,
- int severity) {
+ private void addMarker(IFile file, String message, int lineNumber, int severity) {
try {
IMarker marker = file.createMarker(MARKER_TYPE);
marker.setAttribute(IMarker.MESSAGE, message);
@@ -183,7 +297,6 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
/**
* @param resource
- * @deprecated
*/
void checkXML(IResource resource) {
if (BPMN2ProjectValidator.isBPMN2File(resource)) {
@@ -199,7 +312,6 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
/**
* @param file
- * @deprecated
*/
private void deleteMarkers(IFile file) {
try {
@@ -212,10 +324,8 @@ public class BPMN2Builder extends IncrementalProjectBuilder {
* @return
* @throws ParserConfigurationException
* @throws SAXException
- * @deprecated
*/
- private SAXParser getParser() throws ParserConfigurationException,
- SAXException {
+ private SAXParser getParser() throws ParserConfigurationException, SAXException {
if (parserFactory == null) {
parserFactory = SAXParserFactory.newInstance();
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Nature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Nature.java
index a6aeaf2c..a6aeaf2c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Nature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/BPMN2Nature.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/Messages.java
new file mode 100644
index 00000000..853b45ec
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/Messages.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.builder;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.builder.messages"; //$NON-NLS-1$
+ public static String BPMN2Builder_ConfigFileError_Title;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/ToggleNatureAction.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/ToggleNatureAction.java
index 819e2960..819e2960 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/ToggleNatureAction.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/ToggleNatureAction.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/messages.properties
new file mode 100644
index 00000000..002b8535
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/builder/messages.properties
@@ -0,0 +1 @@
+BPMN2Builder_ConfigFileError_Title=Error in Configuration File
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIGenerator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIGenerator.java
index 72b06af1..0a0a53c8 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIGenerator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIGenerator.java
@@ -18,9 +18,11 @@ import java.util.List;
import org.eclipse.bpmn2.Artifact;
import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Choreography;
import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.ConversationNode;
+import org.eclipse.bpmn2.DataObject;
import org.eclipse.bpmn2.DataStore;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.FlowElement;
@@ -42,14 +44,15 @@ import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.BpmnDiFactory;
import org.eclipse.bpmn2.di.ParticipantBandKind;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.ShapeLayoutManager;
import org.eclipse.bpmn2.modeler.core.utils.Tuple;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Size;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.dd.dc.Bounds;
import org.eclipse.dd.dc.DcFactory;
@@ -77,6 +80,7 @@ public class DIGenerator {
private HashMap<BaseElement, PictogramElement> elements;
private ImportDiagnostics diagnostics;
private DiagramElementTree missingElements;
+ private Bpmn2Preferences preferences;
public DIGenerator(DIImport importer) {
this.importer = importer;
@@ -86,6 +90,7 @@ public class DIGenerator {
diagram = editor.getDiagramTypeProvider().getDiagram();
bpmnDiagram = BusinessObjectUtil.getFirstElementOfType(diagram, BPMNDiagram.class);
definitions = ModelUtil.getDefinitions(bpmnDiagram);
+ preferences = Bpmn2Preferences.getInstance(definitions);
}
public boolean hasMissingDIElements() {
@@ -190,7 +195,7 @@ public class DIGenerator {
}
boolean missing = (elements.get(be) == null && diagnostics.get(be) == null);
if (missing)
- GraphicsUtil.dump("Missing DI element for: "+be.eClass().getName()+" '"+ModelUtil.getDisplayName(be)+"'");
+ GraphicsUtil.dump("Missing DI element for: "+be.eClass().getName()+" '"+ExtendedPropertiesProvider.getTextValue(be)+"'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return missing;
}
@@ -241,13 +246,13 @@ public class DIGenerator {
for (FlowElement fe : container.getFlowElements()) {
if (isMissingDIElement(fe) && !laneElements.contains(fe)) {
- if (!(fe instanceof SequenceFlow)) {
- if (parentNode==null)
- parentNode = missing.addChild(container);
- parentNode.addChild(fe);
- if (fe instanceof FlowElementsContainer || fe instanceof ChoreographyActivity) {
- findMissingDIElements(parentNode, fe);
- }
+ if (fe instanceof SequenceFlow || fe instanceof DataObject || fe instanceof DataStore)
+ continue;
+ if (parentNode==null)
+ parentNode = missing.addChild(container);
+ parentNode.addChild(fe);
+ if (fe instanceof FlowElementsContainer || fe instanceof ChoreographyActivity) {
+ findMissingDIElements(parentNode, fe);
}
}
}
@@ -276,12 +281,23 @@ public class DIGenerator {
}
}
for (Participant p : container.getParticipants()) {
- if (isMissingDIElement(p) && p.getProcessRef()!=null) {
+ boolean isParticipantBand = false;
+ if (p.eContainer() instanceof Choreography) {
+ // this may be a Choreography Activity Participant band
+ Choreography choreography = (Choreography) p.eContainer();
+ for (FlowElement fe : choreography.getFlowElements()) {
+ if (fe instanceof ChoreographyActivity) {
+ if (((ChoreographyActivity)fe).getParticipantRefs().contains(p)) {
+ isParticipantBand = true;
+ break;
+ }
+ }
+ }
+ }
+ if (isMissingDIElement(p) && p.getProcessRef()!=null && !isParticipantBand) {
if (parentNode==null)
parentNode = missing.addChild(container);
- DiagramElementTreeNode child = parentNode.addChild(p);
- if (p.getProcessRef()!=null)
- findMissingDIElements(child, p.getProcessRef());
+ parentNode.addChild(p);
}
}
for (ConversationNode c : container.getConversations()) {
@@ -550,7 +566,7 @@ public class DIGenerator {
plane.setBpmnElement(container);
bpmnDiagram = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
- bpmnDiagram.setName(ModelUtil.getDisplayName(container));
+ bpmnDiagram.setName(ExtendedPropertiesProvider.getTextValue(container));
bpmnDiagram.setPlane(plane);
definitions.getDiagrams().add(bpmnDiagram);
@@ -582,12 +598,12 @@ public class DIGenerator {
Bounds bounds = DcFactory.eINSTANCE.createBounds();
bounds.setX(x);
bounds.setY(y);
- Size size = GraphicsUtil.getShapeSize(bpmnElement, diagram);
- bounds.setWidth(size.getWidth());
- bounds.setHeight(size.getHeight());
+ ShapeStyle ss = preferences.getShapeStyle(bpmnElement);
+ bounds.setWidth(ss.getDefaultWidth());
+ bounds.setHeight(ss.getDefaultHeight());
bpmnShape.setBounds(bounds);
plane.getPlaneElement().add(bpmnShape);
- Bpmn2Preferences.getInstance(bpmnDiagram.eResource()).applyBPMNDIDefaults(bpmnShape, null);
+ preferences.applyBPMNDIDefaults(bpmnShape, null);
ModelUtil.setID(bpmnShape);
if (doImport)
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIImport.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIImport.java
index 7f6dc8bf..c14a02e1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIImport.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIImport.java
@@ -51,14 +51,14 @@ import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.BpmnDiFactory;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Size;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.dd.dc.Bounds;
@@ -74,12 +74,11 @@ import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
import org.eclipse.graphiti.features.context.impl.AreaContext;
-import org.eclipse.graphiti.features.context.impl.LayoutContext;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
@@ -89,18 +88,14 @@ import org.eclipse.graphiti.mm.pictograms.FixPointAnchor;
import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.mm.pictograms.impl.FreeFormConnectionImpl;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
-import org.eclipse.swt.widgets.Display;
@SuppressWarnings("restriction")
public class DIImport {
- public static final String IMPORT_PROPERTY = DIImport.class.getSimpleName().concat(".import"); //$NON-NLS-1$
-
private DiagramEditor editor;
// private Diagram diagram;
private TransactionalEditingDomain domain;
@@ -129,68 +124,76 @@ public class DIImport {
diagnostics = new ImportDiagnostics(modelHandler.getResource());
preferences = (Bpmn2Preferences) editor.getAdapter(Bpmn2Preferences.class);
elements = new LinkedHashMap<BaseElement, PictogramElement>();
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
-
- Diagram diagram = editor.getDiagramTypeProvider().getDiagram();
- Definitions definitions = modelHandler.getDefinitions();
-
- if (bpmnDiagrams.size() == 0) {
- BPMNPlane plane = BpmnDiFactory.eINSTANCE.createBPMNPlane();
- plane.setBpmnElement(ModelUtil.getDefaultBPMNPlaneReference(definitions));
+ Bpmn2Preferences prefs = Bpmn2Preferences.getInstance(modelHandler.getResource());
+ prefs.setEnableConnectionRouting(false);
- BPMNDiagram d = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
- d.setPlane(plane);
-
- modelHandler.getDefinitions().getDiagrams().add(d);
-
- // don't forget to add the new Diagram to our list for processing
- bpmnDiagrams.add(d);
- }
- featureProvider.link(diagram, bpmnDiagrams.get(0));
-
- // First: add all IDs to our ID mapping table
- TreeIterator<EObject> iter = definitions.eAllContents();
- while (iter.hasNext()) {
- ModelUtil.addID( iter.next() );
- }
-
- // do the import
- for (BPMNDiagram d : bpmnDiagrams) {
- diagram = DIUtils.getOrCreateDiagram(editor.getDiagramBehavior(),d);
- }
- for (BPMNDiagram d : bpmnDiagrams) {
+ try {
+ domain.getCommandStack().execute(new RecordingCommand(domain) {
+ @Override
+ protected void doExecute() {
+
+ Diagram diagram = editor.getDiagramTypeProvider().getDiagram();
+ Definitions definitions = modelHandler.getDefinitions();
- diagram = DIUtils.findDiagram(editor.getDiagramBehavior(),d);
- editor.getDiagramTypeProvider().init(diagram, editor);
-
- BPMNPlane plane = d.getPlane();
- if (plane.getBpmnElement() == null) {
- // Set the actual bpmnElement reference to the default if it is null.
- // The editor relies on this to determine whether the BaseElement has
- // its own diagram page or not.
+ if (bpmnDiagrams.size() == 0) {
+ BPMNPlane plane = BpmnDiFactory.eINSTANCE.createBPMNPlane();
plane.setBpmnElement(ModelUtil.getDefaultBPMNPlaneReference(definitions));
+
+ BPMNDiagram d = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
+ d.setPlane(plane);
+
+ modelHandler.getDefinitions().getDiagrams().add(d);
+
+ // don't forget to add the new Diagram to our list for processing
+ bpmnDiagrams.add(d);
+ }
+ featureProvider.link(diagram, bpmnDiagrams.get(0));
+
+ // First: add all IDs to our ID mapping table
+ TreeIterator<EObject> iter = definitions.eAllContents();
+ while (iter.hasNext()) {
+ ModelUtil.addID( iter.next() );
}
- elements.put(plane.getBpmnElement(), diagram);
- List<DiagramElement> ownedElement = plane.getPlaneElement();
-
- importShapes(ownedElement);
- importConnections(ownedElement);
-
-// relayoutLanes(ownedElement);
- // search for BPMN elements that do not have the DI elements
- // needed to render them in the editor
+ // do the import
+ for (BPMNDiagram d : bpmnDiagrams) {
+ diagram = DIUtils.getOrCreateDiagram(editor.getDiagramBehavior(),d);
+ }
+ for (BPMNDiagram d : bpmnDiagrams) {
+
+ diagram = DIUtils.findDiagram(editor.getDiagramBehavior(),d);
+ editor.getDiagramTypeProvider().init(diagram, editor);
+
+ BPMNPlane plane = d.getPlane();
+ if (plane.getBpmnElement() == null) {
+ // Set the actual bpmnElement reference to the default if it is null.
+ // The editor relies on this to determine whether the BaseElement has
+ // its own diagram page or not.
+ plane.setBpmnElement(ModelUtil.getDefaultBPMNPlaneReference(definitions));
+ }
+ elements.put(plane.getBpmnElement(), diagram);
+ List<DiagramElement> ownedElement = plane.getPlaneElement();
+
+ importShapes(ownedElement);
+ importConnections(ownedElement);
+
+ // relayoutLanes(ownedElement);
+
+ // search for BPMN elements that do not have the DI elements
+ // needed to render them in the editor
+ }
+ DIGenerator generator = new DIGenerator(DIImport.this);
+ generator.generateMissingDIElements();
+
+ layoutAll();
}
- DIGenerator generator = new DIGenerator(DIImport.this);
- generator.generateMissingDIElements();
-
- layoutAll();
- }
+
+ });
+ }
+ finally {
+ prefs.setEnableConnectionRouting(true);
+ }
- });
-
diagnostics.report();
}
@@ -225,17 +228,18 @@ public class DIImport {
PictogramElement pe = elements.get(be);
if (be instanceof SubProcess) { // we need the layout to hide children if collapsed
- LayoutContext context = new LayoutContext(pe);
- ILayoutFeature feature = featureProvider.getLayoutFeature(context);
- if (feature!=null && feature.canLayout(context))
- feature.layout(context);
- }
- else if (be instanceof Participant) {
- LayoutContext context = new LayoutContext(pe);
- ILayoutFeature feature = featureProvider.getLayoutFeature(context);
- if (feature!=null && feature.canLayout(context))
- feature.layout(context);
+ UpdateContext context = new UpdateContext(pe);
+ context.putProperty(GraphitiConstants.FORCE_UPDATE_ALL, Boolean.TRUE);
+ IUpdateFeature feature = featureProvider.getUpdateFeature(context);
+ if (feature!=null)
+ feature.update(context);
}
+// else if (be instanceof Participant) {
+// LayoutContext context = new LayoutContext(pe);
+// ILayoutFeature feature = featureProvider.getLayoutFeature(context);
+// if (feature!=null && feature.canLayout(context))
+// feature.layout(context);
+// }
// else if (be instanceof FlowNode) {
// LayoutContext context = new LayoutContext(pe);
// ILayoutFeature feature = featureProvider.getLayoutFeature(context);
@@ -243,13 +247,13 @@ public class DIImport {
// feature.layout(context);
// }
//
- else if (pe instanceof Connection) {
- UpdateContext context = new UpdateContext(pe);
- IUpdateFeature feature = featureProvider.getUpdateFeature(context);
- if (feature!=null && feature.updateNeeded(context).toBoolean()) {
- feature.update(context);
- }
- }
+// else if (pe instanceof Connection) {
+// UpdateContext context = new UpdateContext(pe);
+// IUpdateFeature feature = featureProvider.getUpdateFeature(context);
+// if (feature!=null && feature.updateNeeded(context).toBoolean()) {
+// feature.update(context);
+// }
+// }
}
}
@@ -426,11 +430,10 @@ public class DIImport {
context.setY(yMin-10);
context.setWidth(width+20);
context.setHeight(height+20);
- context.putProperty(IMPORT_PROPERTY, true);
+ context.putProperty(GraphitiConstants.IMPORT_PROPERTY, true);
// determine the container into which to place the new Lane
handleLane(lane, context, null);
- IAddFeature addFeature = featureProvider.getAddFeature(context);
- ContainerShape newContainer = (ContainerShape)addFeature.add(context);
+ ContainerShape newContainer = (ContainerShape)featureProvider.addIfPossible(context);
newContainer.getGraphicsAlgorithm().setTransparency(0.5);
Graphiti.getPeService().sendToBack(newContainer);
@@ -455,20 +458,6 @@ public class DIImport {
}
}
- private void relayoutLanes(List<DiagramElement> ownedElement) {
- Diagram diagram = null;
- for (DiagramElement diagramElement : ownedElement) {
- if (diagramElement instanceof BPMNShape && ((BPMNShape) diagramElement).getBpmnElement() instanceof Lane) {
- if (diagram==null) {
- diagram = getDiagram(diagramElement);
- }
- BaseElement lane = ((BPMNShape) diagramElement).getBpmnElement();
- ContainerShape shape = (ContainerShape) BusinessObjectUtil.getFirstBaseElementFromDiagram(diagram, lane);
- FeatureSupport.redraw(shape);
- }
- }
- }
-
private Diagram getDiagram(EObject object) {
while (object!=null && !(object instanceof BPMNDiagram))
object = object.eContainer();
@@ -501,28 +490,10 @@ public class DIImport {
}
Diagram diagram = getDiagram(shape);
- context.putProperty(IMPORT_PROPERTY, true);
+ context.putProperty(GraphitiConstants.IMPORT_PROPERTY, true);
context.setNewObject(bpmnElement);
- boolean defaultSize = false;
- ShapeStyle ss = preferences.getShapeStyle(bpmnElement);
- if (ss!=null)
- defaultSize = ss.isDefaultSize();
-
- if (defaultSize) {
- Size size = GraphicsUtil.getShapeSize(bpmnElement,diagram);
- if (size!=null)
- context.setSize(size.getWidth(),size.getHeight());
- else
- defaultSize = false;
- }
-
- if (!defaultSize) {
- context.setSize((int) shape.getBounds().getWidth(), (int) shape.getBounds().getHeight());
- }
-
- if ( (bpmnElement instanceof SubProcess) && !shape.isIsExpanded()) {
- context.setSize(GraphicsUtil.getActivitySize(diagram).getWidth(), GraphicsUtil.getActivitySize(diagram).getHeight());
- }
+ context.setLocation((int)shape.getBounds().getX(), (int)shape.getBounds().getY());
+ context.setSize((int) shape.getBounds().getWidth(), (int) shape.getBounds().getHeight());
if (bpmnElement instanceof Lane) {
handleLane((Lane)bpmnElement, context, shape);
@@ -538,11 +509,28 @@ public class DIImport {
handleItemAwareElement((ItemAwareElement)bpmnElement, context, shape);
} else {
context.setTargetContainer(diagram);
- context.setLocation((int) shape.getBounds().getX(), (int) shape.getBounds().getY());
}
- if (canAdd(addFeature,context)) {
- PictogramElement newContainer = addFeature.add(context);
+ ShapeStyle ss = preferences.getShapeStyle(bpmnElement);
+ if (ss!=null && ss.getUseDefaultSize()) {
+ // Use default size for this thing instead of the
+ // size defined in the BPMNShape object. This means
+ // we'll need to adjust the position as well to keep
+ // the center of the object in its same relative position.
+ int x = context.getX();
+ int y = context.getY();
+ int w = context.getWidth();
+ int h = context.getHeight();
+ int dw = w - ss.getDefaultWidth();
+ int dh = h - ss.getDefaultHeight();
+ context.setSize(ss.getDefaultWidth(),ss.getDefaultHeight());
+ x += dw/2;
+ y += dh/2;
+ context.setLocation(x, y);
+ }
+
+ PictogramElement newContainer = featureProvider.addIfPossible(context);
+ if (newContainer!=null) {
featureProvider.link(newContainer, new Object[] { bpmnElement, shape });
if (bpmnElement instanceof Participant) {
// If the Participant ("Pool") references a Process, add it to our list of elements;
@@ -559,13 +547,6 @@ public class DIImport {
elements.put((Participant)o, pe);
}
}
-// else if (bpmnElement instanceof Event) {
-// GraphicsUtil.setEventSize(context.getWidth(), context.getHeight(), diagram);
-// } else if (bpmnElement instanceof Gateway) {
-// GraphicsUtil.setGatewaySize(context.getWidth(), context.getHeight(), diagram);
-// } else if (bpmnElement instanceof Activity && !(bpmnElement instanceof SubProcess)) {
-// GraphicsUtil.setActivitySize(context.getWidth(), context.getHeight(), diagram);
-// }
elements.put(bpmnElement, newContainer);
handleEvents(bpmnElement, newContainer);
@@ -583,10 +564,7 @@ public class DIImport {
context.setTargetContainer((ContainerShape) newContainer);
context.setNewObject(obj);
- IAddFeature addFeature = featureProvider.getAddFeature(context);
- if (canAdd(addFeature,context)) {
- addFeature.add(context);
- }
+ featureProvider.addIfPossible(context);
}
}
}
@@ -869,23 +847,33 @@ public class DIImport {
IAddFeature addFeature = featureProvider.getAddFeature(context);
if (canAdd(addFeature,context)) {
- context.putProperty(IMPORT_PROPERTY, true);
- Connection connection = (Connection) addFeature.add(context);
+ context.putProperty(GraphitiConstants.IMPORT_PROPERTY, true);
+ // we'll have to pass the bendpoints along to the Add Feature because the
+ // label position depends on the midpoint of a connection - the label shape
+ // is actually a ConnectionDecorator which is the only way we can attach
+ // a label to a connection.
+ // Translate the BPMN2 WayPoint coordinates to Graphiti Points
+ List<org.eclipse.graphiti.mm.algorithms.styles.Point> bendpoints =
+ new ArrayList<org.eclipse.graphiti.mm.algorithms.styles.Point>();
+ List<Point> waypoints = bpmnEdge.getWaypoint();
+ // Note that the first and last waypoint terminate at the source and target
+ // shape's boundary somewhere, so skip these two points.
+ for (int i=1; i<waypoints.size()-1; ++i) {
+ Point p = waypoints.get(i);
+ bendpoints.add(Graphiti.getCreateService().createPoint((int)p.getX(), (int)p.getY()));
+ }
+ // attach this bendpoint list to the Add Context where the Add Feature can pick it up
+ context.putProperty(GraphitiConstants.CONNECTION_BENDPOINTS, bendpoints);
+ Connection connection = (Connection) featureProvider.addIfPossible(context);
+
if (AnchorUtil.useAdHocAnchors(sourcePE, connection)) {
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_SOURCE_LOCATION,
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_SOURCE_LOCATION,
AnchorUtil.pointToString(sourceAnchor.getLocation()));
}
if (AnchorUtil.useAdHocAnchors(targetPE, connection)) {
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_TARGET_LOCATION,
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_TARGET_LOCATION,
AnchorUtil.pointToString(targetAnchor.getLocation()));
}
-
- if (connection instanceof FreeFormConnectionImpl) {
- List<Point> waypoints = bpmnEdge.getWaypoint();
- for (int i=1; i<waypoints.size()-1; ++i) {
- DIUtils.addBendPoint((FreeFormConnection)connection, waypoints.get(i));
- }
- }
featureProvider.link(connection, new Object[] { bpmnElement, bpmnEdge });
return connection;
@@ -992,4 +980,11 @@ public class DIImport {
}
return addFeature.canAdd(context);
}
+
+ public static boolean isImporting(IContext context) {
+ Object o = context.getProperty(GraphitiConstants.IMPORT_PROPERTY);
+ if (o instanceof Boolean)
+ return (Boolean)o;
+ return false;
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java
index fac52e3e..822d37af 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DIUtils.java
@@ -13,17 +13,30 @@
package org.eclipse.bpmn2.modeler.core.di;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.DocumentRoot;
+import org.eclipse.bpmn2.FlowElementsContainer;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNLabel;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.BpmnDiFactory;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.util.Bpmn2Resource;
@@ -38,6 +51,7 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.EcoreUtil.UsageCrossReferencer;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.graphiti.datatypes.IDimension;
@@ -58,9 +72,72 @@ import org.eclipse.graphiti.mm.pictograms.PictogramLink;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.platform.IDiagramBehavior;
import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.ILayoutService;
public class DIUtils {
+
+ /**
+ * Creates a BPMNShape if it does not already exist, and then links it to
+ * the given {@code BaseElement}.
+ *
+ * @param shape the Container Shape
+ * @param elem the BaseElement
+ * @param bpmnShape the BPMNShape object. If null, a new one is created and
+ * inserted into the BPMNDiagram.
+ * @param applyDefaults if true, apply User Preference defaults for certain
+ * BPMN DI attributes, e.g. isHorizontal, isExpanded, etc.
+ * @return the BPMNShape
+ */
+ public static BPMNShape createDIShape(Shape shape, BaseElement elem, BPMNShape bpmnShape, IFeatureProvider fp) {
+ if (bpmnShape == null) {
+ Diagram diagram = Graphiti.getPeService().getDiagramForShape(shape);
+ ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
+ int x = loc.getX();
+ int y = loc.getY();
+ int w = shape.getGraphicsAlgorithm().getWidth();
+ int h = shape.getGraphicsAlgorithm().getHeight();
+ bpmnShape = createDIShape(shape, elem, x, y, w, h, fp, diagram);
+ }
+ else {
+ fp.link(shape, new Object[] { elem, bpmnShape });
+ }
+ return bpmnShape;
+ }
+
+ public static BPMNShape createDIShape(Shape shape, BaseElement elem, int x, int y, int w, int h,
+ IFeatureProvider fp, Diagram diagram) {
+
+ EList<EObject> businessObjects = Graphiti.getLinkService().getLinkForPictogramElement(diagram)
+ .getBusinessObjects();
+ BPMNShape bpmnShape = null;
+
+ for (EObject eObject : businessObjects) {
+ if (eObject instanceof BPMNDiagram) {
+ BPMNDiagram bpmnDiagram = (BPMNDiagram) eObject;
+
+ bpmnShape = BpmnDiFactory.eINSTANCE.createBPMNShape();
+ bpmnShape.setBpmnElement(elem);
+ Bounds bounds = DcFactory.eINSTANCE.createBounds();
+ bounds.setX(x);
+ bounds.setY(y);
+ bounds.setWidth(w);
+ bounds.setHeight(h);
+ bpmnShape.setBounds(bounds);
+ getOrCreateDILabel(shape, bpmnShape);
+
+ Bpmn2Preferences.getInstance(bpmnDiagram.eResource()).applyBPMNDIDefaults(bpmnShape, null);
+
+ addDIElement(bpmnShape,bpmnDiagram);
+ ModelUtil.setID(bpmnShape);
+
+ fp.link(shape, new Object[] { elem, bpmnShape });
+ break;
+ }
+ }
+
+ return bpmnShape;
+ }
public static void updateDIShape(PictogramElement element) {
BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(element, BPMNShape.class);
@@ -91,7 +168,7 @@ public class DIUtils {
updateConnections(element);
}
- public static void updateConnections(PictogramElement element) {
+ private static void updateConnections(PictogramElement element) {
if (element instanceof Shape) {
EList<Anchor> anchors = ((Shape) element).getAnchors();
@@ -107,6 +184,69 @@ public class DIUtils {
}
}
+ /**
+ * Creates a BPMNEdge if it does not already exist, and then links it to
+ * the given {@code BaseElement}.
+ *
+ * @param connection the connection
+ * @param elem the BaseElement
+ * @param bpmnEdge the BPMNEdge object. If null, a new one is created and
+ * inserted into the BPMNDiagram.
+ * @return the BPMNEdge
+ */
+ public static BPMNEdge createDIEdge(Connection connection, BaseElement elem, BPMNEdge bpmnEdge, IFeatureProvider fp) {
+ if (bpmnEdge == null) {
+ Diagram diagram = Graphiti.getPeService().getDiagramForPictogramElement(connection);
+ EList<EObject> businessObjects = Graphiti.getLinkService().getLinkForPictogramElement(diagram)
+ .getBusinessObjects();
+ for (EObject eObject : businessObjects) {
+ if (eObject instanceof BPMNDiagram) {
+ BPMNDiagram bpmnDiagram = (BPMNDiagram) eObject;
+
+ bpmnEdge = BpmnDiFactory.eINSTANCE.createBPMNEdge();
+ bpmnEdge.setBpmnElement(elem);
+
+ if (elem instanceof Association) {
+ bpmnEdge.setSourceElement(DIUtils.findDiagramElement(
+ ((Association) elem).getSourceRef()));
+ bpmnEdge.setTargetElement(DIUtils.findDiagramElement(
+ ((Association) elem).getTargetRef()));
+ } else if (elem instanceof MessageFlow) {
+ bpmnEdge.setSourceElement(DIUtils.findDiagramElement(
+ (BaseElement) ((MessageFlow) elem).getSourceRef()));
+ bpmnEdge.setTargetElement(DIUtils.findDiagramElement(
+ (BaseElement) ((MessageFlow) elem).getTargetRef()));
+ } else if (elem instanceof SequenceFlow) {
+ bpmnEdge.setSourceElement(DIUtils.findDiagramElement(
+ ((SequenceFlow) elem).getSourceRef()));
+ bpmnEdge.setTargetElement(DIUtils.findDiagramElement(
+ ((SequenceFlow) elem).getTargetRef()));
+ }
+
+ ILocation sourceLoc = Graphiti.getPeService().getLocationRelativeToDiagram(connection.getStart());
+ ILocation targetLoc = Graphiti.getPeService().getLocationRelativeToDiagram(connection.getEnd());
+
+ Point point = DcFactory.eINSTANCE.createPoint();
+ point.setX(sourceLoc.getX());
+ point.setY(sourceLoc.getY());
+ bpmnEdge.getWaypoint().add(point);
+
+ point = DcFactory.eINSTANCE.createPoint();
+ point.setX(targetLoc.getX());
+ point.setY(targetLoc.getY());
+ bpmnEdge.getWaypoint().add(point);
+
+ getOrCreateDILabel(connection, bpmnEdge);
+
+ DIUtils.addDIElement(bpmnEdge, bpmnDiagram);
+ ModelUtil.setID(bpmnEdge);
+ }
+ }
+ }
+ fp.link(connection, new Object[] { elem, bpmnEdge });
+ return bpmnEdge;
+ }
+
public static void updateDIEdge(Connection connection) {
ILayoutService layoutService = Graphiti.getLayoutService();
EObject be = BusinessObjectUtil.getFirstElementOfType(connection, BaseElement.class);
@@ -142,46 +282,52 @@ public class DIUtils {
}
}
- static void addBendPoint(FreeFormConnection freeForm, Point point) {
- freeForm.getBendpoints().add(Graphiti.getGaService().createPoint((int) point.getX(), (int) point.getY()));
+ /**
+ * Add a DiagramElement to a BPMNDiagram container.
+ *
+ * @param elem the Diagram Element to add
+ * @param bpmnDiagram the BPMNDiagram container to which it is added
+ */
+ public static void addDIElement(DiagramElement elem, BPMNDiagram bpmnDiagram) {
+ List<DiagramElement> elements = bpmnDiagram.getPlane().getPlaneElement();
+ elements.add(elem);
}
-
- public static BPMNShape createDIShape(Shape shape, BaseElement elem, int x, int y, int w, int h,
- IFeatureProvider fp, Diagram diagram) {
-
- EList<EObject> businessObjects = Graphiti.getLinkService().getLinkForPictogramElement(diagram)
- .getBusinessObjects();
- BPMNShape bpmnShape = null;
-
- for (EObject eObject : businessObjects) {
- if (eObject instanceof BPMNDiagram) {
- BPMNDiagram bpmnDiagram = (BPMNDiagram) eObject;
-
- bpmnShape = BpmnDiFactory.eINSTANCE.createBPMNShape();
- bpmnShape.setBpmnElement(elem);
- Bounds bounds = DcFactory.eINSTANCE.createBounds();
- bounds.setX(x);
- bounds.setY(y);
- bounds.setWidth(w);
- bounds.setHeight(h);
- bpmnShape.setBounds(bounds);
-
- Bpmn2Preferences.getInstance(bpmnDiagram.eResource()).applyBPMNDIDefaults(bpmnShape, null);
-
- addShape(bpmnShape,bpmnDiagram);
- ModelUtil.setID(bpmnShape);
-
- fp.link(shape, new Object[] { elem, bpmnShape });
- break;
+
+ public static BPMNLabel getOrCreateDILabel(PictogramElement pe, DiagramElement de) {
+ BPMNLabel bpmnLabel = null;
+ EStructuralFeature feature = de.eClass().getEStructuralFeature("label");
+ if (feature!=null) {
+ bpmnLabel = (BPMNLabel) de.eGet(feature);
+ if (bpmnLabel==null) {
+ bpmnLabel = BpmnDiFactory.eINSTANCE.createBPMNLabel();
+ de.eSet(feature, bpmnLabel);
}
}
-
- return bpmnShape;
+ return bpmnLabel;
}
-
- public static void addShape(DiagramElement elem, BPMNDiagram bpmnDiagram) {
- List<DiagramElement> elements = bpmnDiagram.getPlane().getPlaneElement();
- elements.add(elem);
+
+ public static void updateDILabel(PictogramElement pe, int x, int y, int w, int h) {
+ DiagramElement de = BusinessObjectUtil.getFirstElementOfType(pe, BPMNShape.class);
+ if (de==null) {
+ de = BusinessObjectUtil.getFirstElementOfType(pe, BPMNEdge.class);
+ }
+
+ if (de!=null) {
+ BPMNLabel bpmnLabel = getOrCreateDILabel(pe, de);
+ if (w==0 && h==0) {
+ bpmnLabel.setBounds(null);
+ }
+ else {
+ Bounds bounds = bpmnLabel.getBounds();
+ if (bounds==null)
+ bounds = DcFactory.eINSTANCE.createBounds();
+ bounds.setX((float)x);
+ bounds.setY((float)y);
+ bounds.setWidth((float)w);
+ bounds.setHeight((float)h);
+ bpmnLabel.setBounds(bounds);
+ }
+ }
}
public static DiagramElement findDiagramElement(List<BPMNDiagram> diagrams, BaseElement bpmnElement) {
@@ -227,8 +373,7 @@ public class DIUtils {
// create a new one
IDiagramTypeProvider dtp = editor.getDiagramContainer().getDiagramTypeProvider();
- String typeId = dtp.getDiagram().getDiagramTypeId();
- final Diagram newDiagram = Graphiti.getCreateService().createDiagram(typeId, bpmnDiagram.getName(), true);
+ final Diagram newDiagram = createDiagram(bpmnDiagram.getName());
final IFeatureProvider featureProvider = dtp.getFeatureProvider();
final Resource resource = dtp.getDiagram().eResource();
TransactionalEditingDomain domain = editor.getEditingDomain();
@@ -242,6 +387,21 @@ public class DIUtils {
return newDiagram;
}
+ public static Diagram createDiagram(String diagramName) {
+ final Diagram diagram = Graphiti.getPeCreateService().createDiagram("BPMN2", diagramName, true); //$NON-NLS-1$
+ Bpmn2Preferences prefs = Bpmn2Preferences.getInstance();
+ ShapeStyle ss = prefs.getShapeStyle(ShapeStyle.Category.GRID);
+ diagram.setGridUnit(ss.getDefaultWidth());
+ diagram.setVerticalGridUnit(ss.getDefaultHeight());
+ diagram.setSnapToGrid(ss.getSnapToGrid());
+ GraphicsAlgorithm ga = diagram.getGraphicsAlgorithm();
+ IGaService gaService = Graphiti.getGaService();
+ ga.setForeground(gaService.manageColor(diagram, ss.getShapeForeground()));
+ ss = prefs.getShapeStyle(ShapeStyle.Category.CANVAS);
+ ga.setBackground(gaService.manageColor(diagram, ss.getShapeBackground()));
+ return diagram;
+ }
+
/**
* Find the Graphiti Diagram that corresponds to the given BPMNDiagram object.
*
@@ -396,7 +556,7 @@ public class DIUtils {
Resource resource = definitions.eResource();
BPMNDiagram bpmnDiagram = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
ModelUtil.setID(bpmnDiagram, resource);
- bpmnDiagram.setName(ModelUtil.getDisplayName(container));
+ bpmnDiagram.setName(ExtendedPropertiesProvider.getTextValue(container));
BPMNPlane plane = BpmnDiFactory.eINSTANCE.createBPMNPlane();
ModelUtil.setID(plane, resource);
@@ -418,14 +578,16 @@ public class DIUtils {
*/
public static BPMNShape findBPMNShape(BaseElement baseElement) {
Definitions definitions = ModelUtil.getDefinitions(baseElement);
- for (BPMNDiagram d : definitions.getDiagrams()) {
- BPMNDiagram bpmnDiagram = (BPMNDiagram)d;
- BaseElement bpmnElement = null;
- for (DiagramElement de : bpmnDiagram.getPlane().getPlaneElement()) {
- if (de instanceof BPMNShape) {
- bpmnElement = ((BPMNShape)de).getBpmnElement();
- if (bpmnElement == baseElement)
- return (BPMNShape)de;
+ if (definitions!=null) {
+ for (BPMNDiagram d : definitions.getDiagrams()) {
+ BPMNDiagram bpmnDiagram = (BPMNDiagram)d;
+ BaseElement bpmnElement = null;
+ for (DiagramElement de : bpmnDiagram.getPlane().getPlaneElement()) {
+ if (de instanceof BPMNShape) {
+ bpmnElement = ((BPMNShape)de).getBpmnElement();
+ if (bpmnElement == baseElement)
+ return (BPMNShape)de;
+ }
}
}
}
@@ -484,6 +646,79 @@ public class DIUtils {
return null;
}
+ public static boolean deleteContainerIfPossible(RootElement rootElement) {
+ if (rootElement==null)
+ return false;
+
+ boolean canDelete = false;
+ Definitions definitions = (Definitions)rootElement.eContainer();
+ // check if this thing has already been deleted (eContainer == null)
+ if (definitions!=null) {
+ BPMNDiagram bpmnDiagram = DIUtils.findBPMNDiagram(rootElement);
+ RootElement newRootElement = null;
+ if (bpmnDiagram==null) {
+ List<EObject> allObjects = new ArrayList<EObject>();
+ Map<EObject, Collection<EStructuralFeature.Setting>> usages;
+ TreeIterator<EObject> iter = definitions.eAllContents();
+ while (iter.hasNext())
+ allObjects.add(iter.next());
+
+ usages = UsageCrossReferencer.findAll(allObjects, rootElement);
+ canDelete = usages.isEmpty();
+ }
+ else {
+ // find a replacement for the BPMNDiagram target element
+ for (RootElement r : definitions.getRootElements()) {
+ if (r!=rootElement && (r instanceof FlowElementsContainer || r instanceof Collaboration)) {
+ if (rootElement instanceof Collaboration) {
+ Collaboration collaboration = (Collaboration) rootElement;
+ if (collaboration.getParticipants().isEmpty()) {
+ newRootElement = r;
+ canDelete = true;
+ break;
+ }
+
+ }
+ else if (rootElement instanceof FlowElementsContainer) {
+ FlowElementsContainer container = (FlowElementsContainer) rootElement;
+ if (container.getFlowElements().isEmpty()) {
+ newRootElement = r;
+ canDelete = true;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ if (canDelete) {
+ EcoreUtil.delete(rootElement);
+ if (bpmnDiagram!=null && newRootElement!=null)
+ bpmnDiagram.getPlane().setBpmnElement(newRootElement);
+ }
+ }
+ return canDelete;
+ }
+
+ public static void updateDiagramType(Diagram diagram) {
+ BPMNDiagram bpmnDiagram = BusinessObjectUtil.getFirstElementOfType(diagram, BPMNDiagram.class);
+ if (bpmnDiagram!=null && bpmnDiagram.getPlane()!=null) {
+ BaseElement bpmnElement = bpmnDiagram.getPlane().getBpmnElement();
+ if (bpmnElement==null) {
+ // this BPMNDiagram has had its bpmnElement deleted.
+ // make it point to the first valid RootElement.
+ Definitions definitions = ModelUtil.getDefinitions(bpmnDiagram);
+ for (RootElement r : definitions.getRootElements()) {
+ if (r instanceof FlowElementsContainer || r instanceof Collaboration) {
+ bpmnDiagram.getPlane().setBpmnElement(r);
+ break;
+ }
+ }
+ }
+ }
+ }
+
/**
* Returns a list of all PictogramElements that reference the given BaseElement in all Graphiti Diagrams
* contained in all Resources of the given ResourceSet
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTree.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTree.java
index a47fe89a..4eff7b29 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTree.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTree.java
@@ -13,7 +13,7 @@ package org.eclipse.bpmn2.modeler.core.di;
import java.util.List;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -92,7 +92,7 @@ public class DiagramElementTree
String text = Messages.DiagramElementTree_Unknown_Element;
if (element instanceof DiagramElementTreeNode) {
BaseElement be = ((DiagramElementTreeNode)element).getBaseElement();
- text = be.eClass().getName() + ": " + ModelUtil.getDisplayName(be); //$NON-NLS-1$
+ text = be.eClass().getName() + ": " + ExtendedPropertiesProvider.getTextValue(be); //$NON-NLS-1$
}
return text;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTreeNode.java
index 434c6135..269dd5c7 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/DiagramElementTreeNode.java
@@ -16,9 +16,9 @@ import java.util.List;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.emf.ecore.EObject;
+import org.eclipse.bpmn2.modeler.core.utils.SimpleTreeIterator;
-public class DiagramElementTreeNode implements Iterable<DiagramElementTreeNode> {
+public class DiagramElementTreeNode extends SimpleTreeIterator<DiagramElementTreeNode> {
private static List<DiagramElementTreeNode> EMPTY = new ArrayList<DiagramElementTreeNode>();
private DiagramElementTreeNode parent;
private BaseElement baseElement;
@@ -129,52 +129,8 @@ public class DiagramElementTreeNode implements Iterable<DiagramElementTreeNode>
return EMPTY;
}
- /*
- * A simple depth-first tree iterator
- */
@Override
public Iterator<DiagramElementTreeNode> iterator() {
- return new Iterator<DiagramElementTreeNode>() {
- int iteratorIndex = -1;
- int childIndex = 0;
- List<Iterator<DiagramElementTreeNode>> iterators;
-
- @Override
- public boolean hasNext() {
- if (!hasChildren())
- return false;
-
- if (iteratorIndex==-1) {
- iteratorIndex = 0;
- iterators = new ArrayList<Iterator<DiagramElementTreeNode>>();
- for (DiagramElementTreeNode child : children) {
- iterators.add(child.iterator());
- }
- }
- return iteratorIndex<iterators.size() || childIndex<children.size();
- }
-
- @Override
- public DiagramElementTreeNode next() {
- if (!hasChildren())
- return null;
- while (iteratorIndex<iterators.size()) {
- Iterator<DiagramElementTreeNode> iter = iterators.get(iteratorIndex);
- if (iter.hasNext())
- return iter.next();
- ++iteratorIndex;
- }
- if (childIndex<children.size()) {
- return children.get(childIndex++);
- }
- return null;
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- };
+ return new TreeIterator(getChildren());
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/ImportDiagnostics.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/ImportDiagnostics.java
index e704ea1c..654ea562 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/ImportDiagnostics.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/ImportDiagnostics.java
@@ -140,10 +140,12 @@ public class ImportDiagnostics implements IStructuredContentProvider, ILabelProv
String name = ""; //$NON-NLS-1$
String customTaskId = ""; //$NON-NLS-1$
if (runtime!=null) {
- for (CustomTaskDescriptor tc : runtime.getCustomTasks()) {
- customTaskId = tc.getFeatureContainer().getId(element);
- if (customTaskId==null)
- customTaskId = ""; //$NON-NLS-1$
+ for (CustomTaskDescriptor ctd : runtime.getCustomTaskDescriptors()) {
+ String cid = ctd.getFeatureContainer().getId(element);
+ if (ctd.getId().equals(cid)) {
+ customTaskId = cid;
+ break;
+ }
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/Messages.java
index 6aa4ecee..3f59cc5e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.di;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/MissingDIElementsDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/MissingDIElementsDialog.java
index 8f467e35..8f467e35 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/MissingDIElementsDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/MissingDIElementsDialog.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/messages.properties
index b2aa3147..16b8356c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/di/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
DiagramElementTree_Unknown_Element=Unknown BPMN Element
DIGenerator_No_Diagram=Cannot find Diagram
DIImport_Dependency_not_found=Dependency not found
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddFeature.java
index 181c0917..7de62ef7 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddElementFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2AddFeature.java
@@ -12,41 +12,33 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features;
-import java.io.IOException;
-
-import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.EndEvent;
import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.di.BpmnDiFactory;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.di.DIImport;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractCreateFlowFeature;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.dd.dc.Bounds;
-import org.eclipse.dd.dc.DcFactory;
-import org.eclipse.dd.dc.Point;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.IExecutionInfo;
import org.eclipse.graphiti.datatypes.ILocation;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.IReconnectionFeature;
+import org.eclipse.graphiti.features.context.IAddConnectionContext;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.ITargetContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
@@ -54,6 +46,9 @@ import org.eclipse.graphiti.features.context.impl.CreateConnectionContext;
import org.eclipse.graphiti.features.context.impl.LayoutContext;
import org.eclipse.graphiti.features.context.impl.ReconnectionContext;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.features.impl.AbstractAddPictogramElementFeature;
+import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
@@ -62,15 +57,53 @@ import org.eclipse.graphiti.mm.pictograms.FixPointAnchor;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.ILayoutService;
+import org.eclipse.graphiti.services.IPeService;
+
+/**
+ * This is the Graphiti {@code AddFeature} base class for all BPMN2 model elements which
+ * are associated with BPMN DI elements.
+ * <p>
+ * This class adds support for managing BPMN DI elements, i.e. BPMNShape and
+ * BPMNEdge.
+ * <p>
+ * Note that the BPMNLabel element is not yet supported, but will be added in a
+ * future release. For now, graphical shapes with labels are supported
+ * indirectly outside the scope of BPMN DI.
+ *
+ * @param <T> the generic type, a subclass of {@link BaseElement}
+ */
+public abstract class AbstractBpmn2AddFeature<T extends BaseElement>
+ extends AbstractAddPictogramElementFeature {
+
+ /** The ga service. */
+ protected final static IGaService gaService = Graphiti.getGaService();
+
+ /** The pe service. */
+ protected final static IPeService peService = Graphiti.getPeService();
-public abstract class AbstractBpmn2AddElementFeature<T extends BaseElement>
- extends AbstractBpmn2AddFeature<T> {
+ /** The preferences. */
+ protected Bpmn2Preferences preferences;
- public AbstractBpmn2AddElementFeature(IFeatureProvider fp) {
+ /**
+ * Instantiates a new AddFeature.
+ *
+ * @param fp the Feature Provider instance
+ */
+ public AbstractBpmn2AddFeature(IFeatureProvider fp) {
super(fp);
+ preferences = Bpmn2Preferences.getInstance(getDiagram());
}
+ public abstract IAddFeature getAddLabelFeature(IFeatureProvider fp);
+
+ /**
+ * Find the BPMNShape that references the given {@code BaseElement}.
+ *
+ * @param elem the BaseElement
+ * @return the BPMNShape object if found or null if it has not been created yet.
+ */
protected BPMNShape findDIShape(BaseElement elem) {
try {
return DIUtils.findBPMNShape(elem);
@@ -80,99 +113,46 @@ public abstract class AbstractBpmn2AddElementFeature<T extends BaseElement>
return null;
}
- protected BPMNShape createDIShape(Shape gShape, BaseElement elem, boolean applyDefaults) {
- return createDIShape(gShape, elem, findDIShape(elem), applyDefaults);
- }
-
- protected BPMNShape createDIShape(Shape shape, BaseElement elem, BPMNShape bpmnShape, boolean applyDefaults) {
- ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
- if (bpmnShape == null) {
- int x = loc.getX();
- int y = loc.getY();
- int w = shape.getGraphicsAlgorithm().getWidth();
- int h = shape.getGraphicsAlgorithm().getHeight();
- bpmnShape = DIUtils.createDIShape(shape, elem, x, y, w, h, getFeatureProvider(), getDiagram());
- }
- else {
- link(shape, new Object[] { elem, bpmnShape });
- }
+ /**
+ * Creates a BPMNShape if it does not already exist, and then links it to
+ * the given {@code BaseElement}.
+ *
+ * @param shape the Container Shape
+ * @param elem the BaseElement
+ * @param applyDefaults if true, apply User Preference defaults for certain
+ * BPMN DI attributes, e.g. isHorizontal, isExpanded, etc.
+ * @return the BPMNShape
+ */
+ protected BPMNShape createDIShape(Shape shape, BaseElement elem, boolean applyDefaults) {
+ BPMNShape bpmnShape = DIUtils.createDIShape(shape, elem, findDIShape(elem), getFeatureProvider());
if (applyDefaults && bpmnShape!=null)
- Bpmn2Preferences.getInstance(bpmnShape.eResource()).applyBPMNDIDefaults(bpmnShape, null);
+ preferences.applyBPMNDIDefaults(bpmnShape, null);
return bpmnShape;
}
- protected BPMNEdge createDIEdge(Connection connection, BaseElement conElement) {
- try {
- BPMNEdge edge = DIUtils.findBPMNEdge(conElement);
- return createDIEdge(connection, conElement, edge);
- } catch (IOException e) {
- Activator.logError(e);
- }
- return null;
+ /**
+ * Creates a BPMNEdge if it does not already exist, and then links it to
+ * the given {@code BaseElement}.
+ *
+ * @param connection the connection
+ * @param elem the BaseElement
+ * @return the BPMNEdge
+ */
+ protected BPMNEdge createDIEdge(Connection connection, BaseElement elem) {
+ BPMNEdge edge = DIUtils.findBPMNEdge(elem);
+ return DIUtils.createDIEdge(connection, elem, edge, getFeatureProvider());
}
- // TODO: move this to DIUtils
- protected BPMNEdge createDIEdge(Connection connection, BaseElement conElement, BPMNEdge edge) throws IOException {
- if (edge == null) {
- EList<EObject> businessObjects = Graphiti.getLinkService().getLinkForPictogramElement(getDiagram())
- .getBusinessObjects();
- for (EObject eObject : businessObjects) {
- if (eObject instanceof BPMNDiagram) {
- BPMNDiagram bpmnDiagram = (BPMNDiagram) eObject;
-
- edge = BpmnDiFactory.eINSTANCE.createBPMNEdge();
-// edge.setId(EcoreUtil.generateUUID());
- edge.setBpmnElement(conElement);
-
- if (conElement instanceof Association) {
- edge.setSourceElement(DIUtils.findDiagramElement(
- ((Association) conElement).getSourceRef()));
- edge.setTargetElement(DIUtils.findDiagramElement(
- ((Association) conElement).getTargetRef()));
- } else if (conElement instanceof MessageFlow) {
- edge.setSourceElement(DIUtils.findDiagramElement(
- (BaseElement) ((MessageFlow) conElement).getSourceRef()));
- edge.setTargetElement(DIUtils.findDiagramElement(
- (BaseElement) ((MessageFlow) conElement).getTargetRef()));
- } else if (conElement instanceof SequenceFlow) {
- edge.setSourceElement(DIUtils.findDiagramElement(
- ((SequenceFlow) conElement).getSourceRef()));
- edge.setTargetElement(DIUtils.findDiagramElement(
- ((SequenceFlow) conElement).getTargetRef()));
- }
-
- ILocation sourceLoc = Graphiti.getPeService().getLocationRelativeToDiagram(connection.getStart());
- ILocation targetLoc = Graphiti.getPeService().getLocationRelativeToDiagram(connection.getEnd());
-
- Point point = DcFactory.eINSTANCE.createPoint();
- point.setX(sourceLoc.getX());
- point.setY(sourceLoc.getY());
- edge.getWaypoint().add(point);
-
- point = DcFactory.eINSTANCE.createPoint();
- point.setX(targetLoc.getX());
- point.setY(targetLoc.getY());
- edge.getWaypoint().add(point);
-
- DIUtils.addShape(edge, bpmnDiagram);
- ModelUtil.setID(edge);
- }
- }
- }
- link(connection, new Object[] { conElement, edge });
- return edge;
- }
-
- protected void prepareAddContext(IAddContext context, PictogramElement labelOwner, int width, int height) {
- context.putProperty(ContextConstants.LABEL_CONTEXT, true);
- context.putProperty(ContextConstants.WIDTH, width);
- context.putProperty(ContextConstants.HEIGHT, height);
- context.putProperty(ContextConstants.BUSINESS_OBJECT, getBusinessObject(context));
- context.putProperty(ContextConstants.LABEL_OWNER, labelOwner);
- }
-
+ /**
+ * Adjust the location of a newly constructed shape so that its center is at
+ * the mouse cursor position.
+ *
+ * @param context the AddContext
+ * @param width the new shape's width
+ * @param height the new shape's height
+ */
protected void adjustLocation(IAddContext context, int width, int height) {
- if (context.getProperty(DIImport.IMPORT_PROPERTY) != null) {
+ if (DIImport.isImporting(context)) {
return;
}
@@ -187,8 +167,19 @@ public abstract class AbstractBpmn2AddElementFeature<T extends BaseElement>
((AddContext)context).setX(x);
}
+ /**
+ * Split a connection. This is used when a shape is dropped onto a
+ * connection; the target of the original connection is attached to the new
+ * shape, and a new connection is created that connects the new shape to the
+ * old connection's target.
+ *
+ * @param context the AddContext for the new shape. This will have the
+ * target connection which needs to be split
+ * @param containerShape the new container shape that was dropped onto the
+ * connection
+ */
protected void splitConnection(IAddContext context, ContainerShape containerShape) {
- if (context.getProperty(DIImport.IMPORT_PROPERTY) != null) {
+ if (context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null) {
return;
}
@@ -271,32 +262,84 @@ public abstract class AbstractBpmn2AddElementFeature<T extends BaseElement>
}
}
+ /**
+ * Gets the height of a new shape based on User Preferences. If the shape is a copy of
+ * another shape, the height of the copied shape is used.
+ *
+ * @param context the AddContext for the new shape
+ * @return the height
+ */
protected int getHeight(IAddContext context) {
- Object copiedBpmnShape = context.getProperty(DefaultPasteBPMNElementFeature.COPIED_BPMN_SHAPE);
+ Object copiedBpmnShape = context.getProperty(GraphitiConstants.COPIED_BPMN_SHAPE);
if (copiedBpmnShape instanceof BPMNShape) {
Bounds b = ((BPMNShape)copiedBpmnShape).getBounds();
if (b!=null)
return (int) b.getHeight();
}
- return context.getHeight() > 0 ? context.getHeight() :
- (isHorizontal(context) ? getHeight() : getWidth());
+ if (context.getHeight() > 0)
+ return context.getHeight();
+ int h = getHeight();
+ int w = getWidth();
+ if (!isHorizontal(context)) {
+ return Math.max(w, h);
+ }
+ return Math.min(w, h);
}
+ /**
+ * Gets the width of a new shape based on User Preferences. If the shape is a copy of
+ * another shape, the width of the copied shape is used.
+ *
+ * @param context the AddContext for the new shape
+ * @return the width
+ */
protected int getWidth(IAddContext context) {
- Object copiedBpmnShape = context.getProperty(DefaultPasteBPMNElementFeature.COPIED_BPMN_SHAPE);
+ Object copiedBpmnShape = context.getProperty(GraphitiConstants.COPIED_BPMN_SHAPE);
if (copiedBpmnShape instanceof BPMNShape) {
Bounds b = ((BPMNShape)copiedBpmnShape).getBounds();
if (b!=null)
return (int) b.getWidth();
}
- return context.getWidth() > 0 ? context.getWidth() :
- (isHorizontal(context) ? getWidth() : getHeight());
+ if (context.getWidth() > 0)
+ return context.getWidth();
+ int h = getHeight();
+ int w = getWidth();
+ if (isHorizontal(context)) {
+ return Math.max(w, h);
+ }
+ return Math.min(w, h);
+ }
+
+ /**
+ * Gets the height.
+ *
+ * @return the height
+ */
+ private int getHeight() {
+ ShapeStyle ss = preferences.getShapeStyle(getBusinessObjectType());
+ return ss.getDefaultHeight();
+ }
+
+ /**
+ * Gets the width.
+ *
+ * @return the width
+ */
+ private int getWidth() {
+ ShapeStyle ss = preferences.getShapeStyle(getBusinessObjectType());
+ return ss.getDefaultWidth();
}
+ /**
+ * Checks User Preferences if horizontal layout is preferred.
+ *
+ * @param context the context
+ * @return true, if is horizontal
+ */
protected boolean isHorizontal(ITargetContext context) {
- if (context.getProperty(DIImport.IMPORT_PROPERTY) == null) {
+ if (context.getProperty(GraphitiConstants.IMPORT_PROPERTY) == null) {
// not importing - set isHorizontal to be the same as copied element or parent
- Object copiedBpmnShape = context.getProperty(DefaultPasteBPMNElementFeature.COPIED_BPMN_SHAPE);
+ Object copiedBpmnShape = context.getProperty(GraphitiConstants.COPIED_BPMN_SHAPE);
if (copiedBpmnShape instanceof BPMNShape) {
return ((BPMNShape)copiedBpmnShape).isIsHorizontal();
}
@@ -314,38 +357,77 @@ public abstract class AbstractBpmn2AddElementFeature<T extends BaseElement>
return laneShape.isIsHorizontal();
}
}
- return Bpmn2Preferences.getInstance(context.getTargetContainer()).isHorizontalDefault();
+ return preferences.isHorizontalDefault();
}
-
- public abstract int getHeight();
- public abstract int getWidth();
- @Override
+ public abstract Class<? extends BaseElement> getBusinessObjectType();
+
public T getBusinessObject(IAddContext context) {
- Object businessObject = context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ Object businessObject = context.getProperty(GraphitiConstants.BUSINESS_OBJECT);
if (businessObject instanceof BaseElement)
return (T)businessObject;
return (T)context.getNewObject();
}
- @Override
public void putBusinessObject(IAddContext context, T businessObject) {
- context.putProperty(ContextConstants.BUSINESS_OBJECT, businessObject);
+ context.putProperty(GraphitiConstants.BUSINESS_OBJECT, businessObject);
}
- @Override
public void postExecute(IExecutionInfo executionInfo) {
}
+
+ /**
+ * Helper function to return the GraphicsAlgorithm for a ContainerShape created by
+ * one of the BPMN2 Modeler's Add features. This can be used by subclasses to decorate
+ * the figure on the diagram.
+ *
+ * @param containerShape the container shape
+ * @return the graphics algorithm
+ */
+ protected static GraphicsAlgorithmContainer getGraphicsAlgorithm(ContainerShape containerShape) {
+ if (containerShape.getGraphicsAlgorithm() instanceof RoundedRectangle)
+ return containerShape.getGraphicsAlgorithm();
+ if (containerShape.getChildren().size()>0) {
+ Shape shape = containerShape.getChildren().get(0);
+ return shape.getGraphicsAlgorithm();
+ }
+ return null;
+ }
/**
+ * Decorate connection. This is a placeholder for the hook function invoked
+ * when the connection is added to the diagram. Implementations can override
+ * this to change the appearance of the connection.
+ *
+ * @param context the Add Context
+ * @param connection the connection being added
+ * @param businessObject the business object, a {@code BaseElement} subclass.
+ */
+ protected void decorateConnection(IAddConnectionContext context, Connection connection, T businessObject) {
+ }
+
+ /**
+ * Decorate shape. This is a placeholder for the hook function invoked when
+ * the shape is added to the diagram. Implementations can override this to
+ * change the appearance of the shape.
+ *
+ * @param context the Add Context
+ * @param containerShape the container shape being added
+ * @param businessObject the business object, a {@code BaseElement} subclass.
+ */
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject) {
+ ShapeDecoratorUtil.createValidationDecorator(containerShape);
+ }
+
+ /**
* Update the given PictogramElement. A Graphiti UpdateContext is constructed by copying
* the properties from the given AddContext.
*
- * @param addContext - the Graphiti AddContext that was used to add the PE to the Diagram
- * @param pe - the PictogramElement
+ * @param addContext the Graphiti AddContext that was used to add the PE to the Diagram
+ * @param pe the PictogramElement
* @return a reason code indicating whether or not an update is needed.
*/
- protected IReason updatePictogramElement(IAddContext addContext, PictogramElement pe) {
+ public IReason updatePictogramElement(IAddContext addContext, PictogramElement pe) {
UpdateContext updateContext = new UpdateContext(pe);
for (Object key : addContext.getPropertyKeys()) {
Object value = addContext.getProperty(key);
@@ -358,11 +440,11 @@ public abstract class AbstractBpmn2AddElementFeature<T extends BaseElement>
* Layout the given PictogramElement. A Graphiti LayoutContext is constructed by copying
* the properties from the given AddContext.
*
- * @param addContext - the Graphiti AddContext that was used to add the PE to the Diagram
- * @param pe - the PictogramElement
+ * @param addContext the Graphiti AddContext that was used to add the PE to the Diagram
+ * @param pe the PictogramElement
* @return a reason code indicating whether or not a layout is needed.
*/
- protected IReason layoutPictogramElement(IAddContext addContext, PictogramElement pe) {
+ public IReason layoutPictogramElement(IAddContext addContext, PictogramElement pe) {
LayoutContext layoutContext = new LayoutContext(pe);
for (Object key : addContext.getPropertyKeys()) {
Object value = addContext.getProperty(key);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateConnectionFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateConnectionFeature.java
index 9d0b1fc5..a269f8cb 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateConnectionFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateConnectionFeature.java
@@ -21,15 +21,16 @@ import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.Group;
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.ICustomElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditingDialog;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -40,23 +41,33 @@ import org.eclipse.graphiti.features.IFeatureAndContext;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.features.context.IReconnectionContext;
import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
+import org.eclipse.graphiti.features.context.impl.CreateConnectionContext;
import org.eclipse.graphiti.features.context.impl.ReconnectionContext;
import org.eclipse.graphiti.features.impl.AbstractCreateConnectionFeature;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.osgi.util.NLS;
/**
- * This is the Create Feature base class for all BPMN2 model elements which are considered "connections"
- * e.g. Sequence Flows, Associations, Message Flows and Conversation Links
+ * This is the Graphiti CreateFeature base class for all BPMN2 model elements which are
+ * considered "connections" e.g. {@link org.eclipse.bpmn2.SequenceFlow}, {@link org.eclipse.bpmn2.Association},
+ * {@link org.eclipse.bpmn2.MessageFlow} and {@link org.eclipse.bpmn2.ConversationLink}
*
- * The Type Parameter "CONNECTION" is the BPMN2 element class, "SOURCE" is the BPMN2 class of the source object of
- * the connection, "TARGET" is the BPMN2 class of the connection target object.
+ * The Type Parameter "CONNECTION" is the BPMN2 element class, "SOURCE" is the
+ * BPMN2 class of the source object of the connection, "TARGET" is the BPMN2
+ * class of the connection target object.
+ *
+ * @param <CONNECTION> the generic type for the BPMN2 connection
+ * @param <SOURCE> the generic type for the BPMN2 source element
+ * @param <TARGET> the generic type for the BPMN2 target element
*/
public abstract class AbstractBpmn2CreateConnectionFeature<
CONNECTION extends BaseElement,
@@ -65,19 +76,44 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
extends AbstractCreateConnectionFeature
implements IBpmn2CreateFeature<CONNECTION, ICreateConnectionContext> {
+ /** The changes done. */
protected boolean changesDone = true;
/**
- * Default constructor for this Create Feature
- *
+ * Default constructor for this Create Feature.
+ *
* @param fp - the BPMN2 Modeler Feature Provider
- * @link org.eclipse.bpmn2.modeler.ui.diagram.BPMNFeatureProvider
* @param name - name of the type of object being created
* @param description - description of the object being created
+ * @link org.eclipse.bpmn2.modeler.ui.diagram.BPMNFeatureProvider
+ */
+ public AbstractBpmn2CreateConnectionFeature(IFeatureProvider fp) {
+ super(fp, "", "");
+ }
+
+ public String getCreateName() {
+ // TODO: get name from Messages by generating a field name using the business object class
+ return ModelUtil.toCanonicalString(getFeatureClass().getName());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateDescription()
+ * This is displayed in the Edit -> Undo/Redo menu
*/
- public AbstractBpmn2CreateConnectionFeature(IFeatureProvider fp,
- String name, String description) {
- super(fp, name, description);
+ @Override
+ public String getCreateDescription() {
+ return NLS.bind(Messages.AbstractBpmn2CreateConnectionFeature_Create,
+ ModelUtil.toCanonicalString( getFeatureClass().getName()));
+ }
+
+ @Override
+ public String getName() {
+ return getCreateName();
+ }
+
+ @Override
+ public String getDescription() {
+ return getCreateDescription();
}
/* (non-Javadoc)
@@ -124,6 +160,17 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
return getSourceBo(context) != null;
}
+ /**
+ * Check if the connection is allowed.
+ * Only one connection of each type is allowed between the same source and target objects.
+ * Also enforce User Preference if only one incoming or outgoing connection is allowed.
+ *
+ * @param sourceContainer the source container
+ * @param targetContainer the target container
+ * @param connectionClass the connection class
+ * @param reconnectType the reconnect type
+ * @return true, if the connection is allowed
+ */
public static boolean canCreateConnection(AnchorContainer sourceContainer, AnchorContainer targetContainer, EClass connectionClass, String reconnectType) {
if (sourceContainer!=null && targetContainer!=null) {
// Make sure only one connection of each type is created for the same
@@ -187,16 +234,6 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
return false;
}
-
- /* (non-Javadoc)
- * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateDescription()
- * This is displayed in the Edit -> Undo/Redo menu
- */
- @Override
- public String getCreateDescription() {
- return NLS.bind(Messages.AbstractBpmn2CreateConnectionFeature_Create,
- ModelUtil.toDisplayName( getBusinessObjectClass().getName()));
- }
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#createBusinessObject(org.eclipse.graphiti.features.context.IContext)
@@ -204,9 +241,7 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public CONNECTION createBusinessObject(ICreateConnectionContext context) {
- PictogramElement sourcePe = context.getSourcePictogramElement();
- EObject container = BusinessObjectUtil.getBusinessObjectForPictogramElement(sourcePe);
- Resource resource = container.eResource();
+ Resource resource = getResource(context);
EClass eclass = getBusinessObjectClass();
ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eclass);
CONNECTION businessObject = (CONNECTION)adapter.getObjectDescriptor().createObject(resource,eclass);
@@ -226,6 +261,18 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
changesDone = true;
return businessObject;
}
+
+ protected Resource getResource(ICreateConnectionContext context) {
+ PictogramElement pe = context.getSourcePictogramElement();
+ if (pe==null)
+ pe = context.getTargetPictogramElement();
+ if (pe==null)
+ pe = context.getSourceAnchor();
+ if (pe==null)
+ pe = context.getTargetAnchor();
+ EObject bo = BusinessObjectUtil.getBusinessObjectForPictogramElement(pe);
+ return bo.eResource();
+ }
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#getBusinessObject(org.eclipse.graphiti.features.context.IContext)
@@ -233,7 +280,7 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
*/
@SuppressWarnings("unchecked")
public CONNECTION getBusinessObject(ICreateConnectionContext context) {
- return (CONNECTION) context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ return (CONNECTION) context.getProperty(GraphitiConstants.BUSINESS_OBJECT);
}
/* (non-Javadoc)
@@ -242,13 +289,20 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
* If the object is a Custom Element, it is initialized as defined in the extension plugin's plugin.xml
*/
public void putBusinessObject(ICreateConnectionContext context, CONNECTION businessObject) {
- context.putProperty(ContextConstants.BUSINESS_OBJECT, businessObject);
- String id = (String)context.getProperty(ICustomElementFeatureContainer.CUSTOM_ELEMENT_ID);
+ context.putProperty(GraphitiConstants.BUSINESS_OBJECT, businessObject);
+ String id = (String)context.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
if (id!=null) {
TargetRuntime rt = TargetRuntime.getCurrentRuntime();
CustomTaskDescriptor ctd = rt.getCustomTask(id);
- ctd.populateObject(businessObject, businessObject.eResource(), true);
+ ctd.populateObject(businessObject, getResource(context), true);
}
+
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.BUSINESSOBJECT_INITIALIZED,
+ getFeatureProvider(), context, businessObject));
+ }
+
+ public EClass getFeatureClass() {
+ return getBusinessObjectClass();
}
/* (non-Javadoc)
@@ -272,17 +326,24 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
}
}
+ /**
+ * Creates and prepares a new AddConnectionContext from a CreateConnectionContext.
+ *
+ * @param context the CreateConnectionContext
+ * @param newObject the new object, must be a BPMN2 connection object (see class description)
+ * @return a new AddConnectionContext
+ */
protected AddConnectionContext createAddConnectionContext(ICreateConnectionContext context, Object newObject) {
AddConnectionContext newContext = new AddConnectionContext(context.getSourceAnchor(), context.getTargetAnchor());
newContext.setNewObject(newObject);
// copy properties into the new context
- Object value = context.getProperty(ICustomElementFeatureContainer.CUSTOM_ELEMENT_ID);
- newContext.putProperty(ICustomElementFeatureContainer.CUSTOM_ELEMENT_ID, value);
- value = context.getProperty(DIImport.IMPORT_PROPERTY);
- newContext.putProperty(DIImport.IMPORT_PROPERTY, value);
- value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- newContext.putProperty(ContextConstants.BUSINESS_OBJECT, value);
+ Object value = context.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
+ newContext.putProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, value);
+ value = context.getProperty(GraphitiConstants.IMPORT_PROPERTY);
+ newContext.putProperty(GraphitiConstants.IMPORT_PROPERTY, value);
+ value = context.getProperty(GraphitiConstants.BUSINESS_OBJECT);
+ newContext.putProperty(GraphitiConstants.BUSINESS_OBJECT, value);
return newContext;
}
@@ -300,6 +361,12 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
return false;
}
+ /**
+ * Checks if is model object enabled.
+ *
+ * @param o the o
+ * @return true, if is model object enabled
+ */
protected boolean isModelObjectEnabled(EObject o) {
ModelEnablements me = getModelEnablements();
if (me!=null) {
@@ -309,11 +376,19 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
return false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#hasDoneChanges()
+ */
@Override
public boolean hasDoneChanges() {
return changesDone;
}
+ /**
+ * Gets the model enablements.
+ *
+ * @return the model enablements
+ */
protected ModelEnablements getModelEnablements() {
DiagramEditor editor = (DiagramEditor) getDiagramEditor();
return (ModelEnablements) editor.getAdapter(ModelEnablements.class);
@@ -327,12 +402,25 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
* @return true if the source is valid, false if not.
*/
protected SOURCE getSourceBo(ICreateConnectionContext context) {
- if (context.getSourceAnchor() != null) {
- return BusinessObjectUtil.getFirstElementOfType(context.getSourceAnchor().getParent(), getSourceClass());
+ Anchor a = getSourceAnchor(context);
+ if (a != null) {
+ return BusinessObjectUtil.getFirstElementOfType(a.getParent(), getSourceClass());
}
return null;
}
+ protected Anchor getSourceAnchor(ICreateConnectionContext context) {
+ Anchor a = context.getSourceAnchor();
+ PictogramElement pe = context.getSourcePictogramElement();
+ if (a==null && FeatureSupport.isLabelShape(pe)) {
+ pe = FeatureSupport.getLabelOwner(pe);
+ ((CreateConnectionContext)context).setSourcePictogramElement(pe);
+ a = Graphiti.getPeService().getChopboxAnchor((AnchorContainer) pe);
+ ((CreateConnectionContext)context).setSourceAnchor(a);
+ }
+ return a;
+ }
+
/**
* Returns the business object for the connection target shape. If the target object is not valid
* for this connection type, return null.
@@ -341,16 +429,47 @@ public abstract class AbstractBpmn2CreateConnectionFeature<
* @return true if the target is valid, false if not.
*/
protected TARGET getTargetBo(ICreateConnectionContext context) {
- if (context.getTargetAnchor() != null) {
- return BusinessObjectUtil.getFirstElementOfType(context.getTargetAnchor().getParent(), getTargetClass());
+ Anchor a = getTargetAnchor(context);
+ if (a != null) {
+ return BusinessObjectUtil.getFirstElementOfType(a.getParent(), getTargetClass());
}
return null;
}
/**
- * Implementation classes must override these to provide the BPMN2 object source and target classes that are valid for this connection.
+ * Gets the Target Anchor. This does the translation from a Label shape to its owner.
+ *
+ * @param context
+ * @return
+ */
+ protected Anchor getTargetAnchor(ICreateConnectionContext context) {
+ Anchor a = context.getTargetAnchor();
+ PictogramElement pe = context.getTargetPictogramElement();
+ if (a==null && FeatureSupport.isLabelShape(pe)) {
+ pe = FeatureSupport.getLabelOwner(pe);
+ ((CreateConnectionContext)context).setTargetPictogramElement(pe);
+ a = Graphiti.getPeService().getChopboxAnchor((AnchorContainer) pe);
+ ((CreateConnectionContext)context).setTargetAnchor(a);
+ }
+ return a;
+ }
+
+ /**
+ * Gets the source object type.
+ * Implementation classes must override this method to provide the BPMN2
+ * object source and target classes that are valid for this connection.
+ *
+ * @return the source class
*/
protected abstract Class<SOURCE> getSourceClass();
+
+ /**
+ * Gets the target object type.
+ * Implementation classes must override this method to provide the BPMN2
+ * object source and target classes that are valid for this connection.
+ *
+ * @return the target class
+ */
protected abstract Class<TARGET> getTargetClass();
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateFeature.java
index 6cb36171..f63463fd 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2CreateFeature.java
@@ -14,13 +14,15 @@
package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Collaboration;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.ToolTipProvider;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.ICustomElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditingDialog;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
-import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
@@ -34,32 +36,66 @@ import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
import org.eclipse.graphiti.features.impl.AbstractCreateFeature;
-import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.osgi.util.NLS;
/**
- * This is the Create Feature base class for all BPMN2 model elements which are considered "shapes"
- * e.g. Activities, Data Objects, Gateways, Events, etc.
+ * This is the Graphiti CreateFeature base class for all BPMN2 model elements which are considered "shapes"
+ * e.g. {@link org.eclipse.bpmn2.Activity}, {@link org.eclipse.bpmn2.DataObject}, {@link org.eclipse.bpmn2.Gateway},
+ * {@link org.eclipse.bpmn2.Event}, etc.
*
* The Type Parameter "T" is the BPMN2 element class.
+ *
+ * @param <T> the generic type of the BPMN2 element
*/
public abstract class AbstractBpmn2CreateFeature<T extends BaseElement>
extends AbstractCreateFeature
implements IBpmn2CreateFeature<T, ICreateContext> {
+ /** The changes done. */
protected boolean changesDone = true;
/**
- * Default constructor for this Create Feature
- *
- * @param fp - the BPMN2 Modeler Feature Provider
- * @link org.eclipse.bpmn2.modeler.ui.diagram.BPMNFeatureProvider
- * @param name - name of the type of object being created
- * @param description - description of the object being created
+ * Default constructor for this Create Feature. The name and description are
+ * generated by looking up the business object class name in the Messages
+ * class.
+ *
+ * @param fp the BPMN2 Modeler Feature Provider
+ * {@link org.eclipse.bpmn2.modeler.ui.diagram.BPMN2FeatureProvider}
*/
- public AbstractBpmn2CreateFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractBpmn2CreateFeature(IFeatureProvider fp) {
+ super(fp,"","");
+ }
+
+ @Override
+ public String getCreateName() {
+ // TODO: get name from Messages by generating a field name using the business object class
+ return ModelUtil.toCanonicalString(getFeatureClass().getName());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateDescription()
+ * This is displayed in the Edit -> Undo/Redo menu
+ */
+ @Override
+ public String getCreateDescription() {
+ // TODO: get description from Messages by generating a field name using the business object class
+ // {@see ExtendedPropertiesAdapter#getDescription()}
+ String description = ToolTipProvider.INSTANCE.getToolTip(this, getFeatureClass());
+ if (!description.isEmpty())
+ return description;
+ return NLS.bind(Messages.AbstractBpmn2CreateFeature_Create, ModelUtil.toCanonicalString(getFeatureClass().getName()));
+ }
+
+ @Override
+ public String getName() {
+ return getCreateName();
+ }
+
+ @Override
+ public String getDescription() {
+ return getCreateDescription();
}
/* (non-Javadoc)
@@ -71,39 +107,60 @@ public abstract class AbstractBpmn2CreateFeature<T extends BaseElement>
return isModelObjectEnabled();
}
- /* (non-Javadoc)
- * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateDescription()
- * This is displayed in the Edit -> Undo/Redo menu
- */
@Override
- public String getCreateDescription() {
- return NLS.bind(Messages.AbstractBpmn2CreateFeature_Create, ModelUtil.toDisplayName(getBusinessObjectClass().getName()));
+ public boolean canCreate(ICreateContext context) {
+ if (context.getTargetContainer().equals(getDiagram())) {
+ // Only Participants are allowed in a Conversation
+ BPMNDiagram bpmnDiagram = BusinessObjectUtil.getFirstElementOfType(getDiagram(), BPMNDiagram.class);
+ BaseElement bpmnElement = bpmnDiagram.getPlane().getBpmnElement();
+ if (bpmnElement instanceof Collaboration) {
+ // If this is a Collaboration and it already contains ConversationNodes
+ // then this is a Conversation Diagram - it can't contain any FlowNodes,
+ // Data items, or Lanes.
+ Collaboration collaboration = (Collaboration) bpmnElement;
+ if (!collaboration.getConversations().isEmpty()) {
+ return false;
+ }
+ }
+ }
+ // otherwise, we can create a Default Process
+ return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#createBusinessObject(org.eclipse.graphiti.features.context.IContext)
* Creates the business object, i.e. the BPMN2 element
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public T createBusinessObject(ICreateContext context) {
- Shape shape = context.getTargetContainer();
- EObject container = BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
- Resource resource = container.eResource();
+ Resource resource = getResource(context);
EClass eclass = getBusinessObjectClass();
ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eclass);
+ String id = (String)context.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
+ if (id!=null) {
+ adapter.setProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, id);
+ }
T businessObject = (T)adapter.getObjectDescriptor().createObject(resource,eclass);
putBusinessObject(context, businessObject);
changesDone = true;
return businessObject;
}
+ protected Resource getResource(ICreateContext context) {
+ PictogramElement pe = context.getTargetContainer();
+ if (pe==null)
+ pe = context.getTargetConnection();
+ EObject bo = BusinessObjectUtil.getBusinessObjectForPictogramElement(pe);
+ return bo.eResource();
+ }
+
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#getBusinessObject(org.eclipse.graphiti.features.context.IContext)
* Fetches the business object from the Create Context
*/
@SuppressWarnings("unchecked")
public T getBusinessObject(ICreateContext context) {
- return (T) context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ return (T) context.getProperty(GraphitiConstants.BUSINESS_OBJECT);
}
/* (non-Javadoc)
@@ -112,15 +169,30 @@ public abstract class AbstractBpmn2CreateFeature<T extends BaseElement>
* If the object is a Custom Element, it is initialized as defined in the extension plugin's plugin.xml
*/
public void putBusinessObject(ICreateContext context, T businessObject) {
- context.putProperty(ContextConstants.BUSINESS_OBJECT, businessObject);
- String id = (String)context.getProperty(ICustomElementFeatureContainer.CUSTOM_ELEMENT_ID);
- if (id!=null) {
- TargetRuntime rt = TargetRuntime.getCurrentRuntime();
- CustomTaskDescriptor ctd = rt.getCustomTask(id);
- ctd.populateObject(businessObject, businessObject.eResource(), true);
- }
+ context.putProperty(GraphitiConstants.BUSINESS_OBJECT, businessObject);
+
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.BUSINESSOBJECT_INITIALIZED,
+ getFeatureProvider(), context, businessObject));
+ }
+
+ public EClass getFeatureClass() {
+ return getBusinessObjectClass();
}
+ @Override
+ protected Object getBusinessObjectForPictogramElement(PictogramElement pe) {
+ // the Graphiti {@link
+ // org.eclipse.graphiti.features.impl.AbstractFeature#getBusinessObjectForPictogramElement()}
+ // will return null if the pictogram element is not "active". In some
+ // cases we also want to check
+ // the business object if the PE has not yet been realized {@see
+ // org.eclipse.bpmn2.modeler.core.features.CompoundCreateFeaturePart#canCreate(IContext)}
+ Object bo = super.getBusinessObjectForPictogramElement(pe);
+ if (bo!=null)
+ return bo;
+ return BusinessObjectUtil.getFirstBaseElement(pe);
+ }
+
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#postExecute(org.eclipse.graphiti.IExecutionInfo)
* Invoked after the graphic has been created to display an optional configuration dialog.
@@ -142,16 +214,23 @@ public abstract class AbstractBpmn2CreateFeature<T extends BaseElement>
}
}
+ /**
+ * Creates and prepares a new AddContext from a CreateContext.
+ *
+ * @param context the original CreateContext
+ * @param newObject the new object, a BPMN2 model object.
+ * @return the new AddContext
+ */
protected AddContext createAddContext(ICreateContext context, Object newObject) {
AddContext newContext = new AddContext(context, newObject);
// copy properties into the new context
- Object value = context.getProperty(ICustomElementFeatureContainer.CUSTOM_ELEMENT_ID);
- newContext.putProperty(ICustomElementFeatureContainer.CUSTOM_ELEMENT_ID, value);
- value = context.getProperty(DIImport.IMPORT_PROPERTY);
- newContext.putProperty(DIImport.IMPORT_PROPERTY, value);
- value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- newContext.putProperty(ContextConstants.BUSINESS_OBJECT, value);
+ Object value = context.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
+ newContext.putProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, value);
+ value = context.getProperty(GraphitiConstants.IMPORT_PROPERTY);
+ newContext.putProperty(GraphitiConstants.IMPORT_PROPERTY, value);
+ value = context.getProperty(GraphitiConstants.BUSINESS_OBJECT);
+ newContext.putProperty(GraphitiConstants.BUSINESS_OBJECT, value);
return newContext;
}
@@ -169,18 +248,32 @@ public abstract class AbstractBpmn2CreateFeature<T extends BaseElement>
return false;
}
- protected boolean isModelObjectEnabled(EObject o) {
+ /**
+ * Checks if model object is enabled.
+ *
+ * @param object the object
+ * @return true, if model object is enabled
+ */
+ protected boolean isModelObjectEnabled(EObject object) {
ModelEnablements me = getModelEnablements();
if (me!=null)
- return me.isEnabled(o.eClass());
+ return me.isEnabled(object.eClass());
return false;
}
+ /**
+ * Gets the model enablements.
+ *
+ * @return the model enablements
+ */
protected ModelEnablements getModelEnablements() {
DiagramEditor editor = (DiagramEditor) getDiagramEditor();
return (ModelEnablements) editor.getAdapter(ModelEnablements.class);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#hasDoneChanges()
+ */
@Override
public boolean hasDoneChanges() {
return changesDone;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2DirectEditingFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2DirectEditingFeature.java
new file mode 100644
index 00000000..58baf24d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2DirectEditingFeature.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IDirectEditingContext;
+import org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.ui.platform.ICellEditorProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ *
+ */
+public abstract class AbstractBpmn2DirectEditingFeature extends AbstractDirectEditingFeature implements ICellEditorProvider {
+
+ /**
+ * Construct a Direct Editing Feature. This implements {@link
+ * @param fp the Feature Provider
+ */
+ public AbstractBpmn2DirectEditingFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IDirectEditing#getEditingType()
+ */
+ @Override
+ public int getEditingType() {
+ return TYPE_CUSTOM;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IDirectEditing#getInitialValue(org.eclipse.graphiti.features.context.IDirectEditingContext)
+ */
+ @Override
+ public String getInitialValue(IDirectEditingContext context) {
+ String value = "";
+ BaseElement be = getBusinessObject(context);
+ EStructuralFeature feature = be.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+ if (feature!=null)
+ value = (String) be.eGet(feature);
+ return value==null ? "" : value; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature#setValue(java.lang.String, org.eclipse.graphiti.features.context.IDirectEditingContext)
+ */
+ @Override
+ public void setValue(String value, IDirectEditingContext context) {
+ BaseElement be = getBusinessObject(context);
+ EStructuralFeature feature = be.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+ if (feature!=null) {
+ be.eSet(feature, value);
+ PictogramElement pe = context.getPictogramElement();
+ FeatureSupport.updateLabel(getFeatureProvider(), ((Shape) pe).getContainer(), null);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature#canDirectEdit(org.eclipse.graphiti.features.context.IDirectEditingContext)
+ */
+ @Override
+ public boolean canDirectEdit(IDirectEditingContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ Object bo = getBusinessObjectForPictogramElement(pe);
+ if (bo instanceof BaseElement && ((BaseElement)bo).eClass().getEStructuralFeature("name")!=null) //$NON-NLS-1$
+ return true;
+ return false;
+ }
+
+ private BaseElement getBusinessObject(IDirectEditingContext context) {
+ return (BaseElement) getBusinessObjectForPictogramElement(context.getPictogramElement());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.platform.ICellEditorProvider#createCellEditor(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public CellEditor createCellEditor(Composite parent) {
+ TextCellEditor ce = new org.eclipse.jface.viewers.TextCellEditor(parent, SWT.MULTI | SWT.WRAP | SWT.LEFT);
+ return ce;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.platform.ICellEditorProvider#relocate(org.eclipse.jface.viewers.CellEditor, org.eclipse.draw2d.IFigure)
+ */
+ @Override
+ public void relocate(CellEditor cellEditor, IFigure figure) {
+ Text text = (Text) cellEditor.getControl();
+
+ Rectangle rect = figure.getClientArea().getCopy();
+ figure.translateToAbsolute(rect);
+ org.eclipse.swt.graphics.Rectangle trim = text.computeTrim(0, 0, 0, 0);
+ rect.translate(trim.x, trim.y);
+ rect.width += trim.width;
+ if (rect.width<100) {
+ rect.x -= (100 - rect.width)/2;
+ rect.width = 100;
+ }
+ rect.height += trim.height;
+ text.setBounds(rect.x, rect.y, rect.width, rect.height);
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2UpdateFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2UpdateFeature.java
new file mode 100644
index 00000000..2e319aa2
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractBpmn2UpdateFeature.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features;
+
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.di.DIImport;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+/**
+ *
+ */
+public abstract class AbstractBpmn2UpdateFeature extends AbstractUpdateFeature {
+
+ String name = null;
+
+ /**
+ * @param fp
+ */
+ public AbstractBpmn2UpdateFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractUpdateFeature#getName()
+ *
+ * Generate a feature name from the implementing class name.
+ */
+ @Override
+ public String getName() {
+ if (name==null) {
+ name = ModelUtil.toCanonicalString(this.getClass().getSimpleName());
+ }
+ return name;
+ }
+
+ @Override
+ public void execute(IContext context) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ PictogramElement pe = ((IUpdateContext)context).getPictogramElement();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_UPDATE, getFeatureProvider(), context, pe));
+ super.execute(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#updateNeeded(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ if (context.getProperty(GraphitiConstants.BUSINESS_OBJECT) instanceof EObject) {
+ // if the UpdateContext has a "businessObject" property, then this update is needed
+ // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
+ return Reason.createTrueReason("Initial update"); //$NON-NLS-1$
+ }
+ if (DIImport.isImporting(context)) {
+ return Reason.createTrueReason("Initial update"); //$NON-NLS-1$
+ }
+ return Reason.createFalseReason();
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractConnectionRouter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractConnectionRouter.java
index 995716f8..9cf814c1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractConnectionRouter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractConnectionRouter.java
@@ -25,23 +25,54 @@ import org.eclipse.core.runtime.Assert;
*/
public abstract class AbstractConnectionRouter implements IConnectionRouter {
+ /** The Constant peService. */
protected static final IPeService peService = Graphiti.getPeService();
+
+ /** The Constant gaService. */
protected static final IGaService gaService = Graphiti.getGaService();
- public enum Direction { UP, DOWN, LEFT, RIGHT, NONE };
+ /**
+ * The connection routing directions.
+ */
+ public enum Direction {
+ UP,
+ DOWN,
+ LEFT,
+ RIGHT,
+ NONE
+ };
+ /** The Feature Provider. */
protected IFeatureProvider fp;
+ /**
+ * Instantiates a new abstract connection router.
+ *
+ * @param fp the Feature Provider
+ */
public AbstractConnectionRouter(IFeatureProvider fp) {
this.fp = fp;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IConnectionRouter#route(org.eclipse.graphiti.mm.pictograms.Connection)
+ */
@Override
public abstract boolean route(Connection connection);
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IConnectionRouter#dispose()
+ */
@Override
public abstract void dispose();
+ /**
+ * Adds the routing info.
+ *
+ * @param connection the connection
+ * @param info the info
+ * @return the string
+ */
public static String addRoutingInfo(Connection connection, String info) {
Assert.isTrue(info!=null && !info.isEmpty());
String newInfo = getRoutingInfo(connection);
@@ -53,10 +84,22 @@ public abstract class AbstractConnectionRouter implements IConnectionRouter {
return newInfo;
}
+ /**
+ * Removes the routing info.
+ *
+ * @param connection the connection
+ */
public static void removeRoutingInfo(Connection connection) {
removeRoutingInfo(connection, getRoutingInfo(connection));
}
+ /**
+ * Removes the routing info.
+ *
+ * @param connection the connection
+ * @param info the info
+ * @return the string
+ */
public static String removeRoutingInfo(Connection connection, String info) {
String newInfo = null;
if (info!=null && !info.isEmpty()) {
@@ -89,6 +132,12 @@ public abstract class AbstractConnectionRouter implements IConnectionRouter {
return newInfo;
}
+ /**
+ * Gets the routing info.
+ *
+ * @param connection the connection
+ * @return the routing info
+ */
public static String getRoutingInfo(Connection connection) {
String info = peService.getPropertyValue(connection, ROUTING_INFO);
if (info==null || info.isEmpty())
@@ -96,11 +145,26 @@ public abstract class AbstractConnectionRouter implements IConnectionRouter {
return info;
}
+ /**
+ * Sets the routing info.
+ *
+ * @param connection the connection
+ * @param info the info
+ * @param value the value
+ * @return the string
+ */
public static String setRoutingInfoInt(Connection connection, String info, int value) {
removeRoutingInfo(connection, info+"="); //$NON-NLS-1$
return addRoutingInfo(connection, info+"="+value); //$NON-NLS-1$
}
+ /**
+ * Gets the routing info.
+ *
+ * @param connection the connection
+ * @param info the info
+ * @return the routing info
+ */
public static int getRoutingInfoInt(Connection connection, String info) {
String oldInfo = getRoutingInfo(connection);
String a[] = oldInfo.split(","); //$NON-NLS-1$
@@ -117,6 +181,12 @@ public abstract class AbstractConnectionRouter implements IConnectionRouter {
return -1;
}
+ /**
+ * Sets the force routing.
+ *
+ * @param connection the connection
+ * @param force the force
+ */
public static void setForceRouting(Connection connection, boolean force) {
if (force)
addRoutingInfo(connection, ROUTING_INFO_FORCE);
@@ -124,6 +194,12 @@ public abstract class AbstractConnectionRouter implements IConnectionRouter {
removeRoutingInfo(connection, ROUTING_INFO_FORCE);
}
+ /**
+ * Force routing.
+ *
+ * @param connection the connection
+ * @return true, if successful
+ */
public static boolean forceRouting(Connection connection) {
return getRoutingInfo(connection).contains(ROUTING_INFO_FORCE);
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractCreateFlowElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractCreateFlowElementFeature.java
index 04722d8c..622415a4 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractCreateFlowElementFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractCreateFlowElementFeature.java
@@ -13,67 +13,71 @@
package org.eclipse.bpmn2.modeler.core.features;
-import java.io.IOException;
-
import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+/**
+ * This is the Graphiti CreateFeature class for all BPMN2 model elements that
+ * subclass {@link FlowElement}.
+ *
+ * @param <T> the generic type, a subclass of {@code FlowElement}
+ */
public abstract class AbstractCreateFlowElementFeature<T extends FlowElement> extends AbstractBpmn2CreateFeature<T> {
- public AbstractCreateFlowElementFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ /**
+ * Instantiates a new CreateFeature for BPMN2 {@link FlowElement} objects.
+ *
+ * @param fp the Feature Provider
+ * @param name the type name of the Flow Element
+ * @param description the description of the Flow Element
+ */
+ public AbstractCreateFlowElementFeature(IFeatureProvider fp) {
+ super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreate#canCreate(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public boolean canCreate(ICreateContext context) {
- /*
- * TODO: rethink this: it's causing all kinds of DI import problems
- * also see AbstractAddActivityFeature
- *
- if (intoParticipant) {
- // don't allow flow elements to be added to a Pool if it is a "whitebox"
- // (i.e. if it has its own BPMNDiagram page.) Flow elements should be added
- // to the Process page instead.
+ if (!super.canCreate(context))
+ return false;
+ if (FeatureSupport.isTargetParticipant(context)) {
Participant participant = FeatureSupport.getTargetParticipant(context);
- if (FeatureSupport.hasBpmnDiagram(participant))
+ if (FeatureSupport.hasBpmnDiagram(participant)) {
return false;
+ }
}
- else if (intoFlowElementContainer) {
+ if (FeatureSupport.isTargetFlowElementsContainer(context)) {
FlowElementsContainer flowElementsContainer = FeatureSupport.getTargetFlowElementsContainer(context);
if (FeatureSupport.hasBpmnDiagram(flowElementsContainer))
return false;
}
- */
return FeatureSupport.isValidFlowElementTarget(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreate#create(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public Object[] create(ICreateContext context) {
T element = createBusinessObject(context);
if (element!=null) {
changesDone = true;
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- if (FeatureSupport.isTargetLane(context) && element instanceof FlowNode) {
- ((FlowNode) element).getLanes().add(
- (Lane) getBusinessObjectForPictogramElement(context.getTargetContainer()));
- }
- handler.addFlowElement(getBusinessObjectForPictogramElement(context.getTargetContainer()), element);
- } catch (IOException e) {
- Activator.logError(e);
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
+ if (FeatureSupport.isTargetLane(context) && element instanceof FlowNode) {
+ ((FlowNode) element).getLanes().add(
+ (Lane) getBusinessObjectForPictogramElement(context.getTargetContainer()));
}
+ mh.addFlowElement(getBusinessObjectForPictogramElement(context.getTargetContainer()), element);
PictogramElement pe = null;
pe = addGraphicalRepresentation(context, element);
return new Object[] { element, pe };
@@ -83,13 +87,24 @@ public abstract class AbstractCreateFlowElementFeature<T extends FlowElement> ex
return new Object[] { null };
}
+ /**
+ * Gets the stencil image id. This image is used in the Tool Palette.
+ *
+ * @return the stencil image id
+ */
protected abstract String getStencilImageId();
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateImageId()
+ */
@Override
public String getCreateImageId() {
return getStencilImageId();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateLargeImageId()
+ */
@Override
public String getCreateLargeImageId() {
return getCreateImageId(); // FIXME
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractLayoutBpmn2ShapeFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractLayoutBpmn2ShapeFeature.java
new file mode 100644
index 00000000..010f292d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractLayoutBpmn2ShapeFeature.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.impl.AbstractLayoutFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+/**
+ * Default Graphiti {@code LayoutFeature} class for Shapes.
+ */
+public abstract class AbstractLayoutBpmn2ShapeFeature extends AbstractLayoutFeature {
+
+ /**
+ * Instantiates a new default LayoutFeature
+ *
+ * @param fp the Feature Provider
+ */
+ public AbstractLayoutBpmn2ShapeFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ILayout#canLayout(org.eclipse.graphiti.features.context.ILayoutContext)
+ */
+ @Override
+ public boolean canLayout(ILayoutContext context) {
+ return true;
+ }
+
+ @Override
+ public void execute(IContext context) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ PictogramElement pe = ((ILayoutContext)context).getPictogramElement();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_LAYOUT, getFeatureProvider(), context, pe));
+ super.execute(context);
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java
new file mode 100644
index 00000000..98888139
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/AbstractUpdateBaseElementFeature.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+
+/**
+ * This is the Graphiti UpdateFeature class for all BPMN2 model elements that
+ * subclass {@link BaseElement}. This includes pretty much everything, except
+ * Label shapes. This is to prevent a BaseElement shape from trying to update
+ * its Label - this will be handled separately by the {@link UpdateLabelFeature}
+ * as part of a {@link MultiUpdateFeature}.
+ */
+public abstract class AbstractUpdateBaseElementFeature<T extends BaseElement> extends AbstractBpmn2UpdateFeature {
+
+ /**
+ * Instantiates a new UpdateFeature.
+ *
+ * @param fp the Feature Provider
+ */
+ public AbstractUpdateBaseElementFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ if (context.getPictogramElement() instanceof ContainerShape) {
+ Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
+ try {
+ return ((T)bo) != null;
+ }
+ catch (ClassCastException e) {
+ return false;
+ }
+ }
+ return false;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BPMNDiagramFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BPMNDiagramFeatureContainer.java
index 0a116229..aa8db490 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BPMNDiagramFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BPMNDiagramFeatureContainer.java
@@ -16,7 +16,6 @@ import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.dd.di.DiagramElement;
@@ -36,19 +35,19 @@ import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.Diagram;
-import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
/**
- * This class provides Graphiti features for the BPMNDiagram. Currently, it is only used
- * to contribute context menu actions for Connection Routing.
+ * This is the Graphiti Feature Container class for {@link BPMNDiagram}
+ * elements. Currently, it is only used to contribute context menu actions for
+ * Connection Routing.
*/
public class BPMNDiagramFeatureContainer extends BaseElementFeatureContainer {
- public BPMNDiagramFeatureContainer() {
- }
-
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer#getApplyObject(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public Object getApplyObject(IContext context) {
if (context instanceof ICustomContext) {
@@ -59,51 +58,81 @@ public class BPMNDiagramFeatureContainer extends BaseElementFeatureContainer {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer#canApplyTo(java.lang.Object)
+ */
@Override
public boolean canApplyTo(Object o) {
return o instanceof BPMNDiagram;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer#getCreateFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICreateFeature getCreateFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getAddFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IAddFeature getAddFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getUpdateFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer#getDirectEditingFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getLayoutFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer#getMoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer#getResizeFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getDeleteFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer#getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
return new ICustomFeature[] {
@@ -113,13 +142,19 @@ public class BPMNDiagramFeatureContainer extends BaseElementFeatureContainer {
}
/**
- * Context menu action to globally enable or disable the (still experimental)
- * Manhattan Connection Router.
+ * Context menu action to globally enable or disable the Manhattan
+ * Connection Router.
*/
public class EnableConnectionRoutingFeature extends AbstractCustomFeature {
+ /** The User Preferences. */
Bpmn2Preferences preferences;
+ /**
+ * Instantiates a new connection routing custom feature.
+ *
+ * @param fp the Feature Provider
+ */
public EnableConnectionRoutingFeature(IFeatureProvider fp) {
super(fp);
Diagram diagram = fp.getDiagramTypeProvider().getDiagram();
@@ -127,16 +162,25 @@ public class BPMNDiagramFeatureContainer extends BaseElementFeatureContainer {
preferences = Bpmn2Preferences.getInstance(bo);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#canExecute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
@Override
public boolean canExecute(ICustomContext context) {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public boolean isAvailable(IContext context) {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#getName()
+ */
@Override
public String getName() {
if (preferences.getEnableConnectionRouting())
@@ -144,11 +188,17 @@ public class BPMNDiagramFeatureContainer extends BaseElementFeatureContainer {
return Messages.BPMNDiagramFeatureContainer_Enable_Name;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#getDescription()
+ */
@Override
public String getDescription() {
return Messages.BPMNDiagramFeatureContainer_Disable_Enable_Description;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.ICustomFeature#execute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
@Override
public void execute(ICustomContext context) {
boolean enabled = preferences.getEnableConnectionRouting();
@@ -162,22 +212,37 @@ public class BPMNDiagramFeatureContainer extends BaseElementFeatureContainer {
*/
public class LayoutConnectionsFeature extends AbstractCustomFeature {
+ /** indicates if changes were made as a result of updating all connections. */
boolean hasDoneChanges = false;
+ /**
+ * Instantiates a new layout connections feature.
+ *
+ * @param fp the fp
+ */
public LayoutConnectionsFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#getName()
+ */
@Override
public String getName() {
return Messages.BPMNDiagramFeatureContainer_Reroute_All_Name;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#getDescription()
+ */
@Override
public String getDescription() {
return Messages.BPMNDiagramFeatureContainer_Reroute_All_Description;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#canExecute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
@Override
public boolean canExecute(ICustomContext context) {
PictogramElement[] pes = context.getPictogramElements();
@@ -185,11 +250,17 @@ public class BPMNDiagramFeatureContainer extends BaseElementFeatureContainer {
return businessObject instanceof BPMNDiagram;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#hasDoneChanges()
+ */
@Override
public boolean hasDoneChanges() {
return hasDoneChanges;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.ICustomFeature#execute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
@Override
public void execute(ICustomContext context) {
PictogramElement[] pes = context.getPictogramElements();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementConnectionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementConnectionFeatureContainer.java
index e76fc657..2d6ac8ca 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementConnectionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementConnectionFeatureContainer.java
@@ -14,21 +14,32 @@ package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveConnectionDecoratorFeature;
import org.eclipse.graphiti.features.IReconnectionFeature;
import org.eclipse.graphiti.features.IRemoveFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.features.context.IReconnectionContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+/**
+ * This is the Graphiti FeatureContainer class for all BPMN2 model connection
+ * elements that subclass {@link BaseElement}.
+ */
public abstract class BaseElementConnectionFeatureContainer implements IConnectionFeatureContainer {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getApplyObject(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public Object getApplyObject(IContext context) {
if (context instanceof IAddContext) {
@@ -42,51 +53,92 @@ public abstract class BaseElementConnectionFeatureContainer implements IConnecti
IReconnectionContext rc = (IReconnectionContext)context;
return BusinessObjectUtil.getFirstElementOfType(rc.getConnection(), BaseElement.class);
}
+ else if (context instanceof ICustomContext) {
+ PictogramElement[] pes = ((ICustomContext) context).getPictogramElements();
+ if (pes.length==1)
+ return BusinessObjectUtil.getFirstElementOfType(pes[0], BaseElement.class);
+ }
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#canApplyTo(java.lang.Object)
+ */
@Override
public boolean canApplyTo(Object o) {
return o instanceof BaseElement;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#isAvailable(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public boolean isAvailable(IFeatureProvider fp) {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IConnectionFeatureContainer#getReconnectionFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IReconnectionFeature getReconnectionFeature(IFeatureProvider fp) {
return new ReconnectBaseElementFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getDeleteFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDeleteFeature getDeleteFeature(IFeatureProvider context) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getRemoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IRemoveFeature getRemoveFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getLayoutFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
return new DefaultLayoutBPMNConnectionFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getUpdateFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
- return new ICustomFeature[0];
+ return new ICustomFeature[] {
+ new ShowDocumentationFeature(fp),
+ new ShowPropertiesFeature(fp)
+ };
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getDirectEditingFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
return new DirectEditBaseElementFeature(fp);
}
+
+ @Override
+ public IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IFeatureProvider fp) {
+ // TODO Auto-generated method stub
+ return null;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementFeatureContainer.java
index 5bfd6f75..a9c2d764 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BaseElementFeatureContainer.java
@@ -13,70 +13,66 @@
package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.modeler.core.features.command.CustomKeyCommandFeature;
import org.eclipse.bpmn2.modeler.core.features.label.RemoveLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.graphiti.features.ICreateConnectionFeature;
import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IRemoveFeature;
-import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IContext;
-import org.eclipse.graphiti.features.context.ICreateConnectionContext;
-import org.eclipse.graphiti.features.context.ICustomContext;
-import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+/**
+ * This is the Graphiti FeatureContainer class for all BPMN2 model shape
+ * elements that subclass {@link BaseElement}.
+ */
public abstract class BaseElementFeatureContainer implements IShapeFeatureContainer {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getApplyObject(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public Object getApplyObject(IContext context) {
- if (context instanceof IAddContext) {
- return ((IAddContext) context).getNewObject();
- }
- else if (context instanceof IPictogramElementContext) {
- return BusinessObjectUtil.getFirstElementOfType(
- (((IPictogramElementContext) context).getPictogramElement()), BaseElement.class);
- }
- else if (context instanceof ICustomContext) {
- PictogramElement[] pes = ((ICustomContext) context).getPictogramElements();
- if (pes.length==1)
- return BusinessObjectUtil.getFirstElementOfType(pes[0], BaseElement.class);
- }
- return null;
+ return BusinessObjectUtil.getBusinessObject(context, BaseElement.class);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#canApplyTo(java.lang.Object)
+ */
@Override
public boolean canApplyTo(Object o) {
return o instanceof BaseElement;
}
-
- public boolean canCreate(ICreateConnectionContext context) {
- return false;
- }
-
- public BaseElement createBusinessObject(ICreateConnectionContext context) {
- return null;
- }
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getRemoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IRemoveFeature getRemoveFeature(IFeatureProvider fp) {
return new RemoveLabelFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getDirectEditingFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
return new DirectEditBaseElementFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
return new ICustomFeature[] {
+ new ShowDocumentationFeature(fp),
new ShowPropertiesFeature(fp)
};
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#isAvailable(org.eclipse.graphiti.features.IFeatureProvider)
+ */
public boolean isAvailable(IFeatureProvider fp) {
return true;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BendpointConnectionRouter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BendpointConnectionRouter.java
index 7412a3e9..9a042159 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BendpointConnectionRouter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/BendpointConnectionRouter.java
@@ -25,32 +25,41 @@ import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
-import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.Shape;
/**
- * Router for connections from source to target that can have user-settable bendpoints.
+ * Router for connections that can have user-settable bendpoints.
*/
public class BendpointConnectionRouter extends DefaultConnectionRouter {
+ /** The minimum distance between a bendpoint and a shape when rerouting to avoid collisions. */
protected static final int margin = 10;
- // The Connection passed in to route(), cast as a FreeFormConnection for convenience
+ /** The connection, must be a {@code FreeFormConnection}. */
protected FreeFormConnection ffc;
- // The moved or added bendpoint (if any)
+ /** The moved or added bendpoint (if any). */
protected Point movedBendpoint;
+ /** The removed bendpoint. */
protected Point removedBendpoint;
- // The list of old connection cuts (including the end cuts) for determining if a route has changed
+ /** The list of old connection cuts (including the end cuts) for determining if a route has changed */
protected List<Point> oldPoints;
- // flag to disable automatic collision avoidance and optimization
+ /** flag to disable automatic collision avoidance and optimization. */
protected boolean manual = true;
+ /**
+ * Instantiates a new bendpoint connection router.
+ *
+ * @param fp the Feature Provider
+ */
public BendpointConnectionRouter(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.DefaultConnectionRouter#route(org.eclipse.graphiti.mm.pictograms.Connection)
+ */
@Override
public boolean route(Connection connection) {
super.route(connection);
@@ -71,18 +80,26 @@ public class BendpointConnectionRouter extends DefaultConnectionRouter {
return changed;
}
+ /**
+ * Sets the manual routing.
+ *
+ * @param manual the new manual routing
+ */
public void setManualRouting(boolean manual) {
this.manual = manual;
}
+ /**
+ * Checks if is manual routing.
+ *
+ * @return true, if is manual routing
+ */
public boolean isManualRouting() {
return manual;
}
/**
- * Initialize the newPoints list and set the new start and end anchors
- *
- * @param ffc - the FreeFormConnection
+ * Initialize the newPoints list and set the new start and end anchors.
*/
@Override
protected void initialize() {
@@ -105,6 +122,11 @@ public class BendpointConnectionRouter extends DefaultConnectionRouter {
oldPoints.add(GraphicsUtil.createPoint(ffc.getEnd()));
}
+ /**
+ * Calculate route.
+ *
+ * @return the connection route
+ */
protected ConnectionRoute calculateRoute() {
if (isSelfConnection()) {
return calculateSelfConnectionRoute();
@@ -179,11 +201,11 @@ public class BendpointConnectionRouter extends DefaultConnectionRouter {
}
/**
- * Route connections whose source and target are the same. This only reroutes the
- * connection if there are currently no bendpoints in the connection - we don't
- * want to reroute a connection that may have already been manually rerouted.
- *
- * @param connection - the connection to be routed
+ * Route connections whose source and target are the same. This only
+ * reroutes the connection if there are currently no bendpoints in the
+ * connection - we don't want to reroute a connection that may have already
+ * been manually rerouted.
+ *
* @return true if the router has done any work
*/
protected ConnectionRoute calculateSelfConnectionRoute() {
@@ -243,10 +265,12 @@ public class BendpointConnectionRouter extends DefaultConnectionRouter {
}
/**
- * Compare the connection's original start/end locations and all of its bendpoints
- * with the newly calculated cuts.
- *
- * @return true if the connection is different from the newly calculated cuts
+ * Compare the connection's original start/end locations and all of its
+ * bendpoints with the newly calculated route.
+ *
+ * @param route the route
+ * @return true if the connection is different from the newly calculated
+ * route
*/
protected boolean isRouteChanged(ConnectionRoute route) {
if (route==null || route.size()==0)
@@ -265,13 +289,22 @@ public class BendpointConnectionRouter extends DefaultConnectionRouter {
}
/**
- * Set the connection's new start/end point anchors and the newly calculated bendpoints.
+ * Set the connection's new start/end point anchors and the newly calculated
+ * bendpoints.
+ *
+ * @param route the route
*/
protected void applyRoute(ConnectionRoute route) {
route.apply(ffc, sourceAnchor, targetAnchor);
DIUtils.updateDIEdge(ffc);
}
+ /**
+ * Gets the detour points.
+ *
+ * @param shape the shape
+ * @return the detour points
+ */
protected DetourPoints getDetourPoints(ContainerShape shape) {
DetourPoints detour = new DetourPoints(shape, margin);
// if (allShapes==null)
@@ -292,30 +325,55 @@ public class BendpointConnectionRouter extends DefaultConnectionRouter {
}
/**
- * Set a property in the given FreeFormConnection that represents the index of an existing
- * bendpoint that has been moved by the user. This bendpoint is taken into consideration
- * in the new routing calculations.
+ * Set a property in the given FreeFormConnection that represents the index
+ * of an existing bendpoint that has been moved by the user. This bendpoint
+ * is taken into consideration in the new routing calculations.
*
* @param connection - FreeFormConnection to check
- * @param index - index of a bendpoint. If this value is out of range, the property will be
- * remmoved from the connection
+ * @param index - index of a bendpoint. If this value is out of range, the
+ * property will be remmoved from the connection
*/
public static void setMovedBendpoint(Connection connection, int index) {
setInterestingBendpoint(connection, "moved.", index); //$NON-NLS-1$
}
+ /**
+ * Sets the added bendpoint.
+ *
+ * @param connection the connection
+ * @param index the index
+ */
public static void setAddedBendpoint(Connection connection, int index) {
setInterestingBendpoint(connection, "added.", index); //$NON-NLS-1$
}
+ /**
+ * Sets the removed bendpoint.
+ *
+ * @param connection the connection
+ * @param index the index
+ */
public static void setRemovedBendpoint(Connection connection, int index) {
setInterestingBendpoint(connection, "removed.", index); //$NON-NLS-1$
}
+ /**
+ * Sets the fixed bendpoint.
+ *
+ * @param connection the connection
+ * @param index the index
+ */
public static void setFixedBendpoint(Connection connection, int index) {
setInterestingBendpoint(connection, "fixed."+index+".", index); //$NON-NLS-1$ //$NON-NLS-2$
}
+ /**
+ * Sets the interesting bendpoint.
+ *
+ * @param connection the connection
+ * @param type the type
+ * @param index the index
+ */
protected static void setInterestingBendpoint(Connection connection, String type, int index) {
if (connection instanceof FreeFormConnection) {
int size = ((FreeFormConnection)connection).getBendpoints().size();
@@ -330,28 +388,55 @@ public class BendpointConnectionRouter extends DefaultConnectionRouter {
}
/**
- * Return the "moved bendpoint" property that was previously set in the FreeFormConnection
- * by setMovedBendpoint()
- *
+ * Return the "moved bendpoint" property that was previously set in the
+ * FreeFormConnection by setMovedBendpoint()
+ *
* @param connection - FreeFormConnection to check
- * @return a Graphiti Point in Diagram-relative coordinates, or null if the property is not set
+ * @return a Graphiti Point in Diagram-relative coordinates, or null if the
+ * property is not set
*/
public static Point getMovedBendpoint(Connection connection) {
return getInterestingBendpoint(connection, "moved."); //$NON-NLS-1$
}
+ /**
+ * Gets the added bendpoint.
+ *
+ * @param connection the connection
+ * @return the added bendpoint
+ */
public static Point getAddedBendpoint(Connection connection) {
return getInterestingBendpoint(connection, "added."); //$NON-NLS-1$
}
+ /**
+ * Gets the removed bendpoint.
+ *
+ * @param connection the connection
+ * @return the removed bendpoint
+ */
public static Point getRemovedBendpoint(Connection connection) {
return getInterestingBendpoint(connection, "removed."); //$NON-NLS-1$
}
+ /**
+ * Gets the fixed bendpoint.
+ *
+ * @param connection the connection
+ * @param index the index
+ * @return the fixed bendpoint
+ */
public static Point getFixedBendpoint(Connection connection, int index) {
return getInterestingBendpoint(connection, "fixed."+index+"."); //$NON-NLS-1$ //$NON-NLS-2$
}
+ /**
+ * Gets the interesting bendpoint.
+ *
+ * @param connection the connection
+ * @param type the type
+ * @return the interesting bendpoint
+ */
protected static Point getInterestingBendpoint(Connection connection, String type) {
try {
int index = AbstractConnectionRouter.getRoutingInfoInt(connection, type+ROUTING_INFO_BENDPOINT);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeature.java
index dfd4c382..b116e5ed 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeature.java
@@ -40,32 +40,57 @@ import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
/**
- * A Create Feature class that can be used to create multiple objects.
- * @author Bob Brodt
+ * This is a Graphiti CreateFeature class that can be used to create multiple objects.
+ * Each of the objects created is defined in a {@link CompoundCreateFeaturePart}.
+ *
+ * @param <CONTEXT> a subclass of a Graphiti {@link IContext}.
*/
public class CompoundCreateFeature<CONTEXT extends IContext>
extends AbstractCreateFeature
- implements IBpmn2CreateFeature<BaseElement, CONTEXT>,
- ICreateConnectionFeature {
+ implements IBpmn2CreateFeature<BaseElement, CONTEXT>, ICreateConnectionFeature {
+ /** The {@code CompoundCreateFeaturePart} children. */
protected List<CompoundCreateFeaturePart<CONTEXT>> children = new ArrayList<CompoundCreateFeaturePart<CONTEXT>>();
- protected ToolDescriptor tool;
+ /** The ToolDescriptor that defined this {@code CompoundCreateFeature}. */
+ protected ToolDescriptor tool;
+
+ /**
+ * Instantiates a new compound create feature.
+ *
+ * @param fp the Feature Provider
+ * @param tool the tool
+ */
public CompoundCreateFeature(IFeatureProvider fp, ToolDescriptor tool) {
super(fp, tool.getName(), tool.getDescription());
this.tool = tool;
}
+ /**
+ * Instantiates a new compound create feature.
+ *
+ * @param fp the Feature Provider
+ */
public CompoundCreateFeature(IFeatureProvider fp) {
super(fp, null, null);
}
+ /**
+ * Adds the child CreateFeature. This constructs a
+ * {@code CompoundCreateFeaturePart} and adds it to our list of children.
+ *
+ * @param feature the Create Feature
+ * @return the compound create feature part
+ */
public CompoundCreateFeaturePart<CONTEXT> addChild(IFeature feature) {
CompoundCreateFeaturePart<CONTEXT> node = new CompoundCreateFeaturePart<CONTEXT>(feature);
children.add(node);
return node;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#canExecute(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public boolean canExecute(IContext context) {
boolean ret = false;
@@ -76,14 +101,25 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return ret;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#execute(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public void execute(IContext context) {
+ // create a list for PEs that are created during execution
+ List<PictogramElement> pes = new ArrayList<PictogramElement>();
+ context.putProperty(GraphitiConstants.PICTOGRAM_ELEMENTS, pes);
+
if (context instanceof ICreateContext)
create((ICreateContext) context);
else if (context instanceof ICreateConnectionContext)
create((ICreateConnectionContext)context);
+ getDiagramEditor().selectPictogramElements(pes.toArray(new PictogramElement[pes.size()]));
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreate#canCreate(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public boolean canCreate(ICreateContext context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -93,6 +129,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreateConnection#canCreate(org.eclipse.graphiti.features.context.ICreateConnectionContext)
+ */
@Override
public boolean canCreate(ICreateConnectionContext context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -102,6 +141,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreate#create(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public Object[] create(ICreateContext context) {
List<Object> businessObjects = new ArrayList<Object>();
@@ -112,8 +154,8 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
PictogramElement[] selection = getDiagramBehavior().getDiagramContainer().getSelectedPictogramElements();
int index = 0;
- for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
- String optional = ft.getProperty(ToolPaletteDescriptor.TOOLPART_OPTIONAL);
+ for (CompoundCreateFeaturePart<CONTEXT> fp : children) {
+ String optional = fp.getProperty(ToolPaletteDescriptor.TOOLPART_OPTIONAL);
if ("true".equals(optional)) { //$NON-NLS-1$
if (index<selection.length) {
boolean replace = true;
@@ -121,11 +163,11 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
if (pe instanceof Diagram) {
replace = false;
}
- else if (ft.feature instanceof ICreateFeature) {
+ else if (fp.feature instanceof ICreateFeature) {
if (!(pe instanceof ContainerShape))
replace = false;
}
- else if (ft.feature instanceof ICreateConnectionFeature) {
+ else if (fp.feature instanceof ICreateConnectionFeature) {
if (!(pe instanceof Connection))
replace = false;
}
@@ -134,7 +176,7 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
Object bo = BusinessObjectUtil.getFirstBaseElement(pe);
pictogramElements.add(pe);
businessObjects.add(bo);
- String id = ft.getProperty(ToolPaletteDescriptor.TOOLPART_ID);
+ String id = fp.getProperty(ToolPaletteDescriptor.TOOLPART_ID);
if (id!=null) {
Graphiti.getPeService().setPropertyValue(pe, ToolPaletteDescriptor.TOOLPART_ID, id);
}
@@ -142,11 +184,14 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
}
}
}
- ft.create(context, targetContainer, pictogramElements, businessObjects);
+ fp.create(context, targetContainer, pictogramElements, businessObjects);
}
return businessObjects.toArray();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreateConnection#create(org.eclipse.graphiti.features.context.ICreateConnectionContext)
+ */
@Override
public Connection create(ICreateConnectionContext context) {
List<Object> businessObjects = new ArrayList<Object>();
@@ -163,6 +208,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateImageId()
+ */
@Override
public String getCreateImageId() {
String icon = tool.getIcon();
@@ -170,9 +218,18 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
TargetRuntime rt = tool.getParent().getParent().getRuntime();
return CustomTaskImageProvider.getImageId(rt, icon, IconSize.SMALL);
}
+ // use the create image from the first child toolpart
+ IFeature feature = getChildren().get(0).getFeature();
+ if (feature instanceof ICreateFeature)
+ return ((ICreateFeature)feature).getCreateImageId();
+ if (feature instanceof ICreateConnectionFeature)
+ return ((ICreateConnectionFeature)feature).getCreateImageId();
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateLargeImageId()
+ */
@Override
public String getCreateLargeImageId() {
String icon = tool.getIcon();
@@ -180,9 +237,17 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
TargetRuntime rt = tool.getParent().getParent().getRuntime();
return CustomTaskImageProvider.getImageId(rt, icon, IconSize.LARGE);
}
+ IFeature feature = getChildren().get(0).getFeature();
+ if (feature instanceof ICreateFeature)
+ return ((ICreateFeature)feature).getCreateLargeImageId();
+ if (feature instanceof ICreateConnectionFeature)
+ return ((ICreateConnectionFeature)feature).getCreateLargeImageId();
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public boolean isAvailable(IContext context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -192,6 +257,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#createBusinessObject(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public BaseElement createBusinessObject(CONTEXT context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -205,6 +273,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#getBusinessObject(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public BaseElement getBusinessObject(CONTEXT context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -218,6 +289,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#putBusinessObject(org.eclipse.graphiti.features.context.IContext, org.eclipse.emf.ecore.EObject)
+ */
@Override
public void putBusinessObject(CONTEXT context, BaseElement businessObject) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -228,6 +302,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#getBusinessObjectClass()
+ */
@Override
public EClass getBusinessObjectClass() {
if (children.size()==1) {
@@ -236,6 +313,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#postExecute(org.eclipse.graphiti.IExecutionInfo)
+ */
@Override
public void postExecute(IExecutionInfo executionInfo) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -246,10 +326,18 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
}
}
+ /**
+ * Gets the list of {@code CompoundCreateFeaturePart} children.
+ *
+ * @return the children
+ */
public List<CompoundCreateFeaturePart<CONTEXT>> getChildren() {
return children;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreateConnection#canStartConnection(org.eclipse.graphiti.features.context.ICreateConnectionContext)
+ */
@Override
public boolean canStartConnection(ICreateConnectionContext context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
@@ -262,6 +350,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreateConnection#startConnecting()
+ */
public void startConnecting() {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
if (ft.getFeature() instanceof ICreateConnectionFeature) {
@@ -271,6 +362,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreateConnection#endConnecting()
+ */
public void endConnecting() {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
if (ft.getFeature() instanceof ICreateConnectionFeature) {
@@ -280,6 +374,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreateConnection#attachedToSource(org.eclipse.graphiti.features.context.ICreateConnectionContext)
+ */
public void attachedToSource(ICreateConnectionContext context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
if (ft.getFeature() instanceof ICreateConnectionFeature) {
@@ -289,6 +386,9 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreateConnection#canceledAttaching(org.eclipse.graphiti.features.context.ICreateConnectionContext)
+ */
public void canceledAttaching(ICreateConnectionContext context) {
for (CompoundCreateFeaturePart<CONTEXT> ft : children) {
if (ft.getFeature() instanceof ICreateConnectionFeature) {
@@ -297,4 +397,8 @@ public class CompoundCreateFeature<CONTEXT extends IContext>
}
}
}
+
+ public EClass getFeatureClass() {
+ return null;
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeaturePart.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeaturePart.java
index 5e914a9b..c7975346 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeaturePart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CompoundCreateFeaturePart.java
@@ -16,6 +16,8 @@ import java.util.List;
import java.util.Map.Entry;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Bpmn2Factory;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.runtime.ModelDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor;
@@ -42,23 +44,84 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.FixPointAnchor;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.PictogramLink;
+import org.eclipse.graphiti.mm.pictograms.PictogramsFactory;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
+/**
+ * This is a Graphiti CreateFeature child component of {@link CompoundCreateFeature}.
+ *
+ * @param <CONTEXT> a subclass of a Graphiti {@link IContext}.
+ */
public class CompoundCreateFeaturePart<CONTEXT> {
+ /** The Graphiti CreateFeature. */
IFeature feature;
+
+ /** The CreateFeature children. */
List<CompoundCreateFeaturePart<CONTEXT>> children = new ArrayList<CompoundCreateFeaturePart<CONTEXT>>();
+
+ /** The list of properties parsed from the Tool Palette tool definition. */
Hashtable<String, String> properties = null;
+ /**
+ * Instantiates a new compound create feature part.
+ *
+ * @param feature the feature
+ */
public CompoundCreateFeaturePart(IFeature feature) {
this.feature = feature;
}
+ /**
+ * Check if all children can be executed.
+ *
+ * @param context the Graphiti Context
+ * @return true, if all children can create their component parts
+ */
public boolean canCreate(IContext context) {
if (feature instanceof ICreateFeature && context instanceof ICreateContext) {
if (!((ICreateFeature)feature).canCreate((ICreateContext)context))
return false;
+ if (children.size()>0) {
+ /*
+ * Some types of objects have constraints on the target
+ * container e.g. a StartEvent with a CompensateEventDefinition
+ * MAY NOT be created within a Process, but MAY be created in a
+ * SubProcess. The restriction here is not imposed by the
+ * StartEvent, but by the CompensateEventDefinition which is a
+ * child of the StartEvent CompoundCreateFeaturePart. This bit
+ * of code ensures that this constraint is checked correctly.
+ */
+
+ PictogramElement parentContainer = ((ICreateContext)context).getTargetContainer();
+ // create a throw-away CreateContext for this child feature part
+ CreateContext childContext = new CreateContext();
+ // make the target container this feature part (e.g. the StartEvent)
+ ContainerShape targetContainer = PictogramsFactory.eINSTANCE.createContainerShape();
+ childContext.setTargetContainer(targetContainer);
+ // create a throw-away BPMN2 object so we can link it to the container shape
+ EClass eClass = ((AbstractBpmn2CreateFeature)feature).getBusinessObjectClass();
+ EObject businessObject = Bpmn2Factory.eINSTANCE.create(eClass);
+ // do the linking
+ PictogramLink link = PictogramsFactory.eINSTANCE.createPictogramLink();
+ link.setPictogramElement(targetContainer);
+ link.getBusinessObjects().add(businessObject);
+ targetContainer.setLink(link);
+
+ // Set the parent business object. This is required by {@link
+ // org.eclipse.bpmn2.modeler.core.utils.FeatureSupport#getAllowedEventDefinitions()}
+ // when doing validation for target Events & Event Definitions.
+ childContext.putProperty(GraphitiConstants.PARENT_CONTAINER,
+ BusinessObjectUtil.getBusinessObjectForPictogramElement(parentContainer));
+
+ // test the children feature parts
+ for (CompoundCreateFeaturePart<CONTEXT> child : children) {
+ if (!child.canCreate(childContext))
+ return false;
+ }
+ }
}
else if (feature instanceof ICreateConnectionFeature && context instanceof ICreateConnectionContext) {
if (!((ICreateConnectionFeature)feature).canCreate((ICreateConnectionContext)context))
@@ -67,6 +130,12 @@ public class CompoundCreateFeaturePart<CONTEXT> {
return true;
}
+ /**
+ * Creates the parent object.
+ *
+ * @param context the context
+ * @return the list
+ */
public List<Object> create(IContext context) {
// Create the parent element.
// For ICreateContext this will result in a BaseElement and a ContainerShape;
@@ -115,6 +184,14 @@ public class CompoundCreateFeaturePart<CONTEXT> {
return businessObjects;
}
+ /**
+ * Creates the.
+ *
+ * @param context the context
+ * @param targetContainer the target container
+ * @param pictogramElements the pictogram elements
+ * @param businessObjects the business objects
+ */
public void create(IContext context, ContainerShape targetContainer, List<PictogramElement> pictogramElements, List<Object> businessObjects) {
IContext childContext = null;
String value;
@@ -261,6 +338,7 @@ public class CompoundCreateFeaturePart<CONTEXT> {
// "Undo" can be used to delete all pictogram elements without having
// to cycle through each transaction created by an Update.
if (updatePE!=null) {
+ addPictogramElementToContext(context, updatePE);
UpdateContext updateContext = new UpdateContext(updatePE);
IUpdateFeature updateFeature = feature.getFeatureProvider().getUpdateFeature(updateContext);
if ( updateFeature.updateNeeded(updateContext).toBoolean() )
@@ -270,6 +348,13 @@ public class CompoundCreateFeaturePart<CONTEXT> {
businessObjects.add(result);
}
+ private void addPictogramElementToContext(IContext context, PictogramElement pe) {
+ List<PictogramElement> pes = (List<PictogramElement>) context.getProperty(GraphitiConstants.PICTOGRAM_ELEMENTS);
+ if (pes!=null) {
+ pes.add(pe);
+ }
+ }
+
private void applyBusinessObjectProperties(BaseElement be) {
if (be!=null && properties!=null) {
ModelDescriptor md = TargetRuntime.getCurrentRuntime().getModelDescriptor();
@@ -277,16 +362,17 @@ public class CompoundCreateFeaturePart<CONTEXT> {
if (entry.getKey().startsWith("$")) { //$NON-NLS-1$
String featureName = entry.getKey().substring(1);
EStructuralFeature feature = md.getFeature(be.eClass().getName(), featureName);
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(be);
String value = entry.getValue();
if (value.startsWith("$")) { //$NON-NLS-1$
String name = value.substring(1);
EClassifier eClass = md.getClassifier(name);
EFactory factory = eClass.getEPackage().getEFactoryInstance();
EObject object = factory.create((EClass)eClass);
- be.eSet(feature, object);
+ adapter.getFeatureDescriptor(feature).setValue(object);
}
else {
- md.setValueFromString(be, feature, value, true);
+ adapter.getFeatureDescriptor(feature).setValue(value);
}
}
}
@@ -294,6 +380,12 @@ public class CompoundCreateFeaturePart<CONTEXT> {
}
+ /**
+ * Checks if this CreateFeature is available.
+ *
+ * @param context the context
+ * @return true, if is available
+ */
public boolean isAvailable(IContext context) {
if (feature!=null && !feature.isAvailable(context))
return false;
@@ -304,12 +396,23 @@ public class CompoundCreateFeaturePart<CONTEXT> {
return true;
}
+ /**
+ * Adds the child.
+ *
+ * @param feature the feature
+ * @return the compound create feature part
+ */
public CompoundCreateFeaturePart<CONTEXT> addChild(IFeature feature) {
CompoundCreateFeaturePart<CONTEXT> node = new CompoundCreateFeaturePart<CONTEXT>(feature);
children.add(node);
return node;
}
+ /**
+ * Gets the business object class.
+ *
+ * @return the business object class
+ */
public EClass getBusinessObjectClass() {
EClass eClass = null;
if (feature instanceof AbstractBpmn2CreateFeature) {
@@ -330,6 +433,11 @@ public class CompoundCreateFeaturePart<CONTEXT> {
return eClass;
}
+ /**
+ * Gets the creates the name.
+ *
+ * @return the creates the name
+ */
public String getCreateName() {
String createName = null;
if (feature!=null)
@@ -341,28 +449,60 @@ public class CompoundCreateFeaturePart<CONTEXT> {
}
return createName;
}
+
+ /**
+ * Gets the feature.
+ *
+ * @return the feature
+ */
public IFeature getFeature() {
return feature;
}
+ /**
+ * Sets the feature.
+ *
+ * @param feature the new feature
+ */
public void setFeature(IFeature feature) {
this.feature = feature;
}
+ /**
+ * Gets the children.
+ *
+ * @return the children
+ */
public List<CompoundCreateFeaturePart<CONTEXT>> getChildren() {
return children;
}
+ /**
+ * Sets the properties.
+ *
+ * @param properties the properties
+ */
public void setProperties(Hashtable<String, String> properties) {
getProperties().putAll(properties);
}
+ /**
+ * Gets the properties.
+ *
+ * @return the properties
+ */
public Hashtable<String, String> getProperties() {
if (properties==null)
properties = new Hashtable<String, String>();
return properties;
}
+ /**
+ * Gets the property.
+ *
+ * @param name the name
+ * @return the property
+ */
public String getProperty(String name) {
if (properties==null)
return null;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ConnectionRoute.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ConnectionRoute.java
index ecc7458e..dbb1d474 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ConnectionRoute.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ConnectionRoute.java
@@ -16,61 +16,118 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.BoundaryAnchor;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.BoundaryAnchor;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.Shape;
+/**
+ * The Class ConnectionRoute.
+ */
public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<ConnectionRoute> {
+
+ /**
+ * Records a collision of a line segment with a shape.
+ */
class Collision {
+
+ /** The shape. */
Shape shape;
+ /** The line segment start point. */
Point start;
+ /** The line segment end point. */
Point end;
+ /**
+ * Instantiates a new collision.
+ *
+ * @param shape the collision shape
+ * @param start the line segment start point
+ * @param end the line segment end point
+ */
public Collision(Shape shape, Point start, Point end) {
this.shape = shape;
this.start = start;
this.end = end;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
public String toString() {
Object o = BusinessObjectUtil.getFirstBaseElement(shape);
- return ModelUtil.getDisplayName(o);
+ return ModelUtil.getTextValue(o);
}
}
+ /**
+ * Records the crossing of a line segment with an existing connection.
+ */
class Crossing {
+
+ /** The connection. */
Connection connection;
+ /** The line segment start point. */
Point start;
+ /** The line segment end point. */
Point end;
+
+ /**
+ * Instantiates a new crossing.
+ *
+ * @param connection the crossed connection
+ * @param start the line segment start point
+ * @param end the line segment end point
+ */
public Crossing(Connection connection, Point start, Point end) {
this.connection = connection;
this.start = start;
this.end = end;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
public String toString() {
Object o = BusinessObjectUtil.getFirstBaseElement(connection);
- return ModelUtil.getDisplayName(o);
+ return ModelUtil.getTextValue(o);
}
}
+ /** The router. */
DefaultConnectionRouter router;
+ /** The route id. */
int id;
private List<Point> points = new ArrayList<Point>();
+
+ /** The list of shape collisions. */
List<Collision> collisions = new ArrayList<Collision>();
+
+ /** The list of connection crossings. */
List<Crossing> crossings = new ArrayList<Crossing>();
+
+ /** The source shape of the route being calculated. */
Shape source;
+
+ /** The target shape of the route being calculated. */
Shape target;
+
boolean valid = true;
private int rank = 0;
+ /**
+ * Instantiates a new connection route.
+ *
+ * @param router the router
+ * @param id the id
+ * @param source the source
+ * @param target the target
+ */
public ConnectionRoute(DefaultConnectionRouter router, int id, Shape source, Shape target) {
this.router = router;
this.id = id;
@@ -78,10 +135,22 @@ public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<
this.target = target;
}
+ /**
+ * Apply.
+ *
+ * @param ffc the ffc
+ */
public void apply(FreeFormConnection ffc) {
apply(ffc,null,null);
}
+ /**
+ * Apply.
+ *
+ * @param ffc the ffc
+ * @param sourceAnchor the source anchor
+ * @param targetAnchor the target anchor
+ */
public void apply(FreeFormConnection ffc, Anchor sourceAnchor, Anchor targetAnchor) {
// set connection's source and target anchors if they are Boundary Anchors
@@ -107,6 +176,9 @@ public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<
}
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
public String toString() {
String text;
if (isValid()) {
@@ -140,6 +212,12 @@ public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<
return text;
}
+ /**
+ * Adds the.
+ *
+ * @param newPoint the new point
+ * @return true, if successful
+ */
public boolean add(Point newPoint) {
for (Point p : getPoints()) {
if (GraphicsUtil.pointsEqual(newPoint, p)) {
@@ -151,32 +229,70 @@ public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<
return true;
}
+ /**
+ * Gets the.
+ *
+ * @param index the index
+ * @return the point
+ */
public Point get(int index) {
return getPoints().get(index);
}
+ /**
+ * Size.
+ *
+ * @return the int
+ */
public int size() {
return getPoints().size();
}
+ /**
+ * Adds the collision.
+ *
+ * @param shape the shape
+ * @param start the start
+ * @param end the end
+ */
public void addCollision(Shape shape, Point start, Point end) {
collisions.add( new Collision(shape, start, end) );
}
+ /**
+ * Adds the crossing.
+ *
+ * @param connection the connection
+ * @param start the start
+ * @param end the end
+ */
public void addCrossing(Connection connection, Point start, Point end) {
crossings.add( new Crossing(connection, start, end) );
}
+ /**
+ * Sets the valid.
+ */
public void setValid() {
valid = true;
}
+ /**
+ * Checks if is valid.
+ *
+ * @return true, if is valid
+ */
public boolean isValid() {
if (valid)
return getLength() < Integer.MAX_VALUE;
return false;
}
+ /**
+ * Gets the length.
+ *
+ * @return the length
+ */
public int getLength() {
int length = 0;
if (getPoints().size()>1) {
@@ -197,11 +313,17 @@ public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<
return length;
}
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
@Override
public int compareTo(ConnectionRoute arg0) {
return compare(this,arg0);
}
+ /* (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
@Override
public int compare(ConnectionRoute o1, ConnectionRoute o2) {
int i = 0;
@@ -360,6 +482,11 @@ public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<
return changed;
}
+ /**
+ * Optimize.
+ *
+ * @return true, if successful
+ */
public boolean optimize() {
boolean changed = removeUnusedPoints();
if (removeUnusedSegments()) {
@@ -370,18 +497,38 @@ public class ConnectionRoute implements Comparable<ConnectionRoute>, Comparator<
return changed;
}
+ /**
+ * Gets the rank.
+ *
+ * @return the rank
+ */
public int getRank() {
return rank;
}
+ /**
+ * Sets the rank.
+ *
+ * @param rank the new rank
+ */
public void setRank(int rank) {
this.rank = rank;
}
+ /**
+ * Gets the points.
+ *
+ * @return the points
+ */
public List<Point> getPoints() {
return points;
}
+ /**
+ * Sets the points.
+ *
+ * @param points the new points
+ */
public void setPoints(List<Point> points) {
this.points = points;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomConnectionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomConnectionFeatureContainer.java
new file mode 100644
index 00000000..5813af54
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomConnectionFeatureContainer.java
@@ -0,0 +1,558 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskImageProvider.IconSize;
+import org.eclipse.bpmn2.modeler.core.features.Messages;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.IExecutionInfo;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateConnectionFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IDirectEditingFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveConnectionDecoratorFeature;
+import org.eclipse.graphiti.features.IReconnectionFeature;
+import org.eclipse.graphiti.features.IRemoveFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.IAreaContext;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The Feature Container for Custom Connections.
+ * <p>
+ * This class must be extended by contributing plug-ins that want to extend any
+ * of the BPMN2 connection elements, e.g. {@link org.eclipse.bpmn2.SequenceFlow}, {@link org.eclipse.bpmn2.Association},
+ * {@link org.eclipse.bpmn2.MessageFlow} and
+ * {@link org.eclipse.bpmn2.ConversationLink}
+ * <p>
+ * See the {@code <customTask>} element of the
+ * {@code org.eclipse.bpmn2.modeler.runtime} extension point.
+ */
+public class CustomConnectionFeatureContainer extends CustomElementFeatureContainer implements
+ IConnectionFeatureContainer {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getDescription()
+ */
+ public String getDescription() {
+ if (customTaskDescriptor != null)
+ return customTaskDescriptor.getDescription();
+ return Messages.CustomConnectionFeatureContainer_Description;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.IConnectionFeatureContainer#
+ * getCreateConnectionFeature
+ * (org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public ICreateConnectionFeature getCreateConnectionFeature(IFeatureProvider fp) {
+ return new CreateCustomConnectionFeature(fp);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getAddFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddCustomConnectionFeature(fp);
+ }
+
+ /**
+ * The {@code CreateFeature} base class for creating custom connections.
+ * <p>
+ * Custom Connections contributed to the editor <b>MUST</b> subclass this in
+ * their FeatureContainer implementation.
+ * <p>
+ * The creation process copies the modelObject ID string into the Graphiti
+ * Create Context during the construction phase, then migrates that ID into
+ * the created {@code PictogramElement}. This is necessary because the ID
+ * must be associated with the {@code PictogramElement} to allow our Feature
+ * Provider to correctly identify the Custom Task.
+ * <p>
+ * Custom Elements are not available to the Context Button Pad because the
+ * Graphiti {@code CreateConnectionCommand} constructs a single
+ * {@code ICreateConnectionContext}, and reuses it for all command/context
+ * pairs that are collected for display and user selection in a popup menu.
+ * See
+ * {@link org.eclipse.graphiti.ui.internal.command.CreateConnectionCommand#execute()}
+ * . Each command/context pair is first tested with
+ * {@link org.eclipse.graphiti.internal.command#canExecute()} which
+ * eventually calls our {@link CreateCustomConnectionFeature#canCreate()}
+ * where we insert the Custom Element ID into the context properties. Thus,
+ * all command/context pairs will contain this ID and will attempt to create
+ * a Custom Element when executed.
+ */
+ public class CreateCustomConnectionFeature extends
+ AbstractBpmn2CreateConnectionFeature<BaseElement, EObject, EObject> {
+
+ /** The create feature delegate. */
+ protected AbstractBpmn2CreateConnectionFeature createFeatureDelegate;
+
+ /** Our own copies of create name and description because the ones in super are private **/
+ protected String name;
+ protected String description;
+
+ /**
+ * Instantiates a new {@code CreateFeature} for custom connections. If
+ * the name and/or description are null or empty strings then they are
+ * fetched from the Create Feature delegate when required.
+ *
+ * @param fp the Feature Provider
+ * @param name the name of the element being created
+ * @param description the description of the Create Feature
+ */
+ public CreateCustomConnectionFeature(IFeatureProvider fp, String name, String description) {
+ super(fp);
+ IConnectionFeatureContainer fc = (IConnectionFeatureContainer) getFeatureContainer(fp);
+ createFeatureDelegate = (AbstractBpmn2CreateConnectionFeature) fc.getCreateConnectionFeature(fp);
+ Assert.isNotNull(createFeatureDelegate);
+ this.name = name;
+ this.description = description;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateConnectionFeature#getCreateName()
+ */
+ @Override
+ public String getCreateName() {
+ if (name!=null && !name.isEmpty())
+ return name;
+ return createFeatureDelegate.getCreateName();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.
+ * AbstractBpmn2CreateConnectionFeature#getCreateDescription()
+ */
+ @Override
+ public String getCreateDescription() {
+ if (description!=null && !description.isEmpty())
+ return description;
+ return createFeatureDelegate.getCreateDescription();
+ }
+
+ /**
+ * Alternate constructor.
+ *
+ * @param fp the Feature Provider
+ */
+ public CreateCustomConnectionFeature(IFeatureProvider fp) {
+ this(fp, customTaskDescriptor.getName(), NLS.bind(Messages.CustomElementFeatureContainer_Create,
+ customTaskDescriptor.getName()));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.
+ * AbstractBpmn2CreateConnectionFeature
+ * #isAvailable(org.eclipse.graphiti.features.context.IContext)
+ */
+ @Override
+ public boolean isAvailable(IContext context) {
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#
+ * addGraphicalRepresentation
+ * (org.eclipse.graphiti.features.context.IAreaContext,
+ * java.lang.Object)
+ */
+ @Override
+ protected PictogramElement addGraphicalRepresentation(IAreaContext context, Object newObject) {
+
+ // create a new AddContext and copy our ID into it.
+ IAddContext addContext = new AddContext(context, newObject);
+ setId(addContext, getId());
+
+ // create the PE and copy our ID into its properties.
+ PictogramElement pe = getFeatureProvider().addIfPossible(addContext);
+ Graphiti.getPeService().setPropertyValue(pe, GraphitiConstants.CUSTOM_ELEMENT_ID, id);
+
+ return pe;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.graphiti.func.ICreateConnection#canCreate(org.eclipse
+ * .graphiti.features.context.ICreateConnectionContext)
+ */
+ @Override
+ public boolean canCreate(ICreateConnectionContext context) {
+ // copy our ID into the CreateContext - this is where it all starts!
+ setId(context, id);
+ return createFeatureDelegate.canCreate(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.
+ * AbstractBpmn2CreateConnectionFeature
+ * #canStartConnection(org.eclipse.graphiti
+ * .features.context.ICreateConnectionContext)
+ */
+ @Override
+ public boolean canStartConnection(ICreateConnectionContext context) {
+ setId(context, id);
+ return createFeatureDelegate.canStartConnection(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.
+ * AbstractBpmn2CreateConnectionFeature
+ * #createBusinessObject(org.eclipse.
+ * graphiti.features.context.ICreateConnectionContext)
+ */
+ @Override
+ public BaseElement createBusinessObject(ICreateConnectionContext context) {
+ BaseElement businessObject = createFeatureDelegate.createBusinessObject(context);
+ customTaskDescriptor.populateObject(businessObject, true);
+ return businessObject;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature
+ * #getFlowElementClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return createFeatureDelegate.getBusinessObjectClass();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.graphiti.func.ICreateConnection#create(org.eclipse.graphiti
+ * .features.context.ICreateConnectionContext)
+ */
+ @Override
+ public Connection create(ICreateConnectionContext context) {
+ // Our Custom Task ID should have already been set in canCreate()
+ // if not, we have a problem; in other words, canCreate() MUST have
+ // been called by the framework before create()
+ Assert.isNotNull(getId(context));
+ return createFeatureDelegate.create(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.graphiti.features.impl.AbstractCreateConnectionFeature
+ * #getCreateImageId()
+ */
+ @Override
+ public String getCreateImageId() {
+ String icon = customTaskDescriptor.getIcon();
+ if (icon != null) {
+ String id = customTaskDescriptor.getImageId(icon, IconSize.SMALL);
+ if (id != null)
+ return id;
+ }
+ return createFeatureDelegate.getCreateImageId();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.graphiti.features.impl.AbstractCreateConnectionFeature
+ * #getCreateLargeImageId()
+ */
+ @Override
+ public String getCreateLargeImageId() {
+ String icon = customTaskDescriptor.getIcon();
+ if (icon != null) {
+ String id = customTaskDescriptor.getImageId(icon, IconSize.LARGE);
+ if (id != null)
+ return id;
+ }
+ return createFeatureDelegate.getCreateLargeImageId();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.
+ * AbstractBpmn2CreateConnectionFeature#getSourceClass()
+ */
+ @Override
+ protected Class<EObject> getSourceClass() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.
+ * AbstractBpmn2CreateConnectionFeature#getTargetClass()
+ */
+ @Override
+ protected Class<EObject> getTargetClass() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ }
+
+ /**
+ * The {@code AddFeature} base class for creating custom connections.
+ * <p>
+ * Custom Connections contributed to the editor <b>MUST</b> subclass this in
+ * their FeatureContainer implementation.
+ */
+ public class AddCustomConnectionFeature extends AbstractBpmn2AddFeature<BaseElement> {
+
+ /** The add feature delegate. */
+ protected AbstractBpmn2AddFeature<BaseElement> addFeatureDelegate;
+
+ /**
+ * Instantiates a new {@code AddConnectionFeature} for custom connections.
+ *
+ * @param fp the Feature Provider
+ */
+ public AddCustomConnectionFeature(IFeatureProvider fp) {
+ super(fp);
+ addFeatureDelegate = (AbstractBpmn2AddFeature) getFeatureContainer(fp).getAddFeature(fp);
+ Assert.isNotNull(addFeatureDelegate);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.graphiti.func.IAdd#add(org.eclipse.graphiti.features.
+ * context.IAddContext)
+ */
+ @Override
+ public PictogramElement add(IAddContext context) {
+ PictogramElement pe = addFeatureDelegate.add(context);
+ // make sure everyone knows that this PE is a custom task
+ if (pe != null)
+ peService.setPropertyValue(pe, GraphitiConstants.CUSTOM_ELEMENT_ID, getId());
+
+ return pe;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#
+ * getBusinessObject(org.eclipse.graphiti.features.context.IAddContext)
+ */
+ @Override
+ public BaseElement getBusinessObject(IAddContext context) {
+ // TODO Auto-generated method stub
+ return addFeatureDelegate.getBusinessObject(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#
+ * putBusinessObject(org.eclipse.graphiti.features.context.IAddContext,
+ * org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public void putBusinessObject(IAddContext context, BaseElement businessObject) {
+ addFeatureDelegate.putBusinessObject(context, businessObject);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#postExecute
+ * (org.eclipse.graphiti.IExecutionInfo)
+ */
+ @Override
+ public void postExecute(IExecutionInfo executionInfo) {
+ addFeatureDelegate.postExecute(executionInfo);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.graphiti.func.IAdd#canAdd(org.eclipse.graphiti.features
+ * .context.IAddContext)
+ */
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return addFeatureDelegate.canAdd(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getAddLabelFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ // TODO Auto-generated method stub
+ return addFeatureDelegate.getAddLabelFeature(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getHeight()
+ */
+ @Override
+ public int getHeight(IAddContext context) {
+ return addFeatureDelegate.getHeight(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getWidth()
+ */
+ @Override
+ public int getWidth(IAddContext context) {
+ return addFeatureDelegate.getWidth(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return addFeatureDelegate.getBusinessObjectType();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getUpdateFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ return getFeatureContainer(fp).getUpdateFeature(fp);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getDirectEditingFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
+ return getFeatureContainer(fp).getDirectEditingFeature(fp);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getLayoutFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return getFeatureContainer(fp).getLayoutFeature(fp);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getRemoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IRemoveFeature getRemoveFeature(IFeatureProvider fp) {
+ return getFeatureContainer(fp).getRemoveFeature(fp);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getDeleteFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return getFeatureContainer(fp).getDeleteFeature(fp);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer
+ * #getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+ return getFeatureContainer(fp).getCustomFeatures(fp);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.IConnectionFeatureContainer#
+ * getReconnectionFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IReconnectionFeature getReconnectionFeature(IFeatureProvider fp) {
+ IConnectionFeatureContainer fc = (IConnectionFeatureContainer) getFeatureContainer(fp);
+ return fc.getReconnectionFeature(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IConnectionFeatureContainer#getMoveConnectionDecoratorFeature(org.eclipse.graphiti.features.context.IMoveConnectionDecoratorContext)
+ */
+ @Override
+ public IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IFeatureProvider fp) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomElementFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java
index 68c81017..b58fc659 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomElementFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomElementFeatureContainer.java
@@ -8,19 +8,15 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.task;
+package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.impl.TaskImpl;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
-import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.ICustomElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskImageProvider;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.diagram.BPMNFeatureProvider;
+import org.eclipse.bpmn2.modeler.core.features.Messages;
import org.eclipse.core.runtime.Assert;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -34,6 +30,7 @@ import org.eclipse.graphiti.features.IRemoveFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
@@ -42,28 +39,56 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
+/**
+ * The base class for custom shape and connection Feature Containers.
+ */
public class CustomElementFeatureContainer implements ICustomElementFeatureContainer {
+ /** The custom element id. */
protected String id;
+
+ /** The custom task descriptor contributed by the extension plug-in. */
protected CustomTaskDescriptor customTaskDescriptor;
+
+ /** The feature container delegate. */
protected IFeatureContainer featureContainerDelegate = null;
- protected BPMNFeatureProvider fp;
+ /** The Feature Provider. */
+ protected IBpmn2FeatureProvider fp;
+
+ /**
+ * Instantiates a new custom element feature container.
+ */
public CustomElementFeatureContainer() {
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.ICustomElementFeatureContainer#getDescription()
+ */
public String getDescription() {
if (customTaskDescriptor!=null)
- return customTaskDescriptor.getDescription();
+ return customTaskDescriptor.getName();
return Messages.CustomElementFeatureContainer_Description;
}
+ /**
+ * Creates the feature container.
+ *
+ * @param fp the Feature Provider
+ * @return the i feature container
+ */
protected IFeatureContainer createFeatureContainer(IFeatureProvider fp) {
- EClass eClass = (EClass) ModelUtil.getEClassifierFromString(
+ EClass eClass = (EClass) ModelDecorator.findEClassifier(
customTaskDescriptor.getRuntime().getModelDescriptor().getEPackage(), customTaskDescriptor.getType());
- return ((BPMNFeatureProvider)fp).getFeatureContainer(eClass.getInstanceClass());
+ return ((IBpmn2FeatureProvider)fp).getFeatureContainer(eClass.getInstanceClass());
}
+ /**
+ * Gets the feature container.
+ *
+ * @param fp the Feature Provider
+ * @return the feature container
+ */
protected IFeatureContainer getFeatureContainer(IFeatureProvider fp) {
if (featureContainerDelegate==null) {
featureContainerDelegate = createFeatureContainer(fp);
@@ -91,13 +116,19 @@ public class CustomElementFeatureContainer implements ICustomElementFeatureConta
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#canApplyTo(java.lang.Object)
+ */
@Override
public boolean canApplyTo(Object o) {
- boolean b1 = o instanceof TaskImpl;
- boolean b2 = o.getClass().isAssignableFrom(TaskImpl.class);
+ boolean b1 = o instanceof BaseElement;
+ boolean b2 = o.getClass().isAssignableFrom(BaseElement.class);
return b1 || b2;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#isAvailable(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public boolean isAvailable(IFeatureProvider fp) {
return true;
@@ -115,42 +146,40 @@ public class CustomElementFeatureContainer implements ICustomElementFeatureConta
* Set this modelObject's ID in the given Graphiti context.
*
* @param context - if this is a IPictogramElementContext, set the property
- * in the contained PictogramElement's list of properties;
- * otherwise set the Context's property
+ * in the contained PictogramElement's list of properties;
+ * otherwise set the Context's property
* @param id - ID of this Custom Task
*/
public static void setId(IContext context, String id) {
if (context instanceof IPictogramElementContext) {
PictogramElement pe = ((IPictogramElementContext)context).getPictogramElement();
- Graphiti.getPeService().setPropertyValue(pe,CUSTOM_ELEMENT_ID,id);
+ Graphiti.getPeService().setPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID,id);
}
else {
- context.putProperty(CUSTOM_ELEMENT_ID, id);
+ context.putProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, id);
}
}
/**
* Returns the modelObject ID string from the given Graphiti context.
- *
- * @param context
+ *
+ * @param context the context
* @return - ID string for this modelObject.
*/
public static String getId(IContext context) {
Object id = null;
- /**
- * IAddContext can also mean that a file is dragged,
- * therefore we have to check if we are really dragging a customTask
- */
+ // IAddContext can also mean that a file is dragged, therefore we have
+ // to check if we are really dragging a customTask
if (context instanceof IAddContext &&
((IAddContext)context).getNewObject() instanceof EObject ) {
EObject object = (EObject) ((IAddContext)context).getNewObject();
TargetRuntime rt = TargetRuntime.getCurrentRuntime();
- for (CustomTaskDescriptor ct : rt.getCustomTasks()) {
- id = ct.getFeatureContainer().getId(object);
- if (id!=null) {
- context.putProperty(CUSTOM_ELEMENT_ID, id);
+ for (CustomTaskDescriptor ctd : rt.getCustomTaskDescriptors()) {
+ id = ctd.getFeatureContainer().getId(object);
+ if (ctd.getId().equals(id)) {
+ context.putProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, id);
return (String)id;
}
}
@@ -158,14 +187,24 @@ public class CustomElementFeatureContainer implements ICustomElementFeatureConta
if (context instanceof IPictogramElementContext) {
PictogramElement pe = ((IPictogramElementContext)context).getPictogramElement();
- id = Graphiti.getPeService().getPropertyValue(pe,CUSTOM_ELEMENT_ID);
+ id = Graphiti.getPeService().getPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID);
+ }
+ else if (context instanceof ICustomContext) {
+ for (PictogramElement pe : ((ICustomContext)context).getPictogramElements()) {
+ id = Graphiti.getPeService().getPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID);
+ if (id!=null)
+ break;
+ }
}
else {
- id = context.getProperty(CUSTOM_ELEMENT_ID);
+ id = context.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
}
return (String)id;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.ICustomElementFeatureContainer#getId(org.eclipse.emf.ecore.EObject)
+ */
public String getId(EObject object) {
return null;
}
@@ -186,17 +225,26 @@ public class CustomElementFeatureContainer implements ICustomElementFeatureConta
this.customTaskDescriptor = customTaskDescriptor;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getAddFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IAddFeature getAddFeature(IFeatureProvider fp) {
return new AddCustomElementFeature(fp);
}
+ /**
+ * The Class AddCustomElementFeature.
+ */
public class AddCustomElementFeature extends AbstractBpmn2AddFeature<BaseElement> {
+ /** The add feature delegate. */
protected AbstractBpmn2AddFeature<BaseElement> addFeatureDelegate;
/**
- * @param fp
+ * Instantiates a new {@code AddFeature} for custom elements.
+ *
+ * @param fp the Feature Provider
*/
public AddCustomElementFeature(IFeatureProvider fp) {
super(fp);
@@ -204,12 +252,15 @@ public class CustomElementFeatureContainer implements ICustomElementFeatureConta
Assert.isNotNull(addFeatureDelegate);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#add(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public PictogramElement add(IAddContext context) {
PictogramElement pe = addFeatureDelegate.add(context);
// make sure everyone knows that this PE is a custom task
if (pe!=null)
- Graphiti.getPeService().setPropertyValue(pe,CUSTOM_ELEMENT_ID,getId());
+ peService.setPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID,getId());
// add an icon to the top-left corner if applicable, and if the implementing
// addFeatureDelegate hasn't already done so.
@@ -243,53 +294,114 @@ public class CustomElementFeatureContainer implements ICustomElementFeatureConta
return pe;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#getBusinessObject(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public BaseElement getBusinessObject(IAddContext context) {
- // TODO Auto-generated method stub
return addFeatureDelegate.getBusinessObject(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#putBusinessObject(org.eclipse.graphiti.features.context.IAddContext, org.eclipse.emf.ecore.EObject)
+ */
@Override
public void putBusinessObject(IAddContext context, BaseElement businessObject) {
addFeatureDelegate.putBusinessObject(context, businessObject);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#postExecute(org.eclipse.graphiti.IExecutionInfo)
+ */
@Override
public void postExecute(IExecutionInfo executionInfo) {
addFeatureDelegate.postExecute(executionInfo);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#canAdd(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public boolean canAdd(IAddContext context) {
return addFeatureDelegate.canAdd(context);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getAddLabelFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return addFeatureDelegate.getAddLabelFeature(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getHeight()
+ */
+ @Override
+ public int getHeight(IAddContext context) {
+ return addFeatureDelegate.getHeight(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getWidth()
+ */
+ @Override
+ public int getWidth(IAddContext context) {
+ return addFeatureDelegate.getWidth(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return addFeatureDelegate.getBusinessObjectType();
+ }
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getUpdateFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getUpdateFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getDirectEditingFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getDirectEditingFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getLayoutFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getLayoutFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getRemoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IRemoveFeature getRemoveFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getRemoveFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getDeleteFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getDeleteFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.ICustomElementFeatureContainer#getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
return getFeatureContainer(fp).getCustomFeatures(fp);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomShapeFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomShapeFeatureContainer.java
index 123a90b1..a50e0836 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/CustomShapeFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/CustomShapeFeatureContainer.java
@@ -8,17 +8,13 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.task;
+package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
-import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskImageProvider;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskImageProvider.IconSize;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.diagram.BPMNFeatureProvider;
+import org.eclipse.bpmn2.modeler.core.features.Messages;
import org.eclipse.core.runtime.Assert;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.IExecutionInfo;
@@ -42,21 +38,41 @@ import org.eclipse.graphiti.mm.algorithms.Image;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.osgi.util.NLS;
+/**
+ * The Feature Container for Custom Shapes.
+ * <p>
+ * This class must be extended by contributing plug-ins that want to extend any
+ * of the BPMN2 shape elements, e.g. {@link org.eclipse.bpmn2.Task}, {@link org.eclipse.bpmn2.Gateway},
+ * {@link org.eclipse.bpmn2.Event}, etc.
+ * <p>
+ * See the {@code <customTask>} element of the
+ * {@code org.eclipse.bpmn2.modeler.runtime} extension point.
+ */
public class CustomShapeFeatureContainer extends CustomElementFeatureContainer implements IShapeFeatureContainer {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getDescription()
+ */
public String getDescription() {
if (customTaskDescriptor!=null)
return customTaskDescriptor.getDescription();
return Messages.CustomShapeFeatureContainer_Description;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#createFeatureContainer(org.eclipse.graphiti.features.IFeatureProvider)
+ */
protected IFeatureContainer createFeatureContainer(IFeatureProvider fp) {
- EClass eClass = (EClass) ModelUtil.getEClassifierFromString(
+ EClass eClass = (EClass) ModelDecorator.findEClassifier(
customTaskDescriptor.getRuntime().getModelDescriptor().getEPackage(), customTaskDescriptor.getType());
- return ((BPMNFeatureProvider)fp).getFeatureContainer(eClass.getInstanceClass());
+ return ((IBpmn2FeatureProvider)fp).getFeatureContainer(eClass.getInstanceClass());
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getFeatureContainer(org.eclipse.graphiti.features.IFeatureProvider)
+ */
protected IFeatureContainer getFeatureContainer(IFeatureProvider fp) {
if (featureContainerDelegate==null) {
featureContainerDelegate = createFeatureContainer(fp);
@@ -64,26 +80,32 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
return featureContainerDelegate;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer#getCreateFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICreateFeature getCreateFeature(IFeatureProvider fp) {
return new CreateCustomShapeFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getAddFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IAddFeature getAddFeature(IFeatureProvider fp) {
return new AddCustomShapeFeature(fp);
}
/**
- * @author bbrodt
- *
- * Base class for Custom Shape Feature construction. Custom Shapes contributed to
- * the editor MUST subclass this!
- *
+ * Base class for Custom Shape Feature construction.
+ * <p>
+ * Custom Connections contributed to the editor <b>MUST</b> subclass this in
+ * their FeatureContainer implementation.
+ * <p>
* This class is intended for creation of BPMN2 objects that have custom model
* extensions. This is for any object considered to be a "shape", e.g. Activities,
* Data Objects, Gateways, Events, etc.
- *
+ * <p>
* The creation process copies the modelObject ID string into the Graphiti create
* context during the construction phase, then migrates that ID into the created
* PictogramElement. This is necessary because the ID must be associated with the
@@ -91,20 +113,65 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
*/
public class CreateCustomShapeFeature extends AbstractBpmn2CreateFeature<BaseElement> {
+ /** The create feature delegate. */
protected AbstractBpmn2CreateFeature<BaseElement> createFeatureDelegate;
-
+
+ /** Our own copies of create name and description because the ones in super are private **/
+ protected String name;
+ protected String description;
+
+ /**
+ * Instantiates a new {@code CreateFeature} for custom shapes. If the
+ * name and/or description are null or empty strings then they are
+ * fetched from the Create Feature delegate when required.
+ *
+ * @param fp the Feature Provider
+ * @param name the name of the element being created
+ * @param description the description of the Create Feature
+ */
@SuppressWarnings({ "unchecked", "rawtypes" })
public CreateCustomShapeFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ super(fp);
IShapeFeatureContainer fc = (IShapeFeatureContainer)getFeatureContainer(fp);
createFeatureDelegate = (AbstractBpmn2CreateFeature)fc.getCreateFeature(fp);
Assert.isNotNull(createFeatureDelegate);
+ this.name = name;
+ this.description = description;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getCreateName()
+ */
+ @Override
+ public String getCreateName() {
+ if (name!=null && !name.isEmpty())
+ return name;
+ return createFeatureDelegate.getCreateName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getCreateDescription()
+ */
+ @Override
+ public String getCreateDescription() {
+ if (description!=null && !description.isEmpty())
+ return description;
+ return createFeatureDelegate.getCreateDescription();
}
+ /**
+ * Alternate constructor.
+ *
+ * @param fp the Feature Provider
+ */
public CreateCustomShapeFeature(IFeatureProvider fp) {
- this(fp, customTaskDescriptor.getName(), customTaskDescriptor.getDescription());
+ this(fp, customTaskDescriptor.getName(),
+ NLS.bind(Messages.CustomElementFeatureContainer_Create, customTaskDescriptor.getName()));
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#addGraphicalRepresentation(org.eclipse.graphiti.features.context.IAreaContext, java.lang.Object)
+ */
@Override
protected PictogramElement addGraphicalRepresentation(IAreaContext context, Object newObject) {
@@ -114,11 +181,14 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
// create the PE and copy our ID into its properties.
PictogramElement pe = getFeatureProvider().addIfPossible(addContext);
- Graphiti.getPeService().setPropertyValue(pe,CUSTOM_ELEMENT_ID,id);
+ Graphiti.getPeService().setPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID,id);
return pe;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ICreate#canCreate(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public boolean canCreate(ICreateContext context) {
// copy our ID into the CreateContext - this is where it all starts!
@@ -126,10 +196,13 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
return createFeatureDelegate.canCreate(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#createBusinessObject(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public BaseElement createBusinessObject(ICreateContext context) {
BaseElement businessObject = createFeatureDelegate.createBusinessObject(context);
- customTaskDescriptor.populateObject(businessObject, false);
+ customTaskDescriptor.populateObject(businessObject, true);
return businessObject;
}
@@ -141,6 +214,15 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
return createFeatureDelegate.getBusinessObjectClass();
}
+ /**
+ * This delegates to the CreateFeature implementation defined by the
+ * extension plugin. Note that the create() method of this delegate MUST
+ * return an array of two objects: the first object is the BPMN2
+ * element, the second object is the ContainerShape that is the
+ * graphical representation of that element.
+ *
+ * @see org.eclipse.graphiti.func.ICreate#create(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public Object[] create(ICreateContext context) {
// Our Custom Task ID should have already been set in canCreate()
@@ -150,6 +232,9 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
return createFeatureDelegate.create(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateImageId()
+ */
@Override
public String getCreateImageId() {
String icon = customTaskDescriptor.getIcon();
@@ -161,6 +246,9 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
return createFeatureDelegate.getCreateImageId();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractCreateFeature#getCreateLargeImageId()
+ */
@Override
public String getCreateLargeImageId() {
String icon = customTaskDescriptor.getIcon();
@@ -173,12 +261,21 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
}
}
+ /**
+ * The {@code AddFeature} base class for creating custom shapes.
+ * <p>
+ * Custom shapes contributed to the editor <b>MUST</b> subclass this in
+ * their FeatureContainer implementation.
+ */
public class AddCustomShapeFeature extends AbstractBpmn2AddFeature<BaseElement> {
+ /** The add feature delegate. */
protected AbstractBpmn2AddFeature<BaseElement> addFeatureDelegate;
/**
- * @param fp
+ * Instantiates a new {@code AddConnectionFeature} for custom connections.
+ *
+ * @param fp the Feature Provider
*/
public AddCustomShapeFeature(IFeatureProvider fp) {
super(fp);
@@ -186,12 +283,15 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
Assert.isNotNull(addFeatureDelegate);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#add(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public PictogramElement add(IAddContext context) {
PictogramElement pe = addFeatureDelegate.add(context);
// make sure everyone knows that this PE is a custom task
if (pe!=null)
- Graphiti.getPeService().setPropertyValue(pe,CUSTOM_ELEMENT_ID,getId());
+ peService.setPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID,getId());
// add an icon to the top-left corner if applicable, and if the implementing
// addFeatureDelegate hasn't already done so.
@@ -225,65 +325,133 @@ public class CustomShapeFeatureContainer extends CustomElementFeatureContainer i
return pe;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#getBusinessObject(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public BaseElement getBusinessObject(IAddContext context) {
// TODO Auto-generated method stub
return addFeatureDelegate.getBusinessObject(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#putBusinessObject(org.eclipse.graphiti.features.context.IAddContext, org.eclipse.emf.ecore.EObject)
+ */
@Override
public void putBusinessObject(IAddContext context, BaseElement businessObject) {
addFeatureDelegate.putBusinessObject(context, businessObject);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature#postExecute(org.eclipse.graphiti.IExecutionInfo)
+ */
@Override
public void postExecute(IExecutionInfo executionInfo) {
addFeatureDelegate.postExecute(executionInfo);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#canAdd(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public boolean canAdd(IAddContext context) {
return addFeatureDelegate.canAdd(context);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getAddLabelFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
+ @Override
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return addFeatureDelegate.getAddLabelFeature(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getHeight()
+ */
+ @Override
+ public int getHeight(IAddContext context) {
+ return addFeatureDelegate.getHeight(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getWidth()
+ */
+ @Override
+ public int getWidth(IAddContext context) {
+ return addFeatureDelegate.getWidth(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return addFeatureDelegate.getBusinessObjectType();
+ }
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getUpdateFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getUpdateFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getDirectEditingFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getDirectEditingFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getLayoutFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getLayoutFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getRemoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IRemoveFeature getRemoveFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getRemoveFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer#getMoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
IShapeFeatureContainer fc = (IShapeFeatureContainer)getFeatureContainer(fp);
return fc.getMoveFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer#getResizeFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
IShapeFeatureContainer fc = (IShapeFeatureContainer)getFeatureContainer(fp);
return fc.getResizeFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getDeleteFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
return getFeatureContainer(fp).getDeleteFeature(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer#getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
return getFeatureContainer(fp).getCustomFeatures(fp);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultConnectionRouter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultConnectionRouter.java
index e46433f7..ebb0c69a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultConnectionRouter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultConnectionRouter.java
@@ -18,13 +18,13 @@ import java.util.Comparator;
import java.util.List;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.LineSegment;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IFeatureProvider;
@@ -34,12 +34,9 @@ import org.eclipse.graphiti.features.context.IDeleteContext;
import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
import org.eclipse.graphiti.features.context.impl.DeleteContext;
import org.eclipse.graphiti.features.impl.AbstractAddShapeFeature;
-import org.eclipse.graphiti.mm.MmFactory;
-import org.eclipse.graphiti.mm.Property;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
-import org.eclipse.graphiti.mm.impl.PropertyImpl;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
@@ -54,22 +51,38 @@ import org.eclipse.graphiti.util.ColorConstant;
import org.eclipse.graphiti.util.IColorConstant;
/**
- * Router for straight-line connections from source to target.
- * Currently this does nothing but serves as a container for common
- * fields and methods.
+ * Router for straight-line connections from source to target. Currently this
+ * does nothing but serves as a container for common fields and methods.
*/
public class DefaultConnectionRouter extends AbstractConnectionRouter {
+ /** The all shapes. */
protected List<ContainerShape> allShapes;
+
+ /** The connection. */
protected Connection connection;
+
+ /** The source. */
protected Shape source;
+
+ /** The target. */
protected Shape target;
+
+ /** The target anchor. */
protected Anchor sourceAnchor, targetAnchor;
+ /**
+ * Instantiates a new default connection router.
+ *
+ * @param fp the fp
+ */
public DefaultConnectionRouter(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractConnectionRouter#route(org.eclipse.graphiti.mm.pictograms.Connection)
+ */
@Override
public boolean route(Connection connection) {
this.connection = connection;
@@ -87,9 +100,15 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
return false;
}
+ /**
+ * Initialize.
+ */
protected void initialize() {
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractConnectionRouter#dispose()
+ */
@Override
public void dispose() {
// be sure to clean up the routing info
@@ -107,6 +126,11 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
return true;
}
+ /**
+ * Find all shapes.
+ *
+ * @return the list
+ */
protected List<ContainerShape> findAllShapes() {
allShapes = new ArrayList<ContainerShape>();
Diagram diagram = fp.getDiagramTypeProvider().getDiagram();
@@ -139,7 +163,14 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
return allShapes;
}
- protected LineSegment getCollisionEdge(Point p1, Point p2) {
+ /**
+ * Gets the collision edge.
+ *
+ * @param p1 the p1
+ * @param p2 the p2
+ * @return the collision edge
+ */
+ protected GraphicsUtil.LineSegment getCollisionEdge(Point p1, Point p2) {
ContainerShape shape = getCollision(p1, p2);
if (shape!=null) {
return GraphicsUtil.findNearestEdge(shape, p1);
@@ -147,6 +178,13 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
return null;
}
+ /**
+ * Gets the collision.
+ *
+ * @param p1 the p1
+ * @param p2 the p2
+ * @return the collision
+ */
protected ContainerShape getCollision(Point p1, Point p2) {
List<ContainerShape> collisions = findCollisions(p1, p2);
if (collisions.size()==0)
@@ -157,34 +195,63 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
return collisions.get(0);
}
+ /**
+ * Find collisions.
+ *
+ * @param p1 the p1
+ * @param p2 the p2
+ * @return the list
+ */
protected List<ContainerShape> findCollisions(Point p1, Point p2) {
List<ContainerShape> collisions = new ArrayList<ContainerShape>();
if (allShapes==null)
findAllShapes();
for (ContainerShape shape : allShapes) {
- if (!FeatureSupport.isGroupShape(shape) && !FeatureSupport.isLabelShape(shape) && !FeatureSupport.isParticipant(shape))
+ if (!FeatureSupport.isGroupShape(shape) && !FeatureSupport.isLabelShape(shape) && !FeatureSupport.isParticipant(shape)) {
+ EObject bo = BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
+ if (bo instanceof FlowElementsContainer) {
+ // it's not a collision if the shape is a SubProcess and
+ // both source and target connection points lie inside the SubProcess
+ if (GraphicsUtil.contains(shape, p1) || GraphicsUtil.contains(shape, p2))
+ continue;
+ }
+
if (GraphicsUtil.intersectsLine(shape, p1, p2))
collisions.add(shape);
+ }
}
// if (collisions.size()>0)
// GraphicsUtil.dump("Collisions with line ["+p1.getX()+", "+p1.getY()+"]"+" ["+p2.getX()+", "+p2.getY()+"]", collisions);
return collisions;
}
+ /**
+ * Sort collisions.
+ *
+ * @param collisions the collisions
+ * @param p the p
+ */
protected void sortCollisions(List<ContainerShape> collisions, final Point p) {
Collections.sort(collisions, new Comparator<ContainerShape>() {
@Override
public int compare(ContainerShape s1, ContainerShape s2) {
- LineSegment seg1 = GraphicsUtil.findNearestEdge(s1, p);
+ GraphicsUtil.LineSegment seg1 = GraphicsUtil.findNearestEdge(s1, p);
double d1 = seg1.getDistance(p);
- LineSegment seg2 = GraphicsUtil.findNearestEdge(s2, p);
+ GraphicsUtil.LineSegment seg2 = GraphicsUtil.findNearestEdge(s2, p);
double d2 = seg2.getDistance(p);
return (int) (d2 - d1);
}
});
}
+ /**
+ * Find crossings.
+ *
+ * @param start the start
+ * @param end the end
+ * @return the list
+ */
protected List<Connection> findCrossings(Point start, Point end) {
// TODO: figure out why this isn't working!
List<Connection> crossings = new ArrayList<Connection>();
@@ -216,10 +283,22 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
return crossings;
}
+ /**
+ * Length.
+ *
+ * @param p1 the p1
+ * @param p2 the p2
+ * @return the double
+ */
protected static double length(Point p1, Point p2) {
return GraphicsUtil.getLength(p1, p2);
}
+ /**
+ * Draw connection routes.
+ *
+ * @param allRoutes the all routes
+ */
protected void drawConnectionRoutes(List<ConnectionRoute> allRoutes) {
if (GraphicsUtil.debug) {
@@ -242,18 +321,34 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
}
}
+ /**
+ * The Class AddRoutingConnectionFeature.
+ */
protected class AddRoutingConnectionFeature extends AbstractAddShapeFeature {
+
+ /** The Constant CONNECTION. */
public static final String CONNECTION = "ROUTING_NET_CONNECTION"; //$NON-NLS-1$
+ /**
+ * Instantiates a new adds the routing connection feature.
+ *
+ * @param fp the fp
+ */
public AddRoutingConnectionFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#canAdd(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public boolean canAdd(IAddContext ac) {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#add(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public PictogramElement add(IAddContext ac) {
IAddConnectionContext context = (IAddConnectionContext) ac;
@@ -297,21 +392,38 @@ public class DefaultConnectionRouter extends AbstractConnectionRouter {
}
}
+ /**
+ * The Class DeleteRoutingConnectionFeature.
+ */
protected class DeleteRoutingConnectionFeature extends DefaultDeleteFeature {
+ /**
+ * Instantiates a new delete routing connection feature.
+ *
+ * @param fp the fp
+ */
public DeleteRoutingConnectionFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.features.DefaultDeleteFeature#canDelete(org.eclipse.graphiti.features.context.IDeleteContext)
+ */
@Override
public boolean canDelete(IDeleteContext context) {
return true;
}
+ /**
+ * Delete.
+ */
public void delete() {
delete(null);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.features.DefaultDeleteFeature#delete(org.eclipse.graphiti.features.context.IDeleteContext)
+ */
@Override
public void delete(IDeleteContext context) {
List<Connection> deleted = new ArrayList<Connection>();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultCopyBPMNElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultCopyBPMNElementFeature.java
index 13c52442..ecce18d8 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultCopyBPMNElementFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultCopyBPMNElementFeature.java
@@ -23,12 +23,24 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.ui.features.AbstractCopyFeature;
+/**
+ * Default Graphiti {@code CopyFeature} base class for all BPMN2 model elements which
+ * are associated with BPMN DI elements.
+ */
public class DefaultCopyBPMNElementFeature extends AbstractCopyFeature {
+ /**
+ * Instantiates a new default {@code CopyFeature).
+ *
+ * @param fp the Feature Provider
+ */
public DefaultCopyBPMNElementFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.ICopyFeature#canCopy(org.eclipse.graphiti.features.context.ICopyContext)
+ */
@Override
public boolean canCopy(ICopyContext context) {
final PictogramElement[] pes = context.getPictogramElements();
@@ -46,6 +58,9 @@ public class DefaultCopyBPMNElementFeature extends AbstractCopyFeature {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.ICopyFeature#copy(org.eclipse.graphiti.features.context.ICopyContext)
+ */
@Override
public void copy(ICopyContext context) {
PictogramElement[] pes = context.getPictogramElements();
@@ -95,6 +110,12 @@ public class DefaultCopyBPMNElementFeature extends AbstractCopyFeature {
putToClipboard(copied.toArray());
}
+ /**
+ * Find all outgoing and incoming connections attached to the given list of shapes.
+ *
+ * @param shapes the shapes
+ * @return a list of connections
+ */
public static List<Connection> findAllConnections(List<PictogramElement> shapes) {
List<Connection> connections = new ArrayList<Connection>();
for (PictogramElement pe : shapes) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java
new file mode 100644
index 00000000..ee45adbf
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultDeleteBPMNShapeFeature.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IDeleteContext;
+import org.eclipse.graphiti.features.context.impl.DeleteContext;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.ui.features.DefaultDeleteFeature;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Default Graphiti {@code DeleteFeature} class for Shapes.
+ * <p>
+ */
+public class DefaultDeleteBPMNShapeFeature extends DefaultDeleteFeature {
+
+ /**
+ * Instantiates a new default delete bpmn shape feature.
+ *
+ * @param fp the fp
+ */
+ public DefaultDeleteBPMNShapeFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.features.DefaultDeleteFeature#getUserDecision(org.eclipse.graphiti.features.context.IDeleteContext)
+ */
+ @Override
+ protected boolean getUserDecision(IDeleteContext context) {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.features.DefaultDeleteFeature#canDelete(org.eclipse.graphiti.features.context.IDeleteContext)
+ */
+ public boolean canDelete(IDeleteContext context) {
+ // don't delete the Diagram!
+ if (context.getPictogramElement() instanceof Diagram)
+ return false;
+ LifecycleEvent event = new LifecycleEvent(EventType.PICTOGRAMELEMENT_CAN_DELETE,
+ getFeatureProvider(), context, context.getPictogramElement());
+ TargetRuntime.getCurrentRuntime().notify(event);
+ return event.doit;
+ }
+ public void delete(IDeleteContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof Connection) {
+ // If the connection has other connections connected to it,
+ // remove those as well.
+ List<Connection> connections = new ArrayList<Connection>();
+ for (Shape shape : AnchorUtil.getConnectionPoints((Connection)pe)) {
+ for (Anchor a : shape.getAnchors()) {
+ connections.addAll(a.getIncomingConnections());
+ connections.addAll(a.getOutgoingConnections());
+ }
+ }
+ for (Connection c : connections) {
+ DeleteContext dc = new DeleteContext(c);
+ IDeleteFeature f = getFeatureProvider().getDeleteFeature(dc);
+ f.delete(dc);
+ }
+ }
+ super.delete(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.features.DefaultDeleteFeature#deleteBusinessObject(java.lang.Object)
+ */
+ @Override
+ protected void deleteBusinessObject(Object bo) {
+ EStructuralFeature reference = ((EObject)bo).eClass().getEStructuralFeature("categoryValueRef"); //$NON-NLS-1$
+ if (reference!=null) {
+ Object v = ((EObject)bo).eGet(reference);
+ if (v instanceof EList) {
+ ((EList)v).clear();
+ }
+ }
+
+ List<PictogramElement> pictElements = Graphiti.getLinkService().getPictogramElements(getDiagram(), (EObject) bo);
+ for (Iterator<PictogramElement> iterator = pictElements.iterator(); iterator.hasNext();) {
+ PictogramElement pe = iterator.next();
+ deletePeEnvironment(pe);
+ Graphiti.getPeService().deletePictogramElement(pe);
+ }
+
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.BUSINESSOBJECT_DELETED, bo));
+
+ super.deleteBusinessObject(bo);
+ }
+
+ /**
+ * Delete pe environment.
+ *
+ * @param pictogramElement the pictogram element
+ */
+ protected void deletePeEnvironment(PictogramElement pictogramElement){
+ if (pictogramElement instanceof ContainerShape) {
+ ContainerShape containerShape = (ContainerShape) pictogramElement;
+ EList<Anchor> anchors = containerShape.getAnchors();
+ for (Anchor anchor : anchors) {
+ deleteConnections(getFeatureProvider(), anchor.getIncomingConnections());
+ deleteConnections(getFeatureProvider(), anchor.getOutgoingConnections());
+ }
+ deleteContainer(getFeatureProvider(), containerShape);
+ }
+ }
+
+ /**
+ * Delete container.
+ *
+ * @param fp the fp
+ * @param containerShape the container shape
+ */
+ protected void deleteContainer(IFeatureProvider fp, ContainerShape containerShape) {
+ Object[] children = containerShape.getChildren().toArray();
+ for (Object shape : children) {
+ if (shape instanceof ContainerShape) {
+ DeleteContext context = new DeleteContext((PictogramElement) shape);
+
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_DELETED, fp, context, shape));
+
+ fp.getDeleteFeature(context).delete(context);
+ }
+ }
+
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_DELETED, fp, null, containerShape));
+ }
+
+ /**
+ * Delete connections.
+ *
+ * @param fp the fp
+ * @param connections the connections
+ */
+ protected void deleteConnections(IFeatureProvider fp, EList<Connection> connections) {
+ List<Connection> allConnections = new ArrayList<Connection>();
+ allConnections.addAll(connections);
+ for (Connection connection : allConnections) {
+ IDeleteContext context = new DeleteContext(connection);
+
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_DELETED, fp, context, connection));
+
+ fp.getDeleteFeature(context).delete(context);
+ }
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNConnectionFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNConnectionFeature.java
index 675e62d5..0f310ca7 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNConnectionFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultLayoutBPMNConnectionFeature.java
@@ -13,42 +13,76 @@
package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.RoutingStyle;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.features.impl.AbstractLayoutFeature;
import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
/**
- * Layout Feature class for Connections. This simply invokes one of the Connection Routers
- * depending on the user preferences for each type of connection: SequenceFlow, MessageFlow,
+ * Default Graphiti {@code LayoutFeature} class for Connections.
+ * <p>
+ * This simply invokes one of the Connection Routers depending on the user
+ * preferences for each type of connection: SequenceFlow, MessageFlow,
* Association and Conversation. See the Bpmn2EditorPreferencePage for details.
*/
public class DefaultLayoutBPMNConnectionFeature extends AbstractLayoutFeature {
+ /** True if changes were made by this feature. */
boolean hasDoneChanges = false;
+ /**
+ * Instantiates a new default layout bpmn connection feature.
+ *
+ * @param fp the fp
+ */
public DefaultLayoutBPMNConnectionFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ILayout#canLayout(org.eclipse.graphiti.features.context.ILayoutContext)
+ */
@Override
public boolean canLayout(ILayoutContext context) {
// Check if automatic routing has been disabled by the user.
- Connection connection = (Connection) context.getPictogramElement();
- BaseElement be = BusinessObjectUtil.getFirstBaseElement(connection);
- Bpmn2Preferences prefs = Bpmn2Preferences.getInstance(be);
- return prefs.getEnableConnectionRouting();
+ if (context.getPictogramElement() instanceof Connection) {
+ Connection connection = (Connection) context.getPictogramElement();
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(connection);
+ Bpmn2Preferences prefs = Bpmn2Preferences.getInstance(be);
+ return prefs.getEnableConnectionRouting();
+ }
+ return false;
+ }
+
+ @Override
+ public void execute(IContext context) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ PictogramElement pe = ((IPictogramElementContext)context).getPictogramElement();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_LAYOUT, getFeatureProvider(), context, pe));
+ super.execute(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#hasDoneChanges()
+ */
@Override
public boolean hasDoneChanges() {
return hasDoneChanges;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.ILayout#layout(org.eclipse.graphiti.features.context.ILayoutContext)
+ */
@Override
public boolean layout(ILayoutContext context) {
if (canLayout(context)) {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultMoveBPMNShapeFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultMoveBPMNShapeFeature.java
index f5969c48..e8ed633e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultMoveBPMNShapeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultMoveBPMNShapeFeature.java
@@ -13,37 +13,54 @@
package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
import org.eclipse.graphiti.features.context.impl.MoveShapeContext;
import org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.platform.IDiagramContainer;
import org.eclipse.graphiti.services.Graphiti;
+/**
+ * Default Graphiti {@code MoveShapeFeature} class for Shapes.
+ * <p>
+ */
public class DefaultMoveBPMNShapeFeature extends DefaultMoveShapeFeature {
- protected int preShapeX;
- protected int preShapeY;
+ /** The shape's location before the move. */
+ protected ILocation preMoveLoc;
+ /**
+ * Instantiates a new default MoveShapeFature.
+ *
+ * @param fp the Feature Provider
+ */
public DefaultMoveBPMNShapeFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature#canMoveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
public boolean canMoveShape(IMoveShapeContext context) {
if (Graphiti.getPeService().getProperty(context.getShape(), RoutingNet.LANE)!=null) {
return false;
}
+ if (FeatureSupport.isLabelShape(context.getPictogramElement()))
+ return false;
ContainerShape targetContainer = context.getTargetContainer();
if (FeatureSupport.isLabelShape(targetContainer))
return false; // can't move a shape into a label
@@ -57,50 +74,62 @@ public class DefaultMoveBPMNShapeFeature extends DefaultMoveShapeFeature {
((MoveShapeContext)context).setSourceContainer(targetContainer.getContainer());
((MoveShapeContext)context).setTargetContainer(targetContainer.getContainer());
}
- return context.getSourceContainer() != null
- && context.getSourceContainer().equals(context.getTargetContainer());
+
+ boolean doit = true;
+// context.getSourceContainer() != null && context.getSourceContainer().equals(context.getTargetContainer());
+
+ LifecycleEvent event = new LifecycleEvent(EventType.PICTOGRAMELEMENT_CAN_MOVE,
+ getFeatureProvider(), context, context.getPictogramElement());
+ event.doit = doit;
+ TargetRuntime.getCurrentRuntime().notify(event);
+ return event.doit;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature#moveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
+ @Override
+ public void moveShape(IMoveShapeContext context) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_PRE_MOVE,
+ getFeatureProvider(), context, context.getPictogramElement()));
+
+ super.moveShape(context);
+
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_POST_MOVE,
+ getFeatureProvider(), context, context.getPictogramElement()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature#preMoveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
protected void preMoveShape(IMoveShapeContext context) {
+ preMoveLoc = Graphiti.getLayoutService().getLocationRelativeToDiagram(context.getShape());
super.preMoveShape(context);
- preShapeX = 0;
- preShapeX = 0;
-
- if (context.getShape().getGraphicsAlgorithm() != null){
- preShapeX = context.getShape().getGraphicsAlgorithm().getX();
- preShapeY = context.getShape().getGraphicsAlgorithm().getY();
- }
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature#postMoveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
protected void postMoveShape(IMoveShapeContext context) {
- DIUtils.updateDIShape(context.getPictogramElement());
-
Shape shape = context.getShape();
- // if this shape has a label, align the label so that it is centered below its owner
- for (EObject o : shape.getLink().getBusinessObjects()) {
- if (o instanceof Shape && FeatureSupport.isLabelShape((Shape)o)) {
- // this is it!
- ContainerShape textContainerShape = (ContainerShape)o;
- GraphicsUtil.alignWithShape(
- (AbstractText) textContainerShape.getChildren().get(0).getGraphicsAlgorithm(),
- textContainerShape,
- shape.getGraphicsAlgorithm().getWidth(),
- shape.getGraphicsAlgorithm().getHeight(),
- shape.getGraphicsAlgorithm().getX(),
- shape.getGraphicsAlgorithm().getY(),
- preShapeX,
- preShapeY
- );
- // make sure the text label is moved to its new parent container as well
- if (context.getSourceContainer() != context.getTargetContainer()) {
- context.getTargetContainer().getChildren().add(textContainerShape);
- }
- break;
- }
+ Point p = null;
+
+ /*
+ * If the shape being moved has a Label and the Label is
+ * {@link org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition.MOVABLE}
+ * then adjust the Label position by the move offset.
+ */
+ if (!FeatureSupport.isLabelShape(shape)) {
+ ILocation postMoveLoc = Graphiti.getPeService().getLocationRelativeToDiagram(shape);
+ p = GraphicsUtil.createPoint(postMoveLoc.getX()-preMoveLoc.getX(), postMoveLoc.getY()-preMoveLoc.getY());
+ DIUtils.updateDIShape(shape);
+ FeatureSupport.updateLabel(getFeatureProvider(), shape, p);
}
+
if (shape instanceof ContainerShape) {
PictogramElement pe = (PictogramElement) ((ContainerShape)shape).eContainer();
if (BusinessObjectUtil.containsElementOfType(pe, SubProcess.class)) {
@@ -128,6 +157,5 @@ public class DefaultMoveBPMNShapeFeature extends DefaultMoveShapeFeature {
FeatureSupport.updateCategoryValues(getFeatureProvider(), c);
}
}
-
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultPasteBPMNElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultPasteBPMNElementFeature.java
index d72673b4..9ad91cf9 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultPasteBPMNElementFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultPasteBPMNElementFeature.java
@@ -21,7 +21,7 @@ import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.BoundaryEvent;
-import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Bpmn2Factory;
import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.ConversationLink;
import org.eclipse.bpmn2.Definitions;
@@ -46,24 +46,25 @@ import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.BoundaryAnchor;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.IShapeFilter;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.datatypes.ILocation;
-import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateConnectionFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.ICreateConnectionContext;
import org.eclipse.graphiti.features.context.IPasteContext;
import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
import org.eclipse.graphiti.features.context.impl.AreaContext;
+import org.eclipse.graphiti.features.context.impl.CreateConnectionContext;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
import org.eclipse.graphiti.mm.pictograms.Anchor;
@@ -76,25 +77,51 @@ import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.features.AbstractPasteFeature;
+/**
+ * Default Graphiti {@code PasteFeature} class for Shapes.
+ * <p>
+ */
public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
- public static final String COPIED_BPMN_SHAPE = "copied.bpmn.shape";
- public static final String COPIED_BPMN_OBJECT = "copied.bpmn.object";
- public static final String COPY_FROM_CONTEXT = "copy.from.context";
-
+ /** The EMF Resource. */
protected Resource resource;
+
+ /** The BPMN2 Definitions object - the root element of the document. */
protected Definitions definitions;
+
+ /**
+ * Maps the ID strings of the original BPMN2 elements to their
+ * corresponding newly constructed copies.
+ */
protected Hashtable<String, String> idMap;
+
+ /** The shape map. */
protected HashMap<ContainerShape, ContainerShape> shapeMap;
+
+ /** The connection map. */
protected HashMap<Connection, Connection> connectionMap;
+
+ /** The x reference. */
protected int xReference;
+
+ /** The y reference. */
protected int yReference;
+
+ /** The diagram. */
protected Diagram diagram;
+ /**
+ * Instantiates a new default {@code PasteFeature).
+ *
+ * @param fp the Feature Provider
+ */
public DefaultPasteBPMNElementFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.IPasteFeature#canPaste(org.eclipse.graphiti.features.context.IPasteContext)
+ */
@Override
public boolean canPaste(IPasteContext context) {
// target must be a FlowElementsContainer (Process, etc.)
@@ -106,7 +133,7 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
return false;
Object[] pasteObjects;
- if (context.getProperty(COPY_FROM_CONTEXT) != null) {
+ if (context.getProperty(GraphitiConstants.COPY_FROM_CONTEXT) != null) {
// Get objects to paste from the context. This can be used to test if
// objects can be pasted before they have been copied to the clipboard.
pasteObjects = context.getPictogramElements();
@@ -138,6 +165,10 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
if (pe instanceof Shape && FeatureSupport.isLabelShape((Shape)pe)) {
continue;
}
+ // Participants can only be pasted into into a Collaboration
+ if (be instanceof Participant && !(targetContainerObject instanceof Collaboration)) {
+ continue;
+ }
++count;
}
if (count==0)
@@ -146,9 +177,11 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.IPasteFeature#paste(org.eclipse.graphiti.features.context.IPasteContext)
+ */
@Override
public void paste(IPasteContext context) {
- // TODO: COPY-PASTE
ContainerShape targetContainerShape = getTargetContainerShape(context);
BaseElement targetContainerObject = getContainerObject(targetContainerShape);
@@ -222,34 +255,73 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
this.getDiagramEditor().setPictogramElementsForSelection(newPes);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.ui.features.AbstractPasteFeature#getFromClipboard()
+ */
protected Object[] getFromClipboard() {
List<Object> allObjects = new ArrayList<Object>();
Object[] objects = super.getFromClipboard();
- for (Object o : objects)
- allObjects.add(o);
+ for (Object object : objects) {
+ if (object instanceof EObject && ((EObject)object).eContainer()!=null)
+ allObjects.add(object);
+ }
List<Object> filteredObjects = new ArrayList<Object>();
for (Object object : allObjects) {
- if (object instanceof ContainerShape && !FeatureSupport.isLabelShape((Shape)object)) {
- filteredObjects.add(object);
- }
- else if (object instanceof Connection) {
- Connection c = (Connection)object;
- if (allObjects.contains(c.getStart().getParent()) &&
- allObjects.contains(c.getEnd().getParent())) {
+ if (object instanceof EObject && ((EObject)object).eContainer()!=null) {
+ if (object instanceof ContainerShape) {
filteredObjects.add(object);
}
+ else if (object instanceof Connection) {
+ Connection c = (Connection)object;
+ if (c.getStart()!=null && c.getEnd()!=null) {
+ if (allObjects.contains(c.getStart().getParent()) &&
+ allObjects.contains(c.getEnd().getParent())) {
+ filteredObjects.add(object);
+ }
+ }
+ }
}
}
return filteredObjects.toArray();
}
-
+
+ public <T extends EObject> T copyEObject(T eObject) {
+ Copier copier = new Copier() {
+ @Override
+ protected EObject createCopy(EObject eObject) {
+ EClass eClass = getTarget(eObject.eClass());
+ if (eClass.getEPackage().getEFactoryInstance() == Bpmn2Factory.eINSTANCE) {
+ return Bpmn2ModelerFactory.create(resource, eClass);
+ }
+ return super.createCopy(eObject);
+ }
+
+ };
+ EObject result = copier.copy(eObject);
+ copier.copyReferences();
+
+ @SuppressWarnings("unchecked")
+ T t = (T) result;
+ return t;
+ }
+
private BaseElement createNewObject(BaseElement oldObject, BaseElement targetContainerObject) {
Bpmn2ModelerFactory.setEnableModelExtensions(false);
- BaseElement newObject = EcoreUtil.copy(oldObject);
+ BaseElement newObject = copyEObject(oldObject);
Bpmn2ModelerFactory.setEnableModelExtensions(true);
+ if (targetContainerObject instanceof Participant) {
+ // need to create a Process for target container if it doesn't have one yet
+ Participant participant = (Participant) targetContainerObject;
+ if (participant.getProcessRef()==null) {
+ Process process = Bpmn2ModelerFactory.create(resource, Process.class);
+ participant.setProcessRef(process);
+ }
+ targetContainerObject = participant.getProcessRef();
+ }
+
// get rid of some of the objects created by EcoreUtil.copy() as these will be
// constructed here because we need to create the Graphiti shapes and DI elements
// along with these
@@ -387,6 +459,14 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
return oldId;
}
+ private boolean wasCopied(EObject object) {
+ String id = getId(object);
+ if (id!=null) {
+ return idMap.containsValue(id);
+ }
+ return false;
+ }
+
private EObject findObjectById(String id) {
TreeIterator<EObject> iter = definitions.eAllContents();
while (iter.hasNext()) {
@@ -447,12 +527,12 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
BPMNShape oldBpmnShape = null;
if (oldObject instanceof BaseElement) {
oldBpmnShape = DIUtils.findBPMNShape((BaseElement)oldObject);
- ac.putProperty(COPIED_BPMN_SHAPE, oldBpmnShape);
+ ac.putProperty(GraphitiConstants.COPIED_BPMN_SHAPE, oldBpmnShape);
}
- ac.putProperty(COPIED_BPMN_OBJECT, oldObject);
+ ac.putProperty(GraphitiConstants.COPIED_BPMN_OBJECT, oldObject);
- IAddFeature af = getFeatureProvider().getAddFeature(ac);
- ContainerShape newShape = (ContainerShape) af.add(ac);
+
+ ContainerShape newShape = (ContainerShape) getFeatureProvider().addIfPossible(ac);
shapeMap.put(oldShape, newShape);
@@ -463,6 +543,8 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
// create shapes and connections for children if this is a FlowElementsContainer
if (oldObject instanceof FlowElementsContainer) {
+ List<ContainerShape> childShapes = new ArrayList<ContainerShape>();
+ List<Connection> childConnections = new ArrayList<Connection>();
TreeIterator<EObject> iter = oldObject.eAllContents();
while (iter.hasNext()) {
// look up the old child object that corresponds to the new child object
@@ -472,25 +554,30 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
// new attachedToRef task is actually created.
continue;
}
+ if (wasCopied(oldChildObject)) {
+ // stop infinite recursion: this would happen if a FlowElementsContainer
+ //was copied into itself.
+ continue;
+ }
// if the old child has a Graphiti ContainerShape, duplicate it.
ContainerShape oldChildShape = findShape(oldChildObject);
if (oldChildShape != null) {
- copyShape(oldChildShape, newShape, 0, 0);
+ childShapes.add(oldChildShape);
}
- }
-
- iter = oldObject.eAllContents();
- while (iter.hasNext()) {
- // do the same for connections
- EObject oldChildObject = iter.next();
- // if the old child has a Graphiti Connection, duplicate it.
Connection oldChildConnection = findConnection(oldChildObject);
if (oldChildConnection != null) {
- // the old BPMN2 object is a Connection, copy it
- copyConnection(oldChildConnection, newShape, x, y);
+ childConnections.add(oldChildConnection);
}
}
+
+ for (ContainerShape oldChildShape : childShapes) {
+ copyShape(oldChildShape, newShape, 0, 0);
+ }
+
+ for (Connection oldChildConnection : childConnections) {
+ copyConnection(oldChildConnection, newShape, x, y);
+ }
}
else if (oldObject instanceof Lane) {
List<PictogramElement> shapes = new ArrayList<PictogramElement>();
@@ -529,7 +616,7 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
UpdateContext uc = new UpdateContext(newShape);
IUpdateFeature uf = getFeatureProvider().getUpdateFeature(uc);
// force an update to cause the newly created ContainerShape to be rendered properly
- uc.putProperty(MultiUpdateFeature.FORCE_UPDATE_ALL, Boolean.TRUE);
+ uc.putProperty(GraphitiConstants.FORCE_UPDATE_ALL, Boolean.TRUE);
uf.update(uc);
if (newObject instanceof Activity) {
@@ -611,8 +698,7 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
AddConnectionContext acc = new AddConnectionContext(newStart, newEnd);
acc.setNewObject(newObject);
- IAddFeature af = getFeatureProvider().getAddFeature(acc);
- Connection newConnection = (Connection) af.add(acc);
+ Connection newConnection = (Connection) getFeatureProvider().addIfPossible(acc);
connectionMap.put(oldConnection, newConnection);
if (oldConnection instanceof FreeFormConnection && newConnection instanceof FreeFormConnection) {
@@ -624,7 +710,7 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
}
}
- // also copy the BPMNShape properties
+ // also copy the BPMNEdge properties
if (oldObject instanceof BaseElement) {
BPMNEdge oldBpmnEdge = DIUtils.findBPMNEdge((BaseElement)oldObject);
if (oldBpmnEdge!=null) {
@@ -642,12 +728,12 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
Diagram diagram = getFeatureProvider().getDiagramTypeProvider().getDiagram();
Point p = GraphicsUtil.createPoint(context.getX(), context.getY());
- Shape s = GraphicsUtil.findShapeAt(diagram, p, new IShapeFilter() {
+ Shape s = GraphicsUtil.findShapeAt(diagram, p, new GraphicsUtil.IShapeFilter() {
@Override
public boolean matches(Shape shape) {
if (shape instanceof ContainerShape) {
BaseElement be = getContainerObject((ContainerShape) shape);
- return be instanceof FlowElementsContainer;
+ return be instanceof FlowElementsContainer || be instanceof Participant;
}
return false;
}
@@ -663,9 +749,11 @@ public class DefaultPasteBPMNElementFeature extends AbstractPasteFeature {
bo = ((BPMNDiagram) bo).getPlane().getBpmnElement();
}
if (bo instanceof Participant) {
+ if (!FeatureSupport.isChoreographyParticipantBand(targetContainerShape))
+ return (Participant) bo;
bo = ((Participant) bo).getProcessRef();
}
- if (bo instanceof FlowElementsContainer || bo instanceof Lane)
+ if (bo instanceof FlowElementsContainer || bo instanceof Lane || bo instanceof Collaboration)
return (BaseElement) bo;
return null;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultRemoveBPMNShapeFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultRemoveBPMNShapeFeature.java
index 06d4aa58..220dbad7 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultRemoveBPMNShapeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultRemoveBPMNShapeFeature.java
@@ -17,19 +17,26 @@ import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IRemoveContext;
import org.eclipse.graphiti.features.impl.DefaultRemoveFeature;
+// TODO: Auto-generated Javadoc
/**
- * @author Bob Brodt
+ * The Class DefaultRemoveBPMNShapeFeature.
*
+ * @author Bob Brodt
*/
public class DefaultRemoveBPMNShapeFeature extends DefaultRemoveFeature {
/**
- * @param fp
+ * Instantiates a new default remove bpmn shape feature.
+ *
+ * @param fp the fp
*/
public DefaultRemoveBPMNShapeFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultRemoveFeature#canRemove(org.eclipse.graphiti.features.context.IRemoveContext)
+ */
@Override
public boolean canRemove(IRemoveContext context) {
return false;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultResizeBPMNShapeFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultResizeBPMNShapeFeature.java
index 780743e0..c772f6b4 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultResizeBPMNShapeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DefaultResizeBPMNShapeFeature.java
@@ -12,7 +12,10 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
@@ -23,26 +26,72 @@ import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.Shape;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class DefaultResizeBPMNShapeFeature.
+ */
public class DefaultResizeBPMNShapeFeature extends DefaultResizeShapeFeature {
+ /**
+ * Instantiates a new default resize bpmn shape feature.
+ *
+ * @param fp the fp
+ */
public DefaultResizeBPMNShapeFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature#canResizeShape(org.eclipse.graphiti.features.context.IResizeShapeContext)
+ */
+ @Override
+ public boolean canResizeShape(IResizeShapeContext context) {
+ if (FeatureSupport.isLabelShape(context.getPictogramElement()))
+ return false;
+
+ boolean doit = super.canResizeShape(context);
+ LifecycleEvent event = new LifecycleEvent(EventType.PICTOGRAMELEMENT_CAN_RESIZE,
+ getFeatureProvider(), context, context.getPictogramElement());
+ event.doit = doit;
+ TargetRuntime.getCurrentRuntime().notify(event);
+ return event.doit;
+ }
+
+ protected void preResizeShape(IResizeShapeContext context) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_PRE_RESIZE,
+ getFeatureProvider(), context, context.getPictogramElement()));
+
+ }
+
+ protected void postResizeShape(IResizeShapeContext context) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_POST_RESIZE,
+ getFeatureProvider(), context, context.getPictogramElement()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature#resizeShape(org.eclipse.graphiti.features.context.IResizeShapeContext)
+ */
@Override
public void resizeShape(IResizeShapeContext context) {
- Shape shape = null;
- if (context.getPictogramElement() instanceof Shape) {
- shape = (Shape) context.getPictogramElement();
- }
+ preResizeShape(context);
+ internalResizeShape(context);
+ postResizeShape(context);
+ }
+
+ protected void internalResizeShape(IResizeShapeContext context) {
+ Shape shape = context.getShape();
super.resizeShape(context);
if (shape!=null) {
AnchorUtil.relocateFixPointAnchors(shape, context.getWidth(), context.getHeight());
}
- DIUtils.updateDIShape(context.getPictogramElement());
+ DIUtils.updateDIShape(context.getPictogramElement());
+ FeatureSupport.updateLabel(getFeatureProvider(), shape, null);
+
FeatureSupport.updateConnections(getFeatureProvider(), shape);
for (Connection connection : getDiagram().getConnections()) {
@@ -50,7 +99,6 @@ public class DefaultResizeBPMNShapeFeature extends DefaultResizeShapeFeature {
FeatureSupport.updateConnection(getFeatureProvider(), connection);
}
}
-
FeatureSupport.updateCategoryValues(getFeatureProvider(), shape);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DetourPoints.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DetourPoints.java
index 0b5cfb75..d6856336 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DetourPoints.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DetourPoints.java
@@ -21,27 +21,64 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Shape;
/**
- * Calculates detour cuts for a given shape. These cuts surround the shape at each of the corners
- * of the shape's bounding rectangle, but "just outside" the shape.
+ * Calculates detours for a given shape. These routes surround the shape at each
+ * of the corners of the shape's bounding rectangle, but "just outside" the
+ * shape.
*/
public class DetourPoints {
+
+ /** The left margin. */
public int leftMargin = 10;
+
+ /** The right margin. */
public int rightMargin = 10;
+
+ /** The top margin. */
public int topMargin = 10;
+
+ /** The bottom margin. */
public int bottomMargin = 10;
+
+ /** The top left. */
public Point topLeft;
+
+ /** The top right. */
public Point topRight;
+
+ /** The bottom left. */
public Point bottomLeft;
+
+ /** The bottom right. */
public Point bottomRight;
+ /**
+ * Instantiates a new detour points.
+ *
+ * @param shape the shape
+ */
public DetourPoints(ContainerShape shape) {
calculate(shape);
}
+ /**
+ * Instantiates a new detour points.
+ *
+ * @param shape the shape
+ * @param margin the margin
+ */
public DetourPoints(ContainerShape shape, int margin) {
this(shape,margin,margin,margin,margin);
}
+ /**
+ * Instantiates a new detour points.
+ *
+ * @param shape the shape
+ * @param leftMargin the left margin
+ * @param rightMargin the right margin
+ * @param topMargin the top margin
+ * @param bottomMargin the bottom margin
+ */
public DetourPoints(ContainerShape shape, int leftMargin, int rightMargin, int topMargin, int bottomMargin) {
this.leftMargin = leftMargin;
this.rightMargin = rightMargin;
@@ -50,6 +87,11 @@ public class DetourPoints {
calculate(shape);
}
+ /**
+ * Calculate.
+ *
+ * @param shape the shape
+ */
protected void calculate(Shape shape) {
ILocation loc = BendpointConnectionRouter.peService.getLocationRelativeToDiagram(shape);
IDimension size = GraphicsUtil.calculateSize(shape);
@@ -59,6 +101,12 @@ public class DetourPoints {
bottomRight = GraphicsUtil.createPoint(loc.getX() + size.getWidth() + leftMargin, loc.getY() + size.getHeight() + bottomMargin);
}
+ /**
+ * Gets the nearest.
+ *
+ * @param p the p
+ * @return the nearest
+ */
public Point getNearest(Point p) {
Point nearest = topLeft;
int dmin = (int)GraphicsUtil.getLength(p, topLeft);
@@ -85,6 +133,12 @@ public class DetourPoints {
return nearest;
}
+ /**
+ * Gets the diagonal.
+ *
+ * @param p the p
+ * @return the diagonal
+ */
protected Point getDiagonal(Point p) {
if (p==topLeft)
return bottomRight;
@@ -97,6 +151,12 @@ public class DetourPoints {
return null;
}
+ /**
+ * Gets the horz opposite.
+ *
+ * @param p the p
+ * @return the horz opposite
+ */
protected Point getHorzOpposite(Point p) {
if (p==topLeft)
return topRight;
@@ -109,6 +169,12 @@ public class DetourPoints {
return null;
}
+ /**
+ * Gets the vert opposite.
+ *
+ * @param p the p
+ * @return the vert opposite
+ */
protected Point getVertOpposite(Point p) {
if (p==topLeft)
return bottomLeft;
@@ -121,14 +187,32 @@ public class DetourPoints {
return null;
}
+ /**
+ * Checks if is top.
+ *
+ * @param p the p
+ * @return true, if is top
+ */
protected boolean isTop(Point p) {
return p==topLeft || p==topRight;
}
+ /**
+ * Checks if is left.
+ *
+ * @param p the p
+ * @return true, if is left
+ */
protected boolean isLeft(Point p) {
return p==topLeft || p==bottomLeft;
}
+ /**
+ * Gets the sector.
+ *
+ * @param p the p
+ * @return the sector
+ */
protected int getSector(Point p) {
int px = p.getX();
int py = p.getY();
@@ -164,6 +248,13 @@ public class DetourPoints {
throw new IllegalArgumentException("Logic error in getSector()"); //$NON-NLS-1$
}
+ /**
+ * Calculate detour.
+ *
+ * @param p1 the p1
+ * @param p2 the p2
+ * @return the list
+ */
public List<Point> calculateDetour(Point p1, Point p2) {
List<Point> detour = new ArrayList<Point>();
@@ -289,7 +380,7 @@ public class DetourPoints {
if (isTop(np2)) {
// check top edge
if (p1.getY()>topLeft.getY() && p2.getY()>topLeft.getY()) {
- // both cuts below top edge
+ // both points below top edge
detour.add(np1);
detour.add(np2);
}
@@ -303,7 +394,7 @@ public class DetourPoints {
else {
// check bottom edge
if (p1.getY()<bottomLeft.getY() && p2.getY()<bottomLeft.getY()) {
- // both cuts above bottom edge
+ // both points above bottom edge
detour.add(np1);
detour.add(np2);
}
@@ -319,7 +410,7 @@ public class DetourPoints {
if (isLeft(np2)) {
// check left edge
if (p1.getX()>topLeft.getX() && p2.getX()>topLeft.getX()) {
- // both cuts to right of left edge
+ // both points to right of left edge
detour.add(np1);
detour.add(np2);
}
@@ -331,7 +422,7 @@ public class DetourPoints {
else {
// check right edge
if (p1.getX()<topRight.getX() && p2.getX()<topRight.getX()) {
- // both cuts to right of left edge
+ // both points to right of left edge
detour.add(np1);
detour.add(np2);
}
@@ -345,6 +436,12 @@ public class DetourPoints {
return detour;
}
+ /**
+ * Intersects.
+ *
+ * @param d2 the d2
+ * @return true, if successful
+ */
public boolean intersects(DetourPoints d2) {
return GraphicsUtil.intersects(
this.topLeft.getX(), this.topLeft.getY(), this.topRight.getX() - this.topLeft.getX(), this.bottomLeft.getY() - this.topLeft.getY(),
@@ -352,6 +449,12 @@ public class DetourPoints {
);
}
+ /**
+ * Contains.
+ *
+ * @param d2 the d2
+ * @return true, if successful
+ */
public boolean contains(DetourPoints d2) {
return this.topLeft.getX()<=d2.topLeft.getX() &&
this.topRight.getX()>=d2.topRight.getX() &&
@@ -359,6 +462,11 @@ public class DetourPoints {
this.bottomLeft.getY()>=d2.bottomLeft.getY();
}
+ /**
+ * Merge.
+ *
+ * @param d2 the d2
+ */
public void merge(DetourPoints d2) {
this.topLeft.setX( Math.min(this.topLeft.getX(), d2.topLeft.getX()) );
this.topLeft.setY( Math.min(this.topLeft.getY(), d2.topLeft.getY()) );
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DirectEditBaseElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DirectEditBaseElementFeature.java
index 033947e8..8887b17b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DirectEditBaseElementFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/DirectEditBaseElementFeature.java
@@ -13,6 +13,7 @@
package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDirectEditingContext;
@@ -20,42 +21,63 @@ import org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class DirectEditBaseElementFeature.
+ */
public class DirectEditBaseElementFeature extends AbstractDirectEditingFeature {
+ /**
+ * Instantiates a new direct edit base element feature.
+ *
+ * @param fp the fp
+ */
public DirectEditBaseElementFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IDirectEditing#getEditingType()
+ */
@Override
public int getEditingType() {
return TYPE_TEXT;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IDirectEditing#getInitialValue(org.eclipse.graphiti.features.context.IDirectEditingContext)
+ */
@Override
public String getInitialValue(IDirectEditingContext context) {
BaseElement be = getBusinessObject(context);
- EStructuralFeature feature = be.eClass().getEStructuralFeature("name");
+ EStructuralFeature feature = be.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
if (feature!=null)
return (String) be.eGet(feature);
- return "";
+ return ""; //$NON-NLS-1$
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature#setValue(java.lang.String, org.eclipse.graphiti.features.context.IDirectEditingContext)
+ */
@Override
public void setValue(String value, IDirectEditingContext context) {
BaseElement be = getBusinessObject(context);
- EStructuralFeature feature = be.eClass().getEStructuralFeature("name");
+ EStructuralFeature feature = be.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
if (feature!=null) {
be.eSet(feature, value);
- PictogramElement e = context.getPictogramElement();
- updatePictogramElement(((Shape) e).getContainer());
+ PictogramElement pe = context.getPictogramElement();
+ FeatureSupport.updateLabel(getFeatureProvider(), ((Shape) pe).getContainer(), null);
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature#canDirectEdit(org.eclipse.graphiti.features.context.IDirectEditingContext)
+ */
@Override
public boolean canDirectEdit(IDirectEditingContext context) {
PictogramElement pe = context.getPictogramElement();
Object bo = getBusinessObjectForPictogramElement(pe);
- if (bo instanceof BaseElement && ((BaseElement)bo).eClass().getEStructuralFeature("name")!=null)
+ if (bo instanceof BaseElement && ((BaseElement)bo).eClass().getEStructuralFeature("name")!=null) //$NON-NLS-1$
return true;
return false;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/FeatureResolver.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/FeatureResolver.java
index dc2034a1..f546f21e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/FeatureResolver.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/FeatureResolver.java
@@ -26,23 +26,88 @@ import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface FeatureResolver.
+ */
public interface FeatureResolver {
+ /**
+ * Gets the creates the connection features.
+ *
+ * @param fp the fp
+ * @return the creates the connection features
+ */
List<ICreateConnectionFeature> getCreateConnectionFeatures(IFeatureProvider fp);
+ /**
+ * Gets the creates the features.
+ *
+ * @param fp the fp
+ * @return the creates the features
+ */
List<ICreateFeature> getCreateFeatures(IFeatureProvider fp);
+ /**
+ * Gets the adds the feature.
+ *
+ * @param fp the fp
+ * @param e the e
+ * @return the adds the feature
+ */
IAddFeature getAddFeature(IFeatureProvider fp, BaseElement e);
+ /**
+ * Gets the direct editing feature.
+ *
+ * @param fp the fp
+ * @param e the e
+ * @return the direct editing feature
+ */
IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp, BaseElement e);
+ /**
+ * Gets the layout feature.
+ *
+ * @param fp the fp
+ * @param e the e
+ * @return the layout feature
+ */
ILayoutFeature getLayoutFeature(IFeatureProvider fp, BaseElement e);
+ /**
+ * Gets the update feature.
+ *
+ * @param fp the fp
+ * @param e the e
+ * @return the update feature
+ */
IUpdateFeature getUpdateFeature(IFeatureProvider fp, BaseElement e);
+ /**
+ * Gets the move feature.
+ *
+ * @param fp the fp
+ * @param e the e
+ * @return the move feature
+ */
IMoveShapeFeature getMoveFeature(IFeatureProvider fp, BaseElement e);
+ /**
+ * Gets the resize feature.
+ *
+ * @param fp the fp
+ * @param e the e
+ * @return the resize feature
+ */
IResizeShapeFeature getResizeFeature(IFeatureProvider fp, BaseElement e);
+ /**
+ * Gets the delete feature.
+ *
+ * @param fp the fp
+ * @param e the e
+ * @return the delete feature
+ */
IDeleteFeature getDeleteFeature(IFeatureProvider fp, BaseElement e);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/GraphitiConstants.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/GraphitiConstants.java
new file mode 100644
index 00000000..14c90637
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/GraphitiConstants.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import java.util.Hashtable;
+
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.Image;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+/**
+ * Keys used to store Graphiti Shape and Context properties.
+ * <p>
+ * Some figure construction and updating operations need to pass information
+ * from one Graphiti Feature to another (e.g. during a CreateFeature the
+ * AddFeature, UpdateFeature and LayouFeatures are invoked). This is done
+ * through the Shape property list, and the {@link IContext} property list. Note
+ * that Shape properties are String only, whereas IContext properties are
+ * Objects, allowing greater flexibility when passing information from Feature
+ * to Feature. Shape properties must be encoded into Strings if we need to
+ * handle Objects.
+ */
+public interface GraphitiConstants {
+
+ /**
+ * The {@link IContext} key that holds a reference to a BPMN2 model object
+ * during creation of its visual representation.
+ */
+ public static final String BUSINESS_OBJECT = "businessObject"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies a Shape as a Label. Labels
+ * are managed separately from their owners and can be located either above,
+ * below, to the left or right of its owning shape. See the
+ * {@link UpdateLabelFeature} class for more information
+ **/
+ public static final String LABEL_SHAPE = "label.shape"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that indicates if a Label has changed and
+ * its Shape needs to be updated
+ **/
+ public static final String LABEL_CHANGED = "label.changed"; //$NON-NLS-1$
+
+ /**
+ * The {@link IContext} property key that holds a reference to a
+ * {@link Point} object, which represents an offset (x,y) distance a Label
+ * should be moved when its {@link Shape} is updated.
+ **/
+ public static final String LABEL_OFFSET = "label.offset"; //$NON-NLS-1$
+
+ /**
+ * The {@link IContext} property key that holds a reference to a
+ * {@link Hashtable}. The Hashtable maps a PictogramElement to a move delta.
+ * This is used when the orientation of a Lane or Pool is changed - each of
+ * the contained shapes are transposed by a different x/y delta, depending
+ * on their location within the Lane or Pool.
+ */
+ public static final String LABEL_OFFSET_MAP = "label.offset.map"; //$NON-NLS-1$
+
+ /**
+ * The {@link IContext} property key that holds a reference to a single
+ * {@link PictogramElement} object. The PE is used to identify the owner of
+ * a Label Shape.
+ **/
+ public static final String PICTOGRAM_ELEMENT = "pictogram.element"; //$NON-NLS-1$
+
+ /**
+ * The {@link IContext} property key that holds a reference to a List of
+ * {@link PictogramElement} objects that were created during a
+ * {@link MultiAddFeature} or {@link CompoundCreateFeature}
+ **/
+ public static final String PICTOGRAM_ELEMENTS = "pictogram.elements"; //$NON-NLS-1$
+
+ /**
+ * The {@link IContext} property key that indicates the editor is importing
+ * objects and that the {@llink PictogramElement} Create and Add Features
+ * should populate the object from BPMN DI values instead of providing
+ * defaults.
+ **/
+ public static final String IMPORT_PROPERTY = "is.importing"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as the
+ * Validation Decorator. This is an image decorator attached to the top-left
+ * corner of a BPMN2 shape visual to indicate validation errors/warnings. A
+ * ToolTip on the decorator shape displays the validation message text.
+ * Validation Decorators are created for all BPMN2 shapes, i.e. Tasks,
+ * Gateways, Events, etc.
+ **/
+ public static final String VALIDATION_DECORATOR = "validation.decorator"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as the
+ * Activity's border decoration. This is a rounded rectangle drawn in the
+ * Activity's foreground color. This shape optionally owns an {@link Image}
+ * {@link GraphicsAlgorithm} which appears inside the top-left corner and is
+ * used to identify the Activity type, i.e. a hand icon for Manual Task, a
+ * person icon for User Task, envelope icons for Send and Receive Tasks,
+ * etc.
+ **/
+ public static final String ACTIVITY_BORDER = "activity.border"; //$NON-NLS-1$
+
+ /** The Constant ACTIVITY_MOVE_PROPERTY. */
+ public static final String ACTIVITY_MOVE_PROPERTY = "activity.move"; //$NON-NLS-1$
+
+ /** The Constant SELECTION_MOVE_PROPERTY. */
+ public static final String SELECTION_MOVE_PROPERTY = "selection.move"; //$NON-NLS-1$
+
+ /** The is compensate property. */
+ public final static String IS_COMPENSATE_PROPERTY = "marker.compensate"; //$NON-NLS-1$
+
+ /** The is loop or multi instance. */
+ public final static String IS_LOOP_OR_MULTI_INSTANCE = "marker.loop.or.multi"; //$NON-NLS-1$
+
+ public final static String COMMAND_HINT = "command.hint"; //$NON-NLS-1$
+
+ public static final String COLLECTION_PROPERTY = "isCollection"; //$NON-NLS-1$
+
+ public static final String HIDEABLE_PROPERTY = "hideable"; //$NON-NLS-1$
+
+ public static final String DATASTATE_PROPERTY = "datastate"; //$NON-NLS-1$
+
+ public static final String IS_HORIZONTAL_PROPERTY = "isHorizontal"; //$NON-NLS-1$
+
+ public static final String TOOLTIP_PROPERTY = "tooltip"; //$NON-NLS-1$
+
+ public final static String EVENT_DEFINITION_SHAPE = "event.definition.shape";
+
+ public static final String EVENT_ELEMENT = "event.graphics.element"; //$NON-NLS-1$
+
+ public static final String EVENT_CIRCLE = "event.graphics.element.circle"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as the Activity
+ * Marker container. This ContainerShape contains a number of child shapes,
+ * (see the "ACTIVITY_MARKER_..." constants, below) which are used to
+ * indicate some kind of state or behavior for a BPMN2 Activity. The
+ * children shapes are made visible or invisible depending on the
+ * corresponding Activity state attribute. The ContainerShape is drawn at
+ * the bottom-center of Activity figures.
+ */
+ public static final String ACTIVITY_MARKER_CONTAINER = "activity.marker.container"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as an Activity
+ * Marker container child shape. This shape indicates that an Activity is
+ * used for some kind of compensation processing, indicated by two
+ * left-pointing chevrons. This shape is made visible when the Activity's
+ * "isForCompensation" attribute is set to TRUE.
+ */
+ public static final String ACTIVITY_MARKER_COMPENSATE = "activity.marker.compensate"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as an Activity
+ * Marker container child shape. When this shape is visible, it indicates
+ * the Looping Characteristics for an Activity are set to "Standard". This
+ * is represented by a circular, counter-clockwise pointing arrow.
+ */
+ public static final String ACTIVITY_MARKER_LC_STANDARD = "activity.marker.lc.standard"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as an Activity
+ * Marker container child shape. When this shape is visible, it indicates
+ * the Looping Characteristics for an Activity are set to "Sequential". This
+ * is represented by three small horizontal lines.
+ */
+ public static final String ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL = "activity.marker.lc.multi.sequential"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as an Activity
+ * Marker container child shape. When this shape is visible, it indicates
+ * the Looping Characteristics for an Activity are set to "Parallel". This
+ * is represented by three small vertical lines.
+ */
+ public static final String ACTIVITY_MARKER_LC_MULTI_PARALLEL = "activity.marker.lc.multi.parallel"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as an Activity
+ * Marker container child shape. When this shape is visible, it indicates
+ * the Activity is an "ad-hoc" Sub Process. This is represented by a tilde
+ * shape.
+ */
+ public static final String ACTIVITY_MARKER_AD_HOC = "activity.marker.adhoc"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that identifies this Shape as an Activity
+ * Marker container child shape. When this shape is visible, it indicates
+ * the Activity is a Sub Process shown in its collapsed state. This is
+ * represented by a small square containing a "+" sign. When the Sub Process
+ * is expanded, this shape is made invisible.
+ */
+ public static final String ACTIVITY_MARKER_EXPAND = "activity.marker.expand"; //$NON-NLS-1$
+
+ /**
+ * The {@link Shape} property key that can be used to offset the vertical
+ * position of the Activity Marker ContainerShape. This is necessary for
+ * Choreography Activities which may have one or more Participant Bands at
+ * the bottom of the Choreography shape. In this case, the Marker
+ * ContainerShape will need to be moved up to prevent it from being obscured
+ * by the Participant Band(s).
+ **/
+ public static final String ACTIVITY_MARKER_OFFSET = "activity.marker.offset"; //$NON-NLS-1$
+
+ public static final String EVENT_MARKER_CONTAINER = "event.marker.container"; //$NON-NLS-1$
+
+ public static final String EVENT_SUBPROCESS_DECORATOR_CONTAINER = "event.subprocess.decorator.container"; //$NON-NLS-1$
+
+ // Lane and Pool move/resize constants
+ public static final String LANE_RESIZE_PROPERTY = "lane.resize"; //$NON-NLS-1$
+ public static final String POOL_RESIZE_PROPERTY = "pool.resize"; //$NON-NLS-1$
+ public static final String RESIZE_FIRST_LANE = "resize.first.lane"; //$NON-NLS-1$
+
+ public final static String PARENT_CONTAINER = "parent.container";
+
+ public static final String MULTIPLICITY_MARKER = "multiplicity.marker"; //$NON-NLS-1$
+ public static final String MULTIPLICITY = "multiplicity"; //$NON-NLS-1$
+
+ /**
+ * The key used to store the copied shape in the Paste Context. This is
+ * copied to the AddContext and picked up by the AddFeature which duplicates
+ * the copied shape's size and other attributes.
+ */
+ public static final String COPIED_BPMN_SHAPE = "copied.bpmn.shape"; //$NON-NLS-1$
+
+ /** The key used to store the copied business object in the Paste Context. */
+ public static final String COPIED_BPMN_OBJECT = "copied.bpmn.object"; //$NON-NLS-1$
+
+ /** The Constant COPY_FROM_CONTEXT. */
+ public static final String COPY_FROM_CONTEXT = "copy.from.context"; //$NON-NLS-1$
+
+ /** The Constant CUSTOM_ELEMENT_ID. */
+ public final static String CUSTOM_ELEMENT_ID = "custom.element.id"; //$NON-NLS-1$
+
+ /**
+ * The {@link IContext} property key used by the {@link MultiUpdateFeature}
+ * to force an update of all of its contained features, regardless of
+ * whether they have determined an update is needed.
+ **/
+ public final static String FORCE_UPDATE_ALL = "force.update.all"; //$NON-NLS-1$
+
+ public static final String BOUNDARY_EVENT_RELATIVE_POS = "boundary.event.relative.pos"; //$NON-NLS-1$
+
+ public static final String BOUNDARY_FIXPOINT_ANCHOR = "boundary.fixpoint.anchor"; //$NON-NLS-1$
+
+ public static final String BOUNDARY_ADHOC_ANCHOR = "boundary.adhoc.anchor"; //$NON-NLS-1$
+
+ public static final String CONNECTION_SOURCE_LOCATION = "connection.source.location"; //$NON-NLS-1$
+
+ public static final String CONNECTION_TARGET_LOCATION = "connection.target.location"; //$NON-NLS-1$
+ public static final String CONNECTION_BENDPOINTS = "connection.bendpoints"; //$NON-NLS-1$
+
+ public static final String CONNECTION_CREATED = "connection.created"; //$NON-NLS-1$
+
+ // values for connection points
+ public static final String CONNECTION_POINT = "connection.point"; //$NON-NLS-1$
+
+ public static final String CONNECTION_POINT_KEY = "connection.point.key"; //$NON-NLS-1$
+
+ public static final String EVENT_SUBPROCESS_DECORATOR = "event.subprocess.decorator";
+
+ public static final String IS_EXPANDED = "is.expanded"; //$NON-NLS-1$
+ public static final String EXPANDED_SIZE = "expanded.size"; //$NON-NLS-1$
+ public static final String COLLAPSED_SIZE = "collapsed.size"; //$NON-NLS-1$
+
+ public static final String TRIGGERED_BY_EVENT = "triggered.by.event"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2AddFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2AddFeature.java
index 83ac3efb..8ec9b115 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2AddFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2AddFeature.java
@@ -14,9 +14,34 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.IExecutionInfo;
import org.eclipse.graphiti.features.context.IAddContext;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface IBpmn2AddFeature.
+ *
+ * @param <T> the generic type
+ */
public interface IBpmn2AddFeature<T extends EObject> {
+ /**
+ * Gets the business object.
+ *
+ * @param context the context
+ * @return the business object
+ */
public T getBusinessObject(IAddContext context);
+
+ /**
+ * Put business object.
+ *
+ * @param context the context
+ * @param businessObject the business object
+ */
public void putBusinessObject(IAddContext context, T businessObject);
+
+ /**
+ * Post execute.
+ *
+ * @param executionInfo the execution info
+ */
public void postExecute(IExecutionInfo executionInfo);
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2CreateFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2CreateFeature.java
index 0b0c988d..1bad9f86 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2CreateFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2CreateFeature.java
@@ -15,11 +15,59 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.IExecutionInfo;
import org.eclipse.graphiti.features.context.IContext;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface IBpmn2CreateFeature.
+ *
+ * @param <T> the generic type
+ * @param <C> the generic type
+ */
public interface IBpmn2CreateFeature<T extends EObject, C extends IContext> {
+ /**
+ * Creates the business object.
+ *
+ * @param context the context
+ * @return the t
+ */
public T createBusinessObject(C context);
+
+ /**
+ * Gets the business object.
+ *
+ * @param context the context
+ * @return the business object
+ */
public T getBusinessObject(C context);
+
+ /**
+ * Set the business object into the Graphiti context.
+ *
+ * @param context the Graphiti context
+ * @param businessObject the business object
+ */
public void putBusinessObject(C context, T businessObject);
+
+ /**
+ * Gets the business object class. This is the BPMN2 model object EClass.
+ *
+ * @return the business object class
+ */
public EClass getBusinessObjectClass();
+
+ /**
+ * Gets the BPMN2 model object class that the Feature Provider uses to map
+ * Feature Containers. This is usually the same as the Business Object class
+ * (except for example {@see CallGlobalTaskFeatureContainer}).
+ *
+ * @return the business object class
+ */
+ public EClass getFeatureClass();
+
+ /**
+ * Post execute.
+ *
+ * @param executionInfo the execution info
+ */
public void postExecute(IExecutionInfo executionInfo);
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2FeatureProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2FeatureProvider.java
new file mode 100644
index 00000000..a22ef36d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IBpmn2FeatureProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features;
+
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+/**
+ * An interface that extends the standard Graphiti Feature Provider with a method to
+ * fetch a Feature Container for a given BPMN2 model object class.
+ * For each BPMN2 model class, there can be only one Feature Container that handles the
+ * object's lifecycle.
+ */
+public interface IBpmn2FeatureProvider extends IFeatureProvider {
+
+ /**
+ * Gets the feature container.
+ *
+ * @param bpmn2class the BPMN2 model object type
+ * @return the feature container
+ */
+ public IFeatureContainer getFeatureContainer(Class bpmn2class);
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionFeatureContainer.java
index 558d3576..5f6c4079 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionFeatureContainer.java
@@ -14,10 +14,37 @@ package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IMoveConnectionDecoratorFeature;
import org.eclipse.graphiti.features.IReconnectionFeature;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface IConnectionFeatureContainer.
+ */
public interface IConnectionFeatureContainer extends IFeatureContainer {
+ /**
+ * Gets the creates the connection feature.
+ *
+ * @param fp the fp
+ * @return the creates the connection feature
+ */
ICreateConnectionFeature getCreateConnectionFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the reconnection feature.
+ *
+ * @param fp the fp
+ * @return the reconnection feature
+ */
IReconnectionFeature getReconnectionFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the Connection Decorator move feature. This is used to move labels
+ * attached as Decorators on a Connection.
+ *
+ * @param fp
+ * @return
+ */
+ IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IFeatureProvider fp);
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionRouter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionRouter.java
index ff936523..806a875a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionRouter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IConnectionRouter.java
@@ -11,15 +11,34 @@
package org.eclipse.bpmn2.modeler.core.features;
import org.eclipse.graphiti.mm.pictograms.Connection;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface IConnectionRouter.
+ */
public interface IConnectionRouter {
// this is a way to pass additional info to the connection router in the form of a string;
// the info is attached to the Connection as a Property.
// see Graphiti.getPeService().setPropertyValue()
+ /** The Constant ROUTING_INFO. */
public static final String ROUTING_INFO = "routing.info"; //$NON-NLS-1$
+
+ /** The Constant ROUTING_INFO_FORCE. */
public static final String ROUTING_INFO_FORCE = "force"; //$NON-NLS-1$
+
+ /** The Constant ROUTING_INFO_BENDPOINT. */
public static final String ROUTING_INFO_BENDPOINT = "bendpoint"; //$NON-NLS-1$
+ /**
+ * Route.
+ *
+ * @param connection the connection
+ * @return true, if successful
+ */
public boolean route(Connection connection);
+
+ /**
+ * Dispose.
+ */
public void dispose();
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/ICustomElementFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ICustomElementFeatureContainer.java
index 2f717d39..97bdcaee 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/ICustomElementFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ICustomElementFeatureContainer.java
@@ -10,24 +10,45 @@
*
* @author Bob Brodt
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.activity.task;
+package org.eclipse.bpmn2.modeler.core.features;
-import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.custom.ICustomFeature;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface ICustomElementFeatureContainer.
+ */
public interface ICustomElementFeatureContainer extends IFeatureContainer {
- public final static String CUSTOM_ELEMENT_ID = "custom.element.id"; //$NON-NLS-1$
-
+ /**
+ * Gets the description.
+ *
+ * @return the description
+ */
public String getDescription();
+ /**
+ * Sets the id.
+ *
+ * @param id the new id
+ */
public abstract void setId(String id);
+ /**
+ * Gets the id.
+ *
+ * @return the id
+ */
public abstract String getId();
+ /**
+ * Sets the custom task descriptor.
+ *
+ * @param customTaskDescriptor the new custom task descriptor
+ */
public abstract void setCustomTaskDescriptor(CustomTaskDescriptor customTaskDescriptor);
/**
@@ -39,5 +60,8 @@ public interface ICustomElementFeatureContainer extends IFeatureContainer {
*/
public abstract String getId(EObject object);
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
public abstract ICustomFeature[] getCustomFeatures(IFeatureProvider fp);
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IFeatureContainer.java
index c1ae30ea..d80ec10e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IFeatureContainer.java
@@ -20,16 +20,92 @@ import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface IFeatureContainer.
+ */
public interface IFeatureContainer {
+
+ /**
+ * Checks if any of the Features provided by this Feature Container are available.
+ *
+ * @param fp the fp
+ * @return true, if is available
+ */
boolean isAvailable(IFeatureProvider fp);
+
+ /**
+ * Gets the Business Object on which the Feature operates. The Feature
+ * Container must extract the correct Business Object from the IContext.
+ *
+ * @param context the context
+ * @return the apply object
+ */
Object getApplyObject(IContext context);
+
+ /**
+ * Checks if the given Business Object is applicable to the Features
+ * provided by the Feature Container.
+ *
+ * @param o the o
+ * @return true, if successful
+ */
boolean canApplyTo(Object o);
+
+ /**
+ * Gets the add feature.
+ *
+ * @param fp the Feature Provider
+ * @return the add feature
+ */
IAddFeature getAddFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the update feature.
+ *
+ * @param fp the Feature Provider
+ * @return the update feature
+ */
IUpdateFeature getUpdateFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the direct editing feature.
+ *
+ * @param fp the Feature Provider
+ * @return the direct editing feature
+ */
IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the layout feature.
+ *
+ * @param fp the Feature Provider
+ * @return the layout feature
+ */
ILayoutFeature getLayoutFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the remove feature.
+ *
+ * @param fp the Feature Provider
+ * @return the removes the feature
+ */
IRemoveFeature getRemoveFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the delete feature.
+ *
+ * @param fp the Feature Provider
+ * @return the delete feature
+ */
IDeleteFeature getDeleteFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the custom features.
+ *
+ * @param fp the Feature Provider
+ * @return the custom features
+ */
ICustomFeature[] getCustomFeatures(IFeatureProvider fp);
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IShapeFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IShapeFeatureContainer.java
index 854a0634..11bff07d 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IShapeFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/IShapeFeatureContainer.java
@@ -17,9 +17,33 @@ import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface IShapeFeatureContainer.
+ */
public interface IShapeFeatureContainer extends IFeatureContainer {
+ /**
+ * Gets the creates the feature.
+ *
+ * @param fp the fp
+ * @return the creates the feature
+ */
ICreateFeature getCreateFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the move feature.
+ *
+ * @param fp the fp
+ * @return the move feature
+ */
IMoveShapeFeature getMoveFeature(IFeatureProvider fp);
+
+ /**
+ * Gets the resize feature.
+ *
+ * @param fp the fp
+ * @return the resize feature
+ */
IResizeShapeFeature getResizeFeature(IFeatureProvider fp);
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java
index 17a0e37f..f1859c15 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ManhattanConnectionRouter.java
@@ -51,6 +51,7 @@ import org.eclipse.graphiti.ui.features.DefaultDeleteFeature;
import org.eclipse.graphiti.util.ColorConstant;
import org.eclipse.graphiti.util.IColorConstant;
+// TODO: Auto-generated Javadoc
/**
* A Connection Router that constrains all line segments of a connection to be either
* horizontal or vertical; thus, diagonal lines are split into two segments that are
@@ -62,40 +63,74 @@ import org.eclipse.graphiti.util.IColorConstant;
*/
public class ManhattanConnectionRouter extends BendpointConnectionRouter {
- protected LineSegment sourceTopEdge;
- protected LineSegment sourceBottomEdge;
- protected LineSegment sourceLeftEdge;
- protected LineSegment sourceRightEdge;
+ /** The source top edge. */
+ protected GraphicsUtil.LineSegment sourceTopEdge;
+
+ /** The source bottom edge. */
+ protected GraphicsUtil.LineSegment sourceBottomEdge;
+
+ /** The source left edge. */
+ protected GraphicsUtil.LineSegment sourceLeftEdge;
+
+ /** The source right edge. */
+ protected GraphicsUtil.LineSegment sourceRightEdge;
- protected LineSegment targetTopEdge;
- protected LineSegment targetBottomEdge;
- protected LineSegment targetLeftEdge;
- protected LineSegment targetRightEdge;
+ /** The target top edge. */
+ protected GraphicsUtil.LineSegment targetTopEdge;
+
+ /** The target bottom edge. */
+ protected GraphicsUtil.LineSegment targetBottomEdge;
+
+ /** The target left edge. */
+ protected GraphicsUtil.LineSegment targetLeftEdge;
+ /** The target right edge. */
+ protected GraphicsUtil.LineSegment targetRightEdge;
+
+ /** The Constant offset. */
static final int offset = 20;
+
+ /** The test route solver. */
static boolean testRouteSolver = false;
+ /**
+ * The Enum Orientation.
+ */
enum Orientation {
- HORIZONTAL, VERTICAL, NONE
+
+ /** The horizontal. */
+ HORIZONTAL,
+ /** The vertical. */
+ VERTICAL,
+ /** The none. */
+ NONE
};
+ /**
+ * Instantiates a new manhattan connection router.
+ *
+ * @param fp the fp
+ */
public ManhattanConnectionRouter(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.BendpointConnectionRouter#calculateRoute()
+ */
@Override
protected ConnectionRoute calculateRoute() {
if (isSelfConnection())
return super.calculateRoute();
- LineSegment sourceEdges[] = GraphicsUtil.getEdges(source);
+ GraphicsUtil.LineSegment sourceEdges[] = GraphicsUtil.getEdges(source);
sourceTopEdge = sourceEdges[0];
sourceBottomEdge = sourceEdges[1];
sourceLeftEdge = sourceEdges[2];
sourceRightEdge = sourceEdges[3];
- LineSegment targetEdges[] = GraphicsUtil.getEdges(target);
+ GraphicsUtil.LineSegment targetEdges[] = GraphicsUtil.getEdges(target);
targetTopEdge = targetEdges[0];
targetBottomEdge = targetEdges[1];
targetLeftEdge = targetEdges[2];
@@ -287,6 +322,13 @@ public class ManhattanConnectionRouter extends BendpointConnectionRouter {
return route;
}
+ /**
+ * Checks if is valid boundary anchor.
+ *
+ * @param ba the ba
+ * @param shape the shape
+ * @return true, if is valid boundary anchor
+ */
protected boolean isValidBoundaryAnchor(BoundaryAnchor ba, Shape shape) {
PositionOnLine sp = BoundaryEventPositionHelper.getPositionOnLineProperty(shape);
if (sp!=null) {
@@ -334,6 +376,18 @@ public class ManhattanConnectionRouter extends BendpointConnectionRouter {
return true;
}
+ /**
+ * Calculate route.
+ *
+ * @param allRoutes the all routes
+ * @param source the source
+ * @param start the start
+ * @param middle the middle
+ * @param target the target
+ * @param end the end
+ * @param orientation the orientation
+ * @return the connection route
+ */
protected ConnectionRoute calculateRoute(List<ConnectionRoute> allRoutes, Shape source, Point start, Point middle, Shape target, Point end, Orientation orientation) {
ConnectionRoute route = new ConnectionRoute(this, allRoutes.size()+1, source,target);
@@ -376,6 +430,14 @@ public class ManhattanConnectionRouter extends BendpointConnectionRouter {
return m;
}
+ /**
+ * Calculate departure.
+ *
+ * @param source the source
+ * @param start the start
+ * @param end the end
+ * @return the list
+ */
protected List<Point> calculateDeparture(Shape source, Point start, Point end) {
AnchorLocation sourceEdge = AnchorUtil.findNearestBoundaryAnchor(source, start).locationType;
List<Point> points = new ArrayList<Point>();
@@ -431,6 +493,14 @@ public class ManhattanConnectionRouter extends BendpointConnectionRouter {
return points;
}
+ /**
+ * Calculate approach.
+ *
+ * @param start the start
+ * @param target the target
+ * @param end the end
+ * @return the list
+ */
protected List<Point> calculateApproach(Point start, Shape target, Point end) {
AnchorLocation targetEdge = AnchorUtil.findNearestBoundaryAnchor(target, end).locationType;
List<Point> points = new ArrayList<Point>();
@@ -486,10 +556,26 @@ public class ManhattanConnectionRouter extends BendpointConnectionRouter {
return points;
}
+ /**
+ * Creates the point.
+ *
+ * @param x the x
+ * @param y the y
+ * @return the point
+ */
Point createPoint(int x, int y) {
return GraphicsUtil.createPoint(x, y);
}
+ /**
+ * Calculate enroute.
+ *
+ * @param route the route
+ * @param start the start
+ * @param end the end
+ * @param orientation the orientation
+ * @return true, if successful
+ */
protected boolean calculateEnroute(ConnectionRoute route, Point start, Point end, Orientation orientation) {
if (GraphicsUtil.pointsEqual(start, end))
return false;
@@ -633,6 +719,9 @@ public class ManhattanConnectionRouter extends BendpointConnectionRouter {
return route.isValid();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.BendpointConnectionRouter#getDetourPoints(org.eclipse.graphiti.mm.pictograms.ContainerShape)
+ */
protected DetourPoints getDetourPoints(ContainerShape shape) {
DetourPoints detour = new DetourPoints(shape, offset);
if (allShapes==null)
@@ -652,16 +741,33 @@ public class ManhattanConnectionRouter extends BendpointConnectionRouter {
return detour;
}
+ /**
+ * Finalize connection.
+ */
protected void finalizeConnection() {
}
+ /**
+ * Fix collisions.
+ *
+ * @return true, if successful
+ */
protected boolean fixCollisions() {
return false;
}
+ /**
+ * Calculate anchors.
+ *
+ * @return true, if successful
+ */
protected boolean calculateAnchors() {
return false;
}
+
+ /**
+ * Update connection.
+ */
protected void updateConnection() {
DIUtils.updateDIEdge(ffc);
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java
new file mode 100644
index 00000000..66b5fcf1
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/Messages.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import org.eclipse.osgi.util.NLS;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Messages.
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.messages"; //$NON-NLS-1$
+
+ /** The Abstract bpmn2 create connection feature_ create. */
+ public static String AbstractBpmn2CreateConnectionFeature_Create;
+
+ /** The Abstract bpmn2 create feature_ create. */
+ public static String AbstractBpmn2CreateFeature_Create;
+
+ /** The Abstract update base element feature_ name. */
+ public static String AbstractUpdateBaseElementFeature_Name;
+
+ /** The BPMN diagram feature container_ disable_ enable_ description. */
+ public static String BPMNDiagramFeatureContainer_Disable_Enable_Description;
+
+ /** The BPMN diagram feature container_ disable_ name. */
+ public static String BPMNDiagramFeatureContainer_Disable_Name;
+
+ /** The BPMN diagram feature container_ enable_ name. */
+ public static String BPMNDiagramFeatureContainer_Enable_Name;
+
+ /** The BPMN diagram feature container_ reroute_ all_ description. */
+ public static String BPMNDiagramFeatureContainer_Reroute_All_Description;
+
+ /** The BPMN diagram feature container_ reroute_ all_ name. */
+ public static String BPMNDiagramFeatureContainer_Reroute_All_Name;
+
+ public static String ShowDocumentationFeature_Documentation_Title;
+
+ /** The Show properties feature_ name. */
+ public static String ShowPropertiesFeature_Name;
+
+ /** The Show properties feature_ title. */
+ public static String ShowPropertiesFeature_Title;
+
+ /** The Custom shape feature container_ description. */
+ public static String CustomShapeFeatureContainer_Description;
+
+ /** The Custom connection feature container_ description. */
+ public static String CustomConnectionFeatureContainer_Description;
+
+ /** The Custom element feature container_ description. */
+ public static String CustomElementFeatureContainer_Description;
+
+ /** The Custom element feature container_ create. */
+ public static String CustomElementFeatureContainer_Create;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MoveFlowNodeFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MoveFlowNodeFeature.java
index a0ba73d9..4cda4bfe 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MoveFlowNodeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MoveFlowNodeFeature.java
@@ -12,11 +12,11 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Bpmn2Factory;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
@@ -24,7 +24,7 @@ import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.emf.ecore.EObject;
@@ -34,15 +34,29 @@ import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
import org.eclipse.graphiti.features.context.impl.DeleteContext;
import org.eclipse.graphiti.mm.pictograms.Anchor;
+import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MoveFlowNodeFeature.
+ */
public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
private final List<Algorithm> algorithms;
private AlgorithmContainer algorithmContainer;
+ protected ModelHandler modelHandler;
+
+ /** The context. */
protected IMoveShapeContext context;
+ /**
+ * Instantiates a new move flow node feature.
+ *
+ * @param fp the fp
+ */
public MoveFlowNodeFeature(IFeatureProvider fp) {
super(fp);
algorithms = new ArrayList<MoveFlowNodeFeature.Algorithm>();
@@ -54,65 +68,82 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
algorithms.add(new ToFlowElementsContainerAlgorithm());
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature#canMoveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public boolean canMoveShape(IMoveShapeContext context) {
if (!(getBusinessObjectForPictogramElement(context.getShape()) instanceof FlowNode)) {
return false;
}
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
-
- algorithmContainer = getAlgorithmContainer(context);
-
- if (algorithmContainer.isEmpty()) {
- return onMoveAlgorithmNotFound(context);
- }
-
- return algorithmContainer.isMoveAllowed(getSourceBo(context, handler), getTargetBo(context, handler));
- } catch (IOException e) {
- Activator.logError(e);
+ algorithmContainer = getAlgorithmContainer(context);
+ if (algorithmContainer.isEmpty()) {
+ return onMoveAlgorithmNotFound(context);
}
- return false;
+ modelHandler = ModelHandler.getInstance(getDiagram());
+ return algorithmContainer.isMoveAllowed(getSourceBo(context), getTargetBo(context));
}
+ /**
+ * On move algorithm not found.
+ *
+ * @param context the context
+ * @return true, if successful
+ */
protected boolean onMoveAlgorithmNotFound(IMoveShapeContext context) {
return super.canMoveShape(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature#moveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public void moveShape(IMoveShapeContext context) {
this.context = context;
super.moveShape(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature#postMoveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
protected void postMoveShape(IMoveShapeContext context) {
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- Object[] nodes = getAllBusinessObjectsForPictogramElement(context.getShape());
- for (Object object : nodes) {
- if (object instanceof FlowNode && algorithmContainer!=null && !algorithmContainer.isEmpty()) {
- algorithmContainer.move(((FlowNode) object), getSourceBo(context, handler),
- getTargetBo(context, handler));
+ Shape shape = context.getShape();
+ if (!FeatureSupport.isLabelShape(shape)) {
+ try {
+ Object[] nodes = getAllBusinessObjectsForPictogramElement(shape);
+ for (Object object : nodes) {
+ if (object instanceof FlowNode && algorithmContainer!=null && !algorithmContainer.isEmpty()) {
+ algorithmContainer.move(((FlowNode) object), getSourceBo(context), getTargetBo(context));
+ }
}
+ } catch (Exception e) {
+ Activator.logError(e);
}
- } catch (Exception e) {
- Activator.logError(e);
}
super.postMoveShape(context);
}
- private Object getSourceBo(IMoveShapeContext context, ModelHandler handler) {
+ private Object getSourceBo(IMoveShapeContext context) {
if (context.getSourceContainer().equals(getDiagram()))
- return handler.getFlowElementContainer(context.getSourceContainer());
+ return modelHandler.getFlowElementContainer(context.getSourceContainer());
return getBusinessObjectForPictogramElement(context.getSourceContainer());
}
- private Object getTargetBo(IMoveShapeContext context, ModelHandler handler) {
- if (context.getTargetContainer().equals(getDiagram()))
- return handler.getFlowElementContainer(context.getTargetContainer());
+ private Object getTargetBo(IMoveShapeContext context) {
+ if (context.getTargetContainer().equals(getDiagram())) {
+ Object target = modelHandler.getFlowElementContainer(context.getTargetContainer());
+ if (target==null) {
+ // This handles the case where {@link #canMoveShape(IMoveShapeContext)} is called:
+ // at this point there is no write transaction open yet on the EditingDomain
+ // however, if the target is the Diagram but no default Process exists yet
+ // for that Diagram, then the move should be conditionally allowed.
+ return Bpmn2Factory.eINSTANCE.createProcess();
+ }
+ return target;
+ }
return getBusinessObjectForPictogramElement(context.getTargetContainer());
}
@@ -126,22 +157,86 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
return bo != null && bo instanceof Lane;
}
+ protected boolean checkConnectionAfterMove(Connection c) {
+ return true;
+ }
+
+ /**
+ * The Class AlgorithmContainer.
+ */
class AlgorithmContainer {
+
+ /** The from algorithm. */
public Algorithm fromAlgorithm;
+
+ /** The to algorithm. */
public Algorithm toAlgorithm;
+ /**
+ * Instantiates a new algorithm container.
+ *
+ * @param fromAlgorithm the from algorithm
+ * @param toAlgorithm the to algorithm
+ */
public AlgorithmContainer(Algorithm fromAlgorithm, Algorithm toAlgorithm) {
this.fromAlgorithm = fromAlgorithm;
this.toAlgorithm = toAlgorithm;
}
+ /**
+ * Checks if is move allowed.
+ *
+ * @param source the source
+ * @param target the target
+ * @return true, if is move allowed
+ */
boolean isMoveAllowed(Object source, Object target) {
return fromAlgorithm.isMoveAllowed(source, target) && toAlgorithm.isMoveAllowed(source, target);
}
+ /**
+ * Move.
+ *
+ * @param node the node
+ * @param source the source
+ * @param target the target
+ */
void move(FlowNode node, Object source, Object target) {
fromAlgorithm.move(node, source, target);
toAlgorithm.move(node, source, target);
+
+ // If this was a multiselection, keep all of the connections that
+ // were included in the move
+ PictogramElement pes[] = getDiagramEditor().getSelectedPictogramElements();
+ List<Connection> internalConnections = new ArrayList<Connection>();
+ for (PictogramElement pe : pes) {
+ if (pe instanceof AnchorContainer) {
+ for (Anchor a : ((AnchorContainer)pe).getAnchors()) {
+ for (Connection c : a.getIncomingConnections()) {
+ internalConnections.add(c);
+ }
+ for (Connection c : a.getOutgoingConnections()) {
+ internalConnections.add(c);
+ }
+ }
+ }
+ }
+
+ List<Connection> externalConnections = new ArrayList<Connection>();
+ for (Connection c : internalConnections) {
+ boolean foundSource = false;
+ boolean foundTarget = false;
+ for (PictogramElement p : pes) {
+ if (p==c.getStart().getParent())
+ foundSource = true;
+ if (p==c.getEnd().getParent())
+ foundTarget = true;
+ }
+ if (!foundSource || !foundTarget)
+ externalConnections.add(c);
+ }
+ internalConnections.removeAll(externalConnections);
+
// If flow node was moved from one Pool to another, delete all
// incoming and outgoing Sequence Flows; if flow node was connect
// to another flow node by a Message Flow, and it is moved into the
@@ -151,18 +246,12 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
Shape shape = context.getShape();
for (Anchor a : shape.getAnchors()) {
for (Connection c : a.getIncomingConnections()) {
- BaseElement cbo = BusinessObjectUtil.getFirstBaseElement(c);
- if (cbo instanceof SequenceFlow || cbo instanceof MessageFlow) {
- if (!isConnectionValid(cbo))
- connections.add(c);
- }
+ if (!internalConnections.contains(c) && !isConnectionValid(c))
+ connections.add(c);
}
for (Connection c : a.getOutgoingConnections()) {
- BaseElement cbo = BusinessObjectUtil.getFirstBaseElement(c);
- if (cbo instanceof SequenceFlow || cbo instanceof MessageFlow) {
- if (!isConnectionValid(cbo))
- connections.add(c);
- }
+ if (!internalConnections.contains(c) && !isConnectionValid(c))
+ connections.add(c);
}
}
for (Connection c : connections) {
@@ -172,13 +261,31 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
}
}
+ /**
+ * Checks if is empty.
+ *
+ * @return true, if is empty
+ */
boolean isEmpty() {
return fromAlgorithm == null || toAlgorithm == null;
}
- boolean isConnectionValid(BaseElement flow) {
- EStructuralFeature sourceRef = flow.eClass().getEStructuralFeature("sourceRef");
- EStructuralFeature targetRef = flow.eClass().getEStructuralFeature("targetRef");
+ /**
+ * Checks if is connection valid.
+ *
+ * @param flow the flow
+ * @return true, if is connection valid
+ */
+ boolean isConnectionValid(Connection c) {
+ if (!MoveFlowNodeFeature.this.checkConnectionAfterMove(c))
+ return true;
+
+ BaseElement flow = BusinessObjectUtil.getFirstBaseElement(c);
+ if (!(flow instanceof SequenceFlow || flow instanceof MessageFlow))
+ return true;
+
+ EStructuralFeature sourceRef = flow.eClass().getEStructuralFeature("sourceRef"); //$NON-NLS-1$
+ EStructuralFeature targetRef = flow.eClass().getEStructuralFeature("targetRef"); //$NON-NLS-1$
BaseElement source = (BaseElement) flow.eGet(sourceRef);
BaseElement target = (BaseElement) flow.eGet(targetRef);
EObject sourceContainer = source.eContainer();
@@ -225,51 +332,97 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
return new AlgorithmContainer(fromAlgorithm, toAlgorithm);
}
+ /**
+ * The Interface Algorithm.
+ */
interface Algorithm {
+ /** The type from. */
int TYPE_FROM = 0;
+ /** The type to. */
int TYPE_TO = 1;
+ /**
+ * Gets the type.
+ *
+ * @return the type
+ */
int getType();
+ /**
+ * Can apply to.
+ *
+ * @param context the context
+ * @return true, if successful
+ */
boolean canApplyTo(IMoveShapeContext context);
+ /**
+ * Checks if is move allowed.
+ *
+ * @param source the source
+ * @param target the target
+ * @return true, if is move allowed
+ */
boolean isMoveAllowed(Object source, Object target);
+ /**
+ * Move.
+ *
+ * @param node the node
+ * @param source the source
+ * @param target the target
+ */
void move(FlowNode node, Object source, Object target);
}
+ /**
+ * The Class DefaultAlgorithm.
+ */
abstract class DefaultAlgorithm implements Algorithm {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#isMoveAllowed(java.lang.Object, java.lang.Object)
+ */
@Override
public boolean isMoveAllowed(Object source, Object target) {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#move(org.eclipse.bpmn2.FlowNode, java.lang.Object, java.lang.Object)
+ */
@Override
public void move(FlowNode node, Object source, Object target) {
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- handler.moveFlowNode(node, source, target);
- } catch (IOException e) {
- Activator.logError(e);
- }
+ modelHandler.moveFlowNode(node, source, target);
}
}
+ /**
+ * The Class FromLaneAlgorithm.
+ */
class FromLaneAlgorithm extends DefaultAlgorithm {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#getType()
+ */
@Override
public int getType() {
return TYPE_FROM;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#canApplyTo(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public boolean canApplyTo(IMoveShapeContext context) {
return isSourceLane(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.DefaultAlgorithm#move(org.eclipse.bpmn2.FlowNode, java.lang.Object, java.lang.Object)
+ */
@Override
public void move(FlowNode node, Object source, Object target) {
Lane lane = (Lane) source;
@@ -278,24 +431,39 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
}
}
+ /**
+ * The Class ToLaneAlgorithm.
+ */
class ToLaneAlgorithm extends DefaultAlgorithm {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#getType()
+ */
@Override
public int getType() {
return TYPE_TO;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#canApplyTo(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public boolean canApplyTo(IMoveShapeContext context) {
return FeatureSupport.isTargetLane(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.DefaultAlgorithm#isMoveAllowed(java.lang.Object, java.lang.Object)
+ */
@Override
public boolean isMoveAllowed(Object source, Object target) {
Lane lane = (Lane) target;
return lane.getChildLaneSet() == null || lane.getChildLaneSet().getLanes().isEmpty();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.DefaultAlgorithm#move(org.eclipse.bpmn2.FlowNode, java.lang.Object, java.lang.Object)
+ */
@Override
public void move(FlowNode node, Object source, Object target) {
Lane lane = (Lane) target;
@@ -305,36 +473,60 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
}
}
+ /**
+ * The Class FromParticipantAlgorithm.
+ */
class FromParticipantAlgorithm extends DefaultAlgorithm {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#getType()
+ */
@Override
public int getType() {
return TYPE_FROM;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#canApplyTo(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public boolean canApplyTo(IMoveShapeContext context) {
return isSourceParticipant(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.DefaultAlgorithm#move(org.eclipse.bpmn2.FlowNode, java.lang.Object, java.lang.Object)
+ */
@Override
public void move(FlowNode node, Object source, Object target) {
// DO NOTHING HERE
}
}
+ /**
+ * The Class ToParticipantAlgorithm.
+ */
class ToParticipantAlgorithm extends DefaultAlgorithm {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#getType()
+ */
@Override
public int getType() {
return TYPE_TO;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#canApplyTo(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public boolean canApplyTo(IMoveShapeContext context) {
return context.getTargetContainer().equals(getDiagram()) || FeatureSupport.isTargetParticipant(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.DefaultAlgorithm#isMoveAllowed(java.lang.Object, java.lang.Object)
+ */
@Override
public boolean isMoveAllowed(Object source, Object target) {
try {
@@ -342,7 +534,7 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
return true;
if (target instanceof Participant) {
Participant p = (Participant) target;
- if (p.equals(ModelHandler.getInstance(getDiagram()).getInternalParticipant())) {
+ if (p.equals(modelHandler.getInternalParticipant())) {
return true;
}
if (p.getProcessRef() == null) {
@@ -380,31 +572,52 @@ public class MoveFlowNodeFeature extends DefaultMoveBPMNShapeFeature {
// }
}
+ /**
+ * The Class FromFlowElementsContainerAlgorithm.
+ */
class FromFlowElementsContainerAlgorithm extends DefaultAlgorithm {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#getType()
+ */
@Override
public int getType() {
return TYPE_FROM;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#canApplyTo(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public boolean canApplyTo(IMoveShapeContext context) {
Object bo = getBusinessObjectForPictogramElement(context.getSourceContainer());
return bo != null && bo instanceof FlowElementsContainer;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.DefaultAlgorithm#move(org.eclipse.bpmn2.FlowNode, java.lang.Object, java.lang.Object)
+ */
@Override
public void move(FlowNode node, Object source, Object target) {
}
}
+ /**
+ * The Class ToFlowElementsContainerAlgorithm.
+ */
class ToFlowElementsContainerAlgorithm extends DefaultAlgorithm {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#getType()
+ */
@Override
public int getType() {
return TYPE_TO;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature.Algorithm#canApplyTo(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
public boolean canApplyTo(IMoveShapeContext context) {
Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java
new file mode 100644
index 00000000..991918a4
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/MultiUpdateFeature.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.ui.editor.DiagramBehavior;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MultiUpdateFeature.
+ */
+public class MultiUpdateFeature extends AbstractUpdateFeature {
+
+ /** The features. */
+ protected List<IUpdateFeature> features = new ArrayList<IUpdateFeature>();
+ protected boolean[] updateNeeded;
+ protected boolean[] canUpdate;
+ IReason reason = null;
+
+ /**
+ * Instantiates a new multi update feature.
+ *
+ * @param fp the fp
+ */
+ public MultiUpdateFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#canUpdate(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ // keep track of which features can update so we don't have to waste time
+ // asking each feature again during @{link #updateNeeded(IUpdateContext)}
+ boolean result = false;
+ if (canUpdate==null) {
+ canUpdate = new boolean[features.size()];
+ int i = 0;
+ for (IUpdateFeature f : features) {
+ if (f.canUpdate(context)) {
+ canUpdate[i] = true;
+ result = true;
+ }
+ ++i;
+ }
+ }
+ else {
+ for (int i=0; i<canUpdate.length; ++i) {
+ if (canUpdate[i]) {
+ result = true;
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#updateNeeded(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ if (reason==null) {
+ String text = null;
+ canUpdate(context);
+ // keep track of which features need updating so we don't have to waste time
+ // asking each feature again during @{link #update(IUpdateContext)}
+ updateNeeded = new boolean[features.size()];
+ int i = 0;
+ for (IUpdateFeature f : features) {
+ // This MultiUpdateFeature will be called for PictogramElement
+ // children but not all Features in our list may apply to all
+ // children of the parent PE, so we need to ask the Feature
+ // again if it applies this PE.
+ if (canUpdate[i]) {
+ IReason reason = f.updateNeeded(context);
+ if (reason.toBoolean()) {
+ updateNeeded[i] = true;
+ if (text==null) {
+ text = f.getName() + ": " + reason.getText();
+ }
+ else
+ text += "\n" + f.getName() + ": " + reason.getText(); //$NON-NLS-1$
+ }
+ }
+ ++i;
+ }
+ if (text!=null)
+ reason = Reason.createTrueReason(text);
+ else
+ reason = Reason.createFalseReason();
+ }
+ return reason;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#update(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public boolean update(IUpdateContext context) {
+ boolean updated = false;
+ boolean forceUpdate = Boolean.TRUE.equals(context.getProperty(GraphitiConstants.FORCE_UPDATE_ALL));
+
+ updateNeeded(context);
+
+ int i = 0;
+ for (IUpdateFeature f : features) {
+ if ((updateNeeded[i] || forceUpdate) && f.update(context)) {
+ updated = true;
+ }
+ ++i;
+ }
+ return updated;
+ }
+
+ /**
+ * Adds the update feature.
+ *
+ * @param feature the feature
+ */
+ public void addFeature(IUpdateFeature feature) {
+ if (feature != null) {
+ features.add(feature);
+ }
+ }
+
+ /**
+ * Get the list of individual UpdateFeatures that will be evaluated.
+ *
+ * @return
+ */
+ public List<IUpdateFeature> getFeatures() {
+ return features;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/PropertyBasedFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/PropertyBasedFeatureContainer.java
index cf72988a..e2d46366 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/PropertyBasedFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/PropertyBasedFeatureContainer.java
@@ -21,8 +21,15 @@ import org.eclipse.graphiti.mm.PropertyContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.services.Graphiti;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class PropertyBasedFeatureContainer.
+ */
public abstract class PropertyBasedFeatureContainer implements IShapeFeatureContainer, IConnectionFeatureContainer {
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getApplyObject(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public Object getApplyObject(IContext context) {
if (context instanceof IPictogramElementContext) {
@@ -31,6 +38,9 @@ public abstract class PropertyBasedFeatureContainer implements IShapeFeatureCont
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#canApplyTo(java.lang.Object)
+ */
@Override
public boolean canApplyTo(Object o) {
if (!(o instanceof PropertyContainer)) {
@@ -43,20 +53,40 @@ public abstract class PropertyBasedFeatureContainer implements IShapeFeatureCont
return canApplyToProperty(property);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#isAvailable(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public boolean isAvailable(IFeatureProvider fp) {
return true;
}
+ /**
+ * Gets the property key.
+ *
+ * @return the property key
+ */
protected abstract String getPropertyKey();
+ /**
+ * Can apply to property.
+ *
+ * @param value the value
+ * @return true, if successful
+ */
protected abstract boolean canApplyToProperty(String value);
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getRemoveFeature(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public IRemoveFeature getRemoveFeature(IFeatureProvider fp) {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IFeatureContainer#getCustomFeatures(org.eclipse.graphiti.features.IFeatureProvider)
+ */
@Override
public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
return null;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ReconnectBaseElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ReconnectBaseElementFeature.java
index 20086a84..e2ba0e59 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ReconnectBaseElementFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ReconnectBaseElementFeature.java
@@ -37,14 +37,27 @@ import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ReconnectBaseElementFeature.
+ */
public class ReconnectBaseElementFeature extends DefaultReconnectionFeature {
+ /** The changes done. */
protected boolean changesDone = false;
+ /**
+ * Instantiates a new reconnect base element feature.
+ *
+ * @param fp the fp
+ */
public ReconnectBaseElementFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultReconnectionFeature#canReconnect(org.eclipse.graphiti.features.context.IReconnectionContext)
+ */
@Override
public boolean canReconnect(IReconnectionContext context) {
AnchorContainer sourceContainer = null;
@@ -66,6 +79,9 @@ public class ReconnectBaseElementFeature extends DefaultReconnectionFeature {
return super.canReconnect(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultReconnectionFeature#preReconnect(org.eclipse.graphiti.features.context.IReconnectionContext)
+ */
@Override
public void preReconnect(IReconnectionContext context) {
IPeService peService = Graphiti.getPeService();
@@ -84,15 +100,15 @@ public class ReconnectBaseElementFeature extends DefaultReconnectionFeature {
ILocation targetLoc = context.getTargetLocation();
ILocation shapeLoc = peService.getLocationRelativeToDiagram((Shape)target);
Point p = gaService.createPoint(targetLoc.getX() - shapeLoc.getX(), targetLoc.getY() - shapeLoc.getY());
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_TARGET_LOCATION,
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_TARGET_LOCATION,
AnchorUtil.pointToString(p));
}
else {
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_TARGET_LOCATION, ""); //$NON-NLS-1$
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_TARGET_LOCATION, ""); //$NON-NLS-1$
}
BendpointConnectionRouter.setMovedBendpoint(connection, Integer.MAX_VALUE);
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_SOURCE_LOCATION, ""); //$NON-NLS-1$
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_SOURCE_LOCATION, ""); //$NON-NLS-1$
anchors = AnchorUtil.getSourceAndTargetBoundaryAnchors(source, target, connection);
newAnchor = anchors.getSecond();
}
@@ -104,13 +120,13 @@ public class ReconnectBaseElementFeature extends DefaultReconnectionFeature {
ILocation sourceLoc = context.getTargetLocation();
ILocation shapeLoc = peService.getLocationRelativeToDiagram((Shape)source);
Point p = gaService.createPoint(sourceLoc.getX() - shapeLoc.getX(), sourceLoc.getY() - shapeLoc.getY());
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_SOURCE_LOCATION, AnchorUtil.pointToString(p));
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_SOURCE_LOCATION, AnchorUtil.pointToString(p));
}
else {
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_SOURCE_LOCATION, ""); //$NON-NLS-1$
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_SOURCE_LOCATION, ""); //$NON-NLS-1$
}
BendpointConnectionRouter.setMovedBendpoint(connection, 0);
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_TARGET_LOCATION, ""); //$NON-NLS-1$
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_TARGET_LOCATION, ""); //$NON-NLS-1$
anchors = AnchorUtil.getSourceAndTargetBoundaryAnchors(source, target, connection);
newAnchor = anchors.getFirst();
}
@@ -121,6 +137,9 @@ public class ReconnectBaseElementFeature extends DefaultReconnectionFeature {
super.preReconnect(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.DefaultReconnectionFeature#postReconnect(org.eclipse.graphiti.features.context.IReconnectionContext)
+ */
@Override
public void postReconnect(IReconnectionContext context) {
super.postReconnect(context);
@@ -159,6 +178,9 @@ public class ReconnectBaseElementFeature extends DefaultReconnectionFeature {
changesDone = true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#hasDoneChanges()
+ */
@Override
public boolean hasDoneChanges() {
return changesDone;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RouteSolver.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RouteSolver.java
index 4cb3e752..c1f1861a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RouteSolver.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RouteSolver.java
@@ -25,21 +25,49 @@ import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RouteSolver.
+ */
public class RouteSolver {
+ /** The Constant gaService. */
protected final static IGaService gaService = Graphiti.getGaService();
+
+ /** The Constant peService. */
protected static final IPeService peService = Graphiti.getPeService();
+
+ /** The Constant topMargin. */
static final int topMargin = 50;
+
+ /** The Constant bottomMargin. */
static final int bottomMargin = 50;
+
+ /** The Constant leftMargin. */
static final int leftMargin = 50;
+
+ /** The Constant rightMargin. */
static final int rightMargin = 50;
+ /** The fp. */
IFeatureProvider fp;
+
+ /** The all shapes. */
List<ContainerShape> allShapes;
+
+ /** The source. */
Shape source;
+
+ /** The target. */
Shape target;
+
+ /** The right. */
int top, left, bottom, right;
+
+ /** The vertical net. */
RoutingNet verticalNet;
+
+ /** The horizontal net. */
RoutingNet horizontalNet;
private boolean rotate = false;
@@ -56,6 +84,13 @@ public class RouteSolver {
initialize();
}
+ /**
+ * Solve.
+ *
+ * @param source the source
+ * @param target the target
+ * @return true, if successful
+ */
public boolean solve(Shape source, Shape target) {
this.source = source;
this.target = target;
@@ -98,6 +133,11 @@ public class RouteSolver {
return true;
}
+ /**
+ * Initialize.
+ *
+ * @return true, if successful
+ */
public boolean initialize() {
if (allShapes.size()<2)
@@ -132,6 +172,11 @@ public class RouteSolver {
return true;
}
+ /**
+ * Calculate diagram bounds.
+ *
+ * @return the rectangle
+ */
protected Rectangle calculateDiagramBounds() {
// find bounding rectangle that contains all shapes
int left = Integer.MAX_VALUE;
@@ -163,6 +208,11 @@ public class RouteSolver {
return new Rectangle(left, top, right-left, bottom-top);
}
+ /**
+ * Calculate routing net.
+ *
+ * @param net the net
+ */
protected void calculateRoutingNet(RoutingNet net) {
net.add(left, top, leftMargin, bottom-top);
@@ -258,6 +308,12 @@ public class RouteSolver {
net.rotate(rotate);
}
+ /**
+ * Adds the trailing aisle.
+ *
+ * @param net the net
+ * @param shape the shape
+ */
protected void addTrailingAisle(RoutingNet net, ContainerShape shape) {
Rectangle shapeBounds = getBounds(shape);
int x = shapeBounds.right();
@@ -286,6 +342,12 @@ public class RouteSolver {
}
}
+ /**
+ * Gets the shapes below.
+ *
+ * @param shape the shape
+ * @return the shapes below
+ */
protected List<ContainerShape> getShapesBelow(ContainerShape shape) {
final Rectangle bounds = getBounds(shape);
List<ContainerShape> shapes = new ArrayList<ContainerShape>();
@@ -337,6 +399,12 @@ public class RouteSolver {
return shapes;
}
+ /**
+ * Gets the shapes above.
+ *
+ * @param shape the shape
+ * @return the shapes above
+ */
protected List<ContainerShape> getShapesAbove(ContainerShape shape) {
final Rectangle bounds = getBounds(shape);
List<ContainerShape> shapes = new ArrayList<ContainerShape>();
@@ -388,16 +456,40 @@ public class RouteSolver {
return shapes;
}
+ /**
+ * The Class Slice.
+ */
class Slice {
+
+ /** The parent. */
protected Slice parent;
+
+ /** The right. */
protected int left, right;
+
+ /** The cuts. */
List<Integer> cuts = new ArrayList<Integer>();
+
+ /** The children. */
List<Slice> children = new ArrayList<Slice>();
+ /**
+ * Instantiates a new slice.
+ *
+ * @param left the left
+ * @param right the right
+ */
public Slice(int left, int right) {
this(null,left,right);
}
+ /**
+ * Instantiates a new slice.
+ *
+ * @param parent the parent
+ * @param left the left
+ * @param right the right
+ */
protected Slice(Slice parent, int left, int right) {
this.parent = parent;
this.left = left;
@@ -406,6 +498,13 @@ public class RouteSolver {
cuts.add(right);
}
+ /**
+ * Removes the.
+ *
+ * @param l the l
+ * @param r the r
+ * @return the int
+ */
public int remove(int l, int r) {
if (r<left || right<l) {
for (Slice s : children) {
@@ -446,6 +545,11 @@ public class RouteSolver {
return length();
}
+ /**
+ * Length.
+ *
+ * @return the int
+ */
public int length() {
int length = right - left;
for (Slice s : children) {
@@ -454,11 +558,21 @@ public class RouteSolver {
return length;
}
+ /**
+ * Cut.
+ *
+ * @param point the point
+ */
protected void cut(int point) {
if (!cuts.contains(point))
cuts.add(point);
}
+ /**
+ * Gets the cuts.
+ *
+ * @return the cuts
+ */
public List<Integer> getCuts() {
cut(left);
cut(right);
@@ -473,6 +587,9 @@ public class RouteSolver {
}
}
+ /**
+ * Sort all shapes.
+ */
protected void sortAllShapes() {
Collections.sort(allShapes, new Comparator<ContainerShape>() {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingLane.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingLane.java
index 933330d9..5a6d827e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingLane.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingLane.java
@@ -18,6 +18,7 @@ import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+// TODO: Auto-generated Javadoc
/**
* This class represents a "routing lane" or blank space between shapes, which can
* be used to lay connection lines. Routing Lanes are linked together in a network;
@@ -25,14 +26,40 @@ import org.eclipse.graphiti.mm.pictograms.PictogramElement;
* edge. See also RoutingNet.
*/
public class RoutingLane {
+
+ /** The Constant EMPTY_LIST. */
protected final static List<RoutingLane> EMPTY_LIST = new ArrayList<RoutingLane>();
+
+ /** The rect. */
protected Rectangle rect;
+
+ /** The left adjacent. */
protected List<RoutingLane> leftAdjacent;
+
+ /** The right adjacent. */
protected List<RoutingLane> rightAdjacent;
+
+ /** The shape. */
protected ContainerShape shape;
- public static enum Adjacence { LEFT, TOP, BOTTOM, RIGHT, NONE };
+ /**
+ * The Enum Adjacence.
+ */
+ public static enum Adjacence { /** The left. */
+ LEFT, /** The top. */
+ TOP, /** The bottom. */
+ BOTTOM, /** The right. */
+ RIGHT, /** The none. */
+ NONE };
+ /**
+ * Instantiates a new routing lane.
+ *
+ * @param x the x
+ * @param y the y
+ * @param width the width
+ * @param height the height
+ */
public RoutingLane(int x, int y, int width, int height) {
this(new Rectangle(x,y,width,height));
}
@@ -41,10 +68,22 @@ public class RoutingLane {
rect = new Rectangle(r);
}
+ /**
+ * Adjacent.
+ *
+ * @param node the node
+ * @return the routing lane. adjacence
+ */
public RoutingLane.Adjacence adjacent(RoutingLane node) {
return adjacent(node.rect);
}
+ /**
+ * Adjacent.
+ *
+ * @param other the other
+ * @return the routing lane. adjacence
+ */
public RoutingLane.Adjacence adjacent(Rectangle other) {
if (rect.y==other.bottom()) {
if (rect.right()<=other.x || other.right()<=rect.x)
@@ -69,15 +108,32 @@ public class RoutingLane {
return Adjacence.NONE;
}
+ /**
+ * Intersects.
+ *
+ * @param node the node
+ * @return true, if successful
+ */
public boolean intersects(RoutingLane node) {
return intersects(node.rect);
}
+ /**
+ * Intersects.
+ *
+ * @param rect the rect
+ * @return true, if successful
+ */
public boolean intersects(Rectangle rect) {
return GraphicsUtil.intersects(rect.x+1, rect.y+1, rect.width-2, rect.height-2,
this.rect.x+1, this.rect.y+1, this.rect.width-2, this.rect.height-2);
}
+ /**
+ * Adds the left.
+ *
+ * @param node the node
+ */
public void addLeft(RoutingLane node) {
if (leftAdjacent==null)
leftAdjacent = new ArrayList<RoutingLane>();
@@ -89,16 +145,31 @@ public class RoutingLane {
node.rightAdjacent.add(this);
}
+ /**
+ * Checks for left.
+ *
+ * @return true, if successful
+ */
public boolean hasLeft() {
return leftAdjacent!=null && leftAdjacent.size()>0;
}
+ /**
+ * Gets the left.
+ *
+ * @return the left
+ */
public List<RoutingLane> getLeft() {
if (hasLeft())
return leftAdjacent;
return EMPTY_LIST;
}
+ /**
+ * Adds the right.
+ *
+ * @param node the node
+ */
public void addRight(RoutingLane node) {
if (rightAdjacent==null)
rightAdjacent = new ArrayList<RoutingLane>();
@@ -110,56 +181,119 @@ public class RoutingLane {
node.leftAdjacent.add(this);
}
+ /**
+ * Checks for right.
+ *
+ * @return true, if successful
+ */
public boolean hasRight() {
return rightAdjacent!=null && rightAdjacent.size()>0;
}
+ /**
+ * Gets the right.
+ *
+ * @return the right
+ */
public List<RoutingLane> getRight() {
if (hasRight())
return rightAdjacent;
return EMPTY_LIST;
}
+ /**
+ * Gets the x.
+ *
+ * @return the x
+ */
public int getX() {
return rect.x;
}
+ /**
+ * Gets the y.
+ *
+ * @return the y
+ */
public int getY() {
return rect.y;
}
+ /**
+ * Sets the x.
+ *
+ * @param i the new x
+ */
public void setX(int i) {
rect.x = i;
}
+ /**
+ * Sets the y.
+ *
+ * @param i the new y
+ */
public void setY(int i) {
rect.y = i;
}
+ /**
+ * Gets the width.
+ *
+ * @return the width
+ */
public int getWidth() {
return rect.width;
}
+ /**
+ * Gets the height.
+ *
+ * @return the height
+ */
public int getHeight() {
return rect.height;
}
+ /**
+ * Sets the width.
+ *
+ * @param i the new width
+ */
public void setWidth(int i) {
rect.width = i;
}
+ /**
+ * Sets the height.
+ *
+ * @param i the new height
+ */
public void setHeight(int i) {
rect.height = i;
}
+ /**
+ * Sets the shape.
+ *
+ * @param shape the new shape
+ */
public void setShape(PictogramElement shape) {
this.shape = (ContainerShape)shape;
}
+ /**
+ * Gets the shape.
+ *
+ * @return the shape
+ */
public ContainerShape getShape() {
return shape;
}
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
@Override
public boolean equals(Object that) {
if (that instanceof RoutingLane)
@@ -167,10 +301,21 @@ public class RoutingLane {
return false;
}
+ /**
+ * Rotate.
+ *
+ * @param b the b
+ */
public void rotate(boolean b) {
RoutingNet.rotateRectangle(rect);
}
+ /**
+ * Navigate to.
+ *
+ * @param ta the ta
+ * @param owner the owner
+ */
public void navigateTo(RoutingLane ta, RoutingNet owner) {
owner.push(this);
if (this==ta) {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingNet.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingNet.java
index 882155ff..56415568 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingNet.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/RoutingNet.java
@@ -47,6 +47,7 @@ import org.eclipse.graphiti.ui.features.DefaultDeleteFeature;
import org.eclipse.graphiti.util.ColorConstant;
import org.eclipse.graphiti.util.IColorConstant;
+// TODO: Auto-generated Javadoc
/**
* This class manages a network of RoutingLane nodes. The nodes are linked if their
* physical rectangles share an edge. Depending on the orientation in which the net was created,
@@ -56,26 +57,58 @@ import org.eclipse.graphiti.util.IColorConstant;
public class RoutingNet extends ArrayList<RoutingLane> {
private static final long serialVersionUID = -3041403111796385182L;
+
+ /** The Constant gaService. */
protected static final IGaService gaService = Graphiti.getGaService();
+
+ /** The Constant peService. */
protected static final IPeService peService = Graphiti.getPeService();
+ /** The Constant CONNECTION. */
public static final String CONNECTION = "ROUTING_NET_CONNECTION"; //$NON-NLS-1$
+
+ /** The Constant LANE. */
public static final String LANE = "ROUTING_NET_LANE"; //$NON-NLS-1$
+ /** The is rotated. */
boolean isRotated = false;
+
+ /** The source. */
Shape source;
+
+ /** The target. */
Shape target;
+
+ /** The source adjacent lanes. */
List<RoutingLane> sourceAdjacentLanes = new ArrayList<RoutingLane>();
+
+ /** The target adjacent lanes. */
List<RoutingLane> targetAdjacentLanes = new ArrayList<RoutingLane>();
+
+ /** The solution stack. */
Stack<RoutingLane> solutionStack;
+
+ /** The all solutions. */
List< List<RoutingLane> > allSolutions;
+
+ /** The min dist. */
int minDist = Integer.MAX_VALUE;
+
+ /** The fp. */
IFeatureProvider fp;
+ /**
+ * Instantiates a new routing net.
+ *
+ * @param fp the fp
+ */
public RoutingNet(IFeatureProvider fp) {
this.fp = fp;
}
+ /* (non-Javadoc)
+ * @see java.util.ArrayList#add(java.lang.Object)
+ */
@Override
public boolean add(RoutingLane a) {
if (!contains(a) && a.getWidth()>0 && a.getHeight()>0)
@@ -83,15 +116,32 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return false;
}
+ /**
+ * Adds the.
+ *
+ * @param x the x
+ * @param y the y
+ * @param width the width
+ * @param height the height
+ * @return true, if successful
+ */
public boolean add(int x, int y, int width, int height) {
RoutingLane a = new RoutingLane(x,y,width,height);
return this.add(a);
}
+ /**
+ * Sets the feature provider.
+ *
+ * @param fp the new feature provider
+ */
public void setFeatureProvider(IFeatureProvider fp) {
this.fp = fp;
}
+ /**
+ * Link.
+ */
public void link() {
for (RoutingLane a1 : this) {
for (RoutingLane a2 : this) {
@@ -113,6 +163,9 @@ public class RoutingNet extends ArrayList<RoutingLane> {
}
}
+ /* (non-Javadoc)
+ * @see java.util.ArrayList#clear()
+ */
public void clear() {
super.clear();
sourceAdjacentLanes.clear();
@@ -123,6 +176,13 @@ public class RoutingNet extends ArrayList<RoutingLane> {
allSolutions.clear();
}
+ /**
+ * Find solutions.
+ *
+ * @param source2 the source2
+ * @param target2 the target2
+ * @return the list
+ */
public List< List<RoutingLane> > findSolutions(Shape source2, Shape target2) {
allSolutions = new ArrayList< List<RoutingLane> >();
this.source = source2;
@@ -204,6 +264,12 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return allSolutions;
}
+ /**
+ * Merit.
+ *
+ * @param list the list
+ * @return the double
+ */
public double merit(List<RoutingLane> list) {
ILocation sourceLoc = Graphiti.getPeService().getLocationRelativeToDiagram(source);
IDimension sourceSize = GraphicsUtil.calculateSize(source);
@@ -249,23 +315,51 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return (double) i / (double)(length * list.size());
}
+ /**
+ * Point to line distance.
+ *
+ * @param p1 the p1
+ * @param p2 the p2
+ * @param p the p
+ * @return the double
+ */
public double pointToLineDistance(Point p1, Point p2, Point p) {
double normalLength = Math.sqrt((p2.getX() - p1.getX()) * (p2.getX() - p1.getX()) + (p2.getY() - p1.getY()) * (p2.getY() - p1.getY()));
return Math.abs((p.getX() - p1.getX()) * (p2.getY() - p1.getY()) - (p.getY() - p1.getY()) * (p2.getX() - p1.getX())) / normalLength;
}
+ /**
+ * Pop.
+ */
public void pop() {
solutionStack.pop();
}
+ /**
+ * Visited.
+ *
+ * @param lane the lane
+ * @return true, if successful
+ */
public boolean visited(RoutingLane lane) {
return solutionStack.contains(lane);
}
+ /**
+ * Push.
+ *
+ * @param lane the lane
+ */
public void push(RoutingLane lane) {
solutionStack.push(lane);
}
+ /**
+ * Gets the manhattan distance.
+ *
+ * @param lanes the lanes
+ * @return the manhattan distance
+ */
public int getManhattanDistance(List<RoutingLane> lanes) {
int dist = 0;
Rectangle r0 = getBounds(false, source);
@@ -359,6 +453,11 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return dist;
}
+ /**
+ * Solution found.
+ *
+ * @return true, if successful
+ */
public boolean solutionFound() {
if (!allSolutions.contains(solutionStack)) {
@@ -373,6 +472,11 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return true;
}
+ /**
+ * Rotate.
+ *
+ * @param b the b
+ */
public void rotate(boolean b) {
if (isRotated!=b) {
for (RoutingLane node : this) {
@@ -382,6 +486,13 @@ public class RoutingNet extends ArrayList<RoutingLane> {
}
}
+ /**
+ * Gets the lanes adjacent to.
+ *
+ * @param shape the shape
+ * @param adjacence the adjacence
+ * @return the lanes adjacent to
+ */
public List<RoutingLane> getLanesAdjacentTo(ContainerShape shape, Adjacence adjacence) {
List<RoutingLane> adjacentLanes;
List<RoutingLane> list = new ArrayList<RoutingLane>();
@@ -406,6 +517,13 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return getBounds(isRotated,target2);
}
+ /**
+ * Gets the bounds.
+ *
+ * @param rotate the rotate
+ * @param source2 the source2
+ * @return the bounds
+ */
protected static Rectangle getBounds(boolean rotate, Shape source2) {
ILocation loc = peService.getLocationRelativeToDiagram(source2);
IDimension size = GraphicsUtil.calculateSize(source2);
@@ -415,10 +533,25 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return new Rectangle(loc.getX(), loc.getY(), size.getWidth(), size.getHeight());
}
+ /**
+ * Rotate rectangle.
+ *
+ * @param x the x
+ * @param y the y
+ * @param width the width
+ * @param height the height
+ * @return the rectangle
+ */
protected static Rectangle rotateRectangle(int x, int y, int width, int height) {
return rotateRectangle(new Rectangle(x,y,width,height));
}
+ /**
+ * Rotate rectangle.
+ *
+ * @param r the r
+ * @return the rectangle
+ */
public static Rectangle rotateRectangle(Rectangle r) {
int y = r.x;
int x = r.y;
@@ -431,21 +564,35 @@ public class RoutingNet extends ArrayList<RoutingLane> {
return r;
}
- /****************************************************************************************
+ /**
+ * **************************************************************************************
*
* Debug stuff
*
- ****************************************************************************************/
+ * **************************************************************************************.
+ */
protected class AddRoutingLaneFeature extends AbstractAddShapeFeature {
+ /**
+ * Instantiates a new adds the routing lane feature.
+ *
+ * @param fp the fp
+ */
public AddRoutingLaneFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#canAdd(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public boolean canAdd(IAddContext context) {
return true;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#add(org.eclipse.graphiti.features.context.IAddContext)
+ */
@Override
public PictogramElement add(IAddContext context) {
int x = context.getX();
@@ -561,6 +708,9 @@ public class RoutingNet extends ArrayList<RoutingLane> {
}
}
+ /**
+ * Draw lanes.
+ */
public void drawLanes() {
if (fp!=null) {
Diagram diagram = fp.getDiagramTypeProvider().getDiagram();
@@ -577,6 +727,9 @@ public class RoutingNet extends ArrayList<RoutingLane> {
}
}
+ /**
+ * Draw connections.
+ */
public void drawConnections() {
if (fp!=null) {
Diagram diagram = fp.getDiagramTypeProvider().getDiagram();
@@ -622,6 +775,12 @@ public class RoutingNet extends ArrayList<RoutingLane> {
}
}
+ /**
+ * Draw solution.
+ *
+ * @param net the net
+ * @param i the i
+ */
public void drawSolution(List<RoutingLane> net, int i) {
if (fp!=null) {
Diagram diagram = fp.getDiagramTypeProvider().getDiagram();
@@ -638,6 +797,9 @@ public class RoutingNet extends ArrayList<RoutingLane> {
}
}
+ /**
+ * Erase lanes.
+ */
public void eraseLanes() {
if (fp!=null) {
for (RoutingLane a : this) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowDocumentationFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowDocumentationFeature.java
new file mode 100644
index 00000000..dd36d630
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowDocumentationFeature.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Factory;
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Documentation;
+import org.eclipse.bpmn2.modeler.core.IConstants;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.AbstractObjectEditingDialog;
+import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.ui.editor.DiagramEditor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * The Class ShowPropertiesFeature.
+ */
+public class ShowDocumentationFeature extends AbstractCustomFeature {
+
+ /** The changes done. */
+ protected boolean changesDone = false;
+
+ /** The current context */
+ ICustomContext context;
+
+ /**
+ * Instantiates a new show properties feature.
+ *
+ * @param fp the fp
+ */
+ public ShowDocumentationFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#getName()
+ */
+ @Override
+ public String getName() {
+ return Messages.ShowDocumentationFeature_Documentation_Title;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#getDescription()
+ */
+ @Override
+ public String getDescription() {
+ if (context!=null) {
+ PictogramElement[] pes = context.getPictogramElements();
+ EObject businessObject = BusinessObjectUtil.getBusinessObjectForPictogramElement(pes[0]);
+ EStructuralFeature feature = businessObject.eClass().getEStructuralFeature("documentation"); //$NON-NLS-1$
+ List<Documentation> docList = (List<Documentation>)businessObject.eGet(feature);
+ if (docList.size()>0) {
+ String text = docList.get(0).getText();
+ if (text!=null)
+ return text;
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#canExecute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
+ @Override
+ public boolean canExecute(ICustomContext context) {
+ PictogramElement[] pes = context.getPictogramElements();
+ EObject businessObject = BusinessObjectUtil.getBusinessObjectForPictogramElement(pes[0]);
+ if (businessObject!=null && pes.length==1) {
+ EStructuralFeature feature = businessObject.eClass().getEStructuralFeature("documentation"); //$NON-NLS-1$
+ if (feature!=null) {
+ ModelEnablements me = getModelEnablements();
+ if (me!=null && me.isEnabled(businessObject.eClass().getName(), feature.getName())) {
+ this.context = context;
+ return true;
+ }
+ }
+ }
+ this.context = null;
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
+ */
+ @Override
+ public boolean isAvailable(IContext context) {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.ICustomFeature#execute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
+ @Override
+ public void execute(ICustomContext context) {
+ PictogramElement[] pes = context.getPictogramElements();
+ EObject businessObject = BusinessObjectUtil.getBusinessObjectForPictogramElement(pes[0]);
+ EStructuralFeature feature = businessObject.eClass().getEStructuralFeature("documentation"); //$NON-NLS-1$
+ List<Documentation> docList = (List<Documentation>)businessObject.eGet(feature);
+ Documentation documentation = null;
+ String text = ""; //$NON-NLS-1$
+ if (docList.size()>0) {
+ documentation = docList.get(0);
+ text = documentation.getText();
+ }
+
+ DocumentationDialog dialog = new DocumentationDialog(Display.getDefault().getActiveShell());
+ dialog.setValue(text);
+ if (dialog.open() == Window.OK){
+ text = dialog.getValue();
+ if (documentation==null) {
+ if (text.isEmpty())
+ return;
+ documentation = Bpmn2Factory.eINSTANCE.createDocumentation();
+ docList.add(documentation);
+ }
+ documentation.setText(text);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#hasDoneChanges()
+ */
+ @Override
+ public boolean hasDoneChanges() {
+ return changesDone;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#getImageId()
+ */
+ @Override
+ public String getImageId() {
+ return IConstants.ICON_INFO_16;
+ }
+
+ /**
+ * Gets the model enablements.
+ * TODO: consider moving this stuff to a superclass
+ *
+ * @return the model enablements
+ */
+ protected ModelEnablements getModelEnablements() {
+ DiagramEditor editor = (DiagramEditor) getDiagramEditor();
+ return (ModelEnablements) editor.getAdapter(ModelEnablements.class);
+ }
+
+ public class DocumentationDialog extends Dialog {
+
+ /**
+ * @param parentShell
+ */
+ protected DocumentationDialog(Shell parentShell) {
+ super(parentShell);
+ }
+
+ String value;
+ StyledText text;
+ Font descriptionFont;
+ Display display = Display.getDefault();
+
+ public Font getDescriptionFont() {
+ if (descriptionFont==null) {
+ FontData data = display.getSystemFont().getFontData()[0];
+ descriptionFont = new Font(display, data.getName(), data.getHeight() + 1, SWT.NONE);
+ }
+ return descriptionFont;
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite container = (Composite) super.createDialogArea(parent);
+ container.setLayout(new GridLayout(2,true));
+ text = new StyledText(container, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);
+ text.setText(value);
+
+ text.setFont(getDescriptionFont());
+
+// text.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+// text.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+// text.setData(AbstractObjectEditingDialog.DO_NOT_ADAPT , Boolean.TRUE);
+
+ GridData d = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
+ d.horizontalIndent = 0;
+ d.verticalIndent = 0;
+ d.heightHint = (int)(5.5 * getDescriptionFont().getFontData()[0].getHeight());
+ d.widthHint = 100;
+ text.setLayoutData(d);
+
+ return container;
+ }
+
+ @Override
+ protected void okPressed() {
+ value = text.getText();
+ super.okPressed();
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ newShell.setText(Messages.ShowDocumentationFeature_Documentation_Title);
+ super.configureShell(newShell);
+ }
+
+ protected int getShellStyle() {
+ return super.getShellStyle(); //SWT.TOP | SWT.RESIZE | SWT.BORDER | SWT.TOOL;
+ }
+
+ @Override
+ protected Point getInitialSize() {
+ return new Point(450, 300);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowPropertiesFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowPropertiesFeature.java
index 16318365..f7992d8b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowPropertiesFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/ShowPropertiesFeature.java
@@ -20,28 +20,45 @@ import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.platform.IDiagramContainer;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.window.Window;
+/**
+ * The Class ShowPropertiesFeature.
+ */
public class ShowPropertiesFeature extends AbstractCustomFeature {
+ /** The changes done. */
protected boolean changesDone = false;
+ /**
+ * Instantiates a new show properties feature.
+ *
+ * @param fp the fp
+ */
public ShowPropertiesFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#getName()
+ */
@Override
public String getName() {
return Messages.ShowPropertiesFeature_Name;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#getDescription()
+ */
@Override
public String getDescription() {
return Messages.ShowPropertiesFeature_Title;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#canExecute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
@Override
public boolean canExecute(ICustomContext context) {
PictogramElement[] pes = context.getPictogramElements();
@@ -52,11 +69,17 @@ public class ShowPropertiesFeature extends AbstractCustomFeature {
return false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
+ */
@Override
public boolean isAvailable(IContext context) {
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.ICustomFeature#execute(org.eclipse.graphiti.features.context.ICustomContext)
+ */
@Override
public void execute(ICustomContext context) {
PictogramElement[] pes = context.getPictogramElements();
@@ -72,11 +95,17 @@ public class ShowPropertiesFeature extends AbstractCustomFeature {
changesDone = false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.impl.AbstractFeature#hasDoneChanges()
+ */
@Override
public boolean hasDoneChanges() {
return changesDone;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#getImageId()
+ */
@Override
public String getImageId() {
return IConstants.ICON_PROPERTIES_16;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java
new file mode 100644
index 00000000..ef88ccfd
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractAddActivityFeature.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.activity;
+
+
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.activity.UpdateActivityLoopAndMultiInstanceMarkerFeature.LoopCharacteristicType;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class AbstractAddActivityFeature.
+ *
+ * @param <T> the generic type
+ */
+public abstract class AbstractAddActivityFeature<T extends Activity>
+ extends AbstractBpmn2AddFeature<T> {
+
+ /**
+ * Instantiates a new abstract add activity feature.
+ *
+ * @param fp the fp
+ */
+ public AbstractAddActivityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#canAdd(org.eclipse.graphiti.features.context.IAddContext)
+ */
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return FeatureSupport.isValidFlowElementTarget(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IAdd#add(org.eclipse.graphiti.features.context.IAddContext)
+ */
+ @Override
+ public PictogramElement add(IAddContext context) {
+ T businessObject = getBusinessObject(context);
+
+ int width = getWidth(context);
+ int height = getHeight(context);
+
+ GraphicsAlgorithm targetAlgorithm = context.getTargetContainer().getGraphicsAlgorithm();
+
+ if (targetAlgorithm != null) {
+ width = Math.min(targetAlgorithm.getWidth(), width);
+ height = Math.min(targetAlgorithm.getHeight(), height);
+ }
+
+ adjustLocation(context,width,height);
+
+ int x = context.getX();
+ int y = context.getY();
+
+ ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
+ Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
+ gaService.setLocationAndSize(invisibleRect, x, y, width, height);
+
+ Shape rectShape = ShapeDecoratorUtil.createActivityBorder(containerShape, businessObject);
+
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ createDIShape(containerShape, businessObject, !isImport);
+
+ peService.setPropertyValue(containerShape, GraphitiConstants.IS_COMPENSATE_PROPERTY, Boolean.toString(false));
+ peService.setPropertyValue(containerShape, GraphitiConstants.IS_LOOP_OR_MULTI_INSTANCE, LoopCharacteristicType.NULL.getName());
+
+ // hook for subclasses to inject extra code
+ ((AddContext)context).setWidth(width);
+ ((AddContext)context).setHeight(height);
+ decorateShape(context, containerShape, businessObject);
+
+ peService.createChopboxAnchor(containerShape);
+ AnchorUtil.addFixedPointAnchors(containerShape, rectShape.getGraphicsAlgorithm());
+
+ splitConnection(context, containerShape);
+
+ return containerShape;
+ }
+
+ /**
+ * Gets the marker container offset.
+ *
+ * @return the marker container offset
+ */
+ protected int getMarkerContainerOffset() {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractCreateExpandableFlowNodeFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractCreateExpandableFlowNodeFeature.java
index 18e09054..b6da09ec 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractCreateExpandableFlowNodeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractCreateExpandableFlowNodeFeature.java
@@ -19,14 +19,27 @@ import org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class AbstractCreateExpandableFlowNodeFeature.
+ *
+ * @param <T> the generic type
+ */
public abstract class AbstractCreateExpandableFlowNodeFeature<T extends FlowNode> extends
AbstractCreateFlowElementFeature<T> {
- public AbstractCreateExpandableFlowNodeFeature(IFeatureProvider fp, String name,
- String description) {
- super(fp, name, description);
+ /**
+ * Instantiates a new abstract create expandable flow node feature.
+ *
+ * @param fp the Feature Provider
+ */
+ public AbstractCreateExpandableFlowNodeFeature(IFeatureProvider fp) {
+ super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#create(org.eclipse.graphiti.features.context.ICreateContext)
+ */
@Override
public Object[] create(ICreateContext context) {
Object[] elems = super.create(context);
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java
new file mode 100644
index 00000000..3376c228
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/AbstractUpdateMarkerFeature.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.activity;
+
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.FlowElement;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IPeService;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class AbstractUpdateMarkerFeature.
+ *
+ * @param <T> the generic type
+ */
+public abstract class AbstractUpdateMarkerFeature<T extends FlowElement> extends AbstractUpdateBaseElementFeature<Activity> {
+
+ /**
+ * Instantiates a new abstract update marker feature.
+ *
+ * @param fp the fp
+ */
+ public AbstractUpdateMarkerFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#updateNeeded(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof ContainerShape) {
+ String property = Graphiti.getPeService().getPropertyValue(pe, getPropertyKey());
+ if(property == null) {
+ return reason;
+ }
+ T activity = (T) getBusinessObjectForPictogramElement(context.getPictogramElement());
+ if (isPropertyChanged(activity, property))
+ reason = Reason.createTrueReason("Marker changed");
+ }
+ return reason;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#update(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public boolean update(IUpdateContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof ContainerShape) {
+ T element = (T) getBusinessObjectForPictogramElement(pe);
+
+ doUpdate(element, (ContainerShape) pe);
+ Graphiti.getPeService().setPropertyValue(pe, getPropertyKey(), convertPropertyToString(element));
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Gets the property key.
+ *
+ * @return the property key
+ */
+ protected abstract String getPropertyKey();
+
+ /**
+ * Checks if is property changed.
+ *
+ * @param element the element
+ * @param propertyValue the property value
+ * @return true, if is property changed
+ */
+ protected abstract boolean isPropertyChanged(T element, String propertyValue);
+
+ /**
+ * Do update.
+ *
+ * @param element the element
+ * @param markerContainer the marker container
+ */
+ protected abstract void doUpdate(T element, ContainerShape markerContainer);
+
+ /**
+ * Convert property to string.
+ *
+ * @param element the element
+ * @return the string
+ */
+ protected abstract String convertPropertyToString(T element);
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/ActivitySelectionBehavior.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/ActivitySelectionBehavior.java
index e823f16b..114e88e6 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/ActivitySelectionBehavior.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/ActivitySelectionBehavior.java
@@ -13,9 +13,9 @@
package org.eclipse.bpmn2.modeler.core.features.activity;
import java.util.Collection;
-import java.util.Iterator;
import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
@@ -23,10 +23,20 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ActivitySelectionBehavior.
+ */
public class ActivitySelectionBehavior {
+ /**
+ * Can apply to.
+ *
+ * @param element the element
+ * @return true, if successful
+ */
public static boolean canApplyTo(PictogramElement element) {
- if (element.getLink() == null || !(element instanceof ContainerShape)) {
+ if (element.getLink() == null || !(element instanceof ContainerShape) || FeatureSupport.isLabelShape(element)) {
return false;
}
@@ -41,14 +51,24 @@ public class ActivitySelectionBehavior {
return false;
}
+ /**
+ * Gets the click area.
+ *
+ * @param element the element
+ * @return the click area
+ */
public static GraphicsAlgorithm[] getClickArea(PictogramElement element) {
- Iterator<PictogramElement> iterator = Graphiti.getPeService().getPictogramElementChildren(element).iterator();
- GraphicsAlgorithm[] algorithms = new GraphicsAlgorithm[2];
- algorithms[0] = iterator.next().getGraphicsAlgorithm();
- algorithms[1] = iterator.next().getGraphicsAlgorithm();
- return algorithms;
+ Collection<PictogramElement> children = Graphiti.getPeService().getPictogramElementChildren(element);
+ PictogramElement first = children.iterator().next();
+ return new GraphicsAlgorithm[] { first.getGraphicsAlgorithm() };
}
+ /**
+ * Gets the selection border.
+ *
+ * @param element the element
+ * @return the selection border
+ */
public static GraphicsAlgorithm getSelectionBorder(PictogramElement element) {
Collection<PictogramElement> children = Graphiti.getPeService().getPictogramElementChildren(element);
PictogramElement first = children.iterator().next();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/LayoutActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/LayoutActivityFeature.java
index b1422bc1..fe55cf18 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/LayoutActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/LayoutActivityFeature.java
@@ -12,19 +12,15 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.activity;
-import static org.eclipse.bpmn2.modeler.core.features.activity.AbstractAddActivityFeature.IS_ACTIVITY;
-
-import java.util.Iterator;
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractLayoutBpmn2ShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractBoundaryEventOperation;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ILayoutContext;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
@@ -35,54 +31,50 @@ import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
-public class LayoutActivityFeature extends DefaultLayoutBPMNShapeFeature {
-
+// TODO: Auto-generated Javadoc
+/**
+ * The Class LayoutActivityFeature.
+ */
+public class LayoutActivityFeature extends AbstractLayoutBpmn2ShapeFeature {
+
+ /**
+ * Instantiates a new layout activity feature.
+ *
+ * @param fp the fp
+ */
public LayoutActivityFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractLayoutBpmn2ShapeFeature#canLayout(org.eclipse.graphiti.features.context.ILayoutContext)
+ */
@Override
public boolean canLayout(ILayoutContext context) {
- Object bo = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), BaseElement.class);
+ PictogramElement pe = context.getPictogramElement();
+ if (!(pe instanceof ContainerShape)) {
+ return false;
+ }
+ Object bo = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
return bo != null && bo instanceof Activity;
}
@Override
public boolean layout(ILayoutContext context) {
+ IGaService gaService = Graphiti.getGaService();
+
ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
GraphicsAlgorithm parentGa = containerShape.getGraphicsAlgorithm();
int newWidth = parentGa.getWidth();
int newHeight = parentGa.getHeight();
-
- GraphicsUtil.setActivityMarkerOffest(containerShape, getMarkerContainerOffset());
- GraphicsUtil.layoutActivityMarkerContainer(containerShape);
-
- Iterator<Shape> iterator = Graphiti.getPeService().getAllContainedShapes(containerShape).iterator();
- while (iterator.hasNext()) {
- Shape shape = iterator.next();
- GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
- IGaService gaService = Graphiti.getGaService();
-
-
-// String markerProperty = Graphiti.getPeService().getPropertyValue(shape,
-// GraphicsUtil.ACTIVITY_MARKER_CONTAINER);
-// if (markerProperty != null && new Boolean(markerProperty)) {
-// int x = (newWidth / 2) - (ga.getWidth() / 2);
-// int y = newHeight - ga.getHeight() - 3 - getMarkerContainerOffset();
-// gaService.setLocation(ga, x, y);
-// continue;
-// }
-
- Shape rectShape = FeatureSupport.getShape(containerShape, IS_ACTIVITY, Boolean.toString(true));
- gaService.setSize(rectShape.getGraphicsAlgorithm(), newWidth, newHeight);
- layoutInRectangle((RoundedRectangle) rectShape.getGraphicsAlgorithm());
-
- Object[] objects = getAllBusinessObjectsForPictogramElement(shape);
- for (Object bo : objects) {
- layoutHook(shape, ga, bo, newWidth, newHeight);
- }
- }
-
+
+ Shape rectShape = containerShape.getChildren().get(0);
+ gaService.setSize(rectShape.getGraphicsAlgorithm(), newWidth, newHeight);
+ layoutInRectangle((RoundedRectangle) rectShape.getGraphicsAlgorithm());
+
+ ShapeDecoratorUtil.setActivityMarkerOffest(containerShape, getMarkerContainerOffset());
+ ShapeDecoratorUtil.layoutActivityMarker(containerShape);
+
Activity activity = BusinessObjectUtil.getFirstElementOfType(containerShape, Activity.class);
new AbstractBoundaryEventOperation() {
@Override
@@ -90,9 +82,8 @@ public class LayoutActivityFeature extends DefaultLayoutBPMNShapeFeature {
layoutPictogramElement(container);
}
}.doWork(activity, getDiagram());
-
+
DIUtils.updateDIShape(containerShape);
- layoutConnections(containerShape);
if (containerShape.eContainer() instanceof ContainerShape) {
PictogramElement pe = (PictogramElement) containerShape.eContainer();
@@ -103,14 +94,20 @@ public class LayoutActivityFeature extends DefaultLayoutBPMNShapeFeature {
return true;
}
+ /**
+ * Gets the marker container offset.
+ *
+ * @return the marker container offset
+ */
protected int getMarkerContainerOffset() {
return 0;
}
+ /**
+ * Layout in rectangle.
+ *
+ * @param rect the rect
+ */
protected void layoutInRectangle(RoundedRectangle rect) {
}
-
- protected boolean layoutHook(Shape shape, GraphicsAlgorithm ga, Object bo, int newWidth, int newHeight) {
- return false;
- }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/MoveActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/MoveActivityFeature.java
index 1ba1095d..b7bb7808 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/MoveActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/MoveActivityFeature.java
@@ -14,11 +14,10 @@ package org.eclipse.bpmn2.modeler.core.features.activity;
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractBoundaryEventOperation;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
@@ -26,80 +25,40 @@ import org.eclipse.graphiti.features.context.impl.MoveShapeContext;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IPeLayoutService;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MoveActivityFeature.
+ */
public class MoveActivityFeature extends MoveFlowNodeFeature {
- public static final String ACTIVITY_MOVE_PROPERTY = "activity.move"; //$NON-NLS-1$
- public static final String SELECTION_MOVE_PROPERTY = "selection.move"; //$NON-NLS-1$
-
+ /**
+ * Instantiates a new move activity feature.
+ *
+ * @param fp the Feature Provider
+ */
public MoveActivityFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature#preMoveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
protected void preMoveShape(IMoveShapeContext context) {
- MoveShapeContext msc = (MoveShapeContext)context;
- ContainerShape oldContainer = context.getSourceContainer();
- ContainerShape newContainer = context.getTargetContainer();
- IPeLayoutService peLayoutService = Graphiti.getPeLayoutService();
-// Shape shape = context.getShape();
-// ILocation loc = peService.getLocationRelativeToDiagram(shape);
- ILocation oldLoc = peLayoutService.getLocationRelativeToDiagram(oldContainer);
- ILocation newLoc = peLayoutService.getLocationRelativeToDiagram(newContainer);
-// System.out.println(
-// (oldContainer==newContainer ? "inside:\n" : "outside:\n")+
-// "oldContainer:\n" +
-// " x="+oldLoc.getX()+"\n"+
-// " y="+oldLoc.getY()+"\n"+
-// "newContainer:\n" +
-// " x="+newLoc.getX()+"\n"+
-// " y="+newLoc.getY()+"\n"+
-// "shape:\n" +
-// " rel x="+shape.getGraphicsAlgorithm().getX()+"\n"+
-// " rel y="+shape.getGraphicsAlgorithm().getY()+"\n"+
-// " abs x="+loc.getX()+"\n"+
-// " abs y="+loc.getY()+"\n"+
-// "context:\n" +
-// " x="+msc.getX()+"\n"+
-// " y="+msc.getY()+"\n"+
-// " deltaX="+msc.getDeltaX()+"\n"+
-// " deltaY="+msc.getDeltaY()+"\n"+
-// "\n"
-// );
-
- if (oldContainer!=newContainer) {
- int x = newLoc.getX() + msc.getX() - oldLoc.getX();
- int y = newLoc.getY() + msc.getY() - oldLoc.getY();
- int deltaX = newLoc.getX() + msc.getDeltaX() - oldLoc.getX();
- int deltaY = newLoc.getY() + msc.getDeltaY() - oldLoc.getY();
-
-// System.out.println(
-// "new context:\n"+
-// " x="+( newLoc.getX() + msc.getX() - oldLoc.getX() )+"\n"+
-// " y="+msc.getY()+"\n"+
-// " deltaX="+( newLoc.getX() + msc.getDeltaX() - oldLoc.getX() )+"\n"+
-// " deltaY="+msc.getDeltaY()+"\n"+
-// "\n"
-// );
-
-// msc.setX(x);
-// msc.setY(y);
-// msc.setDeltaX(deltaX);
-// msc.setDeltaY(deltaY);
-// msc.setTargetContainer(oldContainer);
- }
-
super.preMoveShape(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature#postMoveShape(org.eclipse.graphiti.features.context.IMoveShapeContext)
+ */
@Override
protected void postMoveShape(final IMoveShapeContext context) {
super.postMoveShape(context);
- PictogramElement containerShape = context.getPictogramElement();
+
+ Shape containerShape = context.getShape();
Activity activity = BusinessObjectUtil.getFirstElementOfType(containerShape, Activity.class);
- GraphicsUtil.sendToFront(context.getShape());
new AbstractBoundaryEventOperation() {
@Override
@@ -113,7 +72,7 @@ public class MoveActivityFeature extends MoveFlowNodeFeature {
newContext.setTargetContainer(context.getTargetContainer());
newContext.setTargetConnection(context.getTargetConnection());
newContext.setLocation(ga.getX(), ga.getY());
- newContext.putProperty(ACTIVITY_MOVE_PROPERTY, true);
+ newContext.putProperty(GraphitiConstants.ACTIVITY_MOVE_PROPERTY, true);
IMoveShapeFeature moveFeature = getFeatureProvider().getMoveShapeFeature(newContext);
if (moveFeature.canMoveShape(newContext)) {
@@ -122,6 +81,7 @@ public class MoveActivityFeature extends MoveFlowNodeFeature {
}
}.doWork(activity, getDiagram());
+ layoutPictogramElement(containerShape);
if (containerShape.eContainer() instanceof ContainerShape) {
PictogramElement pe = (PictogramElement) containerShape.eContainer();
if (BusinessObjectUtil.containsElementOfType(pe, SubProcess.class)) {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityCompensateMarkerFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityCompensateMarkerFeature.java
index 355dbf16..3dd896fa 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityCompensateMarkerFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityCompensateMarkerFeature.java
@@ -13,39 +13,59 @@
package org.eclipse.bpmn2.modeler.core.features.activity;
import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Compensation;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.Compensation;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class UpdateActivityCompensateMarkerFeature.
+ */
public class UpdateActivityCompensateMarkerFeature extends AbstractUpdateMarkerFeature<Activity> {
- public static String IS_COMPENSATE_PROPERTY = "marker.compensate"; //$NON-NLS-1$
-
+ /**
+ * Instantiates a new update activity compensate marker feature.
+ *
+ * @param fp the fp
+ */
public UpdateActivityCompensateMarkerFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#getPropertyKey()
+ */
@Override
protected String getPropertyKey() {
- return IS_COMPENSATE_PROPERTY;
+ return GraphitiConstants.IS_COMPENSATE_PROPERTY;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#isPropertyChanged(org.eclipse.bpmn2.FlowElement, java.lang.String)
+ */
@Override
protected boolean isPropertyChanged(Activity activity, String propertyValue) {
return activity.isIsForCompensation() != new Boolean(propertyValue);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#doUpdate(org.eclipse.bpmn2.FlowElement, org.eclipse.graphiti.mm.pictograms.ContainerShape)
+ */
@Override
protected void doUpdate(Activity activity, ContainerShape markerContainer) {
if (activity.isIsForCompensation()) {
- GraphicsUtil.showActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_COMPENSATE);
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_COMPENSATE);
} else {
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_COMPENSATE);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_COMPENSATE);
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#convertPropertyToString(org.eclipse.bpmn2.FlowElement)
+ */
@Override
protected String convertPropertyToString(Activity activity) {
return Boolean.toString(activity.isIsForCompensation());
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityLoopAndMultiInstanceMarkerFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityLoopAndMultiInstanceMarkerFeature.java
index 9bde32b2..eea5ace2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityLoopAndMultiInstanceMarkerFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/UpdateActivityLoopAndMultiInstanceMarkerFeature.java
@@ -16,25 +16,25 @@ import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.LoopCharacteristics;
import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
import org.eclipse.bpmn2.StandardLoopCharacteristics;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Loop;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.MultiInstance;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class UpdateActivityLoopAndMultiInstanceMarkerFeature.
+ */
public class UpdateActivityLoopAndMultiInstanceMarkerFeature extends AbstractUpdateMarkerFeature<Activity> {
- public static String IS_LOOP_OR_MULTI_INSTANCE = "marker.loop.or.multi"; //$NON-NLS-1$
-
+ /**
+ * The Enum LoopCharacteristicType.
+ */
enum LoopCharacteristicType {
NULL("null"), //$NON-NLS-1$
-
LOOP(StandardLoopCharacteristics.class.getSimpleName()),
-
MULTI_PARALLEL(MultiInstanceLoopCharacteristics.class.getSimpleName() + ":parallel"), //$NON-NLS-1$
-
MULTI_SEQUENTIAL(MultiInstanceLoopCharacteristics.class.getSimpleName() + ":sequential"); //$NON-NLS-1$
private String name;
@@ -48,51 +48,74 @@ public class UpdateActivityLoopAndMultiInstanceMarkerFeature extends AbstractUpd
}
}
+ /**
+ * Instantiates a new update activity loop and multi instance marker feature.
+ *
+ * @param fp the fp
+ */
public UpdateActivityLoopAndMultiInstanceMarkerFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#getPropertyKey()
+ */
@Override
protected String getPropertyKey() {
- return IS_LOOP_OR_MULTI_INSTANCE;
+ return GraphitiConstants.IS_LOOP_OR_MULTI_INSTANCE;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#isPropertyChanged(org.eclipse.bpmn2.FlowElement, java.lang.String)
+ */
@Override
protected boolean isPropertyChanged(Activity activity, String propertyValue) {
return !getLoopCharacteristicsValue(activity).getName().equals(propertyValue);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#doUpdate(org.eclipse.bpmn2.FlowElement, org.eclipse.graphiti.mm.pictograms.ContainerShape)
+ */
@Override
protected void doUpdate(Activity activity, ContainerShape markerContainer) {
switch (getLoopCharacteristicsValue(activity)) {
case LOOP:
- GraphicsUtil.showActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_STANDARD);
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
break;
case MULTI_PARALLEL:
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_STANDARD);
- GraphicsUtil.showActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
break;
case MULTI_SEQUENTIAL:
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_STANDARD);
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
- GraphicsUtil.showActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
break;
default:
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_STANDARD);
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
- GraphicsUtil.hideActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#convertPropertyToString(org.eclipse.bpmn2.FlowElement)
+ */
@Override
protected String convertPropertyToString(Activity activity) {
return getLoopCharacteristicsValue(activity).getName();
}
- public static LoopCharacteristicType getLoopCharacteristicsValue(Activity activity) {
+ /**
+ * Gets the loop characteristics value.
+ *
+ * @param activity the activity
+ * @return the loop characteristics value
+ */
+ private LoopCharacteristicType getLoopCharacteristicsValue(Activity activity) {
LoopCharacteristics loopCharacteristics = activity.getLoopCharacteristics();
LoopCharacteristicType type = LoopCharacteristicType.NULL;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AddTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractAddTaskFeature.java
index 41c079a0..efd57c7b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AddTaskFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractAddTaskFeature.java
@@ -16,7 +16,7 @@ import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.AbstractAddActivityFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
@@ -25,9 +25,9 @@ import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Shape;
-public class AddTaskFeature<T extends Task> extends AbstractAddActivityFeature<T> {
+public abstract class AbstractAddTaskFeature<T extends Task> extends AbstractAddActivityFeature<T> {
- public AddTaskFeature(IFeatureProvider fp) {
+ public AbstractAddTaskFeature(IFeatureProvider fp) {
super(fp);
}
@@ -39,25 +39,5 @@ public class AddTaskFeature<T extends Task> extends AbstractAddActivityFeature<T
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject) {
- Shape textShape = peService.createShape(containerShape, false);
- MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, businessObject.getName());
- gaService.setLocationAndSize(text, 0, 0, context.getWidth(), context.getHeight());
- StyleUtil.applyStyle(text, businessObject);
- text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
-// text.setFont(gaService.manageFont(getDiagram(), GaServiceImpl.DEFAULT_FONT, 8, false, true));
- link(textShape, businessObject);
- }
-
- @Override
- public int getWidth() {
- return GraphicsUtil.getActivitySize(getDiagram()).getWidth();
-// return GraphicsUtil.TASK_DEFAULT_WIDTH;
- }
-
- @Override
- public int getHeight() {
- return GraphicsUtil.getActivitySize(getDiagram()).getHeight();
-// return GraphicsUtil.TASK_DEFAULT_HEIGHT;
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractCreateTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractCreateTaskFeature.java
index 434ebb02..74bca7f4 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractCreateTaskFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AbstractCreateTaskFeature.java
@@ -18,7 +18,7 @@ import org.eclipse.graphiti.features.IFeatureProvider;
public abstract class AbstractCreateTaskFeature<T extends Task> extends AbstractCreateFlowElementFeature<T> {
- public AbstractCreateTaskFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateTaskFeature(IFeatureProvider fp) {
+ super(fp);
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AddTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AddTaskFeature.java
new file mode 100644
index 00000000..f868e36f
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/AddTaskFeature.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.activity.task;
+
+import org.eclipse.bpmn2.FlowElementsContainer;
+import org.eclipse.bpmn2.Task;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+
+public class AddTaskFeature extends AbstractAddTaskFeature<Task> {
+
+ public AddTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return super.canAdd(context)
+ || BusinessObjectUtil.containsElementOfType(context.getTargetContainer(), FlowElementsContainer.class);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return Task.class;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/DirectEditTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/DirectEditTaskFeature.java
index 4f99a976..43b50077 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/DirectEditTaskFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/DirectEditTaskFeature.java
@@ -12,11 +12,12 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.activity.task;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2DirectEditingFeature;
import org.eclipse.bpmn2.modeler.core.features.DirectEditBaseElementFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDirectEditingContext;
-public class DirectEditTaskFeature extends DirectEditBaseElementFeature {
+public class DirectEditTaskFeature extends AbstractBpmn2DirectEditingFeature {
public DirectEditTaskFeature(IFeatureProvider fp) {
super(fp);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/Messages.java
index 8813c267..0d928c86 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.activity.task;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties
new file mode 100644
index 00000000..eeeb37b3
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+DirectEditTaskFeature_Invalid_Empty=Please enter any text as Task name.
+DirectEditTaskFeature_Invalid_Linebreak=Line breakes are not allowed in Task names.
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AbstractCreateArtifactFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AbstractCreateArtifactFeature.java
index 79fa962c..79b3804f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AbstractCreateArtifactFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AbstractCreateArtifactFeature.java
@@ -26,11 +26,12 @@ import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public abstract class AbstractCreateArtifactFeature<T extends Artifact> extends AbstractBpmn2CreateFeature<T> {
- public AbstractCreateArtifactFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateArtifactFeature(IFeatureProvider fp) {
+ super(fp);
}
@Override
@@ -41,8 +42,8 @@ public abstract class AbstractCreateArtifactFeature<T extends Artifact> extends
@Override
public Object[] create(ICreateContext context) {
T artifact = createBusinessObject(context);
- addGraphicalRepresentation(context, artifact);
- return new Object[] { artifact };
+ PictogramElement pe = addGraphicalRepresentation(context, artifact);
+ return new Object[] { artifact, pe };
}
protected abstract String getStencilImageId();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AddTextAnnotationFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AddTextAnnotationFeature.java
index dccc4c56..fc342f0e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AddTextAnnotationFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/AddTextAnnotationFeature.java
@@ -12,16 +12,19 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.artifact;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.TextAnnotation;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
-import org.eclipse.graphiti.mm.algorithms.MultiText;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.Rectangle;
import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
@@ -29,16 +32,36 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeCreateService;
-public class AddTextAnnotationFeature extends AbstractBpmn2AddElementFeature<TextAnnotation> {
+public class AddTextAnnotationFeature extends AbstractBpmn2AddFeature<TextAnnotation> {
public AddTextAnnotationFeature(IFeatureProvider fp) {
super(fp);
}
@Override
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp) {
+
+ @Override
+ public void applyStyle(AbstractText text, BaseElement be) {
+ super.applyStyle(text, be);
+ text.setHorizontalAlignment(Orientation.ALIGNMENT_LEFT);
+ text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
+ }
+
+ @Override
+ public String getLabelString(BaseElement element) {
+ if (element instanceof TextAnnotation)
+ return ((TextAnnotation)element).getText();
+ return "";
+ }
+
+ };
+ }
+
+ @Override
public boolean canAdd(IAddContext context) {
return FeatureSupport.isValidArtifactTarget(context);
}
@@ -50,8 +73,6 @@ public class AddTextAnnotationFeature extends AbstractBpmn2AddElementFeature<Tex
IPeCreateService peCreateService = Graphiti.getPeCreateService();
ContainerShape containerShape = peCreateService.createContainerShape(context.getTargetContainer(), true);
- IGaService gaService = Graphiti.getGaService();
-
int width = this.getWidth(context);
int height = this.getHeight(context);
int commentEdge = 15;
@@ -66,15 +87,8 @@ public class AddTextAnnotationFeature extends AbstractBpmn2AddElementFeature<Tex
line.setLineWidth(2);
gaService.setLocationAndSize(line, 0, 0, commentEdge, height);
- Shape textShape = peCreateService.createShape(containerShape, false);
- MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, businessObject.getText());
- StyleUtil.applyStyle(text, businessObject);
- text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
- gaService.setLocationAndSize(text, 5, 5, width - 5, height - 5);
-
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
- link(textShape, businessObject);
// hook for subclasses to inject extra code
((AddContext)context).setWidth(width);
@@ -83,18 +97,23 @@ public class AddTextAnnotationFeature extends AbstractBpmn2AddElementFeature<Tex
peCreateService.createChopboxAnchor(containerShape);
AnchorUtil.addFixedPointAnchors(containerShape, rect);
-
- layoutPictogramElement(containerShape);
- return containerShape;
- }
- @Override
- public int getHeight() {
- return 100;
+ // prepare the AddContext to create a Label
+// prepareAddContext(context, containerShape, width, height);
+// IFeatureContainer fc = new LabelFeatureContainer();
+// fc.getAddFeature(getFeatureProvider()).add(context);
+//
+// updatePictogramElement(context, containerShape);
+// layoutPictogramElement(containerShape);
+
+ return containerShape;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public int getWidth() {
- return 50;
+ public Class getBusinessObjectType() {
+ return TextAnnotation.class;
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/DirectEditTextAnnotationFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/DirectEditTextAnnotationFeature.java
index edd57439..8d699a85 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/DirectEditTextAnnotationFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/DirectEditTextAnnotationFeature.java
@@ -13,30 +13,35 @@
package org.eclipse.bpmn2.modeler.core.features.artifact;
import org.eclipse.bpmn2.TextAnnotation;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2DirectEditingFeature;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDirectEditingContext;
import org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.MultiText;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.ui.platform.ICellEditorProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
-public class DirectEditTextAnnotationFeature extends AbstractDirectEditingFeature {
+public class DirectEditTextAnnotationFeature extends AbstractBpmn2DirectEditingFeature {
public DirectEditTextAnnotationFeature(IFeatureProvider fp) {
super(fp);
}
@Override
- public int getEditingType() {
- return TYPE_TEXT;
- }
-
- @Override
public String getInitialValue(IDirectEditingContext context) {
PictogramElement pe = context.getPictogramElement();
TextAnnotation annotation = (TextAnnotation) getBusinessObjectForPictogramElement(pe);
- return annotation.getText();
+ String text = annotation.getText();
+ return text==null ? "" : text;
}
@Override
@@ -49,9 +54,6 @@ public class DirectEditTextAnnotationFeature extends AbstractDirectEditingFeatur
@Override
public boolean canDirectEdit(IDirectEditingContext context) {
- PictogramElement pe = context.getPictogramElement();
- Object bo = getBusinessObjectForPictogramElement(pe);
- GraphicsAlgorithm ga = context.getGraphicsAlgorithm();
- return bo instanceof TextAnnotation && ga instanceof MultiText;
+ return BusinessObjectUtil.getBusinessObject(context, TextAnnotation.class) != null;
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/LayoutTextAnnotationFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/LayoutTextAnnotationFeature.java
index df2282bb..5b0cb565 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/LayoutTextAnnotationFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/LayoutTextAnnotationFeature.java
@@ -16,7 +16,7 @@ import java.util.Iterator;
import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractLayoutBpmn2ShapeFeature;
import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ILayoutContext;
@@ -30,7 +30,7 @@ import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
-public class LayoutTextAnnotationFeature extends DefaultLayoutBPMNShapeFeature {
+public class LayoutTextAnnotationFeature extends AbstractLayoutBpmn2ShapeFeature {
public LayoutTextAnnotationFeature(IFeatureProvider fp) {
super(fp);
@@ -38,11 +38,11 @@ public class LayoutTextAnnotationFeature extends DefaultLayoutBPMNShapeFeature {
@Override
public boolean canLayout(ILayoutContext context) {
- PictogramElement pictoElem = context.getPictogramElement();
- if (!(pictoElem instanceof ContainerShape)) {
+ PictogramElement pe = context.getPictogramElement();
+ if (!(pe instanceof ContainerShape)) {
return false;
}
- Object bo = getBusinessObjectForPictogramElement(pictoElem);
+ Object bo = getBusinessObjectForPictogramElement(pe);
return bo instanceof TextAnnotation;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/UpdateTextAnnotationFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/UpdateTextAnnotationFeature.java
index 75117bcc..0f7448f0 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/UpdateTextAnnotationFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/artifact/UpdateTextAnnotationFeature.java
@@ -18,22 +18,16 @@ import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IUpdateContext;
-public class UpdateTextAnnotationFeature extends AbstractUpdateBaseElementFeature {
+public class UpdateTextAnnotationFeature extends AbstractUpdateBaseElementFeature<TextAnnotation> {
public UpdateTextAnnotationFeature(IFeatureProvider fp) {
super(fp);
}
@Override
- public boolean canUpdate(IUpdateContext context) {
- return getBusinessObjectForPictogramElement(context.getPictogramElement()) instanceof TextAnnotation;
- }
-
- @Override
public boolean update(IUpdateContext context) {
- boolean ret = super.update(context);
DIUtils.updateDIShape(context.getPictogramElement());
- return ret;
+ return true;
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/AddBendpointFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/AddBendpointFeature.java
index f7f1c78c..4c3b7901 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/AddBendpointFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/AddBendpointFeature.java
@@ -15,10 +15,10 @@ package org.eclipse.bpmn2.modeler.core.features.bendpoint;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.BendpointConnectionRouter;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/MoveBendpointFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/MoveBendpointFeature.java
index 076e99b1..27de9ebb 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/MoveBendpointFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/MoveBendpointFeature.java
@@ -47,11 +47,6 @@ public class MoveBendpointFeature extends DefaultMoveBendpointFeature {
p.setX(context.getX());
p.setY(context.getY());
- // also need to move the connection point if there is one at this bendpoint
- Shape connectionPointShape = AnchorUtil.getConnectionPointAt(connection, context.getBendpoint());
- if (connectionPointShape!=null)
- AnchorUtil.setConnectionPointLocation(connectionPointShape, context.getX(), context.getY());
-
BendpointConnectionRouter.setMovedBendpoint(connection, context.getBendpointIndex());
FeatureSupport.updateConnection(getFeatureProvider(), connection);
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/RemoveBendpointFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/RemoveBendpointFeature.java
index b93d006c..084768d8 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/RemoveBendpointFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/bendpoint/RemoveBendpointFeature.java
@@ -31,15 +31,6 @@ public class RemoveBendpointFeature extends DefaultRemoveBendpointFeature {
public RemoveBendpointFeature(IFeatureProvider fp) {
super(fp);
}
-
- @Override
- public boolean canRemoveBendpoint(IRemoveBendpointContext context) {
- Shape connectionPointShape = AnchorUtil.getConnectionPointAt(context.getConnection(), context.getBendpoint());
- if (connectionPointShape!=null)
- return false;
-
- return super.canRemoveBendpoint(context);
- }
@Override
public void removeBendpoint(IRemoveBendpointContext context) {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/Properties.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyProperties.java
index 23ba7841..987c6ba4 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/Properties.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyProperties.java
@@ -10,11 +10,7 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.data;
+package org.eclipse.bpmn2.modeler.core.features.choreography;
-public interface Properties {
-
- public static final String COLLECTION_PROPERTY = "isCollection"; //$NON-NLS-1$
- public static final String HIDEABLE_PROPERTY = "hideable"; //$NON-NLS-1$
-
-}
+public interface ChoreographyProperties {
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyUtil.java
new file mode 100644
index 00000000..60655ca3
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/ChoreographyUtil.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.choreography;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.Message;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.BoundaryAnchor;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.context.impl.LayoutContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.mm.PropertyContainer;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+
+/**
+ * FIXME: Clean this mess up. These should be in their appropriate Features, not a utility class.
+ */
+public class ChoreographyUtil implements ChoreographyProperties {
+
+ public final static int ENV_W = 30;
+ public final static int ENV_H = 18;
+ public final static int ENVELOPE_HEIGHT_MODIFIER = 30;
+ public final static String PARTICIPANT_REF_IDS = "choreography.activity.participant.ref.ids"; //$NON-NLS-1$
+ public final static String INITIATING_PARTICIPANT_REF = "choreography.activity.initiating.participant.ref"; //$NON-NLS-1$
+ public final static String MESSAGE_VISIBLE = "choreography.activity.band.message.visible"; //$NON-NLS-1$
+ public final static String PARTICIPANT_BAND = "choreography.activity.band"; //$NON-NLS-1$
+ public final static String MESSAGE_LINK = "choreography.messageLink"; //$NON-NLS-1$
+ public final static String MESSAGE_NAME = "choreography.messageName"; //$NON-NLS-1$
+ public final static String MESSAGE_REF_IDS = "choreography.message.ref.ids"; //$NON-NLS-1$
+
+ private static IGaService gaService = Graphiti.getGaService();
+ private static IPeService peService = Graphiti.getPeService();
+
+ public static List<BPMNShape> getParticipantBandBpmnShapes(ContainerShape choreographyActivityShape) {
+ List<BPMNShape> bpmnShapes = new ArrayList<BPMNShape>();
+ List<ContainerShape> containers = FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape);
+ for (ContainerShape container : containers) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
+ bpmnShapes.add(bpmnShape);
+ }
+ return bpmnShapes;
+ }
+
+ /**
+ * Get the Choreography Activity shape that either owns, or is, the given
+ * PictogramElement.
+ *
+ * @param pe a PictogramElement that must be either the Choreography
+ * Activity shape, or a Participant Band of the Choreography
+ * Activity shape.
+ * @return a ContainerShape for the Choreography Activity or null if the
+ * given PictogramElement is not contained in a Choreography
+ * Activity shape.
+ */
+ public static ContainerShape getChoreographyActivityShape(PictogramElement pe) {
+ if (isChoreographyParticipantBand(pe))
+ return (ContainerShape) pe.eContainer();
+ if (isChoreographyActivity(pe))
+ return (ContainerShape) pe;
+ return null;
+ }
+
+ /**
+ * Check if the given PictogramElement is a Choreography Participant Band
+ * shape.
+ *
+ * @param pe a PictogramElement
+ * @return true if the PictogramElement is a Participant Band, false
+ * otherwise.
+ */
+ public static boolean isChoreographyParticipantBand(PictogramElement pe) {
+ if (pe instanceof ContainerShape) {
+ return isChoreographyActivity((PictogramElement)pe.eContainer());
+ }
+ return false;
+ }
+
+ /**
+ * Check if the given PictogramElement is a Choreography Activity shape.
+ *
+ * @param pe a PictogramElement
+ * @return true if the PictogramElement is a Choreography Activity, false
+ * otherwise.
+ */
+ public static boolean isChoreographyActivity(PictogramElement pe) {
+ if (pe instanceof ContainerShape) {
+ Object bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
+ if (bo instanceof ChoreographyActivity) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check if the given PictogramElement is a Choreography Task Message Link.
+ *
+ * @param pe a PictogramElement
+ * @return true if the PictogramElement is a Message Link, false otherwise.
+ */
+ public static boolean isChoreographyMessageLink(PictogramElement pe) {
+ EObject o = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
+ if (o instanceof MessageFlow && pe instanceof Connection) {
+ Connection c = (Connection)pe;
+ if (c.getStart()!=null && peService.getPropertyValue(c.getStart().getParent(),ChoreographyUtil.MESSAGE_LINK) != null)
+ return true;
+ if (c.getEnd()!=null && peService.getPropertyValue(c.getEnd().getParent(),ChoreographyUtil.MESSAGE_LINK) != null)
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Check if the given PictogramElement is a Choreography Task Message.
+ *
+ * @param pe a PictogramElement
+ * @return true if the PictogramElement is a Message, false otherwise.
+ */
+ public static boolean isChoreographyMessage(PictogramElement pe) {
+ EObject o = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
+ if (o instanceof Message && pe instanceof ContainerShape) {
+ if (peService.getPropertyValue(pe,ChoreographyUtil.MESSAGE_LINK) != null)
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean removeChoreographyMessageLink(PictogramElement pe) {
+ if (isChoreographyMessageLink(pe)) {
+ Connection connection = (Connection)pe;
+ // remove the Message figure
+ peService.deletePictogramElement( connection.getEnd().getParent() );
+ // remove the connection
+ peService.deletePictogramElement(connection);
+ return true;
+ }
+ return false;
+ }
+
+ public static String getMessageRefIds(ContainerShape choreographyTaskShape) {
+ String property = peService.getPropertyValue(choreographyTaskShape, MESSAGE_REF_IDS);
+ if (property == null) {
+ return new String(); // return empty string
+ }
+ return property;
+ }
+
+ public static String getMessageRefIds(ChoreographyTask choreographyTask) {
+ if (choreographyTask.getMessageFlowRef() == null) {
+ return new String();
+ }
+ Iterator<MessageFlow> iterator = choreographyTask.getMessageFlowRef().iterator();
+ StringBuilder sb = new StringBuilder();
+ while (iterator.hasNext()) {
+ MessageFlow message = iterator.next();
+ sb.append(message.getId());
+ if (iterator.hasNext()) {
+ sb.append(':');
+ }
+ }
+ return sb.toString();
+ }
+
+ public static String getMessageFlowName(MessageFlow flow) {
+ if (flow.getMessageRef() == null) {
+ return flow.getName();
+ } else if (flow.getMessageRef().getItemRef()==null ||
+ flow.getMessageRef().getItemRef().getStructureRef()==null) {
+ return flow.getMessageRef().getName();
+ } else {
+ String messageName = flow.getMessageRef().getName();
+ String itemDefinitionName = ExtendedPropertiesProvider.getTextValue(flow.getMessageRef().getItemRef());
+ String text = itemDefinitionName;
+ if (messageName!=null && !messageName.isEmpty())
+ text += "/" + messageName; //$NON-NLS-1$
+ text = messageName;
+ return text;
+ }
+ }
+
+ public static String getMessageName(Message mesg) {
+ if (mesg.getItemRef()==null ||
+ mesg.getItemRef().getStructureRef()==null) {
+ if (mesg.getName()==null)
+ return mesg.getId();
+ return mesg.getName();
+ } else {
+ String type = "(" + ExtendedPropertiesProvider.getTextValue(mesg.getItemRef()) +")"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (mesg.getName()==null)
+ return type;
+ return mesg.getName() + type;
+ }
+ }
+
+ public static void updateChoreographyMessageLinks(IFeatureProvider fp, PictogramElement pe) {
+ if (pe instanceof ContainerShape) {
+ ContainerShape choreographyTaskShape = (ContainerShape) pe;
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(choreographyTaskShape, BPMNShape.class);
+ Bounds bounds = bpmnShape.getBounds();
+ int x = (int) ((bounds.getX() + bounds.getWidth() / 2) - (ChoreographyUtil.ENV_W / 2));
+
+ Map<AnchorLocation, BoundaryAnchor> boundaryAnchors = AnchorUtil.getBoundaryAnchors(choreographyTaskShape);
+ BoundaryAnchor topBoundaryAnchor = boundaryAnchors.get(AnchorLocation.TOP);
+ BoundaryAnchor bottomBoundaryAnchor = boundaryAnchors.get(AnchorLocation.BOTTOM);
+
+ for (Connection connection : topBoundaryAnchor.anchor.getOutgoingConnections()) {
+ EObject container = connection.getEnd().eContainer();
+ if (container instanceof PropertyContainer) {
+ String property = peService.getPropertyValue((PropertyContainer) container, ChoreographyUtil.MESSAGE_LINK);
+ if (property != null && new Boolean(property)) {
+ int y = (int) (bounds.getY() - ChoreographyUtil.ENVELOPE_HEIGHT_MODIFIER - ChoreographyUtil.ENV_H);
+ gaService.setLocation(((ContainerShape) container).getGraphicsAlgorithm(), x, y);
+ break;
+ }
+ }
+ }
+
+ for (Connection connection : bottomBoundaryAnchor.anchor.getOutgoingConnections()) {
+ EObject container = connection.getEnd().eContainer();
+ if (container instanceof PropertyContainer) {
+ String property = peService.getPropertyValue((PropertyContainer) container, ChoreographyUtil.MESSAGE_LINK);
+ if (property != null && new Boolean(property)) {
+ int y = (int) (bounds.getY() + bounds.getHeight() + ChoreographyUtil.ENVELOPE_HEIGHT_MODIFIER);
+ gaService.setLocation(((ContainerShape) container).getGraphicsAlgorithm(), x, y);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Update the Choreography Activity Participant Bands and force a layout
+ * of the Choreography Activity such that its Label and any Loop markers
+ * are correctly placed inside the Choreography Activity shape
+ *
+ * @param fp the Feature Provider
+ * @param pe the Choreography Activity Container Shape
+ */
+ public static void updateParticipantBands(IFeatureProvider fp, PictogramElement pe) {
+ IUpdateContext updateContext = new UpdateContext(pe);
+ updateContext.putProperty(GraphitiConstants.FORCE_UPDATE_ALL, Boolean.TRUE);
+ IUpdateFeature updateFeature = fp.getUpdateFeature(updateContext); //new UpdateChoreographyParticipantRefsFeature(fp);
+ updateFeature.update(updateContext);
+
+ ILayoutContext layoutContext = new LayoutContext(pe);
+ ILayoutFeature layoutFeature = fp.getLayoutFeature(layoutContext);
+ layoutFeature.layout(layoutContext);
+ }
+
+ public static String getParticipantRefIds(ChoreographyActivity choreographyActivity) {
+ if (choreographyActivity.getParticipantRefs() == null) {
+ return new String();
+ }
+ Iterator<Participant> iterator = choreographyActivity.getParticipantRefs().iterator();
+ StringBuilder sb = new StringBuilder();
+ while (iterator.hasNext()) {
+ Participant participant = iterator.next();
+ sb.append(participant.getId());
+ boolean multiple = participant.getParticipantMultiplicity() != null
+ && participant.getParticipantMultiplicity().getMaximum() > 1;
+ if (multiple)
+ sb.append('*');
+ if (iterator.hasNext()) {
+ sb.append(':');
+ }
+ }
+ return sb.toString();
+ }
+
+ public static String getParticipantRefIds(ContainerShape choreographyActivityShape) {
+ String property = peService.getPropertyValue(choreographyActivityShape, PARTICIPANT_REF_IDS);
+ if (property == null) {
+ return new String(); // return empty string
+ }
+ return property;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java
new file mode 100644
index 00000000..bb76aa38
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/LayoutChoreographyFeature.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.choreography;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.di.ParticipantBandKind;
+import org.eclipse.bpmn2.modeler.core.features.AbstractLayoutBpmn2ShapeFeature;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+
+public class LayoutChoreographyFeature extends AbstractLayoutBpmn2ShapeFeature {
+
+ protected IPeService peService = Graphiti.getPeService();
+ protected IGaService gaService = Graphiti.getGaService();
+
+ public LayoutChoreographyFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canLayout(ILayoutContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (!(pe instanceof ContainerShape)) {
+ return false;
+ }
+ return BusinessObjectUtil.getFirstElementOfType(pe, ChoreographyActivity.class) != null;
+ }
+
+ @Override
+ public boolean layout(ILayoutContext context) {
+ ContainerShape choreographyActivityShape = (ContainerShape) context.getPictogramElement();
+ GraphicsAlgorithm parentGa = choreographyActivityShape.getGraphicsAlgorithm();
+
+ int newWidth = parentGa.getWidth();
+ int newHeight = parentGa.getHeight();
+
+ Shape rectShape = choreographyActivityShape.getChildren().get(0);
+ gaService.setSize(rectShape.getGraphicsAlgorithm(), newWidth, newHeight);
+
+ int minY = newHeight;
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape);
+ for (ContainerShape b : bandShapes) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(b, BPMNShape.class);
+ ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
+ if (bandKind == ParticipantBandKind.BOTTOM_INITIATING ||
+ bandKind == ParticipantBandKind.BOTTOM_NON_INITIATING ||
+ bandKind == ParticipantBandKind.MIDDLE_NON_INITIATING) {
+ int y = b.getGraphicsAlgorithm().getY();
+ if (y<minY)
+ minY = y;
+ }
+ }
+ ShapeDecoratorUtil.setActivityMarkerOffest(choreographyActivityShape, newHeight - minY);
+ ShapeDecoratorUtil.layoutActivityMarker(choreographyActivityShape);
+
+ IUpdateFeature feature = new UpdateChoreographyLabelFeature(getFeatureProvider());
+ IUpdateContext updateContext = new UpdateContext(choreographyActivityShape);
+ feature.update(updateContext);
+ return true;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java
new file mode 100644
index 00000000..c705ddb7
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/Messages.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.choreography;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.choreography.messages"; //$NON-NLS-1$
+ public static String UpdateChoreographyNameFeature_Name;
+ public static String ChoreographyUtil_Undefined_Message;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java
index e77c883a..ea80cd8c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java
@@ -10,29 +10,27 @@
*
* @author Innar Made
******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.choreography;
-
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.INITIATING_PARTICIPANT_REF;
+package org.eclipse.bpmn2.modeler.core.features.choreography;
import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.ParticipantBandKind;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.emf.ecore.EObject;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.algorithms.styles.Color;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IPeService;
import org.eclipse.graphiti.util.IColorConstant;
-public class UpdateChoreographyInitiatingParticipantFeature extends AbstractUpdateFeature {
+public class UpdateChoreographyInitiatingParticipantFeature extends AbstractUpdateBaseElementFeature<ChoreographyActivity> {
private final IPeService peService = Graphiti.getPeService();
@@ -41,23 +39,16 @@ public class UpdateChoreographyInitiatingParticipantFeature extends AbstractUpda
}
@Override
- public boolean canUpdate(IUpdateContext context) {
- return BusinessObjectUtil.containsElementOfType(context.getPictogramElement(), ChoreographyActivity.class);
- }
-
- @Override
public IReason updateNeeded(IUpdateContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (!(pe instanceof ContainerShape))
+ return Reason.createFalseReason();
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
- ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- ChoreographyActivity.class);
+ ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(pe, ChoreographyActivity.class);
+ if (choreography==null)
+ return Reason.createFalseReason();
- String id = peService.getPropertyValue(context.getPictogramElement(), INITIATING_PARTICIPANT_REF);
+ String id = peService.getPropertyValue(context.getPictogramElement(), ChoreographyUtil.INITIATING_PARTICIPANT_REF);
Participant participant = choreography.getInitiatingParticipantRef();
if ((id == null || id.equals("null")) && participant == null) { //$NON-NLS-1$
@@ -68,7 +59,7 @@ public class UpdateChoreographyInitiatingParticipantFeature extends AbstractUpda
return Reason.createFalseReason();
}
- return Reason.createTrueReason();
+ return Reason.createTrueReason("Initiating Participant");
}
@Override
@@ -81,7 +72,7 @@ public class UpdateChoreographyInitiatingParticipantFeature extends AbstractUpda
boolean hasInitiatingParticipant = choreography.getInitiatingParticipantRef() != null;
- for (ContainerShape band : ChoreographyUtil.getParticipantBandContainerShapes(container)) {
+ for (ContainerShape band : FeatureSupport.getParticipantBandContainerShapes(container)) {
Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
boolean isInitiating = hasInitiatingParticipant
&& participant.equals(choreography.getInitiatingParticipantRef());
@@ -93,7 +84,7 @@ public class UpdateChoreographyInitiatingParticipantFeature extends AbstractUpda
Participant initiatingParticipant = choreography.getInitiatingParticipantRef();
String id = initiatingParticipant == null ? "null" : initiatingParticipant.getId(); //$NON-NLS-1$
- peService.setPropertyValue(context.getPictogramElement(), INITIATING_PARTICIPANT_REF, id);
+ peService.setPropertyValue(context.getPictogramElement(), ChoreographyUtil.INITIATING_PARTICIPANT_REF, id);
return true;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java.orig b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java.orig
new file mode 100644
index 00000000..883ac429
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java.orig
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.choreography;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.di.ParticipantBandKind;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java
+import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.emf.ecore.EObject;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.styles.Color;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IPeService;
+import org.eclipse.graphiti.util.IColorConstant;
+
+public class UpdateChoreographyInitiatingParticipantFeature extends AbstractUpdateBaseElementFeature<ChoreographyActivity> {
+
+ private final IPeService peService = Graphiti.getPeService();
+
+ public UpdateChoreographyInitiatingParticipantFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (!(pe instanceof ContainerShape))
+ return Reason.createFalseReason();
+
+ ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(pe, ChoreographyActivity.class);
+ if (choreography==null)
+ return Reason.createFalseReason();
+
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java
+ Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ if (value instanceof EObject) {
+ // if the UpdateContext has a "businessObject" property, then this update is needed
+ // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
+ return Reason.createTrueReason("Initial update");
+ }
+ ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ ChoreographyActivity.class);
+
+ String id = peService.getPropertyValue(context.getPictogramElement(), INITIATING_PARTICIPANT_REF);
+=======
+ String id = peService.getPropertyValue(context.getPictogramElement(), ChoreographyUtil.INITIATING_PARTICIPANT_REF);
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyInitiatingParticipantFeature.java
+ Participant participant = choreography.getInitiatingParticipantRef();
+
+ if ((id == null || id.equals("null")) && participant == null) { //$NON-NLS-1$
+ return Reason.createFalseReason();
+ }
+
+ if (participant != null && (id != null && id.equals(participant.getId()))) {
+ return Reason.createFalseReason();
+ }
+
+ return Reason.createTrueReason("Initiating Participant");
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+
+ ContainerShape container = (ContainerShape) context.getPictogramElement();
+
+ ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(container,
+ ChoreographyActivity.class);
+
+ boolean hasInitiatingParticipant = choreography.getInitiatingParticipantRef() != null;
+
+ for (ContainerShape band : FeatureSupport.getParticipantBandContainerShapes(container)) {
+ Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
+ boolean isInitiating = hasInitiatingParticipant
+ && participant.equals(choreography.getInitiatingParticipantRef());
+ Color color = manageColor(isInitiating ? IColorConstant.WHITE : IColorConstant.LIGHT_GRAY);
+ band.getGraphicsAlgorithm().setBackground(color);
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
+ bpmnShape.setParticipantBandKind(getParticipantBandKind(isInitiating, bpmnShape.getParticipantBandKind()));
+ }
+
+ Participant initiatingParticipant = choreography.getInitiatingParticipantRef();
+ String id = initiatingParticipant == null ? "null" : initiatingParticipant.getId(); //$NON-NLS-1$
+ peService.setPropertyValue(context.getPictogramElement(), ChoreographyUtil.INITIATING_PARTICIPANT_REF, id);
+
+ return true;
+ }
+
+ private ParticipantBandKind getParticipantBandKind(boolean initiating, ParticipantBandKind currentBandKind) {
+ switch (currentBandKind) {
+ case TOP_INITIATING:
+ return initiating ? currentBandKind : ParticipantBandKind.TOP_NON_INITIATING;
+ case MIDDLE_INITIATING:
+ return initiating ? currentBandKind : ParticipantBandKind.MIDDLE_NON_INITIATING;
+ case BOTTOM_INITIATING:
+ return initiating ? currentBandKind : ParticipantBandKind.BOTTOM_NON_INITIATING;
+ case TOP_NON_INITIATING:
+ return initiating ? ParticipantBandKind.TOP_INITIATING : currentBandKind;
+ case MIDDLE_NON_INITIATING:
+ return initiating ? ParticipantBandKind.MIDDLE_INITIATING : currentBandKind;
+ case BOTTOM_NON_INITIATING:
+ return initiating ? ParticipantBandKind.BOTTOM_INITIATING : currentBandKind;
+ default:
+ return currentBandKind;
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyLabelFeature.java
new file mode 100644
index 00000000..7ca682d4
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyLabelFeature.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.choreography;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.CallChoreography;
+import org.eclipse.bpmn2.SubChoreography;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+
+public class UpdateChoreographyLabelFeature extends UpdateLabelFeature {
+
+ /**
+ * @param fp
+ */
+ public UpdateChoreographyLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ protected LabelPosition getHorizontalLabelPosition(AbstractText text) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(text);
+ Object bo = getBusinessObjectForPictogramElement(pe);
+ if ((bo instanceof SubChoreography || bo instanceof CallChoreography) &&
+ FeatureSupport.isElementExpanded((BaseElement)bo)) {
+ return LabelPosition.LEFT;
+ }
+ return LabelPosition.CENTER;
+ }
+
+ protected LabelPosition getVerticalLabelPosition(AbstractText text) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(text);
+ Object bo = getBusinessObjectForPictogramElement(pe);
+ if ((bo instanceof SubChoreography || bo instanceof CallChoreography) &&
+ FeatureSupport.isElementExpanded((BaseElement)bo)) {
+ return LabelPosition.TOP;
+ }
+ return LabelPosition.CENTER;
+ }
+
+ @Override
+ protected Rectangle getLabelBounds(PictogramElement pe, boolean isAddingLabel, Point offset) {
+ Rectangle bounds = super.getLabelBounds(pe, isAddingLabel, offset);
+ if (!isAddingLabel) {
+ Object bo = getBusinessObjectForPictogramElement(pe);
+ if ((bo instanceof SubChoreography || bo instanceof CallChoreography) &&
+ FeatureSupport.isElementExpanded((BaseElement)bo)) {
+ // This shape is expanded, so the label will appear at the top-left
+ // corner of the shape. Adjust the vertical position so that the label
+ // is just below the top Participant Band(s).
+ ContainerShape choreographyActivityShape = (ContainerShape) FeatureSupport.getLabelOwner(pe);
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape);
+ List<ContainerShape> topBandShapes = FeatureSupport.getTopAndBottomBands(bandShapes).getFirst();
+ int dy = 0;
+ for (ContainerShape s : topBandShapes) {
+ dy += Graphiti.getGaLayoutService().calculateSize(s.getGraphicsAlgorithm()).getHeight();
+ }
+ bounds.setY(bounds.y + dy);
+ }
+ }
+ return bounds;
+ }
+
+ @Override
+ protected ContainerShape getTargetContainer(PictogramElement ownerPE) {
+ return (ContainerShape) ownerPE;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantBandsFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantBandsFeature.java
new file mode 100644
index 00000000..2ebef568
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantBandsFeature.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.choreography;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+/**
+ *
+ */
+public class UpdateChoreographyParticipantBandsFeature extends AbstractBpmn2UpdateFeature {
+
+ IUpdateFeature updateFeature;
+
+ /**
+ * @param fp
+ */
+ public UpdateChoreographyParticipantBandsFeature(IFeatureProvider fp) {
+ super(fp);
+
+ updateFeature = new UpdateLabelFeature(getFeatureProvider()) {
+
+ @Override
+ protected LabelPosition getLabelPosition(AbstractText text) {
+ return LabelPosition.CENTER;
+ }
+
+ @Override
+ protected ContainerShape getTargetContainer(PictogramElement ownerPE) {
+ return (ContainerShape) ownerPE;
+ }
+ };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#canUpdate(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ return context.getPictogramElement() instanceof ContainerShape;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(containerShape);
+ for (ContainerShape s : bandShapes) {
+ IUpdateContext newContext = new UpdateContext(s);
+ if (updateFeature.updateNeeded(newContext).toBoolean())
+ return Reason.createTrueReason("Particpant Name Changed");
+ }
+ return Reason.createFalseReason();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#update(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
+ @Override
+ public boolean update(IUpdateContext context) {
+ ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(containerShape);
+ for (ContainerShape s : bandShapes) {
+ IUpdateContext newContext = new UpdateContext(s);
+ updateFeature.update(newContext);
+ }
+ return true;
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantRefsFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantRefsFeature.java
new file mode 100644
index 00000000..d028c8f9
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/UpdateChoreographyParticipantRefsFeature.java
@@ -0,0 +1,420 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.choreography;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.bpmn2.CallChoreography;
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.InteractionNode;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.di.ParticipantBandKind;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.core.utils.Tuple;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.dd.di.DiagramElement;
+import org.eclipse.graphiti.datatypes.IDimension;
+import org.eclipse.graphiti.datatypes.ILocation;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.features.context.impl.AreaContext;
+import org.eclipse.graphiti.features.context.impl.LayoutContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
+import org.eclipse.graphiti.mm.algorithms.Text;
+import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+import org.eclipse.graphiti.util.IColorConstant;
+
+public class UpdateChoreographyParticipantRefsFeature extends AbstractBpmn2UpdateFeature {
+
+ private final static IPeService peService = Graphiti.getPeService();
+ private final static IGaService gaService = Graphiti.getGaService();
+ private final static int CORNER_RADIUS = 5;
+
+ private ContainerShape choreographyActivityShape;
+ private ChoreographyActivity choreographyActivity;
+
+ public UpdateChoreographyParticipantRefsFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ return ChoreographyUtil.getChoreographyActivityShape(context.getPictogramElement()) != null;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ choreographyActivityShape = ChoreographyUtil.getChoreographyActivityShape(context.getPictogramElement());
+ if (choreographyActivityShape!=null) {
+ choreographyActivity= BusinessObjectUtil.getFirstElementOfType(choreographyActivityShape, ChoreographyActivity.class);
+ String shapeIds = ChoreographyUtil.getParticipantRefIds(choreographyActivityShape);
+ String activityIds = ChoreographyUtil.getParticipantRefIds(choreographyActivity);
+ if (!shapeIds.equals(activityIds))
+ return Reason.createTrueReason("Participants");
+ }
+ return Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ choreographyActivityShape = ChoreographyUtil.getChoreographyActivityShape(context.getPictogramElement());
+ choreographyActivity = BusinessObjectUtil.getFirstElementOfType(choreographyActivityShape, ChoreographyActivity.class);
+ List<Participant> participants = choreographyActivity.getParticipantRefs();
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape);
+
+ updateParticipantReferences(bandShapes, participants);
+
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.PARTICIPANT_REF_IDS, ChoreographyUtil.getParticipantRefIds(choreographyActivity));
+
+ Participant initiatingParticipant = choreographyActivity.getInitiatingParticipantRef();
+ String id = initiatingParticipant == null ? "null" : initiatingParticipant.getId(); //$NON-NLS-1$
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.INITIATING_PARTICIPANT_REF, id);
+
+// ChoreographyUtil.drawMessageLinks(getFeatureProvider(), choreographyActivityShape);
+
+ ILayoutContext layoutContext = new LayoutContext(choreographyActivityShape);
+ LayoutChoreographyFeature feature = new LayoutChoreographyFeature(getFeatureProvider());
+ feature.layout(layoutContext);
+
+ return true;
+ }
+
+ private void updateParticipantReferences(List<ContainerShape> currentParticipantContainers, List<Participant> newParticipants) {
+
+ Diagram diagram = peService.getDiagramForShape(choreographyActivityShape);
+
+ BPMNDiagram dia = BusinessObjectUtil.getFirstElementOfType(diagram, BPMNDiagram.class);
+ List<DiagramElement> diElements = dia.getPlane().getPlaneElement();
+ for (int i = 0; i < currentParticipantContainers.size(); i++) {
+ ContainerShape container = currentParticipantContainers.get(i);
+ for (Connection c : peService.getOutgoingConnections(container)) {
+ AnchorContainer parent = c.getEnd().getParent();
+ Shape labelShape = FeatureSupport.getLabelShape(parent);
+ if (labelShape!=null)
+ peService.deletePictogramElement(labelShape);
+ peService.deletePictogramElement(parent);
+ }
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
+ diElements.remove(bpmnShape);
+ Shape labelShape = FeatureSupport.getLabelShape(container);
+ if (labelShape!=null)
+ peService.deletePictogramElement(labelShape);
+ peService.deletePictogramElement(container);
+ }
+
+ GraphicsAlgorithm ga = choreographyActivityShape.getGraphicsAlgorithm();
+ IDimension size = gaService.calculateSize(ga);
+
+ List<ContainerShape> newContainers = new ArrayList<ContainerShape>();
+ int y = 0;
+ boolean first = true;
+
+ List<InteractionNode> sources = new ArrayList<InteractionNode>();
+ if (choreographyActivity instanceof ChoreographyTask) {
+ for (MessageFlow message : ((ChoreographyTask) choreographyActivity).getMessageFlowRef()) {
+ sources.add(message.getSourceRef());
+ }
+ }
+
+ IFeatureProvider fp = getFeatureProvider();
+ Iterator<Participant> iterator = newParticipants.iterator();
+ while (iterator.hasNext()) {
+ Participant participant = iterator.next();
+
+ ContainerShape bandShape = peService.createContainerShape(choreographyActivityShape, true);
+
+ ParticipantBandKind bandKind = getNewParticipantBandKind(choreographyActivity, participant, first,
+ !iterator.hasNext());
+
+ boolean multiple = participant.getParticipantMultiplicity() != null
+ && participant.getParticipantMultiplicity().getMaximum() > 1;
+
+ int w = size.getWidth();
+ int h = multiple ? 40 : 20;
+
+ BPMNShape bpmnShape = DIUtils.createDIShape(bandShape, participant, 0, y + h, w, h, fp, diagram);
+ bpmnShape.setChoreographyActivityShape(BusinessObjectUtil.getFirstElementOfType(choreographyActivityShape,
+ BPMNShape.class));
+ bpmnShape.setIsMarkerVisible(multiple);
+ bpmnShape.setParticipantBandKind(bandKind);
+ bpmnShape.setIsMessageVisible(sources.contains(participant));
+ createParticipantBandContainerShape(bandKind, bandShape, bpmnShape);
+ if (multiple) {
+ drawMultiplicityMarkers(bandShape);
+ }
+ newContainers.add(bandShape);
+
+ y += h;
+ first = false;
+ }
+
+ Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottom = FeatureSupport.getTopAndBottomBands(newContainers);
+ resizeParticipantBandContainerShapes(size.getWidth(), size.getHeight(), topAndBottom.getFirst(),
+ topAndBottom.getSecond());
+ }
+
+ private ParticipantBandKind getNewParticipantBandKind(ChoreographyActivity choreography,
+ Participant participant, boolean first, boolean last) {
+ boolean initiating = choreography.getInitiatingParticipantRef() != null
+ && choreography.getInitiatingParticipantRef().equals(participant);
+ if (first) {
+ return initiating ? ParticipantBandKind.TOP_INITIATING : ParticipantBandKind.TOP_NON_INITIATING;
+ } else if (last) {
+ return initiating ? ParticipantBandKind.BOTTOM_INITIATING : ParticipantBandKind.BOTTOM_NON_INITIATING;
+ } else {
+ return initiating ? ParticipantBandKind.MIDDLE_INITIATING : ParticipantBandKind.MIDDLE_NON_INITIATING;
+ }
+ }
+
+ private ContainerShape createParticipantBandContainerShape(ParticipantBandKind bandKind, ContainerShape bandShape, BPMNShape bpmnShape) {
+
+ switch (bandKind) {
+ case TOP_INITIATING:
+ return createTopShape(bandShape, bpmnShape, true);
+ case TOP_NON_INITIATING:
+ return createTopShape(bandShape, bpmnShape, false);
+ case MIDDLE_INITIATING:
+ return createMiddleShape(bandShape, bpmnShape, true);
+ case MIDDLE_NON_INITIATING:
+ return createMiddleShape(bandShape, bpmnShape, false);
+ case BOTTOM_INITIATING:
+ return createBottomShape(bandShape, bpmnShape, true);
+ case BOTTOM_NON_INITIATING:
+ return createBottomShape(bandShape, bpmnShape, false);
+ }
+
+ return bandShape;
+ }
+
+ private ContainerShape createTopShape(ContainerShape bandShape, BPMNShape bpmnShape, boolean initiating) {
+
+ if (bandShape == null) {
+ bandShape = peService.createContainerShape(choreographyActivityShape, true);
+ }
+
+ Bounds bounds = bpmnShape.getBounds();
+ int w = (int) bounds.getWidth();
+ int h = (int) bounds.getHeight();
+
+ Diagram diagram = peService.getDiagramForPictogramElement(choreographyActivityShape);
+ RoundedRectangle band = gaService.createRoundedRectangle(bandShape, CORNER_RADIUS, CORNER_RADIUS);
+ StyleUtil.applyStyle(band, bpmnShape.getBpmnElement());
+ band.setStyle(null);
+ band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
+ diagram, IColorConstant.LIGHT_GRAY));
+ gaService.setLocationAndSize(band, 0, 0, w, h);
+
+ IFeatureProvider fp = getFeatureProvider();
+ Participant participant = (Participant) bpmnShape.getBpmnElement();
+ fp.link(bandShape, participant);
+ fp.link(bandShape, bpmnShape);
+
+ addBandLabel(bandShape, w, h);
+
+ Graphiti.getPeCreateService().createChopboxAnchor(bandShape);
+ AnchorUtil.addFixedPointAnchors(bandShape, band);
+ peService.setPropertyValue(bandShape, ChoreographyUtil.PARTICIPANT_BAND, Boolean.toString(true));
+ peService.setPropertyValue(bandShape, ChoreographyUtil.MESSAGE_VISIBLE,
+ Boolean.toString(bpmnShape.isIsMessageVisible()));
+ return bandShape;
+ }
+
+ private ContainerShape createBottomShape(ContainerShape bandShape, BPMNShape bpmnShape, boolean initiating) {
+
+ if (bandShape == null) {
+ bandShape = peService.createContainerShape(choreographyActivityShape, true);
+ }
+
+ Bounds bounds = bpmnShape.getBounds();
+ int w = (int) bounds.getWidth();
+ int h = (int) bounds.getHeight();
+
+ ILocation parentLoc = peService.getLocationRelativeToDiagram(choreographyActivityShape);
+ int y = (int) bounds.getY() - parentLoc.getY();
+
+ Diagram diagram = peService.getDiagramForPictogramElement(choreographyActivityShape);
+ RoundedRectangle band = gaService.createRoundedRectangle(bandShape, CORNER_RADIUS, CORNER_RADIUS);
+ StyleUtil.applyStyle(band, bpmnShape.getBpmnElement());
+ band.setStyle(null);
+ band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
+ diagram, IColorConstant.LIGHT_GRAY));
+ gaService.setLocationAndSize(band, 0, y, w, h);
+
+ IFeatureProvider fp = getFeatureProvider();
+ Participant participant = (Participant) bpmnShape.getBpmnElement();
+ fp.link(bandShape, participant);
+ fp.link(bandShape, bpmnShape);
+
+ addBandLabel(bandShape, w, h);
+
+ Graphiti.getPeCreateService().createChopboxAnchor(bandShape);
+ AnchorUtil.addFixedPointAnchors(bandShape, band);
+ peService.setPropertyValue(bandShape, ChoreographyUtil.PARTICIPANT_BAND, Boolean.toString(true));
+ peService.setPropertyValue(bandShape, ChoreographyUtil.MESSAGE_VISIBLE,
+ Boolean.toString(bpmnShape.isIsMessageVisible()));
+ return bandShape;
+ }
+
+ private ContainerShape createMiddleShape(ContainerShape bandShape, BPMNShape bpmnShape, boolean initiating) {
+
+ if (bandShape == null) {
+ bandShape = peService.createContainerShape(choreographyActivityShape, true);
+ }
+
+ Bounds bounds = bpmnShape.getBounds();
+ int w = (int) bounds.getWidth();
+ int h = (int) bounds.getHeight();
+
+ ILocation parentLoc = peService.getLocationRelativeToDiagram(choreographyActivityShape);
+ int y = (int) bounds.getY() - parentLoc.getY();
+
+ Diagram diagram = peService.getDiagramForPictogramElement(choreographyActivityShape);
+ Rectangle band = gaService.createRectangle(bandShape);
+ StyleUtil.applyStyle(band, bpmnShape.getBpmnElement());
+ band.setStyle(null);
+ band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
+ diagram, IColorConstant.LIGHT_GRAY));
+ gaService.setLocationAndSize(band, 0, y, w, h);
+
+ IFeatureProvider fp = getFeatureProvider();
+ Participant participant = (Participant) bpmnShape.getBpmnElement();
+ fp.link(bandShape, participant);
+ fp.link(bandShape, bpmnShape);
+
+ addBandLabel(bandShape, w, h);
+
+ Graphiti.getPeCreateService().createChopboxAnchor(bandShape);
+ AnchorUtil.addFixedPointAnchors(bandShape, band);
+ peService.setPropertyValue(bandShape, ChoreographyUtil.PARTICIPANT_BAND, Boolean.toString(true));
+ peService.setPropertyValue(bandShape, ChoreographyUtil.MESSAGE_VISIBLE,
+ Boolean.toString(bpmnShape.isIsMessageVisible()));
+ return bandShape;
+ }
+
+ private void addBandLabel(final ContainerShape bandShape, int w, int h) {
+ Participant participant = (Participant) BusinessObjectUtil.getFirstBaseElement(bandShape);
+ AreaContext ac = new AreaContext();
+ ac.setHeight(h);
+ ac.setWidth(w);
+ AddContext context = new AddContext(ac, bandShape);
+ context.setNewObject(participant);
+ IAddFeature feature = new AddShapeLabelFeature(getFeatureProvider()) {
+ @Override
+ protected ContainerShape getTargetContainer(IAddContext context) {
+ return bandShape;
+ }
+
+ @Override
+ protected PictogramElement getLabelOwner(IAddContext context) {
+ return bandShape;
+ }
+ };
+ feature.add(context);
+ }
+
+ private void resizeParticipantBandContainerShapes(int w, int h, List<ContainerShape> top,
+ List<ContainerShape> bottom) {
+
+ boolean shrink = choreographyActivity instanceof CallChoreography;
+ int y = shrink ? 2 : 0;
+ int x = shrink ? 2 : 0;
+ if (shrink) {
+ w -= 4;
+ h -= 2;
+ }
+
+ for (ContainerShape container : top) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
+ Bounds bounds = bpmnShape.getBounds();
+ int hAcc = (int) bounds.getHeight();
+ gaService.setLocationAndSize(container.getGraphicsAlgorithm(), x, y, w, hAcc);
+ y += hAcc;
+ resizeParticipantBandChildren(container, w);
+ DIUtils.updateDIShape(container);
+ AnchorUtil.relocateFixPointAnchors(container, w, (int) bounds.getHeight());
+ }
+
+ Collections.reverse(bottom); // start from bottom towards center
+ y = h;
+ for (ContainerShape container : bottom) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
+ Bounds bounds = bpmnShape.getBounds();
+ y -= bounds.getHeight();
+ gaService.setLocationAndSize(container.getGraphicsAlgorithm(), x, y, w, (int) bounds.getHeight());
+ resizeParticipantBandChildren(container, w);
+ DIUtils.updateDIShape(container);
+ AnchorUtil.relocateFixPointAnchors(container, w, (int) bounds.getHeight());
+ }
+ }
+
+ private void resizeParticipantBandChildren(ContainerShape container, int w) {
+ for (Shape s : container.getChildren()) {
+ GraphicsAlgorithm ga = s.getGraphicsAlgorithm();
+ if (ga instanceof Text) {
+ gaService.setSize(ga, w, ga.getHeight());
+ } else if (ga instanceof Rectangle) {
+ gaService.setLocation(ga, (w / 2) - (ga.getWidth() / 2), ga.getY());
+ }
+ }
+ }
+
+ private void drawMultiplicityMarkers(ContainerShape container) {
+ Diagram diagram = peService.getDiagramForPictogramElement(container);
+ Shape multiplicityShape = peService.createShape(container, false);
+ Rectangle rect = gaService.createInvisibleRectangle(multiplicityShape);
+
+ IDimension size = gaService.calculateSize(container.getGraphicsAlgorithm());
+ int w = 10;
+ int h = 10;
+ int x = (size.getWidth() / 2) - (w / 2);
+ int y = size.getHeight() - h - 1;
+ gaService.setLocationAndSize(rect, x, y, w, h);
+
+ int[][] coorinates = { new int[] { 0, 0, 0, h }, new int[] { 4, 0, 4, h }, new int[] { 8, 0, 8, h } };
+ for (int[] xy : coorinates) {
+ Polyline line = gaService.createPolyline(rect, xy);
+ line.setLineWidth(2);
+ line.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties
new file mode 100644
index 00000000..6fbb85b4
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/choreography/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+UpdateChoreographyNameFeature_Name=Name is out of date
+ChoreographyUtil_Undefined_Message=Undefined Message
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/CustomKeyCommandFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/CustomKeyCommandFeature.java
index bbb8fe38..f7720a2a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/CustomKeyCommandFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/CustomKeyCommandFeature.java
@@ -1,6 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.command;
-import org.eclipse.bpmn2.modeler.core.features.DefaultPasteBPMNElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.datatypes.ILocation;
@@ -28,9 +38,9 @@ public class CustomKeyCommandFeature extends AbstractCustomFeature implements IC
@Override
public boolean isAvailable(String hint) {
if (hint!=null) {
- if (hint.startsWith("move"))
+ if (hint.startsWith("move")) //$NON-NLS-1$
return true;
- if (hint.startsWith("duplicate"))
+ if (hint.startsWith("duplicate")) //$NON-NLS-1$
return true;
}
return false;
@@ -38,11 +48,11 @@ public class CustomKeyCommandFeature extends AbstractCustomFeature implements IC
@Override
public boolean canExecute(ICustomContext context) {
- String command = (String) context.getProperty(COMMAND_HINT);
+ String command = (String) context.getProperty(GraphitiConstants.COMMAND_HINT);
if (command!=null) {
- if (command.startsWith("move"))
+ if (command.startsWith("move")) //$NON-NLS-1$
return canExecuteMove(context);
- else if (command.startsWith("duplicate"))
+ else if (command.startsWith("duplicate")) //$NON-NLS-1$
return canExecuteDuplicate(context);
}
return false;
@@ -84,7 +94,7 @@ public class CustomKeyCommandFeature extends AbstractCustomFeature implements IC
Point point = GraphicsUtil.createPoint(p.x, p.y);
PasteContext pasteContext = new PasteContext(pes, point.getX(), point.getY());
- pasteContext.putProperty(DefaultPasteBPMNElementFeature.COPY_FROM_CONTEXT, Boolean.TRUE);
+ pasteContext.putProperty(GraphitiConstants.COPY_FROM_CONTEXT, Boolean.TRUE);
IPasteFeature pasteFeature = getFeatureProvider().getPasteFeature(pasteContext);
if (pasteFeature==null || !pasteFeature.canPaste(pasteContext))
return false;
@@ -94,10 +104,10 @@ public class CustomKeyCommandFeature extends AbstractCustomFeature implements IC
@Override
public void execute(ICustomContext context) {
- String command = (String) context.getProperty(COMMAND_HINT);
- if (command.startsWith("move"))
+ String command = (String) context.getProperty(GraphitiConstants.COMMAND_HINT);
+ if (command.startsWith("move")) //$NON-NLS-1$
executeMove(context);
- else if (command.startsWith("duplicate")) {
+ else if (command.startsWith("duplicate")) { //$NON-NLS-1$
executeDuplicate(context);
}
}
@@ -106,19 +116,19 @@ public class CustomKeyCommandFeature extends AbstractCustomFeature implements IC
int dx = 0;
int dy = 0;
int mult = 1;
- String command = (String) context.getProperty(COMMAND_HINT);
- if (command.endsWith("10")) {
+ String command = (String) context.getProperty(GraphitiConstants.COMMAND_HINT);
+ if (command.endsWith("10")) { //$NON-NLS-1$
mult = 10;
- command = command.replace("10", "");
+ command = command.replace("10", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
- if ("moveup".equals(command))
+ if ("moveup".equals(command)) //$NON-NLS-1$
dy = -1;
- else if ("movedown".equals(command))
+ else if ("movedown".equals(command)) //$NON-NLS-1$
dy = 1;
- else if ("moveleft".equals(command))
+ else if ("moveleft".equals(command)) //$NON-NLS-1$
dx = -1;
- else if ("moveright".equals(command))
+ else if ("moveright".equals(command)) //$NON-NLS-1$
dx = 1;
dx *= mult;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java
new file mode 100644
index 00000000..700c51cf
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/command/ICustomCommandFeature.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.command;
+
+public interface ICustomCommandFeature {
+
+ boolean isAvailable(String hint);
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/AbstractResizeContainerFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/AbstractResizeContainerFeature.java
new file mode 100644
index 00000000..13327013
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/AbstractResizeContainerFeature.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Stack;
+
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+
+/**
+ * Abstract base class for the Resize Feature for Lanes and Pools. This class
+ * handles Label and Connection updating after the Pool/Lane hierarchy has been
+ * resized, and also creates a list of non-Lane descendant shapes (i.e. Tasks,
+ * Events, Gateways, etc.) contained in the root-level Pool or Lane.
+ * <p>
+ * The Pool/Lane Resize Feature specializations must implement {@link #resizeHeight()}
+ * and {@link #resizeWidth()}
+ */
+public abstract class AbstractResizeContainerFeature extends DefaultResizeBPMNShapeFeature {
+
+ protected ContainerShape rootContainer;
+ protected List<PictogramElement> descendants = new ArrayList<PictogramElement>();
+ protected boolean isHorizontal;
+ protected Stack<Point> containerPos = new Stack<Point>();
+
+ /**
+ * @param fp the Feature Provider
+ */
+ public AbstractResizeContainerFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ abstract protected void resizeHeight(IResizeShapeContext context);
+ abstract protected void resizeWidth(IResizeShapeContext context);
+
+ @Override
+ protected void preResizeShape(IResizeShapeContext context) {
+ ContainerShape containerShape = (ContainerShape) context.getShape();
+
+ if (rootContainer==null) {
+ super.preResizeShape(context);
+
+ rootContainer = FeatureSupport.getRootContainer(containerShape);
+ isHorizontal = FeatureSupport.isHorizontal(rootContainer);
+ descendants = FeatureSupport.getPoolAndLaneDescendants(rootContainer);
+
+ }
+
+ GraphicsAlgorithm laneGa = containerShape.getGraphicsAlgorithm();
+ Point p = Graphiti.getCreateService().createPoint(laneGa.getX(),laneGa.getY());
+ containerPos.push(p);
+ }
+
+ @Override
+ protected void postResizeShape(IResizeShapeContext context) {
+ ContainerShape containerShape = (ContainerShape) context.getShape();
+
+ // Adjust location of children so that a resize up or left
+ // leaves them in the same location relative to the diagram.
+ // This allows the user to create (or remove) space between
+ // the Lane's edge and the contained activities.
+ Point offset = null;
+ Point pos = containerPos.pop();
+ if (context.getDirection()==IResizeShapeContext.DIRECTION_NORTH ||
+ context.getDirection()==IResizeShapeContext.DIRECTION_WEST ||
+ context.getDirection()==IResizeShapeContext.DIRECTION_NORTH_WEST ||
+ context.getDirection()==IResizeShapeContext.DIRECTION_NORTH_EAST ||
+ context.getDirection()==IResizeShapeContext.DIRECTION_SOUTH_WEST) {
+ int deltaX = pos.getX() - context.getX();
+ int deltaY = pos.getY() - context.getY();
+ // we'll need to use this as the offset for MOVABLE Labels
+ offset = Graphiti.getCreateService().createPoint(deltaX, deltaY);
+
+ for (PictogramElement pe : descendants) {
+ if (containerShape.getChildren().contains(pe)) {
+ GraphicsAlgorithm ga = pe.getGraphicsAlgorithm();
+ Graphiti.getLayoutService().setLocation(ga, ga.getX() + deltaX, ga.getY() + deltaY);
+ FeatureSupport.updateLabel(getFeatureProvider(), pe, offset);
+ }
+ }
+ }
+
+ for (PictogramElement pe : descendants) {
+ if (pe instanceof FreeFormConnection) {
+ FreeFormConnection c = (FreeFormConnection) pe;
+ FeatureSupport.updateConnection(getFeatureProvider(), c, true);
+ }
+ }
+
+ DIUtils.updateDIShape(containerShape);
+ if (rootContainer!=containerShape) {
+ DIUtils.updateDIShape(rootContainer);
+ }
+
+ FeatureSupport.updateLabel(getFeatureProvider(), rootContainer, null);
+
+ super.postResizeShape(context);
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/LayoutContainerFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/LayoutContainerFeature.java
new file mode 100644
index 00000000..6977fff5
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/LayoutContainerFeature.java
@@ -0,0 +1,308 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers;
+
+import java.awt.Dimension;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.AbstractLayoutBpmn2ShapeFeature;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+
+public class LayoutContainerFeature extends AbstractLayoutBpmn2ShapeFeature {
+
+ private final static IGaService gaService = Graphiti.getGaService();
+
+ private static class SiblingLaneComparator implements Comparator<Shape> {
+ @Override
+ public int compare(Shape o1, Shape o2) {
+ Lane l1 = BusinessObjectUtil.getFirstElementOfType(o1, Lane.class);
+ Lane l2 = BusinessObjectUtil.getFirstElementOfType(o2, Lane.class);
+
+ if (l1 != null && l2 != null && l1.eContainer().equals(l2.eContainer())) {
+ int y1 = o1.getGraphicsAlgorithm().getY();
+ int y2 = o2.getGraphicsAlgorithm().getY();
+ return new Integer(y1).compareTo(y2);
+ }
+ return 0;
+ }
+ }
+
+ public LayoutContainerFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canLayout(ILayoutContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (!(pe instanceof ContainerShape)) {
+ return false;
+ }
+ return FeatureSupport.isParticipant(pe) || FeatureSupport.isLane(pe);
+ }
+
+ @Override
+ public boolean layout(ILayoutContext context) {
+ ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
+ ContainerShape rootContainer = FeatureSupport.getRootContainer(containerShape);
+
+ resizeContainersRecursively(rootContainer);
+ postResizeFixLenghts(rootContainer);
+
+ FeatureSupport.updateLabel(getFeatureProvider(), containerShape, null);
+ if (rootContainer != containerShape)
+ FeatureSupport.updateLabel(getFeatureProvider(), rootContainer, null);
+
+ DIUtils.updateDIShape(rootContainer);
+
+ for (PictogramElement pe : FeatureSupport.getPoolAndLaneDescendants(rootContainer)) {
+ if (pe instanceof Connection) {
+ FeatureSupport.updateConnection(getFeatureProvider(), (Connection)pe, true);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if the given Shape and Business Object can be resized.
+ *
+ * @param currentBo
+ * @param s
+ * @param bo
+ * @return
+ */
+ private boolean canResize(BaseElement currentBo, Shape s, Object bo) {
+ return s instanceof ContainerShape &&
+ (bo instanceof Lane || bo instanceof Participant) &&
+ !bo.equals(currentBo);
+ }
+
+ private void postResizeFixLenghts(ContainerShape root) {
+
+ BaseElement elem = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class);
+ GraphicsAlgorithm ga = root.getGraphicsAlgorithm();
+ int width = ga.getWidth() - 30;
+ int height = ga.getHeight() - 30;
+ boolean horz = FeatureSupport.isHorizontal(root);
+
+ for (Shape s : root.getChildren()) {
+ Object bo = BusinessObjectUtil.getFirstElementOfType(s, BaseElement.class);
+ if (canResize(elem, s, bo)) {
+ GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
+ if (horz)
+ gaService.setSize(childGa, width, childGa.getHeight());
+ else
+ gaService.setSize(childGa, childGa.getWidth(), height);
+ DIUtils.updateDIShape(s);
+ postResizeFixLenghts((ContainerShape) s);
+ }
+ }
+ DIUtils.updateDIShape(root);
+ }
+
+ private Dimension resizeContainer(ContainerShape container) {
+ BaseElement elem = BusinessObjectUtil.getFirstElementOfType(container, BaseElement.class);
+ int height = 0;
+ int width = container.getGraphicsAlgorithm().getWidth() - 30;
+ boolean horz = FeatureSupport.isHorizontal(container);
+ if (horz) {
+ height = 0;
+ width = container.getGraphicsAlgorithm().getWidth() - 30;
+ } else {
+ width = 0;
+ height = container.getGraphicsAlgorithm().getHeight() - 30;
+ }
+
+ EList<Shape> children = container.getChildren();
+ ECollections.sort(children, new SiblingLaneComparator());
+ for (Shape s : children) {
+ Object bo = BusinessObjectUtil.getFirstElementOfType(s, BaseElement.class);
+ if (canResize(elem, s, bo)) {
+ GraphicsAlgorithm ga = s.getGraphicsAlgorithm();
+ if (horz) {
+ gaService.setLocation(ga, 30, height);
+ height += ga.getHeight() - 1;
+ if (ga.getWidth() >= width) {
+ width = ga.getWidth();
+ } else {
+ gaService.setSize(ga, width, ga.getHeight());
+ }
+ } else {
+ gaService.setLocation(ga, width, 30);
+ width += ga.getWidth() - 1;
+ if (ga.getHeight() >= height) {
+ height = ga.getHeight();
+ } else {
+ gaService.setSize(ga, ga.getWidth(), height);
+ }
+ }
+ }
+ }
+
+ GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
+
+ if (horz) {
+ if (height == 0) {
+ return new Dimension(ga.getWidth(), ga.getHeight());
+ } else {
+ int newWidth = width + 30;
+ int newHeight = height + 1;
+ gaService.setSize(ga, newWidth, newHeight);
+
+ for (Shape s : children) {
+ if (FeatureSupport.isLabelShape(s))
+ continue;
+ GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
+ if (childGa instanceof Polyline) {
+ // this is the separator line in a Pool
+ Polyline line = (Polyline) childGa;
+ Point p0 = line.getPoints().get(0);
+ Point p1 = line.getPoints().get(1);
+ p0.setX(30);
+ p0.setY(0);
+ p1.setX(30);
+ p1.setY(newHeight);
+ }
+ }
+
+ return new Dimension(newWidth, newHeight);
+ }
+ } else {
+ if (width == 0) {
+ return new Dimension(ga.getWidth(), ga.getHeight());
+ } else {
+ int newWidth = width + 1;
+ int newHeight = height + 30;
+ gaService.setSize(ga, newWidth, newHeight);
+
+ for (Shape s : children) {
+ if (FeatureSupport.isLabelShape(s))
+ continue;
+ GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
+ if (childGa instanceof Polyline) {
+ // this is the separator line in a Pool
+ Polyline line = (Polyline) childGa;
+ Point p0 = line.getPoints().get(0);
+ Point p1 = line.getPoints().get(1);
+ p0.setX(0);
+ p0.setY(30);
+ p1.setX(newWidth);
+ p1.setY(30);
+ }
+ }
+
+ return new Dimension(newWidth, newHeight);
+ }
+ }
+ }
+
+ private Dimension resizeContainersRecursively(ContainerShape root) {
+ BaseElement elem = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class);
+ List<Dimension> dimensions = new ArrayList<Dimension>();
+ int foundContainers = 0;
+ boolean horz = FeatureSupport.isHorizontal(root);
+
+ List<Shape> children = new ArrayList<Shape>();
+ children.addAll(root.getChildren());
+ for (Shape s : children) {
+ if (FeatureSupport.isLabelShape(s))
+ continue;
+ Object bo = BusinessObjectUtil.getFirstElementOfType(s, BaseElement.class);
+ if (canResize(elem, s, bo)) {
+ foundContainers += 1;
+ Dimension d = resizeContainersRecursively((ContainerShape) s);
+ if (d != null) {
+ dimensions.add(d);
+ }
+ }
+ }
+
+ if (dimensions.isEmpty()) {
+ GraphicsAlgorithm ga = root.getGraphicsAlgorithm();
+ for (Shape s : children) {
+ if (FeatureSupport.isLabelShape(s))
+ continue;
+ GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
+ if (childGa instanceof Polyline) {
+ Polyline line = (Polyline) childGa;
+ Point p0 = line.getPoints().get(0);
+ Point p1 = line.getPoints().get(1);
+ if (horz) {
+ p0.setX(30);
+ p0.setY(0);
+ p1.setX(30);
+ p1.setY(ga.getHeight());
+ } else {
+ p0.setX(0);
+ p0.setY(30);
+ p1.setX(ga.getWidth());
+ p1.setY(30);
+ }
+ }
+ }
+ return new Dimension(ga.getWidth(), ga.getHeight());
+ }
+
+ if (foundContainers > 0) {
+ return resizeContainer(root);
+ }
+
+ return getMaxDimension(horz, dimensions);
+ }
+
+ private Dimension getMaxDimension(boolean horz, List<Dimension> dimensions) {
+ if (dimensions.isEmpty()) {
+ return null;
+ }
+ int height = 0;
+ int width = 0;
+
+ if (horz) {
+ for (Dimension d : dimensions) {
+ height += d.height;
+ if (d.width > width) {
+ width = d.width;
+ }
+ }
+ }
+ else {
+ for (Dimension d : dimensions) {
+ width += d.width;
+ if (d.height > height) {
+ height = d.height;
+ }
+ }
+ }
+ return new Dimension(width, height);
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/MoveContainerFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/MoveContainerFeature.java
new file mode 100644
index 00000000..a6151a1d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/MoveContainerFeature.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.containers;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+/**
+ *
+ */
+public class MoveContainerFeature extends DefaultMoveBPMNShapeFeature {
+ protected List<PictogramElement> children;
+
+ /**
+ * @param fp
+ */
+ public MoveContainerFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected void preMoveShape(IMoveShapeContext context) {
+ Shape shape = context.getShape();
+ if (!FeatureSupport.isLabelShape(shape) && shape instanceof ContainerShape) {
+ ContainerShape rootContainer = FeatureSupport.getRootContainer((ContainerShape)shape);
+ children = FeatureSupport.getPoolAndLaneDescendants(rootContainer);
+ }
+ super.preMoveShape(context);
+ }
+
+ @Override
+ protected void postMoveShape(IMoveShapeContext context) {
+ Shape shape = context.getShape();
+
+ if (!FeatureSupport.isLabelShape(shape) && shape instanceof ContainerShape) {
+ for (PictogramElement pe : children) {
+ if (pe instanceof Connection) {
+ FeatureSupport.updateConnection(getFeatureProvider(), (Connection)pe, true);
+ }
+ else {
+ DIUtils.updateDIShape(pe);
+ FeatureSupport.updateLabel(getFeatureProvider(), pe, null);
+ }
+ }
+ }
+
+ super.postMoveShape(context);
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/UpdateContainerLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/UpdateContainerLabelFeature.java
new file mode 100644
index 00000000..641131a9
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/UpdateContainerLabelFeature.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.containers;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+/**
+ *
+ */
+public class UpdateContainerLabelFeature extends UpdateLabelFeature {
+
+ /**
+ * @param fp the Feature Provider
+ */
+ public UpdateContainerLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected LabelPosition getLabelPosition(AbstractText text) {
+ if (text.getAngle() == -90)
+ return LabelPosition.LEFT;
+ return LabelPosition.TOP;
+ }
+
+ @Override
+ protected int getLabelWidth(AbstractText text) {
+ if (text.getAngle() == -90)
+ return getLabelSize(text).height;
+ return getLabelSize(text).width;
+ }
+
+ @Override
+ protected int getLabelHeight(AbstractText text) {
+ if (text.getAngle() == -90)
+ return getLabelSize(text).width;
+ return getLabelSize(text).height;
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ Hashtable<Shape, Point> offsetMap = (Hashtable<Shape, Point>) context.getProperty(GraphitiConstants.LABEL_OFFSET_MAP);
+ Point offset = (Point) context.getProperty(GraphitiConstants.LABEL_OFFSET);
+ boolean isAdding = isAddingLabel(context);
+ PictogramElement ownerPE = FeatureSupport.getLabelOwner(context);
+ boolean isHorizontal = FeatureSupport.isHorizontal((ContainerShape)ownerPE);
+ Shape labelShape = FeatureSupport.getLabelShape(ownerPE);
+ AbstractText textGA = (AbstractText) labelShape.getGraphicsAlgorithm();
+ textGA.setAngle(isHorizontal ? -90 : 0);
+
+ ContainerShape rootContainer = FeatureSupport.getRootContainer((ContainerShape)ownerPE);
+ super.adjustLabelLocation(rootContainer, isAdding, offset);
+
+ // now update all of the Labels for all contained shapes, including Lanes
+ // we need to make a copy of the root container children because
+ // {@link UpdateLabelFeature#adjustLabelLocation()} will change the order
+ // of the children when it pushes the label to the top of the Z-order.
+ List<PictogramElement> peList = new ArrayList<PictogramElement>();
+ TreeIterator<EObject> iter = rootContainer.eAllContents();
+ while (iter.hasNext()) {
+ EObject o = iter.next();
+ if (o instanceof PictogramElement) {
+ PictogramElement pe = (PictogramElement) o;
+ if (FeatureSupport.hasBPMNShape(pe) || FeatureSupport.hasBPMNEdge(pe))
+ peList.add(pe);
+ }
+ }
+ for (PictogramElement pe : peList) {
+ if (FeatureSupport.hasBPMNShape(pe)) {
+ if (FeatureSupport.isLane(pe)) {
+ labelShape = FeatureSupport.getLabelShape(pe);
+ textGA = (AbstractText) labelShape.getGraphicsAlgorithm();
+ textGA.setAngle(isHorizontal ? -90 : 0);
+ super.adjustLabelLocation(pe, isAdding, offset);
+ }
+ else {
+ Point p = offsetMap==null ? null : offsetMap.get(pe);
+ FeatureSupport.updateLabel(getFeatureProvider(), pe, p);
+ }
+ }
+ else if (FeatureSupport.hasBPMNEdge(pe)) {
+ Point p = offsetMap==null ? null : offsetMap.get(pe);
+ FeatureSupport.updateLabel(getFeatureProvider(), pe, p);
+ }
+ }
+ return true;
+ }
+
+ protected ContainerShape getTargetContainer(PictogramElement ownerPE) {
+ // TODO: fix this so the label is a child of the Lane or Pool.
+ // There's a problem with Resize Feature if the label is a direct child of Lane/Pool.
+ return (ContainerShape) ownerPE.eContainer();
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/AddLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/AddLaneFeature.java
index c1d137ed..fd45c797 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/AddLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/AddLaneFeature.java
@@ -10,11 +10,12 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
@@ -23,40 +24,54 @@ import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.DefaultPasteBPMNElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.dd.dc.Bounds;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.ITargetContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.algorithms.Rectangle;
-import org.eclipse.graphiti.mm.algorithms.Text;
import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeCreateService;
-import org.eclipse.graphiti.services.IPeService;
-public class AddLaneFeature extends AbstractBpmn2AddElementFeature<Lane> {
+public class AddLaneFeature extends AbstractBpmn2AddFeature<Lane> {
- public static final int DEFAULT_LANE_WIDTH = 600;
- public static final int DEFAULT_LANE_HEIGHT = 100;
-
public AddLaneFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp) {
+
+ @Override
+ protected AbstractText createText(Shape labelShape, String labelText) {
+ // need to override the default MultiText created by super
+ // because the Graphiti layout algorithm doesn't work as
+ // expected when text angle is -90
+ return gaService.createText(labelShape, labelText);
+ }
+
+ @Override
+ public void applyStyle(AbstractText text, BaseElement be) {
+ super.applyStyle(text, be);
+ text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
+ text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
+ }
+ };
+ }
+
@Override
public boolean canAdd(IAddContext context) {
// NOTE: This is slightly different from FeatureSupport.isValidFlowElementTarget()
@@ -74,20 +89,16 @@ public class AddLaneFeature extends AbstractBpmn2AddElementFeature<Lane> {
public PictogramElement add(IAddContext context) {
Lane businessObject = getBusinessObject(context);
- IPeCreateService peCreateService = Graphiti.getPeCreateService();
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
-
- ContainerShape containerShape = peCreateService.createContainerShape(context.getTargetContainer(), true);
+ ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
Rectangle rect = gaService.createRectangle(containerShape);
StyleUtil.applyStyle(rect, businessObject);
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
int width = this.getWidth(context);
int height = this.getHeight(context);
- gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height); ///
+ gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);
BPMNShape bpmnShape = createDIShape(containerShape, businessObject, !isImport);
if (FeatureSupport.isTargetLane(context)) {
@@ -131,41 +142,24 @@ public class AddLaneFeature extends AbstractBpmn2AddElementFeature<Lane> {
}
containerShape.setContainer(context.getTargetContainer());
}
-
- Shape textShape = peCreateService.createShape(containerShape, false);
- Text text = gaService.createText(textShape, businessObject.getName());
- StyleUtil.applyStyle(text, businessObject);
- text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
- text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- if (horz) {
- text.setAngle(-90);
- gaService.setLocationAndSize(text, 0, 0, 15, height);
- }
- else {
- gaService.setLocationAndSize(text, 0, 0, width, 15);
- }
- link(textShape, businessObject);
-
- if (context.getProperty(DIImport.IMPORT_PROPERTY) == null
- && (FeatureSupport.isTargetLane(context) || FeatureSupport.isTargetParticipant(context))) {
- FeatureSupport.redraw(context.getTargetContainer());
- }
-
-// if (context.getTargetContainer().getContainer() != null) { // only children may be sent back
-// peService.sendToBack(context.getTargetContainer());
-// }
// hook for subclasses to inject extra code
((AddContext)context).setWidth(width);
((AddContext)context).setHeight(height);
decorateShape(context, containerShape, businessObject);
- peCreateService.createChopboxAnchor(containerShape);
+ peService.createChopboxAnchor(containerShape);
AnchorUtil.addFixedPointAnchors(containerShape, rect);
return containerShape;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#decorateShape(org.eclipse.graphiti.features.context.IAddContext, org.eclipse.graphiti.mm.pictograms.ContainerShape, org.eclipse.bpmn2.BaseElement)
+ */
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, Lane businessObject) {
+ }
+
private void moveFlowNodes(Process targetProcess, Lane lane) {
for (FlowElement element : targetProcess.getFlowElements()) {
if (element instanceof FlowNode) {
@@ -228,17 +222,23 @@ public class AddLaneFeature extends AbstractBpmn2AddElementFeature<Lane> {
@Override
protected int getHeight(IAddContext context) {
- if (context.getProperty(DIImport.IMPORT_PROPERTY) == null){
- if (context.getTargetContainer() instanceof Diagram) {
+ if (context.getProperty(GraphitiConstants.IMPORT_PROPERTY) == null){
+ ContainerShape targetContainer = context.getTargetContainer();
+ if (targetContainer instanceof Diagram) {
return super.getHeight(context);
}
- Object copiedBpmnShape = context.getProperty(DefaultPasteBPMNElementFeature.COPIED_BPMN_SHAPE);
+ if (FeatureSupport.isLane(targetContainer)) {
+ if (FeatureSupport.getPoolOrLaneChildren(targetContainer).size()==0)
+ return super.getHeight(context);
+ }
+ Object copiedBpmnShape = context.getProperty(GraphitiConstants.COPIED_BPMN_SHAPE);
if (copiedBpmnShape instanceof BPMNShape) {
Bounds b = ((BPMNShape)copiedBpmnShape).getBounds();
if (b!=null)
return (int) b.getHeight();
}
- int height = context.getTargetContainer().getGraphicsAlgorithm().getHeight();
+
+ int height = targetContainer.getGraphicsAlgorithm().getHeight();
Bounds bounds = getPreviousBounds(context);
if (bounds != null) {
@@ -251,17 +251,22 @@ public class AddLaneFeature extends AbstractBpmn2AddElementFeature<Lane> {
@Override
public int getWidth(IAddContext context) {
- if (context.getProperty(DIImport.IMPORT_PROPERTY) == null){
- if (context.getTargetContainer() instanceof Diagram) {
+ if (context.getProperty(GraphitiConstants.IMPORT_PROPERTY) == null){
+ ContainerShape targetContainer = context.getTargetContainer();
+ if (targetContainer instanceof Diagram) {
return super.getWidth(context);
}
- Object copiedBpmnShape = context.getProperty(DefaultPasteBPMNElementFeature.COPIED_BPMN_SHAPE);
+ if (FeatureSupport.isLane(targetContainer)) {
+ if (FeatureSupport.getPoolOrLaneChildren(targetContainer).size()==0)
+ return super.getWidth(context);
+ }
+ Object copiedBpmnShape = context.getProperty(GraphitiConstants.COPIED_BPMN_SHAPE);
if (copiedBpmnShape instanceof BPMNShape) {
Bounds b = ((BPMNShape)copiedBpmnShape).getBounds();
if (b!=null)
return (int) b.getWidth();
}
- int width = context.getTargetContainer().getGraphicsAlgorithm().getWidth();
+ int width = targetContainer.getGraphicsAlgorithm().getWidth();
Bounds bounds = getPreviousBounds(context);
if (bounds != null) {
@@ -272,13 +277,11 @@ public class AddLaneFeature extends AbstractBpmn2AddElementFeature<Lane> {
return super.getWidth(context);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public int getHeight() {
- return DEFAULT_LANE_HEIGHT;
- }
-
- @Override
- public int getWidth() {
- return DEFAULT_LANE_WIDTH;
+ public Class getBusinessObjectType() {
+ return Lane.class;
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/DirectEditLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/DirectEditLaneFeature.java
index 17b05dca..33128817 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/DirectEditLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/DirectEditLaneFeature.java
@@ -10,7 +10,7 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import org.eclipse.bpmn2.Lane;
import org.eclipse.graphiti.features.IFeatureProvider;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/Messages.java
new file mode 100644
index 00000000..75eb9155
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/Messages.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.containers.lane.messages"; //$NON-NLS-1$
+ public static String DirectEditLaneFeature_Invalid_Empty;
+ public static String DirectEditLaneFeature_Invalid_Linebreak;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromDiagramToLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromDiagramToLaneFeature.java
index f7bc2b2b..83b7f0b5 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromDiagramToLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromDiagramToLaneFeature.java
@@ -10,7 +10,7 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import java.util.ArrayList;
import java.util.List;
@@ -19,8 +19,6 @@ import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.LaneSet;
import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EObject;
@@ -57,27 +55,29 @@ public class MoveFromDiagramToLaneFeature extends MoveLaneFeature {
@Override
protected void internalMove(IMoveShapeContext context) {
IGaService gaService = Graphiti.getGaService();
-
Lane movedLane = getMovedLane(context);
+ Process sourceProcess = getProcess(context.getSourceContainer());
+ Process targetProcess = getProcess(context.getTargetContainer());
+ moveLane(movedLane, sourceProcess, targetProcess);
+
GraphicsAlgorithm laneGa = context.getShape().getGraphicsAlgorithm();
Lane targetLane = getTargetLane(context);
- GraphicsAlgorithm tga = context.getTargetContainer().getGraphicsAlgorithm();
List<Shape> shapes = getFlowNodeShapes(context, targetLane);
modifyModelStructure(targetLane, movedLane);
if (getNumberOfLanes(context) == 1) {
- gaService.setLocationAndSize(laneGa, 15, 0, tga.getWidth() - 15, tga.getHeight());
+ gaService.setLocationAndSize(laneGa, 15, 0, laneGa.getWidth() - 15, laneGa.getHeight());
for (Shape s : shapes) {
GraphicsUtil.sendToFront(s);
s.setContainer((ContainerShape) context.getShape());
}
} else {
- gaService.setLocationAndSize(laneGa, 15, tga.getHeight() - 1, tga.getWidth() - 15, laneGa.getHeight() + 1);
+ gaService.setLocationAndSize(laneGa, 15, laneGa.getHeight() - 1, laneGa.getWidth() - 15, laneGa.getHeight() + 1);
}
- FeatureSupport.redraw(context.getTargetContainer());
+ layoutPictogramElement(context.getTargetContainer());
}
private void modifyModelStructure(Lane targetLane, Lane lane) {
@@ -93,10 +93,9 @@ public class MoveFromDiagramToLaneFeature extends MoveLaneFeature {
}
if (targetLane.getChildLaneSet() == null) {
- LaneSet createLaneSet = Bpmn2ModelerFactory.create(LaneSet.class);
-// createLaneSet.setId(EcoreUtil.generateUUID());
- targetLane.setChildLaneSet(createLaneSet);
- ModelUtil.setID(createLaneSet);
+ LaneSet newLaneSet = createLaneSet();
+ targetLane.setChildLaneSet(newLaneSet);
+ ModelUtil.setID(newLaneSet);
}
List<Lane> lanes = targetLane.getChildLaneSet().getLanes();
@@ -128,9 +127,4 @@ public class MoveFromDiagramToLaneFeature extends MoveLaneFeature {
Lane lane = (Lane) getBusinessObjectForPictogramElement(targetContainer);
return lane.getChildLaneSet().getLanes().size();
}
-
- private Lane getTargetLane(IMoveShapeContext context) {
- ContainerShape targetContainer = context.getTargetContainer();
- return (Lane) getBusinessObjectForPictogramElement(targetContainer);
- }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromDiagramToParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromDiagramToParticipantFeature.java
index 892a6055..3ed673ee 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromDiagramToParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromDiagramToParticipantFeature.java
@@ -10,19 +10,12 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import java.io.IOException;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.LaneSet;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
@@ -54,41 +47,31 @@ public class MoveFromDiagramToParticipantFeature extends MoveLaneFeature {
@Override
protected void internalMove(IMoveShapeContext context) {
modifyModelStructure(context);
- FeatureSupport.redraw(context.getTargetContainer());
+ layoutPictogramElement(context.getTargetContainer());
}
private void modifyModelStructure(IMoveShapeContext context) {
- try {
- Participant targetParticipant = (Participant) getBusinessObjectForPictogramElement(context
- .getTargetContainer());
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- Lane movedLane = getMovedLane(context);
- handler.moveLane(movedLane, targetParticipant);
- Participant internalParticipant = handler.getParticipant(getDiagram());
- LaneSet laneSet = null;
- for (LaneSet set : internalParticipant.getProcessRef().getLaneSets()) {
- if (set.getLanes().contains(movedLane)) {
- laneSet = set;
- break;
- }
- }
- if (laneSet != null) {
+ Lane movedLane = getMovedLane(context);
+ Process sourceProcess = getProcess(context.getSourceContainer());
+ Process targetProcess = getProcess(context.getTargetContainer());
+ moveLane(movedLane, sourceProcess, targetProcess);
+
+ for (LaneSet laneSet : sourceProcess.getLaneSets()) {
+ if (laneSet.getLanes().contains(movedLane)) {
laneSet.getLanes().remove(movedLane);
if (laneSet.getLanes().isEmpty()) {
- internalParticipant.getProcessRef().getLaneSets().remove(laneSet);
+ // remove the LaneSet if it's empty
+ sourceProcess.getLaneSets().remove(laneSet);
}
-
- Process process = targetParticipant.getProcessRef();
- if (process.getLaneSets().isEmpty()) {
- LaneSet claneSet = Bpmn2ModelerFactory.create(LaneSet.class);
-// claneSet.setId(EcoreUtil.generateUUID());
- process.getLaneSets().add(claneSet);
- ModelUtil.setID(claneSet);
- }
- process.getLaneSets().get(0).getLanes().add(movedLane);
+ break;
}
- } catch (IOException e) {
- Activator.logError(e);
}
+
+ if (targetProcess.getLaneSets().isEmpty()) {
+ // create a new LaneSet if needed
+ LaneSet newLaneSet = createLaneSet();
+ targetProcess.getLaneSets().add(newLaneSet);
+ }
+ targetProcess.getLaneSets().get(0).getLanes().add(movedLane);
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToDiagramFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToDiagramFeature.java
index e332cb14..632d8055 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToDiagramFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToDiagramFeature.java
@@ -10,14 +10,11 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import java.io.IOException;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.LaneSet;
+import org.eclipse.bpmn2.Process;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
@@ -35,18 +32,18 @@ public class MoveFromLaneToDiagramFeature extends MoveLaneFeature {
@Override
protected void internalMove(IMoveShapeContext context) {
modifyModelStructure(context);
- FeatureSupport.redraw(context.getSourceContainer());
+ layoutPictogramElement(context.getSourceContainer());
}
private void modifyModelStructure(IMoveShapeContext context) {
- Lane parentLane = (Lane) getBusinessObjectForPictogramElement(context.getSourceContainer());
- Lane movedLane = (Lane) getBusinessObjectForPictogramElement(context.getShape());
- parentLane.getChildLaneSet().getLanes().remove(movedLane);
- try {
- ModelHandler mh = ModelHandler.getInstance(getDiagram());
- mh.laneToTop(movedLane);
- } catch (IOException e) {
- Activator.logError(e);
- }
+ Lane sourceLane = (Lane) getBusinessObjectForPictogramElement(context.getSourceContainer());
+ Lane movedLane = getMovedLane(context);
+ sourceLane.getChildLaneSet().getLanes().remove(movedLane);
+
+ LaneSet newLaneSet = createLaneSet();
+ newLaneSet.getLanes().add(movedLane);
+ Process targetProcess = getProcess(context.getTargetContainer());
+ targetProcess.getLaneSets().add(newLaneSet);
}
+
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToLaneFeature.java
index fef7f6a9..6e246f62 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToLaneFeature.java
@@ -10,22 +10,13 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import java.io.IOException;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.LaneSet;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.Process;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
-import org.eclipse.graphiti.features.context.ITargetContext;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
public class MoveFromLaneToLaneFeature extends MoveLaneFeature {
@@ -58,28 +49,19 @@ public class MoveFromLaneToLaneFeature extends MoveLaneFeature {
modifyModelStructure(sourceLane, targetLane, movedLane);
- FeatureSupport.redraw(context.getSourceContainer());
- FeatureSupport.redraw(context.getTargetContainer());
+ layoutPictogramElement(context.getSourceContainer());
+ layoutPictogramElement(context.getTargetContainer());
}
private void modifyModelStructure(Lane sourceLane, Lane targetLane, Lane movedLane) {
if (targetLane.getChildLaneSet() == null) {
- LaneSet createLaneSet = Bpmn2ModelerFactory.create(LaneSet.class);
-// createLaneSet.setId(EcoreUtil.generateUUID());
- targetLane.setChildLaneSet(createLaneSet);
- ModelUtil.setID(createLaneSet);
+ LaneSet newLaneSet = createLaneSet();
+ targetLane.setChildLaneSet(newLaneSet);
}
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- Participant sourceParticipant = handler.getParticipant(sourceLane);
- Participant targetParticipant = handler.getParticipant(targetLane);
- if (!sourceParticipant.equals(targetParticipant)) {
- handler.moveLane(movedLane, sourceParticipant, targetParticipant);
- }
- } catch (IOException e) {
- Activator.logError(e);
- }
+ Process sourceProcess = getProcess(sourceLane);
+ Process targetProcess = getProcess(targetLane);
+ moveLane(movedLane, sourceProcess, targetProcess);
targetLane.getChildLaneSet().getLanes().add(movedLane);
sourceLane.getChildLaneSet().getLanes().remove(movedLane);
@@ -88,14 +70,4 @@ public class MoveFromLaneToLaneFeature extends MoveLaneFeature {
sourceLane.setChildLaneSet(null);
}
}
-
- private Lane getTargetLane(ITargetContext context) {
- ContainerShape targetContainer = context.getTargetContainer();
- return (Lane) getBusinessObjectForPictogramElement(targetContainer);
- }
-
- private Lane getSourceLane(IMoveShapeContext context) {
- ContainerShape sourceContainer = context.getSourceContainer();
- return (Lane) getBusinessObjectForPictogramElement(sourceContainer);
- }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToParticipantFeature.java
index 79c9920b..ae12194a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromLaneToParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromLaneToParticipantFeature.java
@@ -10,19 +10,12 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import java.io.IOException;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.LaneSet;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
@@ -54,29 +47,21 @@ public class MoveFromLaneToParticipantFeature extends MoveLaneFeature {
@Override
protected void internalMove(IMoveShapeContext context) {
modifyModelStructure(context);
- FeatureSupport.redraw(context.getTargetContainer());
- FeatureSupport.redraw(context.getSourceContainer());
+ layoutPictogramElement(context.getTargetContainer());
+ layoutPictogramElement(context.getSourceContainer());
}
private void modifyModelStructure(IMoveShapeContext context) {
Lane movedLane = getMovedLane(context);
- Participant targetParticipant = (Participant) getBusinessObjectForPictogramElement(context.getTargetContainer());
-
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- handler.moveLane(movedLane, targetParticipant);
- } catch (IOException e) {
- Activator.logError(e);
- }
+ Process sourceProcess = getProcess(context.getSourceContainer());
+ Process targetProcess = getProcess(context.getTargetContainer());
+ moveLane(movedLane, sourceProcess, targetProcess);
- Process process = targetParticipant.getProcessRef();
- if (process.getLaneSets().isEmpty()) {
- LaneSet createLaneSet = Bpmn2ModelerFactory.create(LaneSet.class);
-// createLaneSet.setId(EcoreUtil.generateUUID());
- process.getLaneSets().add(createLaneSet);
- ModelUtil.setID(createLaneSet);
+ if (targetProcess.getLaneSets().isEmpty()) {
+ LaneSet newLaneSet = createLaneSet();
+ targetProcess.getLaneSets().add(newLaneSet);
}
- process.getLaneSets().get(0).getLanes().add(movedLane);
+ targetProcess.getLaneSets().get(0).getLanes().add(movedLane);
Lane fromLane = (Lane) getBusinessObjectForPictogramElement(context.getSourceContainer());
fromLane.getChildLaneSet().getLanes().remove(movedLane);
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToDiagramFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToDiagramFeature.java
new file mode 100644
index 00000000..53353b69
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToDiagramFeature.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
+
+import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.LaneSet;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+
+public class MoveFromParticipantToDiagramFeature extends MoveLaneFeature {
+
+ public MoveFromParticipantToDiagramFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canMoveShape(IMoveShapeContext context) {
+ return true;
+ }
+
+ @Override
+ protected void internalMove(IMoveShapeContext context) {
+ modifyModelStructure(context);
+ layoutPictogramElement(context.getSourceContainer());
+ }
+
+ private void modifyModelStructure(IMoveShapeContext context) {
+ Lane movedLane = getMovedLane(context);
+ Process sourceProcess = getProcess(context.getSourceContainer());
+ Process targetProcess = getProcess(context.getTargetContainer());
+ moveLane(movedLane, sourceProcess, targetProcess);
+
+ for (LaneSet laneSet : sourceProcess.getLaneSets()) {
+ if (laneSet.getLanes().contains(movedLane)) {
+ laneSet.getLanes().remove(movedLane);
+ if (laneSet.getLanes().isEmpty()) {
+ sourceProcess.getLaneSets().remove(laneSet);
+ }
+
+ if (targetProcess.getLaneSets().isEmpty()) {
+ LaneSet newLaneSet = createLaneSet();
+ targetProcess.getLaneSets().add(newLaneSet);
+ }
+ targetProcess.getLaneSets().get(0).getLanes().add(movedLane);
+ break;
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToLaneFeature.java
new file mode 100644
index 00000000..52632c6f
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToLaneFeature.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
+
+import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.LaneSet;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+
+public class MoveFromParticipantToLaneFeature extends MoveLaneFeature {
+
+ public MoveFromParticipantToLaneFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canMoveShape(IMoveShapeContext context) {
+ Lane movedLane = getMovedLane(context);
+ boolean moveableHasFlowNodes = movedLane.getFlowNodeRefs().size() > 0;
+
+ Lane targetLane = getTargetLane(context);
+ boolean targetHasFlowNodeRefs = targetLane.getFlowNodeRefs().size() > 0;
+
+ if (!moveableHasFlowNodes && !targetHasFlowNodeRefs) {
+ return true;
+ }
+
+ return moveableHasFlowNodes ^ targetHasFlowNodeRefs;
+ }
+
+ @Override
+ protected void internalMove(IMoveShapeContext context) {
+ modifyModelStructure(context);
+ layoutPictogramElement(context.getSourceContainer());
+ layoutPictogramElement(context.getTargetContainer());
+ }
+
+ private void modifyModelStructure(IMoveShapeContext context) {
+ Lane movedLane = getMovedLane(context);
+ Lane targetLane = getTargetLane(context);
+ Process sourceProcess = getProcess(context.getSourceContainer());
+ Process targetProcess = getProcess(targetLane);
+ moveLane(movedLane, sourceProcess, targetProcess);
+
+ for (LaneSet laneSet : sourceProcess.getLaneSets()) {
+ if (laneSet.getLanes().contains(movedLane)) {
+ laneSet.getLanes().remove(movedLane);
+ if (laneSet.getLanes().isEmpty()) {
+ sourceProcess.getLaneSets().remove(laneSet);
+ }
+ break;
+ }
+ }
+
+ if (targetLane.getChildLaneSet() == null) {
+ LaneSet newLaneSet = createLaneSet();
+ targetLane.setChildLaneSet(newLaneSet);
+ }
+ targetLane.getChildLaneSet().getLanes().add(movedLane);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToParticipantFeature.java
index 02837820..e3a0bc5b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/MoveFromParticipantToParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveFromParticipantToParticipantFeature.java
@@ -10,19 +10,12 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
-
-import java.io.IOException;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.LaneSet;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
@@ -59,45 +52,31 @@ public class MoveFromParticipantToParticipantFeature extends MoveLaneFeature {
@Override
protected void internalMove(IMoveShapeContext context) {
modifyModelStructure(context);
- FeatureSupport.redraw(context.getSourceContainer());
- FeatureSupport.redraw(context.getTargetContainer());
+ layoutPictogramElement(context.getSourceContainer());
+ layoutPictogramElement(context.getTargetContainer());
}
private void modifyModelStructure(IMoveShapeContext context) {
Lane movedLane = getMovedLane(context);
- Participant targetParticipant = (Participant) getBusinessObjectForPictogramElement(context.getTargetContainer());
-
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- handler.moveLane(movedLane, targetParticipant);
- } catch (IOException e) {
- Activator.logError(e);
- }
-
- Participant sourceParticipant = (Participant) getBusinessObjectForPictogramElement(context.getSourceContainer());
-
- LaneSet laneSet = null;
- for (LaneSet set : sourceParticipant.getProcessRef().getLaneSets()) {
- if (set.getLanes().contains(movedLane)) {
- laneSet = set;
+ Process sourceProcess = getProcess(context.getSourceContainer());
+ Process targetProcess = getProcess(context.getTargetContainer());
+ moveLane(movedLane, sourceProcess, targetProcess);
+
+ for (LaneSet laneSet : sourceProcess.getLaneSets()) {
+ if (laneSet.getLanes().contains(movedLane)) {
+ laneSet.getLanes().remove(movedLane);
+ if (laneSet.getLanes().isEmpty()) {
+ sourceProcess.getLaneSets().remove(laneSet);
+ }
+
+ if (targetProcess.getLaneSets().isEmpty()) {
+ LaneSet newLaneSet = createLaneSet();
+ targetProcess.getLaneSets().add(newLaneSet);
+ }
+ targetProcess.getLaneSets().get(0).getLanes().add(movedLane);
break;
}
}
- if (laneSet != null) {
- laneSet.getLanes().remove(movedLane);
- if (laneSet.getLanes().isEmpty()) {
- sourceParticipant.getProcessRef().getLaneSets().remove(laneSet);
- }
-
- Process process = targetParticipant.getProcessRef();
- if (process.getLaneSets().isEmpty()) {
- LaneSet createLaneSet = Bpmn2ModelerFactory.create(LaneSet.class);
-// createLaneSet.setId(EcoreUtil.generateUUID());
- process.getLaneSets().add(createLaneSet);
- ModelUtil.setID(createLaneSet);
- }
- process.getLaneSets().get(0).getLanes().add(movedLane);
- }
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveLaneFeature.java
new file mode 100644
index 00000000..554a530d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/MoveLaneFeature.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
+
+import org.eclipse.bpmn2.Collaboration;
+import org.eclipse.bpmn2.FlowNode;
+import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.LaneSet;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.features.containers.MoveContainerFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.features.context.ITargetContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+/**
+ * Handles the moving of Lanes from one container to another. The source and
+ * target containers may be Pools, other Lanes or the Diagram.
+ *
+ * TODO: allow reordering of Lanes within their containers. For example, current
+ * behavior when a Lane is dragged from a Diagram and dropped into another Lane
+ * which already contains child Lanes, the dropped Lane is always added to the
+ * bottom or left of existing child Lanes. It would be useful to allow the user
+ * to select the location of the dropped Lane relative to existing child Lanes,
+ * by looking at the mouse cursor position.
+ */
+public class MoveLaneFeature extends MoveContainerFeature {
+
+ private MoveLaneFeature moveStrategy;
+ protected ModelHandler modelHandler;
+
+ public MoveLaneFeature(IFeatureProvider fp) {
+ super(fp);
+ modelHandler = ModelHandler.getInstance(getDiagram());
+ }
+
+ @Override
+ public boolean canMoveShape(IMoveShapeContext context) {
+ if (context.getSourceContainer() == null) {
+ return false;
+ }
+
+ moveStrategy = getStrategy(context);
+
+ if (moveStrategy == null) {
+ return super.canMoveShape(context);
+ }
+
+ return moveStrategy.canMoveShape(context);
+ }
+
+ @Override
+ protected void internalMove(IMoveShapeContext context) {
+ super.internalMove(context);
+ if (moveStrategy != null) {
+ moveStrategy.internalMove(context);
+ }
+ }
+
+ private MoveLaneFeature getStrategy(IMoveShapeContext context) {
+
+ if (context.getSourceContainer().equals(getDiagram())) { // from diagram
+
+ if (FeatureSupport.isTargetLane(context)) { // to lane
+ return new MoveFromDiagramToLaneFeature(getFeatureProvider());
+ } else if (FeatureSupport.isTargetParticipant(context)) { // to participant
+ return new MoveFromDiagramToParticipantFeature(getFeatureProvider());
+ }
+
+ } else if (FeatureSupport.isLane(context.getSourceContainer())) { // from lane
+
+ if (context.getTargetContainer().equals(getDiagram())) { // to diagram
+ return new MoveFromLaneToDiagramFeature(getFeatureProvider());
+ } else if (FeatureSupport.isTargetLane(context)) { // to another lane
+ return new MoveFromLaneToLaneFeature(getFeatureProvider());
+ } else if (FeatureSupport.isTargetParticipant(context)) { // to participant
+ return new MoveFromLaneToParticipantFeature(getFeatureProvider());
+ }
+
+ } else if (FeatureSupport.isParticipant(context.getSourceContainer())) { // from participant
+
+ if (context.getTargetContainer().equals(getDiagram())) { // to diagram
+ return new MoveFromParticipantToDiagramFeature(getFeatureProvider());
+ } else if (FeatureSupport.isTargetLane(context)) { // to another lane
+ return new MoveFromParticipantToLaneFeature(getFeatureProvider());
+ } else if (FeatureSupport.isTargetParticipant(context)) { // to another participant
+ return new MoveFromParticipantToParticipantFeature(getFeatureProvider());
+ }
+ }
+
+ return null;
+ }
+
+ protected Lane getMovedLane(IMoveShapeContext context) {
+ return (Lane) getBusinessObjectForPictogramElement(context.getShape());
+ }
+
+ protected Process getProcess(Object object) {
+ Process process = null;
+ if (object instanceof PictogramElement) {
+ // this could be a Diagram or ContainerShape
+ object = BusinessObjectUtil.getBusinessObjectForPictogramElement((PictogramElement)object);
+ }
+ if (object instanceof BPMNDiagram) {
+ // the BPMNDiagram could be a Process or Collaboration/Choreography
+ object = ((BPMNDiagram)object).getPlane().getBpmnElement();
+ }
+ if (object instanceof Collaboration) {
+ // the Collaboration contain one or more Participants
+ Participant participant = null;
+ Collaboration collaboration = (Collaboration) object;
+ for (Participant p : collaboration.getParticipants()) {
+ if (p.getProcessRef()!=null) {
+ process = p.getProcessRef();
+ break;
+ }
+ else if (participant==null)
+ participant = p;
+ }
+ if (process==null) {
+ // create a new Process in the Collaboration's first Participant
+ object = participant;
+ }
+ }
+ if (object instanceof Participant) {
+ Participant participant = (Participant) object;
+ process = participant.getProcessRef();
+ if (process == null) {
+ // create a new Process
+ process = modelHandler.create(Process.class);
+ modelHandler.getDefinitions().getRootElements().add(process);
+ process.setName(participant.getName() + " Process");
+ if (participant.eContainer() instanceof Collaboration) {
+ process.setDefinitionalCollaborationRef((Collaboration)participant.eContainer());
+ }
+ participant.setProcessRef(process);
+ }
+ }
+ if (object instanceof Process) {
+ process =(Process) object;
+ }
+ if (process==null && object instanceof EObject) {
+ EObject o = (EObject) object;
+ while (o.eContainer()!=null) {
+ if (o instanceof Process) {
+ process = (Process) o;
+ break;
+ }
+ o = o.eContainer();
+ }
+ }
+ return process;
+ }
+
+ protected Lane getTargetLane(ITargetContext context) {
+ ContainerShape targetContainer = context.getTargetContainer();
+ return (Lane) getBusinessObjectForPictogramElement(targetContainer);
+ }
+
+ protected Lane getSourceLane(IMoveShapeContext context) {
+ ContainerShape sourceContainer = context.getSourceContainer();
+ return (Lane) getBusinessObjectForPictogramElement(sourceContainer);
+ }
+
+ protected LaneSet createLaneSet() {
+ return modelHandler.create(LaneSet.class);
+ }
+
+ protected void moveLane(Lane movedLane, Process sourceProcess, Process targetProcess) {
+ if (sourceProcess!=targetProcess) {
+ for (FlowNode node : movedLane.getFlowNodeRefs()) {
+ modelHandler.moveFlowNode(node, sourceProcess, targetProcess);
+ }
+ if (movedLane.getChildLaneSet() != null && !movedLane.getChildLaneSet().getLanes().isEmpty()) {
+ for (Lane lane : movedLane.getChildLaneSet().getLanes()) {
+ moveLane(lane, sourceProcess, targetProcess);
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/ResizeLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/ResizeLaneFeature.java
index 09c210e0..6b472215 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/ResizeLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/ResizeLaneFeature.java
@@ -10,15 +10,17 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
+
+import java.util.List;
import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.features.participant.ResizeParticipantFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.containers.AbstractResizeContainerFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.emf.ecore.EObject;
+import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
@@ -28,88 +30,83 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
-public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
-
- public static final String LANE_RESIZE_PROPERTY = "lane.resize"; //$NON-NLS-1$
-
+public class ResizeLaneFeature extends AbstractResizeContainerFeature {
+
public ResizeLaneFeature(IFeatureProvider fp) {
super(fp);
}
@Override
public boolean canResizeShape(IResizeShapeContext context) {
+ boolean doit = false;
boolean isLane = FeatureSupport.isLane(context.getPictogramElement());
- if (!isLane) {
- return false;
- }
-
- boolean isParentLane = FeatureSupport.isLane(((ContainerShape) context
- .getPictogramElement()).getContainer());
- if (!isParentLane) {
- return true;
- }
-
- if (context.getHeight() == -1 && context.getWidth() == -1) {
- return true;
- }
-
- GraphicsAlgorithm ga = ((ContainerShape) context.getPictogramElement())
- .getGraphicsAlgorithm();
-
- int i = compare(ga.getHeight(), ga.getWidth(), context.getHeight(),
- context.getWidth());
-
- Lane lane = (Lane) BusinessObjectUtil.getFirstElementOfType(
- context.getPictogramElement(), Lane.class);
-
- if (i < 0 && lane.getFlowNodeRefs().size() == 0) {
- return true;
- }
-
- if (i > 0) {
- return true;
+ if (isLane) {
+ boolean isParentLane = FeatureSupport.isLane(((ContainerShape) context
+ .getPictogramElement()).getContainer());
+ if (!isParentLane) {
+ doit = true;
+ }
+ else {
+ if (context.getHeight() == -1 && context.getWidth() == -1) {
+ doit = true;
+ }
+ else {
+ GraphicsAlgorithm ga = ((ContainerShape) context.getPictogramElement())
+ .getGraphicsAlgorithm();
+
+ int i = compare(ga.getHeight(), ga.getWidth(), context.getHeight(),
+ context.getWidth());
+
+ Lane lane = (Lane) BusinessObjectUtil.getFirstElementOfType(
+ context.getPictogramElement(), Lane.class);
+
+ if (i < 0) {// && lane.getFlowNodeRefs().size() == 0) {
+ doit = true;
+ }
+ else if (i > 0) {
+ doit = true;
+ }
+ }
+ }
+
+ if (doit && !super.canResizeShape(context))
+ doit = false;
}
-
- return true;
+ return doit;
}
+
+ @Override
+ public void resizeShape(IResizeShapeContext context) {
+ preResizeShape(context);
- private int compare(int heightBefore, int widthBefore, int heightAfter,
- int widthAfter) {
- if (heightAfter > heightBefore || widthAfter > widthBefore) {
- return 1;
- }
- if (heightAfter < heightBefore || widthAfter < widthBefore) {
- return -1;
- }
- return 0;
+ resizeHeight(context);
+ resizeWidth(context);
+
+ postResizeShape(context);
}
- private void resizeHeight(IResizeShapeContext context) {
- ContainerShape laneContainerShape = (ContainerShape) context.getShape();
- GraphicsAlgorithm ga = laneContainerShape.getGraphicsAlgorithm();
-
- boolean isHorizontal = FeatureSupport.isHorizontal(laneContainerShape);
+ protected void resizeHeight(IResizeShapeContext context) {
+ ContainerShape laneShape = (ContainerShape) context.getShape();
+ GraphicsAlgorithm ga = laneShape.getGraphicsAlgorithm();
if ((isHorizontal && ga.getHeight() != context.getHeight())
|| (!isHorizontal && ga.getWidth() != context.getWidth())) {
- ContainerShape rootContainer = FeatureSupport.getRootContainer(laneContainerShape);
-
- boolean fetchFirstProp = false;
- Object fetchFirstProperty = context.getProperty(ResizeParticipantFeature.RESIZE_FIRST_LANE);
+ boolean useFirstLane = false;
+ Object fetchFirstProperty = context.getProperty(GraphitiConstants.RESIZE_FIRST_LANE);
if (fetchFirstProperty != null && ((Boolean) fetchFirstProperty).booleanValue()) {
- fetchFirstProp = true;
+ useFirstLane = true;
} else {
if ((isHorizontal && context.getY() != ga.getY()) ||
(!isHorizontal && context.getX() != ga.getX())) {
- fetchFirstProp = true;
- if (laneContainerShape.equals(rootContainer)) {
+ useFirstLane = true;
+ if (laneShape.equals(rootContainer)) {
Graphiti.getGaService().setLocation(ga, context.getX(), context.getY());
}
}
}
- ContainerShape lowestContainingLane = getLowestLane(laneContainerShape, fetchFirstProp);
+ ContainerShape lowestContainingLane = getLowestLane(laneShape, useFirstLane);
GraphicsAlgorithm lowestLaneGA = lowestContainingLane.getGraphicsAlgorithm();
int width = 0;
@@ -137,16 +134,15 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
newContext.setY(lowestLaneGA.getY());
newContext.setHeight(height);
newContext.setWidth(width);
-
+ newContext.setDirection(context.getDirection());
+
super.resizeShape(newContext);
}
}
- private void resizeWidth(IResizeShapeContext context) {
- ContainerShape laneContainerShape = (ContainerShape) context.getShape();
- GraphicsAlgorithm ga = laneContainerShape.getGraphicsAlgorithm();
-
- boolean isHorizontal = FeatureSupport.isHorizontal(laneContainerShape);
+ protected void resizeWidth(IResizeShapeContext context) {
+ ContainerShape laneShape = (ContainerShape) context.getShape();
+ GraphicsAlgorithm ga = laneShape.getGraphicsAlgorithm();
if ((isHorizontal && ga.getWidth() != context.getWidth())
|| (!isHorizontal && ga.getHeight() != context.getHeight())) {
@@ -160,14 +156,14 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
dHeight = context.getHeight() - ga.getHeight();
}
- Object poolResizeProperty = context.getProperty(ResizeParticipantFeature.POOL_RESIZE_PROPERTY);
+ Object poolResizeProperty = context.getProperty(GraphitiConstants.POOL_RESIZE_PROPERTY);
if (poolResizeProperty != null && ((Boolean) poolResizeProperty).booleanValue()) {
if (isHorizontal) {
Graphiti.getGaService().setWidth(ga, context.getWidth());
} else {
Graphiti.getGaService().setHeight(ga, context.getHeight());
}
- for (PictogramElement currentChild : FeatureSupport.getChildsOfBusinessObjectType(laneContainerShape, Lane.class)) {
+ for (PictogramElement currentChild : BusinessObjectUtil.getChildElementsOfType(laneShape, Lane.class)) {
if (currentChild instanceof ContainerShape) {
ContainerShape currentContainer = (ContainerShape) currentChild;
GraphicsAlgorithm currentGA = currentChild.getGraphicsAlgorithm();
@@ -178,15 +174,14 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
newContext.setY(currentGA.getY());
newContext.setHeight(currentGA.getHeight() + dHeight);
newContext.setWidth(currentGA.getWidth() + dWidth);
+ newContext.setDirection(context.getDirection());
-
- newContext.putProperty(ResizeParticipantFeature.POOL_RESIZE_PROPERTY, true);
+ newContext.putProperty(GraphitiConstants.POOL_RESIZE_PROPERTY, true);
resizeShape(newContext);
}
}
} else {
- ContainerShape rootContainer = FeatureSupport.getRootContainer(laneContainerShape);
GraphicsAlgorithm rootGA = rootContainer.getGraphicsAlgorithm();
if (FeatureSupport.isParticipant(rootContainer)) {
@@ -196,6 +191,7 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
newContext.setY(rootGA.getY());
newContext.setWidth(rootGA.getWidth() + dWidth);
newContext.setHeight(rootGA.getHeight() + dHeight);
+ newContext.setDirection(context.getDirection());
IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(newContext);
if (resizeFeature.canResizeShape(newContext)) {
@@ -203,11 +199,11 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
}
} else {
ContainerShape container = null;
- Object rootIsLaneProperty = context.getProperty(LANE_RESIZE_PROPERTY);
+ Object rootIsLaneProperty = context.getProperty(GraphitiConstants.LANE_RESIZE_PROPERTY);
if (rootIsLaneProperty != null && ((Boolean) rootIsLaneProperty).booleanValue()) {
Graphiti.getGaService().setWidth(ga, context.getWidth());
Graphiti.getGaService().setHeight(ga, context.getHeight());
- container = laneContainerShape;
+ container = laneShape;
} else {
container = rootContainer;
if (isHorizontal) {
@@ -215,11 +211,11 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
} else {
Graphiti.getGaService().setHeight(rootGA, rootGA.getHeight() + dHeight);
}
- if (laneContainerShape.equals(rootContainer)) {
+ if (laneShape.equals(rootContainer)) {
Graphiti.getGaService().setLocation(ga, context.getX(), context.getY());
}
}
- for (PictogramElement currentChild : FeatureSupport.getChildsOfBusinessObjectType(container, Lane.class)) {
+ for (PictogramElement currentChild : BusinessObjectUtil.getChildElementsOfType(container, Lane.class)) {
if (currentChild instanceof ContainerShape) {
ContainerShape currentContainer = (ContainerShape) currentChild;
GraphicsAlgorithm currentGA = currentChild.getGraphicsAlgorithm();
@@ -230,8 +226,8 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
newContext.setY(currentGA.getY());
newContext.setWidth(currentGA.getWidth() + dWidth);
newContext.setHeight(currentGA.getHeight() + dHeight);
-
- newContext.putProperty(LANE_RESIZE_PROPERTY, true);
+ newContext.setDirection(context.getDirection());
+ newContext.putProperty(GraphitiConstants.LANE_RESIZE_PROPERTY, true);
resizeShape(newContext);
}
@@ -240,53 +236,50 @@ public class ResizeLaneFeature extends DefaultResizeBPMNShapeFeature {
}
}
}
-
+
@Override
- public void resizeShape(IResizeShapeContext context) {
- ContainerShape laneShape = (ContainerShape) context.getShape();
- GraphicsAlgorithm laneGa = laneShape.getGraphicsAlgorithm();
- int preX = laneGa.getX();
- int preY = laneGa.getY();
-
- resizeHeight(context);
- resizeWidth(context);
-
- int deltaX = preX - context.getX();
- int deltaY = preY - context.getY();
-
- // Adjust location of children so that a resize up or left
- // leaves them in the same location relative to the diagram.
- // This allows the user to create (or remove) space between
- // the Lane's edge and the contained activities.
- for (PictogramElement pe : laneShape.getChildren()) {
- if (pe instanceof ContainerShape) {
- EObject bo = BusinessObjectUtil.getBusinessObjectForPictogramElement(pe);
- if (!(bo instanceof Lane)) {
- ContainerShape child = (ContainerShape) pe;
- GraphicsAlgorithm ga = child.getGraphicsAlgorithm();
- Graphiti.getLayoutService().setLocation(ga, ga.getX() + deltaX, ga.getY() + deltaY);
- }
- }
- }
-
- DIUtils.updateDIShape(laneShape);
- ContainerShape rootContainer = FeatureSupport.getRootContainer(laneShape);
- if (rootContainer!=laneShape) {
- DIUtils.updateDIShape(rootContainer);
- }
+ protected void preResizeShape(IResizeShapeContext context) {
+ super.preResizeShape(context);
+ // TODO: figure out an algorithm to resize lanes so that children
+ // are always visible
+// List<PictogramElement> children = FeatureSupport.getPoolOrLaneChildren((ContainerShape)context.getShape());
+// Rectangle bounds = GraphicsUtil.getBoundingRectangle(children);
+// int direction = 0;
+// if (bounds.x < context.getX()) {
+// ((ResizeShapeContext)context).setX(bounds.x);
+// }
+// if (bounds.y < context.getY()) {
+// ((ResizeShapeContext)context).setY(bounds.y);
+// }
+// if (bounds.x + bounds.width > context.getWidth()) {
+// ((ResizeShapeContext)context).setWidth(bounds.x + bounds.width);
+// }
+// if (bounds.y + bounds.height > context.getHeight()) {
+// ((ResizeShapeContext)context).setHeight(bounds.y + bounds.height);
+// }
}
-
- private ContainerShape getLowestLane(ContainerShape root, boolean fetchFirst) {
+
+ private ContainerShape getLowestLane(ContainerShape root, boolean useFirstLane) {
ContainerShape result;
- if (fetchFirst) {
+ if (useFirstLane) {
result = (ContainerShape) FeatureSupport.getFirstLaneInContainer(root);
} else {
result = (ContainerShape) FeatureSupport.getLastLaneInContainer(root);
}
if (!result.equals(root)) {
- return getLowestLane(result, fetchFirst);
+ return getLowestLane(result, useFirstLane);
}
return result;
}
+ private int compare(int heightBefore, int widthBefore, int heightAfter,
+ int widthAfter) {
+ if (heightAfter > heightBefore || widthAfter > widthBefore) {
+ return 1;
+ }
+ if (heightAfter < heightBefore || widthAfter < widthBefore) {
+ return -1;
+ }
+ return 0;
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/UpdateLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/UpdateLaneFeature.java
index 8c60bfcf..ebd3dc8e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/lane/UpdateLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/UpdateLaneFeature.java
@@ -10,21 +10,26 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.lane;
+package org.eclipse.bpmn2.modeler.core.features.containers.lane;
import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IUpdateContext;
-public class UpdateLaneFeature extends AbstractUpdateBaseElementFeature {
+public class UpdateLaneFeature extends AbstractUpdateBaseElementFeature<Lane> {
public UpdateLaneFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#update(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
@Override
- public boolean canUpdate(IUpdateContext context) {
- return getBusinessObjectForPictogramElement(context.getPictogramElement()) instanceof Lane;
- }
+ public boolean update(IUpdateContext context) {
+ DIUtils.updateDIShape(context.getPictogramElement());
+ return false;
+ }
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/messages.properties
new file mode 100644
index 00000000..f580795a
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/lane/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+DirectEditLaneFeature_Invalid_Empty=Please enter a descriptive name.
+DirectEditLaneFeature_Invalid_Linebreak=Line breakes are not allowed.
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/AddParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java
index 28eb3bce..5ca2eb0c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/AddParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java
@@ -10,42 +10,57 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.participant;
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.ParticipantMultiplicity;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.DefaultPasteBPMNElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.Rectangle;
-import org.eclipse.graphiti.mm.algorithms.Text;
import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeCreateService;
-import org.eclipse.graphiti.services.IPeService;
-public class AddParticipantFeature extends AbstractBpmn2AddElementFeature<Participant> {
-
- public static final String MULTIPLICITY = "multiplicity"; //$NON-NLS-1$
- public static final int DEFAULT_POOL_WIDTH = 600;
- public static final int DEFAULT_POOL_HEIGHT = 150;
+public class AddParticipantFeature extends AbstractBpmn2AddFeature<Participant> {
public AddParticipantFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp) {
+
+ @Override
+ protected AbstractText createText(Shape labelShape, String labelText) {
+ // need to override the default MultiText created by super
+ // because the Graphiti layout algorithm doesn't work as
+ // expected when text angle is -90
+ return gaService.createText(labelShape, labelText);
+ }
+
+ @Override
+ public void applyStyle(AbstractText text, BaseElement be) {
+ super.applyStyle(text, be);
+ text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
+ text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
+ }
+ };
+ }
+
@Override
public boolean canAdd(IAddContext context) {
boolean isParticipant = getBusinessObject(context) instanceof Participant;
@@ -56,8 +71,6 @@ public class AddParticipantFeature extends AbstractBpmn2AddElementFeature<Partic
@Override
public PictogramElement add(IAddContext context) {
Participant businessObject = getBusinessObject(context);
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
Diagram targetDiagram = (Diagram) context.getTargetContainer();
IPeCreateService peCreateService = Graphiti.getPeCreateService();
@@ -70,10 +83,10 @@ public class AddParticipantFeature extends AbstractBpmn2AddElementFeature<Partic
StyleUtil.applyStyle(rect, businessObject);
gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
BPMNShape bpmnShape = createDIShape(containerShape, businessObject, !isImport);
boolean horz = bpmnShape.isIsHorizontal();
- Object copiedBpmnShape = context.getProperty(DefaultPasteBPMNElementFeature.COPIED_BPMN_SHAPE);
+ Object copiedBpmnShape = context.getProperty(GraphitiConstants.COPIED_BPMN_SHAPE);
if (copiedBpmnShape instanceof BPMNShape) {
horz = ((BPMNShape) copiedBpmnShape).isIsHorizontal();
}
@@ -87,34 +100,29 @@ public class AddParticipantFeature extends AbstractBpmn2AddElementFeature<Partic
line = gaService.createPolyline(lineShape, new int[] { 0, 30, width, 30 });
StyleUtil.applyStyle(line, businessObject);
- Shape textShape = peCreateService.createShape(containerShape, false);
- Text text = gaService.createText(textShape, businessObject.getName());
- StyleUtil.applyStyle(text, businessObject);
- text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
- text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- link(textShape, businessObject);
-
// the decorator for Participant Multiplicity will be added by the update feature
// if necessary. Set this property to "false" here, to force an update.
- peService.setPropertyValue(containerShape, MULTIPLICITY, Boolean.toString(false));
+ peService.setPropertyValue(containerShape, GraphitiConstants.MULTIPLICITY, Boolean.toString(false));
decorateShape(context, containerShape, businessObject);
peCreateService.createChopboxAnchor(containerShape);
AnchorUtil.addFixedPointAnchors(containerShape, rect);
- updatePictogramElement(context, containerShape);
- layoutPictogramElement(context, containerShape);
return containerShape;
}
- @Override
- public int getHeight() {
- return DEFAULT_POOL_HEIGHT;
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#decorateShape(org.eclipse.graphiti.features.context.IAddContext, org.eclipse.graphiti.mm.pictograms.ContainerShape, org.eclipse.bpmn2.BaseElement)
+ */
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, Participant businessObject) {
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public int getWidth() {
- return DEFAULT_POOL_WIDTH;
+ public Class getBusinessObjectType() {
+ return Participant.class;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java.orig b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java.orig
new file mode 100644
index 00000000..943c80e7
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java.orig
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IPeCreateService;
+
+public class AddParticipantFeature extends AbstractBpmn2AddFeature<Participant> {
+
+ public AddParticipantFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp) {
+
+ @Override
+ protected AbstractText createText(Shape labelShape, String labelText) {
+ // need to override the default MultiText created by super
+ // because the Graphiti layout algorithm doesn't work as
+ // expected when text angle is -90
+ return gaService.createText(labelShape, labelText);
+ }
+
+ @Override
+ public void applyStyle(AbstractText text, BaseElement be) {
+ super.applyStyle(text, be);
+ text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
+ text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
+ }
+ };
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ boolean isParticipant = getBusinessObject(context) instanceof Participant;
+ boolean addToDiagram = context.getTargetContainer() instanceof Diagram;
+ return isParticipant && addToDiagram;
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ Participant businessObject = getBusinessObject(context);
+
+ Diagram targetDiagram = (Diagram) context.getTargetContainer();
+ IPeCreateService peCreateService = Graphiti.getPeCreateService();
+ ContainerShape containerShape = peCreateService.createContainerShape(targetDiagram, true);
+
+ int width = this.getWidth(context);
+ int height = this.getHeight(context);
+
+ Rectangle rect = gaService.createRectangle(containerShape);
+ StyleUtil.applyStyle(rect, businessObject);
+ gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);
+
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ BPMNShape bpmnShape = createDIShape(containerShape, businessObject, !isImport);
+ boolean horz = bpmnShape.isIsHorizontal();
+ Object copiedBpmnShape = context.getProperty(GraphitiConstants.COPIED_BPMN_SHAPE);
+ if (copiedBpmnShape instanceof BPMNShape) {
+ horz = ((BPMNShape) copiedBpmnShape).isIsHorizontal();
+ }
+ FeatureSupport.setHorizontal(containerShape, horz);
+
+ Shape lineShape = peCreateService.createShape(containerShape, false);
+ Polyline line;
+ if (horz)
+ line = gaService.createPolyline(lineShape, new int[] { 30, 0, 30, height });
+ else
+ line = gaService.createPolyline(lineShape, new int[] { 0, 30, width, 30 });
+ StyleUtil.applyStyle(line, businessObject);
+
+ // the decorator for Participant Multiplicity will be added by the update feature
+ // if necessary. Set this property to "false" here, to force an update.
+ peService.setPropertyValue(containerShape, GraphitiConstants.MULTIPLICITY, Boolean.toString(false));
+
+ decorateShape(context, containerShape, businessObject);
+
+ peCreateService.createChopboxAnchor(containerShape);
+ AnchorUtil.addFixedPointAnchors(containerShape, rect);
+
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/AddParticipantFeature.java
+ updatePictogramElement(context, containerShape);
+ layoutPictogramElement(context, containerShape);
+=======
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/AddParticipantFeature.java
+ return containerShape;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#decorateShape(org.eclipse.graphiti.features.context.IAddContext, org.eclipse.graphiti.mm.pictograms.ContainerShape, org.eclipse.bpmn2.BaseElement)
+ */
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, Participant businessObject) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return Participant.class;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/DirectEditParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/DirectEditParticipantFeature.java
index 1febea22..f92f7e8f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/DirectEditParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/DirectEditParticipantFeature.java
@@ -10,14 +10,13 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.participant;
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
import org.eclipse.bpmn2.Participant;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDirectEditingContext;
import org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.Text;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/Messages.java
new file mode 100644
index 00000000..4f50d4a1
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/Messages.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.containers.participant.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+
+ public static String DirectEditParticipantFeature_Invalid_Empty;
+ public static String DirectEditParticipantFeature_Invalid_Linebreak;
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/ResizeParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/ResizeParticipantFeature.java
index 4e27aba0..00ffe2b3 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/ResizeParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/ResizeParticipantFeature.java
@@ -10,32 +10,27 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.participant;
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
import java.util.List;
import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.containers.AbstractResizeContainerFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
-import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-public class ResizeParticipantFeature extends DefaultResizeShapeFeature {
+public class ResizeParticipantFeature extends AbstractResizeContainerFeature {
- public static final String POOL_RESIZE_PROPERTY = "pool.resize"; //$NON-NLS-1$
- public static final String RESIZE_FIRST_LANE = "resize.first.lane"; //$NON-NLS-1$
-
public ResizeParticipantFeature(IFeatureProvider fp) {
super(fp);
}
@@ -52,66 +47,61 @@ public class ResizeParticipantFeature extends DefaultResizeShapeFeature {
return super.canResizeShape(context);
}
- private void resizeLaneHeight(IResizeShapeContext context) {
- ContainerShape participantShape = (ContainerShape) context.getShape();
- GraphicsAlgorithm ga = participantShape.getGraphicsAlgorithm();
+ protected void resizeHeight(IResizeShapeContext context) {
+ ContainerShape poolShape = (ContainerShape) context.getShape();
+ GraphicsAlgorithm ga = poolShape.getGraphicsAlgorithm();
ContainerShape laneToResize = null;
GraphicsAlgorithm laneToResizeGA = null;
int width = 0;
int height = 0;
- int x = 0;
- int y = 0;
boolean resizeFirstLane = false;
boolean resize = false;
- if (FeatureSupport.isHorizontal(participantShape)) {
+ if (isHorizontal) {
int dHeight = context.getHeight() - ga.getHeight();
if (dHeight != 0) {
resize = true;
if (context.getY() != ga.getY()) {
- laneToResize = (ContainerShape) FeatureSupport.getFirstLaneInContainer(participantShape);
+ laneToResize = (ContainerShape) FeatureSupport.getFirstLaneInContainer(poolShape);
resizeFirstLane = true;
} else {
- laneToResize = (ContainerShape) FeatureSupport.getLastLaneInContainer(participantShape);
+ laneToResize = (ContainerShape) FeatureSupport.getLastLaneInContainer(poolShape);
}
laneToResizeGA = laneToResize.getGraphicsAlgorithm();
width = laneToResizeGA.getWidth();
height = laneToResizeGA.getHeight() + dHeight;
- x = laneToResizeGA.getX();
- y = laneToResizeGA.getY();
}
} else {
int dWidth = context.getWidth() - ga.getWidth();
if (dWidth != 0) {
resize = true;
if (context.getX() != ga.getX()) {
- laneToResize = (ContainerShape) FeatureSupport.getFirstLaneInContainer(participantShape);
+ laneToResize = (ContainerShape) FeatureSupport.getFirstLaneInContainer(poolShape);
resizeFirstLane = true;
} else {
- laneToResize = (ContainerShape) FeatureSupport.getLastLaneInContainer(participantShape);
+ laneToResize = (ContainerShape) FeatureSupport.getLastLaneInContainer(poolShape);
}
laneToResizeGA = laneToResize.getGraphicsAlgorithm();
width = laneToResizeGA.getWidth() + dWidth;
height = laneToResizeGA.getHeight();
- x = laneToResizeGA.getX();
- y = laneToResizeGA.getY();
}
}
if (resize) {
ResizeShapeContext newContext = new ResizeShapeContext(laneToResize);
- newContext.setLocation(x, y);
+ newContext.setX(laneToResizeGA.getX());
+ newContext.setY(laneToResizeGA.getY());
newContext.setHeight(height);
newContext.setWidth(width);
-
- newContext.putProperty(POOL_RESIZE_PROPERTY, true);
- newContext.putProperty(RESIZE_FIRST_LANE, resizeFirstLane);
+ newContext.setDirection(context.getDirection());
+ newContext.putProperty(GraphitiConstants.POOL_RESIZE_PROPERTY, true);
+ newContext.putProperty(GraphitiConstants.RESIZE_FIRST_LANE, resizeFirstLane);
IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(newContext);
if (resizeFeature.canResizeShape(newContext)) {
resizeFeature.resizeShape(newContext);
}
- if (FeatureSupport.isHorizontal(participantShape)) {
+ if (isHorizontal) {
((ResizeShapeContext) context).setHeight(ga.getHeight());
} else {
((ResizeShapeContext) context).setWidth(ga.getWidth());
@@ -119,16 +109,15 @@ public class ResizeParticipantFeature extends DefaultResizeShapeFeature {
}
}
- private void resizeLaneWidth(IResizeShapeContext context) {
- ContainerShape participantShape = (ContainerShape) context.getShape();
- GraphicsAlgorithm ga = participantShape.getGraphicsAlgorithm();
+ protected void resizeWidth(IResizeShapeContext context) {
+ ContainerShape poolShape = (ContainerShape) context.getShape();
+ GraphicsAlgorithm ga = poolShape.getGraphicsAlgorithm();
int dHeight = context.getHeight() - ga.getHeight();
int dWidth = context.getWidth() - ga.getWidth();
- if ((dWidth != 0 && FeatureSupport.isHorizontal(participantShape)) ||
- (dHeight != 0 && !FeatureSupport.isHorizontal(participantShape))) {
- List<PictogramElement> childrenShapes = FeatureSupport.getChildsOfBusinessObjectType(participantShape, Lane.class);
+ if ((dWidth != 0 && isHorizontal) || (dHeight != 0 && !isHorizontal)) {
+ List<PictogramElement> childrenShapes = BusinessObjectUtil.getChildElementsOfType(poolShape, Lane.class);
for (PictogramElement currentPicElem : childrenShapes) {
if (currentPicElem instanceof ContainerShape) {
ContainerShape currentContainerShape = (ContainerShape) currentPicElem;
@@ -137,15 +126,16 @@ public class ResizeParticipantFeature extends DefaultResizeShapeFeature {
ResizeShapeContext newContext = new ResizeShapeContext(currentContainerShape);
newContext.setLocation(laneGA.getX(), laneGA.getY());
- if (FeatureSupport.isHorizontal(participantShape)) {
+ if (isHorizontal) {
newContext.setWidth(laneGA.getWidth() + dWidth);
newContext.setHeight(laneGA.getHeight());
} else {
newContext.setHeight(laneGA.getHeight() + dHeight);
newContext.setWidth(laneGA.getWidth());
}
-
- newContext.putProperty(POOL_RESIZE_PROPERTY, true);
+ newContext.setDirection(context.getDirection());
+
+ newContext.putProperty(GraphitiConstants.POOL_RESIZE_PROPERTY, true);
IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(newContext);
if (resizeFeature.canResizeShape(newContext)) {
@@ -158,33 +148,15 @@ public class ResizeParticipantFeature extends DefaultResizeShapeFeature {
@Override
public void resizeShape(IResizeShapeContext context) {
- ContainerShape poolShape = (ContainerShape) context.getShape();
- GraphicsAlgorithm poolGa = poolShape.getGraphicsAlgorithm();
- int preX = poolGa.getX();
- int preY = poolGa.getY();
-
- if (BusinessObjectUtil.containsChildElementOfType(context.getPictogramElement(), Lane.class)) {
- resizeLaneHeight(context);
- resizeLaneWidth(context);
- }
- super.resizeShape(context);
+ preResizeShape(context);
- int deltaX = preX - context.getX();
- int deltaY = preY - context.getY();
-
- // Adjust location of children so that a resize up or left
- // leaves them in the same location relative to the diagram.
- // This allows the user to create (or remove) space between
- // the Pool's edge and the contained activities.
- for (Shape shape : poolShape.getChildren()) {
- if (shape instanceof ContainerShape ) {
- EObject bo = BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
- GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
- if (!(bo instanceof Lane)) {
- Graphiti.getLayoutService().setLocation(ga, ga.getX() + deltaX, ga.getY() + deltaY);
- }
- }
+ if (BusinessObjectUtil.containsChildElementOfType(context.getPictogramElement(), Lane.class)) {
+ resizeHeight(context);
+ resizeWidth(context);
}
+
+ internalResizeShape(context);
+ postResizeShape(context);
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantFeature.java
index 28dfd6b8..c1df7c8e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantFeature.java
@@ -10,21 +10,26 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.participant;
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IUpdateContext;
-public class UpdateParticipantFeature extends AbstractUpdateBaseElementFeature {
+public class UpdateParticipantFeature extends AbstractUpdateBaseElementFeature<Participant> {
public UpdateParticipantFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.graphiti.func.IUpdate#update(org.eclipse.graphiti.features.context.IUpdateContext)
+ */
@Override
- public boolean canUpdate(IUpdateContext context) {
- return getBusinessObjectForPictogramElement(context.getPictogramElement()) instanceof Participant;
+ public boolean update(IUpdateContext context) {
+ DIUtils.updateDIShape(context.getPictogramElement());
+ return false;
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantMultiplicityFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java
index 44cbf5d9..063289d2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantMultiplicityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java
@@ -10,12 +10,13 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.participant;
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.ParticipantMultiplicity;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
@@ -23,7 +24,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.Polyline;
@@ -35,9 +35,7 @@ import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
-public class UpdateParticipantMultiplicityFeature extends AbstractUpdateFeature {
-
- public static final String MULTIPLICITY_MARKER = "multiplicity.marker"; //$NON-NLS-1$
+public class UpdateParticipantMultiplicityFeature extends AbstractBpmn2UpdateFeature {
public UpdateParticipantMultiplicityFeature(IFeatureProvider fp) {
super(fp);
@@ -58,12 +56,10 @@ public class UpdateParticipantMultiplicityFeature extends AbstractUpdateFeature
@Override
public IReason updateNeeded(IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
EObject container = context.getPictogramElement().eContainer();
if (container instanceof PictogramElement) {
PictogramElement containerElem = (PictogramElement) container;
@@ -80,7 +76,7 @@ public class UpdateParticipantMultiplicityFeature extends AbstractUpdateFeature
ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
boolean multiplicityProperty = new Boolean(peService.getPropertyValue(containerShape,
- AddParticipantFeature.MULTIPLICITY));
+ GraphitiConstants.MULTIPLICITY));
boolean hasMultiplicity = false;
ParticipantMultiplicity pm = participant.getParticipantMultiplicity();
@@ -88,7 +84,7 @@ public class UpdateParticipantMultiplicityFeature extends AbstractUpdateFeature
hasMultiplicity = true;
}
- return multiplicityProperty != hasMultiplicity ? Reason.createTrueReason() : Reason.createFalseReason();
+ return multiplicityProperty != hasMultiplicity ? Reason.createTrueReason("Participant Multiplicity") : Reason.createFalseReason();
}
@Override
@@ -104,7 +100,7 @@ public class UpdateParticipantMultiplicityFeature extends AbstractUpdateFeature
ParticipantMultiplicity pm = participant.getParticipantMultiplicity();
if (pm!=null && pm.getMaximum()>1) {
Shape shape = peService.createShape(containerShape, false);
- peService.setPropertyValue(shape, MULTIPLICITY_MARKER, Boolean.toString(true));
+ peService.setPropertyValue(shape, GraphitiConstants.MULTIPLICITY_MARKER, Boolean.toString(true));
Rectangle invisibleRectangle = gaService.createInvisibleRectangle(shape);
GraphicsAlgorithm parentGa = containerShape.getGraphicsAlgorithm();
int x = (parentGa.getWidth() / 2) - 10;
@@ -122,14 +118,13 @@ public class UpdateParticipantMultiplicityFeature extends AbstractUpdateFeature
line3.setLineWidth(2);
hasMultiplicity = true;
} else {
- Shape shape = FeatureSupport.getShape(containerShape, MULTIPLICITY_MARKER, Boolean.toString(true));
+ Shape shape = FeatureSupport.getShape(containerShape, GraphitiConstants.MULTIPLICITY_MARKER, Boolean.toString(true));
if (shape != null) {
peService.deletePictogramElement(shape);
}
}
- peService.setPropertyValue(containerShape, AddParticipantFeature.MULTIPLICITY,
- hasMultiplicity ? Boolean.toString(true) : Boolean.toString(false));
+ peService.setPropertyValue(containerShape, GraphitiConstants.MULTIPLICITY, Boolean.toString(hasMultiplicity));
return true;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java.orig b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java.orig
new file mode 100644
index 00000000..3f3a5f8c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java.orig
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.containers.participant;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.ParticipantMultiplicity;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantMultiplicityFeature.java
+import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+
+public class UpdateParticipantMultiplicityFeature extends AbstractBpmn2UpdateFeature {
+
+ public UpdateParticipantMultiplicityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ EObject container = context.getPictogramElement().eContainer();
+ if (container instanceof PictogramElement) {
+ PictogramElement containerElem = (PictogramElement) container;
+ if (BusinessObjectUtil.containsElementOfType(containerElem, ChoreographyActivity.class)) {
+ return false;
+ }
+ }
+ return BusinessObjectUtil.containsElementOfType(context.getPictogramElement(), Participant.class)
+ && context.getPictogramElement() instanceof ContainerShape;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/participant/UpdateParticipantMultiplicityFeature.java
+ Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ if (value instanceof EObject) {
+ // if the UpdateContext has a "businessObject" property, then this update is needed
+ // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
+ return Reason.createTrueReason("Initial update");
+ }
+=======
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/UpdateParticipantMultiplicityFeature.java
+ EObject container = context.getPictogramElement().eContainer();
+ if (container instanceof PictogramElement) {
+ PictogramElement containerElem = (PictogramElement) container;
+ if (BusinessObjectUtil.containsElementOfType(containerElem, ChoreographyActivity.class)) {
+ return Reason.createFalseReason();
+ }
+ }
+ if (!(context.getPictogramElement() instanceof ContainerShape)) {
+ return Reason.createFalseReason();
+ }
+ IPeService peService = Graphiti.getPeService();
+ Participant participant = (Participant) BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ Participant.class);
+ ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
+
+ boolean multiplicityProperty = new Boolean(peService.getPropertyValue(containerShape,
+ GraphitiConstants.MULTIPLICITY));
+
+ boolean hasMultiplicity = false;
+ ParticipantMultiplicity pm = participant.getParticipantMultiplicity();
+ if (pm!=null && pm.getMaximum()>1) {
+ hasMultiplicity = true;
+ }
+
+ return multiplicityProperty != hasMultiplicity ? Reason.createTrueReason("Participant Multiplicity") : Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ IPeService peService = Graphiti.getPeService();
+ IGaService gaService = Graphiti.getGaService();
+
+ Participant participant = (Participant) BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ Participant.class);
+ ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
+
+ boolean hasMultiplicity = false;
+ ParticipantMultiplicity pm = participant.getParticipantMultiplicity();
+ if (pm!=null && pm.getMaximum()>1) {
+ Shape shape = peService.createShape(containerShape, false);
+ peService.setPropertyValue(shape, GraphitiConstants.MULTIPLICITY_MARKER, Boolean.toString(true));
+ Rectangle invisibleRectangle = gaService.createInvisibleRectangle(shape);
+ GraphicsAlgorithm parentGa = containerShape.getGraphicsAlgorithm();
+ int x = (parentGa.getWidth() / 2) - 10;
+ int y = parentGa.getHeight() - 20;
+ gaService.setLocationAndSize(invisibleRectangle, x, y, 20, 20);
+
+ Polyline line1 = gaService.createPolyline(invisibleRectangle, new int[] { 0, 0, 0, 15 });
+ line1.setLineWidth(2);
+ line1.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+ Polyline line2 = gaService.createPolyline(invisibleRectangle, new int[] { 5, 0, 5, 15 });
+ line2.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+ line2.setLineWidth(2);
+ Polyline line3 = gaService.createPolyline(invisibleRectangle, new int[] { 10, 0, 10, 15 });
+ line3.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+ line3.setLineWidth(2);
+ hasMultiplicity = true;
+ } else {
+ Shape shape = FeatureSupport.getShape(containerShape, GraphitiConstants.MULTIPLICITY_MARKER, Boolean.toString(true));
+ if (shape != null) {
+ peService.deletePictogramElement(shape);
+ }
+ }
+
+ peService.setPropertyValue(containerShape, GraphitiConstants.MULTIPLICITY, Boolean.toString(hasMultiplicity));
+ return true;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/messages.properties
new file mode 100644
index 00000000..b9173826
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/containers/participant/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+DirectEditParticipantFeature_Invalid_Empty=Please enter descriptive name.
+DirectEditParticipantFeature_Invalid_Linebreak=Line breakes are not allowed.
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateDataInputOutputFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateDataInputOutputFeature.java
index aadcd2ce..813f2904 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateDataInputOutputFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateDataInputOutputFeature.java
@@ -12,28 +12,29 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.data;
-import java.io.IOException;
-
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public abstract class AbstractCreateDataInputOutputFeature<T extends ItemAwareElement> extends AbstractBpmn2CreateFeature<T> {
- public AbstractCreateDataInputOutputFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateDataInputOutputFeature(IFeatureProvider fp) {
+ super(fp);
}
@Override
public boolean canCreate(ICreateContext context) {
+ if (!super.canCreate(context))
+ return false;
+
Object containerBO = BusinessObjectUtil.getBusinessObjectForPictogramElement( context.getTargetContainer() );
boolean intoDiagram = containerBO instanceof BPMNDiagram;
if (intoDiagram) {
@@ -50,14 +51,10 @@ public abstract class AbstractCreateDataInputOutputFeature<T extends ItemAwareEl
@Override
public Object[] create(ICreateContext context) {
T element = createBusinessObject(context);
- try {
- ModelHandler handler = ModelHandlerLocator.getModelHandler(getDiagram().eResource());
- handler.addDataInputOutput(context.getTargetContainer(), element);
- } catch (IOException e) {
- Activator.logError(e);
- }
- addGraphicalRepresentation(context, element);
- return new Object[] { element };
+ ModelHandler mh = ModelHandlerLocator.getModelHandler(getDiagram().eResource());
+ mh.addDataInputOutput(context.getTargetContainer(), element);
+ PictogramElement pe = addGraphicalRepresentation(context, element);
+ return new Object[] { element, pe };
}
protected abstract String getStencilImageId();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateRootElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateRootElementFeature.java
index b4dcbc30..07722276 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateRootElementFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AbstractCreateRootElementFeature.java
@@ -17,11 +17,12 @@ import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public abstract class AbstractCreateRootElementFeature<T extends RootElement> extends AbstractBpmn2CreateFeature<T> {
- public AbstractCreateRootElementFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateRootElementFeature(IFeatureProvider fp) {
+ super(fp);
}
@Override
@@ -33,7 +34,8 @@ public abstract class AbstractCreateRootElementFeature<T extends RootElement> ex
public Object[] create(ICreateContext context) {
RootElement element = createBusinessObject(context);
if (element!=null) {
- addGraphicalRepresentation(context, element);
+ PictogramElement pe = addGraphicalRepresentation(context, element);
+ return new Object[] { element, pe };
}
return new Object[] { element };
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java
index 64759604..e29897d8 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java
@@ -13,18 +13,18 @@
package org.eclipse.bpmn2.modeler.core.features.data;
import org.eclipse.bpmn2.ItemAwareElement;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.ITargetContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.algorithms.Polyline;
@@ -33,15 +33,17 @@ import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-public abstract class AddDataFeature<T extends ItemAwareElement> extends AbstractBpmn2AddElementFeature<T> {
+public abstract class AddDataFeature<T extends ItemAwareElement> extends AbstractBpmn2AddFeature<T> {
public AddDataFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
return FeatureSupport.isValidDataTarget(context);
@@ -49,19 +51,15 @@ public abstract class AddDataFeature<T extends ItemAwareElement> extends Abstrac
@Override
public PictogramElement add(IAddContext context) {
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
- @SuppressWarnings("unchecked")
T businessObject = getBusinessObject(context);
- int width = this.getWidth();
- int height = this.getHeight();
+ int width = getWidth(context);
+ int height = getHeight(context);
int e = 10;
- int textArea = 15;
ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
- gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height + textArea);
+ gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height);
Shape rectShape = peService.createShape(containerShape, false);
Polygon rect = gaService.createPolygon(rectShape, new int[] { 0, 0, width - e, 0, width, e, width, height, 0,
@@ -74,7 +72,7 @@ public abstract class AddDataFeature<T extends ItemAwareElement> extends Abstrac
edge.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
edge.setLineWidth(1);
- if (isSupportCollectionMarkers()) {
+ // Create the "is collection" marker
int whalf = width / 2;
createCollectionShape(containerShape, new int[] { whalf - 2, height - 8, whalf - 2, height });
createCollectionShape(containerShape, new int[] { whalf, height - 8, whalf, height });
@@ -85,9 +83,9 @@ public abstract class AddDataFeature<T extends ItemAwareElement> extends Abstrac
if (feature!=null && businessObject.eGet(feature)!=null)
value = ((Boolean)businessObject.eGet(feature)).toString();
- Graphiti.getPeService().setPropertyValue(containerShape, Properties.COLLECTION_PROPERTY, value);
- }
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ peService.setPropertyValue(containerShape, GraphitiConstants.COLLECTION_PROPERTY, value);
+
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
// hook for subclasses to inject extra code
@@ -98,41 +96,21 @@ public abstract class AddDataFeature<T extends ItemAwareElement> extends Abstrac
peService.createChopboxAnchor(containerShape);
AnchorUtil.addFixedPointAnchors(containerShape, invisibleRect);
- updatePictogramElement(context, containerShape);
- layoutPictogramElement(context, containerShape);
-
- // prepare the AddContext to create a Label
- prepareAddContext(context, containerShape, width, height);
- IFeatureContainer fc = new LabelFeatureContainer();
- fc.getAddFeature(getFeatureProvider()).add(context);
-
return containerShape;
}
private Shape createCollectionShape(ContainerShape container, int[] xy) {
- IPeService peService = Graphiti.getPeService();
- IGaService gaService = Graphiti.getGaService();
Shape collectionShape = peService.createShape(container, false);
Polyline line = gaService.createPolyline(collectionShape, xy);
line.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
line.setLineWidth(1);
line.setLineVisible(false);
- peService.setPropertyValue(collectionShape, Properties.HIDEABLE_PROPERTY, Boolean.toString(true));
+ peService.setPropertyValue(collectionShape, GraphitiConstants.HIDEABLE_PROPERTY, Boolean.toString(true));
return collectionShape;
}
- @Override
- public int getHeight() {
- return GraphicsUtil.DATA_HEIGHT;
- }
-
- @Override
- public int getWidth() {
- return GraphicsUtil.DATA_WIDTH;
- }
-
- protected boolean isSupportCollectionMarkers() {
- return true;
+ protected boolean isHorizontal(ITargetContext context) {
+ return false;
}
public abstract String getName(T t);
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java.orig b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java.orig
new file mode 100644
index 00000000..7c24edb6
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java.orig
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.data;
+
+import org.eclipse.bpmn2.ItemAwareElement;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java
+import org.eclipse.bpmn2.modeler.core.di.DIImport;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.ITargetContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.mm.algorithms.Polygon;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+
+public abstract class AddDataFeature<T extends ItemAwareElement> extends AbstractBpmn2AddFeature<T> {
+
+ public AddDataFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return FeatureSupport.isValidDataTarget(context);
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ T businessObject = getBusinessObject(context);
+
+ int width = getWidth(context);
+ int height = getHeight(context);
+ int e = 10;
+
+ ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
+ Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
+ gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height);
+
+ Shape rectShape = peService.createShape(containerShape, false);
+ Polygon rect = gaService.createPolygon(rectShape, new int[] { 0, 0, width - e, 0, width, e, width, height, 0,
+ height });
+ rect.setLineWidth(1);
+ StyleUtil.applyStyle(rect,businessObject);
+
+ int p = width - e - 1;
+ Polyline edge = gaService.createPolyline(rect, new int[] { p, 0, p, e + 1, width, e + 1 });
+ edge.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+ edge.setLineWidth(1);
+
+ // Create the "is collection" marker
+ int whalf = width / 2;
+ createCollectionShape(containerShape, new int[] { whalf - 2, height - 8, whalf - 2, height });
+ createCollectionShape(containerShape, new int[] { whalf, height - 8, whalf, height });
+ createCollectionShape(containerShape, new int[] { whalf + 2, height - 8, whalf + 2, height });
+
+ String value = "false"; //$NON-NLS-1$
+ EStructuralFeature feature = ((EObject)businessObject).eClass().getEStructuralFeature("isCollection"); //$NON-NLS-1$
+ if (feature!=null && businessObject.eGet(feature)!=null)
+ value = ((Boolean)businessObject.eGet(feature)).toString();
+
+ peService.setPropertyValue(containerShape, GraphitiConstants.COLLECTION_PROPERTY, value);
+
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ createDIShape(containerShape, businessObject, !isImport);
+
+ // hook for subclasses to inject extra code
+ ((AddContext)context).setWidth(width);
+ ((AddContext)context).setHeight(height);
+ decorateShape(context, containerShape, businessObject);
+
+ peService.createChopboxAnchor(containerShape);
+ AnchorUtil.addFixedPointAnchors(containerShape, invisibleRect);
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java
+
+ updatePictogramElement(context, containerShape);
+ layoutPictogramElement(context, containerShape);
+
+ // prepare the AddContext to create a Label
+ prepareAddContext(context, containerShape, width, height);
+ IFeatureContainer fc = new LabelFeatureContainer();
+ fc.getAddFeature(getFeatureProvider()).add(context);
+=======
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/AddDataFeature.java
+
+ return containerShape;
+ }
+
+ private Shape createCollectionShape(ContainerShape container, int[] xy) {
+ Shape collectionShape = peService.createShape(container, false);
+ Polyline line = gaService.createPolyline(collectionShape, xy);
+ line.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+ line.setLineWidth(1);
+ line.setLineVisible(false);
+ peService.setPropertyValue(collectionShape, GraphitiConstants.HIDEABLE_PROPERTY, Boolean.toString(true));
+ return collectionShape;
+ }
+
+ protected boolean isHorizontal(ITargetContext context) {
+ return false;
+ }
+
+ public abstract String getName(T t);
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java
new file mode 100644
index 00000000..be9ae723
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/data/MoveDataFeature.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.data;
+
+import org.eclipse.bpmn2.DataInput;
+import org.eclipse.bpmn2.DataOutput;
+import org.eclipse.bpmn2.FlowElement;
+import org.eclipse.bpmn2.FlowElementsContainer;
+import org.eclipse.bpmn2.InputOutputSpecification;
+import org.eclipse.bpmn2.InputSet;
+import org.eclipse.bpmn2.ItemAwareElement;
+import org.eclipse.bpmn2.OutputSet;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+/**
+ * MoveFeature class for all Data items including DataObject, DataStore,
+ * DataObjectReference, DataStoreReference, DataInput and DataOutput.
+ * <p>
+ * The first four of these (referred to collectively as "DataObjects" here) are
+ * both ItemAwareElements and FlowElements, so their containment rules are
+ * different than DataInput and DataOutput items: DataObjects are contained in
+ * FlowElementContainers (in the "flowElements" containment list) whereas
+ * DataInput and DataOutput objects are contained in an InputOutputSpecification
+ * container and must also be included in at least one InputSet or OutputSet,
+ * depending on the item type.
+ */
+public class MoveDataFeature extends DefaultMoveBPMNShapeFeature {
+
+ public MoveDataFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public boolean canMoveShape(IMoveShapeContext context) {
+ if (super.canMoveShape(context)) {
+ Shape shape = context.getShape();
+ EObject dataObject = BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
+ if (dataObject instanceof ItemAwareElement) {
+ if (dataObject instanceof FlowElement) {
+ if (FeatureSupport.isValidDataTarget(context))
+ return true;
+ }
+ else {
+ // It must be a DataInput or DataOutput object, which is NOT
+ // a FlowElement. These can only be moved into a container
+ // that has an InputOutputSpecification.
+ Shape targetContainer = context.getTargetContainer();
+ if (targetContainer==context.getSourceContainer())
+ // target is the same as source container
+ return true;
+ // target is different from source container
+ EObject targetObject = FeatureSupport.getTargetObject(context);
+ if (targetObject instanceof Process) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ protected void postMoveShape(IMoveShapeContext context) {
+ Shape shape = context.getShape();
+ ItemAwareElement dataObject = (ItemAwareElement) BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
+ ContainerShape sourceContainer = context.getSourceContainer();
+ ContainerShape targetContainer = context.getTargetContainer();
+ if (sourceContainer!=targetContainer) {
+ EObject targetObject = FeatureSupport.getTargetObject(context);
+ if (dataObject instanceof FlowElement) {
+ // The Item Aware data object is also a FlowElement, so it
+ // belongs in a FlowElementsContainer.
+ ((FlowElementsContainer)targetObject).getFlowElements().add((FlowElement)dataObject);
+ }
+ else {
+ // The data object must be either a DataInput or DataOutput,
+ // so it belongs in an ioSpecification.
+ Resource resource = targetObject.eResource();
+ InputOutputSpecification ioSpec = null;
+ EStructuralFeature f = targetObject.eClass().getEStructuralFeature("ioSpecification"); //$NON-NLS-1$
+ ioSpec = (InputOutputSpecification) targetObject.eGet(f);
+ if (ioSpec==null) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(targetObject);
+ ioSpec = (InputOutputSpecification) adapter.getFeatureDescriptor(f).createFeature(resource, null);
+ targetObject.eSet(f, ioSpec);
+ }
+ // add the data object to the ioSpec and input/output set
+ // bulletproofing: the ioSpec SHOULD have at least one InputSet AND
+ // at least one OutputSet. If not, add them here.
+ if (ioSpec.getInputSets().size()==0)
+ ioSpec.getInputSets().add(Bpmn2ModelerFactory.eINSTANCE.createInputSet());
+ if (ioSpec.getOutputSets().size()==0)
+ ioSpec.getOutputSets().add(Bpmn2ModelerFactory.eINSTANCE.createOutputSet());
+ InputOutputSpecification oldIoSpec = (InputOutputSpecification) dataObject.eContainer();
+ if (dataObject instanceof DataInput) {
+ ioSpec.getDataInputs().add((DataInput)dataObject);
+ ioSpec.getInputSets().get(0).getDataInputRefs().add((DataInput)dataObject);
+ for (InputSet is : oldIoSpec.getInputSets())
+ is.getDataInputRefs().remove(dataObject);
+ }
+ else {
+ ioSpec.getDataOutputs().add((DataOutput)dataObject);
+ ioSpec.getOutputSets().get(0).getDataOutputRefs().add((DataOutput)dataObject);
+ for (OutputSet os : oldIoSpec.getOutputSets())
+ os.getDataOutputRefs().remove(dataObject);
+ }
+ }
+ }
+ super.postMoveShape(context);
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractBoundaryEventOperation.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractBoundaryEventOperation.java
index e6995a01..28c22eea 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractBoundaryEventOperation.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractBoundaryEventOperation.java
@@ -17,6 +17,7 @@ import java.util.Collection;
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
@@ -29,10 +30,12 @@ public abstract class AbstractBoundaryEventOperation {
IPeService peService = Graphiti.getPeService();
Collection<PictogramElement> elements = peService.getAllContainedPictogramElements(diagram);
for (PictogramElement e : elements) {
- BoundaryEvent boundaryEvent = BusinessObjectUtil.getFirstElementOfType(e, BoundaryEvent.class);
- if (boundaryEvent != null && activity.getBoundaryEventRefs().contains(boundaryEvent)) {
- ContainerShape container = (ContainerShape) e;
- doWorkInternal(container);
+ if (!FeatureSupport.isLabelShape(e)) {
+ BoundaryEvent boundaryEvent = BusinessObjectUtil.getFirstElementOfType(e, BoundaryEvent.class);
+ if (boundaryEvent != null && activity.getBoundaryEventRefs().contains(boundaryEvent)) {
+ ContainerShape container = (ContainerShape) e;
+ doWorkInternal(container);
+ }
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractCreateEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractCreateEventFeature.java
index 18eb4f3c..668478e1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractCreateEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractCreateEventFeature.java
@@ -18,7 +18,7 @@ import org.eclipse.graphiti.features.IFeatureProvider;
public abstract class AbstractCreateEventFeature<T extends Event> extends AbstractCreateFlowElementFeature<T> {
- public AbstractCreateEventFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateEventFeature(IFeatureProvider fp) {
+ super(fp);
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractUpdateEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractUpdateEventFeature.java
index 362d2181..b11772e3 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractUpdateEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AbstractUpdateEventFeature.java
@@ -13,21 +13,19 @@
package org.eclipse.bpmn2.modeler.core.features.event;
-import java.util.Iterator;
import java.util.List;
import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
-import org.eclipse.graphiti.mm.algorithms.Rectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
@@ -37,7 +35,7 @@ import org.eclipse.graphiti.services.Graphiti;
*
*/
-public abstract class AbstractUpdateEventFeature extends AbstractUpdateMarkerFeature<Event> {
+public abstract class AbstractUpdateEventFeature<T extends Event> extends AbstractUpdateMarkerFeature<T> {
/**
* @param fp
@@ -69,11 +67,11 @@ public abstract class AbstractUpdateEventFeature extends AbstractUpdateMarkerFea
PictogramElement eventDefinitionShape = null;
for (PictogramElement pe : container.getChildren()) {
if (pe.getLink() != null) {
- EList<EObject> objects = pe.getLink().getBusinessObjects();
- if (objects.size()>0 && objects.get(0) instanceof EventDefinition) {
- eventDefinition = (EventDefinition)objects.get(0);
- eventDefinitionShape = pe;
- break;
+ for (EObject object : pe.getLink().getBusinessObjects()) {
+ if (eventDefinition == object) {
+ eventDefinitionShape = pe;
+ break;
+ }
}
}
}
@@ -98,7 +96,7 @@ public abstract class AbstractUpdateEventFeature extends AbstractUpdateMarkerFea
}
}
else {
- GraphicsUtil.deleteEventShape(container);
+ ShapeDecoratorUtil.deleteEventShape(container);
}
}
@@ -124,6 +122,10 @@ public abstract class AbstractUpdateEventFeature extends AbstractUpdateMarkerFea
if (((CatchEvent)element).isParallelMultiple())
result += "+"; //$NON-NLS-1$
}
+ if (element instanceof StartEvent) {
+ if (((StartEvent)element).isIsInterrupting())
+ result += "*"; //$NON-NLS-1$
+ }
return result;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java
new file mode 100644
index 00000000..e13dc7d3
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.event;
+
+import static org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.createEventShape;
+
+import org.eclipse.bpmn2.Event;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.Ellipse;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+public abstract class AddEventFeature<T extends Event>
+ extends AbstractBpmn2AddFeature<T> {
+
+ public AddEventFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return FeatureSupport.isValidFlowElementTarget(context);
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ T businessObject = getBusinessObject(context);
+
+ int width = this.getWidth(context);
+ int height = this.getHeight(context);
+ // for backward compatibility with older files that included
+ // the label height in the figure height
+ if (width!=height) {
+ width = height = Math.min(width, height);
+ }
+
+ adjustLocation(context,width,height);
+
+ int x = context.getX();
+ int y = context.getY();
+
+ ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
+ Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
+ gaService.setLocationAndSize(invisibleRect, x, y, width, height);
+
+ Shape ellipseShape = peService.createShape(containerShape, false);
+ peService.setPropertyValue(ellipseShape, GraphitiConstants.EVENT_ELEMENT, GraphitiConstants.EVENT_CIRCLE);
+ peService.setPropertyValue(containerShape, GraphitiConstants.EVENT_MARKER_CONTAINER, Boolean.toString(true));
+ Ellipse ellipse = createEventShape(ellipseShape, width, height);
+ StyleUtil.applyStyle(ellipse, businessObject);
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ createDIShape(containerShape, businessObject, !isImport);
+
+ decorateShape(context, containerShape, businessObject);
+
+ peService.createChopboxAnchor(containerShape);
+ AnchorUtil.addFixedPointAnchors(containerShape, ellipse);
+
+ splitConnection(context, containerShape);
+
+ return containerShape;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java.orig
index ab59d7c3..8709f72f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java.orig
@@ -12,17 +12,23 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.event;
-import static org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.createEventShape;
+import static org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.createEventShape;
import org.eclipse.bpmn2.Event;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java
import org.eclipse.bpmn2.modeler.core.di.DIImport;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
@@ -30,20 +36,18 @@ import org.eclipse.graphiti.mm.algorithms.Rectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-public class AddEventFeature<T extends Event>
- extends AbstractBpmn2AddElementFeature<T> {
-
- public static final String EVENT_ELEMENT = "event.graphics.element"; //$NON-NLS-1$
- public static final String EVENT_CIRCLE = "event.graphics.element.circle"; //$NON-NLS-1$
+public abstract class AddEventFeature<T extends Event>
+ extends AbstractBpmn2AddFeature<T> {
public AddEventFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
return FeatureSupport.isValidFlowElementTarget(context);
@@ -53,9 +57,6 @@ public class AddEventFeature<T extends Event>
public PictogramElement add(IAddContext context) {
T businessObject = getBusinessObject(context);
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
-
int width = this.getWidth(context);
int height = this.getHeight(context);
// for backward compatibility with older files that included
@@ -74,11 +75,11 @@ public class AddEventFeature<T extends Event>
gaService.setLocationAndSize(invisibleRect, x, y, width, height);
Shape ellipseShape = peService.createShape(containerShape, false);
- peService.setPropertyValue(ellipseShape, EVENT_ELEMENT, EVENT_CIRCLE);
- peService.setPropertyValue(containerShape, GraphicsUtil.EVENT_MARKER_CONTAINER, Boolean.toString(true));
+ peService.setPropertyValue(ellipseShape, GraphitiConstants.EVENT_ELEMENT, GraphitiConstants.EVENT_CIRCLE);
+ peService.setPropertyValue(containerShape, GraphitiConstants.EVENT_MARKER_CONTAINER, Boolean.toString(true));
Ellipse ellipse = createEventShape(ellipseShape, width, height);
StyleUtil.applyStyle(ellipse, businessObject);
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
decorateShape(context, containerShape, businessObject);
@@ -87,6 +88,7 @@ public class AddEventFeature<T extends Event>
AnchorUtil.addFixedPointAnchors(containerShape, ellipse);
splitConnection(context, containerShape);
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java
updatePictogramElement(context, containerShape);
layoutPictogramElement(context, containerShape);
@@ -98,14 +100,9 @@ public class AddEventFeature<T extends Event>
return containerShape;
}
+=======
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/AddEventFeature.java
- @Override
- public int getHeight() {
- return GraphicsUtil.getEventSize(this.getDiagram()).getHeight();
- }
-
- @Override
- public int getWidth() {
- return GraphicsUtil.getEventSize(this.getDiagram()).getWidth();
+ return containerShape;
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/EventSelectionBehavior.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/EventSelectionBehavior.java
index 4e3a6142..be91470b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/EventSelectionBehavior.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/EventSelectionBehavior.java
@@ -44,11 +44,9 @@ public class EventSelectionBehavior {
}
public static GraphicsAlgorithm[] getClickArea(PictogramElement element) {
- Iterator<Shape> iterator = Graphiti.getPeService().getAllContainedShapes((ContainerShape) element).iterator();
- GraphicsAlgorithm[] algorithms = new GraphicsAlgorithm[1];
- algorithms[0] = iterator.next().getGraphicsAlgorithm();
-// algorithms[1] = iterator.next().getGraphicsAlgorithm();
- return algorithms;
+ Collection<PictogramElement> children = Graphiti.getPeService().getPictogramElementChildren(element);
+ PictogramElement first = children.iterator().next();
+ return new GraphicsAlgorithm[] { first.getGraphicsAlgorithm() };
}
public static GraphicsAlgorithm getSelectionBorder(PictogramElement element) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java
new file mode 100644
index 00000000..b832f3fd
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractAddEventDefinitionFeature.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.event.definitions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Event;
+import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.IExecutionInfo;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeature;
+import org.eclipse.graphiti.features.IFeatureAndContext;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+public abstract class AbstractAddEventDefinitionFeature<T extends EventDefinition>
+ extends AbstractBpmn2AddFeature<T> {
+
+
+ public AbstractAddEventDefinitionFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ // Event Definitions don't have labels
+ return null;
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
+ Object ed = context.getNewObject();
+ if (bo instanceof Event && ed instanceof EventDefinition) {
+ List<EClass> allowedItems = FeatureSupport.getAllowedEventDefinitions(
+ (Event) bo,
+ (BaseElement) context.getProperty(GraphitiConstants.PARENT_CONTAINER));
+ if (allowedItems.contains(((EventDefinition)ed).eClass()))
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ ContainerShape containerShape = context.getTargetContainer();
+ T businessObject = getBusinessObject(context);
+
+ // hook for subclasses to inject extra code
+ decorateShape(context, containerShape, businessObject);
+ return null;
+ }
+
+ abstract protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject);
+
+ @Override
+ public T getBusinessObject(IAddContext context) {
+ Object businessObject = context.getProperty(GraphitiConstants.BUSINESS_OBJECT);
+ if (businessObject instanceof EventDefinition)
+ return (T)businessObject;
+ return (T)context.getNewObject();
+ }
+
+ @Override
+ public void putBusinessObject(IAddContext context, T businessObject) {
+ context.putProperty(GraphitiConstants.BUSINESS_OBJECT, businessObject);
+ }
+
+ @Override
+ public void postExecute(IExecutionInfo executionInfo) {
+ List<PictogramElement> pes = new ArrayList<PictogramElement>();
+ for (IFeatureAndContext fc : executionInfo.getExecutionList()) {
+ IContext context = fc.getContext();
+ IFeature feature = fc.getFeature();
+ if (context instanceof AddContext) {
+ AddContext ac = (AddContext)context;
+ pes.add(ac.getTargetContainer());
+ }
+ }
+ getDiagramEditor().setPictogramElementsForSelection(pes.toArray(new PictogramElement[pes.size()]));
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractCreateEventDefinitionFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractCreateEventDefinitionFeature.java
index 8c98d78b..2973b6bc 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractCreateEventDefinitionFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractCreateEventDefinitionFeature.java
@@ -17,23 +17,30 @@ import java.util.List;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public abstract class AbstractCreateEventDefinitionFeature<T extends EventDefinition> extends AbstractBpmn2CreateFeature<T> {
- public AbstractCreateEventDefinitionFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateEventDefinitionFeature(IFeatureProvider fp) {
+ super(fp);
}
@Override
public boolean canCreate(ICreateContext context) {
+ if (!super.canCreate(context))
+ return false;
+
Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
if (bo instanceof Event) {
- List<EClass> allowedItems = FeatureSupport.getAllowedEventDefinitions((Event) bo);
+ List<EClass> allowedItems = FeatureSupport.getAllowedEventDefinitions(
+ (Event) bo,
+ context.getProperty(GraphitiConstants.PARENT_CONTAINER));
if (allowedItems.contains(getBusinessObjectClass()))
return true;
}
@@ -46,9 +53,9 @@ public abstract class AbstractCreateEventDefinitionFeature<T extends EventDefini
List<EventDefinition> eventDefinitions = ModelUtil.getEventDefinitions(e);
EventDefinition definition = createBusinessObject(context);
eventDefinitions.add(definition);
- addGraphicalRepresentation(context, definition);
+ PictogramElement pe = addGraphicalRepresentation(context, definition);
ModelUtil.setID(definition);
- return new Object[] { definition };
+ return new Object[] { definition, pe };
}
protected abstract String getStencilImageId();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractEventDefinitionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractEventDefinitionFeatureContainer.java
index 19617af9..a4a9523a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractEventDefinitionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractEventDefinitionFeatureContainer.java
@@ -23,7 +23,6 @@ import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
@@ -76,41 +75,25 @@ public abstract class AbstractEventDefinitionFeatureContainer extends BaseElemen
protected abstract Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape);
- public class AddEventDefinitionFeature extends AbstractAddEventDefinitionFeature<EventDefinition> {
+ public static class AddEventDefinitionFeature extends AbstractAddEventDefinitionFeature<EventDefinition> {
public AddEventDefinitionFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractAddEventDefinitionFeature#decorateShape(org.eclipse.graphiti.features.context.IAddContext, org.eclipse.graphiti.mm.pictograms.ContainerShape, org.eclipse.bpmn2.EventDefinition)
+ */
@Override
- public DecorationAlgorithm getDecorationAlgorithm(final Event event) {
- return new DecorationAlgorithm() {
-
- @Override
- public Shape draw(ContainerShape shape) {
- if (event instanceof BoundaryEvent) {
- return drawForBoundary(this, shape);
- }
- if (event instanceof IntermediateCatchEvent) {
- return drawForCatch(this, shape);
- }
- if (event instanceof IntermediateThrowEvent) {
- return drawForThrow(this, shape);
- }
- if (event instanceof StartEvent) {
- return drawForStart(this, shape);
- }
- if (event instanceof EndEvent) {
- return drawForEnd(this, shape);
- }
- return null;
- }
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, EventDefinition businessObject) {
+ }
- @Override
- public Color manageColor(IColorConstant colorConstant) {
- return AddEventDefinitionFeature.this.manageColor(colorConstant);
- }
- };
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return EventDefinition.class;
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractUpdateEventDefinitionFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractUpdateEventDefinitionFeature.java
index e64f3f81..9d22ec97 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractUpdateEventDefinitionFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/AbstractUpdateEventDefinitionFeature.java
@@ -19,20 +19,21 @@ import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
-public abstract class AbstractUpdateEventDefinitionFeature extends AbstractUpdateFeature {
+public abstract class AbstractUpdateEventDefinitionFeature extends AbstractBpmn2UpdateFeature {
public AbstractUpdateEventDefinitionFeature(IFeatureProvider fp) {
super(fp);
@@ -47,16 +48,22 @@ public abstract class AbstractUpdateEventDefinitionFeature extends AbstractUpdat
List<EventDefinition> eventDefinitions = ModelUtil.getEventDefinitions(event);
int size = eventDefinitions.size();
- GraphicsUtil.deleteEventShape(container);
+ ShapeDecoratorUtil.deleteEventShape(container);
if (size==1) {
Shape addedShape = getDecorationAlgorithm(event).draw(container);
link(addedShape, eventDefinitions.get(0));
+ Graphiti.getPeService().setPropertyValue(addedShape,
+ GraphitiConstants.EVENT_DEFINITION_SHAPE,
+ Boolean.toString(true));
}
else if (size > 1) {
Shape multipleShape = Graphiti.getPeService().createShape(container, false);
drawForEvent(event, multipleShape);
link(multipleShape, eventDefinitions.toArray(new EventDefinition[size]));
+ Graphiti.getPeService().setPropertyValue(multipleShape,
+ GraphitiConstants.EVENT_DEFINITION_SHAPE,
+ Boolean.toString(true));
}
}
@@ -70,9 +77,9 @@ public abstract class AbstractUpdateEventDefinitionFeature extends AbstractUpdat
}
}
- private void drawMultiple(Event event, Shape shape) {
+ public static void drawMultiple(Event event, Shape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
- Polygon pentagon = GraphicsUtil.createEventPentagon(shape);
+ Polygon pentagon = ShapeDecoratorUtil.createEventPentagon(shape);
if (event instanceof ThrowEvent) {
StyleUtil.setFillStyle(pentagon, FillStyle.FILL_STYLE_FOREGROUND);
} else {
@@ -81,9 +88,9 @@ public abstract class AbstractUpdateEventDefinitionFeature extends AbstractUpdat
StyleUtil.applyStyle(pentagon, be);
}
- private void drawParallelMultiple(Event event, Shape shape) {
+ public static void drawParallelMultiple(Event event, Shape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
- Polygon cross = GraphicsUtil.createEventParallelMultiple(shape);
+ Polygon cross = ShapeDecoratorUtil.createEventParallelMultiple(shape);
StyleUtil.setFillStyle(cross, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(cross, be);
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/DecorationAlgorithm.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/DecorationAlgorithm.java
index f91c95ba..f91c95ba 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/DecorationAlgorithm.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/event/definitions/DecorationAlgorithm.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java
index 00c5b23f..2fcc122f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractAddFlowFeature.java
@@ -19,37 +19,39 @@ import org.eclipse.bpmn2.EndEvent;
import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.MessageEventDefinition;
import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddConnectionLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.Tuple;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddConnectionContext;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.mm.algorithms.Polyline;
-import org.eclipse.graphiti.mm.algorithms.Text;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
-import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.FixPointAnchor;
+import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
public abstract class AbstractAddFlowFeature<T extends BaseElement>
- extends AbstractBpmn2AddElementFeature<T> {
+ extends AbstractBpmn2AddFeature<T> {
public AbstractAddFlowFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddConnectionLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
if (context instanceof IAddConnectionContext) {
@@ -67,7 +69,7 @@ public abstract class AbstractAddFlowFeature<T extends BaseElement>
return false;
}
}
- return getBoClass().isAssignableFrom(getBusinessObject(context).getClass());
+ return getBusinessObjectType().isAssignableFrom(getBusinessObject(context).getClass());
}
return false;
}
@@ -77,20 +79,19 @@ public abstract class AbstractAddFlowFeature<T extends BaseElement>
*/
@Override
public PictogramElement add(IAddContext context) {
- IPeService peService = Graphiti.getPeService();
- IGaService gaService = Graphiti.getGaService();
-
+ boolean isImporting = DIImport.isImporting(context);
+
T businessObject = getBusinessObject(context);
IAddConnectionContext addContext = (IAddConnectionContext) context;
AnchorContainer sourceContainer = addContext.getSourceAnchor().getParent();
AnchorContainer targetContainer = addContext.getTargetAnchor().getParent();
- Connection connection = peService.createFreeFormConnection(getDiagram());
+ FreeFormConnection connection = peService.createFreeFormConnection(getDiagram());
if (AnchorUtil.useAdHocAnchors(sourceContainer, connection)) {
- Point p = (Point)addContext.getProperty(AnchorUtil.CONNECTION_SOURCE_LOCATION);
+ Point p = (Point)addContext.getProperty(GraphitiConstants.CONNECTION_SOURCE_LOCATION);
if (p!=null) {
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_SOURCE_LOCATION,
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_SOURCE_LOCATION,
AnchorUtil.pointToString(p));
}
}
@@ -99,21 +100,20 @@ public abstract class AbstractAddFlowFeature<T extends BaseElement>
// Fetch the source and target locations of the connection copied from the
// CreateConnectionContext and copy them as String properties to the Connection
// @see AbstractCreateFlowFeature.create()
- Point p = (Point)addContext.getProperty(AnchorUtil.CONNECTION_TARGET_LOCATION);
+ Point p = (Point)addContext.getProperty(GraphitiConstants.CONNECTION_TARGET_LOCATION);
if (p!=null) {
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_TARGET_LOCATION,
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_TARGET_LOCATION,
AnchorUtil.pointToString(p));
}
}
- if (addContext.getProperty(AnchorUtil.CONNECTION_CREATED)!=null) {
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_CREATED, "true"); //$NON-NLS-1$
+ if (addContext.getProperty(GraphitiConstants.CONNECTION_CREATED)!=null) {
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_CREATED, "true"); //$NON-NLS-1$
}
Anchor sourceAnchor = addContext.getSourceAnchor();
Anchor targetAnchor = addContext.getTargetAnchor();
- Object importProp = context.getProperty(DIImport.IMPORT_PROPERTY);
- if (importProp != null && (Boolean) importProp) {
+ if (isImporting) {
connection.setStart(sourceAnchor);
connection.setEnd(targetAnchor);
} else {
@@ -133,35 +133,22 @@ public abstract class AbstractAddFlowFeature<T extends BaseElement>
connection.setStart(sourceAnchor);
connection.setEnd(targetAnchor);
}
-
- if (ModelUtil.hasName(businessObject)) {
- ConnectionDecorator labelDecorator = Graphiti.getPeService().createConnectionDecorator(connection, true, 0.5, true);
- Text text = gaService.createText(labelDecorator, ModelUtil.getName(businessObject));
- peService.setPropertyValue(labelDecorator, UpdateLabelFeature.TEXT_ELEMENT, Boolean.toString(true));
- StyleUtil.applyStyle(text, businessObject);
- peService.setPropertyValue(labelDecorator, GraphicsUtil.LABEL_PROPERTY, Boolean.toString(true));
- link(labelDecorator, businessObject);
- }
createDIEdge(connection, businessObject);
createConnectionLine(connection);
+ // create the bendpoints {@see org.eclipse.bpmn2.modeler.core.di.DIImport#createConnectionAndSetBendpoints(BPMNEdge,PictogramElement,PictogramElement)}
+ if (isImporting) {
+ List<Point> bendpoints = (List<Point>) context.getProperty(GraphitiConstants.CONNECTION_BENDPOINTS);
+ if (bendpoints!=null && bendpoints.size()>0) {
+ connection.getBendpoints().addAll(bendpoints);
+ }
+ }
+
decorateConnection(addContext, connection, businessObject);
return connection;
}
-
- @Override
- public int getHeight() {
- return -1;
- }
-
- @Override
- public int getWidth() {
- return -1;
- }
-
- protected abstract Class<? extends BaseElement> getBoClass();
protected Polyline createConnectionLine(Connection connection) {
BaseElement be = BusinessObjectUtil.getFirstBaseElement(connection);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java
index 457733c2..f4216db9 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractCreateFlowFeature.java
@@ -28,6 +28,7 @@ import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.SubChoreography;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateConnectionFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
@@ -39,6 +40,7 @@ import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
@@ -50,8 +52,8 @@ public abstract class AbstractCreateFlowFeature<
TARGET extends EObject>
extends AbstractBpmn2CreateConnectionFeature<CONNECTION, SOURCE, TARGET> {
- public AbstractCreateFlowFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateFlowFeature(IFeatureProvider fp) {
+ super(fp);
}
@Override
@@ -62,8 +64,19 @@ public abstract class AbstractCreateFlowFeature<
// Make sure only one connection of each type is created for the same
// source and target objects, i.e. you can't have two SequenceFlows
// with the same source and target objects.
- AnchorContainer sourceContainer = context.getSourceAnchor().getParent();
- AnchorContainer targetContainer = context.getTargetAnchor().getParent();
+ AnchorContainer sourceContainer = null;
+ AnchorContainer targetContainer = null;
+ if (context.getSourceAnchor()!=null)
+ sourceContainer = context.getSourceAnchor().getParent();
+ else if (context.getSourcePictogramElement() instanceof FreeFormConnection) {
+ return true;
+ }
+ if (context.getTargetAnchor()!=null) {
+ targetContainer = context.getTargetAnchor().getParent();
+ }
+ else if (context.getTargetPictogramElement() instanceof FreeFormConnection) {
+ return true;
+ }
if (!canCreateConnection(sourceContainer, targetContainer, getBusinessObjectClass(), null))
return false;
return true;
@@ -95,7 +108,7 @@ public abstract class AbstractCreateFlowFeature<
Point p = gaService.createPoint(
loc.getX() - shapeLoc.getX(),
loc.getY() - shapeLoc.getY());
- addContext.putProperty(AnchorUtil.CONNECTION_SOURCE_LOCATION, p);
+ addContext.putProperty(GraphitiConstants.CONNECTION_SOURCE_LOCATION, p);
loc = context.getTargetLocation();
if (loc==null)
@@ -104,8 +117,8 @@ public abstract class AbstractCreateFlowFeature<
p = gaService.createPoint(
loc.getX() - shapeLoc.getX(),
loc.getY() - shapeLoc.getY());
- addContext.putProperty(AnchorUtil.CONNECTION_TARGET_LOCATION, p);
- addContext.putProperty(AnchorUtil.CONNECTION_CREATED, Boolean.TRUE);
+ addContext.putProperty(GraphitiConstants.CONNECTION_TARGET_LOCATION, p);
+ addContext.putProperty(GraphitiConstants.CONNECTION_CREATED, Boolean.TRUE);
connection = (Connection) getFeatureProvider().addIfPossible(addContext);
ModelUtil.setID(businessObject);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractReconnectFlowFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractReconnectFlowFeature.java
index 24240036..24240036 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractReconnectFlowFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/AbstractReconnectFlowFeature.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java
new file mode 100644
index 00000000..06ead4b0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/Messages.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.flow;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.flow.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/messages.properties
index e69de29b..e69de29b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/flow/messages.properties
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AbstractCreateGatewayFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AbstractCreateGatewayFeature.java
index bc18bb20..879d135c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AbstractCreateGatewayFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AbstractCreateGatewayFeature.java
@@ -18,7 +18,7 @@ import org.eclipse.graphiti.features.IFeatureProvider;
public abstract class AbstractCreateGatewayFeature<T extends Gateway> extends AbstractCreateFlowElementFeature<T> {
- public AbstractCreateGatewayFeature(IFeatureProvider fp, String name, String description) {
- super(fp, name, description);
+ public AbstractCreateGatewayFeature(IFeatureProvider fp) {
+ super(fp);
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java
new file mode 100644
index 00000000..bd9c1ca6
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.gateway;
+
+import org.eclipse.bpmn2.Gateway;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.Polygon;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+public abstract class AddGatewayFeature<T extends Gateway>
+ extends AbstractBpmn2AddFeature<T> {
+
+ public AddGatewayFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return FeatureSupport.isValidFlowElementTarget(context);
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ T businessObject = getBusinessObject(context);
+
+ int width = this.getWidth(context);
+ int height = this.getHeight(context);
+ // for backward compatibility with older files that included
+ // the label height in the figure height
+ if (width!=height) {
+ width = height = Math.min(width, height);
+ }
+ adjustLocation(context, width, height);
+
+ int x = context.getX();
+ int y = context.getY();
+
+ // Create a container for the gateway-symbol
+ final ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
+ final Rectangle gatewayRect = gaService.createInvisibleRectangle(containerShape);
+ gaService.setLocationAndSize(gatewayRect, x, y, width, height);
+
+ Shape gatewayShape = peService.createShape(containerShape, false);
+ Polygon gatewayPolygon = ShapeDecoratorUtil.createGateway(gatewayShape, width, height);
+ StyleUtil.applyStyle(gatewayPolygon, businessObject);
+ gaService.setLocationAndSize(gatewayPolygon, 0, 0, width, height);
+
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ createDIShape(containerShape, businessObject, !isImport);
+
+ // hook for subclasses to inject extra code
+ decorateShape(context, containerShape, businessObject);
+ peService.createChopboxAnchor(containerShape);
+ AnchorUtil.addFixedPointAnchors(containerShape, gatewayPolygon);
+
+ splitConnection(context, containerShape);
+
+ return containerShape;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java.orig
index a0eef014..18aed40d 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java.orig
@@ -13,14 +13,21 @@
package org.eclipse.bpmn2.modeler.core.features.gateway;
import org.eclipse.bpmn2.Gateway;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java
import org.eclipse.bpmn2.modeler.core.di.DIImport;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.mm.algorithms.Polygon;
@@ -28,17 +35,18 @@ import org.eclipse.graphiti.mm.algorithms.Rectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.IPeService;
-public class AddGatewayFeature<T extends Gateway>
- extends AbstractBpmn2AddElementFeature<T> {
+public abstract class AddGatewayFeature<T extends Gateway>
+ extends AbstractBpmn2AddFeature<T> {
public AddGatewayFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
return FeatureSupport.isValidFlowElementTarget(context);
@@ -47,8 +55,6 @@ public class AddGatewayFeature<T extends Gateway>
@Override
public PictogramElement add(IAddContext context) {
T businessObject = getBusinessObject(context);
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
int width = this.getWidth(context);
int height = this.getHeight(context);
@@ -68,11 +74,11 @@ public class AddGatewayFeature<T extends Gateway>
gaService.setLocationAndSize(gatewayRect, x, y, width, height);
Shape gatewayShape = peService.createShape(containerShape, false);
- Polygon gatewayPolygon = GraphicsUtil.createGateway(gatewayShape, width, height);
+ Polygon gatewayPolygon = ShapeDecoratorUtil.createGateway(gatewayShape, width, height);
StyleUtil.applyStyle(gatewayPolygon, businessObject);
gaService.setLocationAndSize(gatewayPolygon, 0, 0, width, height);
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
// hook for subclasses to inject extra code
@@ -82,6 +88,7 @@ public class AddGatewayFeature<T extends Gateway>
splitConnection(context, containerShape);
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java
layoutPictogramElement(containerShape);
// Use context for labeling!
@@ -89,17 +96,8 @@ public class AddGatewayFeature<T extends Gateway>
IFeatureContainer fc = new LabelFeatureContainer();
fc.getAddFeature(getFeatureProvider()).add(context);
+=======
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/AddGatewayFeature.java
return containerShape;
}
-
- @Override
- public int getHeight() {
- return GraphicsUtil.getGatewaySize(this.getDiagram()).getHeight();
- }
-
- @Override
- public int getWidth() {
- return GraphicsUtil.getGatewaySize(this.getDiagram()).getWidth();
- }
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/GatewaySelectionBehavior.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/GatewaySelectionBehavior.java
new file mode 100644
index 00000000..e0168cd0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/gateway/GatewaySelectionBehavior.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.gateway;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class GatewaySelectionBehavior.
+ */
+public class GatewaySelectionBehavior {
+
+ /**
+ * Can apply to.
+ *
+ * @param element the element
+ * @return true, if successful
+ */
+ public static boolean canApplyTo(PictogramElement element) {
+ if (element.getLink() == null || !(element instanceof ContainerShape) || FeatureSupport.isLabelShape(element)) {
+ return false;
+ }
+
+ EList<EObject> objects = element.getLink().getBusinessObjects();
+
+ for (EObject eObject : objects) {
+ if (eObject instanceof Activity) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Gets the click area.
+ *
+ * @param element the element
+ * @return the click area
+ */
+ public static GraphicsAlgorithm[] getClickArea(PictogramElement element) {
+ Collection<PictogramElement> children = Graphiti.getPeService().getPictogramElementChildren(element);
+ PictogramElement first = children.iterator().next();
+ return new GraphicsAlgorithm[] { first.getGraphicsAlgorithm() };
+ }
+
+ /**
+ * Gets the selection border.
+ *
+ * @param element the element
+ * @return the selection border
+ */
+ public static GraphicsAlgorithm getSelectionBorder(PictogramElement element) {
+ Collection<PictogramElement> children = Graphiti.getPeService().getPictogramElementChildren(element);
+ PictogramElement first = children.iterator().next();
+ return first.getGraphicsAlgorithm();
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AbstractAddLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AbstractAddLabelFeature.java
new file mode 100644
index 00000000..3d775e61
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AbstractAddLabelFeature.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.features.impl.AbstractAddPictogramElementFeature;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+
+/**
+ *
+ */
+abstract public class AbstractAddLabelFeature extends AbstractAddPictogramElementFeature {
+
+ protected final static IGaService gaService = Graphiti.getGaService();
+ protected final static IPeService peService = Graphiti.getPeService();
+
+ /**
+ * @param fp
+ */
+ public AbstractAddLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return true;
+ }
+
+ abstract public PictogramElement add(IAddContext context);
+
+ protected AbstractText createText(PictogramElement labelOwner, Shape labelShape, BaseElement businessObject) {
+ // the actual text will be set into the Text GA during the initial update()
+ // which is done immediately after the add()
+ AbstractText text = createText(labelShape, ""); //$NON-NLS-1$
+ applyStyle(text, businessObject);
+ peService.setPropertyValue(labelShape, GraphitiConstants.LABEL_SHAPE, Boolean.toString(true));
+
+ link(labelShape, new Object[] {businessObject, labelOwner});
+ link(labelOwner, new Object[] {labelShape});
+
+ return text;
+ }
+
+ protected AbstractText createText(Shape labelShape, String labelText) {
+ return gaService.createDefaultMultiText(getDiagram(), labelShape, labelText);
+ }
+
+ public String getLabelString(BaseElement element) {
+ return ModelUtil.getName(element);
+ }
+
+ public void applyStyle(AbstractText text, BaseElement be) {
+ StyleUtil.applyStyle(text, be);
+ text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
+ text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
+ }
+
+ protected PictogramElement getLabelOwner(IAddContext context) {
+ return FeatureSupport.getLabelOwner(context);
+ }
+
+ public IReason updatePictogramElement(IAddContext addContext, PictogramElement pe) {
+ UpdateContext updateContext = new UpdateContext(pe);
+ for (Object key : addContext.getPropertyKeys()) {
+ Object value = addContext.getProperty(key);
+ updateContext.putProperty(key, value);
+ }
+ return getFeatureProvider().updateIfPossible(updateContext);
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddConnectionLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddConnectionLabelFeature.java
new file mode 100644
index 00000000..649e61dd
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddConnectionLabelFeature.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+/**
+ * Add a Label for a Connection. This Add Feature class must be invoked from a {@link org.eclipse.bpmn2.modeler.core.features.MultiAddFeature}
+ * immediately following the Add Feature that creates the Connection.
+ */
+public class AddConnectionLabelFeature extends AbstractAddLabelFeature {
+
+ /**
+ * @param fp
+ */
+ public AddConnectionLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.label.AbstractAddLabelFeature#add(org.eclipse.graphiti.features.context.IAddContext)
+ */
+ @Override
+ public PictogramElement add(IAddContext context) {
+ ConnectionDecorator labelShape = null;
+
+ BaseElement businessObject = (BaseElement) context.getNewObject();
+ PictogramElement labelOwner = FeatureSupport.getLabelOwner(context);
+ if (labelOwner instanceof Connection) {
+ labelShape = peService.createConnectionDecorator((Connection)labelOwner, true, 0.5, true);
+ createText(labelOwner, labelShape, businessObject);
+ }
+ return labelShape;
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddShapeLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddShapeLabelFeature.java
new file mode 100644
index 00000000..981cbcc6
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/AddShapeLabelFeature.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+public class AddShapeLabelFeature extends AbstractAddLabelFeature {
+
+ public AddShapeLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return true;
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ Shape labelShape = null;
+
+ BaseElement businessObject = (BaseElement) context.getNewObject();
+ ContainerShape targetContainer = getTargetContainer(context);
+ PictogramElement labelOwner = getLabelOwner(context);
+ if (labelOwner instanceof ContainerShape) {
+ labelShape = peService.createShape(targetContainer, true);
+ createText(labelOwner, labelShape, businessObject);
+ }
+
+ // force an update of the label
+ updatePictogramElement(context, labelShape);
+
+ return labelShape;
+ }
+
+ /**
+ * Get the correct target container for the label shape.
+ *
+ * @param context
+ * @return the target container for the current context
+ */
+ protected ContainerShape getTargetContainer(IAddContext context) {
+ return getFeatureProvider().getDiagramTypeProvider().getDiagram();
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LabelFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LabelFeatureContainer.java
index 81415cd1..c9f1eec9 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LabelFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LabelFeatureContainer.java
@@ -10,17 +10,9 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.label;
-import org.eclipse.bpmn2.DataInput;
-import org.eclipse.bpmn2.DataObject;
-import org.eclipse.bpmn2.DataObjectReference;
-import org.eclipse.bpmn2.DataOutput;
-import org.eclipse.bpmn2.DataStore;
-import org.eclipse.bpmn2.DataStoreReference;
-import org.eclipse.bpmn2.Event;
-import org.eclipse.bpmn2.Gateway;
-import org.eclipse.bpmn2.Message;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.modeler.core.features.DirectEditBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.IConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
@@ -32,6 +24,7 @@ import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveConnectionDecoratorFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IReconnectionFeature;
import org.eclipse.graphiti.features.IRemoveFeature;
@@ -39,19 +32,27 @@ import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.context.IMoveConnectionDecoratorContext;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
import org.eclipse.graphiti.features.context.IPictogramElementContext;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
-import org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature;
+import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
public class LabelFeatureContainer implements IShapeFeatureContainer, IConnectionFeatureContainer {
+ public static final String LINE_BREAK = "\n"; //$NON-NLS-1$
+ public static final int LABEL_MARGIN = 6;
+ public static final int TEXT_PADDING = 5;
+
@Override
public Object getApplyObject(IContext context) {
if (context instanceof IAddContext) {
- if (context.getProperty(ContextConstants.LABEL_CONTEXT) != null
- && (Boolean) context.getProperty(ContextConstants.LABEL_CONTEXT) == true) {
+ if (context.getProperty(GraphitiConstants.PICTOGRAM_ELEMENTS) != null)
+ {
IAddContext addContext = (IAddContext) context;
return addContext.getNewObject();
}
@@ -60,28 +61,30 @@ public class LabelFeatureContainer implements IShapeFeatureContainer, IConnectio
IPictogramElementContext peContext = (IPictogramElementContext) context;
PictogramElement pe = peContext.getPictogramElement();
if (pe instanceof Shape) {
- if (FeatureSupport.isLabelShape((Shape)pe))
+ if (FeatureSupport.isLabelShape(pe))
return BusinessObjectUtil.getBusinessObjectForPictogramElement(pe);
pe = ((Shape) pe).getContainer();
- if (FeatureSupport.isLabelShape((Shape)pe))
+ if (FeatureSupport.isLabelShape(pe))
return BusinessObjectUtil.getBusinessObjectForPictogramElement(pe);
}
}
+ else if (context instanceof IMoveConnectionDecoratorContext) {
+ IMoveConnectionDecoratorContext mcdContext = (IMoveConnectionDecoratorContext) context;
+ PictogramElement pe = mcdContext.getConnectionDecorator();
+ if (FeatureSupport.isLabelShape(pe))
+ return BusinessObjectUtil.getBusinessObjectForPictogramElement(pe);
+ }
+ else if (context instanceof ICustomContext) {
+ PictogramElement[] pes = ((ICustomContext) context).getPictogramElements();
+ if (pes.length==1 && FeatureSupport.isLabelShape(pes[0]))
+ return BusinessObjectUtil.getFirstElementOfType(pes[0], BaseElement.class);
+ }
return null;
}
@Override
public boolean canApplyTo(Object o) {
- // these all have Label features
- return o instanceof Gateway ||
- o instanceof Event ||
- o instanceof Message ||
- o instanceof DataInput ||
- o instanceof DataOutput ||
- o instanceof DataObject ||
- o instanceof DataObjectReference ||
- o instanceof DataStore ||
- o instanceof DataStoreReference;
+ return true;
}
@Override
@@ -101,7 +104,7 @@ public class LabelFeatureContainer implements IShapeFeatureContainer, IConnectio
@Override
public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddLabelFeature(fp);
+ return new AddShapeLabelFeature(fp);
}
@Override
@@ -126,12 +129,30 @@ public class LabelFeatureContainer implements IShapeFeatureContainer, IConnectio
@Override
public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
- return new MoveLabelFeature(fp);
+ return new MoveShapeLabelFeature(fp) {
+
+ @Override
+ public boolean canMoveShape(IMoveShapeContext context) {
+ return false;
+ }
+
+ };
+ }
+
+ @Override
+ public IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IFeatureProvider fp) {
+ return new MoveConnectionLabelFeature(fp);
}
@Override
public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
- return null;
+ return new DefaultResizeShapeFeature(fp) {
+
+ @Override
+ public boolean canResizeShape(IResizeShapeContext context) {
+ return false;
+ }
+ };
}
@Override
@@ -146,7 +167,6 @@ public class LabelFeatureContainer implements IShapeFeatureContainer, IConnectio
@Override
public IReconnectionFeature getReconnectionFeature(IFeatureProvider fp) {
- // TODO Auto-generated method stub
return null;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java
new file mode 100644
index 00000000..8f7b5951
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/LayoutLabelFeature.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
+import org.eclipse.graphiti.features.impl.AbstractLayoutFeature;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+public class LayoutLabelFeature extends AbstractLayoutFeature {
+
+ public LayoutLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canLayout(ILayoutContext context) {
+ return true;
+ }
+
+ @Override
+ public boolean layout(ILayoutContext context) {
+// PictogramElement pictogramElement = context.getPictogramElement();
+// SubProcess subProcess = BusinessObjectUtil.getFirstElementOfType(pictogramElement, SubProcess.class);
+// if (subProcess!=null && pictogramElement instanceof ContainerShape) {
+// try {
+// ContainerShape containerShape = (ContainerShape)pictogramElement;
+// BPMNShape shape = DIUtils.findBPMNShape(subProcess);
+//
+// if (shape.isIsExpanded()) {
+//
+// // SubProcess is expanded
+//
+// boolean needResize = false;
+// GraphicsAlgorithm parentGa = containerShape.getGraphicsAlgorithm();
+//
+// for (PictogramElement pe : FeatureSupport.getContainerChildren(containerShape)) {
+// GraphicsAlgorithm ga = pe.getGraphicsAlgorithm();
+// if (ga!=null) {
+// if (ga.getX() < 0 || ga.getY() < 0) {
+// needResize = true;
+// break;
+// }
+// if (ga.getX() + ga.getWidth() > parentGa.getWidth()) {
+// needResize = true;
+// break;
+// }
+// if (ga.getY() + ga.getHeight() > parentGa.getHeight()) {
+// needResize = true;
+// break;
+// }
+// }
+// }
+// if (needResize) {
+// ResizeShapeContext resizeContext = new ResizeShapeContext(containerShape);
+// resizeContext.setX(parentGa.getX());
+// resizeContext.setY(parentGa.getY());
+// resizeContext.setWidth(parentGa.getWidth());
+// resizeContext.setHeight(parentGa.getHeight());
+// IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(resizeContext);
+// resizeFeature.resizeShape(resizeContext);
+// }
+//
+// FeatureSupport.setContainerChildrenVisible(containerShape, true);
+// }
+// else {
+//
+// // SubProcess is collapsed
+//
+// FeatureSupport.setContainerChildrenVisible(containerShape, false);
+// }
+//
+// } catch (Exception e) {
+// // It's OK, I've played a programmer before...
+// // e.printStackTrace();
+// }
+// }
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java
new file mode 100644
index 00000000..86714ff4
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/Messages.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.features.label.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+
+ public static String UpdateLabelFeature_TextChanged;
+ public static String UpdateLabelFeature_LocationChanged;
+ public static String UpdateLabelFeature_LabelChanged;
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveConnectionLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveConnectionLabelFeature.java
new file mode 100644
index 00000000..404e8f78
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveConnectionLabelFeature.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IMoveConnectionDecoratorContext;
+import org.eclipse.graphiti.features.impl.DefaultMoveConnectionDecoratorFeature;
+
+/**
+ *
+ */
+public class MoveConnectionLabelFeature extends DefaultMoveConnectionDecoratorFeature {
+
+ /**
+ * @param fp
+ */
+ public MoveConnectionLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canMoveConnectionDecorator(IMoveConnectionDecoratorContext context) {
+ return true;
+ }
+
+ @Override
+ public void moveConnectionDecorator(IMoveConnectionDecoratorContext context) {
+ super.moveConnectionDecorator(context);
+ FeatureSupport.updateLabel(
+ getFeatureProvider(),
+ context.getConnectionDecorator().getConnection(),
+ null);
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveShapeLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveShapeLabelFeature.java
new file mode 100644
index 00000000..4512292c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/MoveShapeLabelFeature.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.features.context.impl.MoveShapeContext;
+import org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+public class MoveShapeLabelFeature extends DefaultMoveShapeFeature {
+
+ public MoveShapeLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canMoveShape(IMoveShapeContext context) {
+ return super.canMoveShape(context);
+ }
+
+ @Override
+ public void moveShape(IMoveShapeContext context) {
+ // if this Label Shape is part of a multiselection, and if its owner is included
+ // in that multiselection, then do not move the label. Moving the label is
+ // already handled by the label's owner.
+ PictogramElement pes[] = getFeatureProvider().getDiagramTypeProvider().
+ getDiagramBehavior().getDiagramContainer().getSelectedPictogramElements();
+ Shape labelShape = context.getShape();
+ for (PictogramElement pe : pes) {
+ ContainerShape s = BusinessObjectUtil.getFirstElementOfType(pe, ContainerShape.class);
+ if (s==labelShape)
+ return;
+ }
+
+ // If the label location relative to its shape is fixed (i.e. not "MOVABLE")
+ // then move the owning shape so that it follows the label's move.
+ ContainerShape elementShape = BusinessObjectUtil.getFirstElementOfType(labelShape, ContainerShape.class);
+ BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(elementShape, BaseElement.class);
+ ShapeStyle ss = ShapeStyle.getShapeStyle(element);
+ if (ss.getLabelPosition() != LabelPosition.MOVABLE) {
+ GraphicsAlgorithm elementGA = elementShape.getGraphicsAlgorithm();
+ MoveShapeContext newContext = new MoveShapeContext(elementShape);
+ newContext.setDeltaX(context.getDeltaX());
+ newContext.setDeltaY(context.getDeltaY());
+ newContext.setX(elementGA.getX() + context.getDeltaX());
+ newContext.setY(elementGA.getY() + context.getDeltaY());
+ newContext.setSourceContainer(context.getSourceContainer());
+ newContext.setTargetContainer(context.getTargetContainer());
+ IMoveShapeFeature f = getFeatureProvider().getMoveShapeFeature(newContext);
+ f.moveShape(newContext);
+ }
+
+ // Now move the label itself
+ super.moveShape(context);
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/RemoveLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/RemoveLabelFeature.java
index f87090ba..0c8e1147 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/RemoveLabelFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/RemoveLabelFeature.java
@@ -10,8 +10,8 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.features.label;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IRemoveContext;
import org.eclipse.graphiti.features.context.impl.RemoveContext;
@@ -30,7 +30,7 @@ public class RemoveLabelFeature extends DefaultRemoveFeature {
public void preRemove(IRemoveContext context) {
PictogramElement removedElement = context.getPictogramElement();
ContainerShape labelShape = BusinessObjectUtil.getFirstElementOfType(removedElement, ContainerShape.class);
- if (labelShape!=null && Graphiti.getPeService().getPropertyValue(labelShape, GraphicsUtil.LABEL_PROPERTY) != null) {
+ if (labelShape!=null && Graphiti.getPeService().getPropertyValue(labelShape, GraphitiConstants.LABEL_SHAPE) != null) {
// this is the label ContainerShape that belongs to the PE being removed
RemoveContext removeContext = new RemoveContext(labelShape);
super.remove(removeContext);
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java
new file mode 100644
index 00000000..7c3c5e18
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/UpdateLabelFeature.java
@@ -0,0 +1,463 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Ivar Meikas
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.features.label;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.DataState;
+import org.eclipse.bpmn2.ItemAwareElement;
+import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNLabel;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.graphiti.datatypes.IDimension;
+import org.eclipse.graphiti.datatypes.ILocation;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.algorithms.styles.Font;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.ui.services.GraphitiUi;
+import org.eclipse.graphiti.ui.services.IUiLayoutService;
+
+public class UpdateLabelFeature extends AbstractBpmn2UpdateFeature {
+
+ public UpdateLabelFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
+ if (bo instanceof BaseElement) {
+ return hasLabel((BaseElement)bo);
+ }
+ return false;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ PictogramElement ownerPE = FeatureSupport.getLabelOwner(context);
+
+ BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(ownerPE, BaseElement.class);
+
+ Shape labelShape = FeatureSupport.getLabelShape(ownerPE);
+ if (labelShape != null) {
+
+ if (Graphiti.getPeService().getPropertyValue(labelShape, GraphitiConstants.LABEL_CHANGED) != null) {
+ return Reason.createTrueReason(Messages.UpdateLabelFeature_LabelChanged);
+ }
+
+ String newLabel = getLabelString(element);
+ if (newLabel == null || newLabel.isEmpty())
+ newLabel = ""; //$NON-NLS-1$
+ AbstractText text = (AbstractText) labelShape.getGraphicsAlgorithm();
+ String oldLabel = text.getValue();
+ if (oldLabel == null || oldLabel.isEmpty())
+ oldLabel = ""; //$NON-NLS-1$
+
+ if (!newLabel.equals(oldLabel))
+ return Reason.createTrueReason(Messages.UpdateLabelFeature_TextChanged);
+
+ }
+ return Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(context);
+ Point offset = (Point) context.getProperty(GraphitiConstants.LABEL_OFFSET);
+ boolean isAdding = isAddingLabel(context);
+ adjustLabelLocation(pe, isAdding, offset);
+ return true;
+ }
+
+ protected boolean isAddingLabel(IContext context) {
+ return context.getProperty(GraphitiConstants.PICTOGRAM_ELEMENTS) != null
+ || context.getProperty(GraphitiConstants.PICTOGRAM_ELEMENT) != null
+ || context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ }
+
+ protected boolean hasLabel(BaseElement element) {
+ return ModelUtil.hasName(element);
+ }
+
+ protected String getLabelString(BaseElement element) {
+ /*
+ * Unfortunately this needs to be aware of ItemAwareElements, which have
+ * a Data State (the Data State needs to appear below the element's
+ * label in []) The UpdateLabelFeature is checked in
+ * BPMN2FeatureProvider AFTER the Update Feature for Data Objects is
+ * executed - this wipes out the Label provided by
+ * ItemAwareElementUpdateFeature.
+ */
+ String label = ModelUtil.getName(element);
+ if (element instanceof ItemAwareElement) {
+ DataState state = ((ItemAwareElement) element).getDataState();
+ if (state != null && state.getName() != null) {
+ return label + "\n[" + state.getName() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ return label;
+ }
+
+ protected int getLabelWrapWidth(PictogramElement ownerPE) {
+ int w = GraphicsUtil.calculateSize(ownerPE).getWidth();
+ return w>=80 ? w : 80;
+ }
+
+ protected int[] wrapText(AbstractText ga, String text, int wrapWidth) {
+ Font font = ga.getFont();
+ List<String> ss = new ArrayList<String>();
+ int start = 0;
+ for (int end=0; end<text.length(); ++end) {
+ char c = text.charAt(end);
+ if (c==' ') {
+ ss.add(text.substring(start, end+1));
+ start = end+1;
+ }
+ else if (c=='\n') {
+ ss.add(text.substring(start, end+1));
+ start = end+1;
+ }
+ }
+ if (start<text.length())
+ ss.add(text.substring(start));
+ String words[] = ss.toArray(new String[ss.size()]);
+ IDimension dim = calculateTextSize(text, font);
+ int totalHeight = dim.getHeight();
+ int totalWidth = dim.getWidth();
+ int height = totalHeight;
+ int width = 0;
+ String line = "";
+ String nextword = "";
+ for (int i=0; i<words.length; ++i) {
+ line += words[i];
+ if (i<words.length-1)
+ nextword = words[i+1];
+ else
+ nextword = "";
+ dim = calculateTextSize(line + nextword, font);
+ if (dim.getWidth()>wrapWidth) {
+ height += dim.getHeight();
+ dim = calculateTextSize(line, font);
+ if (dim.getWidth()>width)
+ width = dim.getWidth();
+ line = "";
+ }
+ else if (dim.getWidth()>width)
+ width = dim.getWidth();
+ }
+ if (width==0)
+ width = totalWidth;
+ return new int[] {height, width};
+ }
+
+ private IDimension calculateTextSize(String text, Font font) {
+ IDimension dim = GraphitiUi.getUiLayoutService().calculateTextSize(text, font);
+ if (text.endsWith("\n"))
+ dim.setHeight(2*dim.getHeight());
+ return dim;
+ }
+
+ protected Rectangle getLabelBounds(PictogramElement pe, boolean isAddingLabel, Point offset) {
+
+ PictogramElement ownerPE = FeatureSupport.getLabelOwner(pe);
+ Shape labelShape = FeatureSupport.getLabelShape(pe);
+ if (labelShape != null) {
+ AbstractText labelGA = (AbstractText) labelShape.getGraphicsAlgorithm();
+ BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(ownerPE, BaseElement.class);
+ String text = getLabelString(element);
+ if (text == null) {
+ text = ""; //$NON-NLS-1$
+ }
+
+ // Get the absolute location of the owner. If the owner is a
+ // Connection use the Connection midpoint.
+ ILocation ownerLoc = ownerPE instanceof Connection ? Graphiti.getPeLayoutService().getConnectionMidpoint(
+ (Connection) ownerPE, 0.5) : Graphiti.getPeService().getLocationRelativeToDiagram((Shape) ownerPE);
+ IDimension ownerSize = GraphicsUtil.calculateSize(ownerPE);
+ ILocation labelLoc = Graphiti.getPeService().getLocationRelativeToDiagram(labelShape);
+ int x = 0;
+ int y = 0;
+ int w = getLabelWidth(labelGA);
+ int h = getLabelHeight(labelGA);
+ int wrapWidth = getLabelWrapWidth(ownerPE);
+ if (wrapWidth>0 && w > wrapWidth) {
+ int hw[] = wrapText(labelGA, text, wrapWidth);
+ h = hw[0];
+ w = hw[1];
+ }
+
+ LabelPosition hpos = getHorizontalLabelPosition(labelGA);
+ LabelPosition vpos = getVerticalLabelPosition(labelGA);
+
+ if (isAddingLabel) {
+ BPMNLabel bpmnLabel = null;
+ if (ownerPE instanceof Connection) {
+ BPMNEdge bpmnEdge = DIUtils.findBPMNEdge(element);
+ if (bpmnEdge!=null)
+ bpmnLabel = bpmnEdge.getLabel();
+ } else {
+ BPMNShape bpmnShape = DIUtils.findBPMNShape(element);
+ if (bpmnShape!=null)
+ bpmnLabel = bpmnShape.getLabel();
+ }
+ Bounds bounds = bpmnLabel == null ? null : bpmnLabel.getBounds();
+
+ if (bounds == null) {
+ /*
+ * The edge or shape does not have a BPMNLabel so treat the
+ * label normally, that is adjust its location according to
+ * the User Preferences. In this case force the relative
+ * location of the label to be below the shape or connection
+ * in case User Preferences allow labels to be moved
+ * manually.
+ */
+ isAddingLabel = false;
+ if (hpos == LabelPosition.MOVABLE) {
+ vpos = hpos = LabelPosition.SOUTH;
+ }
+ } else {
+ int bw = (int) bounds.getWidth();
+ int bh = (int) bounds.getHeight();
+ /*
+ * The size provided in BPMNLabel for this Label shape is
+ * not sufficient to hold all of the text at the selected
+ * Font. Recalculate the Label bounds using the selected
+ * preferences.
+ */
+ if (bw < w || bh < h) {
+ isAddingLabel = false;
+ }
+ else {
+ x = (int) bounds.getX();
+ y = (int) bounds.getY();
+ w = bw;
+ h = bh;
+ }
+ }
+ }
+
+ if (!isAddingLabel && !text.isEmpty()) {
+ // calculate X coordinate
+ switch (hpos) {
+ case NORTH:
+ case SOUTH:
+ case TOP:
+ case CENTER:
+ case BOTTOM:
+ // X coordinate for these positions are all the same
+ x = ownerLoc.getX() + (ownerSize.getWidth() - w)/2;
+ break;
+ case WEST:
+ x = ownerLoc.getX() - w - LabelFeatureContainer.LABEL_MARGIN;
+ break;
+ case EAST:
+ x = ownerLoc.getX() + ownerSize.getWidth() + LabelFeatureContainer.LABEL_MARGIN;
+ break;
+ case LEFT:
+ x = ownerLoc.getX() + LabelFeatureContainer.LABEL_MARGIN;
+ break;
+ case RIGHT:
+ x = ownerLoc.getX() + ownerSize.getWidth() - w - LabelFeatureContainer.LABEL_MARGIN;
+ break;
+ case MOVABLE:
+ x = (int) labelLoc.getX();
+ y = (int) labelLoc.getY();
+ if (offset != null) {
+ x += offset.getX();
+ y += offset.getY();
+ }
+ break;
+ }
+
+ // calculate Y coordinate
+ switch (vpos) {
+ case NORTH:
+ y = ownerLoc.getY() - h - LabelFeatureContainer.LABEL_MARGIN/2;
+ break;
+ case SOUTH:
+ y = ownerLoc.getY() + ownerSize.getHeight();
+ break;
+ case TOP:
+ y = ownerLoc.getY() + LabelFeatureContainer.LABEL_MARGIN / 2;
+ break;
+ case CENTER:
+ y = ownerLoc.getY() + (ownerSize.getHeight() - h)/2;
+ break;
+ case BOTTOM:
+ y = ownerLoc.getY() + ownerSize.getHeight() - h - LabelFeatureContainer.LABEL_MARGIN / 2;
+ break;
+ case WEST:
+ case EAST:
+ case LEFT:
+ case RIGHT:
+ // Y coordinate for these positions are all the same
+ y = ownerLoc.getY() + (ownerSize.getHeight() - h)/2;
+ break;
+ case MOVABLE:
+ break;
+ }
+ }
+ if (ownerPE instanceof Connection) {
+ x -= ownerLoc.getX();
+ y -= ownerLoc.getY();
+ }
+
+ return new Rectangle(x,y,w,h);
+ }
+
+ return null;
+ }
+
+ protected void adjustLabelLocation(PictogramElement pe, boolean isAddingLabel, Point offset) {
+
+ PictogramElement ownerPE = FeatureSupport.getLabelOwner(pe);
+ Shape labelShape = FeatureSupport.getLabelShape(pe);
+ if (labelShape != null) {
+ AbstractText labelGA = (AbstractText) labelShape.getGraphicsAlgorithm();
+ BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
+ String text = getLabelString(element);
+ if (text == null) {
+ text = ""; //$NON-NLS-1$
+ }
+ if (!text.equals(labelGA.getValue()))
+ labelGA.setValue(text);
+
+ Rectangle bounds = getLabelBounds(labelShape, isAddingLabel, offset);
+ int x = bounds.x;
+ int y = bounds.y;
+ int w = bounds.width;
+ int h = bounds.height;
+ // move and resize the label shape and set the new size of the Text GA
+ // make sure the label shape is a child of the same ContainerShape
+ // as its owner.
+ if (!(ownerPE instanceof Connection)) {
+ // this is only valid if the owner is not a Connection;
+ // Connection labels are always contained in the Diagram
+ // just like the Connection itself.
+ ContainerShape container = getTargetContainer(ownerPE);
+ if (labelShape.eContainer() != container) {
+ container.getChildren().add(labelShape);
+ }
+ }
+ GraphicsUtil.setLocationRelativeToDiagram(labelShape, x, y);
+ Graphiti.getGaService().setSize(labelGA, w, h);
+ if (ownerPE instanceof Shape) {
+ // Note that it's not necessary to send Connection Labels
+ // to the front because they are children of Connections
+ // which are in the Connection Layer, which is always on
+ // top of the Figure Layer.
+ Graphiti.getPeService().sendToFront(labelShape);
+ }
+
+ // if the label is owned by a connection, its location will always be
+ // relative to the connection midpoint so we have to get the absolute
+ // location for the BPMNLabel coordinates.
+ ILocation absloc = Graphiti.getPeService().getLocationRelativeToDiagram(labelShape);
+ DIUtils.updateDILabel(ownerPE, absloc.getX(), absloc.getY(), w, h);
+ labelShape.setVisible(!text.isEmpty());
+ Graphiti.getPeService().removeProperty(labelShape, GraphitiConstants.LABEL_CHANGED);
+ }
+ }
+
+ protected ContainerShape getTargetContainer(PictogramElement ownerPE) {
+ return (ContainerShape) ownerPE.eContainer();
+ }
+
+ protected int getLabelWidth(AbstractText text) {
+ return getLabelSize(text).width;
+ }
+
+ protected int getLabelHeight(AbstractText text) {
+ return getLabelSize(text).height;
+ }
+
+ protected Dimension getLabelSize(AbstractText text) {
+ int width = 0;
+ int height = 0;
+ if (text.getValue() != null && !text.getValue().isEmpty()) {
+ String[] strings = text.getValue().split(LabelFeatureContainer.LINE_BREAK);
+ for (String string : strings) {
+ IDimension dim = GraphitiUi.getUiLayoutService().calculateTextSize(string, text.getFont());
+ if (dim.getWidth() > width) {
+ width = dim.getWidth();
+ }
+ height += dim.getHeight();
+ }
+ }
+ // TODO: the zoom level influences the effective font size which determines the text extents.
+ // Need to figure this stuff out because labels are truncated at high zoom levels.
+ // The org.eclipse.graphiti.ui.internal.parts.directedit.GFDirectEditManager#updateScaledFont()
+ // does this for SWT Text widgets.
+// GraphicalViewer viewer = (GraphicalViewer) ((IAdaptable)getDiagramEditor()).getAdapter(GraphicalViewer.class);
+// ZoomManager zoomMgr = (ZoomManager) viewer.getProperty(ZoomManager.class.toString());
+// if (zoomMgr!=null) {
+// width = (int)(width * zoomMgr.getZoom());
+// height = (int)(height * zoomMgr.getZoom());
+// }
+ return new Dimension(width, height);
+ }
+
+ /**
+ * Get the position of the label relative to its owning figure for the given
+ * BaseElement as defined in the User Preferences.
+ *
+ * Overrides will provide their own relative positions for, e.g. Tasks and
+ * TextAnnotations.
+ * @param text the BaseElement that is represented by the graphical
+ * figure.
+ *
+ * @return a ShapeStyle LabelPosition relative location indicator.
+ */
+ protected LabelPosition getLabelPosition(AbstractText text) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(text);
+ BaseElement element = BusinessObjectUtil.getFirstBaseElement(pe);
+ ShapeStyle ss = ShapeStyle.getShapeStyle(element);
+ return ss.getLabelPosition();
+ }
+
+ protected LabelPosition getHorizontalLabelPosition(AbstractText text) {
+ return getLabelPosition(text);
+ }
+
+ protected LabelPosition getVerticalLabelPosition(AbstractText text) {
+ return getLabelPosition(text);
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties
new file mode 100644
index 00000000..8462af01
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/label/messages.properties
@@ -0,0 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+UpdateLabelFeature_TextChanged=Label text changed
+UpdateLabelFeature_LocationChanged=Label location changed
+UpdateLabelFeature_LabelChanged=Label changed \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties
new file mode 100644
index 00000000..3c8718e3
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/messages.properties
@@ -0,0 +1,25 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+AbstractBpmn2CreateConnectionFeature_Create=Create {0}
+AbstractBpmn2CreateFeature_Create=Create {0}
+AbstractUpdateBaseElementFeature_Name=Name out of date
+BPMNDiagramFeatureContainer_Disable_Enable_Description=
+BPMNDiagramFeatureContainer_Disable_Name=Disable automatic Connection Routing
+BPMNDiagramFeatureContainer_Enable_Name=Enable automatic Connection Routing
+BPMNDiagramFeatureContainer_Reroute_All_Description=Re-route all connections in the current diagram using the selected routing strategy
+BPMNDiagramFeatureContainer_Reroute_All_Name=Re-route all Connections
+ShowDocumentationFeature_Documentation_Title=Documentation
+ShowPropertiesFeature_Name=Show Properties
+ShowPropertiesFeature_Title=Display a Property configuration popup dialog for the selected item
+CustomElementFeatureContainer_Create=Create {0}
+CustomElementFeatureContainer_Description=Create Custom Element
+CustomShapeFeatureContainer_Description=Custom Shape
+CustomConnectionFeatureContainer_Description=Custom Connection
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/DefaultBusinessObjectDelegate.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/DefaultBusinessObjectDelegate.java
new file mode 100644
index 00000000..c8683c38
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/DefaultBusinessObjectDelegate.java
@@ -0,0 +1,250 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.merrimac;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.utils.DiagramEditorAdapter;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.graphiti.ui.editor.DiagramEditor;
+
+/**
+ * Default implementation for accessing Business Objects in the merrimac UI package.
+ */
+public class DefaultBusinessObjectDelegate implements IBusinessObjectDelegate {
+
+ TransactionalEditingDomain editingDomain;
+ TargetRuntime targetRuntime;
+
+ public DefaultBusinessObjectDelegate(TransactionalEditingDomain editingDomain) {
+ Assert.isNotNull(editingDomain);
+ this.editingDomain = editingDomain;
+ }
+
+ @Override
+ public EObject createObject(EClass eClass) {
+ String type = eClass.getName();
+ for (ModelExtensionDescriptor d : getTargetRuntime().getModelExtensionDescriptors()) {
+ EClass ec = d.getModelDecorator().getEClass(type);
+ if (ec!=null) {
+ EObject object = d.createObject(eClass);
+ return object;
+ }
+ }
+
+ EClassifier eClassifier = ModelDecorator.findEClassifier(null, eClass.getName());
+ if (eClassifier instanceof EClass) {
+ // the EClass is in one of the standard BPMN2 packages or the EcorePackage.
+ return eClassifier.getEPackage().getEFactoryInstance().create((EClass)eClassifier);
+ }
+ return null;
+ }
+
+ public EObject createFeature(EObject object, EStructuralFeature feature) {
+ EClass eClass = (EClass) feature.getEType();
+ String type = eClass.getName();
+ EObject value = null;
+ for (ModelExtensionDescriptor d : getTargetRuntime().getModelExtensionDescriptors()) {
+ EClass ec = d.getModelDecorator().getEClass(type);
+ if (ec!=null) {
+ value = d.createObject(eClass);
+ d.adaptObject(object);
+ }
+ }
+ if (value==null) {
+ EClassifier eClassifier = ModelDecorator.findEClassifier(null, eClass.getName());
+ if (eClassifier instanceof EClass) {
+ // the EClass is in one of the standard BPMN2 packages or the EcorePackage.
+ value = eClassifier.getEPackage().getEFactoryInstance().create((EClass)eClassifier);
+ }
+ }
+ return value;
+ }
+
+ @Override
+ public <T extends EObject> T createObject(Class clazz) {
+ EClass eClass = (EClass) Bpmn2Package.eINSTANCE.getEClassifier(clazz.getSimpleName());
+ if (eClass!=null) {
+ return (T)Bpmn2ModelerFactory.eINSTANCE.create(eClass);
+ }
+ return null;
+ }
+
+ @Override
+ public String getTextValue(EObject object) {
+ return ExtendedPropertiesProvider.getTextValue(object);
+ }
+
+ @Override
+ public boolean setTextValue(EObject object, String value) {
+ return ExtendedPropertiesProvider.setTextValue(object, value);
+ }
+
+ @Override
+ public String getLabel(EObject object) {
+ return ExtendedPropertiesProvider.getLabel(object);
+ }
+
+ @Override
+ public EStructuralFeature getFeature(EObject object, String name) {
+ EStructuralFeature feature = object.eClass().getEStructuralFeature(name);
+ if (feature==null) {
+ // maybe it's an extension feature?
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ feature = adapter.getFeature(name);
+ }
+ }
+ return feature;
+ }
+
+ @Override
+ public String getLabel(EObject object, EStructuralFeature feature) {
+// if (feature.getEType().getEPackage() != Bpmn2Package.eINSTANCE)
+ return ExtendedPropertiesProvider.getLabel(object, feature);
+// return ExtendedPropertiesProvider.getLabel(feature);
+ }
+
+ @Override
+ public Object getValue(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.getValue(object, feature);
+ }
+
+ @Override
+ public List<Object> getValueList(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.getValueList(object, feature);
+ }
+
+ @Override
+ public boolean setValue(EObject object, EStructuralFeature feature, Object value) {
+ return ExtendedPropertiesProvider.setValue(object, feature, value);
+ }
+
+ @Override
+ public Object getValue(EObject object, EStructuralFeature feature, int index) {
+ return ExtendedPropertiesProvider.getValue(object, feature, index);
+ }
+
+ @Override
+ public boolean setValue(EObject object, EStructuralFeature feature, Object value, int index) {
+ return ExtendedPropertiesProvider.setValue(object, feature, value, index);
+ }
+
+ @Override
+ public String getTextValue(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.getTextValue(object, feature);
+ }
+
+ @Override
+ public boolean setTextValue(EObject object, EStructuralFeature feature, String value) {
+ return ExtendedPropertiesProvider.setTextValue(object, value);
+ }
+
+ @Override
+ public boolean isList(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.isList(object,feature);
+ }
+
+ @Override
+ public boolean isAttribute(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.isAttribute(object,feature);
+ }
+
+ @Override
+ public boolean isReference(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.isReference(object,feature);
+ }
+
+ @Override
+ public boolean isMultiLineText(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.isMultiLineText(object,feature);
+ }
+
+ @Override
+ public boolean canEdit(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.canEdit(object,feature);
+ }
+
+ @Override
+ public boolean canCreateNew(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.canCreateNew(object,feature);
+ }
+
+ @Override
+ public boolean canEditInline(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.canEditInline(object,feature);
+ }
+
+ @Override
+ public boolean canSetNull(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.canSetNull(object,feature);
+ }
+
+ @Override
+ public boolean isContainmentFeature(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.isContainmentFeature(object,feature);
+ }
+
+ @Override
+ public boolean isMultiChoice(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.isMultiChoice(object, feature);
+ }
+
+ @Override
+ public Hashtable<String, Object> getChoiceOfValues(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.getChoiceOfValues(object, feature);
+ }
+
+ @Override
+ public EClassifier getEType(EObject object, EStructuralFeature feature) {
+ return ExtendedPropertiesProvider.getEType(object, feature);
+ }
+
+ private TargetRuntime getTargetRuntime() {
+ if (targetRuntime==null) {
+ targetRuntime = (TargetRuntime) getDiagramEditor().getAdapter(TargetRuntime.class);
+ }
+ return targetRuntime;
+ }
+
+ private DiagramEditor getDiagramEditor() {
+ if (editingDomain != null) {
+ for (Adapter a : editingDomain.getResourceSet().eAdapters()) {
+ if (a instanceof DiagramEditorAdapter) {
+ return ((DiagramEditorAdapter)a).getDiagramEditor();
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IBusinessObjectDelegate.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IBusinessObjectDelegate.java
new file mode 100644
index 00000000..4fdb076b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IBusinessObjectDelegate.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.merrimac;
+
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * An interface used by the merrimac package to access business objects.
+ * A default implementation exists that provides reasonable functionality
+ * for all UI widgets, but plugin developers may provide their own implementation.
+ */
+public interface IBusinessObjectDelegate {
+
+ // Object methods
+ public EObject createObject(EClass eClass);
+ public <T extends EObject> T createObject(Class clazz);
+ public EObject createFeature(EObject object, EStructuralFeature feature);
+
+ public String getTextValue(EObject object);
+ public boolean setTextValue(EObject object, String value);
+ public String getLabel(EObject object);
+
+ // Feature methods
+ public EStructuralFeature getFeature(EObject object, String name);
+ public String getLabel(EObject object, EStructuralFeature feature);
+
+ public Object getValue(EObject object, EStructuralFeature feature);
+ public List<Object> getValueList(EObject object, EStructuralFeature feature);
+ public boolean setValue(EObject object, EStructuralFeature feature, Object value);
+ public Object getValue(EObject object, EStructuralFeature feature, int index);
+ public boolean setValue(EObject object, EStructuralFeature feature, Object value, int index);
+
+ public String getTextValue(EObject object, EStructuralFeature feature);
+ public boolean setTextValue(EObject object, EStructuralFeature feature, String value);
+
+ // Feature flags and attributes
+ public boolean isList(EObject object, EStructuralFeature feature);
+ public boolean isAttribute(EObject object, EStructuralFeature feature);
+ public boolean isReference(EObject object, EStructuralFeature feature);
+ boolean isContainmentFeature(EObject object, EStructuralFeature feature);
+ public boolean isMultiLineText(EObject object, EStructuralFeature feature);
+ public boolean canEdit(EObject object, EStructuralFeature feature);
+ public boolean canCreateNew(EObject object, EStructuralFeature feature);
+ public boolean canEditInline(EObject object, EStructuralFeature feature);
+ public boolean canSetNull(EObject object, EStructuralFeature feature);
+ public boolean isMultiChoice(EObject object, EStructuralFeature feature);
+ public Hashtable<String, Object> getChoiceOfValues(EObject object, EStructuralFeature feature);
+ // TODO: do we need this?
+ public EClassifier getEType(EObject object, EStructuralFeature feature);
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IConstants.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IConstants.java
index 3c11e1a2..3c11e1a2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IConstants.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/IConstants.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java
index dacdad61..9f93fbbc 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractBpmn2PropertySection.java
@@ -148,7 +148,16 @@ public abstract class AbstractBpmn2PropertySection extends GFPropertySection imp
* @return the TabbedPropertySheetPage that owns this section.
*/
public TabbedPropertySheetPage getTabbedPropertySheetPage() {
- return tabbedPropertySheetPage;
+ /**
+ * Check if the Tabbed Property Sheet Page is still alive. This prevents SWT
+ * widget disposed errors during a stray refresh attempt when the editor is
+ * shutting down.
+ */
+ if (tabbedPropertySheetPage!=null
+ && tabbedPropertySheetPage.getControl()!=null
+ && !tabbedPropertySheetPage.getControl().isDisposed())
+ return tabbedPropertySheetPage;
+ return null;
}
/**
@@ -178,7 +187,7 @@ public abstract class AbstractBpmn2PropertySection extends GFPropertySection imp
*/
protected abstract AbstractDetailComposite createSectionRoot();
public abstract AbstractDetailComposite createSectionRoot(Composite parent, int style);
- protected abstract EObject getBusinessObjectForSelection(ISelection selection);
+ public abstract EObject getBusinessObjectForSelection(ISelection selection);
/* (non-Javadoc)
* Yet another ugly hack: this restores the current property sheet page parent
@@ -195,26 +204,28 @@ public abstract class AbstractBpmn2PropertySection extends GFPropertySection imp
editor = (DiagramEditor)bpmn2Editor;
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
*/
@Override
public void refresh() {
- EObject be = getBusinessObjectForSelection(getSelection());
-
- if (be!=null) {
- AbstractDetailComposite sectionRoot = getSectionRoot();
- if (sectionRoot!=null) {
- if (sectionRoot.getBusinessObject() != be) {
- sectionRoot.setDiagramEditor((DiagramEditor) getDiagramEditor());
- if (!parent.isLayoutDeferred())
- parent.setLayoutDeferred(true);
- sectionRoot.setBusinessObject(be);
- if (parent.isLayoutDeferred())
- parent.setLayoutDeferred(false);
+ if (getTabbedPropertySheetPage()!=null) {
+ EObject be = getBusinessObjectForSelection(getSelection());
+
+ if (be!=null) {
+ AbstractDetailComposite sectionRoot = getSectionRoot();
+ if (sectionRoot!=null) {
+ if (sectionRoot.getBusinessObject() != be) {
+ sectionRoot.setDiagramEditor((DiagramEditor) getDiagramEditor());
+ if (!parent.isLayoutDeferred())
+ parent.setLayoutDeferred(true);
+ sectionRoot.setBusinessObject(be);
+ if (parent.isLayoutDeferred())
+ parent.setLayoutDeferred(false);
+ }
+ sectionRoot.refresh();
}
- sectionRoot.refresh();
}
}
}
@@ -229,9 +240,11 @@ public abstract class AbstractBpmn2PropertySection extends GFPropertySection imp
* Force a layout of the property sheet page.
*/
public void layout() {
- Composite composite = (Composite)tabbedPropertySheetPage.getControl();
- composite.layout(true);
- tabbedPropertySheetPage.resizeScrolledComposite();
+ if (getTabbedPropertySheetPage()!=null) {
+ Composite composite = (Composite)tabbedPropertySheetPage.getControl();
+ composite.layout(true);
+ tabbedPropertySheetPage.resizeScrolledComposite();
+ }
}
/* (non-Javadoc)
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java
index d33db7cc..f8ce37b4 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDetailComposite.java
@@ -17,26 +17,35 @@ import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.bpmn2.modeler.core.EDataTypeConversionFactory;
+import org.eclipse.bpmn2.modeler.core.EditControlProvider;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.IConstants;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.AbstractObjectEditingDialog;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.BooleanObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ComboObjectEditor;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.DelegatingObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.FeatureListObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.FloatObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.IntObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ReadonlyTextObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.BasicFeatureMap;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap.Entry;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
@@ -52,6 +61,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.events.IExpansionListener;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
@@ -180,28 +190,12 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
if (attributesSection==null || attributesSection.isDisposed()) {
- attributesSection = createSection(this, Messages.AbstractDetailComposite_Attributes);
+ attributesSection = createSection(this, Messages.AbstractDetailComposite_Attributes, true);
attributesSection.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 3, 1));
attributesComposite = toolkit.createComposite(attributesSection);
attributesSection.setClient(attributesComposite);
attributesComposite.setLayout(new GridLayout(3,false));
-
- final String prefName = "detail."+businessObject.eClass().getName()+".expanded"; //$NON-NLS-1$ //$NON-NLS-2$
- attributesSection.addExpansionListener(new IExpansionListener() {
-
- @Override
- public void expansionStateChanging(ExpansionEvent e) {
- }
-
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- preferenceStore.setValue(prefName, e.getState());
- redrawPage();
- }
- });
- boolean expanded = preferenceStore.contains(prefName) ? preferenceStore.getBoolean(prefName) : true;
- attributesSection.setExpanded(expanded);
}
return attributesComposite;
}
@@ -233,16 +227,7 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
* @return the EStructuralFeature or null if the feature does not exist for this object
*/
protected EStructuralFeature getFeature(EObject object, String name) {
- EStructuralFeature feature = ((EObject)object).eClass().getEStructuralFeature(name);
- if (feature==null) {
- // maybe it's an anyAttribute?
- List<EStructuralFeature> anyAttributes = ModelUtil.getAnyAttributes(object);
- for (EStructuralFeature f : anyAttributes) {
- if (f.getName().equals(name))
- return f;
- }
- }
- return feature;
+ return getBusinessObjectDelegate().getFeature(object, name);
}
/**
@@ -251,36 +236,17 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
* @return
*/
protected boolean isAttribute(EObject object, EStructuralFeature feature) {
- // maybe it's an anyAttribute?
- if (feature instanceof EAttribute)
- return true;
-
- if (feature != null) {
- List<EStructuralFeature> anyAttributes = ModelUtil.getAnyAttributes(object);
- for (EStructuralFeature f : anyAttributes) {
- if (f.getName().equals(feature.getName())) {
- if (f instanceof EAttribute)
- return true;
- break;
- }
- }
- }
-
- return false;
+ return getBusinessObjectDelegate().isAttribute(object, feature);
}
/**
- * Convenience method to check if a feature is an EList
+ * Convenience method to check if a feature is a containment EList
* @param object
* @param feature
* @return
*/
protected boolean isList(EObject object, EStructuralFeature feature) {
- if (feature!=null) {
- Object list = object.eGet(feature);
- return (list instanceof EObjectContainmentEList);
- }
- return false;
+ return getBusinessObjectDelegate().isList(object, feature);
}
/**
@@ -290,7 +256,7 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
*/
protected boolean isReference(EObject object, EStructuralFeature feature) {
if (feature != null) {
- List<EStructuralFeature> anyAttributes = ModelUtil.getAnyAttributes(object);
+ List<EStructuralFeature> anyAttributes = ModelDecorator.getAnyAttributes(object);
for (EStructuralFeature f : anyAttributes) {
if (f.getName().equals(feature.getName())) {
if (f instanceof EReference)
@@ -309,6 +275,19 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
return label;
}
+ protected Text createText(Composite parent, String label, String value) {
+ createLabel(parent,label);
+ Text text = getToolkit().createText(parent, "", style | SWT.BORDER); //$NON-NLS-1$
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
+ text.setLayoutData(data);
+ text.setText(value==null ? "" : value); //$NON-NLS-1$
+ text.setEditable(false);
+ text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+ text.setForeground(text.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+ text.setData(AbstractObjectEditingDialog.DO_NOT_ADAPT, Boolean.TRUE);
+ return text;
+ }
+
public Font getDescriptionFont() {
if (descriptionFont==null) {
Display display = Display.getCurrent();
@@ -329,7 +308,7 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
descriptionText.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
descriptionText.setData(AbstractObjectEditingDialog.DO_NOT_ADAPT , Boolean.TRUE);
- GridData d = new GridData(SWT.FILL, SWT.FILL, false, false, 3, 1);
+ GridData d = new GridData(SWT.FILL, SWT.FILL, true, false, 3, 1);
d.horizontalIndent = 4;
d.verticalIndent = 4;
d.heightHint = (int)(5.5 * getDescriptionFont().getFontData()[0].getHeight());
@@ -339,7 +318,7 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
return descriptionText;
}
- protected Section createSection(Composite parent, final String title) {
+ protected Section createSection(Composite parent, final String title, boolean expanded) {
Section section = toolkit.createSection(parent,
ExpandableComposite.TWISTIE |
ExpandableComposite.EXPANDED |
@@ -359,11 +338,13 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
// toolBarManager.update(true);
// section.setTextClient(toolbar);
- if (getBusinessObject()!=null) {
- final String prefKey = "section."+getBusinessObject().eClass().getName()+title+"."+".expanded"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- boolean expanded = preferenceStore.getBoolean(prefKey);
- section.setExpanded(expanded);
- }
+ final String prefKey = (getBusinessObject()==null) ?
+ null :
+ "section."+getBusinessObject().eClass().getName()+"."+title+"."+".expanded"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ if (prefKey!=null && preferenceStore.contains(prefKey))
+ expanded = preferenceStore.getBoolean(prefKey);
+ section.setExpanded(expanded);
section.addExpansionListener(new IExpansionListener() {
@Override
@@ -372,15 +353,24 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
@Override
public void expansionStateChanged(ExpansionEvent e) {
- if (getBusinessObject()!=null) {
- final String prefKey = "section."+getBusinessObject().eClass().getName()+title+"."+".expanded"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (prefKey!=null) {
preferenceStore.setValue(prefKey, e.getState());
}
}
});
+
return section;
}
+ protected Composite createSectionComposite(Composite parent, String title) {
+ Section section = createSection(parent, title, false);
+ section.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 3, 1));
+ Composite composite = toolkit.createComposite(section);
+ section.setClient(composite);
+ composite.setLayout(new GridLayout(3,false));
+ return composite;
+ }
+
protected Section createSubSection(Composite parent, String title) {
Section section = toolkit.createSection(parent,
ExpandableComposite.EXPANDED |
@@ -407,12 +397,14 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
protected void bindAttribute(Composite parent, EObject object, String name, String label) {
EStructuralFeature feature = getFeature(object,name);
if (isAttribute(object,feature)) {
+ if (label==null)
+ label = getBusinessObjectDelegate().getLabel(object, feature);
bindAttribute(parent, object,(EAttribute)feature,label);
}
}
protected void bindAttribute(EObject object, EAttribute attribute) {
- bindAttribute(null,object,attribute,null);
+ bindAttribute(null,object,attribute,getBusinessObjectDelegate().getLabel(object, attribute));
}
protected void bindAttribute(EObject object, EAttribute attribute, String label) {
@@ -420,21 +412,22 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
}
protected void bindAttribute(Composite parent, EObject object, EAttribute attribute) {
- bindAttribute(parent,object,attribute,null);
+ bindAttribute(parent,object,attribute,getBusinessObjectDelegate().getLabel(object, attribute));
}
protected void bindAttribute(Composite parent, EObject object, EAttribute attribute, String label) {
- if (isModelObjectEnabled(object.eClass(), attribute) || "anyAttribute".equals(attribute.getName())) { //$NON-NLS-1$
+ if (isModelObjectEnabled(object.eClass(), attribute)) {
if (parent==null)
parent = getAttributesParent();
if (label==null)
- label = getPropertiesProvider().getLabel(object, attribute);
+ label = getBusinessObjectDelegate().getLabel(object, attribute);
- Class eTypeClass = attribute.getEType().getInstanceClass();
- if (ModelUtil.isMultiChoice(object, attribute)) {
+ EClassifier eTypeClassifier = attribute.getEType();
+ Class eTypeClass = eTypeClassifier.getInstanceClass();
+ if (getBusinessObjectDelegate().isMultiChoice(object, attribute)) {
ObjectEditor editor = new ComboObjectEditor(this,object,attribute);
editor.createControl(parent,label);
}
@@ -466,15 +459,44 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
editor.createControl(parent,label);
} else if ("anyAttribute".equals(attribute.getName()) || //$NON-NLS-1$
object.eGet(attribute) instanceof FeatureMap) {
+ List<EStructuralFeature> features = new ArrayList<EStructuralFeature>();
List<Entry> basicList = ((BasicFeatureMap) object.eGet(attribute)).basicList();
for (Entry entry : basicList) {
- EStructuralFeature feature = entry.getEStructuralFeature();
- if (isAttribute(object, feature))
- bindAttribute(parent,object,(EAttribute)feature);
- else if (isReference(object, feature))
- bindReference(parent,object,(EReference)feature);
- else if (isList(object,feature))
- bindList(object,feature);
+ features.add(entry.getEStructuralFeature());
+ }
+
+ // add the Extension Attributes
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ List<EStructuralFeature> extensionFeatures = adapter.getExtensionFeatures();
+ for (EStructuralFeature feature : extensionFeatures) {
+ if (!features.contains(feature)) {
+ features.add(feature);
+ }
+ }
+ }
+ for (EStructuralFeature feature : features) {
+ // ignore the ShapeStyle extension - this is already handled in the Description tab
+ if (!ShapeStyle.isStyleFeature(feature)) {
+ if (isAttribute(object, feature)) {
+ bindAttribute(parent,object,(EAttribute)feature);
+ }
+ else if (isReference(object, feature)) {
+ bindReference(parent,object,(EReference)feature);
+ }
+ else if (isList(object,feature)) {
+ bindList(object,feature);
+ }
+ }
+ }
+
+ }
+ else if (eTypeClassifier instanceof EDataType) {
+ ConversionDelegate cd = EDataTypeConversionFactory.INSTANCE.createConversionDelegate(
+ (EDataType)eTypeClassifier);
+ if (cd instanceof EditControlProvider) {
+ ObjectEditor editor = new DelegatingObjectEditor(this,object,attribute, (EditControlProvider)cd);
+ editor.createControl(parent,label);
}
}
}
@@ -503,17 +525,30 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
if (parent==null)
parent = getAttributesParent();
- String displayName = getPropertiesProvider().getLabel(object, reference);
+ String displayName = getBusinessObjectDelegate().getLabel(object, reference);
ObjectEditor editor = null;
- if (ModelUtil.isMultiChoice(object, reference)) {
+ if (getBusinessObjectDelegate().isContainmentFeature(object, reference)) {
+ EClass eClass = (EClass) reference.getEType();
+ // FIXME: how do we deal with lists of these things?
+ Object v = getBusinessObjectDelegate().getValue(object,reference);
+ EObject value = (EObject)v;
+ if (value==null) {
+ value = getBusinessObjectDelegate().createFeature(object,reference);
+ InsertionAdapter.add(object, reference, value);
+ }
+ AbstractDetailComposite detailComposite = PropertiesCompositeFactory.INSTANCE.createDetailComposite(eClass.getInstanceClass(), this, SWT.NONE);
+ detailComposite.setBusinessObject(value);
+ detailComposite.setTitle(getBusinessObjectDelegate().getLabel(value));
+ }
+ else if (getBusinessObjectDelegate().isMultiChoice(object, reference)) {
if (reference.isMany()) {
editor = new FeatureListObjectEditor(this,object,reference);
} else {
editor = new ComboObjectEditor(this,object,reference);
}
}
- else if (ModelUtil.canCreateNew(object, reference)) {
+ else if (getBusinessObjectDelegate().canCreateNew(object, reference)) {
editor = new ReadonlyTextObjectEditor(this,object,reference);
}
else {
@@ -605,27 +640,25 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
return getPropertiesProvider(businessObject);
}
- public AbstractPropertiesProvider getPropertiesProvider(EObject object) {
+ public AbstractPropertiesProvider getPropertiesProvider(final EObject object) {
if (propertiesProvider==null) {
- final EObject o = object;
return new AbstractPropertiesProvider(object) {
public String[] getProperties() {
List<String> list = new ArrayList<String>();
- EClass c = o.eClass();
+ EClass c = object.eClass();
// add name and id attributes first (if any)
if (c.getEStructuralFeature("name")!=null) //$NON-NLS-1$
list.add("name"); //$NON-NLS-1$
if (c.getEStructuralFeature("id")!=null) //$NON-NLS-1$
list.add("id"); //$NON-NLS-1$
- for (EStructuralFeature attribute : o.eClass().getEStructuralFeatures()) {
+ for (EStructuralFeature attribute : object.eClass().getEStructuralFeatures()) {
if (!list.contains(attribute.getName()))
list.add(attribute.getName());
}
- // add the anyAttributes
- List<EStructuralFeature> anyAttributes = ModelUtil.getAnyAttributes(o);
- for (EStructuralFeature f : anyAttributes) {
- if (f instanceof EAttribute && !list.contains(f.getName()))
- list.add(f.getName());
+ // add the extension attributes and elements
+ for (String f : getExtensionProperties(object)) {
+ if (!list.contains(f))
+ list.add(f);
}
String a[] = new String[list.size()];
list.toArray(a);
@@ -635,4 +668,18 @@ public abstract class AbstractDetailComposite extends ListAndDetailCompositeBase
}
return propertiesProvider;
}
+
+ public List<String> getExtensionProperties(EObject object) {
+ // Get the list of extension attributes and elements
+ List<String> list = new ArrayList<String>();
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ List<EStructuralFeature> features = adapter.getExtensionFeatures();
+ for (EStructuralFeature f : features) {
+ if (!list.contains(f.getName()))
+ list.add(f.getName());
+ }
+ }
+ return list;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDialogComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDialogComposite.java
index 418eb521..418eb521 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDialogComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractDialogComposite.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractListComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractListComposite.java
index 139bd5a7..dbcb40f8 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractListComposite.java
@@ -18,11 +18,12 @@ import java.util.HashSet;
import java.util.List;
import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.IConstants;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditingDialog;
import org.eclipse.bpmn2.modeler.core.merrimac.providers.TableCursor;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EAttribute;
@@ -182,6 +183,7 @@ public abstract class AbstractListComposite extends ListAndDetailCompositeBase i
if (nameAttribute!=null)
columnProvider.add(object, listItemClass, nameAttribute);
+ List<EStructuralFeature> added = new ArrayList<EStructuralFeature>();
for (EAttribute a1 : listItemClass.getEAllAttributes()) {
if ("anyAttribute".equals(a1.getName())) { //$NON-NLS-1$
List<EStructuralFeature> anyAttributes = new ArrayList<EStructuralFeature>();
@@ -199,6 +201,7 @@ public abstract class AbstractListComposite extends ListAndDetailCompositeBase i
if (f1 instanceof EAttribute && !anyAttributes.contains(f1)) {
columnProvider.add(object, listItemClass, f1);
anyAttributes.add(f1);
+ added.add(a1);
}
}
}
@@ -207,17 +210,31 @@ public abstract class AbstractListComposite extends ListAndDetailCompositeBase i
}
else if (FeatureMap.Entry.class.equals(a1.getEType().getInstanceClass())) {
// TODO: how do we handle these?
- if (a1 instanceof EAttribute)
+ if (a1 instanceof EAttribute) {
columnProvider.add(object, listItemClass, a1);
+ added.add(a1);
+ }
}
else {
if (a1!=nameAttribute) {
- if (a1!=idAttribute || getPreferences().getShowIdAttribute())
+ if (a1!=idAttribute || getPreferences().getShowIdAttribute()) {
columnProvider.add(object, listItemClass, a1);
+ added.add(a1);
+ }
}
}
}
+ // FIXME:
+ // add the extension attributes and elements
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(listItemClass);
+ if (adapter!=null) {
+ List<EStructuralFeature> features = adapter.getFeatures();
+ for (EStructuralFeature f : features) {
+ if (!added.contains(f))
+ columnProvider.add(object, listItemClass, f);
+ }
+ }
if (columnProvider.getColumns().size()==0) {
if (idAttribute!=null)
columnProvider.addRaw(object, idAttribute);
@@ -347,14 +364,7 @@ public abstract class AbstractListComposite extends ListAndDetailCompositeBase i
this.feature = thefeature;
final EList<EObject> list = (EList<EObject>)businessObject.eGet(feature);
final EClass listItemClass = getDefaultListItemClass(businessObject,feature);
- Composite parent = this.getParent();
- String label;
- if (parent instanceof AbstractDetailComposite) {
- label = ((AbstractDetailComposite)parent).getPropertiesProvider().getLabel(listItemClass);
- }
- else {
- label = ModelUtil.getLabel(listItemClass);
- }
+ String label = getBusinessObjectDelegate().getLabel(listItemClass);
final String prefName = "list."+listItemClass.getName()+".expanded"; //$NON-NLS-1$ //$NON-NLS-2$
////////////////////////////////////////////////////////////
@@ -554,8 +564,7 @@ public abstract class AbstractListComposite extends ListAndDetailCompositeBase i
};
dialog.setCompositeFactory(factory);
- if (dialog.open() == Window.OK)
- System.out.println();
+ dialog.open();
}
}
}
@@ -572,14 +581,7 @@ public abstract class AbstractListComposite extends ListAndDetailCompositeBase i
detailSection.setClient(detailComposite);
toolkit.adapt(detailComposite);
- Composite parent = this.getParent();
- String label;
- if (parent instanceof AbstractDetailComposite) {
- label = ((AbstractDetailComposite)parent).getPropertiesProvider().getLabel(o);
- }
- else {
- label = ModelUtil.getLabel(o);
- }
+ String label = getBusinessObjectDelegate().getLabel(o);
detailSection.setText(label+Messages.AbstractListComposite_Details);
((AbstractDetailComposite)detailComposite).setBusinessObject(o);
enable = !detailComposite.isEmpty();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractPropertiesProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractPropertiesProvider.java
index 1552b8d9..290545cf 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractPropertiesProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/AbstractPropertiesProvider.java
@@ -10,10 +10,7 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.merrimac.clad;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
/**
* Provider class for the Default Properties sheet tab.
@@ -34,16 +31,4 @@ public abstract class AbstractPropertiesProvider {
public void setProperties(String[] properties) {
}
-
- public String getLabel(EObject object) {
- return ModelUtil.getLabel(object);
- }
-
- public String getLabel(EClass eclass) {
- return ModelUtil.getLabel(eclass);
- }
-
- public String getLabel(EObject object, EStructuralFeature feature) {
- return ModelUtil.getLabel(object, feature);
- }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Bpmn2TabbedPropertySheetPage.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Bpmn2TabbedPropertySheetPage.java
index 046be45f..edbb3757 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/Bpmn2TabbedPropertySheetPage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Bpmn2TabbedPropertySheetPage.java
@@ -8,20 +8,26 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.bpmn2.modeler.core;
+package org.eclipse.bpmn2.modeler.core.merrimac.clad;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
public class Bpmn2TabbedPropertySheetPage extends TabbedPropertySheetPage implements IAdaptable {
+ UIJob job;
DiagramEditor diagramEditor;
private ISelection currentSelection;
@@ -31,8 +37,14 @@ public class Bpmn2TabbedPropertySheetPage extends TabbedPropertySheetPage implem
diagramEditor = (DiagramEditor)tabbedPropertySheetPageContributor;
}
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ public void selectionChanged(final IWorkbenchPart part, ISelection selection) {
currentSelection = selection;
+ if (selection==null) {
+ if (job!=null)
+ job.cancel();
+ return;
+ }
+
// Ignore selections from Source Viewer for now.
// When there is better synchronization between Source Viewer and Design Editor
// we can navigate from the selected IDOMNode to the BPMN2 model element and
@@ -40,10 +52,29 @@ public class Bpmn2TabbedPropertySheetPage extends TabbedPropertySheetPage implem
if (selection instanceof IStructuredSelection) {
// ugly hack to disable selection while source viewer is active
if (diagramEditor.getAdapter(StructuredTextEditor.class)!=null) {
- selection = new StructuredSelection(""); //$NON-NLS-1$
+ currentSelection = new StructuredSelection(""); //$NON-NLS-1$
}
- super.selectionChanged(part, selection);
}
+ // Use a UIJob here to avoid thrashing as Graphiti updates and selects
+ // figures during creation.
+ if (job==null) {
+ job = new UIJob("BPMN2 Property Page") {
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ doSelectionChanged(part, currentSelection);
+ return Status.OK_STATUS;
+ }
+
+ };
+ }
+ if (job.getState() == Job.WAITING)
+ job.cancel();
+ job.schedule(150);
+ }
+
+ private void doSelectionChanged(IWorkbenchPart part, ISelection selection) {
+ super.selectionChanged(part, selection);
}
public DiagramEditor getDiagramEditor() {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java
index c181c9c8..b431d303 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDetailComposite.java
@@ -21,6 +21,7 @@ import org.eclipse.bpmn2.Expression;
import org.eclipse.bpmn2.ExtensionAttributeValue;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.impl.Bpmn2PackageImpl;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
@@ -34,6 +35,7 @@ import org.eclipse.emf.ecore.util.FeatureMap.Entry;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.Section;
public class DefaultDetailComposite extends AbstractDetailComposite {
@@ -85,9 +87,10 @@ public class DefaultDetailComposite extends AbstractDetailComposite {
documentation = docList.get(0);
}
EStructuralFeature f = PACKAGE.getDocumentation_Text();
- ModelUtil.setMultiLine(documentation, f, true);
+ ExtendedPropertiesProvider.setMultiLineText(documentation, f, true);
+ Composite container = createSectionComposite(this, Messages.DefaultDetailComposite_Documentation);
TextObjectEditor documentationEditor = new TextObjectEditor(this,documentation,f);
- documentationEditor.createControl(getAttributesParent(),Messages.DefaultDetailComposite_Documentation);
+ documentationEditor.createControl(container,""); //$NON-NLS-1$
return null;
}
}
@@ -155,8 +158,8 @@ public class DefaultDetailComposite extends AbstractDetailComposite {
((AbstractListComposite)composite).setTitle(
NLS.bind(
Messages.DefaultDetailComposite_List_Title,
- getPropertiesProvider().getLabel((EObject)o,feature),
- ModelUtil.getLongDisplayName((EObject)o)
+ getBusinessObjectDelegate().getLabel((EObject)o,feature),
+ ModelUtil.toCanonicalString((EObject)o)
)
);
}
@@ -195,7 +198,6 @@ public class DefaultDetailComposite extends AbstractDetailComposite {
String[] properties = provider.getProperties();
if (properties!=null) {
getAttributesParent();
- EStructuralFeature feature;
for (String property : properties) {
bindProperty(be,property);
}
@@ -219,7 +221,7 @@ public class DefaultDetailComposite extends AbstractDetailComposite {
parent = getAttributesParent();
if (reference.getEType() == PACKAGE.getExpression() || reference.getEType() == PACKAGE.getFormalExpression()) {
- String displayName = getPropertiesProvider().getLabel(object, reference);
+ String displayName = getBusinessObjectDelegate().getLabel(object, reference);
Expression expression = (Expression)object.eGet(reference);
if (expression==null) {
expression = createModelObject(FormalExpression.class);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDialogComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDialogComposite.java
index 6face098..d703f94c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDialogComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultDialogComposite.java
@@ -15,7 +15,7 @@ import java.util.List;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.runtime.Bpmn2SectionDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.Bpmn2TabDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.PropertyTabDescriptor;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -43,6 +43,7 @@ public class DefaultDialogComposite extends AbstractDialogComposite {
protected IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
protected EObject businessObject;
protected List<AbstractDetailComposite> details = new ArrayList<AbstractDetailComposite>();
+ protected List<AbstractBpmn2PropertySection> sections = new ArrayList<AbstractBpmn2PropertySection>();
protected TabFolder folder;
protected Composite control;
protected ITabDescriptor[] tabDescriptors;
@@ -69,16 +70,12 @@ public class DefaultDialogComposite extends AbstractDialogComposite {
ITabDescriptor[] tabDescriptors = getTabDescriptors();
int detailsCount = getDetailsCount();
- if (detailsCount>0) {
+ if (detailsCount>1) {
folder = new TabFolder(this, SWT.NONE);
folder.setLayout(new FormLayout());
folder.setBackground(parent.getBackground());
for (ITabDescriptor td : tabDescriptors) {
- if (td instanceof Bpmn2TabDescriptor && !((Bpmn2TabDescriptor)td).isPopup()) {
- // exclude this tab if not intended for popup dialog
- continue;
- }
for (Object o : td.getSectionDescriptors()) {
if (o instanceof Bpmn2SectionDescriptor) {
Bpmn2SectionDescriptor sd = (Bpmn2SectionDescriptor)o;
@@ -115,6 +112,7 @@ public class DefaultDialogComposite extends AbstractDialogComposite {
tab.setText(td.getLabel());
tab.setControl(form);
details.add(detail);
+ sections.add(section);
}
}
}
@@ -137,18 +135,30 @@ public class DefaultDialogComposite extends AbstractDialogComposite {
data.left = new FormAttachment(0, 0);
data.right = new FormAttachment(100, 0);
control.setLayoutData(data);
+ layout(true);
}
protected ITabDescriptor[] getTabDescriptors() {
if (tabDescriptors==null) {
IWorkbenchPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().getActivePart();
part.getAdapter(ITabDescriptorProvider.class);
- ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
- ITabDescriptorProvider tabDescriptorProvider = (ITabDescriptorProvider)part.getAdapter(ITabDescriptorProvider.class);
- if (selection.isEmpty()) {
+ ISelection selection;
+ if (businessObject==null) {
+ selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
+ }
+ else {
selection = new StructuredSelection(businessObject);
}
- tabDescriptors = tabDescriptorProvider.getTabDescriptors(part,selection);
+ ITabDescriptorProvider tabDescriptorProvider = (ITabDescriptorProvider)part.getAdapter(ITabDescriptorProvider.class);
+ List<ITabDescriptor> list = new ArrayList<ITabDescriptor>();
+ for (ITabDescriptor td : tabDescriptorProvider.getTabDescriptors(part,selection)) {
+ if (td instanceof PropertyTabDescriptor && !((PropertyTabDescriptor)td).isPopup()) {
+ // exclude this tab if not intended for popup dialog
+ continue;
+ }
+ list.add(td);
+ }
+ tabDescriptors = list.toArray(new ITabDescriptor[list.size()]);
}
return tabDescriptors;
}
@@ -157,7 +167,7 @@ public class DefaultDialogComposite extends AbstractDialogComposite {
int detailsCount = 0;
ITabDescriptor[] tabDescriptors = getTabDescriptors();
for (ITabDescriptor td : tabDescriptors) {
- if (td instanceof Bpmn2TabDescriptor && !((Bpmn2TabDescriptor)td).isPopup()) {
+ if (td instanceof PropertyTabDescriptor && !((PropertyTabDescriptor)td).isPopup()) {
// exclude this tab if not intended for popup dialog
continue;
}
@@ -189,9 +199,13 @@ public class DefaultDialogComposite extends AbstractDialogComposite {
init();
if (details!=null && details.size()>0) {
- for (AbstractDetailComposite detail : details) {
+ for (int i=0; i<details.size(); ++i) {
+ AbstractDetailComposite detail = details.get(i);
+ AbstractBpmn2PropertySection section = sections.get(i);
detail.setIsPopupDialog(true);
- detail.setBusinessObject(businessObject);
+ StructuredSelection selection = new StructuredSelection(businessObject);
+ EObject bo = section.getBusinessObjectForSelection(selection);
+ detail.setBusinessObject(bo);
}
}
else if (control instanceof AbstractDetailComposite) {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultListComposite.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultListComposite.java
index c99301b4..c8cb1fe1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultListComposite.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ModelSubclassSelectionDialog;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
@@ -26,6 +27,9 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -63,10 +67,10 @@ public class DefaultListComposite extends AbstractListComposite {
if (!(list instanceof EObjectContainmentEList)) {
// this is not a containment list so we can't add it
// because we don't know where the new object belongs
-
+ String name = object.eClass().getName() + "." +feature.getName(); //$NON-NLS-1$
MessageDialog.openError(getShell(), Messages.DefaultListComposite_Internal_Error_Title,
NLS.bind(Messages.DefaultListComposite_Error_Internal_Error_Message_No_List,
- listItemClass.getName())
+ name)
);
return null;
}
@@ -119,7 +123,7 @@ public class DefaultListComposite extends AbstractListComposite {
protected EObject editListItem(EObject object, EStructuralFeature feature) {
MessageDialog.openError(getShell(), Messages.DefaultListComposite_Internal_Error_Title,
NLS.bind(Messages.DefaultListComposite_Internal_Error_Message_No_Editor,
- ModelUtil.getDisplayName(object, feature))
+ ExtendedPropertiesProvider.getTextValue(object, feature))
);
return null;
}
@@ -137,6 +141,13 @@ public class DefaultListComposite extends AbstractListComposite {
EObject selected = null;
if (index<map.length-1)
selected = list.get(map[index+1]);
+ EObject removed = list.get(map[index]);
+ Diagram diagram = getDiagramEditor().getDiagramTypeProvider().getDiagram();
+ for (PictogramElement pe : Graphiti.getLinkService().getPictogramElements(diagram, removed)) {
+ if (pe.getLink()!=null) {
+ pe.getLink().getBusinessObjects().remove(removed);
+ }
+ }
list.remove(map[index]);
return selected;
}
@@ -235,7 +246,7 @@ public class DefaultListComposite extends AbstractListComposite {
dlg.setInput(references);
dlg.setMessage(
NLS.bind(Messages.DefaultListComposite_Cannot_Delete_Message,
- ModelUtil.getLabel(objectToDelete))
+ ExtendedPropertiesProvider.getLabel(objectToDelete))
);
dlg.setAddCancelButton(false);
dlg.setTitle(Messages.DefaultListComposite_Cannot_Delete_Title);
@@ -293,7 +304,7 @@ public class DefaultListComposite extends AbstractListComposite {
@Override
public String getText(Object element) {
String type = ModelUtil.getLabel(element);
- String name = ModelUtil.getDisplayName(element);
+ String name = ModelUtil.getTextValue(element);
return type + ": " + name; //$NON-NLS-1$
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java
index 3fd37886..0d332308 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/DefaultPropertySection.java
@@ -33,14 +33,30 @@ public class DefaultPropertySection extends AbstractBpmn2PropertySection {
*/
@Override
protected AbstractDetailComposite createSectionRoot() {
- DefaultDetailComposite composite = new DefaultDetailComposite(this);
+ AbstractDetailComposite composite = null;
+ // If this section applies to only one type of BPMN2 element, search the registry for
+ // a Properties Composite of the given element type.
+ if (appliesToClasses.size()==1) {
+ composite = PropertiesCompositeFactory.INSTANCE.createDetailComposite(appliesToClasses.get(0), this);
+ }
+ else {
+ composite = new DefaultDetailComposite(this);
+ }
composite.setPropertiesProvider(propertiesProvider);
return composite;
}
@Override
public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
- DefaultDetailComposite composite = new DefaultDetailComposite(parent, style);
+ AbstractDetailComposite composite = null;
+ // If this section applies to only one type of BPMN2 element, search the registry for
+ // a Properties Composite of the given element type.
+ if (appliesToClasses.size()==1) {
+ composite = PropertiesCompositeFactory.INSTANCE.createDetailComposite(appliesToClasses.get(0), parent, style);
+ }
+ else {
+ composite = new DefaultDetailComposite(parent, style);
+ }
composite.setPropertiesProvider(propertiesProvider);
return composite;
}
@@ -97,9 +113,11 @@ public class DefaultPropertySection extends AbstractBpmn2PropertySection {
}
public boolean appliesTo(EObject eObj) {
- for (Class c : appliesToClasses) {
- if (c.isInstance(eObj))
- return true;
+ if (isModelObjectEnabled(eObj)) {
+ for (Class c : appliesToClasses) {
+ if (c.isInstance(eObj))
+ return true;
+ }
}
return false;
}
@@ -108,7 +126,7 @@ public class DefaultPropertySection extends AbstractBpmn2PropertySection {
appliesToClasses.add(c);
}
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
return BusinessObjectUtil.getBusinessObjectForSelection(selection);
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/IPropertiesCompositeFactory.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/IPropertiesCompositeFactory.java
index 927c8212..aafac6c3 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/IPropertiesCompositeFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/IPropertiesCompositeFactory.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.merrimac.clad;
import org.eclipse.emf.ecore.EClass;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListAndDetailCompositeBase.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListAndDetailCompositeBase.java
index f5a15f7c..904eeec1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListAndDetailCompositeBase.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListAndDetailCompositeBase.java
@@ -10,17 +10,18 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.core.merrimac.clad;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.Bpmn2TabbedPropertySheetPage;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
+import org.eclipse.bpmn2.modeler.core.merrimac.DefaultBusinessObjectDelegate;
+import org.eclipse.bpmn2.modeler.core.merrimac.IBusinessObjectDelegate;
import org.eclipse.bpmn2.modeler.core.merrimac.IConstants;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
@@ -74,6 +75,7 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
protected TransactionalEditingDomainImpl editingDomain;
protected ModelHandler modelHandler;
protected boolean isPopupDialog;
+ private IBusinessObjectDelegate boDelegate;
public ListAndDetailCompositeBase(AbstractBpmn2PropertySection section) {
this(section, SWT.NONE);
@@ -140,6 +142,12 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
return null;
}
+ public IBusinessObjectDelegate getBusinessObjectDelegate() {
+ if (boDelegate==null)
+ boDelegate = new DefaultBusinessObjectDelegate(editingDomain);
+ return boDelegate;
+ }
+
public void redrawPage() {
if (getPropertySection()!=null) {
getPropertySection().layout();
@@ -223,11 +231,8 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
@SuppressWarnings({ "unchecked", "rawtypes" })
protected <T extends EObject> T createModelObject(Class clazz) {
T object = null;
- EClass eClass = (EClass) Bpmn2Package.eINSTANCE.getEClassifier(clazz.getSimpleName());
- if (eClass!=null) {
- object = (T)Bpmn2ModelerFactory.eINSTANCE.create(eClass);
- ModelUtil.setID(object, ModelUtil.getResource(businessObject));
- }
+ object = getBusinessObjectDelegate().createObject(clazz);
+ ModelUtil.setID(object, ObjectPropertyProvider.getResource(businessObject));
return object;
}
@@ -239,6 +244,9 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
return (Bpmn2Preferences) getDiagramEditor().getAdapter(Bpmn2Preferences.class);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.widgets.Widget#setData(java.lang.Object)
+ */
@Override
public void setData(Object object) {
if (object instanceof EObject)
@@ -250,19 +258,13 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
if (diagramEditor==null)
diagramEditor = ModelUtil.getEditor(object);
addDomainListener();
- try {
- modelHandler = ModelHandlerLocator.getModelHandler(
- getDiagramEditor().getDiagramTypeProvider().getDiagram().eResource());
- } catch (IOException e1) {
- Activator.logError(e1);
- }
+ modelHandler = ModelHandler.getInstance(getDiagramEditor().getDiagramTypeProvider().getDiagram());
removeChangeListener(businessObject);
businessObject = object;
addChangeListener(businessObject);
// Do initial validation to force display of error message if any
- Notification n = new ENotificationImpl((InternalEObject) businessObject, 0, null, null, null, false);
- validate(n);
+ validate();
}
protected void addChangeListener(EObject object) {
@@ -326,27 +328,32 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
public void resourceSetChanged(ResourceSetChangeEvent event) {
final List<Notification> notifications = new ArrayList<Notification>();
List<Notification> eventNotifications = event.getNotifications();
+ NotificationFilter filter = getFilter();
for (int i=eventNotifications.size()-1; i>=0; --i) {
Notification n = eventNotifications.get(i);
- if (getFilter().matches(n)) {
- boolean add = true;
- if (n.getFeature() instanceof EStructuralFeature) {
- EStructuralFeature f = (EStructuralFeature)n.getFeature();
- EClass ec = f.getEContainingClass();
- // Attempt to reduce the number of notifications to process:
- // notifications for the XMLTypePackage are inconsequential
- if (ec.getEPackage()==XMLTypePackage.eINSTANCE)
- add = false;
- }
- for (Notification n2 : notifications) {
- if (n2.getNotifier()==n.getNotifier() && n2.getFeature()==n.getFeature()) {
- add = false;
- break;
+ // We are only interested in notifications that affect BaseElements
+ // since the {@link ObjectEditor} children only work with these objects.
+ if (n.getNotifier() instanceof BaseElement) {
+ if (filter.matches(n)) {
+ boolean add = true;
+ if (n.getFeature() instanceof EStructuralFeature) {
+ EStructuralFeature f = (EStructuralFeature)n.getFeature();
+ EClass ec = f.getEContainingClass();
+ // Attempt to reduce the number of notifications to process:
+ // notifications for the XMLTypePackage are inconsequential
+ if (ec.getEPackage()==XMLTypePackage.eINSTANCE)
+ add = false;
+ }
+ for (Notification n2 : notifications) {
+ if (n2.getNotifier()==n.getNotifier() && n2.getFeature()==n.getFeature()) {
+ add = false;
+ break;
+ }
+ }
+ if (add)
+ {
+ notifications.add(n);
}
- }
- if (add)
- {
- notifications.add(n);
}
}
}
@@ -405,18 +412,27 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
});
}
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.transaction.ResourceSetListener#isAggregatePrecommitListener()
+ */
@Override
public boolean isAggregatePrecommitListener() {
// TODO Auto-generated method stub
return false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.transaction.ResourceSetListener#isPrecommitOnly()
+ */
@Override
public boolean isPrecommitOnly() {
// TODO Auto-generated method stub
return false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.transaction.ResourceSetListener#isPostcommitOnly()
+ */
@Override
public boolean isPostcommitOnly() {
// TODO Auto-generated method stub
@@ -427,6 +443,11 @@ public class ListAndDetailCompositeBase extends Composite implements ResourceSet
this.isPopupDialog = isPopupDialog;
}
+ public void validate() {
+ Notification n = new ENotificationImpl((InternalEObject) businessObject, 0, null, null, null, false);
+ validate(n);
+ }
+
protected void validate(Notification notification) {
IValidator<Notification> validator = ModelValidationService.getInstance().newValidator(EvaluationMode.LIVE);
validator.validate(notification);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeColumnProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeColumnProvider.java
index 0d01fb73..0d01fb73 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeColumnProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeColumnProvider.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeContentProvider.java
index d0b6deb3..d0b6deb3 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/ListCompositeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Messages.java
index c6364832..0a8da952 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.merrimac.clad;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/PropertiesCompositeFactory.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/PropertiesCompositeFactory.java
index aede6514..aede6514 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/PropertiesCompositeFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/PropertiesCompositeFactory.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/TableColumn.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/TableColumn.java
index 9850b298..c606d2ea 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/TableColumn.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/TableColumn.java
@@ -15,6 +15,7 @@ import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.providers.ColumnTableProvider;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EClass;
@@ -87,10 +88,10 @@ public class TableColumn extends ColumnTableProvider.Column implements ILabelPro
if (feature!=null) {
if (feature.eContainer() instanceof EClass) {
EClass eclass = this.listComposite.getListItemClass();
- text = ModelUtil.getLabel(eclass, feature);
+ text = ExtendedPropertiesProvider.getLabel(eclass, feature);
}
else
- text = ModelUtil.toDisplayName(feature.getName());
+ text = ModelUtil.toCanonicalString(feature.getName());
}
return text;
}
@@ -109,7 +110,7 @@ public class TableColumn extends ColumnTableProvider.Column implements ILabelPro
public String getText(Object element) {
if (element instanceof EObject) {
- return ModelUtil.getDisplayName((EObject)element,feature);
+ return ExtendedPropertiesProvider.getTextValue((EObject)element,feature);
}
return element.toString();
}
@@ -153,7 +154,7 @@ public class TableColumn extends ColumnTableProvider.Column implements ILabelPro
else if (ec instanceof EEnum) {
ce = new CustomComboBoxCellEditor(parent, feature);
}
- else if (ModelUtil.isMultiChoice(feature.eContainer(), feature)) {
+ else if (ExtendedPropertiesProvider.isMultiChoice(feature.eContainer(), feature)) {
ce = new CustomComboBoxCellEditor(parent, feature);
}
else if (ec instanceof EDataType) {
@@ -202,7 +203,7 @@ public class TableColumn extends ColumnTableProvider.Column implements ILabelPro
value = ((CustomComboBoxCellEditor)ce).getChoice(value);
}
- boolean result = ModelUtil.setValue(getEditingDomain(), object, feature, value);
+ boolean result = ExtendedPropertiesProvider.setValue(object, feature, value);
// if (result==false || getDiagramEditor().getDiagnostics()!=null) {
// // revert the change and display error errorList message.
// ErrorUtils.showErrorMessage(getDiagramEditor().getDiagnostics().getMessage());
@@ -315,8 +316,8 @@ public class TableColumn extends ColumnTableProvider.Column implements ILabelPro
// NOTE: This list should be rebuilt every time before we activate this
// cell editor since the choices may have changed.
List<String> items = new ArrayList<String>();
- choices = ModelUtil.getChoiceOfValues(object, feature);
- if (ModelUtil.canSetNull(object,feature))
+ choices = ExtendedPropertiesProvider.getChoiceOfValues(object, feature);
+ if (ExtendedPropertiesProvider.canSetNull(object,feature))
items.add(""); //$NON-NLS-1$
items.addAll(choices.keySet());
Collections.sort(items);
@@ -372,7 +373,7 @@ public class TableColumn extends ColumnTableProvider.Column implements ILabelPro
if (value==null)
value = ""; //$NON-NLS-1$
else
- value = ModelUtil.getStringWrapperValue(value);
+ value = ModelUtil.getStringWrapperTextValue(value);
super.doSetValue(value);
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/messages.properties
index 227b7729..68dfb7a6 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/clad/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
AbstractDetailComposite_Attributes=Attributes
AbstractDetailComposite_Empty_Property_Sheet=This Property Sheet is empty because the model element\n"{0}" has no visible features.\n\n
AbstractDetailComposite_Empty_Property_Sheet_Elements=At least one of these element features must be enabled:\n{0}\n\nPlease configure the Tool Enablement Preferences for this project accordingly.
@@ -17,7 +27,7 @@ DefaultListComposite_Internal_Error_Message_No_Factory=Can not create a new {0}
DefaultListComposite_Internal_Error_Title=Internal Error
DefaultListComposite_Cannot_Delete_Message=The selected {0} can not be deleted\nbecause it is required by these other elements.
DefaultListComposite_Cannot_Delete_Title=Cannot Delete Item
-DefaultListComposite_Error_Internal_Error_Message_No_List=Can not create a new {0} because the list is not a control. The default addListItem() method must be implemented.
+DefaultListComposite_Error_Internal_Error_Message_No_List=Can not create a new {0} because the list is not a container. The default addListItem() method must be implemented.
PropertiesCompositeFactory_Internal_Error_Title=Internal Error
PropertiesCompositeFactory_No_Property_Sheet=The property sheet for the object type:\n\n{0}\n\nhas not been defined or is not visible.\n\nCause: {1}\n\nUsing the default property sheet instead.
PropertiesCompositeFactory_Unknown_Type=Unknown Composite type: {0}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/AbstractObjectEditingDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/AbstractObjectEditingDialog.java
index 92fff72e..636ed3c2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/AbstractObjectEditingDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/AbstractObjectEditingDialog.java
@@ -61,7 +61,7 @@ public abstract class AbstractObjectEditingDialog extends FormDialog implements
// If this property is set on a Control, then don't try to
// adapt the Control's colors/fonts/etc. to dialog defaults
// This is used by the Description Styled Text widget.
- public final static String DO_NOT_ADAPT = "do_not_adapt";
+ public final static String DO_NOT_ADAPT = "do_not_adapt"; //$NON-NLS-1$
public AbstractObjectEditingDialog(DiagramEditor editor, EObject object) {
super(editor.getEditorSite().getShell());
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/BooleanObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/BooleanObjectEditor.java
index 0af549df..a6636af8 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/BooleanObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/BooleanObjectEditor.java
@@ -86,7 +86,7 @@ public class BooleanObjectEditor extends ObjectEditor {
@Override
public Boolean getValue() {
- Object v = object.eGet(feature);
+ Object v = getBusinessObjectDelegate().getValue(object, feature);
if (v instanceof Boolean)
return (Boolean)v;
if (v instanceof String) {
@@ -110,7 +110,7 @@ public class BooleanObjectEditor extends ObjectEditor {
super.notifyChanged(notification);
if ( notification.getEventType() == -1 ||
(object == notification.getNotifier() && feature == notification.getFeature())) {
- Object value = object.eGet(feature);
+ Object value = getBusinessObjectDelegate().getValue(object, feature);
if (value==null) {
value = Boolean.FALSE;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ComboObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ComboObjectEditor.java
index b8936ea7..dda1ca95 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ComboObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ComboObjectEditor.java
@@ -21,10 +21,9 @@ import java.util.Map.Entry;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.IConstants;
import org.eclipse.bpmn2.modeler.core.adapters.AdapterRegistry;
-import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
@@ -86,7 +85,7 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
@Override
protected Control createControl(Composite composite, String label, int style) {
if (label==null)
- label = ModelUtil.getLabel(object,feature);
+ label = ExtendedPropertiesProvider.getLabel(object,feature);
createLabel(composite, label);
boolean canEdit = canEdit();
@@ -101,8 +100,7 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
if (!canEditInline)
style |= SWT.READ_ONLY;
- comboViewer = createComboViewer(composite,
- AdapterRegistry.getLabelProvider(), style);
+ comboViewer = createComboViewer(composite, AdapterRegistry.getLabelProvider(), style);
Combo combo = comboViewer.getCombo();
combo.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, (canEdit || canCreateNew) ? 1 : 2, 1));
combo.addDisposeListener(new DisposeListener() {
@@ -156,17 +154,7 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
createButton.setImage( Activator.getDefault().getImage(IConstants.ICON_ADD_20));
createButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- // create a new target object
- try {
- EObject value = createObject();
- setValue(value);
- fillCombo();
- }
- catch (OperationCanceledException ex1) {
- }
- catch (Exception ex2) {
- Activator.logError(ex2);
- }
+ buttonClicked(ID_CREATE_BUTTON);
}
});
}
@@ -175,27 +163,7 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
editButton.setImage( Activator.getDefault().getImage(IConstants.ICON_EDIT_20));
editButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- ISelection selection = comboViewer.getSelection();
- if (selection instanceof StructuredSelection) {
- String firstElement = (String) ((StructuredSelection) selection).getFirstElement();
- if ((firstElement != null && firstElement.isEmpty())) {
- // nothing to edit
- firstElement = null;
- }
- if (firstElement != null && comboViewer.getData(firstElement) instanceof EObject) {
- EObject value = (EObject) comboViewer.getData(firstElement);
- try {
- value = editObject(value);
- setValue(value);
- fillCombo();
- }
- catch (OperationCanceledException ex1) {
- }
- catch (Exception ex2) {
- Activator.logError(ex2);
- }
- }
- }
+ buttonClicked(ID_EDIT_BUTTON);
}
});
}
@@ -230,6 +198,45 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
return combo;
}
+
+ protected void buttonClicked(int buttonId) {
+ if (buttonId==ID_CREATE_BUTTON) {
+ // create a new target object
+ try {
+ EObject value = createObject();
+ setValue(value);
+ fillCombo();
+ }
+ catch (OperationCanceledException ex1) {
+ }
+ catch (Exception ex2) {
+ Activator.logError(ex2);
+ }
+ }
+ else if (buttonId==ID_EDIT_BUTTON) {
+ ISelection selection = comboViewer.getSelection();
+ if (selection instanceof StructuredSelection) {
+ String firstElement = (String) ((StructuredSelection) selection).getFirstElement();
+ if ((firstElement != null && firstElement.isEmpty())) {
+ // nothing to edit
+ firstElement = null;
+ }
+ if (firstElement != null && comboViewer.getData(firstElement) instanceof EObject) {
+ EObject value = (EObject) comboViewer.getData(firstElement);
+ try {
+ value = editObject(value);
+ setValue(value);
+ fillCombo();
+ }
+ catch (OperationCanceledException ex1) {
+ }
+ catch (Exception ex2) {
+ Activator.logError(ex2);
+ }
+ }
+ }
+ }
+ }
protected EObject createObject() throws Exception {
FeatureEditingDialog dialog = createFeatureEditingDialog(null);
@@ -265,12 +272,21 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
}
return v;
}
+
+ public String getTextValue() {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ return adapter.getFeatureDescriptor(feature).getTextValue();
+ }
+ return getValue().toString();
+ }
protected void fillCombo() {
try {
isWidgetUpdating = true;
if (comboViewer!=null) {
Object oldValue = getValue();
+ String oldTextValue = getTextValue();
while (comboViewer.getElementAt(0) != null)
comboViewer.remove(comboViewer.getElementAt(0));
@@ -283,8 +299,6 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
// add all other possible selections
ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(oldValue);
- if (ModelUtil.isStringWrapper(oldValue))
- oldValue = ModelUtil.getStringWrapperValue(oldValue);
StructuredSelection currentSelection = null;
if (choices!=null) {
@@ -292,12 +306,12 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
Collections.sort(list);
for (String key : list) {
comboViewer.add(key);
+ // try to find selection using current value of this feature
Object newValue = choices.get(key);
if (newValue!=null) {
comboViewer.setData(key, newValue);
if (currentSelection==null) {
- String oldValueString = oldValue==null ? null : oldValue.toString();
- if (newValue.equals(oldValue) || key.equals(oldValue) || key.equals(oldValueString)) {
+ if (newValue.equals(oldValue) || key.equals(oldValue) || key.equals(oldTextValue)) {
currentSelection = new StructuredSelection(key);
}
else if (adapter!=null) {
@@ -389,7 +403,7 @@ public class ComboObjectEditor extends MultivalueObjectEditor {
@Override
public void notifyChanged(Notification notification) {
super.notifyChanged(notification);
- if (notification.getEventType() == -1 || itemsChanged()) {
+ if (notification.getEventType() == -1 || (notification.getFeature()==feature) && itemsChanged()) {
fillCombo();
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/DelegatingObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/DelegatingObjectEditor.java
new file mode 100644
index 00000000..2935b89a
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/DelegatingObjectEditor.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
+
+import org.eclipse.bpmn2.modeler.core.EditControlProvider;
+import org.eclipse.bpmn2.modeler.core.EditControlProvider.EditControl;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * This is an ObjectEditor that delegates to an EditControl provider for constructing
+ * the edit widget(s). This ObjectEditor is used in AbstractDetailComposite for
+ * EAttributes whose DataType is not one of the primitive types (EString, EBoolean, etc.)
+ *
+ * The EditControlProvider is typically an EMF ConversionDelegate that implements this interface.
+ * Since the ConversionDelegate already knows how to convert the DataType to and from Strings,
+ * it makes sense that it should provide an editing widget for the UI.
+ */
+public class DelegatingObjectEditor extends ObjectEditor {
+
+ EditControlProvider provider;
+ EditControl control;
+
+ public DelegatingObjectEditor(AbstractDetailComposite parent, EObject object, EStructuralFeature feature, EditControlProvider provider) {
+ super(parent, object, feature);
+ this.provider = provider;
+ }
+
+ @Override
+ protected Control createControl(Composite composite, String label, int style) {
+ createLabel(composite, label);
+
+ control = provider.createControl(composite, style);
+ control.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ control.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setValue( getValue() );
+ }
+ });
+ Object value = getBusinessObjectDelegate().getValue(object, feature);
+ control.setValue(value);
+ return control;
+ }
+
+ @Override
+ public Object getValue() {
+ return control.getValue();
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ super.notifyChanged(notification);
+ Object value = getBusinessObjectDelegate().getValue(object, feature);
+ control.setValue(value);
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java
index c0aeebf5..f41e07c7 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java
@@ -13,7 +13,7 @@
package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.PropertiesCompositeFactory;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EClass;
@@ -26,8 +26,6 @@ import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
public class FeatureEditingDialog extends ObjectEditingDialog {
@@ -70,6 +68,8 @@ public class FeatureEditingDialog extends ObjectEditingDialog {
else if (feature.getEType() instanceof EClass)
featureEType = (EClass)feature.getEType();
}
+ if (newObject==null)
+ cancel = true;
if (cancel) {
rollbackTransaction();
@@ -79,12 +79,6 @@ public class FeatureEditingDialog extends ObjectEditingDialog {
}
}
- protected Composite createDialogContent(Composite parent) {
- Composite content = PropertiesCompositeFactory.INSTANCE.createDetailComposite(
- featureEType.getInstanceClass(), parent, SWT.NONE);
- return content;
- }
-
protected EObject createNewObject(final EObject object, final EStructuralFeature feature, final EClass eclass) {
final EObject[] result = new EObject[1];
final TransactionalEditingDomain domain = (TransactionalEditingDomainImpl)editor.getEditingDomain();
@@ -110,9 +104,9 @@ public class FeatureEditingDialog extends ObjectEditingDialog {
@Override
protected String getTitle() {
if (createNew)
- title = NLS.bind(Messages.FeatureEditingDialog_Create, ModelUtil.getLabel(newObject));
+ title = NLS.bind(Messages.FeatureEditingDialog_Create, ExtendedPropertiesProvider.getLabel(newObject));
else
- title = NLS.bind(Messages.FeatureEditingDialog_Edit, ModelUtil.getLabel(newObject));
+ title = NLS.bind(Messages.FeatureEditingDialog_Edit, ExtendedPropertiesProvider.getLabel(newObject));
return title;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureListObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureListObjectEditor.java
index 550b6990..f1a8d41c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureListObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureListObjectEditor.java
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.IConstants;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.Notification;
@@ -72,7 +73,7 @@ public class FeatureListObjectEditor extends MultivalueObjectEditor {
@Override
public String getText(Object element) {
- return ModelUtil.getDisplayName(element);
+ return ModelUtil.getTextValue(element);
}
}
@@ -94,8 +95,8 @@ public class FeatureListObjectEditor extends MultivalueObjectEditor {
text = getToolkit().createText(composite, ""); //$NON-NLS-1$
text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- text.setEditable(false);
-
+ setEditable(false);
+
references = getValue();
updateTextField();
@@ -247,10 +248,10 @@ public class FeatureListObjectEditor extends MultivalueObjectEditor {
String listText = ""; //$NON-NLS-1$
if (references != null) {
for (int i = 0; i < references.size() - 1; i++) {
- listText += ModelUtil.getDisplayName(references.get(i)) + ", ";
+ listText += ExtendedPropertiesProvider.getTextValue(references.get(i)) + ", "; //$NON-NLS-1$
}
if (references.size() > 0) {
- listText += ModelUtil.getDisplayName(references.get(references.size() - 1));
+ listText += ExtendedPropertiesProvider.getTextValue(references.get(references.size() - 1));
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FloatObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FloatObjectEditor.java
index 86b6be6a..76bd6c74 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FloatObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FloatObjectEditor.java
@@ -13,6 +13,8 @@
package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
+import java.math.BigInteger;
+
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.utils.ErrorUtils;
import org.eclipse.core.databinding.observable.value.IObservableValue;
@@ -84,9 +86,8 @@ public class FloatObjectEditor extends TextObjectEditor {
try {
final Double i = Double.parseDouble(text.getText());
- if (!object.eGet(feature).equals(i)) {
+ if (!getValue().equals(i))
setFeatureValue(i);
- }
} catch (NumberFormatException e) {
setFeatureValue(0L);
}
@@ -94,12 +95,7 @@ public class FloatObjectEditor extends TextObjectEditor {
@SuppressWarnings("rawtypes")
private void setFeatureValue(final double i) {
- Class eTypeClass = feature.getEType().getInstanceClass();
- if (Double.class.equals(eTypeClass) || double.class.equals(eTypeClass)) {
- setValue(Double.valueOf((double)i));
- }
- else
- setValue(Float.valueOf((float)i));
+ getBusinessObjectDelegate().setValue(object, feature, Double.toString(i));
}
});
@@ -118,4 +114,26 @@ public class FloatObjectEditor extends TextObjectEditor {
return text;
}
+
+ public Double getValue() {
+ Object v = getBusinessObjectDelegate().getValue(object, feature);
+ if (v instanceof Short)
+ return ((Short)v).doubleValue();
+ if (v instanceof Integer)
+ return ((Integer)v).doubleValue();
+ if (v instanceof Long)
+ return ((Long)v).doubleValue();
+ if (v instanceof Double)
+ return (Double)v;
+ if (v instanceof BigInteger)
+ return ((BigInteger)v).doubleValue();
+ if (v instanceof String) {
+ try {
+ return Double.parseDouble((String)v);
+ }
+ catch (Exception e){
+ }
+ }
+ return new Double(0);
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/IntObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/IntObjectEditor.java
index 6237be1b..a7d6739d 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/IntObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/IntObjectEditor.java
@@ -20,8 +20,10 @@ import org.eclipse.bpmn2.modeler.core.utils.ErrorUtils;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jface.databinding.swt.SWTObservables;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
@@ -96,12 +98,7 @@ public class IntObjectEditor extends TextObjectEditor {
@SuppressWarnings("rawtypes")
private void setFeatureValue(final long i) {
- Class eTypeClass = feature.getEType().getInstanceClass();
- if (Long.class.equals(eTypeClass) || long.class.equals(eTypeClass)) {
- setValue(Long.valueOf((long)i));
- }
- else
- setValue(Integer.valueOf((int)i));
+ getBusinessObjectDelegate().setValue(object, feature, Long.toString(i));
}
});
@@ -122,7 +119,7 @@ public class IntObjectEditor extends TextObjectEditor {
}
public Long getValue() {
- Object v = object.eGet(feature);
+ Object v = getBusinessObjectDelegate().getValue(object, feature);
if (v instanceof Short)
return ((Short)v).longValue();
if (v instanceof Integer)
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/Messages.java
index 4e917a96..d825cace 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ModelSubclassSelectionDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ModelSubclassSelectionDialog.java
index d2cd1929..c1608e4d 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ModelSubclassSelectionDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ModelSubclassSelectionDialog.java
@@ -121,13 +121,13 @@ public class ModelSubclassSelectionDialog extends ListDialog {
@Override
public String getText(Object element) {
- return ModelUtil.toDisplayName( ((EClass)element).getName() );
+ return ModelUtil.toCanonicalString( ((EClass)element).getName() );
}
});
setTitle(NLS.bind(
Messages.ModelSubclassSelectionDialog_Title,
- ModelUtil.toDisplayName(listItemClass.getName()))
+ ModelUtil.toCanonicalString(listItemClass.getName()))
);
setAddCancelButton(true);
setHelpAvailable(false);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java
index 487a3f2a..fdc32bc1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/MultivalueObjectEditor.java
@@ -16,8 +16,8 @@ package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
import java.util.Hashtable;
import java.util.Map.Entry;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -62,7 +62,7 @@ public abstract class MultivalueObjectEditor extends ObjectEditor {
* @return
*/
protected Hashtable<String,Object> getChoiceOfValues(EObject object, EStructuralFeature feature) {
- Hashtable<String,Object> choices = ModelUtil.getChoiceOfValues(object, feature);
+ Hashtable<String,Object> choices = ExtendedPropertiesProvider.getChoiceOfValues(object, feature);
if (featureEType!=null) {
Hashtable<String,Object> filteredChoices = new Hashtable<String,Object>();
for (Entry<String, Object> entry : choices.entrySet()) {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/NCNameObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/NCNameObjectEditor.java
index e49eaf41..e49eaf41 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/NCNameObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/NCNameObjectEditor.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditingDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditingDialog.java
index cff5f64d..d028a962 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditingDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditingDialog.java
@@ -13,8 +13,8 @@
package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.PropertiesCompositeFactory;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.help.IHelpContexts;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -63,12 +63,12 @@ public class ObjectEditingDialog extends AbstractObjectEditingDialog {
public int open() {
title = null;
if (object!=null)
- title = NLS.bind(Messages.ObjectEditingDialog_Edit, ModelUtil.getLabel(object));
+ title = NLS.bind(Messages.ObjectEditingDialog_Edit, ExtendedPropertiesProvider.getLabel(object));
create();
if (cancel)
return Window.CANCEL;
if (title==null)
- title = NLS.bind(Messages.ObjectEditingDialog_Create, ModelUtil.getLabel(object));
+ title = NLS.bind(Messages.ObjectEditingDialog_Create, ExtendedPropertiesProvider.getLabel(object));
return super.open();
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditor.java
index 9dd383a4..3abdf81d 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ObjectEditor.java
@@ -15,7 +15,10 @@ package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
import java.lang.reflect.Field;
-import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.ToolTipProvider;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.merrimac.DefaultBusinessObjectDelegate;
+import org.eclipse.bpmn2.modeler.core.merrimac.IBusinessObjectDelegate;
import org.eclipse.bpmn2.modeler.core.merrimac.IConstants;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.utils.ErrorUtils;
@@ -28,7 +31,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.validation.model.ConstraintStatus;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
@@ -39,6 +41,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -52,21 +55,26 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
* @author Bob Brodt
*/
public abstract class ObjectEditor implements INotifyChangedListener {
+
+ public static int ID_CREATE_BUTTON = 1;
+ public static int ID_EDIT_BUTTON = 2;
+ public static int ID_DELETE_BUTTON = 3;
+ public static int ID_OTHER_BUTTONS = 4;
+
protected EObject object;
protected EStructuralFeature feature;
protected AbstractDetailComposite parent;
private Label label;
protected ControlDecoration decoration;
protected int style;
- protected Class messages;
protected boolean isWidgetUpdating = false;
+ private IBusinessObjectDelegate boDelegate;
public ObjectEditor(AbstractDetailComposite parent, EObject object, EStructuralFeature feature) {
this.parent = parent;
this.object = object;
this.feature = feature;
this.style = SWT.NONE;
- messages = JavaReflectionUtil.findClass(parent, "Messages"); //$NON-NLS-1$
}
/**
@@ -96,6 +104,28 @@ public abstract class ObjectEditor implements INotifyChangedListener {
c.setData(IConstants.NOTIFY_CHANGE_LISTENER_KEY, this);
return c;
}
+
+ public IBusinessObjectDelegate getBusinessObjectDelegate() {
+ if (boDelegate==null)
+ boDelegate = new DefaultBusinessObjectDelegate(getDiagramEditor().getEditingDomain());
+ return boDelegate;
+ }
+
+ protected Object getExtendedProperty(String property) {
+ Object result = null;
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null && feature!=null) {
+ result = adapter.getProperty(feature, property);
+ }
+ return result;
+ }
+
+ protected void setExtendedProperty(String property, Object value) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null && feature!=null) {
+ adapter.setProperty(feature, property, value);
+ }
+ }
public EStructuralFeature getFeature() {
return feature;
@@ -161,31 +191,13 @@ public abstract class ObjectEditor implements INotifyChangedListener {
* @return
*/
protected String getToolTipText() {
- String fieldName;
- Field field;
- String text = ""; //$NON-NLS-1$
- if (messages!=null) {
- try {
- // fetch the description for this EClass and feature
- fieldName = "UI_" + object.eClass().getName() + "_" + feature.getName() + "_description"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-// text += "\n" + fieldName + "\n";
- field = messages.getField(fieldName);
- text += (String)field.get(null);
- }
- catch (Exception e) {
- try {
- // if a description is not found for this EClass, try "Any"
- fieldName = "UI_Any_" + feature.getName() + "_description"; //$NON-NLS-1$ //$NON-NLS-2$
-// text += "\n" + fieldName + "\n";
- field = messages.getField(fieldName);
- text += (String)field.get(null);
- }
- catch (Exception e2) {
- }
- }
- if (text==null || text.isEmpty())
- text = NLS.bind(Messages.ObjectEditor_No_Description, label.getText());
- }
+ String text = (String) getExtendedProperty(ExtendedPropertiesAdapter.LONG_DESCRIPTION);
+ if (text==null || text.isEmpty())
+ text = ToolTipProvider.INSTANCE.getToolTip(parent, object, feature);
+ if (text==null || text.isEmpty())
+ text = NLS.bind(Messages.ObjectEditor_No_Description, label.getText());
+
+ setExtendedProperty(ExtendedPropertiesAdapter.LONG_DESCRIPTION, text);
return text;
}
@@ -193,77 +205,82 @@ public abstract class ObjectEditor implements INotifyChangedListener {
* Updates the error decorators and tooltips of this editor's Label widget.
*/
protected void updateLabelDecorator() {
- String tooltip = label.getToolTipText();
- if (tooltip==null && object!=null && feature!=null) {
- label.setToolTipText(getToolTipText());
+ if (label!=null && !label.isDisposed()) {
+ String tooltip = label.getToolTipText();
+
+ if (tooltip==null && object!=null && feature!=null) {
+ label.setToolTipText(getToolTipText());
+ }
+
+
+ boolean applies = false;
+ String text = null;
+ String image = null;
+
+ if (isVisible()) {
+ ValidationStatusAdapter statusAdapter = (ValidationStatusAdapter) EcoreUtil.getRegisteredAdapter(
+ object, ValidationStatusAdapter.class);
+ if (statusAdapter != null) {
+ final IStatus status = statusAdapter.getValidationStatus();
+ if (status.isMultiStatus()) {
+ for (IStatus s : status.getChildren()) {
+ if (statusApplies(s)) {
+ applies = true;
+ break;
+ }
+ }
+ }
+ else if (statusApplies(status))
+ applies = true;
+
+ if (applies) {
+ text = status.getMessage();
+ switch (status.getSeverity()) {
+ case IStatus.INFO:
+ image = ISharedImages.IMG_OBJS_INFO_TSK;
+ break;
+ case IStatus.WARNING:
+ image = ISharedImages.IMG_DEC_FIELD_WARNING;
+ break;
+ case IStatus.ERROR:
+ image = ISharedImages.IMG_DEC_FIELD_ERROR;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ if (applies) {
+ if (decoration==null) {
+ decoration = new ControlDecoration(label, SWT.TOP | SWT.LEFT);
+ }
+ decoration.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(image));
+ decoration.show();
+ decoration.setDescriptionText(text);
+ }
+ else {
+ if (decoration!=null) {
+ decoration.hide();
+ decoration.dispose();
+ decoration = null;
+ }
+ }
}
-
-
- boolean applies = false;
- String image = null;
- String text = null;
- ValidationStatusAdapter statusAdapter = (ValidationStatusAdapter) EcoreUtil.getRegisteredAdapter(
- object, ValidationStatusAdapter.class);
- if (statusAdapter != null) {
- final IStatus status = statusAdapter.getValidationStatus();
- if (status.isMultiStatus()) {
- for (IStatus s : status.getChildren()) {
- if (statusApplies(s)) {
- applies = true;
- break;
- }
- }
- }
- else if (statusApplies(status))
- applies = true;
-
- if (applies) {
- text = status.getMessage();
- switch (status.getSeverity()) {
- case IStatus.INFO:
- image = ISharedImages.IMG_OBJS_INFO_TSK;
- break;
- case IStatus.WARNING:
- image = ISharedImages.IMG_DEC_FIELD_WARNING;
- break;
- case IStatus.ERROR:
- image = ISharedImages.IMG_DEC_FIELD_ERROR;
- break;
- default:
- break;
- }
- }
- }
-
- if (applies) {
- if (decoration==null) {
- decoration = new ControlDecoration(label, SWT.TOP | SWT.LEFT);
- }
- decoration.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(image));
- decoration.show();
- decoration.setDescriptionText(text);
- }
- else {
- if (decoration!=null) {
- decoration.hide();
- decoration.dispose();
- decoration = null;
- }
- }
}
protected boolean setValue(final Object result) {
- TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
- boolean success = ModelUtil.setValue(domain, object, feature, result);
+ boolean success = getBusinessObjectDelegate().setValue(object, feature, result);
if (!success) {
ErrorUtils.showErrorMessage(
NLS.bind(
Messages.ObjectEditor_Set_Error_Message,
new Object[] {
- ModelUtil.getDisplayName(object),
- ModelUtil.getLabel(object,feature),
- ModelUtil.getDisplayName(result)
+ getBusinessObjectDelegate().getTextValue(object),
+ getBusinessObjectDelegate().getLabel(object,feature),
+ ModelUtil.getTextValue(result)
}
)
);
@@ -283,6 +300,7 @@ public abstract class ObjectEditor implements INotifyChangedListener {
label.setVisible(visible);
GridData data = (GridData)label.getLayoutData();
data.exclude = !visible;
+ updateLabelDecorator();
}
public boolean isVisible() {
@@ -295,6 +313,7 @@ public abstract class ObjectEditor implements INotifyChangedListener {
label = null;
}
if (decoration!=null) {
+ decoration.hide();
decoration.dispose();
decoration = null;
}
@@ -304,20 +323,24 @@ public abstract class ObjectEditor implements INotifyChangedListener {
return label;
}
+ protected boolean isMultiLineText() {
+ return getBusinessObjectDelegate().isMultiLineText(object,feature);
+ }
+
protected boolean canEdit() {
- return ModelUtil.canEdit(object,feature);
+ return getBusinessObjectDelegate().canEdit(object,feature);
}
protected boolean canCreateNew() {
- return ModelUtil.canCreateNew(object,feature);
+ return getBusinessObjectDelegate().canCreateNew(object,feature);
}
protected boolean canEditInline() {
- return ModelUtil.canEditInline(object,feature);
+ return getBusinessObjectDelegate().canEditInline(object,feature);
}
protected boolean canSetNull() {
- return ModelUtil.canSetNull(object,feature);
+ return getBusinessObjectDelegate().canSetNull(object,feature);
}
protected boolean canAdd() {
@@ -327,4 +350,14 @@ public abstract class ObjectEditor implements INotifyChangedListener {
protected boolean canRemove() {
return false;
}
+
+ public void setEditable(boolean editable) {
+ Control control = getControl();
+ if (control instanceof Text) {
+ ((Text)control).setEditable(editable);
+ control.setBackground(control.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+ control.setForeground(control.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+ control.setData(AbstractObjectEditingDialog.DO_NOT_ADAPT, Boolean.TRUE);
+ }
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ReadonlyTextObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ReadonlyTextObjectEditor.java
index 7ab3c9b3..7ab3c9b3 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ReadonlyTextObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/ReadonlyTextObjectEditor.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/RefListEditingDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/RefListEditingDialog.java
index 12083205..e498a222 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/RefListEditingDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/RefListEditingDialog.java
@@ -13,7 +13,7 @@ package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
import java.util.Hashtable;
import java.util.Map.Entry;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.core.runtime.Assert;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -127,11 +127,11 @@ public class RefListEditingDialog extends AbstractObjectEditingDialog {
java.util.List<EObject> targets = (java.util.List<EObject>) object.eGet(feature);
for (EObject value : targets) {
String key = "" + targetList.getItemCount(); //$NON-NLS-1$
- targetList.add( ModelUtil.getDisplayName(value) );
+ targetList.add( ExtendedPropertiesProvider.getTextValue(value) );
targetList.setData(key, value);
}
- Hashtable<String, Object> sources = ModelUtil.getChoiceOfValues(object, feature);
+ Hashtable<String, Object> sources = ExtendedPropertiesProvider.getChoiceOfValues(object, feature);
for (Entry<String, Object> entry : sources.entrySet()) {
if (!targets.contains(entry.getValue())) {
String key = "" + sourceList.getItemCount(); //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextAndButtonObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextAndButtonObjectEditor.java
index 969402f9..97d2acca 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextAndButtonObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextAndButtonObjectEditor.java
@@ -34,9 +34,9 @@ import org.eclipse.swt.widgets.Control;
*/
public abstract class TextAndButtonObjectEditor extends TextObjectEditor {
- protected static int ID_DEFAULT_BUTTON = 0;
- protected static int ID_ADD_BUTTON = 1;
- protected static int ID_REMOVE_BUTTON = 2;
+ protected static int ID_DEFAULT_BUTTON = ID_OTHER_BUTTONS+0;
+ protected static int ID_ADD_BUTTON = ID_OTHER_BUTTONS+1;
+ protected static int ID_REMOVE_BUTTON = ID_OTHER_BUTTONS+2;
protected Button defaultButton;
protected Button addButton;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextObjectEditor.java
index 9693371b..28866987 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/TextObjectEditor.java
@@ -16,7 +16,6 @@ package org.eclipse.bpmn2.modeler.core.merrimac.dialogs;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.utils.ErrorUtils;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -58,7 +57,7 @@ public class TextObjectEditor extends ObjectEditor {
protected Control createControl(Composite composite, String label, int style) {
createLabel(composite,label);
- if (testMultiLine && ModelUtil.isMultiLine(object,feature)) {
+ if (testMultiLine && super.isMultiLineText()) {
multiLine = true;
style |= SWT.MULTI | SWT.V_SCROLL;
}
@@ -100,12 +99,9 @@ public class TextObjectEditor extends ObjectEditor {
});
// ask the object if this feature is read-only
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
- if (adapter!=null && feature!=null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_EDIT);
- if (result instanceof Boolean)
- setEditable((Boolean)result);
- }
+ Object result = getExtendedProperty(ExtendedPropertiesAdapter.UI_CAN_EDIT);
+ if (result instanceof Boolean)
+ setEditable((Boolean)result);
return text;
}
@@ -116,10 +112,6 @@ public class TextObjectEditor extends ObjectEditor {
}
- public void setEditable(boolean editable) {
- text.setEditable(editable);
- }
-
@Override
public void setObject(EObject object) {
super.setObject(object);
@@ -189,17 +181,14 @@ public class TextObjectEditor extends ObjectEditor {
*/
protected String getText() {
boolean useActualValue = false;
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_SET_NULL);
- if (result instanceof Boolean)
- useActualValue = ((Boolean)result);
- }
+ Object result = this.getExtendedProperty(ExtendedPropertiesAdapter.UI_CAN_SET_NULL);
+ if (result instanceof Boolean)
+ useActualValue = ((Boolean)result);
if (useActualValue) {
- Object value = ModelUtil.getValue(object, feature);
- return value==null ? "" : value.toString();
+ Object value = getBusinessObjectDelegate().getValue(object, feature);
+ return value==null ? "" : value.toString(); //$NON-NLS-1$
}
- return ModelUtil.getDisplayName(object, feature);
+ return getBusinessObjectDelegate().getTextValue(object, feature);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/messages.properties
index 9e833f7a..76af09b8 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
AbstractObjectEditingDialog_Commit_Error=Error Commiting Model Changes
AbstractObjectEditingDialog_Commit_Error_Title=An error occurred while trying to commit changes.
FeatureEditingDialog_Create=Create New {0}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/ColumnTableProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/ColumnTableProvider.java
index 9f9078b2..9f9078b2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/ColumnTableProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/ColumnTableProvider.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java
new file mode 100644
index 00000000..65b2701a
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/Messages.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.merrimac.providers;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.merrimac.providers.messages"; //$NON-NLS-1$
+ public static String TableCursor_Edit;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableCursor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableCursor.java
index 13612d91..13612d91 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableCursor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableCursor.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableProvider.java
index b5e11adc..71b0bb5c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/TableProvider.java
@@ -180,14 +180,16 @@ public class TableProvider implements ITableLabelProvider, ICellModifier {
public boolean canModify(Object element, String property) {
// delegate to the appropriate cell modifier.
ICellModifier cm = (ICellModifier)propertyToCellModifier.get(property);
- if (cm != null) return cm.canModify(element, property);
+ if (cm != null)
+ return cm.canModify(element, property);
// no cell modifier found.
return false;
}
public Object getValue(Object element, String property) {
// delegate to the appropriate cell modifier.
ICellModifier cm = (ICellModifier)propertyToCellModifier.get(property);
- if (cm != null) return cm.getValue(element, property);
+ if (cm != null && element!=null)
+ return cm.getValue(element, property);
// no cell modifier found.
return null;
}
@@ -195,7 +197,9 @@ public class TableProvider implements ITableLabelProvider, ICellModifier {
if (element instanceof Item) element = ((Item)element).getData();
// delegate to the appropriate cell modifier.
ICellModifier cm = (ICellModifier)propertyToCellModifier.get(property);
- if (cm != null) { cm.modify(element, property, value); return; }
+ if (cm != null && element!=null) {
+ cm.modify(element, property, value);
+ }
// no cell modifier found.
// do nothing
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties
new file mode 100644
index 00000000..6e5f10f9
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/providers/messages.properties
@@ -0,0 +1,11 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+TableCursor_Edit=Edit field
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/messages.properties
index 65d5e42f..92dadd29 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/messages.properties
@@ -1,3 +1,14 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+LifecycleEvent_Event_Prefix=Event:
ModelHandler_20=Cannot assign
ModelHandler_21=\ to
ModelHandler_Choreography=\ Choreography
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeAdaptorFactory.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeAdaptorFactory.java
new file mode 100644
index 00000000..89e57d77
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeAdaptorFactory.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.model;
+
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * Adapter Factory class that adapts AnyType objects using our special ExtendedPropertiesAdapter.
+ * This adapter knows how to resolve dynamic attributes and elements.
+ */
+class AnyTypeAdaptorFactory extends AdapterFactoryImpl {
+
+ public static AnyTypeAdaptorFactory INSTANCE = new AnyTypeAdaptorFactory();
+
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return type == ExtendedPropertiesAdapter.class;
+ }
+
+ @Override
+ public Adapter adaptNew(Notifier object, Object type) {
+ Adapter adapter = null;
+ if (type == ExtendedPropertiesAdapter.class) {
+ if (object instanceof EClass) {
+ object = ExtendedPropertiesAdapter.getDummyObject((EClass)object);
+ }
+ adapter = new ExtendedPropertiesAdapter(this, (EObject)object);
+ }
+ return adapter;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeObjectFactory.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeObjectFactory.java
new file mode 100644
index 00000000..19d4a70c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/AnyTypeObjectFactory.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.model;
+
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.DynamicEObjectImpl;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
+
+/**
+ * Object Factory class used to construct dynamic EObjects. We use the XMLTypeFactory's
+ * AnyType as our generic container for attributes and elements.
+ *
+ * Once the object is created, an ExtendedPropertiesAdapter is added, which handles resolution
+ * of dynamic attributes and elements.
+ */
+class AnyTypeObjectFactory extends EFactoryImpl {
+ public ModelDecorator modelDecorator;
+
+ public AnyTypeObjectFactory(ModelDecorator modelDecorator) {
+ this.modelDecorator = modelDecorator;
+ }
+
+ @Override
+ public EObject create(EClass eClass) {
+ EObject object;
+ if (eClass == EcorePackage.eINSTANCE.getEObject()) {
+ object = XMLTypeFactory.eINSTANCE.createAnyType();
+ }
+ else if (getEPackage() != eClass.getEPackage()) {
+ object = eClass.getEPackage().getEFactoryInstance().create(eClass);
+ }
+ else {
+ object = super.create(eClass);
+ }
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ rt.notify(new LifecycleEvent(EventType.BUSINESSOBJECT_CREATED, object));
+ return object;
+ }
+
+ protected EObject basicCreate(EClass eClass) {
+ return eClass.getInstanceClassName() == "java.util.Map$Entry" ? //$NON-NLS-1$
+ new DynamicEObjectImpl.BasicEMapEntry<String, String>(eClass) :
+ XMLTypeFactory.eINSTANCE.createAnyType();
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerFactory.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerFactory.java
index 45063852..cc4460f0 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerFactory.java
@@ -13,16 +13,21 @@
package org.eclipse.bpmn2.modeler.core.model;
+import java.util.List;
import java.util.Map;
-import org.eclipse.bpmn2.Bpmn2Factory;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DocumentRoot;
+import org.eclipse.bpmn2.di.BpmnDiFactory;
import org.eclipse.bpmn2.di.BpmnDiPackage;
import org.eclipse.bpmn2.impl.Bpmn2FactoryImpl;
import org.eclipse.bpmn2.impl.DocumentRootImpl;
-import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.core.runtime.Assert;
@@ -31,13 +36,13 @@ import org.eclipse.dd.di.DiPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.Resource.Internal;
import org.eclipse.emf.ecore.util.EcoreEMap;
/**
@@ -117,27 +122,62 @@ public class Bpmn2ModelerFactory extends Bpmn2FactoryImpl {
@Override
public EObject create(EClass eClass) {
- EObject object = super.create(eClass);
-// if (enableModelExtensions)
- {
+
+ EObject object = super.create(eClass);
+
+ ObjectPropertyProvider adapter = ObjectPropertyProvider.getAdapter(this);
+ try {
TargetRuntime rt = TargetRuntime.getCurrentRuntime();
if (rt!=null) {
- String className = eClass.getName();
+ Resource resource = null;
+ String customElementId = null;
+ if (adapter!=null) {
+ resource = adapter.getResource();
+ adapter.setResource(null);
+ customElementId = (String)adapter.getProperty(GraphitiConstants.CUSTOM_ELEMENT_ID);
+ adapter.setProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, null);
+ }
+
+ String className = eClass.getName();
if (!className.equals(Bpmn2Package.eINSTANCE.getDocumentRoot().getName()) &&
rt.getModelDescriptor().getEPackage() != Bpmn2Package.eINSTANCE &&
rt.getModelDescriptor().getEPackage().getEClassifier(className) != null ) {
- EClass clazz = (EClass) rt.getModelDescriptor().getEPackage().getEClassifier(className);
+ EClass clazz = (EClass) rt.getModelDescriptor().getEPackage().getEClassifier(className);
object = rt.getModelDescriptor().getEFactory().create(clazz);
- }
+ }
- for (ModelExtensionDescriptor med : rt.getModelExtensions()) {
- if (className.equals(med.getType())) {
- med.populateObject(object, eResource(), enableModelExtensions);
- break;
- }
- }
+ // first look for Model Extension Descriptors for this specific object type
+ if (customElementId!=null) {
+ CustomTaskDescriptor ctd = rt.getCustomTask(customElementId);
+ if (ctd!=null)
+ ctd.populateObject(object, resource, enableModelExtensions);
+ }
+ else {
+ List<ModelExtensionDescriptor> list = rt.getModelExtensionDescriptors();
+ for (ModelExtensionDescriptor med : list) {
+ if (className.equals(med.getType())) {
+ med.populateObject(object, resource, enableModelExtensions);
+ }
+ }
+ // then check if there are any MEDs for any supertypes of this object type
+ for (ModelExtensionDescriptor med : list) {
+ for (EClass st : eClass.getEAllSuperTypes()) {
+ if (st.getName().equals(med.getType())) {
+ med.populateObject(object, resource, enableModelExtensions);
+ }
+ }
+ }
+ }
+
+ rt.notify(new LifecycleEvent(EventType.BUSINESSOBJECT_CREATED, object));
}
- }
+ }
+ finally {
+ if (adapter!=null) {
+ adapter.setResource(null);
+ adapter.setProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, null);
+ }
+ }
return object;
}
@@ -156,7 +196,17 @@ public class Bpmn2ModelerFactory extends Bpmn2FactoryImpl {
@SuppressWarnings("unchecked")
public static <T extends EObject> T create(Resource resource, Class<T> clazz) {
EClass eClass = getEClass(clazz);
- return (T) create(resource, eClass);
+ if (eClass!=null) {
+ return (T) create(resource, eClass);
+ }
+ else {
+ // maybe it's a DI object type?
+ EClassifier eClassifier = BpmnDiPackage.eINSTANCE.getEClassifier(clazz.getSimpleName());
+ if (eClassifier instanceof EClass) {
+ BpmnDiFactory.eINSTANCE.create((EClass)eClassifier);
+ }
+ }
+ return null;
}
public static EObject create(Resource resource, EClass eClass) {
@@ -179,6 +229,10 @@ public class Bpmn2ModelerFactory extends Bpmn2FactoryImpl {
return newObject;
}
+ public void setResource(Resource resource) {
+ this.eSetDirectResource((Internal) resource);
+ }
+
public static EObject createFeature(EObject object, EStructuralFeature feature) {
return createFeature(object.eResource(), object, feature, (Class<? extends EObject>)feature.getEType().getInstanceClass());
}
@@ -228,7 +282,7 @@ public class Bpmn2ModelerFactory extends Bpmn2FactoryImpl {
ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
if (adapter!=null) {
- newObject = adapter.getFeatureDescriptor(feature).createFeature(resource, object, eClass);
+ newObject = adapter.getFeatureDescriptor(feature).createFeature(resource, eClass);
}
else {
// There is no properties adapter registered for this class. This can only happen if the object to
@@ -250,8 +304,23 @@ public class Bpmn2ModelerFactory extends Bpmn2FactoryImpl {
return null;
}
- private static boolean isBpmnPackage(EPackage pkg) {
- return pkg == Bpmn2Package.eINSTANCE || pkg == BpmnDiPackage.eINSTANCE || pkg == DcPackage.eINSTANCE || pkg == DiPackage.eINSTANCE;
+ public static boolean isBpmnPackage(EPackage pkg) {
+ return pkg == Bpmn2Package.eINSTANCE ||
+ pkg == BpmnDiPackage.eINSTANCE ||
+ pkg == DcPackage.eINSTANCE ||
+ pkg == DiPackage.eINSTANCE;
+ }
+
+ public static boolean isBpmnPackage(String nsURI) {
+ if (nsURI==null || nsURI.isEmpty())
+ return true;
+
+ if (!nsURI.endsWith("-XMI")) //$NON-NLS-1$
+ nsURI += "-XMI"; //$NON-NLS-1$
+ return Bpmn2Package.eINSTANCE.getNsURI().equals(nsURI) ||
+ BpmnDiPackage.eINSTANCE.getNsURI().equals(nsURI) ||
+ DcPackage.eINSTANCE.getNsURI().equals(nsURI) ||
+ DiPackage.eINSTANCE.getNsURI().equals(nsURI);
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceFactoryImpl.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceFactoryImpl.java
index fffb66ee..fffb66ee 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceFactoryImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceFactoryImpl.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java
index 78e2e893..2d403821 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java
@@ -30,6 +30,7 @@ import org.eclipse.bpmn2.DataAssociation;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.Documentation;
import org.eclipse.bpmn2.Expression;
+import org.eclipse.bpmn2.ExtensionAttributeValue;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.ItemDefinition;
@@ -44,12 +45,13 @@ import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.BpmnDiPackage;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.IExtensionValueAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory.Bpmn2ModelerDocumentRootImpl;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.runtime.TypeLanguageDescriptor;
import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
@@ -66,25 +68,26 @@ import org.eclipse.dd.dc.DcPackage;
import org.eclipse.dd.dc.Point;
import org.eclipse.dd.di.DiPackage;
import org.eclipse.dd.di.DiagramElement;
+import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.ECollections;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.BasicEObjectImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.EObjectWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.xmi.XMLHelper;
@@ -95,6 +98,7 @@ import org.eclipse.emf.ecore.xmi.impl.ElementHandlerImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLString;
+import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.wsdl.Definition;
import org.eclipse.wst.wsdl.PortType;
@@ -201,6 +205,23 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNLabel_LabelStyle());
}
+ public class OnlyNamedContainmentTypeInfo extends OnlyContainmentTypeInfo {
+
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ String name = ExtendedMetaData.INSTANCE.getName(objectType);
+ if (name==null || name.isEmpty())
+ return false;
+ return super.shouldSaveType(objectType, featureType, feature);
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ String name = ExtendedMetaData.INSTANCE.getName(objectType);
+ if (name==null || name.isEmpty())
+ return false;
+ return super.shouldSaveType(objectType, featureType, feature);
+ }
+ }
+
/**
* Creates an instance of the resource.
*
@@ -223,7 +244,7 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
ExtendedMetaData extendedMetadata = new XmlExtendedMetadata();
this.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetadata);
this.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetadata);
- this.getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new OnlyContainmentTypeInfo());
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new OnlyNamedContainmentTypeInfo());
this.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
this.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
this.getDefaultSaveOptions().put(XMLResource.OPTION_ELEMENT_HANDLER, new ElementHandlerImpl(true));
@@ -330,21 +351,21 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
@Override
protected void prepareSave() {
EObject cur;
- Definitions definitions = ImportHelper.getDefinitions(this);
+// Definitions definitions = ImportHelper.getDefinitions(this);
for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {
cur = iter.next();
setDefaultId(cur);
- for (EObject referenced : cur.eCrossReferences()) {
- setDefaultId(referenced);
- if (definitions != null) {
- Resource refResource = referenced.eResource();
- if (refResource != null && refResource != this) {
- createImportIfNecessary(definitions, refResource);
- }
- }
- }
+// for (EObject referenced : cur.eCrossReferences()) {
+// setDefaultId(referenced);
+// if (definitions != null) {
+// Resource refResource = referenced.eResource();
+// if (refResource != null && refResource != this) {
+// createImportIfNecessary(definitions, refResource);
+// }
+// }
+// }
}
}
@@ -397,26 +418,137 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
@Override
public void endDocument() {
super.endDocument();
+ // Make sure there's a namespace prefix definition for typeLanguage.
+ // We'll need that prefix to qualify data types defined in the type language.
+ Definitions definitions = ModelUtil.getDefinitions(xmlResource);
+ String typeLanguage = definitions.getTypeLanguage();
+ if (typeLanguage!=null) {
+ String prefix = NamespaceUtil.getPrefixForNamespace(helper.getResource(), typeLanguage);
+ if (prefix==null) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ TypeLanguageDescriptor tld = rt.getTypeLanguageDescriptor(typeLanguage);
+ if (tld!=null)
+ prefix = tld.getPrefix();
+ NamespaceUtil.addNamespace(helper.getResource(), prefix, typeLanguage);
+ }
+ }
+ // Load all of the Imports and generate Interfaces, Operations, Messages, Faults and ItemDefinitions
+ for (Import imp : definitions.getImports()) {
+ Object importObject = importHandler.loadImport(imp);
+ if (importObject!=null) {
+ importHandler.addImportObjects(imp, importObject);
+ }
+ }
+
+ // Fix up the descriptions for BPMNDiagrams
+ for (BPMNDiagram d : definitions.getDiagrams()) {
+ // Set the diagram's description AFTER it has been completely populated
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(d);
+ if (epa!=null) {
+ epa.setProperty(ExtendedPropertiesAdapter.LONG_DESCRIPTION, epa.getDescription(d));
+ }
+ }
Bpmn2ModelerFactory.setEnableModelExtensions(true);
}
@Override
- protected void createObject(EObject peekObject, EStructuralFeature feature) {
- super.createObject(peekObject, feature);
- EObject newObject = objects.peekEObject();
- if (newObject!=null && newObject!=peekObject) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(newObject);
- if (adapter!=null) {
- adapter.setProperty(ExtendedPropertiesAdapter.LINE_NUMBER, getLineNumber());
+ protected EStructuralFeature getFeature(EObject object, String prefix, String name, boolean isElement) {
+ EStructuralFeature feature = null;
+ String nsURI = (prefix==null ? targetNamespace : helper.getURI(prefix));
+ ModelDecorator md = ModelDecorator.getModelDecorator(nsURI);
+ if (md!=null) {
+ feature = md.getEStructuralFeature(object, name);
+ if (feature!=null) {
+// System.out.println("found feature "+object.eClass().getName()+"."+name+" in pkg "+pkg.getName());
+ return feature;
}
}
+ feature = super.getFeature(object, prefix, name, isElement);
+// if (feature!=null)
+// System.out.println("found feature "+object.eClass().getName()+"."+name);
+// else
+// System.out.println("feature "+prefix+":"+name+" not found!!!");
+ return feature;
+ }
+
+ @Override
+ protected EObject createObjectFromFeatureType(EObject peekObject, EStructuralFeature feature) {
+ int lineNumber = getLineNumber();
+ EObject newObject = null;
+ String nsURI = ExtendedMetaData.INSTANCE.getNamespace(feature);
+ EPackage pkg = ModelDecorator.getEPackage(nsURI);
+ if (pkg!=null) {
+ EClassifier eType = feature.getEType();
+ newObject = pkg.getEFactoryInstance().create((EClass)eType);
+
+// ModelDecoratorAdapter mda = AdapterUtil.adapt(pkg, ModelDecoratorAdapter.class);
+// feature = mda.getEStructuralFeature(peekObject, feature);
+ if (feature!=null) {
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(peekObject);
+ if (epa!=null) {
+ epa.getFeatureDescriptor(feature).setValue(newObject);
+ processObject(newObject);
+ handleObjectAttribs(newObject);
+ }
+ }
+ }
+ else {
+ newObject = super.createObjectFromFeatureType(peekObject, feature);
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ String id = rt.getCustomTaskId(newObject);
+ if (id!=null) {
+ // if this is a CustomElement we need to discard this object and construct it
+ // properly such that all extension attributes and elements are created and
+ // initialized.
+ EFactory factory = newObject.eClass().getEPackage().getEFactoryInstance();
+ ObjectPropertyProvider adapter = ObjectPropertyProvider.adapt(factory, xmlResource);
+ try {
+ // remove all traces of the old object
+ objects.pop();
+ mixedTargets.pop();
+ types.pop();
+ EcoreUtil.delete(newObject);
+ // set up the BPMN2 object factory to construct this CustomElement
+ adapter.setProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, id);
+ newObject = super.createObjectFromFeatureType(peekObject, feature);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ if (newObject!=null) {
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(newObject);
+ if (epa!=null) {
+ epa.setProperty(ExtendedPropertiesAdapter.LINE_NUMBER, lineNumber);
+ }
+ }
+
+ return newObject;
+ }
+
+ @Override
+ protected void setFeatureValue(EObject object, EStructuralFeature feature, Object value, int position) {
+ ModelDecorator md = ModelDecorator.getModelDecorator(feature);
+ if (md!=null) {
+ EStructuralFeature f = md.getEStructuralFeature(object, feature.getName());
+ if (f!=null) {
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(object);
+ epa.getFeatureDescriptor(f).setValue(value, position);
+ return;
+ }
+
+// ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(object);
+// epa.getFeatureDescriptor(feature).setValue(value, position);
+ }
+ super.setFeatureValue(object, feature, value, position);
}
@Override
protected void handleObjectAttribs(EObject obj) {
super.handleObjectAttribs(obj);
if (attribs != null) {
- InternalEObject internalEObject = (InternalEObject) obj;
for (int i = 0, size = attribs.getLength(); i < size; ++i) {
String name = attribs.getQName(i);
if (name.equals(XMLResource.XML_NS)) {
@@ -464,7 +596,7 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
else if (obj instanceof ItemDefinition) {
ItemDefinition itemDef = (ItemDefinition)obj;
- Definitions definitions = ImportHelper.getDefinitions(xmlResource);
+ Definitions definitions = ModelUtil.getDefinitions(xmlResource);
URI referencingURI = ImportHelper.makeURICanonical(resourceURI);
String location = ModelUtil.getStringWrapperValue(itemDef.getStructureRef());
if (location!=null) {
@@ -478,6 +610,7 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
}
}
else if (obj instanceof Definitions) {
+ // fetch the targetNamespace from Definitions object
targetNamespace = ((Definitions)obj).getTargetNamespace();
}
@@ -496,7 +629,6 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
protected void setValueFromId(EObject object, EReference eReference, String ids) {
Object value = null;
-
// Handle QNames and arbitrary strings in BPMN2 element references
if ( qnameMap.contains(eReference) ) {
// This reference might be a QName (according to the BPMN2 spec!)
@@ -522,7 +654,8 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
}
if (value==null) {
- // not a QName or can't find EObject: create a string wrapper EObject for this thing
+ // we can't find the object in any of our imports,
+ // so create a string wrapper EObject for this thing
value = ModelUtil.createStringWrapper(ids);
}
@@ -581,6 +714,12 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
public void startElement(String uri, String localName, String name) {
super.startElement(uri, localName, name);
EObject peekObject = objects.peekEObject();
+// if (peekObject instanceof Definitions) {
+// // create all model extensions for this target runtime so that all
+// // extension attributes and elements are available during loading.
+// TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+// rt.createModelExtensions(peekObject.eResource());
+// }
if (peekObject!=null && peekObject.eClass() == Bpmn2Package.eINSTANCE.getExpression()) {
// If the element is an Expression (not a FormalExpression) then use the CDATA
// as the body of a Formal Expression (because Expression does not have a body)
@@ -591,7 +730,7 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
@Override
public void endElement(String uri, String localName, String name) {
EObject peekObject = objects.peek();
- if (peekObject!=null && peekObject.eClass() == Bpmn2Package.eINSTANCE.getExpression()) {
+ if (peekObject instanceof Expression) {
// if the element is an Expression, replace it with a FormalExpression and set
// its body using the CDATA of the Expression element.
FormalExpression fe = Bpmn2Factory.eINSTANCE.createFormalExpression();
@@ -685,6 +824,22 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
}
@Override
+ protected void addNamespaceDeclarations() {
+ EMap<String,String> map = helper.getPrefixToNamespaceMap();
+ Definitions definitions = ModelUtil.getDefinitions(helper.getResource());
+ String typeLanguage = definitions.getTypeLanguage();
+ if (!map.containsValue(typeLanguage)) {
+ String prefix = "tl"; //$NON-NLS-1$
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ TypeLanguageDescriptor tld = rt.getTypeLanguageDescriptor(typeLanguage);
+ if (tld!=null)
+ prefix = tld.getPrefix();
+ doc.addAttributeNS(XMLResource.XML_NS, prefix, typeLanguage);
+ }
+ super.addNamespaceDeclarations();
+ }
+
+ @Override
protected void init(XMLResource resource, Map<?, ?> options) {
super.init(resource, options);
featureTable = new Bpmn2ModelerXMLSave.Bpmn2Lookup(map, extendedMetaData, elementHandler);
@@ -798,6 +953,42 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
}
}
}
+
+ if (f == Bpmn2Package.eINSTANCE.getBaseElement_ExtensionValues()) {
+ // check if this element is (or should be) empty
+ boolean shouldSave = false;
+ for (ExtensionAttributeValue ev : (EList<ExtensionAttributeValue>)o.eGet(f)) {
+ BasicFeatureMap map = (BasicFeatureMap) ev.getValue();
+ Iterator<FeatureMap.Entry> mi = map.iterator();
+ while (mi.hasNext()) {
+ FeatureMap.Entry entry = mi.next();
+ Object v = entry.getValue();
+ if (v instanceof EObject) {
+ Iterator<Adapter> ai = ((EObject)v).eAdapters().iterator();
+ while (ai.hasNext()) {
+ Adapter a = ai.next();
+ if (a instanceof IExtensionValueAdapter) {
+ if (((IExtensionValueAdapter)a).shouldSaveElement((EObject)v)) {
+ shouldSave = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ return shouldSave;
+ }
+
+ Iterator<Adapter> ai = o.eAdapters().iterator();
+ while (ai.hasNext()) {
+ Adapter a = ai.next();
+ if (a instanceof IExtensionValueAdapter) {
+ if (!((IExtensionValueAdapter)a).shouldSaveFeature(o,f))
+ return false;
+ }
+ }
+
return super.shouldSaveFeature(o, f);
}
@@ -870,6 +1061,16 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
@Override
protected void saveElement(EObject o, EStructuralFeature f) {
+
+ Iterator<Adapter> ai = o.eAdapters().iterator();
+ while (ai.hasNext()) {
+ Adapter a = ai.next();
+ if (a instanceof IExtensionValueAdapter) {
+ if (!((IExtensionValueAdapter)a).shouldSaveElement(o))
+ return;
+ }
+ }
+
float oldX = 0, oldY = 0;
List<Point> oldPoints = null;
@@ -958,6 +1159,12 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
}
@Override
+ protected String convertURI(String s) {
+ URI uri = helper.deresolve( URI.createURI(s) );
+ return uri.toString();
+ }
+
+ @Override
public void traverse(List<? extends EObject> contents) {
for (EObject e : contents) {
if (e instanceof Definitions) {
@@ -1093,11 +1300,6 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
else
newFeatureList[oldIndex] = featureList[oldIndex];
}
-
-// System.out.println("Reordered features for "+cls.getName());
-// for (int newIndex=0; newIndex<newFeatureList.length; ++newIndex) {
-// System.out.println(" "+newIndex+": "+newFeatureList[newIndex].getName()+" was "+featureList[newIndex].getName());
-// }
return newFeatureList;
}
}
@@ -1137,7 +1339,12 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
URI otherURI = uri.trimFragment();
if (baseURI.equals(otherURI))
return URI.createURI(fragment);
- else
+ }
+
+ if (
+ (uri.isPlatformResource() && baseURI.isPlatformResource()) ||
+ (uri.isFile() && baseURI.isFile())) {
+ uri = uri.deresolve(baseURI, false, true, true);
return uri;
}
return super.deresolve(uri);
@@ -1196,7 +1403,7 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
return xmlHelper.getPathForPrefix(prefix).appendFragment(fragment).toString();
}
else {
- return URI.createURI("").appendFragment(fragment).toString();
+ return URI.createURI("").appendFragment(fragment).toString(); //$NON-NLS-1$
}
}
}
@@ -1230,12 +1437,14 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
@Override
public String getHREF(EObject obj) {
// convert the attribute ID references to a QName
- String s = super.getHREF(obj);
- if (isQNameFeature) {
+ String s = null;
if (ModelUtil.isStringWrapper(obj)) {
s = ModelUtil.getStringWrapperValue(obj);
}
- else if (s!=null && s.contains("#")) { //$NON-NLS-1$
+ else
+ s = super.getHREF(obj);
+ if (isQNameFeature) {
+ if (s!=null && s.contains("#")) { //$NON-NLS-1$
// object is a reference possibly to another document
Import imp = importHandler.findImportForObject(resource, obj);
if (imp!=null) {
@@ -1268,7 +1477,7 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
* @return a namespace URI or null if targetNamespace is not defined.
*/
private String getTargetNamespace() {
- Definitions definitions = ImportHelper.getDefinitions(getResource());
+ Definitions definitions = ModelUtil.getDefinitions(getResource());
if (definitions==null)
return null;
return definitions.getTargetNamespace();
@@ -1324,8 +1533,7 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
return s;
}
- public void setValue(EObject object, EStructuralFeature feature,
- Object value, int position) {
+ public void setValue(EObject object, EStructuralFeature feature, Object value, int position) {
// fix some kind of bug which causes duplicate entries in objects that have
// mutual reference lists.
if ( object!=null
@@ -1343,64 +1551,64 @@ public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
}
}
- // check if we need to change the attribute's data type:
- if (feature instanceof EAttribute) {
- // and only if the attribute's data type is "Object"
- EClassifier t = feature.getEType();
- if (t!=null && t.getInstanceClass() == Object.class) {
- // search for the attribute in the target runtime's Custom Task and
- // Model Extension definitions by name
- List<Property>properties = new ArrayList<Property>();
- TargetRuntime rt = TargetRuntime.getCurrentRuntime();
- String className = object.eClass().getName();
- String featureName = feature.getName();
- for (CustomTaskDescriptor ctd : rt.getCustomTasks()) {
- if (className.equals(ctd.getType())) {
- properties.addAll(ctd.getProperties());
- }
- }
- for (ModelExtensionDescriptor med : rt.getModelExtensions()) {
- if (className.equals(med.getType())) {
- properties.addAll(med.getProperties());
- }
- }
- for (Property p : properties) {
- if (p.name.equals(featureName)) {
- String type = p.type;
- if (type==null)
- type = "EString"; //$NON-NLS-1$
- EClassifier eClassifier = ModelUtil.getEClassifierFromString(
- rt.getModelDescriptor().getEPackage(),type);
- if (eClassifier instanceof EDataType) {
- feature.setEType(eClassifier);
- }
- break;
- }
- }
- }
- }
+// // check if we need to change the attribute's data type:
+// if (feature instanceof EAttribute) {
+// // and only if the attribute's data type is "Object"
+// EClassifier t = feature.getEType();
+// if (t!=null && t.getInstanceClass() == Object.class) {
+// // search for the attribute in the target runtime's Custom Task and
+// // Model Extension definitions by name
+// List<Property>properties = new ArrayList<Property>();
+// TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+// String className = object.eClass().getName();
+// String featureName = feature.getName();
+// for (CustomTaskDescriptor ctd : rt.getCustomTasks()) {
+// if (className.equals(ctd.getType())) {
+// properties.addAll(ctd.getProperties());
+// }
+// }
+// for (ModelExtensionDescriptor med : rt.getModelExtensions()) {
+// if (className.equals(med.getType())) {
+// properties.addAll(med.getProperties());
+// }
+// }
+// for (Property p : properties) {
+// if (p.name.equals(featureName)) {
+// String type = p.type;
+// if (type==null)
+// type = "EString"; //$NON-NLS-1$
+// EClassifier eClassifier = ModelDecorator.findEClassifier(
+// rt.getModelDescriptor().getEPackage(),type);
+// if (eClassifier instanceof EDataType) {
+// feature.setEType(eClassifier);
+// }
+// break;
+// }
+// }
+// }
+// }
super.setValue(object, feature, value, position);
}
@Override
- public EStructuralFeature getFeature(EClass eClass, String namespaceURI, String name, boolean isElement) {
+ public EStructuralFeature getFeature(EClass eClass, String nsURI, String name, boolean isElement) {
// This fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=378296
// I'm still not convinced that getFeature() shouldn't simply return the feature
// from the given EClass instead of searching the EPackage of the Resource being
// loaded (if the EClass has a feature with that name of course).
- EStructuralFeature result = null;
+ EStructuralFeature feature = null;
EPackage pkg = eClass.getEPackage();
if (pkg != Bpmn2Package.eINSTANCE &&
pkg != BpmnDiPackage.eINSTANCE &&
pkg != DcPackage.eINSTANCE &&
pkg != DiPackage.eINSTANCE &&
pkg != TargetRuntime.getCurrentRuntime().getModelDescriptor().getEPackage()) {
- result = eClass.getEStructuralFeature(name);
+ feature = eClass.getEStructuralFeature(name);
}
- if (result==null)
- result = super.getFeature(eClass, namespaceURI, name, isElement);
- return result;
+ if (feature==null)
+ feature = super.getFeature(eClass, nsURI, name, isElement);
+ return feature;
}
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java.orig b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java.orig
new file mode 100644
index 00000000..b60fda74
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java.orig
@@ -0,0 +1,1617 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.model;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.bpmn2.Assignment;
+import org.eclipse.bpmn2.Bpmn2Factory;
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.DataAssociation;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.Documentation;
+import org.eclipse.bpmn2.Expression;
+import org.eclipse.bpmn2.ExtensionAttributeValue;
+import org.eclipse.bpmn2.FormalExpression;
+import org.eclipse.bpmn2.Import;
+import org.eclipse.bpmn2.ItemDefinition;
+import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNLabel;
+import org.eclipse.bpmn2.di.BPMNPlane;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.di.BpmnDiPackage;
+import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.IExtensionValueAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory.Bpmn2ModelerDocumentRootImpl;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.runtime.TypeLanguageDescriptor;
+import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
+import org.eclipse.bpmn2.util.Bpmn2ResourceImpl;
+import org.eclipse.bpmn2.util.ImportHelper;
+import org.eclipse.bpmn2.util.OnlyContainmentTypeInfo;
+import org.eclipse.bpmn2.util.QNameURIHandler;
+import org.eclipse.bpmn2.util.XmlExtendedMetadata;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.dd.dc.DcFactory;
+import org.eclipse.dd.dc.DcPackage;
+import org.eclipse.dd.dc.Point;
+import org.eclipse.dd.di.DiPackage;
+import org.eclipse.dd.di.DiagramElement;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EObjectWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.xmi.XMLHelper;
+import org.eclipse.emf.ecore.xmi.XMLLoad;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave;
+import org.eclipse.emf.ecore.xmi.impl.ElementHandlerImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLString;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.wsdl.Definition;
+import org.eclipse.wst.wsdl.PortType;
+import org.eclipse.wst.wsdl.util.WSDLResourceImpl;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
+ *
+ * @implements Bpmn2Resource <!-- end-user-doc -->
+ * @see org.eclipse.bpmn2.util.Bpmn2ResourceFactoryImpl
+ */
+public class Bpmn2ModelerResourceImpl extends Bpmn2ResourceImpl {
+
+ public static final String BPMN2_CONTENT_TYPE_ID = "org.eclipse.bpmn2.content-type.xml"; //$NON-NLS-1$
+ protected BpmnXmlHelper xmlHelper;
+ protected QNameURIHandler uriHandler;
+ public HashMap xmlNameToFeatureMap = new HashMap();
+ protected static HashSet<EStructuralFeature> qnameMap = new HashSet<EStructuralFeature>();
+ static {
+ qnameMap.add(Bpmn2Package.eINSTANCE.getExtension_Definition());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getRelationship_Sources());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getRelationship_Targets());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getAssociation_SourceRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getAssociation_TargetRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getGroup_CategoryValueRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCorrelationKey_CorrelationPropertyRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCorrelationProperty_Type());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCorrelationPropertyBinding_CorrelationPropertyRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCorrelationPropertyRetrievalExpression_MessageRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCorrelationSubscription_CorrelationPropertyBinding());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getError_StructureRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getEscalation_StructureRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getFlowElement_CategoryValueRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getFlowNode_Incoming());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getFlowNode_Outgoing());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getFormalExpression_EvaluatesToTypeRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getInputOutputBinding_OperationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getItemDefinition_StructureRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessage_ItemRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getResourceParameter_Type());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getInterface_ImplementationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getOperation_InMessageRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getOperation_OutMessageRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getOperation_ErrorRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getOperation_ImplementationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCallConversation_CalledCollaborationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getConversationAssociation_InnerConversationNodeRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getConversationAssociation_OuterConversationNodeRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getConversationLink_SourceRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getConversationLink_TargetRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getConversationNode_MessageFlowRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getConversationNode_ParticipantRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getConversationNode_CorrelationKeys());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessageFlow_SourceRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessageFlow_TargetRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessageFlow_MessageRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessageFlowAssociation_InnerMessageFlowRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessageFlowAssociation_OuterMessageFlowRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getParticipant_InterfaceRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getParticipant_EndPointRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getParticipant_ProcessRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getParticipantAssociation_InnerParticipantRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getParticipantAssociation_OuterParticipantRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCallableElement_SupportedInterfaceRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCallActivity_CalledElementRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_LoopDataInputRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_LoopDataOutputRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_OneBehaviorEventRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_NoneBehaviorEventRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getReceiveTask_MessageRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getReceiveTask_OperationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getResourceRole_ResourceRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getSendTask_MessageRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getSendTask_OperationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getServiceTask_OperationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getItemAwareElement_ItemSubjectRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getBoundaryEvent_AttachedToRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCatchEvent_EventDefinitionRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCompensateEventDefinition_ActivityRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getErrorEventDefinition_ErrorRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getEscalationEventDefinition_EscalationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Source());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessageEventDefinition_OperationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getMessageEventDefinition_MessageRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getSignal_StructureRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getSignalEventDefinition_SignalRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getThrowEvent_EventDefinitionRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getProcess_Supports());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getProcess_DefinitionalCollaborationRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getLane_PartitionElementRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getGlobalChoreographyTask_InitiatingParticipantRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getChoreographyActivity_ParticipantRefs());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getChoreographyActivity_InitiatingParticipantRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getChoreographyTask_MessageFlowRef());
+ qnameMap.add(Bpmn2Package.eINSTANCE.getCallChoreography_CalledChoreographyRef());
+ qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNPlane_BpmnElement());
+ qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNShape_BpmnElement());
+ qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNShape_ChoreographyActivityShape());
+ qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNEdge_BpmnElement());
+ qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNEdge_SourceElement());
+ qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNEdge_TargetElement());
+ qnameMap.add(BpmnDiPackage.eINSTANCE.getBPMNLabel_LabelStyle());
+ }
+
+ public class OnlyNamedContainmentTypeInfo extends OnlyContainmentTypeInfo {
+
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ String name = ExtendedMetaData.INSTANCE.getName(objectType);
+ if (name==null || name.isEmpty())
+ return false;
+ return super.shouldSaveType(objectType, featureType, feature);
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ String name = ExtendedMetaData.INSTANCE.getName(objectType);
+ if (name==null || name.isEmpty())
+ return false;
+ return super.shouldSaveType(objectType, featureType, feature);
+ }
+ }
+
+ /**
+ * Creates an instance of the resource.
+ *
+ * @param uri
+ * the URI of the new resource.
+ */
+ public Bpmn2ModelerResourceImpl(URI uri) {
+ super(uri);
+
+ // override helper and uri handler in options map
+ this.xmlHelper = (BpmnXmlHelper)createXMLHelper();
+ this.uriHandler = new FragmentQNameURIHandler(xmlHelper);
+ uriHandler.setBaseURI(uri);
+
+ this.getDefaultLoadOptions().put(XMLResource.OPTION_URI_HANDLER, uriHandler);
+ this.getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, true);
+ this.getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, true);
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, uriHandler);
+
+ ExtendedMetaData extendedMetadata = new XmlExtendedMetadata();
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetadata);
+ this.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetadata);
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new OnlyNamedContainmentTypeInfo());
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ this.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_ELEMENT_HANDLER, new ElementHandlerImpl(true));
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
+ this.getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, new ArrayList<Object>());
+
+ // some interesting things to play with:
+// this.getDefaultLoadOptions().put(XMLResource.OPTION_LAX_FEATURE_PROCESSING, true);
+// this.getDefaultLoadOptions().put(XMLResource.OPTION_LAX_WILDCARD_PROCESSING, true);
+// this.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, true);
+// this.getDefaultLoadOptions().put(XMLResource.OPTION_ANY_TYPE, BpmnDiPackage.eINSTANCE.getBPMNPlane());
+ this.getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, xmlNameToFeatureMap);
+
+ // only necessary if this resource will not be added to a ResourceSet instantly
+ this.eAdapters().add(oppositeReferenceAdapter);
+ }
+
+ public void save(Map<?, ?> options) throws IOException {
+ uriHandler.setBaseURI(getURI());
+ xmlHelper.setResource(this);
+ super.save(options);
+ }
+
+ @Override
+ protected XMLHelper createXMLHelper() {
+ if (xmlHelper!=null)
+ return xmlHelper;
+ return new Bpmn2ModelerXmlHelper(this);
+ }
+
+ /**
+ * Override this method to hook in our own XmlHandler
+ */
+ @Override
+ protected XMLLoad createXMLLoad() {
+ return new XMLLoadImpl(createXMLHelper()) {
+ Bpmn2ModelerXmlHandler handler;
+
+ @Override
+ protected DefaultHandler makeDefaultHandler() {
+ handler = new Bpmn2ModelerXmlHandler(resource, helper, options);
+ return handler;
+ }
+
+ @Override
+ public void load(XMLResource resource, InputStream inputStream, Map<?, ?> options) throws IOException {
+ try {
+ super.load(resource, inputStream, options);
+ }
+ catch (Exception e) {
+ DiagnosticWrappedException error = new DiagnosticWrappedException(e);
+ error.setLine(handler.getLineNumber());
+ error.setColumn(handler.getColumnNumber());
+ error.setLocation(handler.getLocation());
+ resource.getErrors().add(error);
+ throw new IOException(e);
+ }
+ }
+ };
+ }
+
+ class DiagnosticWrappedException extends WrappedException implements Resource.Diagnostic {
+ private static final long serialVersionUID = 1L;
+ private String location;
+ private int column;
+ private int line;
+
+ public DiagnosticWrappedException(Exception exception) {
+ super(exception);
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setColumn(int column) {
+ this.column = column;;
+ }
+
+ public int getColumn() {
+ return column;
+ }
+
+ public void setLine(int line) {
+ this.line = line;
+ }
+
+ public int getLine() {
+ return line;
+ }
+ }
+
+ @Override
+ protected XMLSave createXMLSave() {
+ prepareSave();
+ return new Bpmn2ModelerXMLSave(createXMLHelper()) {
+ };
+ }
+
+ @Override
+ protected void prepareSave() {
+ EObject cur;
+// Definitions definitions = ImportHelper.getDefinitions(this);
+ for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {
+ cur = iter.next();
+
+ setDefaultId(cur);
+
+// for (EObject referenced : cur.eCrossReferences()) {
+// setDefaultId(referenced);
+// if (definitions != null) {
+// Resource refResource = referenced.eResource();
+// if (refResource != null && refResource != this) {
+// createImportIfNecessary(definitions, refResource);
+// }
+// }
+// }
+ }
+ }
+
+ /**
+ * Generate an ID attribute for the given BPMN2 element if not already set.
+ *
+ * @param obj
+ * The object whose ID should be set.
+ */
+ private void setDefaultId(EObject obj) {
+ if (obj.eClass() != null) {
+ EStructuralFeature idAttr = obj.eClass().getEIDAttribute();
+ if (idAttr != null && !obj.eIsSet(idAttr)) {
+ obj.eSetDeliver(false);
+ ModelUtil.setID(obj);
+ obj.eSetDeliver(true);
+ }
+ }
+ }
+
+ @Override
+ public void setURI(URI uri) {
+ super.setURI(uri);
+ xmlHelper.setResource(this);
+ uriHandler.setBaseURI(uri);
+ }
+
+ /**
+ * We need to extend the standard SAXXMLHandler to hook into the handling of
+ * attribute references which may be either simple ID Strings or QNames.
+ * We'll search through all of the objects' IDs first to find the one we're
+ * looking for. If not, we'll try a QName search.
+ */
+ protected static class Bpmn2ModelerXmlHandler extends BpmnXmlHandler {
+
+ Bpmn2Preferences prefs = null;
+ ImportUtil importHandler = new ImportUtil();
+ String targetNamespace = null;
+
+ public Bpmn2ModelerXmlHandler(XMLResource xmiResource, XMLHelper helper, Map<?, ?> options) {
+ super(xmiResource, helper, options);
+ }
+
+ @Override
+ public void startDocument() {
+ super.startDocument();
+ Bpmn2ModelerFactory.setEnableModelExtensions(false);
+ }
+
+ @Override
+ public void endDocument() {
+ super.endDocument();
+ // Make sure there's a namespace prefix definition for typeLanguage.
+ // We'll need that prefix to qualify data types defined in the type language.
+ Definitions definitions = ModelUtil.getDefinitions(xmlResource);
+ String typeLanguage = definitions.getTypeLanguage();
+ if (typeLanguage!=null) {
+ String prefix = NamespaceUtil.getPrefixForNamespace(helper.getResource(), typeLanguage);
+ if (prefix==null) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ TypeLanguageDescriptor tld = rt.getTypeLanguageDescriptor(typeLanguage);
+ if (tld!=null)
+ prefix = tld.getPrefix();
+ NamespaceUtil.addNamespace(helper.getResource(), prefix, typeLanguage);
+ }
+ }
+ // Load all of the Imports and generate Interfaces, Operations, Messages, Faults and ItemDefinitions
+ for (Import imp : definitions.getImports()) {
+ Object importObject = importHandler.loadImport(imp);
+ if (importObject!=null) {
+ importHandler.addImportObjects(imp, importObject);
+ }
+ }
+
+ // Fix up the descriptions for BPMNDiagrams
+ for (BPMNDiagram d : definitions.getDiagrams()) {
+ // Set the diagram's description AFTER it has been completely populated
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(d);
+ if (epa!=null) {
+ epa.setProperty(ExtendedPropertiesAdapter.LONG_DESCRIPTION, epa.getDescription(d));
+ }
+ }
+ Bpmn2ModelerFactory.setEnableModelExtensions(true);
+ }
+
+ @Override
+ protected EStructuralFeature getFeature(EObject object, String prefix, String name, boolean isElement) {
+ EStructuralFeature feature = null;
+ String nsURI = (prefix==null ? targetNamespace : helper.getURI(prefix));
+ ModelDecorator md = ModelDecorator.getModelDecorator(nsURI);
+ if (md!=null) {
+ feature = md.getEStructuralFeature(object, name);
+ if (feature!=null) {
+// System.out.println("found feature "+object.eClass().getName()+"."+name+" in pkg "+pkg.getName());
+ return feature;
+ }
+ }
+ feature = super.getFeature(object, prefix, name, isElement);
+// if (feature!=null)
+// System.out.println("found feature "+object.eClass().getName()+"."+name);
+// else
+// System.out.println("feature "+prefix+":"+name+" not found!!!");
+ return feature;
+ }
+
+ @Override
+ protected EObject createObjectFromFeatureType(EObject peekObject, EStructuralFeature feature) {
+ int lineNumber = getLineNumber();
+ EObject newObject = null;
+ String nsURI = ExtendedMetaData.INSTANCE.getNamespace(feature);
+ EPackage pkg = ModelDecorator.getEPackage(nsURI);
+ if (pkg!=null) {
+ EClassifier eType = feature.getEType();
+ newObject = pkg.getEFactoryInstance().create((EClass)eType);
+
+// ModelDecoratorAdapter mda = AdapterUtil.adapt(pkg, ModelDecoratorAdapter.class);
+// feature = mda.getEStructuralFeature(peekObject, feature);
+ if (feature!=null) {
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(peekObject);
+ if (epa!=null) {
+ epa.getFeatureDescriptor(feature).setValue(newObject);
+ processObject(newObject);
+ handleObjectAttribs(newObject);
+ }
+ }
+ }
+ else {
+ newObject = super.createObjectFromFeatureType(peekObject, feature);
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ String id = rt.getCustomTaskId(newObject);
+ if (id!=null) {
+ // if this is a CustomElement we need to discard this object and construct it
+ // properly such that all extension attributes and elements are created and
+ // initialized.
+ EFactory factory = newObject.eClass().getEPackage().getEFactoryInstance();
+ ObjectPropertyProvider adapter = ObjectPropertyProvider.adapt(factory, xmlResource);
+ try {
+ // remove all traces of the old object
+ objects.pop();
+ mixedTargets.pop();
+ types.pop();
+ EcoreUtil.delete(newObject);
+ // set up the BPMN2 object factory to construct this CustomElement
+ adapter.setProperty(GraphitiConstants.CUSTOM_ELEMENT_ID, id);
+ newObject = super.createObjectFromFeatureType(peekObject, feature);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ if (newObject!=null) {
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(newObject);
+ if (epa!=null) {
+ epa.setProperty(ExtendedPropertiesAdapter.LINE_NUMBER, lineNumber);
+ }
+ }
+
+ return newObject;
+ }
+
+ @Override
+ protected void setFeatureValue(EObject object, EStructuralFeature feature, Object value, int position) {
+ ModelDecorator md = ModelDecorator.getModelDecorator(feature);
+ if (md!=null) {
+ EStructuralFeature f = md.getEStructuralFeature(object, feature.getName());
+ if (f!=null) {
+ ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(object);
+ epa.getFeatureDescriptor(f).setValue(value, position);
+ return;
+ }
+
+// ExtendedPropertiesAdapter epa = ExtendedPropertiesAdapter.adapt(object);
+// epa.getFeatureDescriptor(feature).setValue(value, position);
+ }
+ super.setFeatureValue(object, feature, value, position);
+ }
+
+ @Override
+ protected void handleObjectAttribs(EObject obj) {
+ super.handleObjectAttribs(obj);
+ if (attribs != null) {
+ for (int i = 0, size = attribs.getLength(); i < size; ++i) {
+ String name = attribs.getQName(i);
+ if (name.equals(XMLResource.XML_NS)) {
+ // create an ns prefix in the prefix map for this default namespace
+ // and qualify any qnameFeatures contained in this object...
+ String namespaceURI = attribs.getValue(i);
+ for (EStructuralFeature f : obj.eClass().getEAllStructuralFeatures()) {
+ if (qnameMap.contains(f)) {
+ Object value = obj.eGet(f);
+ if (ModelUtil.isStringWrapper(value)) {
+ String localpart = ModelUtil.getStringWrapperValue(value);
+ if (localpart!=null && !localpart.isEmpty() && !localpart.contains(":")) { //$NON-NLS-1$
+ String prefix = helper.getPrefix(namespaceURI);
+ if (prefix==null || prefix.isEmpty()) {
+ for (int index = 0; true; ++index) {
+ prefix = "ns" + index; //$NON-NLS-1$
+ String ns = helper.getPrefixToNamespaceMap().get(prefix);
+ if (ns==null)
+ break;
+ }
+ helper.addPrefix(prefix, namespaceURI);
+ }
+ ModelUtil.setStringWrapperValue(value, prefix + ":" + localpart); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (obj instanceof BPMNShape) {
+ BPMNShape bpmnShape = (BPMNShape)obj;
+
+ Hashtable<String,String> map = new Hashtable<String,String>();
+ if (attribs != null) {
+ for (int i = 0, size = attribs.getLength(); i < size; ++i) {
+ String key = attribs.getQName(i);
+ String value = attribs.getValue(i);
+ map.put(key, value);
+ }
+ Bpmn2Preferences.getInstance(this.resourceURI).applyBPMNDIDefaults(bpmnShape, map);
+ }
+ }
+ else if (obj instanceof ItemDefinition) {
+ ItemDefinition itemDef = (ItemDefinition)obj;
+
+ Definitions definitions = ModelUtil.getDefinitions(xmlResource);
+ URI referencingURI = ImportHelper.makeURICanonical(resourceURI);
+ String location = ModelUtil.getStringWrapperValue(itemDef.getStructureRef());
+ if (location!=null) {
+ int i = location.indexOf("$"); //$NON-NLS-1$
+ if (i>0)
+ location = location.substring(0,i);
+ URI uri = URI.createURI(location).resolve(referencingURI);
+ uri = uri.trimFragment();
+ Import imp = ImportHelper.findImportForLocation(definitions, uri);
+ itemDef.setImport(imp);
+ }
+ }
+ else if (obj instanceof Definitions) {
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java
+=======
+ // fetch the targetNamespace from Definitions object
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceImpl.java
+ targetNamespace = ((Definitions)obj).getTargetNamespace();
+ }
+
+ }
+
+ /**
+ * Overridden to be able to convert ID references in attributes to URIs
+ * during load. If the reference can't be found by its ID, we'll try a
+ * QName search (done in the super class)
+ *
+ * @param ids
+ * In our case the parameter will contain exactly one ID that
+ * we resolve to URI.
+ */
+ @Override
+ protected void setValueFromId(EObject object, EReference eReference, String ids) {
+
+ Object value = null;
+ // Handle QNames and arbitrary strings in BPMN2 element references
+ if ( qnameMap.contains(eReference) ) {
+ // This reference might be a QName (according to the BPMN2 spec!)
+ // or it might not, in the case of some jBPM Java type references.
+ int i = ids.indexOf(":"); //$NON-NLS-1$
+ if (i>0) {
+ // if the ID string is a QName, try to resolve and load the object
+ String prefix = ids.substring(0,i);
+ String localname = ids.substring(i+1);
+ String namespace = helper.getNamespaceURI(prefix);
+ if (namespace!=null && namespace.equals(targetNamespace)) {
+ // namespace for prefix is the same as targetNamespace
+ // so remove the prefix to avoid confusing the XMLHandler
+ ids = localname;
+ }
+ else {
+ // this thing is in another namespace, possibly in an external document
+ Import imp = importHandler.findImportForNamespace(helper.getResource(), namespace);
+ if (imp!=null) {
+ value = importHandler.getObjectForLocalname(imp, object, eReference, localname);
+ }
+ }
+ }
+
+ if (value==null) {
+ // we can't find the object in any of our imports,
+ // so create a string wrapper EObject for this thing
+ value = ModelUtil.createStringWrapper(ids);
+ }
+
+ if (value!=null && eReference.getEType().isInstance(value)) {
+ try {
+ if (eReference.isMany()) {
+ ((EList)object.eGet(eReference)).add(value);
+ }
+ else {
+ object.eSet(eReference, value);
+ }
+ return;
+ } catch (Exception e) {
+ String msg = NLS.bind(
+ Messages.Bpmn2ModelerResourceImpl_Invalid_Reference,
+ new Object[] {object, eReference, value});
+ IStatus s = new Status(Status.ERROR, Activator.PLUGIN_ID,
+ msg, e);
+ Activator.getDefault().logStatus(s);
+ }
+ }
+ }
+
+ // And yet another hack to deal with files generated by Savara:
+ // Savara creates some object references as QNames and, while the
+ // "Official" BPMN 2.0 xsd says these SHOULD be QNames, the bpmn2 EMF
+ // model has these defined as "resolveProxies=false" which means they
+ // will NOT get resolved.
+ if (/*!eReference.isResolveProxies() && */ids.contains(":")) { //$NON-NLS-1$
+ // Resolve QNames here: if they are internal objects,
+ // simply replace the ID string with the URI fragment.
+ // If they are not internal objects, then there's a
+ // problem with the file!
+ String resolvedId = ((QNameURIHandler) uriHandler).convertQNameToUri(ids);
+ URI resolvedURI = URI.createURI(resolvedId);
+ URI resourceURI = xmlResource.getURI();
+ if (resolvedURI.trimFragment().equals(resourceURI))
+ ids = resolvedURI.fragment();
+ }
+ super.setValueFromId(object, eReference, ids);
+ }
+
+ public int getLineNumber() {
+ return super.getLineNumber();
+ }
+
+ public int getColumnNumber() {
+ return super.getColumnNumber();
+ }
+
+ public String getLocation() {
+ return super.getLocation();
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String name) {
+ super.startElement(uri, localName, name);
+ EObject peekObject = objects.peekEObject();
+// if (peekObject instanceof Definitions) {
+// // create all model extensions for this target runtime so that all
+// // extension attributes and elements are available during loading.
+// TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+// rt.createModelExtensions(peekObject.eResource());
+// }
+ if (peekObject!=null && peekObject.eClass() == Bpmn2Package.eINSTANCE.getExpression()) {
+ // If the element is an Expression (not a FormalExpression) then use the CDATA
+ // as the body of a Formal Expression (because Expression does not have a body)
+ text = new StringBuffer();
+ }
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String name) {
+ EObject peekObject = objects.peek();
+ if (peekObject instanceof Expression) {
+ // if the element is an Expression, replace it with a FormalExpression and set
+ // its body using the CDATA of the Expression element.
+ FormalExpression fe = Bpmn2Factory.eINSTANCE.createFormalExpression();
+ EObject owner = peekObject.eContainer();
+ if (owner!=null) {
+ for (EStructuralFeature f : owner.eClass().getEAllStructuralFeatures()) {
+ if (owner.eGet(f) == peekObject) {
+ owner.eSet(f, fe);
+ break;
+ }
+ }
+ objects.pop();
+ objects.push(fe);
+ types.pop();
+ types.push(Bpmn2Package.eINSTANCE.getFormalExpression_Body());
+
+ EStructuralFeature mixedFeature = extendedMetaData.getMixedFeature(fe.eClass());
+ if (mixedFeature != null)
+ {
+ mixedTargets.push((FeatureMap)fe.eGet(mixedFeature));
+ }
+ else
+ {
+ mixedTargets.push(null);
+ }
+ }
+ }
+ super.endElement(uri, localName, name);
+ }
+ }
+
+ public class Bpmn2ModelerXMLSave extends XMLSaveImpl {
+ protected float minX = Float.MAX_VALUE;
+ protected float minY = Float.MAX_VALUE;
+ protected int lineNum = 1;
+ protected int lineOffset = 0;
+
+ @SuppressWarnings("serial")
+ protected class Bpmn2ModelerXMLString extends XMLString {
+ public Bpmn2ModelerXMLString(String publicId, String systemId) {
+ super(Integer.MAX_VALUE, publicId, systemId, null);
+ }
+ @Override
+ public void addAttribute(String name, String value) {
+ // This special little hack removes namespace declarations
+ // and schemaLocation attributes for the XSI namespace if the prefix
+ // is anything other than "xsi". The EMF serializers rely on the fact
+ // that the XSI namespace prefix is ALWAYS "xsi" and they WILL create
+ // a duplicate namespace declaration if one already existed under a
+ // different prefix. This would result a nasty warning from the parser.
+ if (XSI_URI.equals(value) && name.startsWith("xmlns:")) { //$NON-NLS-1$
+ int i = name.indexOf(":"); //$NON-NLS-1$
+ String prefix = name.substring(i+1);
+ if (!ExtendedMetaData.XSI_PREFIX.equals(prefix))
+ return;
+ }
+ if (name.contains(":schemaLocation")) { //$NON-NLS-1$
+ if (!XSI_SCHEMA_LOCATION.equals(name))
+ return;
+ }
+ super.addAttribute(name, value);
+ }
+
+ @Override
+ public void addAttributeNS(String prefix, String localName, String value) {
+ // Same hack as above - see comments.
+ if (XSI_URI.equals(value) && !ExtendedMetaData.XSI_PREFIX.equals(localName))
+ return;
+ super.addAttributeNS(prefix, localName, value);
+ }
+
+ @Override
+ public void addLine() {
+ ++lineNum;
+ super.addLine();
+ lineOffset = getLength();
+ }
+
+ public int getLineNum() {
+ return lineNum;
+ }
+
+ public int getColumnNum() {
+ return getLength() - lineOffset + 1;
+ }
+ };
+
+ public Bpmn2ModelerXMLSave(XMLHelper helper) {
+ super(helper);
+ helper.getPrefixToNamespaceMap().clear();
+ }
+
+ @Override
+ protected void addNamespaceDeclarations() {
+ EMap<String,String> map = helper.getPrefixToNamespaceMap();
+ Definitions definitions = ModelUtil.getDefinitions(helper.getResource());
+ String typeLanguage = definitions.getTypeLanguage();
+ if (!map.containsValue(typeLanguage)) {
+ String prefix = "tl"; //$NON-NLS-1$
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ TypeLanguageDescriptor tld = rt.getTypeLanguageDescriptor(typeLanguage);
+ if (tld!=null)
+ prefix = tld.getPrefix();
+ doc.addAttributeNS(XMLResource.XML_NS, prefix, typeLanguage);
+ }
+ super.addNamespaceDeclarations();
+ }
+
+ @Override
+ protected void init(XMLResource resource, Map<?, ?> options) {
+ super.init(resource, options);
+ featureTable = new Bpmn2ModelerXMLSave.Bpmn2Lookup(map, extendedMetaData, elementHandler);
+
+ final List<BPMNDiagram> diagrams = getAll(BPMNDiagram.class, resource);
+ for (BPMNDiagram bpmnDiagram : diagrams) {
+ findMinXY(bpmnDiagram);
+ }
+
+ doc = createXMLString();
+ }
+
+ protected XMLString createXMLString() {
+ return new Bpmn2ModelerXMLString(publicId, systemId);
+ }
+
+ protected Bpmn2ModelerXMLString getXMLString() {
+ if (doc==null) {
+ createXMLString();
+ }
+ return (Bpmn2ModelerXMLString)doc;
+ }
+
+ @Override
+ protected void endSave(List<? extends EObject> contents) throws IOException
+ {
+ Bpmn2ModelerDocumentRootImpl documentRoot = null;
+ if (contents.size()>0 && contents.get(0) instanceof Bpmn2ModelerDocumentRootImpl) {
+ documentRoot = (Bpmn2ModelerDocumentRootImpl)contents.get(0);
+ documentRoot.setDeliver(false);
+ }
+
+ super.endSave(contents);
+
+ if (documentRoot!=null) {
+ documentRoot.setDeliver(true);
+ }
+ }
+
+ @Override
+ protected boolean shouldSaveFeature(EObject o, EStructuralFeature f) {
+ if (o instanceof BPMNShape && f==BpmnDiPackage.eINSTANCE.getBPMNShape_IsHorizontal()) {
+ BPMNShape s = (BPMNShape)o;
+ if (s.getBpmnElement() instanceof Lane || s.getBpmnElement() instanceof Participant)
+ return true;
+ }
+
+ // we also want to store x and y with value zero, would be skipped because of default value otherwise
+ if (o instanceof Bounds || o instanceof Point) {
+ return true;
+ }
+
+ // empty Expressions should not be saved
+ if (f!=null && (f.getEType() == Bpmn2Package.eINSTANCE.getExpression() ||
+ f.getEType() == Bpmn2Package.eINSTANCE.getFormalExpression())) {
+ Expression expression = (Expression)o.eGet(f);
+ if (expression==null)
+ return false;
+ if (expression instanceof FormalExpression) {
+ FormalExpression formalExpression = (FormalExpression)expression;
+ String body = ModelUtil.getExpressionBody(formalExpression);
+ if (body==null) {
+ return false;
+ }
+ }
+ }
+
+ if (o!=null && o instanceof Documentation) {
+ Documentation doc = (Documentation)o;
+ if (doc.getText()==null || doc.getText().isEmpty())
+ return false;
+ }
+
+ if (f!=null && f.getEType() == Bpmn2Package.eINSTANCE.getDocumentation()) {
+ EList<Documentation> docList = (EList<Documentation>)o.eGet(f);
+ if (docList.isEmpty())
+ return false;
+ int empty = 0;
+ for (Documentation doc : docList) {
+ if (doc.getText()==null || doc.getText().isEmpty())
+ ++empty;
+ }
+ if (empty==docList.size())
+ return false;
+ }
+
+ // don't serialize the "body" attribute of FormalExpressions because the expression text
+ // is already in the CDATA section of the <bpmn2:expression> element. This would cause
+ // the expression text to be duplicated on deserialization.
+ // Same goes for Documentation.text
+ if (Bpmn2Package.eINSTANCE.getFormalExpression_Body().equals(f) ||
+ Bpmn2Package.eINSTANCE.getDocumentation_Text().equals(f))
+ return false;
+
+ // don't save Assignments if they are invalid: Assignments must have
+ // both a "from" and "to" expression and they may not be empty strings.
+ if (o instanceof DataAssociation && "assignment".equals(f.getName())) { //$NON-NLS-1$
+ DataAssociation da = (DataAssociation)o;
+ for (Assignment a : da.getAssignment()) {
+ Expression from = a.getFrom();
+ if (from instanceof FormalExpression) {
+ String body = ModelUtil.getExpressionBody(((FormalExpression)from));
+ if (body==null || body.isEmpty())
+ return false;
+ }
+ Expression to = a.getTo();
+ if (to instanceof FormalExpression) {
+ String body = ModelUtil.getExpressionBody(((FormalExpression)to));
+ if (body==null || body.isEmpty())
+ return false;
+ }
+ }
+ }
+
+ if (f == Bpmn2Package.eINSTANCE.getBaseElement_ExtensionValues()) {
+ // check if this element is (or should be) empty
+ boolean shouldSave = false;
+ for (ExtensionAttributeValue ev : (EList<ExtensionAttributeValue>)o.eGet(f)) {
+ BasicFeatureMap map = (BasicFeatureMap) ev.getValue();
+ Iterator<FeatureMap.Entry> mi = map.iterator();
+ while (mi.hasNext()) {
+ FeatureMap.Entry entry = mi.next();
+ Object v = entry.getValue();
+ if (v instanceof EObject) {
+ Iterator<Adapter> ai = ((EObject)v).eAdapters().iterator();
+ while (ai.hasNext()) {
+ Adapter a = ai.next();
+ if (a instanceof IExtensionValueAdapter) {
+ if (((IExtensionValueAdapter)a).shouldSaveElement((EObject)v)) {
+ shouldSave = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ return shouldSave;
+ }
+
+ Iterator<Adapter> ai = o.eAdapters().iterator();
+ while (ai.hasNext()) {
+ Adapter a = ai.next();
+ if (a instanceof IExtensionValueAdapter) {
+ if (!((IExtensionValueAdapter)a).shouldSaveFeature(o,f))
+ return false;
+ }
+ }
+
+ return super.shouldSaveFeature(o, f);
+ }
+
+ protected <T> List<T> getAll(Class<T> class1, Resource resource) {
+ ArrayList<T> l = new ArrayList<T>();
+ TreeIterator<EObject> contents = resource.getAllContents();
+ for (; contents.hasNext();) {
+ Object t = contents.next();
+ if (class1.isInstance(t)) {
+ l.add((T) t);
+ }
+ }
+ return l;
+ }
+
+ protected void findMinXY(BPMNDiagram bpmnDiagram) {
+ EList<DiagramElement> elements = (EList<DiagramElement>) bpmnDiagram.getPlane().getPlaneElement();
+ for (DiagramElement e : elements) {
+ if (e instanceof BPMNShape) {
+ Bounds b = ((BPMNShape)e).getBounds();
+ minX = Math.min(minX, b.getX());
+ minY = Math.min(minY, b.getY());
+ }
+ else if (e instanceof BPMNEdge) {
+ List<Point> points = ((BPMNEdge)e).getWaypoint();
+ for (Point p : points) {
+ minX = Math.min(minX, p.getX());
+ minY = Math.min(minY, p.getY());
+ }
+
+ }
+ else if (e instanceof BPMNLabel) {
+ Bounds b = ((BPMNLabel)e).getBounds();
+ minX = Math.min(minX, b.getX());
+ minY = Math.min(minY, b.getY());
+ }
+ }
+ }
+
+ @Override
+ protected void saveContainedMany(EObject o, EStructuralFeature f) {
+ if (o instanceof BPMNPlane && f==DiPackage.eINSTANCE.getPlane_PlaneElement()) {
+ // Sort the Diagram Elements in ascending Z-order
+ BPMNPlane plane = (BPMNPlane) o;
+ EList<DiagramElement> originalList = new BasicEList<DiagramElement>();
+ originalList.addAll(plane.getPlaneElement());
+
+ plane.eSetDeliver(false);
+ ECollections.sort((EList<DiagramElement>) plane.getPlaneElement(), new DIZorderComparator());
+ super.saveContainedMany(o, f);
+ ECollections.setEList((EList)plane.getPlaneElement(),originalList);
+ plane.eSetDeliver(true);
+ }
+ else if (o instanceof Definitions && f==Bpmn2Package.eINSTANCE.getDefinitions_RootElements()) {
+ // Sort the Definitions Root Elements to avoid forward references
+ Definitions definitions = (Definitions) o;
+ EList<RootElement> originalList = new BasicEList<RootElement>();
+ originalList.addAll(definitions.getRootElements());
+
+ definitions.eSetDeliver(false);
+ ECollections.sort((EList<RootElement>)definitions.getRootElements(), new RootElementComparator());
+ super.saveContainedMany(o, f);
+ ECollections.setEList((EList)definitions.getRootElements(),originalList);
+ definitions.eSetDeliver(true);
+ }
+ else {
+ super.saveContainedMany(o, f);
+ }
+ }
+
+ @Override
+ protected void saveElement(EObject o, EStructuralFeature f) {
+
+ Iterator<Adapter> ai = o.eAdapters().iterator();
+ while (ai.hasNext()) {
+ Adapter a = ai.next();
+ if (a instanceof IExtensionValueAdapter) {
+ if (!((IExtensionValueAdapter)a).shouldSaveElement(o))
+ return;
+ }
+ }
+
+ float oldX = 0, oldY = 0;
+ List<Point> oldPoints = null;
+
+ if (minX<0 || minY<0) {
+ if (o instanceof BPMNShape) {
+ Bounds b = ((BPMNShape)o).getBounds();
+ b.eSetDeliver(false);
+ if (minX<0) {
+ oldX = b.getX();
+ b.setX(oldX - minX);
+ }
+ if (minY<0) {
+ oldY = b.getY();
+ b.setY(oldY - minY);
+ }
+ }
+ else if (o instanceof BPMNEdge) {
+ List<Point> points = ((BPMNEdge)o).getWaypoint();
+ oldPoints = new ArrayList<Point>();
+ for (Point p : points) {
+ p.eSetDeliver(false);
+ Point oldPoint = DcFactory.eINSTANCE.createPoint();
+ oldPoint.setX(p.getX());
+ oldPoint.setY(p.getY());
+ oldPoints.add(oldPoint);
+ if (minX<0)
+ p.setX( p.getX() - minX);
+ if (minY<0)
+ p.setY( p.getY() - minY);
+ }
+ }
+ else if (o instanceof BPMNLabel) {
+ Bounds b = ((BPMNLabel)o).getBounds();
+ if (b!=null) {
+ b.eSetDeliver(false);
+ if (minX<0) {
+ oldX = b.getX();
+ b.setX(oldX - minX);
+ }
+ if (minY<0) {
+ oldY = b.getY();
+ b.setY(oldY - minY);
+ }
+ }
+ }
+ }
+
+ super.saveElement(o, f);
+
+ if (minX<0 || minY<0) {
+ if (o instanceof BPMNShape) {
+ Bounds b = ((BPMNShape)o).getBounds();
+ if (minX<0) {
+ b.setX(oldX);
+ }
+ if (minY<0) {
+ b.setY(oldY);
+ }
+ b.eSetDeliver(true);
+ }
+ else if (o instanceof BPMNEdge) {
+ List<Point> points = ((BPMNEdge)o).getWaypoint();
+ int index = 0;
+ for (Point p : points) {
+ if (minX<0)
+ p.setX(oldPoints.get(index).getX());
+ if (minY<0)
+ p.setY(oldPoints.get(index).getY());
+ p.eSetDeliver(true);
+ ++index;
+ }
+ }
+ else if (o instanceof BPMNLabel) {
+ Bounds b = ((BPMNLabel)o).getBounds();
+ if (b!=null) {
+ if (minX<0) {
+ b.setX(oldX);
+ }
+ if (minY<0) {
+ b.setY(oldY);
+ }
+ b.eSetDeliver(true);
+ }
+ }
+ }
+ }
+
+ @Override
+ protected String convertURI(String s) {
+ URI uri = helper.deresolve( URI.createURI(s) );
+ return uri.toString();
+ }
+
+ @Override
+ public void traverse(List<? extends EObject> contents) {
+ for (EObject e : contents) {
+ if (e instanceof Definitions) {
+ List<RootElement> roots = ((Definitions) e).getRootElements();
+ Process p = null;
+ for (RootElement root : roots) {
+ if (root instanceof Process) {
+ p = (Process) root;
+ }
+ }
+ if (p != null) {
+ ((Definitions) e).getRootElements().remove(p);
+ ((Definitions) e).getRootElements().add((RootElement) p);
+ }
+ }
+ }
+ super.traverse(contents);
+ }
+
+ public class Bpmn2Lookup extends XMLSaveImpl.Lookup {
+ public Bpmn2Lookup(XMLMap map, ExtendedMetaData extendedMetaData, ElementHandler elementHandler) {
+ super(map, extendedMetaData, elementHandler);
+ }
+
+ @Override
+ public EStructuralFeature[] getFeatures(EClass cls) {
+ int index = getIndex(cls);
+ EClass c = classes[index];
+
+ if (c == cls) {
+ return features[index];
+ }
+
+ EStructuralFeature[] featureList = listFeatures(cls);
+ EStructuralFeature[] newFeatureList = featureList;
+ if (c == null) {
+ newFeatureList = reorderFeatureList(cls, featureList);
+ classes[index] = cls;
+ features[index] = newFeatureList;
+ featureKinds[index] = listKinds(newFeatureList);
+ }
+ return newFeatureList;
+ }
+
+ /**
+ * Specifies the serialization order of features for a given ECLass.
+ * Subclasses should override this behavior.
+ * The default implementation simply returns the original list.
+ *
+ * @param cls - EClass whose features need to be reordered
+ * @param featureList - the original feature list as provided by the Bpmn2Package
+ * @return a feature list that specifies the new ordering
+ */
+ protected EStructuralFeature[] reorderFeatureList(EClass cls, EStructuralFeature[] featureList) {
+ return featureList;
+ }
+
+ /**
+ * Change the serialization order of features for a given EClass. The string array "featureNames"
+ * specifies a new ordering for some or all of the features in the feature list; these names must
+ * be contiguous in the original list. For example, given the following original feature list:
+ *
+ * "w"
+ * "x"
+ * "a"
+ * "b"
+ * "c"
+ * "d"
+ * "e"
+ * "y"
+ * "z"
+ *
+ * The featureNames list may not contain this:
+ *
+ * "b"
+ * "a"
+ * "e"
+ * "d"
+ *
+ * because the two sets "b", "a" and "e", "d" are not contiguous. The correct way of specifying this is:
+ *
+ * "b"
+ * "a"
+ * "c"
+ * "e"
+ * "d"
+ *
+ * Alternatively, the client could call this method twice, the first time with the first set ("b" and "a")
+ * and a second time with the second set ("e" and "d).
+ *
+ * @param cls
+ * @param featureList
+ * @param featureNames
+ * @return
+ */
+ protected EStructuralFeature[] reorderFeatureList(EClass cls, EStructuralFeature[] featureList, String[] featureNames) {
+ // the reordered list of features
+ EStructuralFeature[] newFeatureList = new EStructuralFeature[featureList.length];
+ // map of old to new array indexes
+ int[] indexMap = new int[featureList.length];
+ for (int i=0; i<indexMap.length; ++i)
+ indexMap[i] = -1;
+
+ int startIndex = Integer.MAX_VALUE;
+ for (int i=0; i<featureList.length; ++i) {
+ for (int j=0; j<featureNames.length; ++j) {
+ if (featureList[i].getName().equals(featureNames[j])) {
+ if (i<startIndex) {
+ startIndex = i;
+ break;
+ }
+ }
+ }
+ }
+
+ for (int newIndex=0; newIndex<featureNames.length; ++newIndex) {
+ String fn = featureNames[newIndex];
+ for (int oldIndex=0; oldIndex<featureList.length; ++oldIndex) {
+ EStructuralFeature f = featureList[oldIndex];
+ if (f.getName().equalsIgnoreCase(fn)) {
+ indexMap[oldIndex] = newIndex + startIndex;
+ break;
+ }
+ }
+ }
+
+ for (int oldIndex=0; oldIndex<featureList.length; ++oldIndex) {
+ EStructuralFeature f = featureList[oldIndex];
+ int newIndex = indexMap[oldIndex];
+ if (newIndex>=0) {
+ newFeatureList[newIndex] = featureList[oldIndex];
+ }
+ else
+ newFeatureList[oldIndex] = featureList[oldIndex];
+ }
+ return newFeatureList;
+ }
+ }
+ }
+
+ // TODO check this, is this the correct way to deal with this ID prefixes
+ /**
+ * QName handler to make create URIs out of the fragment, which is the local part of the QName
+ *
+ * Most other tools dont understand QNames in referencing attributes
+ *
+ * @author drobisch
+ *
+ */
+ public static class FragmentQNameURIHandler extends QNameURIHandler {
+
+ protected BpmnXmlHelper xmlHelper;
+
+ public FragmentQNameURIHandler(BpmnXmlHelper xmlHelper) {
+ super(xmlHelper);
+ this.xmlHelper = xmlHelper;
+ }
+
+ @Override
+ public URI resolve(URI uri) {
+ URI resolvedUri = super.resolve(uri);
+ if (resolvedUri.isRelative())
+ resolvedUri = resolvedUri.resolve(baseURI);
+ return resolvedUri;
+ }
+
+ @Override
+ public URI deresolve(URI uri) {
+ String fragment = uri.fragment();
+ if (fragment != null && !fragment.startsWith("/")) { //$NON-NLS-1$
+ // return just fragment (i.e. without the '#') but only if local reference
+ URI otherURI = uri.trimFragment();
+ if (baseURI.equals(otherURI))
+ return URI.createURI(fragment);
+ }
+
+ if (
+ (uri.isPlatformResource() && baseURI.isPlatformResource()) ||
+ (uri.isFile() && baseURI.isFile())) {
+ uri = uri.deresolve(baseURI, false, true, true);
+ return uri;
+ }
+ return super.deresolve(uri);
+ }
+
+ @Override
+ public String convertQNameToUri(String qName) {
+ if (qName.contains("#") || qName.contains("/")) { //$NON-NLS-1$ //$NON-NLS-2$
+ // We already have an URI and not QName, e.g. URL
+ return qName;
+ }
+
+ // Split into prefix and local part (fragment)
+ String[] parts = qName.split(":"); //$NON-NLS-1$
+ String prefix, fragment;
+ if (parts.length == 1) {
+ prefix = null;
+ fragment = qName;
+ } else if (parts.length == 2) {
+ prefix = parts[0];
+ fragment = parts[1];
+ } else
+ throw new IllegalArgumentException(Messages.Bpmn2ModelerResourceImpl_Illegal_QName + qName);
+
+ if (fragment.contains(".")) { //$NON-NLS-1$
+ // HACK: officially IDs can contain ".", but unfortunately
+ // XmlHandler calls resolve also for xsi:schemaLocation stuff
+ // and similar, that are
+ // NO URIs. We must not process them.
+ return qName;
+ }
+
+ boolean isTargetNamespacePrefix = false;
+ try {
+ isTargetNamespacePrefix = xmlHelper.isTargetNamespace(prefix);
+ } catch (Exception e) {
+ }
+
+ if (!isTargetNamespacePrefix) {
+ String uriString = xmlHelper.getPathForPrefix(prefix).appendFragment(fragment).toString();
+ URI uri = URI.createURI(uriString);
+ ResourceSet rs = ModelUtil.slightlyHackedResourceSet(xmlHelper.getResource().getResourceSet());
+ Resource r = ((Bpmn2ModelerResourceSetImpl)rs).getResource(uri, true, "wsdl"); // the only problem here... //$NON-NLS-1$
+ if (r instanceof WSDLResourceImpl) {
+ EObject o = r.getContents().get(0);
+ Definition def = (Definition)o;
+ // if eReference -- operation.implementationref
+ // search all of these:
+ for (PortType pt : (List<PortType>)def.getEPortTypes()) {
+ for (org.eclipse.wst.wsdl.Operation op : (List<org.eclipse.wst.wsdl.Operation>)pt.getEOperations()) {
+
+ }
+ }
+ // and so on for other eReference bpmn2 types
+ }
+ return xmlHelper.getPathForPrefix(prefix).appendFragment(fragment).toString();
+ }
+ else {
+ return URI.createURI("").appendFragment(fragment).toString(); //$NON-NLS-1$
+ }
+ }
+ }
+
+ public static class Bpmn2ModelerXmlHelper extends BpmnXmlHelper {
+
+ // List of all EReferences that are defined as type="xsd:QName" in the BPMN 2.0 Schema
+ // This information is not represented in the MDT BPMN2 project metamodel.
+ boolean isQNameFeature = false;
+ ImportUtil importHandler = new ImportUtil();
+
+ public Bpmn2ModelerXmlHelper(Bpmn2ResourceImpl resource) {
+ super(resource);
+ }
+
+ @Override
+ public Object getValue(EObject eObject, EStructuralFeature eStructuralFeature) {
+ Object o = super.getValue(eObject, eStructuralFeature);
+ if (qnameMap.contains(eStructuralFeature)) {
+ List<String> prefixes = urisToPrefixes.get(getTargetNamespace());
+ if (prefixes!=null && prefixes.contains("")) //$NON-NLS-1$
+ isQNameFeature = false;
+ else
+ isQNameFeature = true;
+ }
+ else
+ isQNameFeature = false;
+ return o;
+ }
+
+ @Override
+ public String getHREF(EObject obj) {
+ // convert the attribute ID references to a QName
+ String s = null;
+ if (ModelUtil.isStringWrapper(obj)) {
+ s = ModelUtil.getStringWrapperValue(obj);
+ }
+ else
+ s = super.getHREF(obj);
+ if (isQNameFeature) {
+ if (s!=null && s.contains("#")) { //$NON-NLS-1$
+ // object is a reference possibly to another document
+ Import imp = importHandler.findImportForObject(resource, obj);
+ if (imp!=null) {
+ String localname = importHandler.getLocalnameForObject(obj);
+ if (localname!=null) {
+ String prefix = NamespaceUtil.getPrefixForNamespace(resource, imp.getNamespace());
+ if (prefix!=null) {
+ s = prefix + ":" + localname; //$NON-NLS-1$
+ return s;
+ }
+ }
+ }
+ }
+ }
+
+ return s;
+ }
+
+ public String getIDREF(EObject obj) {
+ // convert the element ID references to a QName
+ String s = super.getIDREF(obj);
+ if (isQNameFeature && !ModelUtil.isStringWrapper(obj))
+ s = convertToQName(s);
+ return s;
+ }
+
+ /**
+ * Returns the targetNamespace defined in the <definitions> root element.
+ *
+ * @return a namespace URI or null if targetNamespace is not defined.
+ */
+ private String getTargetNamespace() {
+ Definitions definitions = ModelUtil.getDefinitions(getResource());
+ if (definitions==null)
+ return null;
+ return definitions.getTargetNamespace();
+ }
+
+ /**
+ * Get the namespace prefix for the targetNamespace.
+ *
+ * @return null if the document does not define a targetNamespace,
+ * an empty string if there is a targetNamespace, but no prefix has been
+ * defined for it, or the prefix for the targetNamespace
+ *
+ * Examples:
+ *
+ * <bpmn2:definitions tns="http://eclipse.org/example" targetNamespace="http://eclipse.org/example"/>
+ * return "tns"
+ *
+ * <bpmn2:definitions targetNamespace="http://eclipse.org/example"/>
+ * returns ""
+ *
+ * <bpmn2:definitions tns="http://eclipse.org/example"/>
+ * returns null
+ */
+ private String getTargetNamespacePrefix() {
+ String targetNamespace = getTargetNamespace();
+ if (targetNamespace!=null && !targetNamespace.isEmpty()) {
+ String prefix = getPrefix(targetNamespace);
+ if (prefix==null || prefix.isEmpty()) {
+ for (Entry<String, String> e : this.getPrefixToNamespaceMap().entrySet()) {
+ if (targetNamespace.equals(e.getValue()) && !e.getKey().isEmpty()) {
+ return e.getKey();
+ }
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+ return null;
+ }
+
+ /**
+ * Converts the NCName "s" to a QName that maps to the targetNamespace
+ *
+ * @param s - a non-colonized name string
+ * @return the string "s" prefixed with the NS prefix for the targetNamespace.
+ */
+ private String convertToQName(String s) {
+ if (s!=null && !s.contains(":")) { //$NON-NLS-1$
+ String prefix = getTargetNamespacePrefix();
+ if (prefix!=null && !prefix.isEmpty()) {
+ s = prefix + ":" + s; //$NON-NLS-1$
+ }
+ }
+ return s;
+ }
+
+ public void setValue(EObject object, EStructuralFeature feature, Object value, int position) {
+ // fix some kind of bug which causes duplicate entries in objects that have
+ // mutual reference lists.
+ if ( object!=null
+ && feature!=null
+ && object.eClass()!=null
+ && feature == object.eClass().getEStructuralFeature(feature.getFeatureID())
+ ) {
+ Object v = object.eGet(feature);
+ if (v instanceof EObjectWithInverseEList) {
+ EObjectWithInverseEList list = (EObjectWithInverseEList)v;
+ if (list.contains(value)) {
+ // it's already in there!
+ return;
+ }
+ }
+ }
+
+// // check if we need to change the attribute's data type:
+// if (feature instanceof EAttribute) {
+// // and only if the attribute's data type is "Object"
+// EClassifier t = feature.getEType();
+// if (t!=null && t.getInstanceClass() == Object.class) {
+// // search for the attribute in the target runtime's Custom Task and
+// // Model Extension definitions by name
+// List<Property>properties = new ArrayList<Property>();
+// TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+// String className = object.eClass().getName();
+// String featureName = feature.getName();
+// for (CustomTaskDescriptor ctd : rt.getCustomTasks()) {
+// if (className.equals(ctd.getType())) {
+// properties.addAll(ctd.getProperties());
+// }
+// }
+// for (ModelExtensionDescriptor med : rt.getModelExtensions()) {
+// if (className.equals(med.getType())) {
+// properties.addAll(med.getProperties());
+// }
+// }
+// for (Property p : properties) {
+// if (p.name.equals(featureName)) {
+// String type = p.type;
+// if (type==null)
+// type = "EString"; //$NON-NLS-1$
+// EClassifier eClassifier = ModelDecorator.findEClassifier(
+// rt.getModelDescriptor().getEPackage(),type);
+// if (eClassifier instanceof EDataType) {
+// feature.setEType(eClassifier);
+// }
+// break;
+// }
+// }
+// }
+// }
+
+ super.setValue(object, feature, value, position);
+ }
+
+ @Override
+ public EStructuralFeature getFeature(EClass eClass, String nsURI, String name, boolean isElement) {
+ // This fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=378296
+ // I'm still not convinced that getFeature() shouldn't simply return the feature
+ // from the given EClass instead of searching the EPackage of the Resource being
+ // loaded (if the EClass has a feature with that name of course).
+ EStructuralFeature feature = null;
+ EPackage pkg = eClass.getEPackage();
+ if (pkg != Bpmn2Package.eINSTANCE &&
+ pkg != BpmnDiPackage.eINSTANCE &&
+ pkg != DcPackage.eINSTANCE &&
+ pkg != DiPackage.eINSTANCE &&
+ pkg != TargetRuntime.getCurrentRuntime().getModelDescriptor().getEPackage()) {
+ feature = eClass.getEStructuralFeature(name);
+ }
+ if (feature==null)
+ feature = super.getFeature(eClass, nsURI, name, isElement);
+ return feature;
+ }
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceSetImpl.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceSetImpl.java
index 8fe8426b..6b8d615b 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceSetImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Bpmn2ModelerResourceSetImpl.java
@@ -19,6 +19,7 @@ import java.util.Map;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.utils.ErrorDialog;
import org.eclipse.bpmn2.util.Bpmn2ResourceFactoryImpl;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
@@ -196,8 +197,10 @@ public class Bpmn2ModelerResourceSetImpl extends ResourceSetImpl implements IRes
}
}
+// System.out.println("Loading Resource "+uri);
URIConverter theURIConverter = getURIConverter();
URI normalizedURI = theURIConverter.normalize(uri);
+// System.out.println(" Normalized="+normalizedURI);
for (Resource resource : getResources()) {
if (theURIConverter.normalize(resource.getURI()).equals(
@@ -287,7 +290,7 @@ public class Bpmn2ModelerResourceSetImpl extends ResourceSetImpl implements IRes
}
if (wsdlFactory==null) {
- wsdlFactory = WSDLResourceFactoryRegistry.INSTANCE.getExtensionToFactoryMap().get("wsdl");
+ wsdlFactory = WSDLResourceFactoryRegistry.INSTANCE.getExtensionToFactoryMap().get("wsdl"); //$NON-NLS-1$
}
contentTypeToFactoryMap.put("wsdl", wsdlFactory); //$NON-NLS-1$
@@ -390,26 +393,17 @@ public class Bpmn2ModelerResourceSetImpl extends ResourceSetImpl implements IRes
try {
String taskName = NLS.bind(Messages.Bpmn2ModelerResourceSetImpl_Loading_Title, resource.getURI());
monitor.beginTask(taskName, IProgressMonitor.UNKNOWN);
+ resource.eSetDeliver(false);
Bpmn2ModelerResourceSetImpl.super.demandLoadHelper(resource);
if (!resource.isLoaded()) {
throw new Exception(Messages.Bpmn2ModelerResourceSetImpl_Loading_Resource_Not_Found);
}
}
catch (final Exception e) {
- Display.getDefault().syncExec(new Runnable() {
-
- @Override
- public void run() {
- String msg = e.getMessage();
- if (e instanceof InvocationTargetException) {
- msg = ((InvocationTargetException) e).getTargetException().getMessage();
- }
- MessageDialog.openError(Display.getDefault().getActiveShell(),
- Messages.Bpmn2ModelerResourceSetImpl_Loading_Error,
- NLS.bind(Messages.Bpmn2ModelerResourceSetImpl_Loading_Error_Message,resource.getURI(),msg));
- }
-
- });
+ Activator.logError(e);
+ String msg = NLS.bind(Messages.Bpmn2ModelerResourceSetImpl_Loading_Error_Message,resource.getURI());
+ ErrorDialog dlg = new ErrorDialog(Messages.Bpmn2ModelerResourceSetImpl_Loading_Error, msg, e);
+ dlg.show();
}
finally {
monitor.done();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/DIZorderComparator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/DIZorderComparator.java
index fc420c55..fc420c55 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/DIZorderComparator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/DIZorderComparator.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Messages.java
index d0109e66..ac490b76 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.model;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecorator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecorator.java
new file mode 100644
index 00000000..e2eedc54
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecorator.java
@@ -0,0 +1,1364 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Collaboration;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.ExtensionAttributeValue;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.di.BpmnDiPackage;
+import org.eclipse.bpmn2.modeler.core.EDataTypeConversionFactory;
+import org.eclipse.bpmn2.modeler.core.adapters.AdapterRegistry;
+import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
+import org.eclipse.bpmn2.modeler.core.utils.Messages;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.dd.dc.DcPackage;
+import org.eclipse.dd.di.DiPackage;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EAttributeImpl;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.FeatureMap.Entry;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This class wraps an EPackage and provides methods for dynamic EMF.
+ */
+/**
+ *
+ */
+public class ModelDecorator {
+ final static EcoreFactory theCoreFactory = EcoreFactory.eINSTANCE;
+ public final static String DECORATOR_URI = "http://org.eclipse.bpmn2.modeler.core.decorator"; //$NON-NLS-1$
+
+ protected EPackage ePackage;
+ protected static ResourceSet resourceSet;
+ protected List<EPackage> relatedEPackages;
+
+ /**
+ * Construct a new EPackage for extension classes and features, and add the given
+ * EPackage to our list of related packages. The new EPackage will have the same
+ * namespace URI and prefix, but will be contained in a private ResourceSet,
+ * so there's no danger of contaminating the original EPackage.
+ *
+ * This allows extension plugins to define their own EMF models the traditional
+ * way (by generating Java implementations classes from an ecore file) but still
+ * supports dynamic extensions to those models.
+ *
+ * @param pkg
+ */
+ public ModelDecorator(EPackage pkg) {
+ Assert.isTrue( isValid(pkg) );
+ String name = pkg.getName()+" Dynamic Extensions"; //$NON-NLS-1$
+ String nsPrefix = pkg.getNsPrefix();
+ String nsURI = pkg.getNsURI();
+
+ addRelatedEPackage(pkg);
+// AdapterRegistry.INSTANCE.registerFactory(pkg, AnyTypeAdaptorFactory.INSTANCE);
+
+ getResourceSet();
+ ePackage = (EPackage) resourceSet.getPackageRegistry().get(nsURI);
+ if (ePackage==null) {
+ ePackage = createEPackage(name,nsPrefix,nsURI);
+ initPackage();
+ }
+ }
+
+ /**
+ * Construct a new EPackage for extension classes and features that will be
+ * defined dynamically.
+ *
+ * @param name
+ * @param nsPrefix
+ * @param nsURI
+ */
+ public ModelDecorator(String name, String nsPrefix, String nsURI) {
+ ePackage = (EPackage) getResourceSet().getPackageRegistry().get(nsURI);
+ if (ePackage==null) {
+ ePackage = createEPackage(name,nsPrefix,nsURI);
+ }
+ initPackage();
+ }
+
+ /**
+ * Dispose of our dynamic EPackage and all of its contained classes and features.
+ */
+ public void dispose() {
+ if (resourceSet!=null) {
+ if (ePackage!=null) {
+ ModelDecoratorAdapter mda = ModelDecoratorAdapter.getAdapter(ePackage);
+ if (mda!=null)
+ mda.dispose();
+ resourceSet.getPackageRegistry().remove(ePackage.getNsURI());
+ EcoreUtil.delete(ePackage);
+ }
+ }
+ }
+
+ /**
+ * Construct a private ResourceSet that will contain our dynamic EPackage.
+ *
+ * @return
+ */
+ private static ResourceSet getResourceSet() {
+ if (resourceSet==null)
+ resourceSet = new ResourceSetImpl();
+ return resourceSet;
+ }
+
+ /**
+ * Initialize our dynamic EPackage:
+ * - set our object factory to create adapted AnyType objects
+ * - add a ModelDecorator adapter to the EPackage so that clients can find us
+ * - add our DataTypeConversion factory for user-defined EDataTypes
+ */
+ private void initPackage() {
+ ePackage.setEFactoryInstance(new AnyTypeObjectFactory(this));
+ ModelDecoratorAdapter.adapt(this);
+ List<String> delegates = new ArrayList<String>();
+ delegates.add(EDataTypeConversionFactory.DATATYPE_CONVERSION_FACTORY_URI);
+ EcoreUtil.setConversionDelegates(ePackage, delegates);
+ AdapterRegistry.INSTANCE.registerFactory(ePackage, AnyTypeAdaptorFactory.INSTANCE);
+ }
+
+ /**
+ * Return our dynamic EPackage.
+ *
+ * @return
+ */
+ public EPackage getEPackage() {
+ Assert.isNotNull(ePackage);
+ return ePackage;
+ }
+
+ /**
+ * Return the dynamic EPackage for the given namespace URI.
+ *
+ * @param nsURI
+ * @return the dynamic EPackage or null if not found.
+ */
+ public static EPackage getEPackage(String nsURI) {
+ EPackage pkg = (EPackage) getResourceSet().getPackageRegistry().get(nsURI);
+ if (pkg!=null)
+ return pkg;
+
+ // check all related packages in all ModelDecorators in our ResourceSet
+ for (Map.Entry<String, Object> entry : getResourceSet().getPackageRegistry().entrySet()) {
+ ModelDecorator md = ModelDecoratorAdapter.getModelDecorator((EPackage) entry.getValue());
+ for (EPackage p : md.getRelatedEPackages()) {
+ if (p.getNsURI().equals(nsURI))
+ return p;
+ }
+ }
+
+ return null;
+ }
+
+ public static ModelDecorator getModelDecorator(String nsURI) {
+ EPackage pkg = getEPackage(nsURI);
+ if (pkg!=null) {
+ ModelDecoratorAdapter mda = AdapterUtil.adapt(pkg, ModelDecoratorAdapter.class);
+ if (mda!=null)
+ return mda.getModelDecorator();
+ }
+ return null;
+ }
+
+ /**
+ * Look up the ModelDecorator from the given feature by using that feature's namespace.
+ *
+ * @param feature
+ * @return the ModelDecorator that contains the given feature or null if the feature
+ * is not defined.
+ */
+ public static ModelDecorator getModelDecorator(EStructuralFeature feature) {
+ String nsURI = ExtendedMetaData.INSTANCE.getNamespace(feature);
+ return getModelDecorator(nsURI);
+ }
+
+ /**
+ * Add the given EPackage to the list of related packages.
+ * See the ModelDecorator(EPackage) constructor
+ *
+ * @param pkg
+ */
+ public void addRelatedEPackage(EPackage pkg) {
+ if (pkg!=ePackage && !getRelatedEPackages().contains(pkg))
+ getRelatedEPackages().add(pkg);
+ }
+
+ /**
+ * Return the list of related EPackages.
+ * See the ModelDecorator(EPackage) constructor
+ *
+ * @return a list of EPackage objects. The list may be empty.
+ */
+ public List<EPackage> getRelatedEPackages() {
+ if (relatedEPackages==null) {
+ relatedEPackages = new ArrayList<EPackage>();
+ }
+ return relatedEPackages;
+ }
+
+ /**
+ * Create our dynamic EPackage and add it to our private ResourceSet.
+ *
+ * @param name
+ * @param nsPrefix
+ * @param nsURI
+ * @return the newly created dynamic EPackage
+ */
+ private EPackage createEPackage(String name, String nsPrefix, String nsURI) {
+ ePackage = theCoreFactory.createEPackage();
+ ePackage.setName(name);
+ ePackage.setNsPrefix(nsPrefix);
+ ePackage.setNsURI(nsURI);
+
+ getResourceSet();
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new XMLResourceFactoryImpl()); //$NON-NLS-1$
+ resourceSet.getPackageRegistry().put(nsURI, ePackage);
+
+ return ePackage;
+ }
+
+ /**
+ * Parse a type string to return the list of supertypes. The type string is in
+ * the form
+ *
+ * "classname:supertype1,supertype2,..."
+ *
+ * this method returns the list of strings containing "supertype1", "supertype2", etc.
+ *
+ * @param type
+ * @return a list of strings or an empty list of no supertypes found.
+ */
+ private List<String> getSuperTypes(String type) {
+ List<String> supertypes = new ArrayList<String>();
+ if (type!=null && type.contains(":")) { //$NON-NLS-1$
+ String a[] = type.split(":"); //$NON-NLS-1$
+ if (a.length>1) {
+ a = a[1].split(","); //$NON-NLS-1$
+ }
+ else {
+ a = a[0].split(","); //$NON-NLS-1$
+ }
+ for (int i=0; i<a.length; ++i) {
+ supertypes.add(a[i]);
+ }
+ }
+ return supertypes;
+ }
+
+ /**
+ * Parse a type string to return the subclass name. The type string is in
+ * the form
+ *
+ * "classname:supertype1,supertype2,..."
+ *
+ * this method returns the "classname" portion.
+ *
+ * @param type
+ * @return a string containing only the type name
+ */
+ private String getType(String type) {
+ if (type!=null && type.contains(":")) { //$NON-NLS-1$
+ return type.split(":")[0]; //$NON-NLS-1$
+ }
+ return type;
+ }
+
+ /**
+ * Search for the EClassifier whose name is the type string.
+ *
+ * @param type - a type name string that may contain additional supertype names.
+ * @see getType(String)
+ * @return the EClassifier or null if not found.
+ */
+ public EClassifier getEClassifier(String type) {
+ type = getType(type);
+ EClassifier eClassifier = ePackage.getEClassifier(type);
+ if (eClassifier != null) {
+ return eClassifier;
+ }
+ for (EPackage p : getRelatedEPackages()) {
+ eClassifier = p.getEClassifier(getType(type));
+ if (eClassifier != null) {
+ return eClassifier;
+ }
+ }
+ Assert.isTrue(eClassifier==null);
+ return null;
+ }
+
+ /**
+ * Create a dynamic EClassifier from a type string. This will create a new
+ * EEnum if the supertype is an EEnum, or a new EDataType if the supertype
+ * is an EDataType. If no supertype is given, an EClass is created instead.
+ *
+ * @param type - a type name string that may contain additional supertype names.
+ * @see getType(String)
+ * @return the EClassifier.
+ */
+ public EClassifier createEClassifier(String type) {
+ EClassifier eClassifier = getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+
+ EClassifier eDataType = null;
+ for (String st : getSuperTypes(type)) {
+ EClassifier ec = findEClassifier(st);
+ if (EDataType.class.isAssignableFrom( ec.getInstanceClass() )) {
+ eDataType = ec;
+ break;
+ }
+ }
+
+ if (eDataType==null) {
+ if (EDataTypeConversionFactory.isFactoryFor(getType(type)))
+ return createEDataType(type);
+ return createEClass(type);
+ }
+
+ if (EEnum.class.isAssignableFrom(eDataType.getInstanceClass()))
+ eClassifier = theCoreFactory.createEEnum();
+ else
+ eClassifier = theCoreFactory.createEDataType();
+
+ eClassifier.setName(getType(type));
+ ePackage.getEClassifiers().add(eClassifier);
+
+ return eClassifier;
+ }
+
+ /**
+ * Create a dynamic EEnum literal value for an EEnum type name.
+ *
+ * @param name - name of the enum literal
+ * @param owningtype - the EEnum type name that owns the newly created literal.
+ * @return a new EEnum literal.
+ */
+ public EEnumLiteral createEEnumLiteral(String name, String owningtype) {
+
+ EClassifier eClassifier = getEClassifier(owningtype);
+ if (eClassifier==null) {
+ eClassifier = createEClassifier(owningtype + ":EEnum"); //$NON-NLS-1$
+ }
+ if (!(eClassifier instanceof EEnum))
+ return null;
+
+ return createEEnumLiteral(name, (EEnum)eClassifier);
+ }
+
+ /**
+ * Create a dynamic EEnum literal value for an EEnum type.
+ *
+ * @param name - name of the enum literal
+ * @param eEnum - the EEnum type that owns the newly created literal.
+ * @return a new EEnum literal
+ */
+ public EEnumLiteral createEEnumLiteral(String name, EEnum eEnum) {
+
+ EEnumLiteral literal = theCoreFactory.createEEnumLiteral();
+ literal.setLiteral(name);
+ literal.setName(name.toUpperCase());
+ literal.setValue(eEnum.getELiterals().size());
+
+ eEnum.getELiterals().add(literal);
+
+ return literal;
+ }
+
+ /**
+ * Search for the EDataType whose name is the type string.
+ *
+ * @param type - name of an EDataType
+ * @return the EDatatype or null if not found
+ */
+ public EDataType getEDataType(String type) {
+ EClassifier eClassifier = getEClassifier(type);
+ if (eClassifier instanceof EDataType) {
+ return (EDataType) eClassifier;
+ }
+ Assert.isTrue(eClassifier==null);
+ return null;
+ }
+
+ /**
+ * Create a dynamic EDataType from a type string.
+ *
+ * @param type - name of the EDataType to create.
+ * @return a new EDataType.
+ */
+ public EDataType createEDataType(String type) {
+ type = getType(type);
+ EDataType eDataType = getEDataType(type);
+ if (eDataType!=null)
+ return eDataType;
+
+ eDataType = theCoreFactory.createEDataType();
+ eDataType.setName(type);
+
+ ePackage.getEClassifiers().add(eDataType);
+ // make this look like a DocumentRoot so that it can be added
+ // to the containing object's "anyType" feature.
+ ExtendedMetaData.INSTANCE.setName(eDataType, ""); //$NON-NLS-1$
+ EAnnotation ea = theCoreFactory.createEAnnotation();
+ ea.setEModelElement(eDataType);
+ ea.setSource(EDataTypeConversionFactory.DATATYPE_CONVERSION_FACTORY_URI);
+ ConversionDelegate cd = EDataTypeConversionFactory.INSTANCE.createConversionDelegate(eDataType);
+ if (cd!=null) {
+ Object value = cd.createFromString(""); //$NON-NLS-1$
+ eDataType.setInstanceClass(value.getClass());
+ }
+ eDataType.getEAnnotations().add(ea);
+
+ return eDataType;
+ }
+
+ /**
+ * Search for the EClass whose name is the type string.
+ *
+ * @param type - name of an EClass
+ * @return the EClass or null if not found
+ */
+ public EClass getEClass(String type) {
+ EClassifier eClassifier = getEClassifier(type);
+ if (eClassifier instanceof EClass) {
+ return (EClass) eClassifier;
+ }
+ Assert.isTrue(eClassifier==null);
+ return null;
+ }
+
+ /**
+ * Create a dynamic EClass from a type string.
+ *
+ * @param type - a type name string that may contain additional supertype names.
+ * @see getType(String)
+ * @return the EClass.
+ */
+ public EClass createEClass(String type) {
+ EClass eClass = getEClass(type);
+ if (eClass!=null)
+ return eClass;
+
+ eClass = theCoreFactory.createEClass();
+ eClass.setName(getType(type));
+ eClass.getESuperTypes().add(XMLTypePackage.eINSTANCE.getAnyType());
+
+ ePackage.getEClassifiers().add(eClass);
+ for (String st : getSuperTypes(type)) {
+ EClassifier eClassifier = findEClassifier(st);
+ if (eClassifier instanceof EClass)
+ eClass.getESuperTypes().add((EClass) eClassifier);
+ }
+
+ // make this class look like a DocumentRoot so that it can be added
+ // to the containing object's "anyType" feature.
+ ExtendedMetaData.INSTANCE.setName(eClass, ""); //$NON-NLS-1$
+ eClass.setInstanceClass(AnyType.class);
+
+ return eClass;
+ }
+
+ public EStructuralFeature getEStructuralFeature(EObject object, String name) {
+ // first check the object's EClass for the feature name
+ EClass eClass = object.eClass();
+ if (eClass!=null) {
+ EStructuralFeature feature = eClass.getEStructuralFeature(name);
+ if (feature!=null)
+ return feature;
+ }
+ // if not found, search our dynamic EPackages for a class with the same name
+ // and look for the feature name in there
+ if (object instanceof ExtensionAttributeValue) {
+ object = object.eContainer();
+ }
+ String type = object.eClass().getName();
+ eClass = getEClass(type);
+ if (eClass!=null) {
+ for (EStructuralFeature feature : eClass.getEAllStructuralFeatures()) {
+ if (name.equals(feature.getName()))
+ return feature;
+ if (name.equals(ExtendedMetaData.INSTANCE.getName(feature)))
+ return feature;
+ }
+ }
+ return findEStructuralFeatureInDocumentRoot(name);
+ }
+
+ /**
+ * Search for an EAttribute with the given name in the specified EClass.
+ *
+ * @param name - name of the attribute to search for.
+ * @param type - the data type of the attribute.
+ * @param owningtype - name of the EClass that contains the attribute.
+ * @return the EAttribute or null if not found.
+ */
+ public EAttribute getEAttribute(String name, String type, String owningtype) {
+ EStructuralFeature feature = findEStructuralFeatureInDocumentRoot(name);
+ if (feature instanceof EAttribute) {
+// if (type!=null)
+// Assert.isTrue(type.equals(((EAttribute) feature).getEType().getName()) );
+ return (EAttribute) feature;
+ }
+
+ EClass eClass = getEClass(owningtype);
+ if (eClass!=null) {
+ // the EClass already exists in our EPackage: check if the named feature was already created
+ feature = eClass.getEStructuralFeature(name);
+ if (feature instanceof EAttribute) {
+ if (type!=null) {
+ Assert.isTrue(type.equals(((EAttribute) feature).getEType().getName()) );
+ }
+ return (EAttribute) feature;
+ }
+ Assert.isTrue(feature==null);
+ return null;
+ }
+ else {
+ // if not, check other related packages including the Bpmn2Package
+ EClassifier ec = findEClassifier(owningtype);
+ if ( !isValid(ec) && ec instanceof EClass ) {
+ // the EClass does not belong to us, but if the feature exists in that EClass, use it.
+ feature = ((EClass)ec).getEStructuralFeature(name);
+ if (feature instanceof EAttribute) {
+ return (EAttribute) feature;
+ }
+ }
+ }
+ Assert.isTrue(eClass==null);
+ return null;
+ }
+
+ /**
+ * Create a dynamic EAttribute of a given type, and add it the specified EClass.
+ * If the specified EClass does not exist, it will be created.
+ *
+ * @param name - name of the dynamic attribute.
+ * @param type - type of the attribute.
+ * @param owningtype - the name of the EClass that owns this attribute.
+ * @param defaultValue - initial default value for the attribute.
+ * @return a new EAttribute
+ */
+ public EAttribute createEAttribute(String name, String type, String owningtype, String defaultValue) {
+ EAttribute eAttribute = getEAttribute(name,type,owningtype);
+ if (eAttribute!=null)
+ return eAttribute;
+
+ if (type==null)
+ type = "EString"; //$NON-NLS-1$
+
+ // if the class type does not exist, create it in this package
+ EClassifier eClassifier = findEClassifier(type);
+ if (eClassifier==null) {
+ eClassifier = createEClassifier(type);
+ }
+
+ // check if owning class is in this package
+ EClass eClass = getEClass(owningtype);
+ if (eClass==null) {
+ // if not, check other related packages including the Bpmn2Package
+ EClassifier ec = findEClassifier(owningtype);
+ if ( !isValid(ec) ) {
+ ec = createEClass(owningtype);
+ }
+ if (ec instanceof EClass)
+ eClass = (EClass) ec;
+ }
+ Assert.isNotNull(eClass);
+
+ eAttribute = theCoreFactory.createEAttribute();
+ eAttribute.setName(name);
+ eAttribute.setChangeable(true);
+ eAttribute.setUnsettable(true);
+ eAttribute.setEType(eClassifier);
+
+ eClass.getEStructuralFeatures().add(eAttribute);
+
+ ExtendedMetaData.INSTANCE.setNamespace(eAttribute, ePackage.getNsURI());
+ ExtendedMetaData.INSTANCE.setFeatureKind(eAttribute, ExtendedMetaData.ATTRIBUTE_FEATURE);
+ ExtendedMetaData.INSTANCE.setName(eAttribute, name);
+
+ if (eClassifier instanceof EEnum) {
+ if (defaultValue!=null) {
+ boolean setDefault = true;
+ String values[];
+ if (defaultValue.contains(","))
+ values = defaultValue.split(",");
+ else
+ values = defaultValue.split(" ");
+ for (String v : values) {
+ if (setDefault) {
+ eAttribute.setDefaultValue(v);
+ setDefault = false;
+ }
+ createEEnumLiteral(v, (EEnum)eClassifier);
+ }
+ }
+ }
+ else if (eClassifier instanceof EDataType) {
+ if (defaultValue!=null) {
+ eAttribute.setDefaultValue(defaultValue);
+ }
+ }
+
+ return eAttribute;
+ }
+
+ /**
+ * Search for an EReference with the given name in the specified EClass.
+ *
+ * @param name - name of the reference to search for.
+ * @param type - the data type of the reference.
+ * @param owningtype - name of the EClass that contains the reference.
+ * @param containment - if true, the EReference is a containment feature; if false, it is a reference.
+ * @param many - if true, the EReference is a list; if false, it is a single value.
+ * @return the EReference or null if not found.
+ */
+ public EReference getEReference(String name, String type, String owningtype, boolean containment, boolean many) {
+ EStructuralFeature feature = findEStructuralFeatureInDocumentRoot(name);
+ if (feature instanceof EReference) {
+ if (type!=null)
+ Assert.isTrue(type.equals(((EReference) feature).getEType().getName()) );
+ Assert.isTrue(containment == ((EReference) feature).isContainment());
+ Assert.isTrue(many == ((EReference) feature).isMany());
+ return (EReference) feature;
+ }
+ EClass eClass = getEClass(owningtype);
+ if (eClass != null) {
+ // the EClass already exists in our EPackage: check if the named feature was already created
+ feature = eClass.getEStructuralFeature(name);
+ if (feature instanceof EReference) {
+ EClassifier eClassifier = findEClassifier(type);
+ Assert.isTrue(eClassifier == feature.getEType());
+ Assert.isTrue(containment == ((EReference) feature)
+ .isContainment());
+ Assert.isTrue(many ? ((EReference) feature).getUpperBound() == EStructuralFeature.UNBOUNDED_MULTIPLICITY
+ : true);
+ return (EReference) feature;
+ }
+ Assert.isTrue(feature == null);
+ return null;
+ }
+ else {
+ // if not, check other related packages including the Bpmn2Package
+ EClassifier ec = findEClassifier(owningtype);
+ if ( !isValid(ec) && ec instanceof EClass ) {
+ // the EClass does not belong to us, but if the feature exists in that EClass, use it.
+ feature = ((EClass)ec).getEStructuralFeature(name);
+ if (feature instanceof EReference) {
+ return (EReference) feature;
+ }
+ }
+ }
+ Assert.isTrue(eClass==null);
+ return null;
+ }
+
+ /**
+ * Create a new EReference with the given name in the specified EClass.
+ * If the specified EClass does not exist, it will be created.
+ *
+ * @param name - name of the reference to create.
+ * @param type - the data type of the reference.
+ * @param owningtype - name of the EClass that contains the reference.
+ * @param containment - if true, the EReference is a containment feature; if false, it is a reference.
+ * @param many - if true, the EReference is a list; if false, it is a single value.
+ * @return a new EReference.
+ */
+ public EReference createEReference(String name, String type, String owningtype, boolean containment, boolean many) {
+ EReference eReference = getEReference(name,type,owningtype,containment,many);
+ if (eReference!=null)
+ return eReference;
+
+ // if the class type does not exist, create it in this package
+ EClassifier eClassifier = findEClassifier(type);
+ if (eClassifier==null) {
+ eClassifier = createEClass(type);
+ }
+
+ eReference = theCoreFactory.createEReference();
+ eReference.setName(name);
+ eReference.setChangeable(true);
+ eReference.setUnsettable(true);
+ eReference.setUnique(true);
+ eReference.setContainment(containment);
+ if (many)
+ eReference.setUpperBound(EStructuralFeature.UNBOUNDED_MULTIPLICITY);
+ eReference.setEType(eClassifier);
+
+ // check if owning class is in this package
+ EClass eClass = getEClass(owningtype);
+ if (eClass==null) {
+ // if not, check other related packages
+ EClassifier ec = findEClassifier(owningtype);
+ if ( !isValid(ec) ) {
+ ec = createEClass(owningtype);
+ }
+ if (ec instanceof EClass)
+ eClass = (EClass) ec;
+ }
+ Assert.isNotNull(eClass);
+ eClass.getEStructuralFeatures().add(eReference);
+
+ ExtendedMetaData.INSTANCE.setNamespace(eReference, ePackage.getNsURI());
+ ExtendedMetaData.INSTANCE.setFeatureKind(eReference, ExtendedMetaData.ELEMENT_FEATURE);
+ ExtendedMetaData.INSTANCE.setName(eReference, name);
+
+ return eReference;
+ }
+
+ /**
+ * Set an EAnnotation that represents a human readable label for the given named model element.
+ *
+ * @param element - the named element to be decorated
+ * @param label - the label string
+ */
+ public static void setLabel(EModelElement element, String label) {
+ // FIXME: we can only decorate dynamic EClass objects.
+ // Figure out how to do this for EClasses that are defined in other models.
+ if (element instanceof EReference) {
+ EReference ref = (EReference) element;
+ EClassifier ec = ref.getEType();
+ if (isValid(ec.getEPackage()))
+ element = ec;
+ }
+ EAnnotation ea = element.getEAnnotation(DECORATOR_URI);
+ if (label!=null && !label.isEmpty()) {
+ if (ea==null) {
+ ea = theCoreFactory.createEAnnotation();
+ ea.setEModelElement(element);
+ ea.setSource(DECORATOR_URI);
+ }
+ ea.getDetails().put("label", label); //$NON-NLS-1$
+ }
+ else {
+ if (ea!=null) {
+ element.getEAnnotations().remove(ea);
+ EcoreUtil.delete(ea);
+ }
+ }
+ }
+
+ /**
+ * Return the label string for the given named model element.
+ *
+ * @param element - the named element.
+ * @return a text string or null if not set.
+ */
+ public static String getLabel(EModelElement element) {
+ EAnnotation ea = element.getEAnnotation(DECORATOR_URI);
+ if (ea!=null) {
+ String label = ea.getDetails().get("label"); //$NON-NLS-1$
+ return label;
+ }
+ return null;
+ }
+
+ /**
+ * Check if the given EClassifier is owned by this ModelDecorator.
+ * The requested element can be either in our dynamic EPackage or in a related package.
+ *
+ * @param eClassifier - the requested element.
+ * @return true if the EClassifier is managed by us, false if not.
+ */
+ public boolean isValid(EClassifier eClassifier) {
+ EPackage p = eClassifier==null ? null : eClassifier.getEPackage();
+ return eClassifier!=null &&
+ (p == ePackage || getRelatedEPackages().contains(p));
+ }
+
+ public static boolean isValid(EPackage pkg) {
+ return pkg!=null &&
+ pkg != EcorePackage.eINSTANCE &&
+ pkg != Bpmn2Package.eINSTANCE &&
+ pkg != BpmnDiPackage.eINSTANCE &&
+ pkg != DcPackage.eINSTANCE &&
+ pkg != DiPackage.eINSTANCE;
+ }
+
+ /**
+ * Search for an EClassifier with the given name. The search order is as follows:
+ * 1. our own dynamic EPackage
+ * 2. any related packages
+ * 3. the EcorePackage
+ * 4. the BPMN2 packages, including BPMNDI, DI and DC
+ *
+ * @param type - name of the EClassifier to search for.
+ * @return - an EClassifier if found or null if not found.
+ */
+ public EClassifier findEClassifier(String type) {
+ // parse out just the class type, excluding super types
+ if (type==null)
+ return null;
+
+ type = getType(type);
+ EClassifier eClassifier = null;
+
+ if (ePackage!=null) {
+ eClassifier = ePackage.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+ eClassifier = findEClassifierInDocumentRoot(ePackage,type);
+ if (eClassifier!=null)
+ return eClassifier;
+ }
+ for (EPackage pkg : getRelatedEPackages()) {
+ eClassifier = pkg.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+ eClassifier = findEClassifierInDocumentRoot(pkg,type);
+ if (eClassifier!=null)
+ return eClassifier;
+ }
+
+ return findEClassifier(null,type);
+ }
+
+ public EStructuralFeature findEStructuralFeatureInDocumentRoot(String name) {
+ if (name==null)
+ return null;
+
+ EStructuralFeature feature = null;
+
+ if (ePackage!=null) {
+ feature = findEStructuralFeatureInDocumentRoot(ePackage,name);
+ if (feature!=null)
+ return feature;
+ }
+ for (EPackage pkg : getRelatedEPackages()) {
+ feature = findEStructuralFeatureInDocumentRoot(pkg,name);
+ if (feature!=null)
+ return feature;
+ }
+
+ feature = findEStructuralFeatureInDocumentRoot(Bpmn2Package.eINSTANCE, name);
+ if (feature!=null)
+ return feature;
+
+ return null;
+ }
+
+ /**
+ * Search for an EClassifier with the given name. The search order is as follows:
+ * 1. the specified EPackage, if not null
+ * 2. the EcorePackage
+ * 3. the BPMN2 packages, including BPMNDI, DI and DC
+ *
+ * @param pkg - an optional EPackage to search.
+ * @param type - name of the EClassifier to search for.
+ * @return - an EClassifier if found or null if not found.
+ */
+ public static EClassifier findEClassifier(EPackage pkg, String type) {
+ if (type==null) {
+ return null;
+ }
+
+ EClassifier eClassifier = null;
+ if (pkg!=null) {
+ eClassifier = pkg.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+ eClassifier = findEClassifierInDocumentRoot(pkg,type);
+ if (eClassifier!=null)
+ return eClassifier;
+ }
+
+ eClassifier = EcorePackage.eINSTANCE.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+
+ eClassifier = Bpmn2Package.eINSTANCE.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+ eClassifier = findEClassifierInDocumentRoot(Bpmn2Package.eINSTANCE,type);
+ if (eClassifier!=null)
+ return eClassifier;
+
+ eClassifier = BpmnDiPackage.eINSTANCE.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+ eClassifier = findEClassifierInDocumentRoot(BpmnDiPackage.eINSTANCE,type);
+ if (eClassifier!=null)
+ return eClassifier;
+
+ eClassifier = DiPackage.eINSTANCE.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+
+ eClassifier = DcPackage.eINSTANCE.getEClassifier(type);
+ if (eClassifier!=null)
+ return eClassifier;
+
+ return null;
+ }
+
+ /**
+ * Search for an EClassifier with the given name as an element in the DocumentRoot of
+ * the given EPackage.
+ *
+ * @param pkg - the EPackage to search.
+ * @param name - name of the EClassifier to search for.
+ * @return - an EClassifier if found or null if not found.
+ */
+ private static EClassifier findEClassifierInDocumentRoot(EPackage pkg, String name) {
+ EStructuralFeature feature = findEStructuralFeatureInDocumentRoot(pkg, name);
+ if (feature!=null)
+ return feature.getEType();
+ return null;
+ }
+
+ private static EStructuralFeature findEStructuralFeatureInDocumentRoot(EPackage pkg, String name) {
+ try {
+ EClass docRoot = (EClass)pkg.getEClassifier("DocumentRoot"); //$NON-NLS-1$
+ if (docRoot==null) {
+ docRoot = ExtendedMetaData.INSTANCE.getDocumentRoot(pkg);
+ }
+ if (docRoot!=null) {
+ for (EStructuralFeature feature : docRoot.getEAllStructuralFeatures()) {
+ if (feature.getEContainingClass().getEPackage()==pkg) {
+ if (name.equals(feature.getName()))
+ return feature;
+ if (name.equals(ExtendedMetaData.INSTANCE.getName(feature)))
+ return feature;
+ }
+ }
+ }
+ }
+ catch (Exception e) {
+ }
+ return null;
+ }
+
+ private static EStructuralFeature getAnyAttributeFeature(EObject object) {
+ EStructuralFeature anyAttribute = null;
+ if (object!=null) {
+ EClass eclass = null;
+ if (object instanceof EClass)
+ eclass = (EClass)object;
+ else
+ eclass = object.eClass();
+ anyAttribute = eclass.getEStructuralFeature("anyAttribute"); //$NON-NLS-1$
+ }
+ return anyAttribute;
+ }
+
+ /**
+ * Return the feature with the given name in the specified object's "anyAttribute" feature map.
+ *
+ * @param object - the EObject to search.
+ * @param name - name of the feature to search for.
+ * @return an EStructuralFeature if found or null if not found.
+ */
+ public static EStructuralFeature getAnyAttribute(EObject object, String name) {
+ EStructuralFeature anyAttribute = getAnyAttributeFeature(object);
+ if (anyAttribute!=null && object.eGet(anyAttribute) instanceof BasicFeatureMap) {
+ BasicFeatureMap map = (BasicFeatureMap)object.eGet(anyAttribute);
+ for (Entry entry : map) {
+ EStructuralFeature feature = entry.getEStructuralFeature();
+ if (feature.getName().equals(name))
+ return feature;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return all of the features in the specified object's "anyAttribute" feature map.
+ *
+ * @param object - the EObject to search.
+ * @return a list of EStructuralFeatures if found or an empty list if not found.
+ */
+ public static List<EStructuralFeature> getAnyAttributes(EObject object) {
+ List<EStructuralFeature> list = new ArrayList<EStructuralFeature>();
+ EStructuralFeature anyAttribute = getAnyAttributeFeature(object);
+ if (anyAttribute!=null && object.eGet(anyAttribute) instanceof BasicFeatureMap) {
+ BasicFeatureMap map = (BasicFeatureMap)object.eGet(anyAttribute);
+ for (Entry entry : map) {
+ EStructuralFeature feature = entry.getEStructuralFeature();
+ list.add(feature);
+ }
+ }
+ return list;
+ }
+
+ /**
+ * Create a new attribute in the specified object's "anyAttribute" feature map.
+ * The attribute will be assigned the given namespace, name, type and initial value.
+ *
+ * @param object - the EObject to be decorated.
+ * @param namespace - namespace of the new attribute.
+ * @param name - name of the new extension attribute.
+ * @param type - data type of the attribute.
+ * @param value - initial value of the attribute.
+ * @return a new EAttribute
+ */
+ @SuppressWarnings("unchecked")
+ public EStructuralFeature addAnyAttribute(EObject object, String namespace, String name, String type, Object value) {
+ EStructuralFeature attr = null;
+ EClass eclass;
+ if (object instanceof EClass) {
+ eclass = (EClass)object;
+ object = ExtendedPropertiesAdapter.getDummyObject(eclass);
+ }
+ else
+ eclass = object.eClass();
+ EStructuralFeature anyAttribute = getAnyAttributeFeature(object);
+ List<BasicFeatureMap.Entry> anyMap = (List<BasicFeatureMap.Entry>)object.eGet(anyAttribute);
+ if (anyMap==null)
+ return null;
+ for (BasicFeatureMap.Entry fe : anyMap) {
+ if (fe.getEStructuralFeature() instanceof EAttributeImpl) {
+ EAttributeImpl a = (EAttributeImpl) fe.getEStructuralFeature();
+ if (namespace.equals(a.getExtendedMetaData().getNamespace()) && name.equals(a.getName())) {
+ attr = a;
+ break;
+ }
+ }
+ }
+
+ // this featuremap can only hold attributes, not elements
+ if (type==null)
+ type = "E" + value.getClass().getSimpleName(); //$NON-NLS-1$
+ EPackage pkg = ModelDecorator.getEPackage(namespace);
+ EDataType eDataType = (EDataType)ModelDecorator.findEClassifier(pkg, type);//(EDataType)EcorePackage.eINSTANCE.getEClassifier(type);
+ if (eDataType!=null) {
+ if (attr==null) {
+ attr = createEAttribute(name, type, eclass.getName(), null);
+ anyMap.add( FeatureMapUtil.createEntry(attr, value) );
+ }
+ else {
+ EClassifier dt = attr.getEType();
+ if (dt==null || !eDataType.getInstanceClass().isAssignableFrom(dt.getInstanceClass()))
+ throw new IllegalArgumentException(
+ NLS.bind(
+ Messages.ModelUtil_Illegal_Value,
+ new Object[] {
+ object.eClass().getName(),
+ attr.getName(),
+ attr.getEType().getName(),
+ value.toString()
+ }
+ )
+ );
+ anyMap.add( FeatureMapUtil.createEntry(attr, value) );
+ }
+ }
+ else if (attr==null) {
+ attr = createEAttribute(name, type, eclass.getName(), null);
+ anyMap.add( FeatureMapUtil.createEntry(attr, value) );
+ }
+ else {
+ anyMap.add( FeatureMapUtil.createEntry(attr, value) );
+ }
+ return attr;
+ }
+
+ /**
+ * Create a new attribute in the specified object's "anyAttribute" feature map.
+ * The attribute will be assigned the namespace from our dynamic EPackage.
+ *
+ * @param object - the EObject to be decorated. This SHOULD be a BaseElement.
+ * @param name - name of the new extension attribute.
+ * @param type - data type of the attribute.
+ * @param value - initial value of the attribute.
+ * @return a new EAttribute
+ */
+ public EStructuralFeature addAnyAttribute(EObject object, String name, String type, Object value) {
+ EPackage pkg = object.eClass().getEPackage();
+ String nsURI = pkg.getNsURI();
+ return addAnyAttribute(object, nsURI, name, type, value);
+ }
+
+ /**
+ * Create a new extension element in the specified BaseElement's extension values container.
+ *
+ * @param object - the EObject to be decorated. This SHOULD be a BaseElement.
+ * @param feature - name of the new extension element.
+ * @param value - value assigned to the new element.
+ */
+ public static void addExtensionAttributeValue(EObject object, EStructuralFeature feature, Object value) {
+ addExtensionAttributeValue(object, feature, value, -1, false);
+ }
+
+ /**
+ * Create a new extension element in the specified BaseElement's extension values container.
+ *
+ * @param object - the EObject to be decorated. This SHOULD be a BaseElement.
+ * @param feature - name of the new extension element.
+ * @param value - value assigned to the new element.
+ * @param delay - if true, use an InsertionAdapter to set the feature value, otherwise set it immediately.
+ */
+ public static void addExtensionAttributeValue(EObject object, EStructuralFeature feature, Object value, boolean delay) {
+ addExtensionAttributeValue(object, feature, value, -1, delay);
+ }
+
+ /**
+ * Create a new extension element in the specified BaseElement's extension values container.
+ *
+ * @param object - the EObject to be decorated. This SHOULD be a BaseElement.
+ * @param feature - name of the new extension element.
+ * @param value - value assigned to the new element.
+ * @param index - if the element is a list, the list index for the value.
+ * @param delay - if true, use an InsertionAdapter to set the feature value, otherwise set it immediately.
+ */
+ @SuppressWarnings("unchecked")
+ public static void addExtensionAttributeValue(EObject object, EStructuralFeature feature, Object value, int index, boolean delay) {
+ if (object instanceof ExtensionAttributeValue)
+ object = object.eContainer();
+ EStructuralFeature evf = object.eClass().getEStructuralFeature("extensionValues"); //$NON-NLS-1$
+ EList<EObject> list = (EList<EObject>)object.eGet(evf);
+
+ if (list.size()==0) {
+ ExtensionAttributeValue newItem = Bpmn2ModelerFactory.create(ExtensionAttributeValue.class);
+ ModelUtil.setID(newItem);
+ FeatureMap map = newItem.getValue();
+ map.add(feature, value);
+ if (delay) {
+ InsertionAdapter.add(object, feature, (EObject)value);
+ }
+ else {
+ list.add(newItem);
+ }
+ }
+ else {
+ ExtensionAttributeValue oldItem = (ExtensionAttributeValue) list.get(0);
+ if (delay) {
+ InsertionAdapter.add(object, feature, (EObject)value);
+ }
+ else {
+ FeatureMap map = oldItem.getValue();
+ if (!feature.isMany()) {
+ // only one of these features is allowed: remove existing one(s)
+ for (int i=0; i<map.size(); ++i) {
+ Entry entry = map.get(i);
+ if (entry.getEStructuralFeature().getName().equals(feature.getName())) {
+ map.remove(i--);
+ }
+ }
+ map.add(feature, value);
+ }
+ else if (index>=0){
+ }
+ else {
+ map.add(feature, value);
+ }
+ }
+ }
+ }
+
+ /**
+ * Return a list of all extension elements in the BaseElement's extension values container.
+ *
+ * @param be - the EObject to search. This SHOULD be a BaseElement.
+ * @return a list of all extension elements or an empty list if none found.
+ */
+ public static List<ExtensionAttributeValue> getExtensionAttributeValues(EObject be) {
+ if (be instanceof Participant) {
+ final Participant participant = (Participant) be;
+ if (participant.getProcessRef() == null) {
+ if (participant.eContainer() instanceof Collaboration) {
+ Collaboration collab = (Collaboration) participant.eContainer();
+ if (collab.eContainer() instanceof Definitions) {
+ final Definitions definitions = ModelUtil.getDefinitions(collab);
+
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(definitions.eResource());
+
+ domain.getCommandStack().execute(new RecordingCommand(domain) {
+ @Override
+ protected void doExecute() {
+ Process process = Bpmn2ModelerFactory.create(Process.class);
+ participant.setProcessRef(process);
+ definitions.getRootElements().add(process);
+ ModelUtil.setID(process);
+ }
+
+ });
+
+ }
+ }
+ }
+ return participant.getProcessRef().getExtensionValues();
+ }
+ if (be instanceof BPMNDiagram) {
+ BPMNDiagram diagram = (BPMNDiagram) be;
+ BaseElement bpmnElement = diagram.getPlane().getBpmnElement();
+ if (bpmnElement instanceof org.eclipse.bpmn2.Process) {
+ return bpmnElement.getExtensionValues();
+ }
+ }
+ if (be instanceof BaseElement) {
+ return ((BaseElement) be).getExtensionValues();
+ }
+
+ return new ArrayList<ExtensionAttributeValue>();
+ }
+
+ /**
+ * Return a list of all extension elements in the BaseElement's extension values container
+ * that have the specified java type.
+ *
+ * @param be - the EObject to search. This SHOULD be a BaseElement.
+ * @param clazz - the type of elements to search for.
+ * @return a list of all extension elements or an empty list if none found.
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> List<T> getAllExtensionAttributeValues(EObject object, Class<T> clazz) {
+ List<T> results = new ArrayList<T>();
+
+ if (object!=null) {
+ EStructuralFeature evf = object.eClass().getEStructuralFeature("extensionValues"); //$NON-NLS-1$
+ EList<ExtensionAttributeValue> list = (EList<ExtensionAttributeValue>)object.eGet(evf);
+ for (ExtensionAttributeValue eav : list) {
+ FeatureMap fm = eav.getValue();
+ for (Entry e : fm) {
+ if (clazz.isInstance(e.getValue())) {
+ results.add((T)e.getValue());
+ }
+ }
+ }
+ }
+ return results;
+ }
+
+ /**
+ * Return a list of Objects that are the values of all extension elements specified by the given feature.
+ *
+ * @param object - the EObject to be searched. This SHOULD be a BaseElement.
+ * @param feature - the EStructuralFeature to search for.
+ * @return a list of Object values for the extension elements.
+ */
+ public static List<Object> getAllExtensionAttributeValues(EObject object, EStructuralFeature feature) {
+ List<Object> results = new ArrayList<Object>();
+
+ if (object!=null) {
+ String name = feature.getName();
+ EStructuralFeature evf = object.eClass().getEStructuralFeature("extensionValues"); //$NON-NLS-1$
+ EList<ExtensionAttributeValue> list = (EList<ExtensionAttributeValue>)object.eGet(evf);
+ for (ExtensionAttributeValue eav : list) {
+ FeatureMap fm = eav.getValue();
+ for (Entry e : fm) {
+ if (e.getEStructuralFeature().getName().equals(name)) {
+ results.add(e.getValue());
+ }
+ }
+ }
+ }
+ return results;
+ }
+
+ /**
+ * Search the given object for an extension element by name.
+ *
+ * @param object - the EObject to be searched. This SHOULD be a BaseElement.
+ * @param name - name of the feature to search for.
+ * @return an EStructuralFeature if found, or null if not found.
+ */
+ @SuppressWarnings("unchecked")
+ public static EStructuralFeature getExtensionAttribute(EObject object, String name) {
+ if (object!=null) {
+ EStructuralFeature evf = object.eClass().getEStructuralFeature("extensionValues"); //$NON-NLS-1$
+ EList<ExtensionAttributeValue> list = (EList<ExtensionAttributeValue>)object.eGet(evf);
+ for (ExtensionAttributeValue eav : list) {
+ FeatureMap fm = eav.getValue();
+ for (Entry e : fm) {
+ if (e.getEStructuralFeature().getName().equals(name)) {
+ return e.getEStructuralFeature();
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Look up a dynamic feature associated with the given EObject by name.
+ *
+ * @param object - the EObject to check.
+ * @param prefix - a namespace prefix passed in by the XMLHandler - not used here.
+ * @param name - name of the dynamic feature.
+ * @param isElement - true if the feature is an element, false if attribute.
+ * @return an EStructuralFeature if the feature was found, or null if not found.
+ */
+ public EStructuralFeature getFeature(EObject object, String prefix, String name, boolean isElement) {
+ // search for the object's type in our own package
+ EClass eClass = getEClass(object.eClass().getName());
+ if (eClass!=null) {
+ // found it! check if it has the requested feature
+ EStructuralFeature feature = eClass.getEStructuralFeature(name);
+ if (feature!=null) {
+ if (isElement) {
+ if (feature instanceof EReference)
+ return feature;
+ }
+ else {
+ if (feature instanceof EAttribute)
+ return feature;
+ }
+ }
+ }
+ object = object.eContainer();
+ return null;
+ }
+
+ public EStructuralFeature getFeature(EObject object, String name) {
+ EStructuralFeature feature = getAnyAttribute(object, name);
+ if (feature!=null)
+ return feature;
+ feature = getExtensionAttribute(object, name);
+ if (feature!=null)
+ return feature;
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecoratorAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecoratorAdapter.java
new file mode 100644
index 00000000..3d3ccfcd
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelDecoratorAdapter.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.model;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * This adapter is added to the dynamic EPackage managed by the ModelDecorator.
+ * Clients will use this adapter to find the ModelDecorator instance that owns the EPackage.
+ * It is also used by the XMLHandler to resolve object features during loading of a BPMN2 Resource.
+ */
+public class ModelDecoratorAdapter extends AdapterImpl {
+ ModelDecorator modelDecorator;
+
+ public static void adapt(ModelDecorator md) {
+ addAdapter(md, md.getEPackage());
+ for (EPackage pkg : md.getRelatedEPackages())
+ addAdapter(md, pkg);
+ }
+
+ private static void addAdapter(ModelDecorator md, EPackage pkg) {
+ ModelDecoratorAdapter adapter = null;
+ for (Adapter a : pkg.eAdapters()) {
+ if (a instanceof ModelDecoratorAdapter) {
+ // this EPackage already has an adapter
+ adapter = (ModelDecoratorAdapter) a;
+ break;
+ }
+ }
+ if (adapter==null) {
+ adapter = new ModelDecoratorAdapter(md);
+ pkg.eAdapters().add(adapter);
+ }
+ }
+
+ public void dispose() {
+ modelDecorator.getEPackage().eAdapters().remove(this);
+ for (EPackage pkg : modelDecorator.getRelatedEPackages())
+ pkg.eAdapters().remove(this);
+ }
+
+ public static ModelDecoratorAdapter getAdapter(EPackage pkg) {
+ for (Adapter a : pkg.eAdapters()) {
+ if (a instanceof ModelDecoratorAdapter) {
+ return (ModelDecoratorAdapter) a;
+ }
+ }
+ return null;
+ }
+
+ public static ModelDecorator getModelDecorator(EPackage pkg) {
+ for (Adapter a : pkg.eAdapters()) {
+ if (a instanceof ModelDecoratorAdapter) {
+ return ((ModelDecoratorAdapter)a).getModelDecorator();
+ }
+ }
+ return null;
+ }
+
+ private ModelDecoratorAdapter(ModelDecorator modelDecorator) {
+ this.modelDecorator = modelDecorator;
+ }
+
+ public ModelDecorator getModelDecorator() {
+ return modelDecorator;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ModelHandler.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelHandler.java
index 0d8215f0..ec6f7044 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ModelHandler.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelHandler.java
@@ -10,20 +10,18 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core;
+package org.eclipse.bpmn2.modeler.core.model;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.Artifact;
import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Choreography;
+import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.Collaboration;
-import org.eclipse.bpmn2.ConditionalEventDefinition;
import org.eclipse.bpmn2.ConversationLink;
import org.eclipse.bpmn2.ConversationNode;
import org.eclipse.bpmn2.DataInput;
@@ -31,7 +29,6 @@ import org.eclipse.bpmn2.DataOutput;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.DocumentRoot;
import org.eclipse.bpmn2.EndEvent;
-import org.eclipse.bpmn2.Expression;
import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.FlowNode;
@@ -52,15 +49,15 @@ import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.BpmnDiFactory;
-import org.eclipse.bpmn2.di.BpmnDiPackage;
import org.eclipse.bpmn2.di.ParticipantBandKind;
+import org.eclipse.bpmn2.modeler.core.Messages;
import org.eclipse.bpmn2.modeler.core.di.ImportDiagnostics;
-import org.eclipse.bpmn2.modeler.core.features.participant.AddParticipantFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.features.containers.participant.AddParticipantFeature;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FixDuplicateIdsDialog;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
import org.eclipse.bpmn2.modeler.core.utils.Tuple;
@@ -72,10 +69,7 @@ import org.eclipse.dd.dc.Point;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.xmi.IllegalValueException;
@@ -192,8 +186,8 @@ public class ModelHandler {
Bounds bounds = DcFactory.eINSTANCE.createBounds();
bounds.setX(100);
bounds.setY(100);
- bounds.setWidth(GraphicsUtil.EVENT_SIZE);
- bounds.setHeight(GraphicsUtil.EVENT_SIZE);
+ bounds.setWidth(ShapeDecoratorUtil.EVENT_SIZE);
+ bounds.setHeight(ShapeDecoratorUtil.EVENT_SIZE);
shape.setBounds(bounds);
plane.getPlaneElement().add(shape);
getPreferences().applyBPMNDIDefaults(shape, null);
@@ -204,13 +198,13 @@ public class ModelHandler {
edge.setSourceElement(shape);
Point wp = DcFactory.eINSTANCE.createPoint();
- wp.setX(100+GraphicsUtil.EVENT_SIZE);
- wp.setY(100+GraphicsUtil.EVENT_SIZE/2);
+ wp.setX(100+ShapeDecoratorUtil.EVENT_SIZE);
+ wp.setY(100+ShapeDecoratorUtil.EVENT_SIZE/2);
edge.getWaypoint().add(wp);
wp = DcFactory.eINSTANCE.createPoint();
wp.setX(500);
- wp.setY(100+GraphicsUtil.EVENT_SIZE/2);
+ wp.setY(100+ShapeDecoratorUtil.EVENT_SIZE/2);
edge.getWaypoint().add(wp);
plane.getPlaneElement().add(edge);
@@ -223,8 +217,8 @@ public class ModelHandler {
bounds = DcFactory.eINSTANCE.createBounds();
bounds.setX(500);
bounds.setY(100);
- bounds.setWidth(GraphicsUtil.EVENT_SIZE);
- bounds.setHeight(GraphicsUtil.EVENT_SIZE);
+ bounds.setWidth(ShapeDecoratorUtil.EVENT_SIZE);
+ bounds.setHeight(ShapeDecoratorUtil.EVENT_SIZE);
shape.setBounds(bounds);
plane.getPlaneElement().add(shape);
getPreferences().applyBPMNDIDefaults(shape, null);
@@ -245,6 +239,8 @@ public class ModelHandler {
public BPMNDiagram createCollaborationDiagram(final String name) {
EList<EObject> contents = resource.getContents();
+ final Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(resource);
+
TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(resource);
final BPMNDiagram bpmnDiagram = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
@@ -285,19 +281,21 @@ public class ModelHandler {
BPMNShape shape = BpmnDiFactory.eINSTANCE.createBPMNShape();
ModelUtil.setID(shape,resource);
+ ShapeStyle ss = preferences.getShapeStyle(initiatingParticipant);
+
shape.setBpmnElement(initiatingParticipant);
Bounds bounds = DcFactory.eINSTANCE.createBounds();
if (horz) {
bounds.setX(100);
bounds.setY(100);
- bounds.setWidth(AddParticipantFeature.DEFAULT_POOL_WIDTH);
- bounds.setHeight(AddParticipantFeature.DEFAULT_POOL_HEIGHT);
+ bounds.setWidth(ss.getDefaultWidth());
+ bounds.setHeight(ss.getDefaultHeight());
}
else {
bounds.setX(100);
bounds.setY(100);
- bounds.setWidth(AddParticipantFeature.DEFAULT_POOL_HEIGHT);
- bounds.setHeight(AddParticipantFeature.DEFAULT_POOL_WIDTH);
+ bounds.setWidth(ss.getDefaultHeight());
+ bounds.setHeight(ss.getDefaultWidth());
}
shape.setBounds(bounds);
shape.setIsHorizontal(horz);
@@ -313,14 +311,14 @@ public class ModelHandler {
if (horz) {
bounds.setX(100);
bounds.setY(350);
- bounds.setWidth(AddParticipantFeature.DEFAULT_POOL_WIDTH);
- bounds.setHeight(AddParticipantFeature.DEFAULT_POOL_HEIGHT);
+ bounds.setWidth(ss.getDefaultWidth());
+ bounds.setHeight(ss.getDefaultHeight());
}
else {
bounds.setX(350);
bounds.setY(100);
- bounds.setWidth(AddParticipantFeature.DEFAULT_POOL_HEIGHT);
- bounds.setHeight(AddParticipantFeature.DEFAULT_POOL_WIDTH);
+ bounds.setWidth(ss.getDefaultHeight());
+ bounds.setHeight(ss.getDefaultWidth());
}
shape.setBounds(bounds);
shape.setIsHorizontal(horz);
@@ -343,6 +341,7 @@ public class ModelHandler {
EList<EObject> contents = resource.getContents();
TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(resource);
final BPMNDiagram bpmnDiagram = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
+ final Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(resource);
if (domain != null) {
domain.getCommandStack().execute(new RecordingCommand(domain) {
@@ -382,12 +381,15 @@ public class ModelHandler {
BPMNShape taskShape = BpmnDiFactory.eINSTANCE.createBPMNShape();
ModelUtil.setID(taskShape,resource);
+ ShapeStyle ss = preferences.getShapeStyle(task);
+ int bandHeight = ss.getDefaultHeight() / 7;
+
taskShape.setBpmnElement(task);
Bounds bounds = DcFactory.eINSTANCE.createBounds();
bounds.setX(100);
bounds.setY(100);
- bounds.setWidth(GraphicsUtil.CHOREOGRAPHY_WIDTH);
- bounds.setHeight(GraphicsUtil.CHOREOGRAPHY_HEIGHT);
+ bounds.setWidth(ss.getDefaultWidth());
+ bounds.setHeight(ss.getDefaultHeight());
taskShape.setBounds(bounds);
plane.getPlaneElement().add(taskShape);
getPreferences().applyBPMNDIDefaults(taskShape, null);
@@ -400,8 +402,8 @@ public class ModelHandler {
bounds = DcFactory.eINSTANCE.createBounds();
bounds.setX(100);
bounds.setY(100);
- bounds.setWidth(GraphicsUtil.CHOREOGRAPHY_WIDTH);
- bounds.setHeight(GraphicsUtil.PARTICIPANT_BAND_HEIGHT);
+ bounds.setWidth(ss.getDefaultWidth());
+ bounds.setHeight(bandHeight);
participantShape.setBounds(bounds);
plane.getPlaneElement().add(participantShape);
getPreferences().applyBPMNDIDefaults(participantShape, null);
@@ -413,9 +415,9 @@ public class ModelHandler {
participantShape.setParticipantBandKind(ParticipantBandKind.BOTTOM_NON_INITIATING);
bounds = DcFactory.eINSTANCE.createBounds();
bounds.setX(100);
- bounds.setY(100 + GraphicsUtil.CHOREOGRAPHY_HEIGHT - GraphicsUtil.PARTICIPANT_BAND_HEIGHT);
- bounds.setWidth(GraphicsUtil.CHOREOGRAPHY_WIDTH);
- bounds.setHeight(GraphicsUtil.PARTICIPANT_BAND_HEIGHT);
+ bounds.setY(100 + ss.getDefaultHeight() - bandHeight);
+ bounds.setWidth(ss.getDefaultWidth());
+ bounds.setHeight(bandHeight);
participantShape.setBounds(bounds);
plane.getPlaneElement().add(participantShape);
getPreferences().applyBPMNDIDefaults(participantShape, null);
@@ -430,16 +432,18 @@ public class ModelHandler {
}
- public static ModelHandler getInstance(EObject object) throws IOException {
+ public static ModelHandler getInstance(EObject object) {
return ModelHandlerLocator.getModelHandler(object.eResource());
}
+ public void dispose() {
+ ModelHandlerLocator.dispose(this);
+ }
+
/**
* @param <T>
- * @param target
- * object that this element is being added to
- * @param elem
- * flow element to be added
+ * @param target object that this element is being added to
+ * @param elem flow element to be added
* @return
*/
public <T extends FlowElement> T addFlowElement(Object target, T elem) {
@@ -450,10 +454,8 @@ public class ModelHandler {
/**
* @param <A>
- * @param target
- * object that this artifact is being added to
- * @param artifact
- * artifact to be added
+ * @param target object that this artifact is being added to
+ * @param artifact artifact to be added
* @return
*/
public <T extends Artifact> T addArtifact(Object target, T artifact) {
@@ -479,11 +481,31 @@ public class ModelHandler {
public ConversationNode addConversationNode(BPMNDiagram bpmnDiagram, ConversationNode conversationNode) {
Collaboration collaboration = getParticipantContainer(bpmnDiagram);
+ if (collaboration==null) {
+ collaboration = getCollaboration();
+ if (collaboration==null)
+ collaboration = createCollaboration();
+ }
if (collaboration!=null)
collaboration.getConversations().add(conversationNode);
return conversationNode;
}
+ public Choreography addChoreographyActivity(BPMNDiagram bpmnDiagram, ChoreographyActivity choreographyActivity) {
+ Collaboration collaboration = getParticipantContainer(bpmnDiagram);
+ Choreography choreography = null;
+ if (collaboration instanceof Choreography) {
+ choreography = (Choreography) collaboration;
+ }
+ else {
+ choreography = getChoreography();
+ if (choreography==null)
+ choreography = createChoreography();
+ }
+ choreography.getFlowElements().add(choreographyActivity);
+ return choreography;
+ }
+
private InputOutputSpecification getOrCreateIOSpecification(Object target) {
Process process = getOrCreateProcess(getParticipant(target));
if (process.getIoSpecification() == null) {
@@ -496,11 +518,13 @@ public class ModelHandler {
public void moveFlowNode(FlowNode node, Object source, Object target) {
FlowElementsContainer sourceContainer = getFlowElementContainer(source);
FlowElementsContainer targetContainer = getFlowElementContainer(target);
- sourceContainer.getFlowElements().remove(node);
- targetContainer.getFlowElements().add(node);
- for (SequenceFlow flow : node.getOutgoing()) {
- sourceContainer.getFlowElements().remove(flow);
- targetContainer.getFlowElements().add(flow);
+ if (sourceContainer!=targetContainer) {
+ sourceContainer.getFlowElements().remove(node);
+ targetContainer.getFlowElements().add(node);
+ for (SequenceFlow flow : node.getOutgoing()) {
+ sourceContainer.getFlowElements().remove(flow);
+ targetContainer.getFlowElements().add(flow);
+ }
}
}
@@ -514,25 +538,6 @@ public class ModelHandler {
return participant;
}
- @Deprecated
- public void moveLane(Lane movedLane, Participant targetParticipant) {
- Participant sourceParticipant = getParticipant(movedLane);
- moveLane(movedLane, sourceParticipant, targetParticipant);
- }
-
- public void moveLane(Lane movedLane, Participant sourceParticipant, Participant targetParticipant) {
- Process sourceProcess = getOrCreateProcess(sourceParticipant);
- Process targetProcess = getOrCreateProcess(targetParticipant);
- for (FlowNode node : movedLane.getFlowNodeRefs()) {
- moveFlowNode(node, sourceProcess, targetProcess);
- }
- if (movedLane.getChildLaneSet() != null && !movedLane.getChildLaneSet().getLanes().isEmpty()) {
- for (Lane lane : movedLane.getChildLaneSet().getLanes()) {
- moveLane(lane, sourceParticipant, targetParticipant);
- }
- }
- }
-
public Process createProcess() {
Process process = create(Process.class);
getDefinitions().getRootElements().add(process);
@@ -559,6 +564,10 @@ public class ModelHandler {
process = create(Process.class);
getDefinitions().getRootElements().add(process);
if (participant!=null) {
+ process.setName(participant.getName() + " Process");
+ if (participant.eContainer() instanceof Collaboration) {
+ process.setDefinitionalCollaborationRef((Collaboration)participant.eContainer());
+ }
participant.setProcessRef(process);
}
}
@@ -595,13 +604,6 @@ public class ModelHandler {
return lane;
}
- public void laneToTop(Lane lane) {
- LaneSet laneSet = create(LaneSet.class);
- laneSet.getLanes().add(lane);
- Process process = getOrCreateProcess(getInternalParticipant());
- process.getLaneSets().add(laneSet);
- }
-
public SequenceFlow createSequenceFlow(FlowNode source, FlowNode target) {
SequenceFlow sequenceFlow = create(SequenceFlow.class);
@@ -710,6 +712,14 @@ public class ModelHandler {
return null;
}
+ public Choreography getChoreography() {
+ for (RootElement re : getDefinitions().getRootElements()) {
+ if (re instanceof Choreography)
+ return (Choreography)re;
+ }
+ return null;
+ }
+
public Choreography createChoreography() {
Choreography choreography = create(Choreography.class);
getDefinitions().getRootElements().add(choreography);
@@ -808,26 +818,42 @@ public class ModelHandler {
o = BusinessObjectUtil.getFirstElementOfType((Diagram)o, BPMNDiagram.class);
}
if (o instanceof BPMNDiagram) {
- BaseElement be = ((BPMNDiagram)o).getPlane().getBpmnElement();
+ BPMNDiagram bpmnDiagram = (BPMNDiagram) o;
+ BaseElement be = bpmnDiagram.getPlane().getBpmnElement();
if (be != null && be instanceof FlowElementsContainer) {
return (FlowElementsContainer)be;
}
- else { // somebody did not understand the BPMNPlane (seems to be common), try adding to the first process
- List<Process> list = getAll(Process.class);
- if (list.size()==0)
- return getOrCreateProcess(null);
- return list.get(0);
+ else {
+ // find an elligible Process for this FlowElement,
+ // one that is not referenced by a Pool
+ List<Participant> pools = getAll(Participant.class);
+ for (Process process : getAll(Process.class)) {
+ boolean isProcessForPool = false;
+ for (Participant pool : pools) {
+ if (pool.getProcessRef() == process) {
+ isProcessForPool = true;
+ break;
+ }
+ }
+ if (!isProcessForPool)
+ return process;
+ }
+ // create a default Process.
+ // The BPMNDiagram now becomes a Process Diagram
+ try {
+ Process process = create(Process.class);
+ bpmnDiagram.getPlane().setBpmnElement(process);
+ return process;
+ }
+ catch (IllegalStateException e) {
+ }
+ return null;
}
}
if (o instanceof Participant) {
return getOrCreateProcess((Participant) o);
}
if (o instanceof SubProcess) {
-// EObject container = (SubProcess)o;
-// while (!(container instanceof Process) && container.eContainer()!=null) {
-// container = container.eContainer();
-// }
-// return (FlowElementsContainer) container;
return (FlowElementsContainer) o;
}
return findElementOfType(FlowElementsContainer.class, o);
@@ -898,7 +924,7 @@ public class ModelHandler {
public static <T> List<T> getAll(Resource resource, final Class<T> class1) {
ArrayList<T> l = new ArrayList<T>();
TreeIterator<EObject> contents = resource.getAllContents();
- for (; contents.hasNext();) {
+ while (contents.hasNext()) {
Object t = contents.next();
if (class1.isInstance(t)) {
l.add((T) t);
@@ -932,74 +958,15 @@ public class ModelHandler {
public <T extends EObject> T create(Class<T> clazz) {
return (T) create(this.resource, clazz);
}
-
- public void initialize(EObject newObject) {
- ModelHandler.initialize(this.resource, newObject);
- }
////////////////////////////////////////////////////////////////////////////
// static versions of the above, for convenience
public static EObject create(Resource resource, EClass eClass) {
- EObject newObject = null;
- EPackage pkg = eClass.getEPackage();
- EFactory factory = pkg.getEFactoryInstance();
- // make sure we don't try to construct abstract objects here!
- if (eClass == Bpmn2Package.eINSTANCE.getExpression())
- eClass = Bpmn2Package.eINSTANCE.getFormalExpression();
- newObject = factory.create(eClass);
- initialize(resource, newObject);
- return newObject;
+ return Bpmn2ModelerFactory.create(resource, eClass);
}
public static <T extends EObject> T create(Resource resource, Class<T> clazz) {
- EObject newObject = null;
- EClassifier eClassifier = Bpmn2Package.eINSTANCE.getEClassifier(clazz.getSimpleName());
- if (eClassifier instanceof EClass) {
- EClass eClass = (EClass)eClassifier;
- newObject = Bpmn2ModelerFactory.getInstance().create(eClass);
- }
- else {
- // maybe it's a DI object type?
- eClassifier = BpmnDiPackage.eINSTANCE.getEClassifier(clazz.getSimpleName());
- if (eClassifier instanceof EClass) {
- EClass eClass = (EClass)eClassifier;
- newObject = BpmnDiFactory.eINSTANCE.create(eClass);
- }
- }
-
- if (newObject!=null) {
- initialize(resource, newObject);
- }
-
- return (T)newObject;
- }
-
- public static void initialize(Resource resource, EObject newObject) {
- if (newObject!=null) {
- if (newObject.eClass().getEPackage() == Bpmn2Package.eINSTANCE) {
- // Set appropriate default values for the object features here
- switch (newObject.eClass().getClassifierID()) {
- case Bpmn2Package.CONDITIONAL_EVENT_DEFINITION:
- {
- Expression expr = Bpmn2ModelerFactory.getInstance().createFormalExpression();
- ((ConditionalEventDefinition)newObject).setCondition(expr);
- }
- break;
- }
- }
-
- // if the object has an "id", assign it now.
- String id = ModelUtil.setID(newObject,resource);
- // also set a default name
-// EStructuralFeature feature = newObject.eClass().getEStructuralFeature("name");
-// if (feature!=null) {
-// if (id!=null)
-// newObject.eSet(feature, ModelUtil.toDisplayName(id));
-// else
-// newObject.eSet(feature, "New "+ModelUtil.toDisplayName(newObject.eClass().getName()));
-// }
- }
+ return (T) Bpmn2ModelerFactory.create(resource, clazz);
}
-
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ModelHandlerLocator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelHandlerLocator.java
index 0822aee5..7e36995a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ModelHandlerLocator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ModelHandlerLocator.java
@@ -10,9 +10,8 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core;
+package org.eclipse.bpmn2.modeler.core.model;
-import java.io.IOException;
import java.util.HashMap;
import org.eclipse.bpmn2.util.Bpmn2ResourceImpl;
@@ -27,7 +26,7 @@ public class ModelHandlerLocator {
private static HashMap<URI, ModelHandler> map = new HashMap<URI, ModelHandler>();
private static HashMap<URI, ModelHandler> diagramMap = new HashMap<URI, ModelHandler>();
- public static ModelHandler getModelHandler(Resource eResource) throws IOException {
+ public static ModelHandler getModelHandler(Resource eResource) {
if (eResource==null)
return null;
URI uri = eResource.getURI().trimFragment();
@@ -35,7 +34,7 @@ public class ModelHandlerLocator {
return getModelHandler(uri);
}
- public static ModelHandler getModelHandler(URI path) throws IOException {
+ public static ModelHandler getModelHandler(URI path) {
path = path.trimFragment();
ModelHandler modelHandler = map.get(path);
if (modelHandler == null) {
@@ -97,4 +96,12 @@ public class ModelHandlerLocator {
return handler;
}
+ /**
+ * Remove the Model Handler instance from our cache.
+ *
+ * @param modelHandler the Model Handler to be removed
+ */
+ public static void dispose(ModelHandler modelHandler) {
+ remove(modelHandler.getResource().getURI());
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ProxyURIConverterImplExtension.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ProxyURIConverterImplExtension.java
index 9a84e375..ef03fc35 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/ProxyURIConverterImplExtension.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/ProxyURIConverterImplExtension.java
@@ -10,13 +10,13 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core;
+package org.eclipse.bpmn2.modeler.core.model;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl;
@@ -84,4 +84,12 @@ public final class ProxyURIConverterImplExtension extends ExtensibleURIConverter
}
return null;
}
+
+ public URI normalize(URI uri) {
+ URI normalizedURI = super.normalize(uri);
+ if (normalizedURI.isRelative()) {
+ normalizedURI = normalizedURI.resolve(baseUri);
+ }
+ return normalizedURI;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/RootElementComparator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/RootElementComparator.java
index 21d74a5b..fb635a01 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/RootElementComparator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/RootElementComparator.java
@@ -13,6 +13,8 @@ package org.eclipse.bpmn2.modeler.core.model;
import java.util.Comparator;
import org.eclipse.bpmn2.Category;
+import org.eclipse.bpmn2.Choreography;
+import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.CorrelationProperty;
import org.eclipse.bpmn2.DataStore;
import org.eclipse.bpmn2.EndPoint;
@@ -24,6 +26,7 @@ import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.Message;
import org.eclipse.bpmn2.PartnerEntity;
import org.eclipse.bpmn2.PartnerRole;
+import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.Resource;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.Signal;
@@ -44,6 +47,9 @@ public final class RootElementComparator implements Comparator<RootElement> {
CorrelationProperty.class,
PartnerRole.class,
PartnerEntity.class,
+ Choreography.class,
+ Collaboration.class,
+ Process.class,
};
@Override
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties
new file mode 100644
index 00000000..c52b2819
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/model/messages.properties
@@ -0,0 +1,16 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+Bpmn2ModelerResourceImpl_Illegal_QName=Illegal QName: {0}
+Bpmn2ModelerResourceImpl_Invalid_Reference=Invalid or unknown reference from object:\n {0}\nfeature:\n {1}\nto:\n {2}
+Bpmn2ModelerResourceSetImpl_Loading_Error_Message=Loading Resource {0} failed\!
+Bpmn2ModelerResourceSetImpl_Loading_Error=Cannot load Resource
+Bpmn2ModelerResourceSetImpl_Loading_Resource_Not_Found=Resource not found
+Bpmn2ModelerResourceSetImpl_Loading_Title=Loading Resource
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/package.html b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/package.html
new file mode 100644
index 00000000..9ae0a7ec
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/package.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head></head>
+<body>
+ Provides core functionality for, and interfaces to be implemented by BPMN2 Modeler extension plug-ins.
+</body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/AbstractPropertyChangeListenerProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/AbstractPropertyChangeListenerProvider.java
index dc4a35a9..3d4a328c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/AbstractPropertyChangeListenerProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/AbstractPropertyChangeListenerProvider.java
@@ -10,7 +10,7 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core;
+package org.eclipse.bpmn2.modeler.core.preferences;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Bpmn2Preferences.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Bpmn2Preferences.java
index 39950171..1cba1e4a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Bpmn2Preferences.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Bpmn2Preferences.java
@@ -16,6 +16,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -44,10 +45,9 @@ import org.eclipse.bpmn2.TerminateEventDefinition;
import org.eclipse.bpmn2.Transaction;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
import org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
@@ -105,6 +105,8 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
public final static String PREF_IS_MESSAGE_VISIBLE_LABEL = Messages.Bpmn2Preferences_Message_Visible;
public final static String PREF_IS_MARKER_VISIBLE = "is.marker.visible"; //$NON-NLS-1$
public final static String PREF_IS_MARKER_VISIBLE_LABEL = Messages.Bpmn2Preferences_Marker_Visible;
+ public final static String PREF_SAVE_BPMNLABELS = "save.bpmnlabels"; //$NON-NLS-1$
+ public final static String PREF_SAVE_BPMNLABELS_LABEL = Messages.Bpmn2Preferences_Save_BPMNLabels;
public final static String PREF_SHAPE_STYLE = "shape.style"; //$NON-NLS-1$
@@ -142,9 +144,10 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
public final static String PREF_PROPAGATE_GROUP_CATEGORIES_LABEL = Messages.Bpmn2Preferences_Propagate_Group_Categories;
public final static String PREF_ALLOW_MULTIPLE_CONNECTIONS = "allow.multiple.connections"; //$NON-NLS-1$
public final static String PREF_ALLOW_MULTIPLE_CONNECTIONS_LABEL = Messages.Bpmn2Preferences_Allow_Mutliple_Connections;
+ public final static String PREF_SERVICE_IMPLEMENTATIONS = "service.implementations"; //$NON-NLS-1$
- private static Hashtable<IProject,Bpmn2Preferences> projectInstances = null;
- private static Bpmn2Preferences globalInstance = null;
+ private static Hashtable<IProject,Bpmn2Preferences> projectPreferenceCacheMap = null;
+ private static Bpmn2Preferences instancePreferenceCache = null;
private static IProject activeProject;
private static ListenerList preferenceChangeListeners;
private static IPreferenceStore preferenceStore;
@@ -178,11 +181,12 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
private BPMNDIAttributeDefault isExpanded;
private BPMNDIAttributeDefault isMessageVisible;
private BPMNDIAttributeDefault isMarkerVisible;
+ private boolean saveBPMNLabels;
private int connectionTimeout;
private int popupConfigDialog;
private boolean popupConfigDialogFor[] = new boolean[6];
- private HashMap<Class, ShapeStyle> shapeStyles = new HashMap<Class, ShapeStyle>();
+ private HashMap<String, ShapeStyle> shapeStyles = new HashMap<String, ShapeStyle>();
private Bpmn2Preferences(IProject project) {
this.project = project;
@@ -234,7 +238,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
* @return project preferences
*/
public static Bpmn2Preferences getInstance(EObject object) {
- return getInstance(ModelUtil.getResource(object));
+ return getInstance(ObjectPropertyProvider.getResource(object));
}
public static Bpmn2Preferences getInstance(Resource resource) {
@@ -277,22 +281,45 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
public static Bpmn2Preferences getInstance(IProject project) {
Bpmn2Preferences pref = null;
if (project==null) {
- if (globalInstance==null)
- globalInstance = new Bpmn2Preferences(null);
- pref = globalInstance;
+ if (instancePreferenceCache==null) {
+ // Create a cache for the Instance Preference Store.
+ instancePreferenceCache = new Bpmn2Preferences(null);
+ }
+ pref = instancePreferenceCache;
}
else {
- if (projectInstances==null)
- projectInstances = new Hashtable<IProject,Bpmn2Preferences>();
- pref = projectInstances.get(project);
+ if (projectPreferenceCacheMap==null) {
+ // Create a map that will hold the Project Preference Store cache objects.
+ projectPreferenceCacheMap = new Hashtable<IProject,Bpmn2Preferences>();
+ }
+ pref = projectPreferenceCacheMap.get(project);
if (pref==null) {
+ // Create a cache for the Project Preference Store.
pref = new Bpmn2Preferences(project);
- projectInstances.put(project, pref);
+ pref.reload();
+ projectPreferenceCacheMap.put(project, pref);
}
}
return pref;
}
+ public static List<Bpmn2Preferences> getInstances(TargetRuntime rt) {
+ Assert.isNotNull(rt);
+ String id = rt.getId();
+ List<Bpmn2Preferences> prefs = new ArrayList<Bpmn2Preferences>();
+ if (instancePreferenceCache!=null && instancePreferenceCache.targetRuntime.getId().equals(id))
+ prefs.add(instancePreferenceCache);
+ if (projectPreferenceCacheMap!=null) {
+ for (Entry<IProject, Bpmn2Preferences> entry : projectPreferenceCacheMap.entrySet()) {
+ Bpmn2Preferences pref = entry.getValue();
+ if (pref.targetRuntime.getId().equals(id))
+ prefs.add(pref);
+ }
+
+ }
+ return prefs;
+ }
+
public void useProjectPreferences() {
Assert.isNotNull(projectPreferences);
useProjectPreferences = true;
@@ -300,7 +327,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
public void dispose() {
if (project!=null)
- projectInstances.remove(project);
+ projectPreferenceCacheMap.remove(project);
ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
preferenceStore.removePropertyChangeListener(this);
}
@@ -322,6 +349,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
defaultPreferences.put(PREF_IS_EXPANDED, BPMNDIAttributeDefault.ALWAYS_TRUE.name());
defaultPreferences.put(PREF_IS_MESSAGE_VISIBLE, BPMNDIAttributeDefault.ALWAYS_TRUE.name());
defaultPreferences.put(PREF_IS_MARKER_VISIBLE, BPMNDIAttributeDefault.DEFAULT_TRUE.name());
+ defaultPreferences.putBoolean(PREF_SAVE_BPMNLABELS, true);
defaultPreferences.putInt(PREF_POPUP_CONFIG_DIALOG, 0); // tri-state checkbox
defaultPreferences.putBoolean(PREF_POPUP_CONFIG_DIALOG_FOR_ACTIVITIES, false);
@@ -344,50 +372,45 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
private void loadDefaults(String key) {
if (key.equals(PREF_TOOL_PROFILE)) {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
- for (Bpmn2DiagramType diagramType : Bpmn2DiagramType.values()) {
- String defaultProfile = null;
- for (ModelEnablementDescriptor med : rt.getModelEnablements(diagramType)) {
- String path = getToolProfilePath(rt, diagramType);
- Preferences prefs = defaultPreferences.node(path);
- if (defaultProfile == null)
- prefs.putBoolean(defaultProfile = med.getProfile(), true);
- else
- prefs.putBoolean(med.getProfile(), false);
- }
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
+ String defaultProfile = null;
+ for (ModelEnablementDescriptor med : rt.getModelEnablements()) {
+ String path = getToolProfilePath(rt);
+ Preferences prefs = defaultPreferences.node(path);
+ if (defaultProfile == null)
+ prefs.putBoolean(defaultProfile = med.getId(), true);
+ else
+ prefs.putBoolean(med.getId(), false);
}
}
-
}
else if (key.equals(PREF_MODEL_ENABLEMENT)) {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
- for (Bpmn2DiagramType diagramType : Bpmn2DiagramType.values()) {
- for (ModelEnablementDescriptor med : rt.getModelEnablements(diagramType)) {
- String path = getModelEnablementsPath(rt, diagramType, med.getProfile());
- Preferences prefs = defaultPreferences.node(path);
- for (String s : med.getAllEnabled()) {
- prefs.putBoolean(s, Boolean.TRUE);
- }
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
+ for (ModelEnablementDescriptor med : rt.getModelEnablements()) {
+ String path = getModelEnablementsPath(rt, med.getId());
+ Preferences prefs = defaultPreferences.node(path);
+ for (String s : med.getAllEnabled()) {
+ prefs.putBoolean(s, Boolean.TRUE);
}
}
}
}
else if (key.equals(PREF_SHAPE_STYLE)) {
// Use ShapeStyles defined in the Default Target Runtime if an extension does not provide its own.
- Map<Class, ShapeStyle> defaultShapeStyles = TargetRuntime.getDefaultRuntime().getShapeStyles();
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
+ List<ShapeStyle> defaultShapeStyles = TargetRuntime.getDefaultRuntime().getShapeStyles();
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
String path = getShapeStylePath(rt);
Preferences prefs = defaultPreferences.node(path);
+ for (ShapeStyle ss : rt.getShapeStyles()) {
+ String value = ShapeStyle.encode(ss);
+ prefs.put(ss.getObject(), value);
+ }
if (rt!=TargetRuntime.getDefaultRuntime()) {
- for (Entry<Class, ShapeStyle> entry : defaultShapeStyles.entrySet()) {
- String value = ShapeStyle.encode(entry.getValue());
- prefs.put(entry.getKey().getSimpleName(), value);
+ for (ShapeStyle ss : defaultShapeStyles) {
+ String value = ShapeStyle.encode(ss);
+ prefs.put(ss.getObject(), value);
}
}
- for (Entry<Class, ShapeStyle> entry : rt.getShapeStyles().entrySet()) {
- String value = ShapeStyle.encode(entry.getValue());
- prefs.put(entry.getKey().getSimpleName(), value);
- }
}
}
}
@@ -404,7 +427,6 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
return projectPreferences.nodeExists(key);
}
catch (BackingStoreException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
@@ -433,6 +455,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
isExpanded = getBPMNDIAttributeDefault(PREF_IS_EXPANDED, BPMNDIAttributeDefault.USE_DI_VALUE);
isMessageVisible = getBPMNDIAttributeDefault(PREF_IS_MESSAGE_VISIBLE, BPMNDIAttributeDefault.USE_DI_VALUE);
isMarkerVisible = getBPMNDIAttributeDefault(PREF_IS_MARKER_VISIBLE, BPMNDIAttributeDefault.USE_DI_VALUE);
+ saveBPMNLabels = getBoolean(PREF_SAVE_BPMNLABELS, true);
connectionTimeout = getInt(PREF_CONNECTION_TIMEOUT, 60000); //$NON-NLS-1$
popupConfigDialog = getInt(PREF_POPUP_CONFIG_DIALOG, 0); // tri-state checkbox
@@ -446,7 +469,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
doCoreValidation = getBoolean(PREF_DO_CORE_VALIDATION, false);
propagateGroupCategories = getBoolean(PREF_PROPAGATE_GROUP_CATEGORIES, true);
allowMultipleConnections = getBoolean(PREF_ALLOW_MULTIPLE_CONNECTIONS, false);
-
+
cached = true;
}
}
@@ -471,6 +494,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
setBPMNDIAttributeDefault(PREF_IS_EXPANDED, isExpanded);
setBPMNDIAttributeDefault(PREF_IS_MESSAGE_VISIBLE, isMessageVisible);
setBPMNDIAttributeDefault(PREF_IS_MARKER_VISIBLE, isMarkerVisible);
+ putBoolean(PREF_SAVE_BPMNLABELS, saveBPMNLabels);
putInt(PREF_CONNECTION_TIMEOUT, connectionTimeout);
@@ -487,8 +511,13 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
}
}
- for (Entry<Class, ShapeStyle> entry : shapeStyles.entrySet()) {
- setShapeStyle(entry.getKey(), entry.getValue());
+ // prevent concurrent modification of the shapeStyle cache
+ HashMap<String, ShapeStyle> ssCache = new HashMap<String, ShapeStyle>();
+ ssCache.putAll(shapeStyles);
+ for (Entry<String, ShapeStyle> entry : ssCache.entrySet()) {
+ ShapeStyle ss = entry.getValue();
+ if (ss.isDirty())
+ setShapeStyle(entry.getKey(), ss);
}
instancePreferences.flush();
@@ -514,7 +543,11 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
}
public static String getShapeStyleKey(TargetRuntime rt, Class clazz) {
- return getShapeStylePath(rt) + "/" + clazz.getSimpleName(); //$NON-NLS-1$
+ return getShapeStyleKey(rt, clazz.getSimpleName());
+ }
+
+ public static String getShapeStyleKey(TargetRuntime rt, String name) {
+ return getShapeStylePath(rt) + "/" + name; //$NON-NLS-1$
}
public static String getShapeStylePath(TargetRuntime rt) {
@@ -532,22 +565,80 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
}
public ShapeStyle getShapeStyle(Class clazz) {
- ShapeStyle ss = shapeStyles.get(clazz);
+ return getShapeStyle(clazz.getSimpleName());
+ }
+
+ public ShapeStyle getShapeStyle(ShapeStyle.Category category) {
+ return getShapeStyle(category.name());
+ }
+
+ public ShapeStyle getShapeStyle(String name) {
+ ShapeStyle ss = shapeStyles.get(name);
if (ss==null) {
- String key = getShapeStyleKey(getRuntime(), clazz);
- String value = get(key, ""); //$NON-NLS-1$
- ss = ShapeStyle.decode(value);
- shapeStyles.put(clazz, ss);
+ if (instancePreferenceCache!=null) {
+ // check the Instance Preferences cache first
+ if (instancePreferenceCache.shapeStyles.containsKey(name)) {
+ ss = new ShapeStyle( instancePreferenceCache.shapeStyles.get(name) );
+ }
+ else {
+ // this has not been cached yet: check if contained
+ // in Instance Preference Store
+ String path = getShapeStylePath(TargetRuntime.getDefaultRuntime());
+ Preferences prefs = instancePreferences.node(path);
+ String value = prefs.get(name,"");
+ if (!value.isEmpty()) {
+ // found! save it in Instance Preferences cache
+ ss = ShapeStyle.decode(value);
+ instancePreferenceCache.shapeStyles.put(name,ss);
+ }
+ else {
+ // check if this key is in Default Preferences store
+ prefs = defaultPreferences.node(path);
+ value = prefs.get(name,"");
+ if (!value.isEmpty()) {
+ ss = ShapeStyle.decode(value);
+ }
+ }
+ }
+ }
+ if (ss==null) {
+ String key = getShapeStyleKey(getRuntime(), name);
+ String value = get(key, ""); //$NON-NLS-1$
+ if (value.isEmpty())
+ ss = new ShapeStyle();
+ else
+ ss = ShapeStyle.decode(value);
+ }
+ ss.setObject(name);
+ ss.setRuntime(targetRuntime);
+ shapeStyles.put(name, ss);
}
return ss;
}
+
+ public void setShapeStyle(EObject object, ShapeStyle ss) {
+ Class clazz;
+ try {
+ clazz = Class.forName(object.eClass().getInstanceClassName());
+ setShapeStyle(clazz, ss);
+ } catch (ClassNotFoundException e) {
+ setShapeStyle(object.getClass(), ss);
+ }
+ }
public void setShapeStyle(Class clazz, ShapeStyle style) {
+ setShapeStyle(clazz.getSimpleName(), style);
+ }
+
+ public void setShapeStyle(String name, ShapeStyle style) {
if (style.isDirty()) {
- String key = getShapeStyleKey(getRuntime(), clazz);
+ shapeStyles.put(name, style);
+ if (instancePreferenceCache!=null) {
+ instancePreferenceCache.shapeStyles.put(name, style);
+ }
+ String key = getShapeStyleKey(getRuntime(), name);
String value = ShapeStyle.encode(style);
put(key, value);
- shapeStyles.put(clazz, style);
style.setDirty(false);
}
}
@@ -556,14 +647,14 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
// Getters and setters for Tool Profiles
////////////////////////////////////////////////////////////////////////////////
- public static String getToolProfilePath(TargetRuntime rt, Bpmn2DiagramType diagramType) {
- return PREF_TOOL_PROFILE + "/" + rt.getId() + "/" + diagramType; //$NON-NLS-1$ //$NON-NLS-2$
+ public static String getToolProfilePath(TargetRuntime rt) {
+ return PREF_TOOL_PROFILE + "/" + rt.getId(); //$NON-NLS-1$ //$NON-NLS-2$
}
- public String getDefaultToolProfile(TargetRuntime rt, Bpmn2DiagramType diagramType) {
+ public String getDefaultToolProfile(TargetRuntime rt) {
try {
Preferences prefs = null;
- String path = getToolProfilePath(rt, diagramType);
+ String path = getToolProfilePath(rt);
if (projectPreferences!=null && projectPreferences.nodeExists(path))
prefs = projectPreferences.node(path);
else if (instancePreferences.nodeExists(path))
@@ -584,12 +675,12 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
return ""; //$NON-NLS-1$
}
- public boolean setDefaultToolProfile(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
+ public boolean setDefaultToolProfile(TargetRuntime rt, String profileId) {
boolean result = false;
- if (profile!=null && !profile.isEmpty()) {
+ if (profileId!=null && !profileId.isEmpty()) {
try {
Preferences prefs = null;
- String path = getToolProfilePath(rt, diagramType);
+ String path = getToolProfilePath(rt);
String keys[] = null;
if (projectPreferences!=null && useProjectPreferences) {
if (!projectPreferences.nodeExists(path))
@@ -606,7 +697,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
keys = prefs.keys();
for (String p : keys) {
- if (profile.equals(p)) {
+ if (profileId.equals(p)) {
prefs.putBoolean(p, true);
result = true;
}
@@ -615,7 +706,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
}
}
- firePreferenceEvent(prefs, path, null, profile);
+ firePreferenceEvent(prefs, path, null, profileId);
}
catch (BackingStoreException e) {
// TODO Auto-generated catch block
@@ -625,12 +716,13 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
return result;
}
- public boolean createToolProfile(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
- boolean result = false;
- if (profile!=null && !profile.isEmpty()) {
+ public ModelEnablementDescriptor createToolProfile(TargetRuntime rt, String profileId, String profileName, String description) {
+ ModelEnablementDescriptor med = null;
+ boolean createNew = false;
+ if (profileId!=null && !profileId.isEmpty()) {
try {
Preferences prefs = null;
- String path = getToolProfilePath(rt, diagramType);
+ String path = getToolProfilePath(rt);
String keys[] = null;
boolean populate = false;
if (projectPreferences!=null && useProjectPreferences) {
@@ -651,32 +743,37 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
if (keys==null)
keys = prefs.keys();
- result = true;
+ createNew = true;
for (String p : keys) {
- if (profile.equals(p)) {
- result = false;
+ if (profileId.equals(p)) {
+ if (rt.getModelEnablements(profileId)!=null)
+ createNew = false;
}
if (populate)
prefs.putBoolean(p, false);
}
- if (result) {
- prefs.putBoolean(profile, true);
- firePreferenceEvent(prefs, path, null, profile);
+ if (createNew) {
+ med = new ModelEnablementDescriptor(rt, profileId);
+ med.setProfileName(profileName);
+ med.setDescription(description);
+ rt.getModelEnablementDescriptors().add(med);
+ prefs.putBoolean(profileId, true);
+ firePreferenceEvent(prefs, path, null, profileId);
}
}
catch (BackingStoreException e) {
e.printStackTrace();
}
}
- return result;
+ return med;
}
- public boolean deleteToolProfile(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
+ public boolean deleteToolProfile(TargetRuntime rt, String profileId) {
boolean result = false;
- if (profile!=null && !profile.isEmpty()) {
+ if (profileId!=null && !profileId.isEmpty()) {
try {
Preferences prefs = null;
- String path = getToolProfilePath(rt, diagramType);
+ String path = getToolProfilePath(rt);
String keys[] = null;
boolean populate = false;
if (projectPreferences!=null && useProjectPreferences) {
@@ -700,14 +797,14 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
for (String p : keys) {
if (populate)
prefs.putBoolean(p, false);
- if (profile.equals(p)) {
+ if (profileId.equals(p)) {
result = true;
prefs.remove(p);
}
}
if (result && prefs.keys().length>0) {
prefs.putBoolean(prefs.keys()[0], true);
- firePreferenceEvent(prefs, path, profile, null);
+ firePreferenceEvent(prefs, path, profileId, null);
}
}
catch (BackingStoreException e) {
@@ -717,11 +814,11 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
return result;
}
- public String[] getAllToolProfiles(TargetRuntime rt, Bpmn2DiagramType diagramType) {
+ public String[] getAllToolProfiles(TargetRuntime rt) {
List<String> profiles = new ArrayList<String>();
try {
Preferences prefs = null;
- String path = getToolProfilePath(rt, diagramType);
+ String path = getToolProfilePath(rt);
if (projectPreferences!=null && projectPreferences.nodeExists(path))
prefs = projectPreferences.node(path);
else if (instancePreferences.nodeExists(path))
@@ -730,9 +827,11 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
prefs = defaultPreferences.node(path);
if (prefs!=null) {
- int i = 1;
- for (String p : prefs.keys()) {
- profiles.add(p);
+ for (String profileId : prefs.keys()) {
+ profiles.add(profileId);
+ if (rt.getModelEnablements(profileId) == null) {
+ getModelEnablements(rt, profileId);
+ }
}
Collections.sort(profiles);
}
@@ -748,20 +847,20 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
// Getters and setters for Model Enablements
////////////////////////////////////////////////////////////////////////////////
- public static String getModelEnablementsPath(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
- return PREF_MODEL_ENABLEMENT + "/" + rt.getId() + "/" + diagramType + "/" + profile; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ public static String getModelEnablementsPath(TargetRuntime rt, String profileId) {
+ return PREF_MODEL_ENABLEMENT + "/" + rt.getId() + "/" + profileId; //$NON-NLS-1$ //$NON-NLS-2$
}
- public ModelEnablements getModelEnablements(Bpmn2DiagramType diagramType, String profile) {
- return getModelEnablements(getRuntime(), diagramType, profile);
+ public ModelEnablements getModelEnablements(String profileId) {
+ return getModelEnablements(getRuntime(), profileId);
}
- public ModelEnablements getModelEnablements(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
- ModelEnablements me = new ModelEnablements(rt, diagramType, profile);
- if (profile!=null && !profile.isEmpty()) {
+ public ModelEnablements getModelEnablements(TargetRuntime rt, String profileId) {
+ ModelEnablements me = new ModelEnablements(rt, profileId);
+ if (profileId!=null && !profileId.isEmpty()) {
try {
Preferences prefs = null;
- String path = getModelEnablementsPath(rt, diagramType, profile);
+ String path = getModelEnablementsPath(rt, profileId);
if (projectPreferences!=null && projectPreferences.nodeExists(path))
prefs = projectPreferences.node(path);
else if (instancePreferences.nodeExists(path))
@@ -770,11 +869,22 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
prefs = defaultPreferences.node(path);
if (prefs!=null) {
+ boolean create = false;
+ ModelEnablementDescriptor med = rt.getModelEnablements(profileId);
+ if (med==null) {
+ String profileName = prefs.get("name","Unnamed Profile");
+ String description = prefs.get("description","");
+ med = createToolProfile(rt, profileId, profileName, description);
+ create = true;
+ }
+
me.setEnabledAll(false);
for (String k : prefs.keys()) {
- if (k.indexOf(".")>0) { //$NON-NLS-1$
- if (prefs.getBoolean(k, false))
- me.setEnabled(k, true);
+ if (prefs.getBoolean(k, false)) {
+ me.setEnabled(k, true);
+ if (create) {
+ med.setEnabled(k, true);
+ }
}
}
}
@@ -783,14 +893,17 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
e.printStackTrace();
}
}
+ else {
+ me.setEnabledAll(true);
+ }
return me;
}
- public boolean setModelEnablements(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile, ModelEnablements me) {
+ public boolean setModelEnablements(TargetRuntime rt, String profileId, ModelEnablements me) {
if (me!=null && me.size()>0) {
try {
Preferences prefs = null;
- String path = getModelEnablementsPath(rt, diagramType, profile);
+ String path = getModelEnablementsPath(rt, profileId);
if (projectPreferences!=null && useProjectPreferences) {
prefs = projectPreferences.node(path);
prefs.removeNode();
@@ -802,10 +915,15 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
prefs = instancePreferences.node(path);
}
+ ModelEnablementDescriptor med = rt.getModelEnablements(profileId);
+ if (med!=null) {
+ prefs.put("name", med.getProfileName());
+ prefs.put("description", med.getDescription());
+ }
for (String s : me.getAllEnabled()) {
prefs.putBoolean(s, true);
}
- firePreferenceEvent(prefs, path, null, profile);
+ firePreferenceEvent(prefs, path, null, profileId);
return true;
}
catch (BackingStoreException e) {
@@ -956,7 +1074,8 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
|| context instanceof CallChoreography) {
return true;
}
- return false;
+ // TODO: figure out a better way: does everything have configurable attributes now?
+ return true;
}
public void setShowPopupConfigDialog(Object context, boolean value) {
@@ -1036,6 +1155,15 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
setBPMNDIAttributeDefault(PREF_IS_MARKER_VISIBLE, value);
this.isMarkerVisible = value;
}
+
+ public boolean getSaveBPMNLabels() {
+ return saveBPMNLabels;
+ }
+
+ public void setSaveBPMNLabels(boolean enable) {
+ putBoolean(PREF_SAVE_BPMNLABELS,enable);
+ saveBPMNLabels = enable;
+ }
public int getConnectionTimeout() {
return connectionTimeout;
@@ -1272,6 +1400,7 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
else if (key.startsWith(PREF_SHAPE_STYLE)) {
shapeStyles.clear();
Preferences prefs = instancePreferences.node(key);
+ instancePreferenceCache = null;
prefs.removeNode();
}
else if (key.startsWith(PREF_TARGET_RUNTIME)) {
@@ -1549,6 +1678,51 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
}
+ public Hashtable<String,String> getServiceImplementations() {
+ String value = get(PREF_SERVICE_IMPLEMENTATIONS, ""); //$NON-NLS-1$
+ Hashtable<String,String> impls = new Hashtable<String,String>();
+ for (String s : value.split("\t")) { //$NON-NLS-1$
+ if (!s.isEmpty()) {
+ String a[] = s.split(";");
+ if (a.length>1)
+ impls.put(a[0], a[1]);
+ else
+ impls.put(a[0], a[0]);
+ }
+ }
+ return impls;
+ }
+
+ private void putServiceImplementations(Hashtable<String,String> impls) {
+ String value = ""; //$NON-NLS-1$
+ Iterator<Entry<String, String>> iter = impls.entrySet().iterator();
+ while (iter.hasNext()) {
+ Entry<String, String> entry = iter.next();
+ if (!entry.getKey().isEmpty()) {
+ value += entry.getKey() + ";" + entry.getValue();
+ if (iter.hasNext())
+ value += "\t"; //$NON-NLS-1$
+ }
+ }
+ put(PREF_SERVICE_IMPLEMENTATIONS, value);
+ }
+
+ public void addServiceImplementation(String name, String uri) {
+ Hashtable<String,String> impls = getServiceImplementations();
+ if (!impls.contains(name)) {
+ impls.put(name, uri);
+ putServiceImplementations(impls);
+ }
+ }
+
+ public void removeServiceImplementation(String name) {
+ Hashtable<String,String> impls = getServiceImplementations();
+ if (impls.containsKey(name)) {
+ impls.remove(name);
+ putServiceImplementations(impls);
+ }
+ }
+
public BPMNDIAttributeDefault getBPMNDIAttributeDefault(String key, BPMNDIAttributeDefault defaultValue) {
PreferencesHelper helper = new PreferencesHelper(key, false);
String str = helper.getString(defaultValue.name());
@@ -1565,8 +1739,8 @@ public class Bpmn2Preferences implements IResourceChangeListener, IPropertyChang
firePreferenceEvent(instancePreferences, event.getProperty(), event.getOldValue(), event.getNewValue());
// notify all other Bpmn2Preferences instances (if any)
- if (projectInstances!=null) {
- for (Entry<IProject, Bpmn2Preferences> entry : projectInstances.entrySet()) {
+ if (projectPreferenceCacheMap!=null) {
+ for (Entry<IProject, Bpmn2Preferences> entry : projectPreferenceCacheMap.entrySet()) {
Bpmn2Preferences pref = entry.getValue();
if (pref!=this)
pref.firePreferenceEvent(instancePreferences, event.getProperty(), event.getOldValue(), event.getNewValue());
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java
new file mode 100644
index 00000000..e149b657
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/Messages.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.preferences.messages"; //$NON-NLS-1$
+
+ public static String Bpmn2Preferences_No_Runtime_Plugin_Title;
+ public static String Bpmn2Preferences_Activities;
+ public static String Bpmn2Preferences_Always_False;
+ public static String Bpmn2Preferences_Always_true;
+ public static String Bpmn2Preferences_Check_Project_Nature;
+ public static String Bpmn2Preferences_Use_Popup_Dialog_For_Lists;
+ public static String Bpmn2Preferences_Config_Dialog;
+ public static String Bpmn2Preferences_Containers;
+ public static String Bpmn2Preferences_Data_Items;
+ public static String Bpmn2Preferences_Do_Core_Validation;
+ public static String Bpmn2Preferences_Propagate_Group_Categories;
+ public static String Bpmn2Preferences_Allow_Mutliple_Connections;
+ public static String Bpmn2Preferences_Event_Definitions;
+ public static String Bpmn2Preferences_Events;
+ public static String Bpmn2Preferences_Expand;
+ public static String Bpmn2Preferences_False_if_not_set;
+ public static String Bpmn2Preferences_Gateways;
+ public static String Bpmn2Preferences_Horizontal;
+ public static String Bpmn2Preferences_Marker_Visible;
+ public static String Bpmn2Preferences_Message_Visible;
+ public static String Bpmn2Preferences_Save_BPMNLabels;
+ public static String Bpmn2Preferences_No_Runtime_Plugin_Message;
+ public static String Bpmn2Preferences_None;
+ public static String Bpmn2Preferences_Show_Advanced_Properties;
+ public static String Bpmn2Preferences_Show_Descriptions;
+ public static String Bpmn2Preferences_Show_ID_Attribute;
+ public static String Bpmn2Preferences_Simplify_Lists;
+ public static String Bpmn2Preferences_Target_Runtime;
+ public static String Bpmn2Preferences_Timeout;
+ public static String Bpmn2Preferences_True_if_not_set;
+
+ public static String ShapeStyle_Category_Connections;
+ public static String ShapeStyle_Category_Shapes;
+ public static String ShapeStyle_Category_Events;
+ public static String ShapeStyle_Category_Gateways;
+ public static String ShapeStyle_Category_Tasks;
+ public static String ShapeStyle_Category_GlobalTasks;
+ public static String ShapeStyle_Category_SubProcess;
+ public static String ShapeStyle_Category_Choreography;
+ public static String ShapeStyle_Category_Conversation;
+ public static String ShapeStyle_Category_SwimLanes;
+ public static String ShapeStyle_Category_Data;
+ public static String ShapeStyle_Category_Other;
+ public static String ShapeStyle_Category_Canvas;
+ public static String ShapeStyle_Category_Grid;
+
+ public static String ShapeStyle_RoutingStyle_Direct;
+ public static String ShapeStyle_RoutingStyle_Automatic;
+ public static String ShapeStyle_RoutingStyle_Manhattan;
+
+ public static String ShapeStyle_LabelPosition_North;
+ public static String ShapeStyle_LabelPosition_South;
+ public static String ShapeStyle_LabelPosition_West;
+ public static String ShapeStyle_LabelPosition_East;
+ public static String ShapeStyle_LabelPosition_Top;
+ public static String ShapeStyle_LabelPosition_Center;
+ public static String ShapeStyle_LabelPosition_Bottom;
+ public static String ShapeStyle_LabelPosition_Left;
+ public static String ShapeStyle_LabelPosition_Right;
+ public static String ShapeStyle_LabelPosition_Movable;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablements.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablements.java
index e4ec3910..e59f71c6 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablements.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablements.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.preferences;
import java.util.ArrayList;
@@ -10,8 +20,8 @@ import java.util.Map.Entry;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.di.BpmnDiPackage;
import org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature;
+import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
@@ -27,18 +37,16 @@ public class ModelEnablements {
// Map of enabled EClasses and their enabled Features
private Hashtable<String, HashSet<String>> classes = new Hashtable<String, HashSet<String>>();
private TargetRuntime targetRuntime = null;
- private Bpmn2DiagramType diagramType = Bpmn2DiagramType.NONE;
- private String profile = "";
+ private String id = ""; //$NON-NLS-1$
private int enableIdAttribute = -1;
// require a TargetRuntime!
private ModelEnablements() {
}
- public ModelEnablements(TargetRuntime targetRuntime, Bpmn2DiagramType diagramType, String profile) {
+ public ModelEnablements(TargetRuntime targetRuntime, String id) {
this.targetRuntime = targetRuntime;
- this.diagramType = diagramType;
- this.profile = profile;
+ this.id = id;
}
public void setEnableIdAttribute(boolean enabled) {
@@ -349,29 +357,80 @@ public class ModelEnablements {
}
public boolean isEnabled(String className, String featureName) {
+ // this needs to happen very late in the lifecycle of this class because we don't want
+ // to force loading of the Bpmn2Preferences (and setting up default preference values)
+ // before all of the TargetRuntimes have been loaded by TargetRuntime.getAllRuntimes().
+ // See Bpmn2Preferences#loadDefaults()
+ if (enableIdAttribute== -1) {
+ Bpmn2Preferences prefs = Bpmn2Preferences.getInstance();
+ setEnableIdAttribute(prefs.getShowIdAttribute());
+ }
+
if ("id".equals(featureName)) { //$NON-NLS-1$
- // this needs to happen very late in the lifecycle of this class because we don't want
- // to force loading of the Bpmn2Preferences (and setting up default preference values)
- // before all of the TargetRuntimes have been loaded by TargetRuntime.getAllRuntimes().
- // See Bpmn2Preferences#loadDefaults()
- if (enableIdAttribute== -1) {
- Bpmn2Preferences prefs = Bpmn2Preferences.getInstance(targetRuntime.getResource());
- setEnableIdAttribute(prefs.getShowIdAttribute());
- }
if (!getEnableIdAttribute())
return false;
}
+
if (className==null)
return true;
+
if (classes.containsKey(className)) { // && isOverride()) {
if (featureName!=null && !featureName.isEmpty()) {
+ // the "anyAttribute" FeatureMap should always be enabled,
+ // although the features contained in the map may not be
+ if ("anyAttribute".equals(featureName)) //$NON-NLS-1$
+ return true;
+
HashSet<String> features = classes.get(className);
- return features.contains(featureName);
+ if (features.contains(featureName))
+ return true;
+
+ // check all supertypes of the requested EClass
+ EClass eClass = getEClass(className);
+ if (eClass!=null) {
+ for (EClass st : eClass.getEAllSuperTypes()) {
+ className = st.getName();
+ if (classes.containsKey(className)) { // && isOverride()) {
+ if (featureName!=null && !featureName.isEmpty()) {
+ features = classes.get(className);
+ if (features.contains(featureName))
+ return true;
+ break;
+ }
+ return true;
+ }
+ }
+ }
+ if (isEnabled(targetRuntime, className, featureName))
+ return true;
+ return false;
}
return true;
}
- return false; //!isOverride();
+ // Check any model extensions - these are always enabled by default
+ // This is an expensive operation, so we'll cache these values.
+ //
+ // FIXME: if there ever comes a time when we'll want to reload model extensions
+ // while the editor is still active, we'll need to clear out this cache.
+ if (isEnabled(targetRuntime, className, featureName))
+ return true;
+
+ // FIXME: should we also check the Default Target Runtime extensions?
+// if (targetRuntime!=TargetRuntime.getDefaultRuntime())
+// return isEnabled(TargetRuntime.getDefaultRuntime(), className, featureName);
+
+ return false;
+ }
+
+ private boolean isEnabled(TargetRuntime targetRuntime, String className, String featureName) {
+ for (ModelExtensionDescriptor md : targetRuntime.getAllModelExtensionDescriptors()) {
+ if (md.isDefined(className, featureName)) {
+ setEnabled(className, featureName, true);
+ return true;
+ }
+ }
+ return false;
}
public boolean isEnabled(EClass eClass, EStructuralFeature feature) {
@@ -452,11 +511,11 @@ public class ModelEnablements {
return classList;
}
- public Bpmn2DiagramType getDiagramType() {
- return diagramType;
+ public String getId() {
+ return id;
}
- public String getProfile() {
- return profile;
+ public void setId(String id) {
+ this.id = id;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java
new file mode 100644
index 00000000..1a4d5be8
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ShapeStyle.java
@@ -0,0 +1,936 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.preferences;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.runtime.BaseRuntimeExtensionDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.graphiti.mm.algorithms.styles.Font;
+import org.eclipse.graphiti.mm.algorithms.styles.StylesFactory;
+import org.eclipse.graphiti.mm.algorithms.styles.StylesPackage;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.util.ColorConstant;
+import org.eclipse.graphiti.util.ColorUtil;
+import org.eclipse.graphiti.util.IColorConstant;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.RGB;
+
+/**
+ * Target Runtime Extension Descriptor class that defines color and font settings for graphical elements.
+ * Instances of this class correspond to <style> extension elements in the extension's plugin.xml
+ * See the description of the STYLE_OBJECT element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ */
+public class ShapeStyle extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "style"; //$NON-NLS-1$
+
+ public static IColorConstant DEFAULT_COLOR = new ColorConstant(212, 231, 248);
+ public static String DEFAULT_FONT_STRING = "arial,9,-,-"; //$NON-NLS-1$
+ public final static int SS_SHAPE_BACKGROUND = 1 << 0;
+ public final static int SS_SHAPE_FOREGROUND = 1 << 1;
+ public final static int SS_SHAPE_PRIMARY_SELECTION = 1 << 2;
+ public final static int SS_SHAPE_SECONDARY_SELECTION = 1 << 3;
+ public final static int SS_LABEL_FONT = 1 << 4;
+ public final static int SS_LABEL_FOREGROUND = 1 << 5;
+ public final static int SS_LABEL_BACKGROUND = 1 << 6;
+ public final static int SS_LABEL_POSITION = 1 << 11;
+ public final static int SS_ROUTING_STYLE = 1 << 7;
+ public final static int SS_USE_DEFAULT_SIZE = 1 << 8;
+ public final static int SS_DEFAULT_WIDTH = 1 << 9;
+ public final static int SS_DEFAULT_HEIGHT = 1 << 10;
+ public final static int SS_ALL = -1;
+
+ /** Attribute names of the ShapeStyle components in the style object in BaseElement extension values **/
+ public final static String STYLE_OBJECT = "style";
+ public final static String STYLE_ECLASS = "ShapeStyle";
+ public final static String STYLE_SHAPE_FOREGROUND = "shapeForeground";
+ public final static String STYLE_SHAPE_BACKGROUND = "shapeBackground";
+ public final static String STYLE_LABEL_FONT = "labelFont";
+ public final static String STYLE_LABEL_FOREGROUND = "labelForeground";
+ public final static String STYLE_LABEL_BACKGROUND = "labelBackground";
+ public final static String STYLE_LABEL_POSITION = "labelPosition";
+ public final static String STYLE_ROUTING_STYLE = "routingStyle";
+ public final static String STYLE_USE_DEFAULT_SIZE = "useDefaultSize";
+ public final static String STYLE_DEFAULT_WIDTH = "defaultWidth";
+ public final static String STYLE_DEFAULT_HEIGHT = "defaultHeight";
+
+ private final static String DEFAULT_BACKGROUND = "FFFFFF";
+ private final static String DEFAULT_FOREGROUND = "000000";
+
+ String object;
+ IColorConstant shapeBackground;
+ IColorConstant shapePrimarySelectedColor;
+ IColorConstant shapeSecondarySelectedColor;
+ IColorConstant shapeForeground;
+ Font labelFont;
+ IColorConstant labelForeground;
+ IColorConstant labelBackground;
+ RoutingStyle routingStyle = RoutingStyle.Manhattan;
+ boolean useDefaultSize;
+ // the useDefault doubles as the flag for "snap to grid" in the Canvas ShapeStyle
+// boolean snapToGrid = true;
+ int defaultWidth = 110;
+ int defaultHeight = 50;
+ LabelPosition labelPosition = LabelPosition.SOUTH;
+ int changeMask;
+
+ public static enum Category {
+ CONNECTIONS(Messages.ShapeStyle_Category_Connections),
+ SHAPES(Messages.ShapeStyle_Category_Shapes),
+ EVENTS(Messages.ShapeStyle_Category_Events),
+ GATEWAYS(Messages.ShapeStyle_Category_Gateways),
+ TASKS(Messages.ShapeStyle_Category_Tasks),
+ GLOBAL_TASKS(Messages.ShapeStyle_Category_GlobalTasks),
+ SUBPROCESS(Messages.ShapeStyle_Category_SubProcess),
+ CHOREOGRAPHY(Messages.ShapeStyle_Category_Choreography),
+ CONVERSATION(Messages.ShapeStyle_Category_Conversation),
+ SWIMLANES(Messages.ShapeStyle_Category_SwimLanes),
+ DATA(Messages.ShapeStyle_Category_Data),
+ ARTIFACTS(Messages.ShapeStyle_Category_Other),
+ CANVAS(Messages.ShapeStyle_Category_Canvas),
+ GRID(Messages.ShapeStyle_Category_Grid),
+ NONE("");
+
+ private String string;
+ private Category(String string) {
+ this.string = string;
+ }
+
+ @Override
+ public String toString() {
+ return string;
+ }
+ };
+
+ public static enum RoutingStyle {
+ ManualBendpoint(Messages.ShapeStyle_RoutingStyle_Direct),
+ AutomaticBendpoint(Messages.ShapeStyle_RoutingStyle_Automatic),
+ Manhattan(Messages.ShapeStyle_RoutingStyle_Manhattan);
+
+ private String string;
+ private RoutingStyle(String string) {
+ this.string = string;
+ }
+
+ @Override
+ public String toString() {
+ return string;
+ }
+ };
+
+ public static enum LabelPosition {
+ SOUTH(Messages.ShapeStyle_LabelPosition_South), // this is the default value, ordinal=0
+ NORTH(Messages.ShapeStyle_LabelPosition_North),
+ WEST(Messages.ShapeStyle_LabelPosition_West),
+ EAST(Messages.ShapeStyle_LabelPosition_East),
+ TOP(Messages.ShapeStyle_LabelPosition_Top),
+ CENTER(Messages.ShapeStyle_LabelPosition_Center),
+ BOTTOM(Messages.ShapeStyle_LabelPosition_Bottom),
+ LEFT(Messages.ShapeStyle_LabelPosition_Left),
+ RIGHT(Messages.ShapeStyle_LabelPosition_Right),
+ MOVABLE(Messages.ShapeStyle_LabelPosition_Movable);
+
+ private String string;
+ private LabelPosition(String string) {
+ this.string = string;
+ }
+
+ @Override
+ public String toString() {
+ return string;
+ }
+ }
+
+ public ShapeStyle() {
+ setDefaultColors(DEFAULT_COLOR);
+ labelFont = stringToFont(DEFAULT_FONT_STRING);
+ }
+
+ public ShapeStyle(IConfigurationElement e) {
+ super(e);
+ object = e.getAttribute("object");
+ String shapeForeground = e.getAttribute(STYLE_SHAPE_FOREGROUND);
+ String shapeBackground = e.getAttribute(STYLE_SHAPE_BACKGROUND);
+ String labelFont = e.getAttribute(STYLE_LABEL_FONT);
+ String labelForeground = e.getAttribute(STYLE_LABEL_FOREGROUND);
+ String labelBackground = e.getAttribute(STYLE_LABEL_BACKGROUND);
+ String labelPosition = e.getAttribute(STYLE_LABEL_POSITION);
+ String routingStyle = e.getAttribute(STYLE_ROUTING_STYLE);
+ String useDefaultSize = e.getAttribute(STYLE_USE_DEFAULT_SIZE);
+ String defaultHeight = e.getAttribute(STYLE_DEFAULT_HEIGHT);
+ String defaultWidth = e.getAttribute(STYLE_DEFAULT_WIDTH);
+
+ // only background color is required to set up default color scheme
+ if (shapeBackground==null || shapeBackground.isEmpty())
+ shapeBackground = DEFAULT_BACKGROUND;
+ this.shapeBackground = stringToColor(shapeBackground);
+ setDefaultColors(this.shapeBackground);
+
+ // optional:
+ if (shapeForeground!=null && !shapeForeground.isEmpty())
+ this.shapeForeground = stringToColor(shapeForeground);
+ if (labelFont==null || labelFont.isEmpty())
+ labelFont = DEFAULT_FONT_STRING;
+ this.labelFont = stringToFont(labelFont);
+ if (labelForeground!=null && !labelForeground.isEmpty())
+ this.labelForeground = stringToColor(labelForeground);
+ if (labelBackground!=null && !labelBackground.isEmpty())
+ this.labelBackground = stringToColor(labelBackground);
+ if (labelPosition!=null && !labelPosition.isEmpty())
+ this.labelPosition = LabelPosition.valueOf(labelPosition);
+ else
+ this.labelPosition = LabelPosition.SOUTH;
+ if (routingStyle!=null && !routingStyle.isEmpty())
+ this.routingStyle = RoutingStyle.valueOf(labelPosition);
+ else
+ this.routingStyle = RoutingStyle.Manhattan;
+ this.useDefaultSize = Boolean.parseBoolean(useDefaultSize);
+ try { this.defaultHeight = Integer.parseInt(defaultHeight); } catch (Exception e1) {}
+ try { this.defaultWidth = Integer.parseInt(defaultWidth); } catch (Exception e1) {}
+ }
+
+ public ShapeStyle(ShapeStyle other) {
+ this(encode(other));
+ this.object = other.object;
+ this.targetRuntime = other.targetRuntime;
+ }
+
+ private ShapeStyle(String s) {
+ String[] a = s.trim().split(";"); //$NON-NLS-1$
+ if (a.length>0)
+ shapeBackground = stringToColor(a[0]);
+ if (a.length>1)
+ shapePrimarySelectedColor = stringToColor(a[1]);
+ if (a.length>2)
+ shapeSecondarySelectedColor = stringToColor(a[2]);
+ if (a.length>3)
+ shapeForeground = stringToColor(a[3]);
+ if (a.length>4)
+ labelFont = stringToFont(a[4]);
+ if (a.length>5)
+ labelForeground = stringToColor(a[5]);
+ if (a.length>6)
+ labelBackground = stringToColor(a[6]);
+ if (a.length>7) {
+ try {
+ routingStyle = RoutingStyle.values()[Integer.parseInt(a[7])];
+ }
+ catch (Exception e) {
+ routingStyle = RoutingStyle.ManualBendpoint;
+ }
+ }
+ else
+ routingStyle = RoutingStyle.ManualBendpoint;
+
+ if (a.length>8) {
+ useDefaultSize = stringToBoolean(a[8]);
+ }
+ else
+ useDefaultSize = false;
+
+ if (a.length>9) {
+ defaultWidth = Integer.parseInt(a[9]);
+ }
+ else
+ defaultWidth = 110;
+
+ if (a.length>10) {
+ defaultHeight= Integer.parseInt(a[10]);
+ }
+ else
+ defaultHeight = 50;
+
+ if (a.length>11) {
+ labelPosition = LabelPosition.values()[Integer.parseInt(a[11])];
+ }
+ else
+ labelPosition = LabelPosition.SOUTH;
+ }
+
+ @Override
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public String getObject() {
+ return object;
+ }
+
+ public void setObject(String object) {
+ this.object = object;
+ }
+
+ public void setDefaultColors(IColorConstant defaultColor) {
+ setShapeBackground(defaultColor);
+ setShapePrimarySelectedColor(StyleUtil.shiftColor(defaultColor, 32));
+ setShapeSecondarySelectedColor(StyleUtil.shiftColor(defaultColor, -32));
+ setShapeForeground(StyleUtil.shiftColor(defaultColor, -128));
+ setLabelForeground(StyleUtil.shiftColor(defaultColor, -128));
+ setLabelBackground(stringToColor(DEFAULT_BACKGROUND));
+ }
+
+ public boolean isDirty() {
+ return changeMask!=0;
+ }
+
+ public void setDirty(boolean dirty) {
+ this.changeMask = SS_ALL;
+ }
+
+ public IColorConstant getShapeBackground() {
+ return shapeBackground;
+ }
+
+ public void setShapeBackground(IColorConstant shapeDefaultColor) {
+ if (!equals(this.shapeBackground, shapeDefaultColor)) {
+ this.shapeBackground = shapeDefaultColor;
+ changeMask |= SS_SHAPE_BACKGROUND;
+ }
+ }
+
+ public IColorConstant getShapePrimarySelectedColor() {
+ return shapePrimarySelectedColor;
+ }
+
+ public void setShapePrimarySelectedColor(IColorConstant shapePrimarySelectedColor) {
+ if (!equals(this.shapePrimarySelectedColor, shapePrimarySelectedColor)) {
+ this.shapePrimarySelectedColor = shapePrimarySelectedColor;
+ changeMask |= SS_SHAPE_PRIMARY_SELECTION;
+ }
+ }
+
+ public IColorConstant getShapeSecondarySelectedColor() {
+ return shapeSecondarySelectedColor;
+ }
+
+ public void setShapeSecondarySelectedColor(IColorConstant shapeSecondarySelectedColor) {
+ if (!equals(this.shapeSecondarySelectedColor, shapeSecondarySelectedColor)) {
+ this.shapeSecondarySelectedColor = shapeSecondarySelectedColor;
+ changeMask |= SS_SHAPE_SECONDARY_SELECTION;
+ }
+ }
+
+ public IColorConstant getShapeForeground() {
+ return shapeForeground;
+ }
+
+ public void setShapeForeground(IColorConstant shapeBorderColor) {
+ if (!equals(this.shapeForeground, shapeBorderColor)) {
+ this.shapeForeground = shapeBorderColor;
+ changeMask |= SS_SHAPE_FOREGROUND;
+ }
+ }
+
+ public Font getLabelFont() {
+ return labelFont;
+ }
+
+ public void setLabelFont(Font labelFont) {
+ if (!equals(this.labelFont, labelFont)) {
+ this.labelFont = labelFont;
+ changeMask |= SS_LABEL_FONT;
+ }
+ }
+
+ public IColorConstant getLabelForeground() {
+ return labelForeground;
+ }
+
+ public void setLabelForeground(IColorConstant labelForeground) {
+ if (!equals(this.labelForeground, labelForeground)) {
+ this.labelForeground = labelForeground;
+ changeMask |= SS_LABEL_FOREGROUND;
+ }
+ }
+
+ public IColorConstant getLabelBackground() {
+ if (labelBackground==null)
+ return stringToColor(DEFAULT_BACKGROUND);
+ return labelBackground;
+ }
+
+ public void setLabelBackground(IColorConstant labelBackground) {
+ if (!equals(this.labelBackground, labelBackground)) {
+ this.labelBackground = labelBackground;
+ changeMask |= SS_LABEL_BACKGROUND;
+ }
+ }
+
+ public RoutingStyle getRoutingStyle() {
+ return routingStyle;
+ }
+
+ public void setRoutingStyle(RoutingStyle routingStyle) {
+ if (this.routingStyle != routingStyle) {
+ this.routingStyle = routingStyle;
+ changeMask |= SS_ROUTING_STYLE;
+ }
+ }
+
+ public int getDefaultWidth() {
+ if (defaultWidth<=0) {
+ if (object.toLowerCase().contains("gateway"))
+ return 50;
+ if (object.toLowerCase().contains("event"))
+ return 36;
+ if (object.toLowerCase().contains("choreography"))
+ return 150;
+ if (object.toLowerCase().contains("data"))
+ return 36;
+ return 110;
+ }
+ return defaultWidth;
+ }
+
+ public void setDefaultWidth(int defaultWidth) {
+ if (this.defaultWidth!=defaultWidth) {
+ this.defaultWidth = defaultWidth;
+ changeMask |= SS_DEFAULT_WIDTH;
+ }
+ }
+
+ public int getDefaultHeight() {
+ if (defaultHeight<=0) {
+ if (object.toLowerCase().contains("gateway"))
+ return 50;
+ if (object.toLowerCase().contains("event"))
+ return 36;
+ if (object.toLowerCase().contains("choreography"))
+ return 150;
+ if (object.toLowerCase().contains("data"))
+ return 50;
+ return 50;
+ }
+ return defaultHeight;
+ }
+
+ public void setDefaultHeight(int defaultHeight) {
+ if (this.defaultHeight!=defaultHeight) {
+ this.defaultHeight = defaultHeight;
+ changeMask |= SS_DEFAULT_HEIGHT;
+ }
+ }
+
+ public LabelPosition getLabelPosition() {
+ return labelPosition;
+ }
+
+ public void setLabelPosition(LabelPosition labelPosition) {
+ if (this.labelPosition!=labelPosition) {
+ this.labelPosition = labelPosition;
+ changeMask |= SS_LABEL_POSITION;
+ }
+ }
+
+ public boolean getUseDefaultSize() {
+ return useDefaultSize;
+ }
+
+ public void setUseDefaultSize(boolean b) {
+ if (useDefaultSize != b) {
+ useDefaultSize = b;
+ changeMask |= SS_USE_DEFAULT_SIZE;
+ }
+ }
+
+ public boolean getSnapToGrid() {
+ return getUseDefaultSize();
+ }
+
+ public void setSnapToGrid(boolean value) {
+ setUseDefaultSize(value);
+ }
+
+ public static String colorToString(IColorConstant c) {
+ return new String(
+ String.format("%02X",c.getRed()) + //$NON-NLS-1$
+ String.format("%02X",c.getGreen()) + //$NON-NLS-1$
+ String.format("%02X",c.getBlue()) //$NON-NLS-1$
+ );
+ }
+
+ public static IColorConstant stringToColor(String s) {
+ if (s.contains(",")) { //$NON-NLS-1$
+ String[] a = s.split(","); //$NON-NLS-1$
+ int r = Integer.parseInt(a[0]);
+ int g = Integer.parseInt(a[1]);
+ int b = Integer.parseInt(a[2]);
+ return new ColorConstant(r, g, b);
+ }
+ if (s.length()<6)
+ return new ColorConstant(0,0,0);
+ return new ColorConstant(
+ ColorUtil.getRedFromHex(s),
+ ColorUtil.getGreenFromHex(s),
+ ColorUtil.getBlueFromHex(s)
+ );
+ }
+
+ public static String booleanToString(boolean b) {
+ return b ? "1" : "0"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public static boolean stringToBoolean(String s) {
+ return "1".equals(s); //$NON-NLS-1$
+ }
+
+ public static RGB colorToRGB(IColorConstant c) {
+ return new RGB(c.getRed(),c.getGreen(),c.getBlue());
+ }
+
+ public static IColorConstant RGBToColor(RGB rgb) {
+ return new ColorConstant(rgb.red, rgb.green, rgb.blue);
+ }
+
+ public static String fontToString(Font f) {
+ if (f!=null)
+ return new String(
+ f.getName() + "," + //$NON-NLS-1$
+ f.getSize() + "," + //$NON-NLS-1$
+ (f.isItalic() ? "I" : "-") + "," + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ (f.isBold() ? "B" : "-") //$NON-NLS-1$ //$NON-NLS-2$
+ );
+ return "";
+ }
+
+ public static Font stringToFont(String s) {
+ String[] a = s.split(","); //$NON-NLS-1$
+ Font f = StylesFactory.eINSTANCE.createFont();
+ f.eSet(StylesPackage.eINSTANCE.getFont_Name(), a[0]);
+ f.eSet(StylesPackage.eINSTANCE.getFont_Size(), Integer.valueOf(a[1]));
+ f.eSet(StylesPackage.eINSTANCE.getFont_Italic(), a[2].equals("I")); //$NON-NLS-1$
+ f.eSet(StylesPackage.eINSTANCE.getFont_Bold(), a[3].equals("B")); //$NON-NLS-1$
+ return f;
+ }
+
+ public static FontData fontToFontData(Font f) {
+ int style = 0;
+ if (f.isItalic())
+ style |= SWT.ITALIC;
+ if (f.isBold())
+ style |= SWT.BOLD;
+ return new FontData(f.getName(), f.getSize(), style);
+ }
+
+ public static Font fontDataToFont(FontData fd) {
+ Font f = StylesFactory.eINSTANCE.createFont();
+ f.eSet(StylesPackage.eINSTANCE.getFont_Name(),fd.getName());
+ f.eSet(StylesPackage.eINSTANCE.getFont_Size(), fd.getHeight());
+ f.eSet(StylesPackage.eINSTANCE.getFont_Italic(), (fd.getStyle() & SWT.ITALIC)!=0);
+ f.eSet(StylesPackage.eINSTANCE.getFont_Bold(), (fd.getStyle() & SWT.BOLD)!=0);
+ return f;
+ }
+
+ /**
+ * @param fontData
+ * @return
+ */
+ public static Font toGraphitiFont(Diagram diagram, FontData fontData) {
+ if (fontData == null) {
+ return null;
+ }
+ Font ret = null;
+ try {
+ String name = fontData.getName();
+ int height = fontData.getHeight();
+ boolean italic = (fontData.getStyle() & SWT.ITALIC) != 0;
+ boolean bold = (fontData.getStyle() & SWT.BOLD) != 0;
+ ret = Graphiti.getGaService().manageFont(diagram, name, height, italic, bold);
+ }
+ catch (Exception e) {
+ }
+ return ret;
+ }
+
+ /**
+ * @param pictogramFont
+ * @return
+ */
+ public static FontData toFontData(Font pictogramFont) {
+ FontData fontData;
+ if (pictogramFont != null) {
+ int style = SWT.NORMAL;
+ if (pictogramFont.isItalic()) {
+ style |= SWT.ITALIC;
+ }
+ if (pictogramFont.isBold()) {
+ style |= SWT.BOLD;
+ }
+ int size = pictogramFont.getSize();
+ String name = pictogramFont.getName();
+ fontData = new FontData(name, size, style);
+ } else {
+ fontData = new FontData();
+ }
+ return fontData;
+ }
+
+ public static String encode(ShapeStyle sp) {
+ if (sp==null)
+ return encode(new ShapeStyle());
+ return new String(
+ colorToString(sp.shapeBackground) + ";" + //$NON-NLS-1$
+ colorToString(sp.shapePrimarySelectedColor) + ";" + //$NON-NLS-1$
+ colorToString(sp.shapeSecondarySelectedColor) + ";" + //$NON-NLS-1$
+ colorToString(sp.shapeForeground) + ";" + //$NON-NLS-1$
+ fontToString(sp.labelFont) + ";" + //$NON-NLS-1$
+ colorToString(sp.labelForeground) + ";" + //$NON-NLS-1$
+ // placeholder for backward compatibility
+ booleanToString(sp.useDefaultSize) + ";" + //$NON-NLS-1$
+ sp.routingStyle.ordinal() + ";" + //$NON-NLS-1$
+ booleanToString(sp.useDefaultSize) + ";" + //$NON-NLS-1$
+ sp.defaultWidth + ";" + //$NON-NLS-1$
+ sp.defaultHeight + ";" + //$NON-NLS-1$
+ sp.labelPosition.ordinal()
+ );
+ }
+
+ public static ShapeStyle decode(String s) {
+ if (s==null || s.trim().split(";").length<11) //$NON-NLS-1$
+ return new ShapeStyle();
+ return new ShapeStyle(s);
+ }
+
+ public void applyChanges(ShapeStyle other) {
+ int m = other.changeMask;
+ if ((m & SS_SHAPE_BACKGROUND) != 0)
+ this.setShapeBackground(other.getShapeBackground());
+ if ((m & SS_SHAPE_FOREGROUND) != 0)
+ this.setShapeForeground(other.getShapeForeground());
+ if ((m & SS_SHAPE_PRIMARY_SELECTION) != 0)
+ this.setShapePrimarySelectedColor(other.getShapePrimarySelectedColor());
+ if ((m & SS_SHAPE_SECONDARY_SELECTION) != 0)
+ this.setShapeSecondarySelectedColor(other.getShapeSecondarySelectedColor());
+ if ((m & SS_LABEL_FONT) != 0)
+ this.setLabelFont(other.getLabelFont());
+ if ((m & SS_LABEL_FOREGROUND) != 0)
+ this.setLabelForeground(other.getLabelForeground());
+ if ((m & SS_ROUTING_STYLE) != 0)
+ this.setRoutingStyle(other.getRoutingStyle());
+ if ((m & SS_USE_DEFAULT_SIZE) != 0)
+ this.setSnapToGrid(other.getSnapToGrid());
+ if ((m & SS_DEFAULT_WIDTH) != 0)
+ this.setDefaultWidth(other.getDefaultWidth());
+ if ((m & SS_DEFAULT_HEIGHT) != 0)
+ this.setDefaultHeight(other.getDefaultHeight());
+ if ((m & SS_LABEL_POSITION) != 0)
+ this.setLabelPosition(other.getLabelPosition());
+ }
+
+ public void setValue(int m, Object value) {
+ if (m == SS_SHAPE_BACKGROUND)
+ this.setShapeBackground((IColorConstant)value);
+ if (m == SS_SHAPE_FOREGROUND)
+ this.setShapeForeground((IColorConstant)value);
+ if (m == SS_SHAPE_PRIMARY_SELECTION)
+ this.setShapePrimarySelectedColor((IColorConstant)value);
+ if (m == SS_SHAPE_SECONDARY_SELECTION)
+ this.setShapeSecondarySelectedColor((IColorConstant)value);
+ if (m == SS_LABEL_FONT)
+ this.setLabelFont((Font)value);
+ if (m == SS_LABEL_FOREGROUND)
+ this.setLabelForeground((IColorConstant)value);
+ if (m == SS_ROUTING_STYLE)
+ this.setRoutingStyle((RoutingStyle)value);
+ if (m == SS_USE_DEFAULT_SIZE)
+ this.setSnapToGrid((Boolean)value);
+ if (m == SS_DEFAULT_WIDTH)
+ this.setDefaultWidth((Integer)value);
+ if (m == SS_DEFAULT_HEIGHT)
+ this.setDefaultHeight((Integer)value);
+ if (m == SS_LABEL_POSITION)
+ this.setLabelPosition((LabelPosition)value);
+ }
+
+ private static boolean equals(IColorConstant c1, IColorConstant c2) {
+ if (c1==c2)
+ return true;
+ if (c1==null || c2==null)
+ return false;
+ return c1.getRed() == c2.getRed() &&
+ c1.getGreen() == c2.getGreen() &&
+ c1.getBlue() == c2.getBlue();
+ }
+
+ private static boolean equals(Font f1, Font f2) {
+ String s1 = fontToString(f1);
+ String s2 = fontToString(f2);
+ return s1.equals(s2);
+ }
+
+ public static IColorConstant lighter(IColorConstant c) {
+ int r = c.getRed() + 8;
+ int g = c.getGreen() + 8;
+ int b = c.getBlue() + 8;
+ if (r>255) r = 255;
+ if (g>255) g = 255;
+ if (b>255) b = 255;
+ return new ColorConstant(r, g, b);
+ }
+
+ public static IColorConstant darker(IColorConstant c) {
+ int r = c.getRed() - 8;
+ int g = c.getGreen() - 8;
+ int b = c.getBlue() - 8;
+ if (r<0) r = 0;
+ if (g<0) g = 0;
+ if (b<0) b = 0;
+ return new ColorConstant(r, g, b);
+ }
+
+ @Override
+ public String toString() {
+ return encode(this);
+ }
+
+ public static boolean hasStyle(BaseElement businessObject) {
+ ModelExtensionDescriptor med = TargetRuntime.getDefaultRuntime().getModelExtensionDescriptor(businessObject);
+ if (med!=null) {
+ ModelDecorator md = med.getModelDecorator();
+ EStructuralFeature styleFeature = md.getEStructuralFeature(businessObject, STYLE_OBJECT);
+ if (styleFeature!=null)
+ return true;
+ }
+ return false;
+ }
+
+ public static EObject createStyleObject(BaseElement element) {
+ EObject style = null;
+ try {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(element);
+ ModelExtensionDescriptor med = TargetRuntime.getDefaultRuntime().getModelExtensionDescriptor(element);
+ ModelDecorator md = med.getModelDecorator();
+ EStructuralFeature styleFeature = md.getEStructuralFeature(element, STYLE_OBJECT);
+ ShapeStyle ss = getShapeStyle(element);
+ style = (EObject)adapter.getFeatureDescriptor(styleFeature).getValue();
+ if (style==null) {
+ // this object does not have a <style> extension element yet so create one
+ // and initialize it from the User Preference store
+ style = med.createObject((EClass)styleFeature.getEType());
+ setShapeStyle(element, style, ss);
+ // add it to the BaseElement extension values
+ InsertionAdapter.add(element, styleFeature, style);
+ }
+ else {
+ setShapeStyle(element, style, ss);
+ }
+ }
+ catch (Exception e) {
+ // ignore exceptions - the BaseElement doesn't have a <style> extension element
+ e.printStackTrace();
+ }
+ return style;
+ }
+
+ public static EObject getStyleObject(BaseElement element) {
+ EObject style = null;
+ try {
+ ModelExtensionDescriptor med = TargetRuntime.getDefaultRuntime().getModelExtensionDescriptor(element);
+ ModelDecorator md = med.getModelDecorator();
+ EStructuralFeature styleFeature = md.getEStructuralFeature(element, STYLE_OBJECT);
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(element);
+
+ style = (EObject)adapter.getFeatureDescriptor(styleFeature).getValue();
+ }
+ catch (Exception e) {
+ // ignore exceptions - the BaseElement doesn't have a <style> extension element
+ }
+ return style;
+ }
+
+ public static Object getStyleValue(EObject style, String feature) {
+ EStructuralFeature f = style.eClass().getEStructuralFeature(feature);
+ if (f!=null && style.eIsSet(f))
+ return style.eGet(f);
+ return null;
+ }
+
+ public Object getStyleValue(BaseElement element, String feature) {
+ if (STYLE_SHAPE_FOREGROUND.equals(feature))
+ return colorToRGB(getShapeForeground());
+ if (STYLE_SHAPE_BACKGROUND.equals(feature))
+ return colorToRGB(getShapeBackground());
+ if (STYLE_LABEL_FOREGROUND.equals(feature))
+ return colorToRGB(getLabelForeground());
+ if (STYLE_LABEL_BACKGROUND.equals(feature))
+ return null;
+ if (STYLE_LABEL_FONT.equals(feature))
+ return ShapeStyle.toFontData(getLabelFont());
+ if (STYLE_LABEL_POSITION.equals(feature))
+ return ShapeStyle.toEENumLiteral(element, getLabelPosition());
+ if (STYLE_ROUTING_STYLE.equals(feature))
+ return ShapeStyle.toEENumLiteral(element, getRoutingStyle());
+ return null;
+ }
+
+ private static void setStyleValue(EObject style, String feature, Object value) {
+ try {
+ EStructuralFeature f = style.eClass().getEStructuralFeature(feature);
+ Object oldValue = style.eGet(f);
+ if (value!=null && !value.equals(oldValue))
+ style.eSet(f, value);
+ }
+ catch (Exception e) {
+ }
+ }
+
+ public static boolean isStyleObject(Object object) {
+ if (object instanceof AnyType) {
+ AnyType at = (AnyType)object;
+ EClass ec = at.eClass();
+ String name = ec.getName();
+ return STYLE_ECLASS.equals(name);
+ }
+ return false;
+ }
+
+ public static boolean isStyleFeature(EStructuralFeature feature) {
+ return feature.getName().equals(STYLE_OBJECT) && feature.getEType().getName().equals(STYLE_ECLASS);
+ }
+
+ public static ShapeStyle getShapeStyle(BaseElement element) {
+ Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(element);
+ ShapeStyle ss = preferences.getShapeStyle(element); // this makes a copy of the value in Preference Store
+
+ EObject style = getStyleObject(element);
+ if (style!=null) {
+ style.eSetDeliver(false);
+
+ RGB shapeForeground = (RGB) getStyleValue(style,STYLE_SHAPE_FOREGROUND);
+ RGB shapeBackground = (RGB) getStyleValue(style,STYLE_SHAPE_BACKGROUND);
+ RGB labelForeground = (RGB) getStyleValue(style,STYLE_LABEL_FOREGROUND);
+ FontData labelFont = (FontData) getStyleValue(style,STYLE_LABEL_FONT);
+ EEnumLiteral labelPosition = (EEnumLiteral) getStyleValue(style,STYLE_LABEL_POSITION);
+ EEnumLiteral routingStyle = (EEnumLiteral) getStyleValue(style,STYLE_ROUTING_STYLE);
+
+ if (shapeBackground!=null) {
+ IColorConstant cc = ShapeStyle.RGBToColor(shapeBackground);
+ ss.setShapeBackground(cc);
+ ss.setShapePrimarySelectedColor(StyleUtil.shiftColor(cc, 32));
+ ss.setShapeSecondarySelectedColor(StyleUtil.shiftColor(cc, -32));
+ }
+ else
+ setStyleValue(style, STYLE_SHAPE_BACKGROUND, ShapeStyle.colorToRGB(ss.getShapeBackground()));
+
+ if (shapeForeground!=null)
+ ss.setShapeForeground(ShapeStyle.RGBToColor(shapeForeground));
+ else
+ setStyleValue(style, STYLE_SHAPE_FOREGROUND, ShapeStyle.colorToRGB(ss.getShapeForeground()));
+
+ if (labelForeground!=null)
+ ss.setLabelForeground(ShapeStyle.RGBToColor(labelForeground));
+ else
+ setStyleValue(style, STYLE_LABEL_FOREGROUND, ShapeStyle.colorToRGB(ss.getLabelForeground()));
+
+ if (labelFont!=null) {
+ // roundabout way to get the Diagram for a Business Object:
+ // see {@link DIUtils} for details.
+ Resource res = ExtendedPropertiesAdapter.getResource(element);
+ List<PictogramElement> pes = DIUtils.getPictogramElements(res.getResourceSet(), element);
+ if (pes.size()>0) {
+ Diagram diagram = Graphiti.getPeService().getDiagramForPictogramElement(pes.get(0));
+ ss.setLabelFont(ShapeStyle.toGraphitiFont(diagram, labelFont));
+ }
+ }
+ else
+ setStyleValue(style, STYLE_LABEL_FONT, ShapeStyle.toFontData(ss.getLabelFont()));
+
+ if (labelPosition!=null)
+ ss.setLabelPosition((LabelPosition)fromEENumLiteral(element, labelPosition));
+ else
+ setStyleValue(style, STYLE_LABEL_POSITION, toEENumLiteral(element, ss.getLabelPosition()));
+
+ if (routingStyle!=null)
+ ss.setRoutingStyle( (RoutingStyle)fromEENumLiteral(element, routingStyle) );
+ else
+ setStyleValue(style, STYLE_ROUTING_STYLE, toEENumLiteral(element, ss.getRoutingStyle()));
+
+ style.eSetDeliver(true);
+ }
+ return ss;
+ }
+
+ private static Enum fromEENumLiteral(EObject element, EEnumLiteral el) {
+ try {
+ LabelPosition.values();
+ Class c = Class.forName(ShapeStyle.class.getName() + "$" + el.getEEnum().getName());
+ for (Enum en : (Enum[])c.getEnumConstants()) {
+ if (en.ordinal() == el.getValue())
+ return en;
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private static EEnumLiteral toEENumLiteral(EObject element, Enum en) {
+ ModelExtensionDescriptor med = TargetRuntime.getDefaultRuntime().getModelExtensionDescriptor(element);
+ ModelDecorator md = med.getModelDecorator();
+ EEnum lp = (EEnum)md.getEDataType(en.getClass().getSimpleName());
+ EEnumLiteral el = lp.getEEnumLiteral(en.ordinal());
+ fromEENumLiteral(element, el);
+ return el;
+ }
+
+ public static void setShapeStyle(BaseElement element, EObject style, ShapeStyle ss) {
+ if (hasStyle(element)) {
+ if (style==null)
+ style = getStyleObject(element);
+
+ setStyleValue(style, STYLE_SHAPE_FOREGROUND, ShapeStyle.colorToRGB(ss.getShapeForeground()));
+ setStyleValue(style, STYLE_SHAPE_BACKGROUND, ShapeStyle.colorToRGB(ss.getShapeBackground()));
+ setStyleValue(style, STYLE_LABEL_FOREGROUND, ShapeStyle.colorToRGB(ss.getLabelForeground()));
+ setStyleValue(style, STYLE_LABEL_FONT, ShapeStyle.toFontData(ss.getLabelFont()));
+ setStyleValue(style, STYLE_LABEL_POSITION, toEENumLiteral(element, ss.getLabelPosition()));
+ setStyleValue(style, STYLE_ROUTING_STYLE, toEENumLiteral(element, ss.getRoutingStyle()));
+ }
+ else {
+ Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(element);
+ preferences.setShapeStyle(element,ss);
+ }
+ }
+
+ public static boolean isDirty(BaseElement element) {
+ if (element==null)
+ return false;
+ Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(element);
+ ShapeStyle ssDefault = preferences.getShapeStyle(element); // this makes a copy of the value in Preference Store
+ ShapeStyle ssElement = getShapeStyle(element);
+ String defaultString = ssDefault.toString();
+ String elementString = ssElement.toString();
+ return !defaultString.equals(elementString);
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/TristateCheckboxFieldEditor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/TristateCheckboxFieldEditor.java
index 1f1d481d..1f1d481d 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/TristateCheckboxFieldEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/TristateCheckboxFieldEditor.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/messages.properties
index fa25d9fa..85a7b296 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
Bpmn2Preferences_No_Runtime_Plugin_Title=Unsupported Target Runtime
Bpmn2Preferences_Activities=Activities
Bpmn2Preferences_Always_False=Always false
@@ -18,6 +28,7 @@ Bpmn2Preferences_Gateways=Gateways
Bpmn2Preferences_Horizontal=&Horizontal layout of Pools, Lanes and diagram elements [isHorizontal]
Bpmn2Preferences_Marker_Visible=Decorate Exclusive Gateway with "X" marker [isMarkerVisible]
Bpmn2Preferences_Message_Visible=Show Participant Band Messages [isMessageVisible]
+Bpmn2Preferences_Save_BPMNLabels=Save BPMNLabel elements
Bpmn2Preferences_No_Runtime_Plugin_Message=The Target Runtime plugin for id {0}\ncould not be loaded.\nUsing {1} instead.
Bpmn2Preferences_None=None
Bpmn2Preferences_Show_Advanced_Properties=Show the &Advanced Properties Tab for BPMN2 Elements
@@ -27,5 +38,34 @@ Bpmn2Preferences_Simplify_Lists=Simplify Documentation lists
Bpmn2Preferences_Target_Runtime=Target &Runtime
Bpmn2Preferences_Timeout=Connection Timeout for resolving remote objects (milliseconds)
Bpmn2Preferences_True_if_not_set=True if not set
-ToolEnablementPreferences_BPMN_Extensions=BPMN Model Element Extensions
-ToolEnablementPreferences_Target_Extensions=Target Runtime Model Extensions
+
+
+ShapeStyle_Category_Connections=Connections
+ShapeStyle_Category_Other=Containers and Artifacts
+ShapeStyle_Category_Data=Data Elements
+ShapeStyle_Category_Events=Events
+ShapeStyle_Category_Shapes=Shapes
+ShapeStyle_Category_Gateways=Gateways
+ShapeStyle_Category_Tasks=Tasks
+ShapeStyle_Category_GlobalTasks=Global Tasks
+ShapeStyle_Category_SubProcess=SubProcess
+ShapeStyle_Category_Choreography=Choreography
+ShapeStyle_Category_Conversation=Conversation
+ShapeStyle_Category_SwimLanes=Swim Lanes
+ShapeStyle_Category_Canvas=Canvas
+ShapeStyle_Category_Grid=Grid
+
+ShapeStyle_RoutingStyle_Direct=Direct
+ShapeStyle_RoutingStyle_Automatic=Automatic
+ShapeStyle_RoutingStyle_Manhattan=Manhattan
+
+ShapeStyle_LabelPosition_North=Above Figure
+ShapeStyle_LabelPosition_South=Below Figure
+ShapeStyle_LabelPosition_West=Left of Figure
+ShapeStyle_LabelPosition_East=Right of Figure
+ShapeStyle_LabelPosition_Top=Top Inside Figure
+ShapeStyle_LabelPosition_Center=Center of Figure
+ShapeStyle_LabelPosition_Bottom=Bottom Inside Figure
+ShapeStyle_LabelPosition_Left=Left Inside Figure
+ShapeStyle_LabelPosition_Right=Right Inside FIgure
+ShapeStyle_LabelPosition_Movable=Movable
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/BaseRuntimeDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/BaseRuntimeExtensionDescriptor.java
index 5cd5d178..08d87808 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/BaseRuntimeDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/BaseRuntimeExtensionDescriptor.java
@@ -12,31 +12,83 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.runtime;
+import java.util.List;
+
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ExtensionAttributeValue;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
-public class BaseRuntimeDescriptor {
-
+/**
+ * The abstract base class for Target Runtime Extension Descriptor classes.
+ * This class provides methods for adding and removing instances of its subclasses to the
+ * correct list in the TargetRuntime instance - this is done with java reflection in setRuntime()
+ * and dispose() respectively.
+ *
+ * All subclasses MUST conform as follows:
+ *
+ * - define a static String field named EXTENSION_NAME which must be the same as the
+ * - implement the method getExtensionName() which MUST return EXTENSION_NAME (unfortunately
+ * java does not allow class fields to be overridden the same as methods)
+ * org.eclipse.bpmn2.modeler.runtime extension point element that it supports.
+ * - define a public constructor that accepts and IConfigurationElement (this comes from
+ * the extension plugin's configuration, i.e. plugin.xml)
+ * - optionally override setRuntime() to perform additional class initialization
+ * - optionally override dispose() to perform additional cleanup
+ *
+ * Extension Descriptor classes
+ */
+public abstract class BaseRuntimeExtensionDescriptor implements IRuntimeExtensionDescriptor {
+
protected TargetRuntime targetRuntime;
+ protected IFile configFile;
+ protected final IConfigurationElement configurationElement;
+ protected String id;
+
+ public static <T extends BaseRuntimeExtensionDescriptor> T getDescriptor(EObject object, Class type) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ return (T)adapter.getProperty(type.getName());
+ }
+ return null;
+ }
+
+ public BaseRuntimeExtensionDescriptor() {
+ configurationElement = null;
+ }
- public BaseRuntimeDescriptor() {
+ public BaseRuntimeExtensionDescriptor(IConfigurationElement e) {
+ configurationElement = e;
+ id = e.getAttribute("id"); //$NON-NLS-1$
}
- public BaseRuntimeDescriptor(TargetRuntime rt) {
+ public String getId() {
+ return id;
+ }
+
+ public void dispose() {
+ List<IRuntimeExtensionDescriptor> list = targetRuntime.getRuntimeExtensionDescriptors(getExtensionName());
+ list.remove(this);
+ }
+
+ public BaseRuntimeExtensionDescriptor(TargetRuntime rt) {
targetRuntime = rt;
+ configurationElement = rt.configurationElement;
+ }
+
+ public IFile getConfigFile() {
+ return configFile;
+ }
+
+ public void setConfigFile(IFile configFile) {
+ this.configFile = configFile;
}
public TargetRuntime getRuntime() {
@@ -45,6 +97,8 @@ public class BaseRuntimeDescriptor {
public void setRuntime(TargetRuntime targetRuntime) {
this.targetRuntime = targetRuntime;
+ List<IRuntimeExtensionDescriptor> list = targetRuntime.getRuntimeExtensionDescriptors(getExtensionName());
+ list.add(this);
}
public EPackage getEPackage() {
@@ -97,57 +151,4 @@ public class BaseRuntimeDescriptor {
}
return eClass;
}
-
- public void setValueFromString(EObject object, EStructuralFeature feature, Object value, boolean force) {
- // should not set null value features
- if (value == null) {
- return;
- }
-
- if (feature.isMany()) {
- ((EList)object.eGet(feature)).add(value);
- }
- else {
- if (value instanceof String) {
- EDataType eDataType = (EDataType)feature.getEType();
- try {
- // TODO: figure out why feature.eClass().getEPackage().getEFactoryInstance() doesn't
- // return the correct factory!
- EFactory factory = ModelUtil.getEPackage(feature).getEFactoryInstance();
- value = factory.createFromString(eDataType, (String)value);
- }
- catch (Exception e)
- {
- EFactory factory = EcorePackage.eINSTANCE.getEFactoryInstance();
- value = factory.createFromString(eDataType, (String)value);
- }
- }
-
- if (object.eClass().getEStructuralFeature(feature.getName())!=null) {
- // this feature exists for this object, so we can set it directly
- // but only if it's not already set.
- if (!object.eIsSet(feature) || force) {
- object.eSet(feature, value);
- }
- }
- else {
- // the feature does not exist in this object, so we either need to
- // create an "anyAttribute" entry or, if the object is an ExtensionAttributeValue,
- // create an entry in its "value" feature map.
- if (object instanceof ExtensionAttributeValue) {
- ModelUtil.addExtensionAttributeValue(object.eContainer(), feature, value);
- }
- else {
- EStructuralFeature f = ModelUtil.getAnyAttribute(object, feature.getName());
- if (f!=null) {
- if (object.eGet(f)!=null)
- return;
- }
- if (!object.eIsSet(feature) || force) {
- object.eSet(feature, value);
- }
- }
- }
- }
- }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java
index 10c9cd74..65601327 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2SectionDescriptor.java
@@ -16,6 +16,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
+import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.core.runtime.Assert;
@@ -43,7 +44,7 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
protected String filterClassName;
protected PropertySectionFilter filter;
- public Bpmn2SectionDescriptor(Bpmn2TabDescriptor td, IConfigurationElement e) {
+ public Bpmn2SectionDescriptor(PropertyTabDescriptor td, IConfigurationElement e) {
tab = td.getId();
id = tab + ".section"; //$NON-NLS-1$
@@ -52,10 +53,20 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
if ("default".equals(className)) { //$NON-NLS-1$
sectionClass = new DefaultPropertySection();
if (e.getAttribute("features")!=null) { //$NON-NLS-1$
- String[] properties = e.getAttribute("features").split(" "); //$NON-NLS-1$ //$NON-NLS-2$
- ((DefaultPropertySection)sectionClass).setProperties(properties);
+ String value = e.getAttribute("features");
+ if (value==null || value.isEmpty()) {
+ ((DefaultPropertySection)sectionClass).setProperties(new String[0]);
+ }
+ else {
+ String[] properties = value.split(" "); //$NON-NLS-1$ //$NON-NLS-2$
+ ((DefaultPropertySection)sectionClass).setProperties(properties);
+ }
}
}
+ else if ("empty".equals(className)) { //$NON-NLS-1$
+ // this tab is to be hidden
+ sectionClass = null;
+ }
else {
sectionClass = (AbstractPropertySection) e.createExecutableExtension("class"); //$NON-NLS-1$
}
@@ -76,7 +87,7 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
clazz = null;
}
if (clazz==null) {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
try {
clazz = rt.getRuntimeExtension().getClass().getClassLoader().loadClass(t);
break;
@@ -98,7 +109,7 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
td.getSectionDescriptors().add(this);
}
- public Bpmn2SectionDescriptor(Bpmn2TabDescriptor td, Bpmn2SectionDescriptor that) {
+ public Bpmn2SectionDescriptor(PropertyTabDescriptor td, Bpmn2SectionDescriptor that) {
tab = td.getId();
id = tab + ".section" + hashCode(); //$NON-NLS-1$
this.sectionClass = that.sectionClass;
@@ -131,6 +142,9 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
+ if (sectionClass==null)
+ return false;
+
EObject businessObject = null;
PictogramElement pe = BusinessObjectUtil.getPictogramElementForSelection(selection);
if (pe != null) {
@@ -154,10 +168,11 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
if (rt!=null) {
int selected = 0;
int count = 0;
- for (CustomTaskDescriptor tc : rt.getCustomTasks()) {
- for (String s : tc.getPropertyTabs()) {
+ for (CustomTaskDescriptor ctd : rt.getCustomTaskDescriptors()) {
+ for (String s : ctd.getPropertyTabs()) {
if (tab.equals(s)) {
- if (tc.getFeatureContainer().getId(businessObject)!=null)
+ String id = ctd.getFeatureContainer().getId(businessObject);
+ if (ctd.getId().equals(id))
++selected;
++count;
}
@@ -207,9 +222,15 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
}
public boolean appliesTo(EObject eObj) {
- for (Class c : appliesToClasses) {
- if (c.isInstance(eObj))
- return true;
+ DiagramEditor editor = ModelUtil.getDiagramEditor(eObj);
+ if (editor!=null) {
+ ModelEnablements me = (ModelEnablements) editor.getAdapter(ModelEnablements.class);
+ if (me.isEnabled(eObj.eClass())) {
+ for (Class c : appliesToClasses) {
+ if (c.isInstance(eObj))
+ return true;
+ }
+ }
}
return false;
}
@@ -258,6 +279,10 @@ public class Bpmn2SectionDescriptor extends AbstractSectionDescriptor {
if (sectionClass instanceof IBpmn2PropertySection) {
return ((IBpmn2PropertySection)sectionClass).doReplaceTab(replacedId, part, selection);
}
+ // If no "class" was specified in plugin.xml (e.g. class="empty") then do the replacement,
+ // but don't show the property tab. In other words, this tab is to be hidden.
+ if (sectionClass==null)
+ return true;
return appliesTo(part,selection);
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskDescriptor.java
index 72b952b0..af54f798 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskDescriptor.java
@@ -12,17 +12,49 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.runtime;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.ICustomElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.ICustomElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskImageProvider.IconSize;
-import org.eclipse.emf.ecore.EObject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
public class CustomTaskDescriptor extends ModelExtensionDescriptor {
+ public final static String EXTENSION_NAME = "customTask"; //$NON-NLS-1$
+
protected ICustomElementFeatureContainer featureContainer;
protected String category;
protected String icon;
protected String propertyTabs[];
+ protected boolean permanent;
+
+ public CustomTaskDescriptor(IConfigurationElement e) {
+ super(e);
+ category = e.getAttribute("category"); //$NON-NLS-1$
+ icon = e.getAttribute("icon"); //$NON-NLS-1$
+ String tabs = e.getAttribute("propertyTabs"); //$NON-NLS-1$
+ if (tabs!=null) {
+ propertyTabs = tabs.split(" "); //$NON-NLS-1$
+ }
+ try {
+ featureContainer = (ICustomElementFeatureContainer) e.createExecutableExtension("featureContainer"); //$NON-NLS-1$
+ featureContainer.setCustomTaskDescriptor(this);
+ featureContainer.setId(id);
+ } catch (CoreException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ } //$NON-NLS-1$
+ setPermanent(true);
+ }
+ @Deprecated
+ public CustomTaskDescriptor(String id, String name) {
+ super(id,name);
+ }
+
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
public String getIcon() {
return icon;
}
@@ -39,12 +71,6 @@ public class CustomTaskDescriptor extends ModelExtensionDescriptor {
this.category = category;
}
- protected boolean permanent;
-
- public CustomTaskDescriptor(String id, String name) {
- super(id,name);
- }
-
public ICustomElementFeatureContainer getFeatureContainer() {
return featureContainer;
}
@@ -82,14 +108,4 @@ public class CustomTaskDescriptor extends ModelExtensionDescriptor {
}
return null;
}
-
- public static CustomTaskDescriptor getDescriptor(EObject object) {
- if (object!=null) {
- ModelExtensionAdapter adapter = ModelExtensionDescriptor.getModelExtensionAdapter(object);
- if (adapter!=null && adapter.getDescriptor() instanceof CustomTaskDescriptor) {
- return (CustomTaskDescriptor)adapter.getDescriptor();
- }
- }
- return null;
- }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskImageProvider.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskImageProvider.java
index 763e2399..669a5b9e 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskImageProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/CustomTaskImageProvider.java
@@ -55,13 +55,13 @@ public class CustomTaskImageProvider {
public static void registerAvailableImages() {
if (!registered) {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
- for (CustomTaskDescriptor ctd : rt.getCustomTasks()) {
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
+ for (CustomTaskDescriptor ctd : rt.getCustomTaskDescriptors()) {
String icon = ctd.getIcon();
if (icon!=null)
registerImage(ctd, icon);
}
- for (ToolPaletteDescriptor tp : rt.getToolPalettes()) {
+ for (ToolPaletteDescriptor tp : rt.getToolPaletteDescriptors()) {
for (CategoryDescriptor cd : tp.getCategories()) {
for (ToolDescriptor td : cd.getTools()) {
String icon = td.getIcon();
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/DataTypeDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/DataTypeDescriptor.java
new file mode 100644
index 00000000..cc83edde
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/DataTypeDescriptor.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import java.lang.reflect.Constructor;
+
+import org.eclipse.bpmn2.modeler.core.DefaultConversionDelegate;
+import org.eclipse.bpmn2.modeler.core.EDataTypeConversionFactory;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate;
+
+/**
+ * Target Runtime Extension Descriptor class for EMF data type definitions.
+ * Instances of this class correspond to <dataType> extension elements in the extension's plugin.xml
+ * See the description of the "dataType" element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ */
+public class DataTypeDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "dataType"; //$NON-NLS-1$
+
+ protected String name;
+ protected String delegateClassName;
+
+ public DataTypeDescriptor(IConfigurationElement e) {
+ super(e);
+ name = e.getAttribute("name"); //$NON-NLS-1$
+ delegateClassName = e.getAttribute("class"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ EDataTypeConversionFactory.unregisterConversionDelegate(name);
+ }
+
+ @Override
+ public void setRuntime(TargetRuntime targetRuntime) {
+ try {
+ super.setRuntime(targetRuntime);
+ ConversionDelegate delegate;
+ delegate = getConversionDelegate();
+ EDataTypeConversionFactory.registerConversionDelegate(name, delegate.getClass());
+ } catch (Exception e) {
+ throw new TargetRuntimeConfigurationException(targetRuntime,e);
+ }
+ }
+
+ @Override
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public String getDataTypeName() {
+ return name;
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public ConversionDelegate getConversionDelegate() throws TargetRuntimeConfigurationException {
+ try {
+ ClassLoader cl = this.getRuntime().getRuntimeExtension().getClass().getClassLoader();
+ Constructor ctor = null;
+ Class adapterClass = Class.forName(delegateClassName, true, cl);
+ ctor = adapterClass.getConstructor();
+ return (ConversionDelegate)ctor.newInstance();
+ }
+ catch (Exception ex1) {
+ try {
+ Object object = configurationElement.createExecutableExtension("class"); //$NON-NLS-1$
+ return (DefaultConversionDelegate) object;
+ } catch (Exception ex2) {
+ throw new TargetRuntimeConfigurationException(targetRuntime,ex2);
+ }
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ExpressionLanguageDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ExpressionLanguageDescriptor.java
new file mode 100644
index 00000000..14d76e60
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ExpressionLanguageDescriptor.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+
+/**
+ *
+ */
+public class ExpressionLanguageDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "expressionLanguage"; //$NON-NLS-1$
+
+ protected String name;
+ protected String uri;
+
+ public ExpressionLanguageDescriptor(IConfigurationElement e) {
+ super(e);
+ name = e.getAttribute("name"); //$NON-NLS-1$
+ uri = e.getAttribute("uri"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void setRuntime(TargetRuntime targetRuntime) {
+ super.setRuntime(targetRuntime);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ }
+
+ @Override
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/FeatureContainerDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/FeatureContainerDescriptor.java
index c511338a..07688224 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/FeatureContainerDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/FeatureContainerDescriptor.java
@@ -17,12 +17,16 @@ import java.lang.reflect.Constructor;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.core.runtime.IConfigurationElement;
/**
- * @author Bob Brodt
- *
+ * Target Runtime Extension Descriptor class for Graphiti FeatureContainer overrides.
+ * Instances of this class correspond to <featureContainer> extension elements in the extension's plugin.xml
+ * See the description of the "featureContainer" element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
*/
-public class FeatureContainerDescriptor extends BaseRuntimeDescriptor {
+public class FeatureContainerDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "featureContainer"; //$NON-NLS-1$
protected String type;
protected String containerClassName;
@@ -30,8 +34,14 @@ public class FeatureContainerDescriptor extends BaseRuntimeDescriptor {
/**
* @param rt
*/
- public FeatureContainerDescriptor(TargetRuntime rt) {
- super(rt);
+ public FeatureContainerDescriptor(IConfigurationElement e) {
+ super(e);
+ type = e.getAttribute("type"); //$NON-NLS-1$
+ containerClassName = e.getAttribute("class"); //$NON-NLS-1$
+ }
+
+ public String getExtensionName() {
+ return EXTENSION_NAME;
}
public Class getType() {
@@ -43,7 +53,7 @@ public class FeatureContainerDescriptor extends BaseRuntimeDescriptor {
}
return null;
}
-
+
public IFeatureContainer getFeatureContainer() {
try {
ClassLoader cl = this.getRuntime().getRuntimeExtension().getClass().getClassLoader();
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IBpmn2PropertySection.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IBpmn2PropertySection.java
index 18cafa50..18cafa50 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IBpmn2PropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IBpmn2PropertySection.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IObjectDecorator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IObjectDecorator.java
new file mode 100644
index 00000000..2a0a46ea
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IObjectDecorator.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ *
+ */
+public interface IObjectDecorator {
+ boolean canApply(String id, Resource resource, EObject object);
+ boolean apply(String id, Resource resource, Object object);
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IRuntimeExtensionDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IRuntimeExtensionDescriptor.java
new file mode 100644
index 00000000..f8bd6b25
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/IRuntimeExtensionDescriptor.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * Defines the interface for Target Runtime Extension Descriptor classes.
+ */
+public interface IRuntimeExtensionDescriptor {
+
+ String getExtensionName();
+ void setRuntime(TargetRuntime targetRuntime) throws TargetRuntimeConfigurationException;
+ TargetRuntime getRuntime();
+ IFile getConfigFile();
+ void setConfigFile(IFile configFile);
+ void dispose();
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java
new file mode 100644
index 00000000..4d2e5ea8
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Messages.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.core.runtime.messages"; //$NON-NLS-1$
+ public static String ModelExtensionDescriptor_Create;
+ public static String TargetRuntime_Config_Error;
+ public static String TargetRuntimeConfigurationException_Config_Error;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java
new file mode 100644
index 00000000..9f7bf74b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelDescriptor.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * Target Runtime Extension Descriptor class for EMF extension model definitions to be used with the BPMN2 editor.
+ * Instances of this class correspond to <model> extension elements in the extension's plugin.xml
+ * See the description of the "model" element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ */
+public class ModelDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "model"; //$NON-NLS-1$
+
+ protected String uri;
+ protected EPackage ePackage;
+ protected EFactory eFactory;
+ protected ResourceFactoryImpl resourceFactory;
+
+ public ModelDescriptor(IConfigurationElement e) {
+ super(e);
+ // must have at least a namespace URI to associate with this Model Descriptor
+ uri = e.getAttribute("uri"); //$NON-NLS-1$
+ try {
+ // Find the EPackage for this URI if it exists.
+ EPackage pkg = EPackage.Registry.INSTANCE.getEPackage(uri);
+ if (pkg!=null) {
+ setEPackage(pkg);
+ setEFactory(getEPackage().getEFactoryInstance());
+ if (e.getAttribute("resourceFactory")!=null) { //$NON-NLS-1$
+ setResourceFactory((ResourceFactoryImpl) e.createExecutableExtension("resourceFactory")); //$NON-NLS-1$
+ }
+ }
+ }
+ catch (Exception e1) {
+ // The plugin does not define its own EPackage, but we still need one
+ // to be able to create model objects.
+ ModelDescriptor defaultModelDescriptor = TargetRuntime.getDefaultRuntime().getModelDescriptor();
+ setEPackage(defaultModelDescriptor.getEPackage());
+ setEFactory(defaultModelDescriptor.getEFactory());
+ setResourceFactory(defaultModelDescriptor.getResourceFactory());
+ }
+ }
+
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public EFactory getEFactory() {
+ return eFactory;
+ }
+
+ public ResourceFactoryImpl getResourceFactory() {
+ return resourceFactory;
+ }
+
+ public EPackage getEPackage() {
+ return ePackage;
+ }
+
+ public void setEPackage(EPackage ePackage) {
+ this.ePackage = ePackage;
+ }
+
+ public void setEFactory(EFactory eFactory) {
+ this.eFactory = eFactory;
+ }
+
+ public void setResourceFactory(ResourceFactoryImpl resourceFactory) {
+ this.resourceFactory = resourceFactory;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java
new file mode 100644
index 00000000..89832d46
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelEnablementDescriptor.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import java.util.Collection;
+
+import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IFeature;
+
+/**
+ * Target Runtime Extension Descriptor class for model enablements. This class
+ * controls the visibility of an object and its features in the UI Property
+ * Sheets and dialogs. Any object or object feature that is not explicitly
+ * "enabled" will not be visible in the UI.
+ *
+ * This class encapsulates a so-called "Tool Profile" which defines a set of
+ * BPMN2 elements and attributes. When a Tool Profile is selected in the Tool
+ * Palette, only those elements and attributes that are enabled in this set will
+ * be visible in the Tool Palette and Property Sheets.
+ *
+ * Instances of this class correspond to <modelEnablement> extension elements in
+ * the extension's plugin.xml See the description of the "modelEnablement"
+ * element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ */
+public class ModelEnablementDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "modelEnablement"; //$NON-NLS-1$
+
+ /** Model Types that are enabled. **/
+ private ModelEnablements modelEnablements;
+ /** Human-readable Tool Profile name. **/
+ private String profileName;
+ /** Descriptive text for Tool Palette. **/
+ private String description;
+
+
+ public ModelEnablementDescriptor(IConfigurationElement e) {
+ super(e);
+ TargetRuntime rt = TargetRuntime.getRuntime(e);
+ profileName = e.getAttribute("profile"); //$NON-NLS-1$
+ description = e.getAttribute("description"); //$NON-NLS-1$
+ String ref = e.getAttribute("ref"); //$NON-NLS-1$
+
+ modelEnablements = new ModelEnablements(rt, id);
+
+ if (ref!=null) {
+ String a[] = ref.split(":"); //$NON-NLS-1$
+ rt = TargetRuntime.getRuntime(a[0]);
+ String id = a[1];
+ initializeFromTargetRuntime(rt, id);
+ }
+
+ for (IConfigurationElement c : e.getChildren()) {
+ String object = c.getAttribute("object"); //$NON-NLS-1$
+ String feature = c.getAttribute("feature"); //$NON-NLS-1$
+ if (c.getName().equals("enable")) { //$NON-NLS-1$
+ setEnabled(object, feature, true);
+ } else if (c.getName().equals("disable")) { //$NON-NLS-1$
+ setEnabled(object, feature, false);
+ }
+ }
+
+ }
+
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public ModelEnablementDescriptor(TargetRuntime rt, String id) {
+ super(rt);
+ this.id = id;
+ modelEnablements = new ModelEnablements(rt, id);
+ }
+
+ public void setEnabled(EClass eClass, boolean enabled) {
+ modelEnablements.setEnabled(eClass, enabled);
+ }
+
+ public void setEnabled(String className, boolean enabled) {
+ modelEnablements.setEnabled(className, enabled);
+ }
+
+ public void setEnabled(String className, String featureName, boolean enabled) {
+ modelEnablements.setEnabled(className, featureName, enabled);
+ }
+
+ public void initializeFromTargetRuntime(TargetRuntime rt, String id) {
+
+ for (ModelEnablementDescriptor med : rt.getModelEnablements()) {
+ if (id.equals(med.getId())) {
+ Collection<String> enabledClasses = med.modelEnablements.getAllEnabledClasses();
+ for (String c : enabledClasses) {
+ Collection<String> enabledFeatures = med.modelEnablements.getAllEnabledFeatures(c);
+ for (String f : enabledFeatures) {
+ setEnabled(c, f, true);
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ public boolean isEnabled(String className, String featureName) {
+ return modelEnablements.isEnabled(className, featureName);
+ }
+
+ public boolean isEnabled(EClass eClass, EStructuralFeature feature) {
+ return modelEnablements.isEnabled(eClass, feature);
+ }
+
+ public boolean isEnabled(EClass eClass) {
+ return modelEnablements.isEnabled(eClass);
+ }
+
+ public boolean isEnabled(String className) {
+ return modelEnablements.isEnabled(className);
+ }
+
+ public boolean isEnabled(IFeature feature) {
+ return modelEnablements.isEnabled(feature);
+ }
+
+ public Collection<String> getAllEnabled() {
+ return modelEnablements.getAllEnabled();
+ }
+
+ public String getProfileName() {
+ return profileName;
+ }
+
+ public void setProfileName(String profileName) {
+ this.profileName = profileName;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java
new file mode 100644
index 00000000..7627c3ac
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ModelExtensionDescriptor.java
@@ -0,0 +1,828 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.di.BpmnDiPackage;
+import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
+import org.eclipse.bpmn2.modeler.core.utils.SimpleTreeIterator;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Target Runtime Extension Descriptor class for BPMN2 model extension attributes and elements.
+ * Instances of this class correspond to <modelExtension> extension elements in the extension's plugin.xml
+ * See the description of the "modelExtension" element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ */
+@SuppressWarnings("rawtypes")
+public class ModelExtensionDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "modelExtension"; //$NON-NLS-1$
+
+ /**
+ * Container class for name/value pairs.
+ * Instances of this class correspond to <property> extension elements in the extension's plugin.xml
+ * See the description of the "property" element in the org.eclipse.bpmn2.modeler.runtime
+ * extension point schema.
+ */
+ public static class Property extends SimpleTreeIterator<Property> {
+ public Property parent;
+ public String name;
+ public String label;
+ public String description;
+ public List<Object>values;
+ public String ref;
+ public String type;
+ boolean isMany;
+
+ public Property() {
+ this.name = "unknown"; //$NON-NLS-1$
+ }
+
+ public Property(Property parent, String name, String description) {
+ super();
+ this.parent = parent;
+ this.name = name;
+ this.description = description;
+ }
+
+ public void setType(String t) {
+ if (t!=null && t.contains("*")) { //$NON-NLS-1$
+ isMany = true;
+ t = t.replaceAll("\\*", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ type = t;
+ }
+
+ public List<Object> getValues() {
+ if (values==null) {
+ values = new ArrayList<Object>();
+ }
+ return values;
+ }
+
+ public String getFirstStringValue() {
+
+ if (!this.getValues().isEmpty()) {
+ // simple attribute - find a String value for it
+ for (Object propValue : this.getValues()) {
+ if (propValue instanceof String) {
+ return (String)propValue;
+ }
+ else if (propValue instanceof Property) {
+ String s = ((Property)propValue).getFirstStringValue();
+ if (s!=null)
+ return s;
+ }
+ }
+ }
+ return null;
+ }
+
+ protected List<Property> getChildren() {
+ List<Property> children = new ArrayList<Property>();
+ if (values!=null) {
+ for (Object child : values) {
+ if (child instanceof Property)
+ children.add((Property)child);
+ }
+ }
+ return children;
+ }
+
+ @Override
+ public Iterator<Property> iterator() {
+ return new TreeIterator(getChildren());
+ }
+ }
+
+ /**
+ * Container class for property values.
+ * Instances of this class correspond to <value> extension elements in the extension's plugin.xml
+ * See the description of the "value" element in the org.eclipse.bpmn2.modeler.runtime
+ * extension point schema.
+ */
+ public static class Value {
+
+ static int ID = 0;
+ String id;
+ public List<Object>values;
+
+ public Value() {
+ setDefaultId();
+ }
+
+ public Value(String id) {
+ if (id==null || id.isEmpty())
+ setDefaultId();
+ else
+ this.id = id;
+ }
+
+ public List<Object> getValues() {
+ if (values==null) {
+ values = new ArrayList<Object>();
+ }
+ return values;
+ }
+
+ private void setDefaultId() {
+ id = "V-" + ID++; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Container class for object initialization info.
+ * Object initialization must be performed after and object has been fully
+ * populated with extension attributes and elements by populateObject().
+ * This is necessary because the AnyType object expects the referenced EClass
+ * to be fully constructed when eSet(), eGet() or eIsSet() are invoked on the
+ * EClass features.
+ */
+ private class Initializer {
+ public ExtendedPropertiesAdapter adapter;
+ public EStructuralFeature feature;
+ public Object value;
+
+ public Initializer(ExtendedPropertiesAdapter adapter, EStructuralFeature feature, Object value) {
+ this.adapter = adapter;
+ this.feature = feature;
+ this.value = value;
+ }
+ }
+
+ /**
+ * List of Initializers. The list may be partially executed to ensure that
+ * backward references to objects by a Property.ref exist.
+ * See the description of the "property.ref" attribute in the org.eclipse.bpmn2.modeler.runtime
+ * extension point schema.
+ */
+ @SuppressWarnings("serial")
+ private class InitializerList extends ArrayList<Initializer> {
+ public boolean initialize;
+
+ public void add(ExtendedPropertiesAdapter adapter, EStructuralFeature feature, Object value) {
+ super.add( new Initializer(adapter, feature, value) );
+ }
+
+ public void execute() {
+ for (Initializer item : this) {
+ // Skip initialization of Enums
+ if (item.feature.getEType() instanceof EEnum)
+ continue;
+ if (initialize)
+ item.adapter.getFeatureDescriptor(item.feature).setValue(item.value);
+ }
+ clear();
+ }
+
+ /**
+ * Run all initializers up to and including the ones for the given object but not beyond.
+ * @param object
+ */
+ public boolean execute(EObject object) {
+ int last = -1;
+ for (int i=size()-1; i>=0; --i) {
+ Initializer item = get(i);
+ if (item.adapter.getTarget() == object) {
+ last = i;
+ break;
+ }
+ }
+
+ while (last>=0) {
+ Initializer item = get(0);
+ remove(0);
+
+ // Skip initialization of Enums
+ if (item.feature.getEType() instanceof EEnum)
+ continue;
+ if (initialize)
+ item.adapter.getFeatureDescriptor(item.feature).setValue(item.value);
+ --last;
+ }
+
+ return initialize;
+ }
+ }
+
+ /**
+ * This adapter has been deprecated. Use BaseRuntimeExtensionDescriptor#getDescriptor(EObject,Class) instead
+ * @deprecated
+ */
+ public class ModelExtensionAdapter extends AdapterImpl {
+
+ ModelExtensionDescriptor descriptor;
+
+ public ModelExtensionAdapter(ModelExtensionDescriptor descriptor) {
+ super();
+ this.descriptor = descriptor;
+ }
+
+ public Property getProperty(String name) {
+ return descriptor.getProperty(name);
+ }
+
+ public List<Property> getProperties(String path) {
+ return descriptor.getProperties(path);
+ }
+
+ public ModelExtensionDescriptor getDescriptor() {
+ return descriptor;
+ }
+ }
+
+ protected String name;
+ protected String uri;
+ protected String type;
+ protected String description;
+ protected IObjectDecorator objectDecorator;
+ protected List<Property> properties = new ArrayList<Property>();
+ protected ModelDecorator modelDecorator;
+ // these are shared instance variables because this ModelExtensionDescriptor is shared
+ // among all instances of the BPMN2Editor. We need to take care to clear these values
+ // once populateObject() is complete. An alternative would have been to pass these things
+ // on the call stack down several stack frames which is costly.
+ private Resource containingResource;
+ private EObject modelObject;
+ private InitializerList initializers = new InitializerList();
+
+ public ModelExtensionDescriptor(IConfigurationElement e) {
+ super(e);
+ name = e.getAttribute("name"); //$NON-NLS-1$
+ uri = e.getAttribute("uri"); //$NON-NLS-1$
+ type = e.getAttribute("type"); //$NON-NLS-1$
+ description = e.getAttribute("description"); //$NON-NLS-1$
+ if (e.getAttribute("decorator")!=null) {
+ try {
+ objectDecorator = (IObjectDecorator) e.createExecutableExtension("decorator"); //$NON-NLS-1$
+ } catch (CoreException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ }
+ getModelExtensionProperties(null, this, e);
+ }
+
+ public void dispose() {
+ super.dispose();
+ getModelDecorator().dispose();
+ }
+
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ @Deprecated
+ public ModelExtensionDescriptor(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public List<Property> getProperties() {
+ return properties;
+ }
+
+ protected Object getModelExtensionProperties(Property parent, ModelExtensionDescriptor ct, IConfigurationElement e) {
+
+ String elem = e.getName();
+ if ("value".equals(elem)) { //$NON-NLS-1$
+ String id = e.getAttribute("id"); //$NON-NLS-1$
+ Value val = new Value(id);
+ for (IConfigurationElement c : e.getChildren()) {
+ Object propValue = getModelExtensionProperties(parent, null, c);
+ val.getValues().add(propValue);
+ }
+ return val;
+ }
+ else if ("property".equals(elem)) { //$NON-NLS-1$
+ String name = e.getAttribute("name"); //$NON-NLS-1$
+ String label = e.getAttribute("label"); //$NON-NLS-1$
+ String value = e.getAttribute("value"); //$NON-NLS-1$
+ String ref = e.getAttribute("ref"); //$NON-NLS-1$
+ String type = e.getAttribute("type"); //$NON-NLS-1$
+ String description = e.getAttribute("description"); //$NON-NLS-1$
+ Property prop = new Property(parent, name, description);
+ prop.label = label;
+ prop.setType(type);
+ if (value!=null)
+ prop.getValues().add(value);
+ else if (ref!=null) {
+ prop.ref = ref;
+ }
+ else if(e.getChildren().length > 0){
+ Object o = getModelExtensionProperties(prop, null, e.getChildren()[0]);
+ if (o instanceof Value)
+ prop.getValues().addAll(((Value)o).getValues());
+ }
+ return prop;
+ }
+ else {
+ for (IConfigurationElement c : e.getChildren()) {
+ Object o = getModelExtensionProperties(parent, null, c);
+ if (o instanceof Property && ct!=null)
+ ct.getProperties().add((Property)o);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Create and initialize an object of the given EClass. Initialization consists
+ * of assigning an ID and setting a default name if the EClass has those features.
+ *
+ * @param eClass - type of object to create
+ * @return an initialized EObject
+ */
+ public EObject createObject(EClass eClass) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eClass);
+ if (adapter!=null) {
+ adapter.setResource(containingResource);
+ return adapter.getObjectDescriptor().createObject(eClass);
+ }
+ EPackage pkg = eClass.getEPackage();
+ return pkg.getEFactoryInstance().create(eClass);
+ }
+
+ public ModelDecorator getModelDecorator() {
+ if (modelDecorator==null) {
+ String name = null;
+ String nsPrefix = null;
+ String nsURI = null;
+ // get our EPackage defined in the <model> extension point (if there is one)
+ EPackage pkg = getEPackage();
+ if (uri==null && pkg == Bpmn2Package.eINSTANCE) {
+ // can't decorate the BPMN2 package, so make up an extension URI
+ // using the Target Runtime's targetNamespace
+ nsURI = getRuntime().
+ getRuntimeExtension().
+ getTargetNamespace(Bpmn2DiagramType.NONE) + "/ext"; //$NON-NLS-1$
+ }
+ else if (uri!=null) {
+ // This <modelExtension> extension point element defines an EPackage URI.
+ // If it's the same as the <model> URI, then use the EPackage defined in <model>
+ if (pkg==null || !uri.equals(pkg.getNsURI()))
+ nsURI = uri;
+ }
+
+ if (nsURI!=null) {
+ name = URI.createURI(nsURI).lastSegment();
+ nsPrefix = name;
+ modelDecorator = new ModelDecorator(name, nsPrefix, nsURI);
+ }
+ else {
+ modelDecorator = new ModelDecorator(pkg);
+ }
+ }
+ return modelDecorator;
+ }
+
+ public EObject populateObject(EObject object, Resource resource, boolean initialize) {
+ try {
+ containingResource = resource;
+ modelObject = object;
+ if (containingResource==null)
+ containingResource = ObjectPropertyProvider.getResource(object);
+ getModelDecorator();
+ if (objectDecorator!=null) {
+ if (objectDecorator.canApply(id, containingResource,modelObject)) {
+ populateObject(modelObject, initialize);
+ objectDecorator.apply(id,containingResource,modelObject);
+ }
+ }
+ else {
+ populateObject(modelObject, initialize);
+ }
+ }
+ finally {
+ containingResource = null;
+ object = modelObject;
+// modelObject = null;
+ }
+ return object;
+ }
+
+ // FIXME: this is called in CreateCustomShapeFeature and CreateCustomConnectionFeature
+ // this should not be necessary because it's already done in the Bpmn2Modeler factory,
+ // but check to make sure. Try to decouple!
+ public void populateObject(EObject object, boolean initialize) {
+ try {
+ modelObject = object;
+ initializers.clear();
+ initializers.initialize = initialize;
+
+ populateObject(object, getProperties());
+ adaptObject(object);
+ if (initialize) {
+ initializers.execute();
+ }
+ }
+ catch (Exception e) {
+ Activator.logError(e);
+ }
+ finally {
+ initializers.clear();
+// modelObject = null;
+ }
+ }
+
+ /**
+ * Populate the given EObject with a list of Property objects.
+ *
+ * @param object - the object to initialize
+ * @param values - list of Property objects
+ */
+ private void populateObject(EObject object, List<Property> properties) {
+
+ for (Property prop : properties) {
+ populateObject(object, prop);
+ }
+ }
+
+ /**
+ * Return the value of the specified feature from the given EObject.
+ * If the feature is a list, return the indexed value.
+ *
+ * @param object
+ * @param feature
+ * @param index
+ * @return the feature's value
+ */
+ private Object getValue(EObject object, EStructuralFeature feature, int index) {
+ if (feature.isMany()) {
+ return ((EList)object.eGet(feature)).get(index<0 ? 0 : index);
+ }
+ return object.eGet(feature);
+ }
+
+ // FIXME: this is called in ToolProfilesPreferencesHelper. Check if there's a way to decouple.
+ public EStructuralFeature getFeature(EObject object, Property property) {
+ EClass eClass = object.eClass();
+ EStructuralFeature feature = eClass.getEStructuralFeature(property.name);
+
+ boolean isAttribute = true;
+ EClassifier eClassifier = getModelDecorator().findEClassifier(property.type);
+ if (eClassifier!=null) {
+ if (!(eClassifier instanceof EDataType || eClassifier instanceof EEnum))
+ isAttribute = false;
+ }
+ if (!property.getValues().isEmpty()) {
+ if (property.getValues().get(0) instanceof Property)
+ isAttribute = false;
+ }
+ if (property.ref!=null) {
+ isAttribute = false;
+ }
+ boolean isMany = property.isMany;
+ boolean isContainment = (property.ref!=null) ? false : true;
+
+ if (isAttribute) {
+ if (feature==null)
+ feature = modelDecorator.createEAttribute(
+ property.name,
+ property.type,
+ eClass.getName(),
+ property.getFirstStringValue());
+ }
+ else {
+ if (feature==null)
+ feature = modelDecorator.createEReference(
+ property.name,
+ property.type,
+ eClass.getName(),
+ isContainment,
+ isMany);
+ }
+
+ ModelDecorator.setLabel(feature, property.label);
+
+ return feature;
+ }
+
+ /**
+ * Populate the given EObject from the Property tree defined in this runtime
+ * plugin's "modelObject" extension point.
+ *
+ * @param object
+ * @param property
+ */
+ private EStructuralFeature populateObject(EObject object, Property property) {
+
+ EObject childObject = null;
+ EStructuralFeature childFeature = null;
+ EStructuralFeature feature = getFeature(object, property);
+ Object firstValue = property.getValues().isEmpty() ? null : property.getValues().get(0);
+
+ if (feature instanceof EAttribute) {
+ adaptFeature(object, feature, firstValue, property);
+ }
+ else if (feature instanceof EReference) {
+ EReference ref = (EReference)feature;
+ if (property.ref!=null) {
+ // navigate down the newly created custom task to find the object reference
+ childObject = modelObject;
+ String[] segments = property.ref.split("/"); //$NON-NLS-1$
+ for (String s : segments) {
+ // is the feature an Elist?
+ int index = s.indexOf('#');
+ if (index>0) {
+ index = Integer.parseInt(s.substring(index+1));
+ s = s.split("#")[0]; //$NON-NLS-1$
+ }
+ // run all of the initializers that apply to the current child object
+ // so that references can be resolved
+ if (initializers.execute(childObject)) {
+ childFeature = childObject.eClass().getEStructuralFeature(s);
+ childObject = (EObject)getValue(childObject, childFeature, index);
+ }
+ }
+ adaptFeature(object, feature, childObject, property);
+ }
+ else if (firstValue instanceof Property)
+ {
+ EClassifier reftype = null;
+ if (property.type == null || property.type.length() == 0) {
+ reftype = getModelDecorator().findEClassifier(property.name);
+ }
+ else {
+ reftype = getModelDecorator().findEClassifier(property.type);
+ }
+ if (reftype == null || !(reftype instanceof EClass)) {
+ reftype = ref.getEReferenceType();
+ }
+ childObject = createObject((EClass) reftype);
+ if (property.label!=null) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(childObject);
+ if (adapter!=null)
+ adapter.getObjectDescriptor().setLabel(property.label);
+ }
+ adaptFeature(object, feature, childObject, property);
+ populateObjectFromValues(childObject, property.getValues());
+ }
+ }
+ return feature;
+ }
+
+ /**
+ * Populate the given EObject with a list of values which must be Property objects.
+ *
+ * @param object - the object to initialize
+ * @param values - list of Property values
+ */
+ private void populateObjectFromValues(EObject object, List<Object> values) {
+
+ for (Object value : values) {
+ if (value instanceof Property)
+ populateObject(object,(Property)value);
+ }
+ }
+
+ /**
+ * Return the value of the given root Property name.
+ *
+ * @param name
+ * @return
+ */
+ public Object getPropertyValue(String name) {
+
+ for (Property prop : getProperties()) {
+ if (prop.name.equals(name)) {
+ if (!prop.getValues().isEmpty()) {
+ return prop.getValues().get(0);
+ }
+ }
+ }
+ return null;
+ }
+
+ public List<Property> getProperties(String path) {
+ List<Property> result = new ArrayList<Property>();
+ List<Property> props = new ArrayList<Property>();
+ props.addAll(getProperties());
+ String names[] = path.split("/"); //$NON-NLS-1$
+ getProperties(props,names,0,result);
+ return result;
+ }
+
+ private void getProperties(List<Property>props, String names[], int index, List<Property>result) {
+ String name = names[index];
+ for (Property p : props) {
+ if (p.name.equals(name)) {
+ if (index==names.length-1)
+ result.add(p);
+ else {
+ List<Property>childProps = new ArrayList<Property>();
+ for (Object v : p.values) {
+ if (v instanceof Property) {
+ childProps.add((Property)v);
+ }
+ }
+ getProperties(childProps, names, index+1, result);
+ }
+ }
+ }
+ }
+
+ public Property getProperty(String name) {
+ for (Property prop : getProperties()) {
+ if (prop.name.equals(name)) {
+ return prop;
+ }
+ }
+ return null;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public void setProperties(List<Property> properties) {
+ this.properties = properties;
+ }
+
+ public ExtendedPropertiesAdapter adaptObject(EObject object) {
+ addModelExtensionAdapter(object);
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ adapter.setProperty(this.getClass().getName(), this);
+ if (description!=null)
+ adapter.setProperty(ExtendedPropertiesAdapter.LONG_DESCRIPTION, description);
+ }
+ return adapter;
+ }
+
+ private void addModelExtensionAdapter(EObject object) {
+ if (!object.eAdapters().contains(this))
+ object.eAdapters().add( new ModelExtensionAdapter(this) );
+ }
+
+ public static ModelExtensionAdapter getModelExtensionAdapter(EObject object) {
+ for (Adapter a : object.eAdapters()) {
+ if (a instanceof ModelExtensionAdapter) {
+ return (ModelExtensionAdapter)a;
+ }
+ }
+ return null;
+ }
+
+ private void adaptFeature(EObject object, EStructuralFeature feature, Object value, Property property) {
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ // if this is a dynamic feature, delegate access to the feature to the Model Decorator
+ FeatureDescriptor fd = adapter.getFeatureDescriptor(feature);
+ if (object.eClass().getEStructuralFeature(feature.getName())==null)
+ fd.setProperty(ExtendedPropertiesAdapter.IS_EXTENSION_FEATURE, Boolean.TRUE);
+ if (property.description!=null)
+ adapter.setProperty(feature, ExtendedPropertiesAdapter.LONG_DESCRIPTION, property.description);
+
+ if (!(feature.getEType() instanceof EEnum)) // skip enum initialization
+ initializers.add(adapter,feature,value);
+ }
+ }
+
+ private int recursionCounter;
+ public boolean isDefined(String className, String featureName) {
+ if (className==null || featureName==null) {
+ return false;
+ }
+ if (++recursionCounter>100) {
+ Activator.logError(new Exception("Possible infinite recursion in "+this.getClass().getName()+"#isDefined()")); //$NON-NLS-1$ //$NON-NLS-2$
+ --recursionCounter;
+ return false;
+ }
+
+ if (className.equals(getType())) {
+ if (featureName!=null) {
+ for (Property p : getProperties()) {
+ if (featureName.equals(p.name)) {
+ --recursionCounter;
+ return true;
+ }
+ }
+ }
+ --recursionCounter;
+ return false;
+ }
+ EClass eClass = getEClass(className);
+ if (eClass!=null) {
+ for (EClass st : eClass.getEAllSuperTypes()) {
+ // TODO: this should fix any infinite recursions but keeping the counter just in case.
+ if (st.getName().equals(className))
+ continue;
+ if (isDefined(st.getName(), featureName)) {
+ --recursionCounter;
+ return true;
+ }
+ }
+ }
+
+ // check types defined within the Properties tree
+ for (Property property : getProperties()) {
+ if (className.equals(property.type)) {
+ if (featureName!=null && property.values!=null) {
+ for (Object p : property.values) {
+ if (p instanceof Property) {
+ if (featureName.equals(((Property)p).name)) {
+ --recursionCounter;
+ return true;
+ }
+ }
+ }
+ }
+ --recursionCounter;
+ return false;
+ }
+
+ Iterator<Property> iter = property.iterator();
+ while (iter.hasNext()) {
+ Property p = iter.next();
+ if (className.equals(p.type)) {
+ if (featureName!=null && p.values!=null) {
+ for (Object child : p.values) {
+ if (child instanceof Property) {
+ if (((Property)child).name.equals(featureName)) {
+ --recursionCounter;
+ return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ --recursionCounter;
+ return false;
+ }
+
+ private EClass getEClass(String className) {
+ // try the runtime package first
+ EClass eClass = getModelDecorator().getEClass(className);
+
+ // then all BPMN2 packages
+ if (eClass==null)
+ eClass = (EClass)Bpmn2Package.eINSTANCE.getEClassifier(className);
+ if (eClass==null)
+ eClass = (EClass)BpmnDiPackage.eINSTANCE.getEClassifier(className);
+ return eClass;
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyExtensionDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyExtensionDescriptor.java
index e9fcc53b..2e0a2242 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyExtensionDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyExtensionDescriptor.java
@@ -24,21 +24,29 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
/**
- * @author Bob Brodt
- *
+ * Target Runtime Extension Descriptor class for providing extended property adapters for BPMN2 model objects and features.
+ * See the ExtendedPropertiesAdapter class for implementation details of an extended property adapter.
+ * Instances of this class correspond to <propertyExtension> extension elements in the extension's plugin.xml
+ * See the description of the "propertyExtension" element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
*/
-public class PropertyExtensionDescriptor extends BaseRuntimeDescriptor {
+public class PropertyExtensionDescriptor extends BaseRuntimeExtensionDescriptor {
+ public final static String EXTENSION_NAME = "propertyExtension"; //$NON-NLS-1$
+
protected String type;
protected String adapterClassName;
- private final IConfigurationElement element;
/**
* @param rt
*/
- public PropertyExtensionDescriptor(TargetRuntime rt, IConfigurationElement element) {
- super(rt);
- this.element = element;
+ public PropertyExtensionDescriptor(IConfigurationElement e) {
+ super(e);
+ type = e.getAttribute("type"); //$NON-NLS-1$
+ adapterClassName = e.getAttribute("class"); //$NON-NLS-1$
+ }
+
+ public String getExtensionName() {
+ return EXTENSION_NAME;
}
@SuppressWarnings("rawtypes")
@@ -47,7 +55,7 @@ public class PropertyExtensionDescriptor extends BaseRuntimeDescriptor {
return null;
}
try {
- return Platform.getBundle(element.getContributor().getName()).loadClass(type);
+ return Platform.getBundle(configurationElement.getContributor().getName()).loadClass(type);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
@@ -61,7 +69,7 @@ public class PropertyExtensionDescriptor extends BaseRuntimeDescriptor {
}
try {
Constructor ctor = null;
- Class adapterClass = Platform.getBundle(element.getContributor().getName()).loadClass(adapterClassName);
+ Class adapterClass = Platform.getBundle(configurationElement.getContributor().getName()).loadClass(adapterClassName);
EClass eclass = null;
if (object instanceof EClass) {
eclass = (EClass)object;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertySectionFilter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertySectionFilter.java
index 99ffb1de..99ffb1de 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertySectionFilter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertySectionFilter.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2TabDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyTabDescriptor.java
index 6aa1b7f9..b59d2224 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/Bpmn2TabDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/PropertyTabDescriptor.java
@@ -14,14 +14,27 @@ package org.eclipse.bpmn2.modeler.core.runtime;
import java.util.List;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.views.properties.tabbed.AbstractTabDescriptor;
import org.eclipse.ui.views.properties.tabbed.TabContents;
-public class Bpmn2TabDescriptor extends AbstractTabDescriptor {
+/**
+ * Target Runtime Extension Descriptor class for Property Tabs.
+ * Instances of this class correspond to <propertyTab> extension elements in the extension's plugin.xml
+ * See the description of the "property" element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ *
+ * Unfortunately, this class must extend from AbstractTabDescriptor, so it is not a BaseRuntimeExtensionDescriptor
+ * like all of the other extension descriptor classes.
+ */
+public class PropertyTabDescriptor extends AbstractTabDescriptor implements IRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "propertyTab"; //$NON-NLS-1$
protected String id;
protected String category;
@@ -31,8 +44,12 @@ public class Bpmn2TabDescriptor extends AbstractTabDescriptor {
protected boolean indented = false;
protected Image image = null;
protected boolean popup = true;
+ protected TargetRuntime targetRuntime;
+ protected final IConfigurationElement configurationElement;
+ protected IFile configFile;
- public Bpmn2TabDescriptor(IConfigurationElement e) {
+ public PropertyTabDescriptor(IConfigurationElement e) {
+ configurationElement = e;
id = e.getAttribute("id"); //$NON-NLS-1$
category = e.getAttribute("category"); //$NON-NLS-1$
if (category==null || category.isEmpty())
@@ -45,14 +62,53 @@ public class Bpmn2TabDescriptor extends AbstractTabDescriptor {
s = e.getAttribute("popup"); //$NON-NLS-1$
if (s!=null && s.trim().equalsIgnoreCase("false")) //$NON-NLS-1$
popup = false;
+
+ Bpmn2SectionDescriptor sd = new Bpmn2SectionDescriptor(this,e);
+ }
+
+ private PropertyTabDescriptor(PropertyTabDescriptor other) {
+ this.configurationElement = other.configurationElement;
+ this.id = other.id;
+ if (other.category==null || other.category.isEmpty() )
+ other.category = "BPMN2"; //$NON-NLS-1$
+ this.category = other.category;
+ this.label = other.label;
+ }
+
+ public void dispose() {
+ List<IRuntimeExtensionDescriptor> list = targetRuntime.getRuntimeExtensionDescriptors(getExtensionName());
+ list.remove(this);
+ // notify any open editors that property tabs have changed
+ PropertyChangeEvent event = new PropertyChangeEvent(this, Bpmn2Preferences.PREF_SHOW_ADVANCED_PROPERTIES, null, new Object());
+ for (Bpmn2Preferences p : Bpmn2Preferences.getInstances(targetRuntime)) {
+ p.propertyChange(event);
+ }
}
- public Bpmn2TabDescriptor(String id, String category, String label) {
- this.id = id;
- if (category==null || category.isEmpty() )
- category = "BPMN2"; //$NON-NLS-1$
- this.category = category;
- this.label = label;
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public void setRuntime(TargetRuntime targetRuntime) {
+ this.targetRuntime = targetRuntime;
+ List<IRuntimeExtensionDescriptor> list = targetRuntime.getRuntimeExtensionDescriptors(getExtensionName());
+ list.add(this);
+ }
+
+ public TargetRuntime getRuntime() {
+ return targetRuntime;
+ }
+
+ public IFile getConfigFile() {
+ return configFile;
+ }
+
+ public void setConfigFile(IFile configFile) {
+ this.configFile = configFile;
+ }
+
+ public String getRuntimeId() {
+ return targetRuntime==null ? null : targetRuntime.getId();
}
@Override
@@ -117,28 +173,32 @@ public class Bpmn2TabDescriptor extends AbstractTabDescriptor {
@Override
public Object clone() {
- Bpmn2TabDescriptor td = new Bpmn2TabDescriptor(id, category, label);
+ PropertyTabDescriptor td = new PropertyTabDescriptor(this);
td.afterTab = this.afterTab;
td.replaceTab = this.replaceTab;
if (image!=null)
td.image = new Image(Display.getDefault(), this.image, SWT.IMAGE_COPY);
td.indented = this.indented;
+ td.targetRuntime = this.targetRuntime;
+ td.configFile = this.configFile;
// for (Bpmn2SectionDescriptor sd : (List<Bpmn2SectionDescriptor>)getSectionDescriptors()) {
// clone.getSectionDescriptors().add( new Bpmn2SectionDescriptor(sd) );
// }
return td;
}
- public Bpmn2TabDescriptor copy() {
- Bpmn2TabDescriptor td = new Bpmn2TabDescriptor(id, category, label);
+ public PropertyTabDescriptor copy() {
+ PropertyTabDescriptor td = new PropertyTabDescriptor(this);
td.id += td.hashCode();
td.afterTab = this.afterTab;
td.replaceTab = this.replaceTab;
if (image!=null)
td.image = new Image(Display.getDefault(), this.image, SWT.IMAGE_COPY);
td.indented = this.indented;
+ td.targetRuntime = this.targetRuntime;
td.popup = this.popup;
td.image = this.image;
+ td.configFile = this.configFile;
for (Bpmn2SectionDescriptor sd : (List<Bpmn2SectionDescriptor>)getSectionDescriptors()) {
td.getSectionDescriptors().add(new Bpmn2SectionDescriptor(td, sd));
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ServiceImplementationDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ServiceImplementationDescriptor.java
new file mode 100644
index 00000000..1ed015ae
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ServiceImplementationDescriptor.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+
+/**
+ *
+ */
+public class ServiceImplementationDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "serviceImplementation"; //$NON-NLS-1$
+
+ protected String name;
+ protected String uri;
+
+ public ServiceImplementationDescriptor(IConfigurationElement e) {
+ super(e);
+ name = e.getAttribute("name"); //$NON-NLS-1$
+ uri = e.getAttribute("uri"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void setRuntime(TargetRuntime targetRuntime) {
+ super.setRuntime(targetRuntime);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ }
+
+ @Override
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java
new file mode 100644
index 00000000..643b946c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntime.java
@@ -0,0 +1,982 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.utils.ErrorDialog;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.graphiti.ui.editor.DiagramEditor;
+
+
+/**
+ * Target Runtime Extension Descriptor class for Target Runtime definition.
+ * Instances of this class correspond to <runtime> extension elements in the extension's plugin.xml
+ * See the description of the "runtime" element in the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ */
+public class TargetRuntime extends BaseRuntimeExtensionDescriptor implements IRuntimeExtensionDescriptor {
+
+ public static final String EXTENSION_NAME = "runtime"; //$NON-NLS-1$
+
+ // extension point ID for Target Runtimes
+ public static final String RUNTIME_EXTENSION_ID = "org.eclipse.bpmn2.modeler.runtime"; //$NON-NLS-1$
+ public static final String DEFAULT_RUNTIME_ID = "org.eclipse.bpmn2.modeler.runtime.none"; //$NON-NLS-1$
+ // ID for BPMN2 specific problem markers
+ public static final String BPMN2_MARKER_ID = "org.eclipse.bpmn2.modeler.core.problemMarker"; //$NON-NLS-1$
+
+ // our cached registry of target runtimes contributed by other plugins
+ private static List<TargetRuntime> targetRuntimes;
+ // the Target Runtime for the currently active BPMN2 Editor
+ private static TargetRuntime currentRuntime;
+
+ // the Target Runtime properties
+ private String name;
+ private String[] versions;
+ private String description;
+ private IBpmn2RuntimeExtension runtimeExtension;
+ private String problemMarkerId;
+
+ // the lists of Extension Descriptors defined in the extension plugin's plugin.xml
+ protected List<ModelDescriptor> modelDescriptors;
+ protected List<PropertyTabDescriptor> propertyTabDescriptors;
+ protected List<CustomTaskDescriptor> customTaskDescriptors;
+ protected List<ModelExtensionDescriptor> modelExtensionDescriptors;
+ protected List<ModelEnablementDescriptor> modelEnablementDescriptors;
+// protected ModelEnablementDescriptor defaultModelEnablementDescriptors;
+ protected List<PropertyExtensionDescriptor> propertyExtensionDescriptors;
+ protected List<FeatureContainerDescriptor> featureContainerDescriptors;
+ protected List<ToolPaletteDescriptor> toolPaletteDescriptors;
+ protected List<ShapeStyle> shapeStyles;
+ protected List<DataTypeDescriptor> dataTypeDescriptors;
+ protected List<TypeLanguageDescriptor> typeLanguageDescriptors;
+ protected List<ExpressionLanguageDescriptor> expressionLanguageDescriptors;
+ protected List<ServiceImplementationDescriptor> serviceImplementationDescriptors;
+
+ // all of the extension descriptor classes in the order in which they need to be processed
+ static Class extensionDescriptorClasses[] = {
+ TargetRuntime.class,
+ ModelDescriptor.class,
+ DataTypeDescriptor.class,
+ PropertyTabDescriptor.class,
+ ModelExtensionDescriptor.class,
+ CustomTaskDescriptor.class,
+ ModelEnablementDescriptor.class,
+ ToolPaletteDescriptor.class,
+ PropertyExtensionDescriptor.class,
+ FeatureContainerDescriptor.class,
+ TypeLanguageDescriptor.class,
+ ExpressionLanguageDescriptor.class,
+ ServiceImplementationDescriptor.class,
+ ShapeStyle.class,
+ };
+
+ /**
+ * Target Runtime Construction with a ConfigurationElement.
+ * This initializes all of our Target Runtime properties (name, ID, implementation class, etc.)
+ *
+ * @param e - an IConfigurationElement defined in a plugin.xml
+ */
+ public TargetRuntime(IConfigurationElement e) {
+ super(e);
+ name = e.getAttribute("name"); //$NON-NLS-1$
+ String s = e.getAttribute("versions"); //$NON-NLS-1$
+ if (s!=null) {
+ versions = s.split("[, ]"); //$NON-NLS-1$
+ }
+ description = e.getAttribute("description"); //$NON-NLS-1$
+ try {
+ setRuntimeExtension((IBpmn2RuntimeExtension) e.createExecutableExtension("class")); //$NON-NLS-1$
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ } //$NON-NLS-1$
+
+ // add validation problem marker IDs
+ IContributor contributor = e.getDeclaringExtension().getContributor();
+ IConfigurationElement[] markers = Platform.getExtensionRegistry().getConfigurationElementsFor(
+ "org.eclipse.core.resources.markers"); //$NON-NLS-1$
+ for (IConfigurationElement m : markers) {
+ if (m.getDeclaringExtension().getContributor() == contributor) {
+ problemMarkerId = m.getDeclaringExtension().getUniqueIdentifier();
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IRuntimeExtensionDescriptor#getExtensionName()
+ */
+ @Override
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IRuntimeExtensionDescriptor#setRuntime(org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime)
+ */
+ @Override
+ public void setRuntime(TargetRuntime targetRuntime) {
+ targetRuntimes.add(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IRuntimeExtensionDescriptor#getRuntime()
+ */
+ @Override
+ public TargetRuntime getRuntime() {
+ return this;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IRuntimeExtensionDescriptor#getConfigFile()
+ */
+ @Override
+ public IFile getConfigFile() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IRuntimeExtensionDescriptor#setConfigFile(org.eclipse.core.resources.IFile)
+ */
+ @Override
+ public void setConfigFile(IFile configFile) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IRuntimeExtensionDescriptor#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /**
+ * Load and initialize all RuntimeExtension classes for all Target Runtimes
+ * that have the same ID as ours.
+ *
+ * @param editor - the DiagramEditor initializing us.
+ */
+ public void notify(LifecycleEvent event) {
+ for (TargetRuntime rt : targetRuntimes) {
+ if (rt.getId().equals(this.id)) {
+ rt.getRuntimeExtension().notify(event);
+ }
+ }
+ }
+
+ /*
+ * Target Runtime property accessors
+ */
+
+ /**
+ * Returns the Target Runtime's unique ID string.
+ *
+ * @return
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Returns the Target Runtime's name for use in UI components
+ *
+ * @return
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the Target Runtime's version number strings for use in UI components
+ *
+ * @return
+ */
+ public String[] getVersions() {
+ return versions;
+ }
+
+ /**
+ * Returns the Target Runtime's descriptive text for use in UI components
+ *
+ * @return
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Returns the extension plugin class that implements the Target Runtime behavior
+ * defined by the IBpmn2RuntimeExtension interface.
+ *
+ * @return
+ */
+ public IBpmn2RuntimeExtension getRuntimeExtension() {
+ return runtimeExtension;
+ }
+
+ /**
+ * Sets the extension plugin's IBpmn2RuntimeExtension implementation class.
+ *
+ * @param runtimeExtension
+ */
+ public void setRuntimeExtension(IBpmn2RuntimeExtension runtimeExtension) {
+ this.runtimeExtension = runtimeExtension;
+ }
+
+ /**
+ * Returns the Target Runtime's Model Descriptor which defines the EMF extension model.
+ *
+ * @return
+ */
+ public ModelDescriptor getModelDescriptor() {
+ if (getModelDescriptors().size()==0)
+ return null;
+ return getModelDescriptors().get(0);
+ }
+
+ public void setModelDescriptor(ModelDescriptor md) {
+ getModelDescriptors().clear();
+ getModelDescriptors().add(md);
+ }
+
+ public String getProblemMarkerId() {
+ if (problemMarkerId==null)
+ return BPMN2_MARKER_ID;
+ return problemMarkerId;
+ }
+
+ /*
+ * Helper methods for access to global Target Runtime data
+ */
+
+ /**
+ * Fetch the TargetRuntime for the given ID string
+ *
+ * @param id
+ * @return
+ */
+ public static TargetRuntime getRuntime(String id) {
+ if (targetRuntimes == null) {
+ return null;
+ }
+
+ for (TargetRuntime rt : targetRuntimes) {
+ if (rt.id.equals(id))
+ return rt;
+ }
+ return null;
+ }
+
+ /**
+ * Set the current TargetRuntime.
+ * This is called by a BPMN2 Editor when it becomes the active editor.
+ *
+ * @param rt
+ */
+ public static void setCurrentRuntime(TargetRuntime rt) {
+ currentRuntime = rt;
+ }
+
+ /**
+ * Return the current TargetRuntime.
+ * This can be used by any UI component that belongs to the currently active BPMN2 Editor
+ *
+ * @return
+ */
+ public static TargetRuntime getCurrentRuntime() {
+ if (currentRuntime==null)
+ return getDefaultRuntime();
+ return currentRuntime;
+ }
+
+ /**
+ * Returns the "None" TargetRuntime definition.
+ *
+ * @return
+ */
+ public static TargetRuntime getDefaultRuntime() {
+ return getRuntime(DEFAULT_RUNTIME_ID);
+ }
+
+ /**
+ * Returns the first TargetRuntime which is not the "None", or "default" runtime.
+ * If there are no other TargetRuntime extension plugins loaded, this returns the default runtime.
+ *
+ * @return
+ */
+ public static String getFirstNonDefaultId(){
+ String runtimeId = null;
+ int nonDefaultRuntimeCount = 0;
+
+ if (TargetRuntime.createTargetRuntimes() == null) {
+ return TargetRuntime.DEFAULT_RUNTIME_ID;
+ }
+
+ for (TargetRuntime rt :TargetRuntime.createTargetRuntimes()) {
+ if (!rt.getId().equals(TargetRuntime.DEFAULT_RUNTIME_ID)){
+ nonDefaultRuntimeCount++;
+ runtimeId = rt.getId();
+ }
+ }
+
+ if (nonDefaultRuntimeCount == 1 && runtimeId != null){
+ return runtimeId;
+ }else{
+ return TargetRuntime.DEFAULT_RUNTIME_ID;
+ }
+ }
+
+ public void registerExtensionResourceFactory(ResourceSet resourceSet) {
+ resourceSet.getResourceFactoryRegistry().getContentTypeToFactoryMap().put(
+ Bpmn2ModelerResourceImpl.BPMN2_CONTENT_TYPE_ID, getModelDescriptor().getResourceFactory());
+ }
+
+ public static List<TargetRuntime> createTargetRuntimes() {
+ if (targetRuntimes==null) {
+ // load runtimes contributions from other plugins
+ targetRuntimes = new ArrayList<TargetRuntime>();
+
+ IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(RUNTIME_EXTENSION_ID);
+
+ try {
+ loadExtensions(null, elements, null);
+ }
+ catch (Exception e) {
+ ErrorDialog dlg = new ErrorDialog(org.eclipse.bpmn2.modeler.core.runtime.Messages.TargetRuntime_Config_Error, e);
+ dlg.show();
+ }
+
+ // All done parsing configuration elements
+ // now go back and fix up some things...
+ for (TargetRuntime rt : targetRuntimes) {
+
+ if (rt.getModelDescriptor()==null) {
+ rt.setModelDescriptor( getDefaultRuntime().getModelDescriptor() );
+ }
+ for (ToolPaletteDescriptor tp : rt.getToolPaletteDescriptors()) {
+ tp.sortCategories();
+ }
+ }
+
+ CustomTaskImageProvider.registerAvailableImages();
+ }
+ return targetRuntimes;
+ }
+
+ static TargetRuntime getRuntime(IConfigurationElement e) {
+ TargetRuntime rt = getRuntime( getRuntimeId(e) );
+ if (rt==null) {
+ if (currentRuntime!=null)
+ rt = currentRuntime;
+ else
+ rt = getDefaultRuntime();
+ }
+ return rt;
+ }
+
+ static String getRuntimeId(IConfigurationElement e) {
+ String id = null;
+ if (EXTENSION_NAME.equals(e.getName()))
+ id = e.getAttribute("id"); //$NON-NLS-1$
+ else {
+ id = e.getAttribute("runtimeId"); //$NON-NLS-1$
+ // this extension does not define a runtimeId, so get it from the containing
+ // plugin.xml's <runtime> definition
+ if (id==null) {
+ for (IConfigurationElement ep : e.getDeclaringExtension().getConfigurationElements()) {
+ if (EXTENSION_NAME.equals(ep.getName())) {
+ id = ep.getAttribute("id"); //$NON-NLS-1$
+ break;
+ }
+ }
+ }
+ }
+ return id;
+ }
+
+ public List<TargetRuntime> getTargetRuntimes() {
+ return createTargetRuntimes();
+ }
+
+ /*
+ * Custom Task convenience methods
+ */
+ public CustomTaskDescriptor getCustomTask( String id ) {
+ Iterator<CustomTaskDescriptor> ctIter = customTaskDescriptors.iterator();
+ while (ctIter.hasNext()) {
+ CustomTaskDescriptor ctd = ctIter.next();
+ if (ctd.getId().equalsIgnoreCase(id))
+ return ctd;
+ }
+ return null;
+ }
+
+ public boolean customTaskExists ( String id ) {
+ Iterator<CustomTaskDescriptor> ctIter = customTaskDescriptors.iterator();
+ while (ctIter.hasNext()) {
+ CustomTaskDescriptor ctd = ctIter.next();
+ if (ctd.getId().equalsIgnoreCase(id))
+ return true;
+ }
+ return false;
+ }
+
+ public void addCustomTask(CustomTaskDescriptor ct) {
+ getCustomTaskDescriptors().add(ct);
+ ct.targetRuntime = this;
+ }
+
+ public String getCustomTaskId(EObject object) {
+ for (CustomTaskDescriptor ctd : getCustomTaskDescriptors()) {
+ String id = ctd.getFeatureContainer().getId(object);
+ if (ctd.getId().equals(id))
+ return id;
+ }
+ return null;
+ }
+
+ /*
+ * Model Extension convenience methods
+ */
+ public void addModelExtension(ModelExtensionDescriptor me) {
+ getModelExtensionDescriptors().add(me);
+ }
+
+ /*
+ * Property Extension convenience methods
+ */
+ public void addPropertyExtension(PropertyExtensionDescriptor me) {
+ getPropertyExtensionDescriptors().add(me);
+ }
+
+ public PropertyExtensionDescriptor getPropertyExtension(Class clazz) {
+ for (PropertyExtensionDescriptor ped : getPropertyExtensionDescriptors()) {
+ String className = clazz.getName();
+ if (className.equals(ped.type))
+ return ped;
+ // well, that didn't work...
+ // The "type" name should be the BPMN2 element's interface definition;
+ // if it's an implementation class name, try to convert it to its
+ // interface name.
+ className = className.replaceFirst("\\.impl\\.", "."); //$NON-NLS-1$ //$NON-NLS-2$
+ className = className.replaceFirst("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ if (className.equals(ped.type))
+ return ped;
+ }
+ return null;
+ }
+
+ /*
+ * Feature Container Extension convenience methods
+ */
+ public void addFeatureContainer(FeatureContainerDescriptor me) {
+ getFeatureContainerDescriptors().add(me);
+ }
+
+ public FeatureContainerDescriptor getFeatureContainer(EClass clazz) {
+ for (FeatureContainerDescriptor fcd : getFeatureContainerDescriptors()) {
+ String className = clazz.getInstanceClassName();
+ if (className.equals(fcd.type))
+ return fcd;
+ // well, that didn't work...
+ // The "type" name should be the BPMN2 element's interface definition;
+ // if it's an implementation class name, try to convert it to its
+ // interface name.
+ className = className.replaceFirst("\\.impl\\.", "."); //$NON-NLS-1$ //$NON-NLS-2$
+ className = className.replaceFirst("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ if (className.equals(fcd.type))
+ return fcd;
+ }
+ return null;
+ }
+
+ /*
+ * Model Enablement Extension convenience methods
+ */
+ public ModelEnablementDescriptor getModelEnablements(EObject object)
+ {
+ // TODO: At some point the separation of "Core" and "UI" plugins is going to become
+ // an unmanageable problem: I am having to resort to using DiagramEditor.getAdapter()
+ // more and more just to get things done.
+ // Think about either reorganizing these two plugins, or simply combining them...
+ TargetRuntime rt = this;
+ DiagramEditor diagramEditor = ModelUtil.getEditor(object);
+ if (diagramEditor!=null) {
+ rt = (TargetRuntime) diagramEditor.getAdapter(TargetRuntime.class);
+ }
+ List<ModelEnablementDescriptor> meds = rt.getModelEnablementDescriptors();
+ if (meds.size()>0)
+ return meds.get(0);
+ return null;
+ }
+
+ public List<ModelEnablementDescriptor> getModelEnablements()
+ {
+ List<ModelEnablementDescriptor> list = new ArrayList<ModelEnablementDescriptor>();
+ for (ModelEnablementDescriptor me : getModelEnablementDescriptors()) {
+ list.add(me);
+ }
+ return list;
+ }
+
+ public ModelEnablementDescriptor getModelEnablements(String profileId)
+ {
+ if (profileId!=null && profileId.isEmpty())
+ profileId = null;
+
+ for (ModelEnablementDescriptor me : getModelEnablementDescriptors()) {
+ if (profileId==null || profileId.equalsIgnoreCase(me.getId()))
+ return me;
+ }
+ if (this != getDefaultRuntime()) {
+ // fall back to enablements from Default Runtime
+ return getDefaultRuntime().getModelEnablements(profileId);
+ }
+ return null;
+ }
+
+ public void addModelEnablements(ModelEnablementDescriptor me) {
+ getModelEnablementDescriptors().add(me);
+ }
+
+ /*
+ * Tool Palette Extension convenience methods
+ */
+ public ToolPaletteDescriptor getToolPalette(EObject object)
+ {
+ DiagramEditor diagramEditor = ModelUtil.getEditor(object);
+ return (ToolPaletteDescriptor) diagramEditor.getAdapter(ToolPaletteDescriptor.class);
+ }
+
+ public ToolPaletteDescriptor getToolPalette(String profileId) {
+ ToolPaletteDescriptor defaultToolPalette = null;
+ // search from the end of the ToolPaletteDescriptors list so that
+ // we'll find the most recently defined ToolPalette, which may be
+ // in a .bpmn2config file
+ List<ToolPaletteDescriptor> allToolPalettes = getToolPaletteDescriptors();
+ for (int i = allToolPalettes.size() - 1; i >= 0; --i) {
+ ToolPaletteDescriptor tp = allToolPalettes.get(i);
+ if (profileId == null)
+ return tp;
+ for (String p : tp.getProfileIds()) {
+ if (profileId.equalsIgnoreCase(p))
+ return tp;
+ }
+ if (defaultToolPalette==null)
+ defaultToolPalette = tp;
+ }
+
+ if (defaultToolPalette != null)
+ return defaultToolPalette;
+
+ if (this != getDefaultRuntime()) {
+ // fall back to toolPalettes from Default Runtime
+ return getDefaultRuntime().getToolPalette(profileId);
+ }
+ return null;
+ }
+
+ public void addToolPalette(ToolPaletteDescriptor tp) {
+ getToolPaletteDescriptors().add(tp);
+ }
+
+ /*
+ * Property Tab Extension convenience methods
+ */
+ private void addAfterTab(ArrayList<PropertyTabDescriptor> list, PropertyTabDescriptor tab) {
+
+ createTargetRuntimes();
+ String afterTab = tab.getAfterTab();
+ if (afterTab!=null && !afterTab.isEmpty() && !afterTab.equals("top")) { //$NON-NLS-1$
+ String id = tab.getId();
+ for (TargetRuntime rt : targetRuntimes) {
+ for (PropertyTabDescriptor td : rt.getPropertyTabDescriptors()) {
+ if (tab!=td) {
+ if (td.getId().equals(afterTab) || td.isReplacementForTab(afterTab)) {
+ addAfterTab(list,td);
+ if (rt==this || rt==TargetRuntime.getDefaultRuntime()) {
+ if (!list.contains(td))
+ list.add(td);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void addPropertyTabDescriptor(PropertyTabDescriptor td) {
+ getPropertyTabDescriptors().add(td);
+ }
+
+ public static PropertyTabDescriptor findPropertyTabDescriptor(String id) {
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
+ PropertyTabDescriptor tab = rt.getPropertyTabDescriptor(id);
+ if (tab!=null)
+ return tab;
+ }
+ return null;
+ }
+
+ public PropertyTabDescriptor getPropertyTabDescriptor(String id) {
+ for (PropertyTabDescriptor tab : getPropertyTabDescriptors()) {
+ if (tab.getId().equals(id))
+ return tab;
+ }
+ return null;
+ }
+
+ public List<PropertyTabDescriptor> buildPropertyTabDescriptors() {
+ ArrayList<PropertyTabDescriptor> list = new ArrayList<PropertyTabDescriptor>();
+ for (PropertyTabDescriptor tab : getPropertyTabDescriptors()) {
+ addAfterTab(list, tab);
+ if (!list.contains(tab))
+ list.add(tab);
+ }
+
+ return list;
+ }
+
+ /**
+ * Gets the default Type Language for this Target Runtime. If the Target Runtime does
+ * not define its own Type Languages, use the Default Target Runtime.
+ *
+ * @return the Type Language URI
+ */
+ public String getTypeLanguage() {
+ if (getTypeLanguageDescriptors().size()>0) {
+ return getTypeLanguageDescriptors().get(0).getUri();
+ }
+ // extension plugin does not specify a type language, so use default
+ return TargetRuntime.getDefaultRuntime().getTypeLanguage();
+ }
+
+ public TypeLanguageDescriptor getTypeLanguageDescriptor(String uri) {
+ if (uri!=null) {
+ for (TypeLanguageDescriptor tld : getTypeLanguageDescriptors()) {
+ if (uri.equals(tld.getUri()))
+ return tld;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the default Expression Language for this Target Runtime. If the Target Runtime does
+ * not define its own Expression Languages, use the Default Target Runtime.
+ *
+ * @return the Expression Language URI
+ */
+ public String getExpressionLanguage() {
+ if (getExpressionLanguageDescriptors().size()>0) {
+ return getExpressionLanguageDescriptors().get(0).getUri();
+ }
+ // extension plugin does not specify an expression language, so use default
+ return TargetRuntime.getDefaultRuntime().getExpressionLanguage();
+ }
+
+ public ExpressionLanguageDescriptor getExpressionLanguageDescriptor(String uri) {
+ if (uri!=null) {
+ for (ExpressionLanguageDescriptor tld : getExpressionLanguageDescriptors()) {
+ if (uri.equals(tld.getUri()))
+ return tld;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public boolean equals(Object arg0) {
+ if (arg0 instanceof TargetRuntime) {
+ if (id!=null && id.equals(((TargetRuntime)arg0).getId()))
+ return true;
+ }
+ else if (arg0 instanceof String) {
+ return ((String)arg0).equals(id);
+ }
+ return super.equals(arg0);
+ }
+
+ /*
+ * Runtime Extension Descriptor handling
+ */
+ public static void loadExtensions(TargetRuntime targetRuntime, IConfigurationElement[] elements, IFile file) throws TargetRuntimeConfigurationException {
+
+ TargetRuntime oldCurrentRuntime = currentRuntime;
+ currentRuntime = targetRuntime;
+ try {
+ ConfigurationElementSorter.sort(elements);
+
+ unloadExtensions(file);
+
+ for (IConfigurationElement e : elements) {
+ currentRuntime = getRuntime(e);
+ createRuntimeExtensionDescriptor(currentRuntime,e,file);
+ }
+ }
+ finally {
+ currentRuntime = oldCurrentRuntime;
+ }
+ }
+
+ public static void unloadExtensions(IFile file) {
+ if (file != null) {
+ List<IRuntimeExtensionDescriptor> disposed = new ArrayList<IRuntimeExtensionDescriptor>();
+
+ for (TargetRuntime rt : targetRuntimes) {
+ for (Class c : extensionDescriptorClasses) {
+ String name = getExtensionNameForClass(c);
+ for (IRuntimeExtensionDescriptor d : rt.getRuntimeExtensionDescriptors(name)) {
+ if (file.equals(d.getConfigFile())) {
+ disposed.add(d);
+ }
+ }
+ }
+ }
+ for (IRuntimeExtensionDescriptor d : disposed) {
+ d.dispose();
+ }
+ }
+
+ }
+
+ public static IRuntimeExtensionDescriptor createRuntimeExtensionDescriptor(TargetRuntime rt, IConfigurationElement e, IFile file) throws TargetRuntimeConfigurationException {
+ IRuntimeExtensionDescriptor d = null;
+ try {
+ Class c = getClassForExtensionName(e.getName());
+ Constructor ctor = c.getConstructor(IConfigurationElement.class);
+ d = (IRuntimeExtensionDescriptor)ctor.newInstance(e);
+ d.setRuntime(rt);
+ d.setConfigFile(file);
+ }
+ catch (Exception ex) {
+ throw new TargetRuntimeConfigurationException(rt, ex);
+ }
+ return d;
+ }
+
+ public List<IRuntimeExtensionDescriptor> getRuntimeExtensionDescriptors(String name) {
+ List<IRuntimeExtensionDescriptor> result = new ArrayList<IRuntimeExtensionDescriptor>();
+ try {
+ Class c = getClassForExtensionName(name);
+ Method m = TargetRuntime.class.getMethod("get"+c.getSimpleName()+"s"); //$NON-NLS-1$ //$NON-NLS-2$
+ result = (List<IRuntimeExtensionDescriptor>) m.invoke(this);
+ }
+ catch (Exception ex) {
+ throw new TargetRuntimeConfigurationException(this, ex);
+ }
+ return result;
+ }
+
+ public static Class getClassForExtensionName(String name) {
+ try {
+ Class clazz = null;
+ for (int i=0; i<extensionDescriptorClasses.length; ++i) {
+ Class c = extensionDescriptorClasses[i];
+ Field field = c.getField("EXTENSION_NAME"); //$NON-NLS-1$
+ String n = (String) field.get(null);
+ if (name.equals(n)) {
+ return c;
+ }
+ }
+ }
+ catch (Exception ex) {
+ throw new TargetRuntimeConfigurationException(null, ex);
+ }
+ return null;
+ }
+
+ public static String getExtensionNameForClass(Class clazz) {
+ try {
+ Field field = clazz.getField("EXTENSION_NAME"); //$NON-NLS-1$
+ return (String) field.get(null);
+ }
+ catch (Exception ex) {
+ throw new TargetRuntimeConfigurationException(null, ex);
+ }
+ }
+
+ /*
+ * List Accessors for all Runtime Extension Descriptors
+ */
+ public List<CustomTaskDescriptor> getCustomTaskDescriptors()
+ {
+ if (customTaskDescriptors==null) {
+ customTaskDescriptors = new ArrayList<CustomTaskDescriptor>();
+ }
+ return customTaskDescriptors;
+ }
+
+ public List<ModelExtensionDescriptor> getModelExtensionDescriptors()
+ {
+ if (modelExtensionDescriptors==null) {
+ modelExtensionDescriptors = new ArrayList<ModelExtensionDescriptor>();
+ }
+ return modelExtensionDescriptors;
+ }
+
+ public List<ModelExtensionDescriptor> getAllModelExtensionDescriptors()
+ {
+ List<ModelExtensionDescriptor> list = new ArrayList<ModelExtensionDescriptor>();
+ list.addAll(getCustomTaskDescriptors());
+ list.addAll(getModelExtensionDescriptors());
+ return list;
+ }
+
+ public ModelExtensionDescriptor getModelExtensionDescriptor(EObject object) {
+ EClass eClass = (EClass) ((object instanceof EClass) ? object : object.eClass());
+
+ for (ModelExtensionDescriptor md : getModelExtensionDescriptors()) {
+ String type = eClass.getName();
+ if (md.getType().equals(type))
+ return md;
+ for (EClass ec : eClass.getESuperTypes()) {
+ type = ec.getName();
+ if (md.getType().equals(type))
+ return md;
+ ModelExtensionDescriptor md2 = getModelExtensionDescriptor(ec);
+ if (md2!=null)
+ return md2;
+ }
+ }
+ return null;
+ }
+
+ public List<PropertyExtensionDescriptor> getPropertyExtensionDescriptors()
+ {
+ if (propertyExtensionDescriptors==null) {
+ propertyExtensionDescriptors = new ArrayList<PropertyExtensionDescriptor>();
+ }
+ return propertyExtensionDescriptors;
+ }
+
+ public List<FeatureContainerDescriptor> getFeatureContainerDescriptors()
+ {
+ if (featureContainerDescriptors==null) {
+ featureContainerDescriptors = new ArrayList<FeatureContainerDescriptor>();
+ }
+ return featureContainerDescriptors;
+ }
+
+ public List<ModelEnablementDescriptor> getModelEnablementDescriptors()
+ {
+ if (modelEnablementDescriptors==null) {
+ modelEnablementDescriptors = new ArrayList<ModelEnablementDescriptor>();
+ }
+ return modelEnablementDescriptors;
+ }
+
+ public List<ToolPaletteDescriptor> getToolPaletteDescriptors()
+ {
+ if (toolPaletteDescriptors==null) {
+ toolPaletteDescriptors = new ArrayList<ToolPaletteDescriptor>();
+ }
+ return toolPaletteDescriptors;
+ }
+
+ public List<ShapeStyle> getShapeStyles() {
+ if (shapeStyles==null) {
+ shapeStyles = new ArrayList<ShapeStyle>();
+ }
+ return shapeStyles;
+ }
+
+ public List<PropertyTabDescriptor> getPropertyTabDescriptors() {
+ if (propertyTabDescriptors==null)
+ propertyTabDescriptors = new ArrayList<PropertyTabDescriptor>();
+ return propertyTabDescriptors;
+ }
+
+ public List<ModelDescriptor> getModelDescriptors() {
+ if (modelDescriptors==null)
+ modelDescriptors = new ArrayList<ModelDescriptor>();
+ return modelDescriptors;
+ }
+
+ public List<DataTypeDescriptor> getDataTypeDescriptors() {
+ if (dataTypeDescriptors==null)
+ dataTypeDescriptors = new ArrayList<DataTypeDescriptor>();
+ return dataTypeDescriptors;
+ }
+
+ public List<TypeLanguageDescriptor> getTypeLanguageDescriptors() {
+ if (typeLanguageDescriptors==null)
+ typeLanguageDescriptors = new ArrayList<TypeLanguageDescriptor>();
+ return typeLanguageDescriptors;
+ }
+
+ public List<ExpressionLanguageDescriptor> getExpressionLanguageDescriptors() {
+ if (expressionLanguageDescriptors==null)
+ expressionLanguageDescriptors = new ArrayList<ExpressionLanguageDescriptor>();
+ return expressionLanguageDescriptors;
+ }
+
+ public List<ServiceImplementationDescriptor> getServiceImplementationDescriptors() {
+ if (serviceImplementationDescriptors==null)
+ serviceImplementationDescriptors = new ArrayList<ServiceImplementationDescriptor>();
+ return serviceImplementationDescriptors;
+ }
+
+ public static class ConfigurationElementSorter {
+ public static void sort(IConfigurationElement[] elements) {
+ Arrays.sort(elements, new Comparator<IConfigurationElement>() {
+ @Override
+ public int compare(IConfigurationElement e0, IConfigurationElement e1) {
+ return rank(e1) - rank(e0);
+ }
+
+ int rank(IConfigurationElement e) {
+ int rank = 0;
+ try {
+ String name = e.getName();
+ Class clazz = null;
+ for (int i=0; i<extensionDescriptorClasses.length; ++i) {
+ Class c = extensionDescriptorClasses[i];
+ Field field = c.getField("EXTENSION_NAME"); //$NON-NLS-1$
+ String n = (String) field.get(null);
+ if (name.equals(n)) {
+ rank = extensionDescriptorClasses.length - i;
+ clazz = c;
+ break;
+ }
+ }
+ rank *= 2;
+ String id = getRuntimeId(e);
+ if (DEFAULT_RUNTIME_ID.equals(id))
+ rank += 1;
+ }
+ catch (Exception ex) {
+ throw new TargetRuntimeConfigurationException(null, ex);
+ }
+ return rank;
+ }
+ });
+ }
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntimeConfigurationException.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntimeConfigurationException.java
new file mode 100644
index 00000000..05daea66
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TargetRuntimeConfigurationException.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+/**
+ *
+ */
+@SuppressWarnings("serial")
+public class TargetRuntimeConfigurationException extends IllegalArgumentException {
+
+ Throwable cause;
+ TargetRuntime targetRuntime;
+
+ /**
+ * @param e
+ */
+ public TargetRuntimeConfigurationException(TargetRuntime targetRuntime, Exception cause) {
+ this.targetRuntime = targetRuntime;
+ this.cause = cause;
+ }
+
+ @Override
+ public String getMessage() {
+ if (targetRuntime==null) {
+ if (cause instanceof TargetRuntimeConfigurationException) {
+ String msg = ((TargetRuntimeConfigurationException)cause).getMessage();
+ if (!msg.contains("Unknown")) //$NON-NLS-1$
+ return msg;
+ }
+ }
+ return Messages.TargetRuntimeConfigurationException_Config_Error+
+ (targetRuntime==null ? "Unknown" :targetRuntime.getName()); //$NON-NLS-1$
+ }
+
+ @Override
+ public synchronized Throwable getCause() {
+ if (cause instanceof TargetRuntimeConfigurationException)
+ return ((TargetRuntimeConfigurationException)cause).getCause();
+ return cause;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ToolPaletteDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ToolPaletteDescriptor.java
index 02da081a..a0142535 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ToolPaletteDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/ToolPaletteDescriptor.java
@@ -17,7 +17,20 @@ import java.util.Stack;
import org.eclipse.core.runtime.IConfigurationElement;
-public class ToolPaletteDescriptor extends BaseRuntimeDescriptor {
+/**
+ * Target Runtime Extension Descriptor class for Graphical Tool Palette
+ * definitions. A Tool Palette must reference a
+ * {@link ModelEnablementDescriptor} class instance by its ID. The Model
+ * Enablement set is used to filter the BPMN2 elements that are available on
+ * this Tool Palette.
+ *
+ * Instances of this class correspond to <toolPalette> extension elements in the
+ * extension's plugin.xml See the description of the "toolPalette" element in
+ * the org.eclipse.bpmn2.modeler.runtime extension point schema.
+ */
+public class ToolPaletteDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "toolPalette"; //$NON-NLS-1$
public final static String TOOLPART_ID = "ToolPartID"; //$NON-NLS-1$
public final static String TOOLPART_OPTIONAL = "ToolPartOptional"; //$NON-NLS-1$
@@ -134,47 +147,35 @@ public class ToolPaletteDescriptor extends BaseRuntimeDescriptor {
}
public ToolPart parseToolObjectString(String object) {
- ToolPart parentToolPart = null;
+ List<ToolPart> currentParts = toolParts;
ToolPart toolPart = null;
String toolPartName = ""; //$NON-NLS-1$
- Stack<ToolPart> toolPartStack = new Stack<ToolPart>();
+ Stack<List<ToolPart>> stack = new Stack<List<ToolPart>>();
ToolPart result = null;
char chars[] = object.toCharArray();
for (int i=0; i<chars.length; ++i) {
char c = chars[i];
if (c=='+') {
+ stack.push(currentParts);
if (!"".equals(toolPartName)) { //$NON-NLS-1$
toolPart = new ToolPart(this, toolPartName);
- if (parentToolPart==null) {
- toolParts.add(toolPart);
- }
- else {
- parentToolPart.children.add(toolPart);
- }
- parentToolPart = toolPart;
- if (result==null)
- result = toolPart;
+ currentParts.add(toolPart);
}
- else if (parentToolPart==null)
- parentToolPart = toolPart;
- toolPartStack.push(parentToolPart);
+ currentParts = toolPart.children;
+ if (result==null)
+ result = toolPart;
toolPartName = ""; //$NON-NLS-1$
}
else if (c=='-') {
if (!"".equals(toolPartName)) //$NON-NLS-1$
- parentToolPart.children.add( new ToolPart(this, toolPartName) );
- parentToolPart = toolPartStack.pop();
+ currentParts.add( new ToolPart(this, toolPartName) );
+ currentParts = stack.pop();
toolPartName = ""; //$NON-NLS-1$
}
else if (c==',') {
if (!"".equals(toolPartName)) { //$NON-NLS-1$
toolPart = new ToolPart(this, toolPartName);
- if (parentToolPart==null) {
- toolParts.add(toolPart);
- }
- else {
- parentToolPart.children.add(toolPart);
- }
+ currentParts.add(toolPart);
if (result==null)
result = toolPart;
toolPartName = ""; //$NON-NLS-1$
@@ -182,12 +183,7 @@ public class ToolPaletteDescriptor extends BaseRuntimeDescriptor {
}
else if (c=='[') {
toolPart = new ToolPart(this, toolPartName);
- if (parentToolPart==null) {
- toolParts.add(toolPart);
- }
- else {
- parentToolPart.children.add(toolPart);
- }
+ currentParts.add(toolPart);
if (result==null)
result = toolPart;
toolPartName = ""; //$NON-NLS-1$
@@ -236,12 +232,7 @@ public class ToolPaletteDescriptor extends BaseRuntimeDescriptor {
if (i==chars.length-1 && !toolPartName.isEmpty()) {
toolPart = new ToolPart(this, toolPartName);
- if (parentToolPart==null) {
- toolParts.add(toolPart);
- }
- else {
- parentToolPart.children.add(toolPart);
- }
+ currentParts.add(toolPart);
if (result==null)
result = toolPart;
}
@@ -334,20 +325,19 @@ public class ToolPaletteDescriptor extends BaseRuntimeDescriptor {
}
}
- String id; // unique ID
- String type; // the diagram type for which this toolPalette is to be used
- String profile; // the model enablement profile for which this toolPalette is to be used
- // the list of categories in the toolPalette
+ /** The model enablement profile for which this toolPalette is to be used **/
+ String profileId;
+ /** The list of categories in the toolPalette **/
List<CategoryDescriptor> categories = new ArrayList<CategoryDescriptor>();
+
public ToolPaletteDescriptor() {
super();
}
-
- protected void create(IConfigurationElement e) {
- id = e.getAttribute("id"); //$NON-NLS-1$
- type = e.getAttribute("type"); //$NON-NLS-1$
- profile = e.getAttribute("profile"); //$NON-NLS-1$
+
+ public ToolPaletteDescriptor(IConfigurationElement e) {
+ super(e);
+ profileId = e.getAttribute("profile"); //$NON-NLS-1$
for (IConfigurationElement c : e.getChildren()) {
if (c.getName().equals("category")) { //$NON-NLS-1$
String cid = c.getAttribute("id"); //$NON-NLS-1$
@@ -400,6 +390,10 @@ public class ToolPaletteDescriptor extends BaseRuntimeDescriptor {
}
}
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
protected CategoryDescriptor addCategory(String id, String name, String description, String icon) {
CategoryDescriptor category = null;
for (CategoryDescriptor cd : categories) {
@@ -459,18 +453,14 @@ public class ToolPaletteDescriptor extends BaseRuntimeDescriptor {
return id;
}
- public List<String> getProfiles() {
- String a[] = profile.split(","); //$NON-NLS-1$
+ public List<String> getProfileIds() {
+ String a[] = profileId.split(" "); //$NON-NLS-1$
List<String> profiles = new ArrayList<String>();
for (String p : a) {
profiles.add(p.trim());
}
return profiles;
}
-
- public String getType() {
- return type;
- }
public List<CategoryDescriptor> getCategories() {
return categories;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TypeLanguageDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TypeLanguageDescriptor.java
new file mode 100644
index 00000000..f37c0f26
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/TypeLanguageDescriptor.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.DocumentRoot;
+import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ *
+ */
+public class TypeLanguageDescriptor extends BaseRuntimeExtensionDescriptor {
+
+ public final static String EXTENSION_NAME = "typeLanguage"; //$NON-NLS-1$
+
+ protected String name;
+ protected String uri;
+ protected String prefix;
+ protected List<Type> types = new ArrayList<Type>();
+
+ public class Type {
+ TypeLanguageDescriptor typeLanguage;
+ String name;
+ String qname;
+
+ public Type(TypeLanguageDescriptor typeLanguage, String name, String qname) {
+ this.typeLanguage = typeLanguage;
+ this.name = name;
+ this.qname = qname;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getQName(Resource resource) {
+ if (qname==null) {
+ // create a QName string by prefixing the primitive type name
+ // with the namespace prefix for the typeLanguage specified in
+ // the given Definitions object.
+ String prefix = NamespaceUtil.getPrefixForNamespace(resource, typeLanguage.getUri());
+ if (prefix!=null && !prefix.isEmpty())
+ return prefix + ":" + name; //$NON-NLS-1$
+ if (typeLanguage.prefix!=null)
+ return typeLanguage.prefix + ":" + name; //$NON-NLS-1$
+ return name;
+ }
+ return qname;
+ }
+
+ public TypeLanguageDescriptor getTypeLanguage() {
+ return typeLanguage;
+ }
+ }
+
+ public TypeLanguageDescriptor(IConfigurationElement e) {
+ super(e);
+ name = e.getAttribute("name"); //$NON-NLS-1$
+ uri = e.getAttribute("uri"); //$NON-NLS-1$
+ prefix = e.getAttribute("prefix"); //$NON-NLS-1$
+ for (IConfigurationElement c : e.getChildren()) {
+ if ("type".equals(c.getName())) { //$NON-NLS-1$
+ Type pt = new Type(this,
+ c.getAttribute("name"), //$NON-NLS-1$
+ c.getAttribute("qname") //$NON-NLS-1$
+ );
+ types.add(pt);
+ }
+ }
+ }
+
+ @Override
+ public void setRuntime(TargetRuntime targetRuntime) {
+ super.setRuntime(targetRuntime);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ types.clear();
+ }
+
+ @Override
+ public String getExtensionName() {
+ return EXTENSION_NAME;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public List<Type> getTypes() {
+ if (types.isEmpty() && !TargetRuntime.DEFAULT_RUNTIME_ID.equals(getId())) {
+ for (TypeLanguageDescriptor d : TargetRuntime.getDefaultRuntime().getTypeLanguageDescriptors()) {
+ if (d.name.equals(name)) {
+ // Return primitive types from the default runtime if we don't define any
+ return d.getTypes();
+ }
+ }
+ }
+ return types;
+ }
+
+ public String getPrefix() {
+ return prefix;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/XMLConfigElement.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/XMLConfigElement.java
new file mode 100644
index 00000000..c6269828
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/XMLConfigElement.java
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.runtime;
+
+import java.lang.reflect.Constructor;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.DefaultConversionDelegate;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.launching.JavaRuntime;
+
+public class XMLConfigElement implements IConfigurationElement {
+
+ protected Object parent = null;
+ protected String name = null;
+ protected String value = null;
+ protected boolean valid = true;
+ protected Hashtable<String, String> attributes = new Hashtable<String, String>();
+ protected List<XMLConfigElement> children = new ArrayList<XMLConfigElement>();
+
+ public XMLConfigElement(Object parent) {
+ this(parent,""); //$NON-NLS-1$
+ }
+
+ public XMLConfigElement(Object parent, String name) {
+ this.parent = parent;
+ if (parent instanceof XMLConfigElement) {
+ ((XMLConfigElement)parent).children.add(this);
+ }
+ this.name = name;
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked", "resource" })
+ @Override
+ public Object createExecutableExtension(String propertyName) throws CoreException {
+ try {
+ String className = attributes.get(propertyName);
+ IProject project = getProject();
+ IJavaProject javaProject = JavaCore.create(project);
+ String[] classPathEntries = JavaRuntime.computeDefaultRuntimeClassPath(javaProject);
+ List<URL> urlList = new ArrayList<URL>();
+ for (int i = 0; i < classPathEntries.length; i++) {
+ String entry = classPathEntries[i];
+ IPath path = new Path(entry);
+ URL url = path.toFile().toURI().toURL();
+ urlList.add(url);
+ }
+ ClassLoader parentClassLoader = javaProject.getClass().getClassLoader();
+ URL[] urls = (URL[]) urlList.toArray(new URL[urlList.size()]);
+ URLClassLoader classLoader = new URLClassLoader(urls, parentClassLoader);
+ ClassLoader cl = classLoader.getParent();
+ Class clazz = classLoader.loadClass(className);
+ return clazz.getConstructor().newInstance();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, ex.getMessage()));
+ }
+ }
+
+ private IProject getProject() {
+ if (parent instanceof IProject)
+ return (IProject) parent;
+ if (parent instanceof XMLConfigElement)
+ return ((XMLConfigElement)parent).getProject();
+ return null;
+ }
+
+ public void setAttribute(String name, String value) {
+ attributes.put(name, value);
+ }
+
+ @Override
+ public String getAttribute(String name) throws InvalidRegistryObjectException {
+ return attributes.get(name);
+ }
+
+ @Override
+ public String getAttribute(String attrName, String locale) throws InvalidRegistryObjectException {
+ return getAttribute(attrName);
+ }
+
+ @Override
+ public String getAttributeAsIs(String name) throws InvalidRegistryObjectException {
+ return getAttribute(name);
+ }
+
+ @Override
+ public String[] getAttributeNames() throws InvalidRegistryObjectException {
+ return attributes.keySet().toArray( new String[attributes.keySet().size()] );
+ }
+
+ @Override
+ public IConfigurationElement[] getChildren() throws InvalidRegistryObjectException {
+ return children.toArray( new XMLConfigElement[children.size()] );
+ }
+
+ @Override
+ public IConfigurationElement[] getChildren(String name) throws InvalidRegistryObjectException {
+ List<XMLConfigElement> result = new ArrayList<XMLConfigElement>();
+ for ( XMLConfigElement e : children) {
+ if (name.equals(e.getName()))
+ result.add(e);
+ }
+ return result.toArray( new XMLConfigElement[result.size()] );
+ }
+
+ @Override
+ public IExtension getDeclaringExtension() throws InvalidRegistryObjectException {
+ XMLConfigElement root = this;
+ while (root.getParent() instanceof XMLConfigElement)
+ root = (XMLConfigElement) root.getParent();
+ return new XMLExtension(root);
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String getName() throws InvalidRegistryObjectException {
+ return name;
+ }
+
+ @Override
+ public Object getParent() throws InvalidRegistryObjectException {
+ return parent;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String getValue() throws InvalidRegistryObjectException {
+ return value;
+ }
+
+ @Override
+ public String getValue(String locale) throws InvalidRegistryObjectException {
+ return getValue();
+ }
+
+ @Override
+ public String getValueAsIs() throws InvalidRegistryObjectException {
+ return getValue();
+ }
+
+ @Override
+ public String getNamespace() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getNamespaceIdentifier() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public IContributor getContributor() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isValid() {
+ return valid;
+ }
+
+ public static class XMLExtension implements IExtension {
+
+ XMLConfigElement root;
+
+ public XMLExtension(XMLConfigElement root) {
+ this.root = root;
+ }
+
+ @Override
+ public IConfigurationElement[] getConfigurationElements() throws InvalidRegistryObjectException {
+ return root.getChildren();
+ }
+
+ @Override
+ public String getNamespace() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getNamespaceIdentifier() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public IContributor getContributor() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getExtensionPointUniqueIdentifier() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getLabel() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getLabel(String locale) throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getSimpleIdentifier() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getUniqueIdentifier() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isValid() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public IPluginDescriptor getDeclaringPluginDescriptor() throws InvalidRegistryObjectException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties
new file mode 100644
index 00000000..8a0b9dbd
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/runtime/messages.properties
@@ -0,0 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+ModelExtensionDescriptor_Create=New {0}
+TargetRuntime_Config_Error=Error in Configuration File
+TargetRuntimeConfigurationException_Config_Error=Configuration Error for Target Runtime
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/AnchorUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/AnchorUtil.java
index c4b5ade5..6a92ede2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/AnchorUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/AnchorUtil.java
@@ -20,33 +20,19 @@ import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.Group;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.di.BPMNEdge;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.features.AbstractConnectionRouter;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper.PositionOnLine;
-import org.eclipse.dd.di.DiagramElement;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.datatypes.ILocation;
-import org.eclipse.graphiti.features.IAddBendpointFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.ILayoutFeature;
-import org.eclipse.graphiti.features.IRemoveBendpointFeature;
-import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.IAddBendpointContext;
-import org.eclipse.graphiti.features.context.IRemoveBendpointContext;
-import org.eclipse.graphiti.features.context.impl.AddBendpointContext;
-import org.eclipse.graphiti.features.context.impl.LayoutContext;
-import org.eclipse.graphiti.features.context.impl.RemoveBendpointContext;
-import org.eclipse.graphiti.features.context.impl.RemoveContext;
-import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
@@ -67,15 +53,6 @@ import org.eclipse.graphiti.services.IPeService;
public class AnchorUtil {
- public static final String BOUNDARY_FIXPOINT_ANCHOR = "boundary.fixpoint.anchor"; //$NON-NLS-1$
- public static final String BOUNDARY_ADHOC_ANCHOR = "boundary.adhoc.anchor"; //$NON-NLS-1$
- public static final String CONNECTION_SOURCE_LOCATION = "connection.source.location"; //$NON-NLS-1$
- public static final String CONNECTION_TARGET_LOCATION = "connection.target.location"; //$NON-NLS-1$
- public static final String CONNECTION_CREATED = "connection.created"; //$NON-NLS-1$
-
- // values for connection points
- public static final String CONNECTION_POINT = "connection.point"; //$NON-NLS-1$
- public static final String CONNECTION_POINT_KEY = "connection.point.key"; //$NON-NLS-1$
public static final int CONNECTION_POINT_SIZE = 4;
private static final IPeService peService = Graphiti.getPeService();
@@ -134,11 +111,8 @@ public class AnchorUtil {
}
public static FixPointAnchor createBoundaryAnchor(AnchorContainer ac, AnchorLocation loc, int x, int y) {
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
-
FixPointAnchor anchor = peService.createFixPointAnchor(ac);
- peService.setPropertyValue(anchor, BOUNDARY_FIXPOINT_ANCHOR, loc.getKey());
+ peService.setPropertyValue(anchor, GraphitiConstants.BOUNDARY_FIXPOINT_ANCHOR, loc.getKey());
anchor.setLocation(gaService.createPoint(x, y));
gaService.createInvisibleRectangle(anchor);
@@ -146,7 +120,7 @@ public class AnchorUtil {
}
public static AnchorLocation getBoundaryAnchorLocation(Anchor anchor) {
- String property = Graphiti.getPeService().getPropertyValue(anchor, BOUNDARY_FIXPOINT_ANCHOR);
+ String property = peService.getPropertyValue(anchor, GraphitiConstants.BOUNDARY_FIXPOINT_ANCHOR);
if (property != null && anchor instanceof FixPointAnchor) {
return AnchorLocation.getLocation(property);
}
@@ -158,11 +132,8 @@ public class AnchorUtil {
}
public static FixPointAnchor createAdHocAnchor(AnchorContainer ac, Point p) {
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
-
FixPointAnchor anchor = peService.createFixPointAnchor(ac);
- peService.setPropertyValue(anchor, BOUNDARY_ADHOC_ANCHOR, "true"); //$NON-NLS-1$
+ peService.setPropertyValue(anchor, GraphitiConstants.BOUNDARY_ADHOC_ANCHOR, "true"); //$NON-NLS-1$
anchor.setLocation(p);
gaService.createInvisibleRectangle(anchor);
@@ -184,10 +155,10 @@ public class AnchorUtil {
public static Map<AnchorLocation, BoundaryAnchor> getBoundaryAnchors(AnchorContainer ac) {
Map<AnchorLocation, BoundaryAnchor> map = new HashMap<AnchorLocation, BoundaryAnchor>(4);
- if (ac instanceof FreeFormConnection) {
+ if (ac instanceof Connection) {
// the anchor container is a Connection which does not have any predefined BoundaryAnchors
// so we have to synthesize these by looking for connection point shapes owned by the connection
- for (Shape connectionPointShape : getConnectionPoints((FreeFormConnection)ac)) {
+ for (Shape connectionPointShape : getConnectionPoints((Connection)ac)) {
// TODO: if there are multiple connection points, figure out which one to use
return getConnectionBoundaryAnchors(connectionPointShape);
}
@@ -200,7 +171,7 @@ public class AnchorUtil {
Iterator<Anchor> iterator = ac.getAnchors().iterator();
while (iterator.hasNext()) {
Anchor anchor = iterator.next();
- String property = Graphiti.getPeService().getPropertyValue(anchor, BOUNDARY_FIXPOINT_ANCHOR);
+ String property = peService.getPropertyValue(anchor, GraphitiConstants.BOUNDARY_FIXPOINT_ANCHOR);
if (property != null && anchor instanceof FixPointAnchor) {
BoundaryAnchor a = new BoundaryAnchor();
a.anchor = (FixPointAnchor) anchor;
@@ -256,8 +227,8 @@ public class AnchorUtil {
}
// Get source and target locations at the time the connection was created.
- Point targetLoc = stringToPoint(peService.getPropertyValue(connection, CONNECTION_TARGET_LOCATION));
- Point sourceLoc = stringToPoint(peService.getPropertyValue(connection, CONNECTION_SOURCE_LOCATION));
+ Point targetLoc = stringToPoint(peService.getPropertyValue(connection, GraphitiConstants.CONNECTION_TARGET_LOCATION));
+ Point sourceLoc = stringToPoint(peService.getPropertyValue(connection, GraphitiConstants.CONNECTION_SOURCE_LOCATION));
if (targetLoc!=null) {
// These are relative to the source and target shapes, so we
// need to translate them to diagram-relative coordinates.
@@ -280,7 +251,7 @@ public class AnchorUtil {
// if the calculated boundary of the source and target figures are above/below or
// left/right of each other, align the source location so that the connection line
// is vertical/horizontal
- if (peService.getPropertyValue(connection, CONNECTION_CREATED)!=null && sourceLoc!=null) {
+ if (peService.getPropertyValue(connection, GraphitiConstants.CONNECTION_CREATED)!=null && sourceLoc!=null) {
FixPointAnchor sourceAnchor = (FixPointAnchor) newStartAnchor;
if ((newEndAnchor == targetTop.anchor && sourceAnchor == sourceBottom.anchor) ||
(newEndAnchor == targetBottom.anchor && sourceAnchor == sourceTop.anchor)) {
@@ -292,9 +263,9 @@ public class AnchorUtil {
// ensure a horizontal line
sourceLoc.setY(targetLoc.getY());
}
- peService.removeProperty(connection, CONNECTION_CREATED);
+ peService.removeProperty(connection, GraphitiConstants.CONNECTION_CREATED);
}
- peService.setPropertyValue(connection, AnchorUtil.CONNECTION_TARGET_LOCATION,
+ peService.setPropertyValue(connection, GraphitiConstants.CONNECTION_TARGET_LOCATION,
AnchorUtil.pointToString(targetLoc));
newEndAnchor = createAdHocAnchor(target, targetLoc);
@@ -330,7 +301,7 @@ public class AnchorUtil {
newStartAnchor = createAdHocAnchor(source, sourceLoc);
peService.setPropertyValue(connection,
- AnchorUtil.CONNECTION_SOURCE_LOCATION,
+ GraphitiConstants.CONNECTION_SOURCE_LOCATION,
AnchorUtil.pointToString(sourceLoc));
}
else
@@ -371,7 +342,7 @@ public class AnchorUtil {
// If the shape is a BoundaryEvent, only look at the BoundaryAnchors that are outside
// of the parent shape.
String boundaryEventPos = peService.getPropertyValue(
- ac, BoundaryEventPositionHelper.BOUNDARY_EVENT_RELATIVE_POS);
+ ac, GraphitiConstants.BOUNDARY_EVENT_RELATIVE_POS);
if (boundaryEventPos!=null) {
PositionOnLine pol = PositionOnLine.fromString(boundaryEventPos);
switch (pol.getLocationType()) {
@@ -557,28 +528,30 @@ public class AnchorUtil {
// }
public static void deleteEmptyAdHocAnchors(AnchorContainer target) {
- List<Integer> indexes = new ArrayList<Integer>();
-
- for (int i = target.getAnchors().size()-1; i>=0; --i) {
- Anchor a = target.getAnchors().get(i);
- if (!(a instanceof FixPointAnchor)) {
- continue;
+ if (target!=null && !AnchorUtil.isConnectionPoint(target)) {
+ List<Integer> indexes = new ArrayList<Integer>();
+
+ for (int i = target.getAnchors().size()-1; i>=0; --i) {
+ Anchor a = target.getAnchors().get(i);
+ if (!(a instanceof FixPointAnchor)) {
+ continue;
+ }
+
+ if (peService.getProperty(a, GraphitiConstants.BOUNDARY_FIXPOINT_ANCHOR) == null && a.getIncomingConnections().isEmpty()
+ && a.getOutgoingConnections().isEmpty()) {
+ indexes.add(i);
+ }
}
-
- if (peService.getProperty(a, BOUNDARY_FIXPOINT_ANCHOR) == null && a.getIncomingConnections().isEmpty()
- && a.getOutgoingConnections().isEmpty()) {
- indexes.add(i);
+
+ for (int i : indexes) {
+ peService.deletePictogramElement(target.getAnchors().get(i));
}
}
-
- for (int i : indexes) {
- peService.deletePictogramElement(target.getAnchors().get(i));
- }
}
public static boolean isBoundaryAnchor(Anchor anchor) {
if (anchor instanceof FixPointAnchor) {
- if (peService.getProperty(anchor, BOUNDARY_FIXPOINT_ANCHOR) != null)
+ if (peService.getProperty(anchor, GraphitiConstants.BOUNDARY_FIXPOINT_ANCHOR) != null)
return true;
}
return false;
@@ -586,7 +559,7 @@ public class AnchorUtil {
public static boolean isAdHocAnchor(Anchor anchor) {
if (anchor instanceof FixPointAnchor) {
- if (peService.getProperty(anchor, BOUNDARY_ADHOC_ANCHOR) != null)
+ if (peService.getProperty(anchor, GraphitiConstants.BOUNDARY_ADHOC_ANCHOR) != null)
return true;
}
return false;
@@ -634,63 +607,95 @@ public class AnchorUtil {
// Connection points allow creation of anchors on FreeFormConnections
- public static Shape createConnectionPoint(IFeatureProvider fp,
- FreeFormConnection connection, ILocation location) {
-
- Shape connectionPointShape = null;
-
- Point bendPoint = null;
- Diagram diagram = fp.getDiagramTypeProvider().getDiagram();
-
- // TODO: fix this
- for (Point p : connection.getBendpoints()) {
- int px = p.getX();
- int py = p.getY();
- if (GraphicsUtil.isPointNear(p, location, 20)) {
- bendPoint = p;
- location.setX(px);
- location.setY(py);
+ private static class ConnectionPointShapeAdapter extends AdapterImpl {
+ Connection connection;
+ Shape shape;
+ boolean deleting = false;
+ double midpoint = 0.5;
+
+ public static ConnectionPointShapeAdapter adapt(Connection connection, Shape shape) {
+ return new ConnectionPointShapeAdapter(connection, shape);
+ }
+
+ private ConnectionPointShapeAdapter(Connection connection, Shape shape) {
+ this.connection = connection;
+ this.shape = shape;
+ connection.eAdapters().add(this);
+ shape.eAdapters().add(this);
+ shape.getAnchors().get(0).eAdapters().add(this);
+
+ setTarget(connection);
+ int x = shape.getGraphicsAlgorithm().getX();
+ int y = shape.getGraphicsAlgorithm().getY();
+ int dx = Integer.MAX_VALUE;
+ int dy = Integer.MAX_VALUE;
+ for (double d=0; d<=1.0; d += 0.05) {
+ ILocation loc = Graphiti.getPeService().getConnectionMidpoint(connection, d);
+ if (Math.abs(x - loc.getX()) < dx || Math.abs(y - loc.getY()) < dy) {
+ dx = Math.abs(x - loc.getX());
+ dy = Math.abs(y - loc.getY());
+ midpoint = d;
+ }
}
-
- TreeIterator<EObject> iter = diagram.eAllContents();
- while (iter.hasNext()) {
- EObject o = iter.next();
- if (o instanceof ContainerShape) {
- ContainerShape s = (ContainerShape) o;
- if (FeatureSupport.isLabelShape(s))
- continue;
- if (isConnectionPointNear(s, location, 0)) {
- // this is the connection point on the target connection line
- // reuse this connection point if it's "close enough" to
- // target location otherwise create a new connection point
- if (isConnectionPointNear(s, location, 20)) {
- bendPoint = p;
- connectionPointShape = s;
- location.setX(px);
- location.setY(py);
- }
- break;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ // if the connection is no longer connected to this shape
+ // then delete the Connection Point
+ if (!deleting) {
+ Anchor a = shape.getAnchors().get(0);
+ if (notification.getNotifier() == a) {
+ // something changed in the anchor
+ if (a.getIncomingConnections().isEmpty() && a.getOutgoingConnections().isEmpty()) {
+ // the anchor has no connections, so we need to delete it
+ deleting = true;
+ deleteConnectionPoint(shape);
+ return;
}
}
+ else
+ {
+ ILocation loc = Graphiti.getPeService().getConnectionMidpoint(connection, midpoint);
+ Graphiti.getGaService().setLocation(shape.getGraphicsAlgorithm(), loc.getX(), loc.getY());
+ }
}
- if (bendPoint!=null)
- break;
}
-
- if (connectionPointShape == null) {
- connectionPointShape = createConnectionPoint(location, diagram);
- fp.link(connectionPointShape, connection);
- connection.getLink().getBusinessObjects().add(connectionPointShape);
-
- if (bendPoint == null) {
- bendPoint = createService.createPoint(location.getX(),
- location.getY());
-
- IAddBendpointContext addBpContext = new AddBendpointContext(connection, bendPoint.getX(), bendPoint.getY(), 0);
- IAddBendpointFeature addBpFeature = fp.getAddBendpointFeature(addBpContext);
- addBpFeature.addBendpoint(addBpContext);
+ }
+
+ public static void deleteConnectionPoint(AnchorContainer shape) {
+ if (isConnectionPoint(shape)) {
+ Connection connection = getConnectionPointOwner(shape);
+ if (connection!=null) {
+ for (Adapter a : shape.eAdapters()) {
+ if (a instanceof ConnectionPointShapeAdapter) {
+ connection.eAdapters().remove(a);
+ }
+ }
+ connection.getLink().getBusinessObjects().remove(shape);
}
+ Graphiti.getPeService().deletePictogramElement(shape);
}
+ }
+
+ public static Shape createConnectionPoint(IFeatureProvider fp, Connection connection, ILocation location) {
+
+ Shape connectionPointShape = null;
+
+ Diagram diagram = fp.getDiagramTypeProvider().getDiagram();
+ connectionPointShape = createConnectionPoint(location, diagram);
+ fp.link(connectionPointShape, connection);
+ connection.getLink().getBusinessObjects().add(connectionPointShape);
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(connection);
+ BPMNEdge bpmnEdge = DIUtils.findBPMNEdge(be);
+ if (bpmnEdge!=null)
+ fp.link(connectionPointShape, bpmnEdge);
+
+ ConnectionPointShapeAdapter.adapt(connection, connectionPointShape);
+
return connectionPointShape;
}
@@ -698,7 +703,7 @@ public class AnchorUtil {
// create a circle for the connection point shape
Shape connectionPointShape = createService.createShape(cs, true);
- peService.setPropertyValue(connectionPointShape, CONNECTION_POINT_KEY, CONNECTION_POINT);
+ peService.setPropertyValue(connectionPointShape, GraphitiConstants.CONNECTION_POINT_KEY, GraphitiConstants.CONNECTION_POINT);
Ellipse ellipse = createService.createEllipse(connectionPointShape);
int x = 0, y = 0;
if (location != null) {
@@ -708,6 +713,8 @@ public class AnchorUtil {
ellipse.setFilled(true);
Diagram diagram = peService.getDiagramForPictogramElement(connectionPointShape);
ellipse.setForeground(Graphiti.getGaService().manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
+ ellipse.setWidth(CONNECTION_POINT_SIZE);
+ ellipse.setHeight(CONNECTION_POINT_SIZE);
// create the anchor
getConnectionPointAnchor(connectionPointShape);
@@ -717,40 +724,11 @@ public class AnchorUtil {
return connectionPointShape;
}
-
- public static boolean deleteConnectionPointIfPossible(IFeatureProvider fp,Shape connectionPointShape) {
- if (isConnectionPoint(connectionPointShape)) {
- Anchor anchor = getConnectionPointAnchor(connectionPointShape);
- List<Connection> allConnections = Graphiti.getPeService().getAllConnections(anchor);
- if (allConnections.size()==0) {
- // remove the bendpoint from target connection if there are no other connections going to it
- FreeFormConnection oldTargetConnection = (FreeFormConnection) connectionPointShape.getLink().getBusinessObjects().get(0);
-
- Point bp = null;
- for (Point p : oldTargetConnection.getBendpoints()) {
- if (AnchorUtil.isConnectionPointNear(connectionPointShape, p, 0)) {
- bp = p;
- break;
- }
- }
-
- if (bp!=null) {
- IRemoveBendpointContext removeBpContext = new RemoveBendpointContext(oldTargetConnection, bp);
- IRemoveBendpointFeature removeBpFeature = fp.getRemoveBendpointFeature(removeBpContext);
- removeBpFeature.removeBendpoint(removeBpContext);
- }
-
- RemoveContext ctx = new RemoveContext(connectionPointShape);
- fp.getRemoveFeature(ctx).remove(ctx);
- }
- }
- return false;
- }
public static FixPointAnchor getConnectionPointAnchor(Shape connectionPointShape) {
if (connectionPointShape.getAnchors().size()==0) {
FixPointAnchor anchor = createService.createFixPointAnchor(connectionPointShape);
- peService.setPropertyValue(anchor, CONNECTION_POINT_KEY, CONNECTION_POINT);
+ peService.setPropertyValue(anchor, GraphitiConstants.CONNECTION_POINT_KEY, GraphitiConstants.CONNECTION_POINT);
// if the anchor doesn't have a GraphicsAlgorithm, GEF will throw a fit
// so create an invisible rectangle for it
@@ -760,7 +738,7 @@ public class AnchorUtil {
}
public static ILocation getConnectionPointLocation(Shape connectionPointShape) {
- ILocation location = GraphicsUtil.peService.getLocationRelativeToDiagram(connectionPointShape);
+ ILocation location = ShapeDecoratorUtil.peService.getLocationRelativeToDiagram(connectionPointShape);
int x = location.getX() + CONNECTION_POINT_SIZE / 2;
int y = location.getY() + CONNECTION_POINT_SIZE / 2;
location.setX(x);
@@ -791,62 +769,32 @@ public class AnchorUtil {
CONNECTION_POINT_SIZE / 2,CONNECTION_POINT_SIZE / 2);
}
- public static List<Shape> getConnectionPoints(FreeFormConnection connection) {
+ public static List<Shape> getConnectionPoints(Connection connection) {
ArrayList<Shape> list = new ArrayList<Shape>();
-
if (connection.getLink()!=null) {
for (Object o : connection.getLink().getBusinessObjects()) {
- if ( o instanceof AnchorContainer ) {
- AnchorContainer c = (AnchorContainer)o;
- if (AnchorUtil.isConnectionPoint(c)) {
- list.add((Shape)c);
- }
+ if (o instanceof Shape && isConnectionPoint((Shape)o)) {
+ list.add((Shape)o);
}
}
}
return list;
}
-
- public static Shape getConnectionPointAt(FreeFormConnection connection, Point point) {
- for (Shape connectionPointShape : getConnectionPoints(connection)) {
- if (AnchorUtil.isConnectionPointNear(connectionPointShape, point, 0)) {
- return connectionPointShape;
- }
- }
- return null;
- }
-
public static boolean isConnectionPoint(PictogramElement pe) {
- String value = Graphiti.getPeService().getPropertyValue(pe, CONNECTION_POINT_KEY);
- return CONNECTION_POINT.equals(value);
- }
-
- public static boolean isConnectionPointNear(PictogramElement pe, ILocation loc, int dist) {
- if (isConnectionPoint(pe)) {
- int x = pe.getGraphicsAlgorithm().getX() + CONNECTION_POINT_SIZE / 2;
- int y = pe.getGraphicsAlgorithm().getY() + CONNECTION_POINT_SIZE / 2;
- int lx = loc.getX();
- int ly = loc.getY();
- return lx-dist <= x && x <= lx+dist && ly-dist <= y && y <= ly+dist;
- }
- return false;
- }
-
- public static boolean isConnectionPointNear(PictogramElement pe, Point loc, int dist) {
- if (isConnectionPoint(pe)) {
- int x = pe.getGraphicsAlgorithm().getX() + CONNECTION_POINT_SIZE / 2;
- int y = pe.getGraphicsAlgorithm().getY() + CONNECTION_POINT_SIZE / 2;
- int lx = loc.getX();
- int ly = loc.getY();
- return lx-dist <= x && x <= lx+dist && ly-dist <= y && y <= ly+dist;
+ if (pe!=null) {
+ String value =peService.getPropertyValue(pe, GraphitiConstants.CONNECTION_POINT_KEY);
+ return GraphitiConstants.CONNECTION_POINT.equals(value);
}
return false;
}
- public static FreeFormConnection getConnectionPointOwner(Shape connectionPointShape) {
- if (isConnectionPoint(connectionPointShape)) {
- return (FreeFormConnection)connectionPointShape.getLink().getBusinessObjects().get(0);
+ public static Connection getConnectionPointOwner(AnchorContainer connectionPointShape) {
+ if (isConnectionPoint(connectionPointShape) && connectionPointShape.getLink()!=null) {
+ for (Object o : connectionPointShape.getLink().getBusinessObjects()) {
+ if (o instanceof Connection)
+ return (Connection) o;
+ }
}
return null;
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java
index 1854d97b..dfe46e17 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java
@@ -14,6 +14,7 @@ package org.eclipse.bpmn2.modeler.core.utils;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.dd.dc.Bounds;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.context.ICreateContext;
@@ -28,8 +29,6 @@ import org.eclipse.graphiti.services.IPeService;
public class BoundaryEventPositionHelper {
- public static final String BOUNDARY_EVENT_RELATIVE_POS = "boundary.event.relative.pos"; //$NON-NLS-1$
-
public static class PositionOnLine {
public enum LineType {
@@ -244,12 +243,12 @@ public class BoundaryEventPositionHelper {
public static void assignPositionOnLineProperty(PropertyContainer propertyContainer, PositionOnLine pos) {
IPeService peService = Graphiti.getPeService();
- peService.setPropertyValue(propertyContainer, BOUNDARY_EVENT_RELATIVE_POS, pos.toString());
+ peService.setPropertyValue(propertyContainer, GraphitiConstants.BOUNDARY_EVENT_RELATIVE_POS, pos.toString());
}
public static PositionOnLine getPositionOnLineProperty(PropertyContainer propertyContainer) {
IPeService peService = Graphiti.getPeService();
- String value = peService.getPropertyValue(propertyContainer, BOUNDARY_EVENT_RELATIVE_POS);
+ String value = peService.getPropertyValue(propertyContainer, GraphitiConstants.BOUNDARY_EVENT_RELATIVE_POS);
return PositionOnLine.fromString(value);
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BusinessObjectUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BusinessObjectUtil.java
index f65d3b14..6dd0dcd5 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BusinessObjectUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BusinessObjectUtil.java
@@ -14,6 +14,7 @@ package org.eclipse.bpmn2.modeler.core.utils;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.bpmn2.Association;
@@ -30,6 +31,10 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.editparts.AbstractTreeEditPart;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
@@ -103,6 +108,32 @@ public class BusinessObjectUtil {
return null;
}
+ /**
+ * Returns a list of {@link PictogramElement}s which contains an element to the
+ * assigned businessObjectClazz, i.e. the list contains {@link PictogramElement}s
+ * which meet the following constraint:<br>
+ * <code>
+ * foreach child of root:<br>
+ * BusinessObjectUtil.containsChildElementOfType(child, businessObjectClazz) == true
+ * </code>
+ * @param root
+ * @param clazz
+ * @return
+ */
+ @SuppressWarnings("rawtypes")
+ public static List<PictogramElement> getChildElementsOfType(ContainerShape root, Class clazz) {
+ List<PictogramElement> result = new ArrayList<PictogramElement>();
+ for (Shape currentShape : root.getChildren()) {
+ if (containsElementOfType(currentShape, clazz)) {
+ result.add(currentShape);
+ }
+ if (containsChildElementOfType(currentShape, clazz)) {
+ result.add(currentShape);
+ }
+ }
+ return result;
+ }
+
public static BaseElement getFirstBaseElement(PictogramElement pe) {
return BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
}
@@ -124,6 +155,30 @@ public class BusinessObjectUtil {
return foundElem;
}
+
+ @SuppressWarnings("unchecked")
+ public static <T extends PictogramElement> T getPictogramElementForProperty(PictogramElement container, String property, String expectedValue, Class<T> clazz) {
+ IPeService peService = Graphiti.getPeService();
+ Iterator<PictogramElement> iterator = peService.getAllContainedPictogramElements(container).iterator();
+ while (iterator.hasNext()) {
+ PictogramElement pe = iterator.next();
+ String value = peService.getPropertyValue(pe, property);
+ if (value != null && value.equals(expectedValue) && clazz.isInstance(pe)) {
+ return (T) pe;
+ }
+ }
+
+ // also search the linked objects
+ PictogramElement pe = getFirstElementOfType(container, PictogramElement.class);
+ if (pe!=null) {
+ String value = peService.getPropertyValue(pe, property);
+ if (value != null && value.equals(expectedValue) && clazz.isInstance(pe)) {
+ return (T) pe;
+ }
+ return getPictogramElementForProperty(pe, property, expectedValue, clazz);
+ }
+ return null;
+ }
public static PictogramElement getPictogramElementFromDiagram(Diagram diagram, BPMNShape bpmnShape) {
PictogramElement foundElem = null;
@@ -198,6 +253,25 @@ public class BusinessObjectUtil {
}
return null;
}
+
+ public static <T extends BaseElement> T getBusinessObject(IContext context, Class<T> clazz) {
+ Object o = null;
+ if (context instanceof IAddContext) {
+ o = ((IAddContext) context).getNewObject();
+ }
+ else if (context instanceof IPictogramElementContext) {
+ return BusinessObjectUtil.getFirstElementOfType(
+ (((IPictogramElementContext) context).getPictogramElement()), clazz);
+ }
+ else if (context instanceof ICustomContext) {
+ PictogramElement[] pes = ((ICustomContext) context).getPictogramElements();
+ if (pes.length==1)
+ o = BusinessObjectUtil.getFirstElementOfType(pes[0], clazz);
+ }
+ if (clazz.isInstance(o))
+ return (T)o;
+ return null;
+ }
public static EditPart getEditPartForSelection(ISelection selection) {
if (selection instanceof IStructuredSelection &&
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/DiagramEditorAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/DiagramEditorAdapter.java
index c07241e2..c07241e2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/DiagramEditorAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/DiagramEditorAdapter.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorDialog.java
new file mode 100644
index 00000000..cd1b26c0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorDialog.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.utils;
+
+import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Simple error dialog class that runs in the UI thread
+ */
+public class ErrorDialog {
+
+ protected String title;
+ protected String message;
+
+ public ErrorDialog(String title, String message) {
+ this.title = title;
+ this.message = message;
+ }
+
+ public ErrorDialog(String title, Exception e) {
+ this(title,null,e);;
+ }
+
+ public ErrorDialog(String title, String message, Exception e) {
+ this.title = title;
+ this.message = (message==null ? "" : message+"\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ Throwable t = e;
+ while (t!=null) {
+ String msg = t.getMessage();
+ if (msg==null)
+ msg = t.toString();
+ this.message += msg;
+ t = t.getCause();
+ if (t!=null) {
+ this.message += "\nCaused by "; //$NON-NLS-1$
+ }
+ }
+ }
+
+ public void show() {
+ Thread t = Thread.currentThread();
+// Display.getDefault().syncExec(new Runnable() {
+// @Override
+// public void run() {
+ try {
+ String me = Activator.getDefault().getDescriptor().getLabel();
+ MessageDialog.openError(Display.getDefault().getActiveShell(), me + " - " + title, message); //$NON-NLS-1$
+ }
+ catch (Exception e) {}
+// }
+// });
+
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorUtils.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorUtils.java
index 1f228837..1f228837 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorUtils.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ErrorUtils.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java
index 1434788d..0f8f3ab7 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FeatureSupport.java
@@ -12,22 +12,24 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.core.utils;
-import static org.eclipse.bpmn2.modeler.core.features.activity.AbstractAddActivityFeature.ACTIVITY_DECORATOR;
-
-import java.awt.Dimension;
-import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.bpmn2.AdHocSubProcess;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.CallActivity;
+import org.eclipse.bpmn2.CallChoreography;
import org.eclipse.bpmn2.CallableElement;
import org.eclipse.bpmn2.CategoryValue;
+import org.eclipse.bpmn2.Choreography;
import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.CorrelationPropertyRetrievalExpression;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.EndEvent;
@@ -52,34 +54,41 @@ import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.SubChoreography;
import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.Transaction;
import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
+import org.eclipse.bpmn2.di.ParticipantBandKind;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.AbstractConnectionRouter;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.emf.common.util.ECollections;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.dd.di.DiagramElement;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.features.context.ITargetContext;
import org.eclipse.graphiti.features.context.impl.LayoutContext;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.mm.MmFactory;
import org.eclipse.graphiti.mm.Property;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
@@ -91,13 +100,12 @@ import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
+/**
+ * This is a hodgepodge of static methods used by various Graphiti Features.
+ */
public class FeatureSupport {
- public static final String IS_HORIZONTAL_PROPERTY = "isHorizontal"; //$NON-NLS-1$
- public static final String TOOLTIP_PROPERTY = "tooltip"; //$NON-NLS-1$
-
public static boolean isValidFlowElementTarget(ITargetContext context) {
boolean intoDiagram = context.getTargetContainer() instanceof Diagram;
boolean intoLane = isTargetLane(context) && isTargetLaneOnTop(context);
@@ -155,7 +163,8 @@ public class FeatureSupport {
}
public static boolean isLane(PictogramElement element) {
- return BusinessObjectUtil.containsElementOfType(element, Lane.class);
+ return element instanceof ContainerShape &&
+ BusinessObjectUtil.containsElementOfType(element, Lane.class);
}
public static Lane getTargetLane(ITargetContext context) {
@@ -169,12 +178,13 @@ public class FeatureSupport {
}
public static boolean isTargetParticipant(ITargetContext context) {
- return isParticipant(context.getTargetContainer()) &&
- !isChoreographyParticipantBand(context.getTargetContainer());
+ return isParticipant(context.getTargetContainer());
}
public static boolean isParticipant(PictogramElement element) {
- return BusinessObjectUtil.containsElementOfType(element, Participant.class);
+ return element instanceof ContainerShape &&
+ BusinessObjectUtil.containsElementOfType(element, Participant.class) &&
+ !isChoreographyParticipantBand(element);
}
public static Participant getTargetParticipant(ITargetContext context) {
@@ -205,31 +215,64 @@ public class FeatureSupport {
Lane lane = BusinessObjectUtil.getFirstElementOfType(context.getTargetContainer(), Lane.class);
return lane.getChildLaneSet() == null || lane.getChildLaneSet().getLanes().isEmpty();
}
+
+ public static EObject getTargetObject(ITargetContext context) {
+ ContainerShape targetContainer = context.getTargetContainer();
+ EObject targetObject = BusinessObjectUtil.getBusinessObjectForPictogramElement(targetContainer);
+ if (targetObject instanceof BPMNDiagram) {
+ targetObject = ((BPMNDiagram)targetObject).getPlane().getBpmnElement();
+ }
+ if (targetObject instanceof Lane) {
+ while (targetObject!=null) {
+ targetObject = targetObject.eContainer();
+ if (targetObject instanceof FlowElementsContainer)
+ break;
+ }
+ }
+ if (targetObject instanceof Collaboration && !(targetObject instanceof Choreography)) {
+ Collaboration collaboration = (Collaboration)targetObject;
+ for (Participant p : collaboration.getParticipants()) {
+ if (p.getProcessRef()!=null) {
+ targetObject = p.getProcessRef();
+ break;
+ }
+ }
+
+ }
+ if (targetObject instanceof Participant) {
+ targetObject = ((Participant)targetObject).getProcessRef();
+ }
+ return targetObject;
+ }
public static boolean isHorizontal(ContainerShape container) {
EObject parent = container.eContainer();
if (parent instanceof PictogramElement) {
// participant bands are always "vertical" so that
// the label is drawn horizontally by the LayoutFeature
- if (BusinessObjectUtil.getFirstElementOfType((PictogramElement)parent, ChoreographyTask.class) != null)
+ if (BusinessObjectUtil.getFirstElementOfType((PictogramElement)parent, ChoreographyActivity.class) != null)
return false;
}
- String v = Graphiti.getPeService().getPropertyValue(container, IS_HORIZONTAL_PROPERTY);
+
+ String v = Graphiti.getPeService().getPropertyValue(container, GraphitiConstants.IS_HORIZONTAL_PROPERTY);
if (v==null) {
+ BPMNShape bpmnShape = DIUtils.findBPMNShape(BusinessObjectUtil.getFirstBaseElement(container));
+ if (bpmnShape!=null)
+ return bpmnShape.isIsHorizontal();
return Bpmn2Preferences.getInstance(container).isHorizontalDefault();
}
return Boolean.parseBoolean(v);
}
public static void setHorizontal(ContainerShape container, boolean isHorizontal) {
- Graphiti.getPeService().setPropertyValue(container, IS_HORIZONTAL_PROPERTY, Boolean.toString(isHorizontal));
+ Graphiti.getPeService().setPropertyValue(container, GraphitiConstants.IS_HORIZONTAL_PROPERTY, Boolean.toString(isHorizontal));
BPMNShape bs = BusinessObjectUtil.getFirstElementOfType(container, BPMNShape.class);
if (bs!=null)
bs.setIsHorizontal(isHorizontal);
}
public static boolean isHorizontal(IContext context) {
- Object v = context.getProperty(IS_HORIZONTAL_PROPERTY);
+ Object v = context.getProperty(GraphitiConstants.IS_HORIZONTAL_PROPERTY);
if (v==null) {
// TODO: get default orientation from preferences
return true;
@@ -238,14 +281,32 @@ public class FeatureSupport {
}
public static void setHorizontal(IContext context, boolean isHorizontal) {
- context.putProperty(IS_HORIZONTAL_PROPERTY, isHorizontal);
+ context.putProperty(GraphitiConstants.IS_HORIZONTAL_PROPERTY, isHorizontal);
+ }
+
+ /**
+ * Checks if the given PictogramElement is a ContainerShape that is linked
+ * to both a BaseElement and a BPMNShape object. In other words, the PE
+ * represents an visual for a BPMN2 node element such as a Task, Gateway,
+ * Event, etc.
+ *
+ * @param pe the PictogramElement
+ * @return true if the PE is a BPMN2 node element.
+ */
+ public static boolean isBpmnShape(PictogramElement pe) {
+ return pe instanceof ContainerShape &&
+ BusinessObjectUtil.getFirstBaseElement(pe) != null &&
+ BusinessObjectUtil.getFirstElementOfType(pe, BPMNShape.class) !=null;
}
public static List<PictogramElement> getContainerChildren(ContainerShape container) {
List<PictogramElement> list = new ArrayList<PictogramElement>();
for (PictogramElement pe : container.getChildren()) {
- String value = Graphiti.getPeService().getPropertyValue(pe, ACTIVITY_DECORATOR);
- if (value!=null && "true".equals(value)) //$NON-NLS-1$
+ if (ShapeDecoratorUtil.isActivityBorder(pe))
+ continue;
+ if (ShapeDecoratorUtil.isValidationDecorator(pe))
+ continue;
+ if (isLabelShape(pe))
continue;
list.add(pe);
}
@@ -255,21 +316,34 @@ public class FeatureSupport {
public static List<PictogramElement> getContainerDecorators(ContainerShape container) {
List<PictogramElement> list = new ArrayList<PictogramElement>();
for (PictogramElement pe : container.getChildren()) {
- String value = Graphiti.getPeService().getPropertyValue(pe, ACTIVITY_DECORATOR);
- if (value!=null && "true".equals(value)) //$NON-NLS-1$
+ if (ShapeDecoratorUtil.isActivityBorder(pe))
list.add(pe);
}
return list;
}
- public static void setContainerChildrenVisible(ContainerShape container, boolean visible) {
- for (PictogramElement pe : getContainerChildren(container)) {
- pe.setVisible(visible);
+ public static void setContainerChildrenVisible(IFeatureProvider fp, ContainerShape container, boolean visible) {
+ List<PictogramElement> list = new ArrayList<PictogramElement>();
+ list.addAll(container.getChildren());
+ for (PictogramElement pe : list) {
+ if (ShapeDecoratorUtil.isActivityBorder(pe))
+ continue;
+
+ if (ShapeDecoratorUtil.isEventSubProcessDecorator(pe)) {
+ pe.setVisible(!visible);
+ }
+ else
+ pe.setVisible(visible);
+
+ if (visible)
+ FeatureSupport.updateLabel(fp, pe, null);
if (pe instanceof AnchorContainer) {
AnchorContainer ac = (AnchorContainer)pe;
for (Anchor a : ac.getAnchors()) {
for (Connection c : a.getOutgoingConnections()) {
c.setVisible(visible);
+ if (visible)
+ FeatureSupport.updateLabel(fp, c, null);
for (ConnectionDecorator decorator : c.getConnectionDecorators()) {
decorator.setVisible(visible);
}
@@ -278,33 +352,6 @@ public class FeatureSupport {
}
}
}
-
- /**
- * Use ModelHandler.getInstance(diagram) instead
- *
- * @param diagram
- * @return
- * @throws IOException
- */
- @Deprecated
- public static ModelHandler getModelHanderInstance(Diagram diagram) throws IOException {
- return ModelHandlerLocator.getModelHandler(diagram.eResource());
- }
-
- public static void redraw(ContainerShape container) {
- ContainerShape root = getRootContainer(container);
- resizeRecursively(root);
- postResizeFixLenghts(root);
- updateDI(root);
- }
-
- private static void updateDI(ContainerShape root) {
- Diagram diagram = Graphiti.getPeService().getDiagramForPictogramElement(root);
-
- Class<?> instanceClass = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class).eClass()
- .getInstanceClass();
- DIUtils.updateDIShape(root);
- }
public static ContainerShape getRootContainer(ContainerShape container) {
ContainerShape parent = container.getContainer();
@@ -315,264 +362,6 @@ public class FeatureSupport {
return container;
}
- private static Dimension resize(ContainerShape container) {
- EObject elem = BusinessObjectUtil.getFirstElementOfType(container, BaseElement.class);
- IGaService service = Graphiti.getGaService();
- int height = 0;
- int width = container.getGraphicsAlgorithm().getWidth() - 30;
- boolean horz = isHorizontal(container);
- if (horz) {
- height = 0;
- width = container.getGraphicsAlgorithm().getWidth() - 30;
- }
- else {
- width = 0;
- height = container.getGraphicsAlgorithm().getHeight() - 30;
- }
-
- EList<Shape> children = container.getChildren();
- ECollections.sort(children, new SiblingLaneComparator());
- for (Shape s : children) {
- Object bo = BusinessObjectUtil.getFirstElementOfType(s, BaseElement.class);
- if (bo != null && (bo instanceof Lane || bo instanceof Participant) && !bo.equals(elem)) {
- GraphicsAlgorithm ga = s.getGraphicsAlgorithm();
- if (horz) {
- service.setLocation(ga, 30, height);
- height += ga.getHeight() - 1;
- if (ga.getWidth() >= width) {
- width = ga.getWidth();
- } else {
- service.setSize(ga, width, ga.getHeight());
- }
- }
- else {
- service.setLocation(ga, width, 30);
- width += ga.getWidth() - 1;
- if (ga.getHeight() >= height) {
- height = ga.getHeight();
- } else {
- service.setSize(ga, ga.getWidth(), height);
- }
- }
- }
- }
-
- GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
-
- if (horz) {
- if (height == 0) {
- return new Dimension(ga.getWidth(), ga.getHeight());
- } else {
- int newWidth = width + 30;
- int newHeight = height + 1;
- service.setSize(ga, newWidth, newHeight);
-
- for (Shape s : children) {
- GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
- if (childGa instanceof AbstractText) {
- AbstractText text = (AbstractText)childGa;
- text.setAngle(-90);
- service.setLocationAndSize(text, 5, 0, 15, newHeight);
- } else if (childGa instanceof Polyline) {
- Polyline line = (Polyline) childGa;
- Point p0 = line.getPoints().get(0);
- Point p1 = line.getPoints().get(1);
- p0.setX(30); p0.setY(0);
- p1.setX(30); p1.setY(newHeight);
- }
- }
-
- return new Dimension(newWidth, newHeight);
- }
- }
- else {
- if (width == 0) {
- return new Dimension(ga.getWidth(), ga.getHeight());
- } else {
- int newWidth = width + 1;
- int newHeight = height + 30;
- service.setSize(ga, newWidth, newHeight);
-
- for (Shape s : children) {
- GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
- if (childGa instanceof AbstractText) {
- AbstractText text = (AbstractText)childGa;
- text.setAngle(0);
- service.setLocationAndSize(text, 0, 5, newWidth, 15);
- } else if (childGa instanceof Polyline) {
- Polyline line = (Polyline) childGa;
- Point p0 = line.getPoints().get(0);
- Point p1 = line.getPoints().get(1);
- p0.setX(0); p0.setY(30);
- p1.setX(newWidth); p1.setY(30);
- }
- }
-
- return new Dimension(newWidth, newHeight);
- }
- }
- }
-
- private static Dimension resizeRecursively(ContainerShape root) {
- BaseElement elem = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class);
- List<Dimension> dimensions = new ArrayList<Dimension>();
- IGaService service = Graphiti.getGaService();
- int foundContainers = 0;
- boolean horz = isHorizontal(root);
-
- for (Shape s : root.getChildren()) {
- Object bo = BusinessObjectUtil.getFirstElementOfType(s, BaseElement.class);
- if (checkForResize(elem, s, bo)) {
- foundContainers += 1;
- Dimension d = resizeRecursively((ContainerShape) s);
- if (d != null) {
- dimensions.add(d);
- }
- }
- }
-
- if (dimensions.isEmpty()) {
- GraphicsAlgorithm ga = root.getGraphicsAlgorithm();
- for (Shape s : root.getChildren()) {
- GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
- if (childGa instanceof AbstractText) {
- AbstractText text = (AbstractText)childGa;
- if (horz) {
- text.setAngle(-90);
- service.setLocationAndSize(text, 5, 0, 15, ga.getHeight());
- }
- else {
- text.setAngle(0);
- service.setLocationAndSize(text, 0, 5, ga.getWidth(), 15);
- }
- } else if (childGa instanceof Polyline) {
- Polyline line = (Polyline) childGa;
- Point p0 = line.getPoints().get(0);
- Point p1 = line.getPoints().get(1);
- if (horz) {
- p0.setX(30); p0.setY(0);
- p1.setX(30); p1.setY(ga.getHeight());
- }
- else {
- p0.setX(0); p0.setY(30);
- p1.setX(ga.getWidth()); p1.setY(30);
- }
- }
- }
- return new Dimension(ga.getWidth(), ga.getHeight());
- }
-
- if (foundContainers > 0) {
- return resize(root);
- }
-
- return getMaxDimension(horz, dimensions);
- }
-
- /**
- * One can only resize lanes and participants
- */
- private static boolean checkForResize(BaseElement currentBo, Shape s, Object bo) {
- if (!(s instanceof ContainerShape)) {
- return false;
- }
- if (bo == null) {
- return false;
- }
- if (!(bo instanceof Lane || bo instanceof Participant)) {
- return false;
- }
- return !bo.equals(currentBo);
- }
-
- private static Dimension getMaxDimension(boolean horz, List<Dimension> dimensions) {
- if (dimensions.isEmpty()) {
- return null;
- }
- int height = 0;
- int width = 0;
-
- if (horz) {
- for (Dimension d : dimensions) {
- height += d.height;
- if (d.width > width) {
- width = d.width;
- }
- }
- }
- else {
- for (Dimension d : dimensions) {
- width += d.width;
- if (d.height > height) {
- height = d.height;
- }
- }
- }
- return new Dimension(width, height);
- }
-
- private static void postResizeFixLenghts(ContainerShape root) {
- IGaService service = Graphiti.getGaService();
- BaseElement elem = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class);
- GraphicsAlgorithm ga = root.getGraphicsAlgorithm();
- int width = ga.getWidth() - 30;
- int height = ga.getHeight() - 30;
- boolean horz = isHorizontal(root);
-
- for (Shape s : root.getChildren()) {
- Object o = BusinessObjectUtil.getFirstElementOfType(s, BaseElement.class);
- if (checkForResize(elem, s, o)) {
- GraphicsAlgorithm childGa = s.getGraphicsAlgorithm();
- if (horz)
- service.setSize(childGa, width, childGa.getHeight());
- else
- service.setSize(childGa, childGa.getWidth(), height);
- DIUtils.updateDIShape(s);
- postResizeFixLenghts((ContainerShape) s);
- }
- }
- DIUtils.updateDIShape(root);
- }
-
- public static String getShapeValue(IPictogramElementContext context) {
- String value = null;
-
- PictogramElement pe = context.getPictogramElement();
- if (pe instanceof ContainerShape) {
- ContainerShape cs = (ContainerShape) pe;
- for (Shape shape : cs.getChildren()) {
- if (shape.getGraphicsAlgorithm() instanceof AbstractText) {
- AbstractText text = (AbstractText) shape.getGraphicsAlgorithm();
- value = text.getValue();
- }
- }
- }
- return value;
- }
-
- public static String getBusinessValue(IPictogramElementContext context) {
- Object o = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), BaseElement.class);
- if (o instanceof FlowElement) {
- FlowElement e = (FlowElement) o;
- return e.getName();
- } else if (o instanceof TextAnnotation) {
- TextAnnotation a = (TextAnnotation) o;
- return a.getText();
- } else if (o instanceof Participant) {
- Participant p = (Participant) o;
- return p.getName();
- } else if (o instanceof Lane) {
- Lane l = (Lane) o;
- return l.getName();
- } else if (o instanceof Group) {
- Group g = (Group) o;
- if (g.getCategoryValueRef()!=null)
- return ModelUtil.getDisplayName(g.getCategoryValueRef());
- return "";
- }
- return null;
- }
-
public static Participant getTargetParticipant(ITargetContext context, ModelHandler handler) {
if (context.getTargetContainer() instanceof Diagram) {
return handler.getInternalParticipant();
@@ -600,189 +389,131 @@ public class FeatureSupport {
return null;
}
- @SuppressWarnings("unchecked")
- public static <T extends EObject> T getChildElementOfType(PictogramElement container, String property, String expectedValue, Class<T> clazz) {
- IPeService peService = Graphiti.getPeService();
- Iterator<PictogramElement> iterator = peService.getAllContainedPictogramElements(container).iterator();
- while (iterator.hasNext()) {
- PictogramElement pe = iterator.next();
- String value = peService.getPropertyValue(pe, property);
- if (value != null && value.equals(expectedValue) && clazz.isInstance(pe)) {
- return (T) pe;
- }
- }
- return null;
- }
-
- /**
- * Returns a list of {@link PictogramElement}s which contains an element to the
- * assigned businessObjectClazz, i.e. the list contains {@link PictogramElement}s
- * which meet the following constraint:<br>
- * <code>
- * foreach child of root:<br>
- * BusinessObjectUtil.containsChildElementOfType(child, businessObjectClazz) == true
- * </code>
- * @param root
- * @param businessObjectClazz
- * @return
- */
- @SuppressWarnings("rawtypes")
- public static List<PictogramElement> getChildsOfBusinessObjectType(ContainerShape root, Class businessObjectClazz) {
- List<PictogramElement> result = new ArrayList<PictogramElement>();
- for (Shape currentShape : root.getChildren()) {
- if (BusinessObjectUtil.containsChildElementOfType(currentShape, businessObjectClazz)) {
- result.add(currentShape);
- }
- }
- return result;
- }
-
- public static Shape getFirstLaneInContainer(ContainerShape root) {
- List<PictogramElement> laneShapes = getChildsOfBusinessObjectType(root, Lane.class);
+ public static ContainerShape getFirstLaneInContainer(ContainerShape root) {
+ List<PictogramElement> laneShapes = BusinessObjectUtil.getChildElementsOfType(root, Lane.class);
if (!laneShapes.isEmpty()) {
Iterator<PictogramElement> iterator = laneShapes.iterator();
PictogramElement result = iterator.next();
- GraphicsAlgorithm ga = result.getGraphicsAlgorithm();
- if (isHorizontal(root)) {
- while (iterator.hasNext()) {
- PictogramElement currentShape = iterator.next();
- if (currentShape.getGraphicsAlgorithm().getY() < ga.getY()) {
- result = currentShape;
+ if (result instanceof ContainerShape) {
+ GraphicsAlgorithm ga = result.getGraphicsAlgorithm();
+ if (isHorizontal(root)) {
+ while (iterator.hasNext()) {
+ PictogramElement currentShape = iterator.next();
+ if (currentShape instanceof ContainerShape) {
+ if (currentShape.getGraphicsAlgorithm().getY() < ga.getY()) {
+ result = currentShape;
+ }
+ }
}
+ } else {
+ while (iterator.hasNext()) {
+ PictogramElement currentShape = iterator.next();
+ if (currentShape instanceof ContainerShape) {
+ if (currentShape.getGraphicsAlgorithm().getX() < ga.getX()) {
+ result = currentShape;
+ }
+ }
+ }
}
- } else {
- while (iterator.hasNext()) {
- PictogramElement currentShape = iterator.next();
- if (currentShape.getGraphicsAlgorithm().getX() < ga.getX()) {
- result = currentShape;
- }
- }
+ return (ContainerShape) result;
}
- return (Shape) result;
}
return root;
}
- public static Shape getLastLaneInContainer(ContainerShape root) {
- List<PictogramElement> laneShapes = getChildsOfBusinessObjectType(root, Lane.class);
+ public static ContainerShape getLastLaneInContainer(ContainerShape root) {
+ List<PictogramElement> laneShapes = BusinessObjectUtil.getChildElementsOfType(root, Lane.class);
if (!laneShapes.isEmpty()) {
Iterator<PictogramElement> iterator = laneShapes.iterator();
PictogramElement result = iterator.next();
- GraphicsAlgorithm ga = result.getGraphicsAlgorithm();
- if (isHorizontal(root)) {
- while (iterator.hasNext()) {
- PictogramElement currentShape = iterator.next();
- if (currentShape.getGraphicsAlgorithm().getY() > ga.getY()) {
- result = currentShape;
- }
- }
- } else {
- while (iterator.hasNext()) {
- PictogramElement currentShape = iterator.next();
- if (currentShape.getGraphicsAlgorithm().getX() > ga.getX()) {
- result = currentShape;
- }
- }
- }
- return (Shape) result;
- }
- return root;
- }
-
- public static ContainerShape getLaneBefore(ContainerShape container) {
- if (!BusinessObjectUtil.containsElementOfType(container, Lane.class)) {
- return null;
- }
-
- ContainerShape parentContainerShape = container.getContainer();
- if (parentContainerShape == null) {
- return null;
- }
-
- GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
- int x = ga.getX();
- int y = ga.getY();
- boolean isHorizontal = isHorizontal(container);
-
- ContainerShape result = null;
- for (PictogramElement picElem : getChildsOfBusinessObjectType(parentContainerShape, Lane.class)) {
- if (picElem instanceof ContainerShape && !picElem.equals(container)) {
- ContainerShape currentContainerShape = (ContainerShape) picElem;
- GraphicsAlgorithm currentGA = currentContainerShape.getGraphicsAlgorithm();
- if (isHorizontal) {
- if (currentGA.getY() < y) {
- if (result != null) {
- GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
- if (resultGA.getY() < currentGA.getY()) {
- result = currentContainerShape;
+ if (result instanceof ContainerShape) {
+ GraphicsAlgorithm ga = result.getGraphicsAlgorithm();
+ if (isHorizontal(root)) {
+ while (iterator.hasNext()) {
+ PictogramElement currentShape = iterator.next();
+ if (currentShape instanceof ContainerShape) {
+ if (currentShape.getGraphicsAlgorithm().getY() > ga.getY()) {
+ result = currentShape;
}
- } else {
- result = currentContainerShape;
}
}
} else {
- if (currentGA.getX() < x) {
- if (result != null) {
- GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
- if (resultGA.getX() < currentGA.getX()) {
- result = currentContainerShape;
+ while (iterator.hasNext()) {
+ PictogramElement currentShape = iterator.next();
+ if (currentShape instanceof ContainerShape) {
+ if (currentShape.getGraphicsAlgorithm().getX() > ga.getX()) {
+ result = currentShape;
}
- } else {
- result = currentContainerShape;
}
- }
+ }
}
+ return (ContainerShape) result;
}
}
- return result;
+ return root;
}
- public static ContainerShape getLaneAfter(ContainerShape container) {
- if (!BusinessObjectUtil.containsElementOfType(container, Lane.class)) {
- return null;
- }
-
- ContainerShape parentContainerShape = container.getContainer();
- if (parentContainerShape == null) {
- return null;
- }
-
- GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
- int x = ga.getX();
- int y = ga.getY();
- boolean isHorizontal = isHorizontal(container);
-
- ContainerShape result = null;
- for (PictogramElement picElem : getChildsOfBusinessObjectType(parentContainerShape, Lane.class)) {
- if (picElem instanceof ContainerShape && !picElem.equals(container)) {
- ContainerShape currentContainerShape = (ContainerShape) picElem;
- GraphicsAlgorithm currentGA = currentContainerShape.getGraphicsAlgorithm();
- if (isHorizontal) {
- if (currentGA.getY() > y) {
- if (result != null) {
- GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
- if (resultGA.getY() > currentGA.getY()) {
- result = currentContainerShape;
+ public static List<PictogramElement> getPoolOrLaneChildren(ContainerShape containerShape) {
+ List<PictogramElement> children = new ArrayList<PictogramElement>();
+ for (PictogramElement pe : containerShape.getChildren()) {
+ BaseElement be = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
+ if (pe instanceof ContainerShape && !isLane(pe) && be!=null)
+ children.add(pe);
+ }
+ return children;
+ }
+
+ /**
+ * Returns a list of all Shapes and any Connections attached to them, that
+ * are children or descendants of the given Lane or Pool container. Only
+ * Shapes that are NOT Lanes are returned.
+ *
+ * @param containerShape the Lane or Pool container shape.
+ */
+ public static List<PictogramElement> getPoolAndLaneDescendants(ContainerShape containerShape) {
+ List<PictogramElement> children = new ArrayList<PictogramElement>();
+ FeatureSupport.collectChildren(containerShape, children, false);
+ return children;
+ }
+
+ /**
+ * Collects all Shapes and any Connections attached to them, that are
+ * children or descendants of the given Lane or Pool container. Only Shapes
+ * that are NOT Lanes are collected.
+ *
+ * @param containerShape the current Pool or Lane shape. This method is
+ * recursive and is initially invoked for the root container.
+ * @param descendants the list of descendant Shapes and attached Connections
+ * @param includeLanes if true, includes all Lane shapes in the results
+ * list
+ */
+ public static void collectChildren(ContainerShape containerShape, List<PictogramElement> descendants, boolean includeLanes) {
+ for (PictogramElement pe : containerShape.getChildren()) {
+ if (pe instanceof ContainerShape) {
+ if (isLane(pe)) {
+ if (includeLanes)
+ descendants.add(pe);
+ collectChildren((ContainerShape) pe, descendants, includeLanes);
+ }
+ else {
+ if (isBpmnShape(pe)) {
+ descendants.add(pe);
+ for (Anchor a :((ContainerShape) pe).getAnchors()) {
+ for (Connection c : a.getIncomingConnections()) {
+ if (c instanceof FreeFormConnection && !descendants.contains(c)) {
+ descendants.add(c);
+ }
}
- } else {
- result = currentContainerShape;
- }
- }
- } else {
- if (currentGA.getX() > x) {
- if (result != null) {
- GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
- if (resultGA.getX() > currentGA.getX()) {
- result = currentContainerShape;
+ for (Connection c : a.getOutgoingConnections()) {
+ if (c instanceof FreeFormConnection && !descendants.contains(c)) {
+ descendants.add(c);
+ }
}
- } else {
- result = currentContainerShape;
}
}
}
}
}
- return result;
}
/**
@@ -839,7 +570,8 @@ public class FeatureSupport {
EObject child = iter.next();
if (child instanceof ContainerShape
&& child!=groupShape
- && !list.contains(child)) {
+ && !list.contains(child)
+ && !isLabelShape((ContainerShape)child)) {
ContainerShape shape = (ContainerShape)child;
if (isGroupShape(shape)) {
if (GraphicsUtil.contains(groupShape, shape)) {
@@ -866,16 +598,10 @@ public class FeatureSupport {
return list;
}
- public static boolean isGroupShape(Shape shape) {
+ public static boolean isGroupShape(PictogramElement shape) {
return BusinessObjectUtil.getFirstBaseElement(shape) instanceof Group;
}
- public static boolean isLabelShape(Shape shape) {
- if (shape==null)
- return false;
- return Graphiti.getPeService().getPropertyValue(shape, GraphicsUtil.LABEL_PROPERTY) != null;
- }
-
public static List<EObject> findMessageReferences(Diagram diagram, Message message) {
List<EObject> result = new ArrayList<EObject>();
Definitions definitions = ModelUtil.getDefinitions(message);
@@ -928,9 +654,12 @@ public class FeatureSupport {
return result;
}
- public static List<EClass> getAllowedEventDefinitions(Event event) {
+ public static List<EClass> getAllowedEventDefinitions(Event event, Object parentContainer) {
BaseElement eventOwner = null;
- if (event instanceof BoundaryEvent) {
+ if (parentContainer instanceof BaseElement)
+ eventOwner = (BaseElement) parentContainer;
+
+ if (event instanceof BoundaryEvent && ((BoundaryEvent)event).getAttachedToRef()!=null) {
eventOwner = ((BoundaryEvent)event).getAttachedToRef();
}
else {
@@ -1009,6 +738,7 @@ public class FeatureSupport {
public static boolean updateConnection(IFeatureProvider fp, Connection connection) {
boolean layoutChanged = false;
+
LayoutContext layoutContext = new LayoutContext(connection);
ILayoutFeature layoutFeature = fp.getLayoutFeature(layoutContext);
if (layoutFeature!=null) {
@@ -1024,6 +754,13 @@ public class FeatureSupport {
updateChanged = updateFeature.hasDoneChanges();
}
+ if (layoutChanged)
+ FeatureSupport.updateLabel(fp, connection, null);
+
+ // also update any Connections that are connected to this Connection
+ for (Shape shape : AnchorUtil.getConnectionPoints(connection)) {
+ updateConnections(fp, shape);
+ }
return layoutChanged || updateChanged;
}
@@ -1095,7 +832,7 @@ public class FeatureSupport {
public static void updateCategoryValues(IFeatureProvider fp, PictogramElement pe) {
- Resource resource = ModelUtil.getResource(pe);
+ Resource resource = ObjectPropertyProvider.getResource(pe);
if (Bpmn2Preferences.getInstance(resource).getPropagateGroupCategories()) {
// only do this if User Preference is enabled: assign the Group's CategoryValue
// to the FlowElement represented by the given PictogramElement
@@ -1141,7 +878,7 @@ public class FeatureSupport {
public static void setToolTip(GraphicsAlgorithm ga, String text) {
if (ga!=null) {
Property prop = MmFactory.eINSTANCE.createProperty();
- prop.setKey(TOOLTIP_PROPERTY);
+ prop.setKey(GraphitiConstants.TOOLTIP_PROPERTY);
prop.setValue(text);
ga.getProperties().add(prop);
}
@@ -1150,10 +887,325 @@ public class FeatureSupport {
public static String getToolTip(GraphicsAlgorithm ga) {
if (ga!=null) {
for (Property prop : ga.getProperties()) {
- if (TOOLTIP_PROPERTY.equals(prop.getKey()))
+ if (GraphitiConstants.TOOLTIP_PROPERTY.equals(prop.getKey()))
return prop.getValue();
}
}
return null;
}
+
+ public static boolean hasBPMNShape(PictogramElement pe) {
+ return BusinessObjectUtil.getFirstElementOfType(pe, BPMNShape.class) != null;
+ }
+
+ public static boolean hasBPMNEdge(PictogramElement pe) {
+ return BusinessObjectUtil.getFirstElementOfType(pe, BPMNEdge.class) != null;
+ }
+
+ public static boolean hasBPMNElement(PictogramElement pe) {
+ return hasBPMNShape(pe) || hasBPMNEdge(pe);
+ }
+
+ /*
+ * Label support methods
+ */
+ public static PictogramElement getPictogramElement(IContext context) {
+ if (context instanceof IPictogramElementContext) {
+ return ((IPictogramElementContext) context).getPictogramElement();
+ }
+ else if (context instanceof ICustomContext) {
+ PictogramElement[] pes = ((ICustomContext) context).getPictogramElements();
+ if (pes.length==1)
+ return pes[0];
+ }
+ return null;
+ }
+
+ /**
+ * Checks the given PictogramElement to see if it is a Label shape. Label
+ * shapes are identified by the LABEL_SHAPE property equal to "true".
+ *
+ * @param shape the shape to test
+ * @return true if the shape is a Label
+ */
+ public static boolean isLabelShape(PictogramElement shape) {
+ if (shape==null)
+ return false;
+ return Graphiti.getPeService().getPropertyValue(shape, GraphitiConstants.LABEL_SHAPE) != null;
+ }
+
+ /**
+ * Gets the owner {@link PictogramElement} of a Label from a given IContext
+ * object. Label shapes are added by Feature Containers using a
+ * {@link org.eclipse.bpmn2.modeler.core.features.MultiAddFeature} - the
+ * first Add Feature in the Multi Add creates the graphical element that
+ * represents the shape or connection, and a subsequent Add Feature
+ * contributes the Label.
+ * <p>
+ * A Label and its owning PictogramElement are ultimately linked to each
+ * other by way of the PictogramElement link list; the owner has a link to
+ * the ContainerShape of the Label and the Label has a link to the owning
+ * shape or connection.
+ *
+ * @param context a Graphiti context object
+ * @return the PictogramElement that owns a Label if it has one, or null.
+ */
+ public static PictogramElement getLabelOwner(IContext context) {
+ List<PictogramElement> pes = (List<PictogramElement>) context.getProperty(GraphitiConstants.PICTOGRAM_ELEMENTS);
+ if (pes!=null && pes.size()>0) {
+ return getLabelOwner(pes.get( pes.size()-1 ));
+ }
+ PictogramElement pe = (PictogramElement) context.getProperty(GraphitiConstants.PICTOGRAM_ELEMENT);
+ if (pe!=null)
+ return pe;
+ if (context instanceof IPictogramElementContext)
+ return FeatureSupport.getLabelOwner(((IPictogramElementContext)context).getPictogramElement());
+ return null;
+ }
+
+ /**
+ * Gets the owner {@link PictogramElement} of a Label from a given
+ * PictogramElement. The given PE may already be the owner of the Label, in
+ * which case the given value is returned. See also
+ * {@link FeatureSupport#getLabelOwner(IContext)}
+ *
+ * @param pe a PictogramElement that represents the Label shape. This may be
+ * either the Label shape or its owner.
+ * @return the PictogramElement that is the owner of a Label shape.
+ */
+ public static PictogramElement getLabelOwner(PictogramElement pe) {
+ DiagramElement de = BusinessObjectUtil.getFirstElementOfType(pe, DiagramElement.class);
+ if (de!=null)
+ return pe;
+ ContainerShape cs = BusinessObjectUtil.getFirstElementOfType(pe, ContainerShape.class);
+ de = BusinessObjectUtil.getFirstElementOfType(cs, DiagramElement.class);
+ if (de!=null)
+ return cs;
+ Connection c = BusinessObjectUtil.getFirstElementOfType(pe, Connection.class);
+ de = BusinessObjectUtil.getFirstElementOfType(c, DiagramElement.class);
+ if (de!=null)
+ return c;
+ return null;
+ }
+
+ /**
+ * Gets the owner {@link PictogramElement} of a Label from a given
+ * Text {@link GraphicsAlgorithm}.
+ *
+ * @param text a GraphicsAlgorithm that contains the Label text.
+ * @return the PictogramElement that is the owner of the Label shape.
+ */
+ public static PictogramElement getLabelOwner(GraphicsAlgorithm text) {
+ PictogramElement pe = text.getPictogramElement();
+ if (isLabelShape(pe))
+ return getLabelOwner(pe);
+ return null;
+ }
+
+ /**
+ * Gets the Label shape for the given PictogramElement. This method is the opposite of
+ * {@link FeatureSupport#getLabelOwner(PictogramElement)} .
+ *
+ * @param pe a PictogramElement that represents the owner of the Label. This may be
+ * either the owner of the Label, or the Label shape itself.
+ * @return the PictogramElement that represents the Label.
+ */
+ public static Shape getLabelShape(PictogramElement pe) {
+ pe = getLabelOwner(pe);
+ if (pe instanceof Connection) {
+ for (ConnectionDecorator d : ((Connection)pe).getConnectionDecorators()) {
+ if (isLabelShape(d))
+ return d;
+ }
+ }
+ Shape cs = BusinessObjectUtil.getFirstElementOfType(pe, Shape.class);
+ if (isLabelShape(cs) ) {
+ return cs;
+ }
+ return null;
+ }
+
+ /**
+ * Updates the contents of, and relocates a Label according to User
+ * Preferences for the linked BPMN2 object.
+ *
+ * @param fp the Feature Provider
+ * @param pe the PictogramElement that may be either the Label shape or its
+ * owner.
+ * @param offset an optional X/Y offset if the owning shape was moved. This is
+ * used to relocate Labels that are "movable", that is they can
+ * be manually positioned independently of their owners.
+ */
+ public static void updateLabel(IFeatureProvider fp, PictogramElement pe, Point offset) {
+ if (isLabelShape(pe))
+ pe = getLabelOwner(pe);
+ if (pe!=null) {
+ UpdateContext context = new UpdateContext(pe);
+ // Offset is only used if the label is MOVABLE - we need to keep the label's
+ // relative position to its owning shape the same.
+ context.putProperty(GraphitiConstants.LABEL_OFFSET, offset);
+ IUpdateFeature feature = fp.getUpdateFeature(context);
+ if (feature instanceof MultiUpdateFeature) {
+ MultiUpdateFeature mf = (MultiUpdateFeature) feature;
+ for (IUpdateFeature uf : mf.getFeatures())
+ if (uf instanceof UpdateLabelFeature) {
+ uf.update(context);
+ }
+ }
+ else {
+ feature.update(context);
+ }
+ }
+ }
+
+ /**
+ * Get the position of the label relative to its owning figure for the given
+ * BaseElement as defined in the User Preferences.
+ *
+ * @param element the BaseElement that is represented by the graphical figure.
+ * @return a ShapeStyle LabelPosition relative location indicator.
+ */
+ public static LabelPosition getLabelPosition(PictogramElement pe) {
+ BaseElement element = BusinessObjectUtil.getFirstBaseElement(pe);
+ ShapeStyle ss = ShapeStyle.getShapeStyle(element);
+ return ss.getLabelPosition();
+ }
+
+ /*
+ * Choreography support methods
+ */
+
+ public static Tuple<List<ContainerShape>, List<ContainerShape>> getTopAndBottomBands(List<ContainerShape> bandShapes) {
+ List<ContainerShape> top = new ArrayList<ContainerShape>();
+ List<ContainerShape> bottom = new ArrayList<ContainerShape>();
+
+ if (bandShapes.size() == 1) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(bandShapes.get(0), BPMNShape.class);
+ ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
+ if (bandKind == ParticipantBandKind.TOP_INITIATING || bandKind == ParticipantBandKind.TOP_NON_INITIATING) {
+ top.add(bandShapes.get(0));
+ } else if (bandKind == ParticipantBandKind.BOTTOM_INITIATING
+ || bandKind == ParticipantBandKind.BOTTOM_NON_INITIATING) {
+ bottom.add(bandShapes.get(0));
+ } else {
+ top.add(bandShapes.get(0));
+ }
+ } else {
+ Collections.sort(bandShapes, new Comparator<ContainerShape>() {
+ @Override
+ public int compare(ContainerShape c1, ContainerShape c2) {
+ BPMNShape bpmnShape1 = BusinessObjectUtil.getFirstElementOfType(c1, BPMNShape.class);
+ Bounds bounds1 = bpmnShape1.getBounds();
+ BPMNShape bpmnShape2 = BusinessObjectUtil.getFirstElementOfType(c2, BPMNShape.class);
+ Bounds bounds2 = bpmnShape2.getBounds();
+ return new Float(bounds1.getY()).compareTo(new Float(bounds2.getY()));
+ }
+ });
+ int n = bandShapes.size();
+ int divider = n / 2;
+ top.addAll(bandShapes.subList(0, divider));
+ bottom.addAll(bandShapes.subList(divider, n));
+ }
+ return new Tuple<List<ContainerShape>, List<ContainerShape>>(top, bottom);
+ }
+
+ public static List<ContainerShape> getParticipantBandContainerShapes(ContainerShape containerShape) {
+ IPeService peService = Graphiti.getPeService();
+ List<ContainerShape> bandShapes = new ArrayList<ContainerShape>();
+ Collection<Shape> shapes = peService.getAllContainedShapes(containerShape);
+ for (Shape s : shapes) {
+ String property = peService.getPropertyValue(s, ChoreographyUtil.PARTICIPANT_BAND);
+ if (new Boolean(property)) {
+ bandShapes.add((ContainerShape) s);
+ }
+ }
+ return bandShapes;
+ }
+
+ public static boolean isElementExpanded(PictogramElement pe) {
+ String property = Graphiti.getPeService().getPropertyValue(pe,GraphitiConstants.IS_EXPANDED);
+ return Boolean.parseBoolean(property);
+ }
+
+ public static void setElementExpanded(PictogramElement pe, boolean isExpanded) {
+ if (isExpanded)
+ Graphiti.getPeService().setPropertyValue(pe, GraphitiConstants.IS_EXPANDED, Boolean.TRUE.toString());
+ else
+ Graphiti.getPeService().removeProperty(pe, GraphitiConstants.IS_EXPANDED);
+ }
+
+ public static boolean isElementExpanded(BaseElement be) {
+ if (isExpandableElement(be)) {
+ // if the BaseElement has its own BPMNDiagram page it should be considered
+ // to be collapsed and should be represented as such.
+ // TODO: this condition should be removed once we implement Link events as
+ // "off page" connectors.
+ BPMNDiagram bpmnDiagram = DIUtils.findBPMNDiagram(be);
+ // otherwise check the "isExpanded" state of the BPMNShape element.
+ BPMNShape bpmnShape = DIUtils.findBPMNShape(be);
+ if (bpmnShape!=null && bpmnShape.isIsExpanded() && bpmnDiagram==null)
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean isExpandableElement(BaseElement be) {
+ return be instanceof SubProcess
+ || be instanceof AdHocSubProcess
+ || be instanceof Transaction
+ || be instanceof CallActivity
+ || be instanceof CallChoreography;
+ }
+
+ public static void updateExpandedSize(PictogramElement pe) {
+ IDimension size = GraphicsUtil.calculateSize(pe);
+ FeatureSupport.setExpandedSize(pe, size);
+ }
+
+ public static void setExpandedSize(PictogramElement pe, IDimension size) {
+ setExpandedSize(pe, size.getWidth(), size.getHeight());
+ }
+
+ public static void setExpandedSize(PictogramElement pe, int width, int height) {
+ Graphiti.getPeService().setPropertyValue(pe, GraphitiConstants.EXPANDED_SIZE, width+","+height);
+ }
+
+ public static IDimension getExpandedSize(PictogramElement pe) {
+ IDimension size = GraphicsUtil.calculateSize(pe);
+ String property = Graphiti.getPeService().getPropertyValue(pe, GraphitiConstants.EXPANDED_SIZE);
+ if (property!=null) {
+ int index = property.indexOf(',');
+ int w = Integer.parseInt(property.substring(0,index));
+ int h = Integer.parseInt(property.substring(index+1));
+ size.setWidth(w);
+ size.setHeight(h);
+ }
+ return size;
+ }
+
+ public static void updateCollapsedSize(PictogramElement pe) {
+ IDimension size = GraphicsUtil.calculateSize(pe);
+ FeatureSupport.setCollapsedSize(pe, size);
+ }
+
+ public static void setCollapsedSize(PictogramElement pe, IDimension size) {
+ setCollapsedSize(pe, size.getWidth(), size.getHeight());
+ }
+
+ public static void setCollapsedSize(PictogramElement pe, int width, int height) {
+ Graphiti.getPeService().setPropertyValue(pe, GraphitiConstants.COLLAPSED_SIZE, width+","+height);
+ }
+
+ public static IDimension getCollapsedSize(PictogramElement pe) {
+ IDimension size = GraphicsUtil.calculateSize(pe);
+ String property = Graphiti.getPeService().getPropertyValue(pe, GraphitiConstants.COLLAPSED_SIZE);
+ if (property!=null) {
+ int index = property.indexOf(',');
+ int w = Integer.parseInt(property.substring(0,index));
+ int h = Integer.parseInt(property.substring(index+1));
+ size.setWidth(w);
+ size.setHeight(h);
+ }
+ return size;
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FixDuplicateIdsDialog.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FixDuplicateIdsDialog.java
index 0d6d7edd..1bc28cf4 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FixDuplicateIdsDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/FixDuplicateIdsDialog.java
@@ -165,8 +165,8 @@ public class FixDuplicateIdsDialog extends ListSelectionDialog {
EObject o2 = tuple.getSecond();
return NLS.bind(
Messages.FixDuplicateIdsDialog_Duplicate_ID,
- ModelUtil.getLongDisplayName(o1),
- ModelUtil.getLongDisplayName(o2)
+ ModelUtil.toCanonicalString(o1),
+ ModelUtil.toCanonicalString(o2)
);
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/GraphicsUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/GraphicsUtil.java
new file mode 100644
index 00000000..82a28cc6
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/GraphicsUtil.java
@@ -0,0 +1,712 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.utils;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.di.BPMNPlane;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.datatypes.IDimension;
+import org.eclipse.graphiti.datatypes.ILocation;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.styles.Color;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.FixPointAnchor;
+import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.ILayoutService;
+import org.eclipse.graphiti.services.IPeService;
+
+/**
+ *
+ */
+public class GraphicsUtil {
+
+ static final IGaService gaService = Graphiti.getGaService();
+ static final IPeService peService = Graphiti.getPeService();
+
+ public interface IShapeFilter {
+ boolean matches(Shape shape);
+ }
+
+ /**
+ * Shape Filter that matches only Container Shapes and not Labels
+ */
+ public class ContainerShapeFilter implements GraphicsUtil.IShapeFilter {
+ public boolean matches(Shape shape) {
+ return shape instanceof ContainerShape && !FeatureSupport.isLabelShape(shape);
+ }
+ }
+
+ /**
+ * Code copied from {@link java.awt.geom.Rectangle2D#intersectsLine(double, double, double, double)}
+ * in an attempt to avoid loading the java.awt package here...
+ */
+ public static final class RectangleIntersectsLine {
+ private static final int OUT_LEFT = 1;
+ private static final int OUT_TOP = 2;
+ private static final int OUT_RIGHT = 4;
+ private static final int OUT_BOTTOM = 8;
+
+ private static int outcode(double pX, double pY, double rectX, double rectY, double rectWidth, double rectHeight) {
+ int out = 0;
+ if (rectWidth <= 0) {
+ out |= OUT_LEFT | OUT_RIGHT;
+ } else if (pX < rectX) {
+ out |= OUT_LEFT;
+ } else if (pX > rectX + rectWidth) {
+ out |= OUT_RIGHT;
+ }
+ if (rectHeight <= 0) {
+ out |= OUT_TOP | OUT_BOTTOM;
+ } else if (pY < rectY) {
+ out |= OUT_TOP;
+ } else if (pY > rectY + rectHeight) {
+ out |= OUT_BOTTOM;
+ }
+ return out;
+ }
+
+ public static boolean intersectsLine(double lineX1, double lineY1, double lineX2, double lineY2, double rectX, double rectY, double rectWidth, double rectHeight) {
+ int out1, out2;
+ if ((out2 = outcode(lineX2, lineY2, rectX, rectY, rectWidth, rectHeight)) == 0) {
+ return true;
+ }
+ while ((out1 = outcode(lineX1, lineY1, rectX, rectY, rectWidth, rectHeight)) != 0) {
+ if ((out1 & out2) != 0) {
+ return false;
+ }
+ if ((out1 & (OUT_LEFT | OUT_RIGHT)) != 0) {
+ double x = rectX;
+ if ((out1 & OUT_RIGHT) != 0) {
+ x += rectWidth;
+ }
+ lineY1 = lineY1 + (x - lineX1) * (lineY2 - lineY1) / (lineX2 - lineX1);
+ lineX1 = x;
+ } else {
+ double y = rectY;
+ if ((out1 & OUT_BOTTOM) != 0) {
+ y += rectHeight;
+ }
+ lineX1 = lineX1 + (y - lineY1) * (lineX2 - lineX1) / (lineY2 - lineY1);
+ lineY1 = y;
+ }
+ }
+ return true;
+ }
+ }
+
+ public static class LineSegment {
+ private Point start;
+ private Point end;
+
+ public LineSegment() {
+ this(0,0,0,0);
+ }
+ public LineSegment(Point start, Point end) {
+ this(start.getX(),start.getY(), end.getX(),end.getY());
+ }
+ public LineSegment(int x1, int y1, int x2, int y2) {
+ start = Graphiti.getCreateService().createPoint(x1, y1);
+ end = Graphiti.getCreateService().createPoint(x2, y2);
+ }
+ public void setStart(Point p) {
+ setStart(p.getX(),p.getY());
+ }
+ public void setStart(int x, int y) {
+ start.setX(x);
+ start.setY(y);
+ }
+ public void setEnd(Point p) {
+ setEnd(p.getX(),p.getY());
+ }
+ public void setEnd(int x, int y) {
+ end.setX(x);
+ end.setY(y);
+ }
+ public Point getStart() {
+ return start;
+ }
+ public Point getEnd() {
+ return end;
+ }
+ public double getDistance(Point p) {
+ // for vertical and horizontal line segments, the distance to a point
+ // is the orthogonal distance if the point lies between the start and end
+ // points of the line segment
+ if (isHorizontal()) {
+ if (p.getX()>=start.getX() && p.getX()<=end.getX())
+ return Math.abs(start.getY() - p.getY());
+ }
+ if (isVertical()) {
+ if (p.getY()>=start.getY() && p.getY()<=end.getY())
+ return Math.abs(start.getX() - p.getX());
+ }
+ // otherwise, the distance is the minimum of the distances
+ // of the point to the two endpoints of the line segment
+ double d1 = getDistanceToStart(p);
+ double d2 = getDistanceToEnd(p);
+ return Math.min(d1, d2);
+ }
+ public boolean isHorizontal() {
+ return Math.abs(start.getY() - end.getY()) <= 1;
+ }
+ public boolean isVertical() {
+ return Math.abs(start.getX() - end.getX()) <= 1;
+ }
+ public boolean isSlanted() {
+ return !isHorizontal() && !isVertical();
+ }
+ public double getDistanceToStart(Point p) {
+ return Math.hypot(start.getX()-p.getX(), start.getY()-p.getY());
+ }
+ public double getDistanceToEnd(Point p) {
+ return Math.hypot(end.getX()-p.getX(), end.getY()-p.getY());
+ }
+
+ public String toString() {
+ return "[" + start.getX() + "," + start.getY() +"]" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ " [" + end.getX() + "," + end.getY() +"]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
+
+ /**
+ * Set the location of the PE given absolute Diagram coordinates. If the PE
+ * is a child of a ContainerShape, adjust the coordinates so that they are
+ * relative to the ContainerShape.
+ *
+ * @param pe the PictogramElement to move
+ * @param x the absolute Diagram-relative X coordinate
+ * @param y the absolute Diagram-relative Y coordinate
+ */
+ public static void setLocationRelativeToDiagram(PictogramElement pe, int x, int y) {
+ GraphicsAlgorithm ga = pe.getGraphicsAlgorithm();
+ Object o = pe.eContainer();
+ if (o instanceof ContainerShape && !(o instanceof Diagram)) {
+ ILocation containerLoc = peService.getLocationRelativeToDiagram((Shape)o);
+ x -= containerLoc.getX();
+ y -= containerLoc.getY();
+ }
+ gaService.setLocation(ga, x, y);
+ }
+
+ public static boolean contains(Shape parent, Shape child) {
+ IDimension size = GraphicsUtil.calculateSize(child);
+ ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(child);
+ return GraphicsUtil.contains(parent, GraphicsUtil.createPoint(loc.getX(), loc.getY()))
+ && GraphicsUtil.contains(parent, GraphicsUtil.createPoint(loc.getX() + size.getWidth(), loc.getY()))
+ && GraphicsUtil.contains(parent, GraphicsUtil.createPoint(loc.getX() + size.getWidth(), loc.getY() + size.getHeight()))
+ && GraphicsUtil.contains(parent, GraphicsUtil.createPoint(loc.getX(), loc.getY() + size.getHeight()));
+ }
+
+ public static boolean contains(Shape shape, Point point) {
+ IDimension size = GraphicsUtil.calculateSize(shape);
+ ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
+ int x = point.getX();
+ int y = point.getY();
+ return x>loc.getX() && x<loc.getX() + size.getWidth() &&
+ y>loc.getY() && y<loc.getY() + size.getHeight();
+ }
+
+ public static boolean intersects(Shape shape1, Shape shape2) {
+ ILayoutService layoutService = Graphiti.getLayoutService();
+ ILocation loc2 = layoutService.getLocationRelativeToDiagram(shape2);
+ int x2 = loc2.getX();
+ int y2 = loc2.getY();
+ int w2 = ShapeDecoratorUtil.getShapeWidth(shape2);
+ int h2 = ShapeDecoratorUtil.getShapeHeight(shape2);
+ return GraphicsUtil.intersects(shape1, x2, y2, w2, h2);
+ }
+
+ public static boolean intersects(Shape shape1, int x2, int y2, int w2, int h2) {
+ ILayoutService layoutService = Graphiti.getLayoutService();
+ ILocation loc1 = layoutService.getLocationRelativeToDiagram(shape1);
+ int x1 = loc1.getX();
+ int y1 = loc1.getY();
+ int w1 = ShapeDecoratorUtil.getShapeWidth(shape1);
+ int h1 = ShapeDecoratorUtil.getShapeHeight(shape1);
+ return GraphicsUtil.intersects(x1, y1, w1, h1, x2, y2, w2, h2);
+ }
+
+ public static boolean intersects(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2) {
+ if(x2<=x1 || y1<=y2) {
+ int t1, t2, t3, t4;
+ t1 = x1; x1 = x2; x2 = t1;
+ t2 = y1; y1 = y2; y2 = t2;
+ t3 = w1; w1 = w2; w2 = t3;
+ t4 = h1; h1 = h2; h2 = t4;
+ }
+ if( y2 + h2 < y1 || y1 + h1 < y2 || x2 + w2 < x1 || x1 + w1 < x2 ) {
+ return false;
+ }
+ return true;
+ }
+
+ public static boolean intersects(Shape shape, Connection connection) {
+ Point p1 = GraphicsUtil.createPoint(connection.getStart());
+ Point p3 = GraphicsUtil.createPoint(connection.getEnd());
+ if (connection instanceof FreeFormConnection) {
+ FreeFormConnection ffc = (FreeFormConnection) connection;
+ Point p2 = p1;
+ for (Point p : ffc.getBendpoints()) {
+ if (GraphicsUtil.intersectsLine(shape, p1, p))
+ return true;
+ p2 = p1 = p;
+ }
+ if (GraphicsUtil.intersectsLine(shape, p2, p3))
+ return true;
+ }
+ else if (GraphicsUtil.intersectsLine(shape, p1, p3))
+ return true;
+ return false;
+ }
+
+ public static boolean intersectsLine(Shape shape, Point p1, Point p2) {
+ ILocation loc = peService.getLocationRelativeToDiagram(shape);
+ IDimension size = GraphicsUtil.calculateSize(shape);
+ // adjust the shape rectangle so that a point touching one of the edges
+ // is not considered to be "intersecting"
+ if (size.getWidth()>2) {
+ loc.setX(loc.getX()+1);
+ size.setWidth(size.getWidth()-2);
+ }
+ if (size.getHeight()>2) {
+ loc.setY(loc.getY()+1);
+ size.setHeight(size.getHeight()-2);
+ }
+ return GraphicsUtil.RectangleIntersectsLine.intersectsLine(
+ p1.getX(), p1.getY(), p2.getX(), p2.getY(),
+ loc.getX(), loc.getY(), size.getWidth(), size.getHeight());
+
+ // java.awt.Rectangle rect = new java.awt.Rectangle(loc.getX(), loc.getY(), size.getWidth(), size.getHeight());
+ // return rect.intersectsLine(start.getX(), start.getY(), end.getX(), end.getY());
+ }
+
+ public static boolean intersects(Point p1Start, Point p1End, Point p2Start, Point p2End) {
+ return GraphicsUtil.isLineIntersectingLine(
+ p1Start.getX(), p1Start.getY(),
+ p1End.getX(), p1End.getY(),
+ p2Start.getX(), p2Start.getY(),
+ p2End.getX(), p2End.getY()
+ );
+ }
+
+ /**
+ * Check if two line segments intersects. Integer domain.
+ *
+ * @param x0, y0, x1, y1 End points of first line to check.
+ * @param x2, yy, x3, y3 End points of second line to check.
+ * @return True if the two lines intersects.
+ */
+ public static boolean isLineIntersectingLine(int x0, int y0, int x1,
+ int y1, int x2, int y2, int x3, int y3) {
+ int s1 = GraphicsUtil.sameSide(x0, y0, x1, y1, x2, y2, x3, y3);
+ int s2 = GraphicsUtil.sameSide(x2, y2, x3, y3, x0, y0, x1, y1);
+
+ return s1 <= 0 && s2 <= 0;
+ }
+
+ /**
+ * Check if two points are on the same side of a given line. Algorithm from
+ * Sedgewick page 350.
+ *
+ * @param x0, y0, x1, y1 The line.
+ * @param px0, py0 First point.
+ * @param px1, py1 Second point.
+ * @return <0 if points on opposite sides. =0 if one of the points is
+ * exactly on the line >0 if points on same side.
+ */
+ static int sameSide(int x0, int y0, int x1, int y1,
+ int px0, int py0, int px1, int py1) {
+ int sameSide = 0;
+
+ int dx = x1 - x0;
+ int dy = y1 - y0;
+ int dx1 = px0 - x0;
+ int dy1 = py0 - y0;
+ int dx2 = px1 - x1;
+ int dy2 = py1 - y1;
+
+ // Cross product of the vector from the endpoint of the line to the
+ // point
+ int c1 = dx * dy1 - dy * dx1;
+ int c2 = dx * dy2 - dy * dx2;
+
+ if (c1 != 0 && c2 != 0)
+ sameSide = c1 < 0 != c2 < 0 ? -1 : 1;
+ else if (dx == 0 && dx1 == 0 && dx2 == 0)
+ sameSide = !GraphicsUtil.isBetween(y0, y1, py0) && !GraphicsUtil.isBetween(y0, y1, py1) ? 1
+ : 0;
+ else if (dy == 0 && dy1 == 0 && dy2 == 0)
+ sameSide = !GraphicsUtil.isBetween(x0, x1, px0) && !GraphicsUtil.isBetween(x0, x1, px1) ? 1
+ : 0;
+
+ return sameSide;
+ }
+
+ /**
+ * Return true if c is between a and b.
+ */
+ static boolean isBetween(int a, int b, int c) {
+ return b > a ? c >= a && c <= b : c >= b && c <= a;
+ }
+
+ public static Color clone(Color c) {
+ return c;
+ }
+
+ public static boolean pointsEqual(Point p1, Point p2) {
+ return p1.getX()==p2.getX() && p1.getY()==p2.getY();
+ }
+
+ public static Point createPoint(Point p) {
+ return gaService.createPoint(p.getX(), p.getY());
+ }
+
+ public static Point createPoint(int x, int y) {
+ return gaService.createPoint(x, y);
+ }
+
+ public static Point createPoint(Anchor a) {
+ return GraphicsUtil.createPoint(peService.getLocationRelativeToDiagram(a));
+ }
+
+ public static Point createPoint(AnchorContainer ac) {
+ if (ac instanceof Shape)
+ return GraphicsUtil.createPoint(peService.getLocationRelativeToDiagram((Shape)ac));
+ return null;
+ }
+
+ public static Point getShapeCenter(AnchorContainer shape) {
+ Point p = createPoint(shape);
+ IDimension size = GraphicsUtil.calculateSize(shape);
+ p.setX( p.getX() + size.getWidth()/2 );
+ p.setY( p.getY() + size.getHeight()/2 );
+ return p;
+ }
+
+ public static Point createPoint(ILocation loc) {
+ return createPoint(loc.getX(), loc.getY());
+ }
+
+ public static Point getMidpoint(Point p1, Point p2) {
+ int dx = p2.getX() - p1.getX();
+ int dy = p2.getY() - p1.getY();
+ int x = p1.getX() + dx/2;
+ int y = p1.getY() + dy/2;
+ return createPoint(x,y);
+ }
+
+ public static double getLength(ILocation start, ILocation end) {
+ double a = (double)(start.getX() - end.getX());
+ double b = (double)(start.getY() - end.getY());
+ return Math.sqrt(a*a + b*b);
+ }
+
+ public static double getLength(List<Point> points) {
+ double length = 0;
+ int size = points.size();
+ if (size>=2) {
+ Point p1 = points.get(0);
+ for (int i=1; i<size-1; ++i) {
+ Point p2 = points.get(i);
+ length += GraphicsUtil.getLength(p1,p2);
+ p1 = p2;
+ }
+ }
+ return length;
+ }
+
+ public static double getLength(Point p1, Point p2) {
+ double a = (double)(p1.getX() - p2.getX());
+ double b = (double)(p1.getY() - p2.getY());
+ return Math.sqrt(a*a + b*b);
+ }
+
+ /**
+ * Check if the line segment defined by the two Points is vertical.
+ *
+ * @param p1
+ * @param p2
+ * @return true if the line segment is vertical
+ */
+ public final static boolean isVertical(Point p1, Point p2) {
+ return Math.abs(p1.getX() - p2.getX()) == 0;
+ }
+
+ /**
+ * Check if the line segment defined by the two Points is horizontal.
+ *
+ * @param p1
+ * @param p2
+ * @return true if the line segment is horizontal
+ */
+ public final static boolean isHorizontal(Point p1, Point p2) {
+ return Math.abs(p1.getY() - p2.getY()) == 0;
+ }
+
+ /**
+ * Check if the line segment defined by the two Points is neither horizontal nor vertical.
+ *
+ * @param p1
+ * @param p2
+ * @return true if the line segment is slanted
+ */
+ public final static boolean isSlanted(Point p1, Point p2) {
+ return !isHorizontal(p1, p2) && !isVertical(p1,p2);
+ }
+
+ public static Point getVertMidpoint(Point start, Point end, double fract) {
+ Point m = createPoint(start);
+ int d = (int)(fract * (double)(end.getY() - start.getY()));
+ m.setY(start.getY()+d);
+ return m;
+ }
+
+ public static Point getHorzMidpoint(Point start, Point end, double fract) {
+ Point m = createPoint(start);
+ int d = (int)(fract * (double)(end.getX() - start.getX()));
+ m.setX(start.getX()+d);
+ return m;
+ }
+
+ public static IDimension calculateSize(PictogramElement shape) {
+ GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
+ if (ga!=null)
+ return gaService.calculateSize(ga);
+
+ IDimension dim = null;
+ if (shape instanceof ContainerShape) {
+ ContainerShape cs = (ContainerShape)shape;
+ for (Shape s : cs.getChildren()) {
+ ga = s.getGraphicsAlgorithm();
+ if (ga!=null) {
+ IDimension d = gaService.calculateSize(ga);
+ if (dim==null)
+ dim = d;
+ else {
+ if (d.getWidth() > dim.getWidth())
+ dim.setWidth(d.getWidth());
+ if (d.getHeight() > dim.getHeight())
+ dim.setHeight(d.getHeight());
+ }
+ }
+ }
+ }
+ return dim;
+ }
+
+ public static boolean debug = false;
+
+ public static void dump(String label, List<ContainerShape> shapes) {
+ if (shapes!=null) {
+ if (debug) {
+ System.out.println(label);
+ for (ContainerShape shape : shapes)
+ GraphicsUtil.dump(1, "",shape,0,0); //$NON-NLS-1$
+ System.out.println(""); //$NON-NLS-1$
+ }
+ }
+ }
+
+ public static void dump(String label, Anchor anchor) {
+ if (debug) {
+ System.out.print(label+" "); //$NON-NLS-1$
+ ILocation loc = peService.getLocationRelativeToDiagram(anchor);
+ System.out.print(" at "+loc.getX()+", "+loc.getY()); //$NON-NLS-1$ //$NON-NLS-2$
+ GraphicsUtil.dump(" parent=", (ContainerShape)anchor.getParent()); //$NON-NLS-1$
+ if (AnchorUtil.isBoundaryAnchor(anchor)) {
+ String property = Graphiti.getPeService().getPropertyValue(
+ anchor, GraphitiConstants.BOUNDARY_FIXPOINT_ANCHOR);
+ if (property != null && anchor instanceof FixPointAnchor) {
+ System.out.println(" location="+AnchorLocation.getLocation(property)); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ public static void dump(String label, ContainerShape shape) {
+ GraphicsUtil.dump(0, label,shape,0,0);
+ }
+
+ public static void dump(int level, String label, ContainerShape shape) {
+ GraphicsUtil.dump(level, label,shape,0,0);
+ }
+
+ public static void dump(int level, String label, ContainerShape shape, int x, int y) {
+ if (debug) {
+ String text = GraphicsUtil.getDebugText(shape);
+ for (int i=0; i<level; ++i)
+ System.out.print(" "); //$NON-NLS-1$
+ System.out.print(label+" "+text); //$NON-NLS-1$
+ if (x>0 && y>0) {
+ System.out.println(" at "+x+", "+y); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ else
+ System.out.println(""); //$NON-NLS-1$
+ }
+ }
+
+ public static String getDebugText(ContainerShape shape) {
+ EObject be = BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
+ String id = ""; //$NON-NLS-1$
+ if (be instanceof BaseElement) {
+ id = " " + ((BaseElement)be).getId(); //$NON-NLS-1$
+ }
+ String text = be.eClass().getName()+id+": "+ExtendedPropertiesProvider.getTextValue(be); //$NON-NLS-1$
+ return text;
+ }
+
+ public static void dump(String label) {
+ if (debug) {
+ System.out.println(label);
+ }
+ }
+
+ public static GraphicsUtil.LineSegment[] getEdges(Shape shape) {
+ ILocation loc = peService.getLocationRelativeToDiagram(shape);
+ IDimension size = calculateSize(shape);
+ GraphicsUtil.LineSegment top = new GraphicsUtil.LineSegment(loc.getX(),loc.getY(),
+ loc.getX()+size.getWidth(), loc.getY());
+ GraphicsUtil.LineSegment left = new GraphicsUtil.LineSegment(loc.getX(),loc.getY(), loc.getX(),
+ loc.getY()+size.getHeight());
+ GraphicsUtil.LineSegment bottom = new GraphicsUtil.LineSegment(loc.getX(), loc.getY()+size.getHeight(),
+ loc.getX()+size.getWidth(), loc.getY()+size.getHeight());
+ GraphicsUtil.LineSegment right = new GraphicsUtil.LineSegment(loc.getX()+size.getWidth(), loc.getY(),
+ loc.getX()+size.getWidth(), loc.getY()+size.getHeight());
+ return new GraphicsUtil.LineSegment[] {top, bottom, left, right};
+ }
+
+ public static GraphicsUtil.LineSegment findNearestEdge(Shape shape, Point p) {
+ GraphicsUtil.LineSegment edges[] = getEdges(shape);
+ GraphicsUtil.LineSegment top = edges[0];
+ GraphicsUtil.LineSegment bottom = edges[1];
+ GraphicsUtil.LineSegment left = edges[2];
+ GraphicsUtil.LineSegment right = edges[3];
+ double minDist;
+ double dist;
+ GraphicsUtil.LineSegment result;
+
+ minDist = top.getDistance(p);
+ result = top;
+
+ dist = bottom.getDistance(p);
+ if (dist<minDist) {
+ minDist = dist;
+ result = bottom;
+ }
+ dist = left.getDistance(p);
+ if (dist<minDist) {
+ minDist = dist;
+ result = left;
+ }
+ dist = right.getDistance(p);
+ if (dist<minDist) {
+ minDist = dist;
+ result = right;
+ }
+ return result;
+ }
+
+ public static void sendToFront(Shape shape) {
+ peService.sendToFront(shape);
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(shape, BPMNShape.class);
+ if (bpmnShape!=null) {
+ BPMNPlane plane = (BPMNPlane)bpmnShape.eContainer();
+ plane.getPlaneElement().remove(bpmnShape);
+ plane.getPlaneElement().add(bpmnShape);
+ }
+ }
+
+ public static void sendToBack(Shape shape) {
+ peService.sendToBack(shape);
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(shape, BPMNShape.class);
+ if (bpmnShape!=null) {
+ BPMNPlane plane = (BPMNPlane)bpmnShape.eContainer();
+ plane.getPlaneElement().remove(bpmnShape);
+ plane.getPlaneElement().add(0,bpmnShape);
+ }
+ }
+
+ public static Shape findShapeAt(ContainerShape containerShape, Point p, IShapeFilter filter) {
+ for (Shape c : containerShape.getChildren()) {
+ if (c.isActive()) {
+ if (c instanceof ContainerShape) {
+ Shape cc = findShapeAt((ContainerShape) c, p, filter);
+ if (cc!=null)
+ return cc;
+ }
+ if (contains(c, p)) {
+ if (filter.matches(c)) {
+ return c;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Check if the given Point is with a given distance of the given Location.
+ *
+ * @param p - the Point to check
+ * @param loc - the target Location
+ * @param dist - the maximum distance horizontally and vertically from the given Location
+ * @return true if the point lies within the rectangular area of the Location.
+ */
+ public static boolean isPointNear(Point p, ILocation loc, int dist) {
+ int x = p.getX();
+ int y = p.getY();
+ int lx = loc.getX();
+ int ly = loc.getY();
+ return lx-dist <= x && x <= lx+dist && ly-dist <= y && y <= ly+dist;
+ }
+
+ public static Rectangle getBoundingRectangle(List<PictogramElement> pes) {
+ int xMin = Integer.MAX_VALUE;
+ int yMin = Integer.MAX_VALUE;
+ int xMax = Integer.MIN_VALUE;
+ int yMax = Integer.MIN_VALUE;
+
+ for (PictogramElement pe : pes) {
+ if (pe instanceof Shape) {
+ ILocation loc = Graphiti.getPeService().getLocationRelativeToDiagram((Shape)pe);
+ IDimension size = calculateSize(pe);
+ if (loc.getX()<xMin)
+ xMin = loc.getX();
+ if (loc.getY()<yMin)
+ yMin = loc.getY();
+ if (loc.getX() + size.getWidth()>xMax)
+ xMax = loc.getX() + size.getWidth();
+ if (loc.getY() + size.getHeight()>yMax)
+ yMax = loc.getY() + size.getHeight();
+ }
+ }
+ return new Rectangle(xMin, yMin, xMax-xMin, yMax-yMin);
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ImportUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ImportUtil.java
index 92fe8e39..6227e903 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ImportUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ImportUtil.java
@@ -22,12 +22,12 @@ import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.Interface;
import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.ItemKind;
+import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceSetImpl;
import org.eclipse.bpmn2.util.Bpmn2Resource;
-import org.eclipse.bpmn2.util.ImportHelper;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.emf.common.util.TreeIterator;
@@ -400,62 +400,67 @@ public class ImportUtil {
if (imp!=null) {
definitions.getImports().add(imp);
NamespaceUtil.addNamespace(imp.eResource(), imp.getNamespace());
+ addImportObjects(imp, importObject);
+ }
+ }
+ return imp;
+ }
+
+ public void addImportObjects(Import imp, Object importObject) {
- if (importObject instanceof org.eclipse.wst.wsdl.Definition) {
- // WSDL Definition
- Definition wsdlDefinition = (Definition)importObject;
+ final Definitions definitions = (Definitions) ModelUtil.getDefinitions(imp);
+
+ if (importObject instanceof org.eclipse.wst.wsdl.Definition) {
+ // WSDL Definition
+ Definition wsdlDefinition = (Definition)importObject;
- // WSDL Bindings are optional, instead create a new
- // BPMN2 Interface for each PortType found in the WSDL.
+ // WSDL Bindings are optional, instead create a new
+ // BPMN2 Interface for each PortType found in the WSDL.
// for (Binding b : (List<Binding>)wsdlDefinition.getEBindings()) {
// createInterface(definitions, imp, b.getEPortType());
// }
- for (PortType pt : (List<PortType>)wsdlDefinition.getEPortTypes()) {
- createInterface(definitions, imp, pt);
- }
+ for (PortType pt : (List<PortType>)wsdlDefinition.getEPortTypes()) {
+ createInterface(definitions, imp, pt);
+ }
- // create XSD types (if any) defined in the WSDL
- Types t = wsdlDefinition.getETypes();
- if (t!=null) {
- for (Object s : t.getSchemas()) {
- if (s instanceof XSDSchema) {
- XSDSchema schema = (XSDSchema)s;
-
- for (XSDElementDeclaration elem : schema.getElementDeclarations()) {
- createItemDefinition(definitions, imp, elem, ItemKind.INFORMATION);
- }
- }
- }
- }
- }
- else if (importObject instanceof XSDSchema){
- XSDSchema schema = (XSDSchema)importObject;
+ // create XSD types (if any) defined in the WSDL
+ Types t = wsdlDefinition.getETypes();
+ if (t!=null) {
+ for (Object s : t.getSchemas()) {
+ if (s instanceof XSDSchema) {
+ XSDSchema schema = (XSDSchema)s;
- for (XSDElementDeclaration elem : schema.getElementDeclarations()) {
- createItemDefinition(definitions, imp, elem, ItemKind.INFORMATION);
+ for (XSDElementDeclaration elem : schema.getElementDeclarations()) {
+ createItemDefinition(definitions, imp, elem, ItemKind.INFORMATION);
+ }
}
}
- else if (importObject instanceof IType) {
- IType clazz = (IType)importObject;
+ }
+ }
+ else if (importObject instanceof XSDSchema){
+ XSDSchema schema = (XSDSchema)importObject;
- createItemDefinition(definitions, imp, clazz);
- // TODO: automatically create an interface too?
- //createInterface(definitions, imp, clazz);
- }
- else if (importObject instanceof Definitions) {
- // what to do here?
- }
+ for (XSDElementDeclaration elem : schema.getElementDeclarations()) {
+ createItemDefinition(definitions, imp, elem, ItemKind.INFORMATION);
}
}
- return imp;
+ else if (importObject instanceof IType) {
+ IType clazz = (IType)importObject;
+
+ createItemDefinition(definitions, imp, clazz);
+ // TODO: automatically create an interface too?
+ //createInterface(definitions, imp, clazz);
+ }
+ else if (importObject instanceof Definitions) {
+ // what to do here?
+ }
}
public static String makeURIRelative(URI baseURI, String s) {
// convert platform URI to a relative URI string
-// URI uri = URI.createURI(s);
-// uri = uri.deresolve(baseURI, false, true, true);
-// return uri.toString();
- return s;
+ URI uri = URI.createURI(s);
+ uri = uri.deresolve(baseURI, false, true, true);
+ return uri.toString();
}
/**
@@ -1084,6 +1089,20 @@ public class ImportUtil {
public ItemDefinition createItemDefinition(Definitions definitions, Import imp, EObject structureRef, ItemKind kind) {
ItemDefinition itemDef = Bpmn2ModelerFactory.create(ItemDefinition.class);
itemDef.setImport(imp);
+ if (kind==null) {
+ // try to determine the ItemKind based on the type of Process:
+ // if the Process is executable ItemKind is INFORMATION,
+ // else PHYSICAL
+ List<Process> processes = ModelUtil.getAllRootElements(definitions, Process.class);
+ if (processes.size()>0) {
+ if (processes.get(0).isIsExecutable())
+ kind = ItemKind.INFORMATION;
+ else
+ kind = ItemKind.PHYSICAL;
+ }
+ else
+ kind = ItemKind.INFORMATION;
+ }
itemDef.setItemKind(kind);
itemDef.setStructureRef(structureRef);
ItemDefinition i = findItemDefinition(definitions, itemDef);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaProjectClassLoader.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaProjectClassLoader.java
index f1c4349c..f1c4349c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaProjectClassLoader.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaProjectClassLoader.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaReflectionUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaReflectionUtil.java
index a28ebf23..a28ebf23 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaReflectionUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/JavaReflectionUtil.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Messages.java
index 2117d0df..36c00397 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.utils;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java
index eac94035..498e3fc1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ModelUtil.java
@@ -14,7 +14,6 @@ package org.eclipse.bpmn2.modeler.core.utils;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
@@ -22,8 +21,6 @@ import java.util.Map;
import org.eclipse.bpmn2.AdHocSubProcess;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.Bpmn2Factory;
-import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Choreography;
import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.Collaboration;
@@ -31,7 +28,6 @@ import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.DocumentRoot;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.ExtensionAttributeValue;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
@@ -41,20 +37,15 @@ import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.Transaction;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNPlane;
-import org.eclipse.bpmn2.di.BpmnDiPackage;
import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.adapters.AdapterRegistry;
import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.core.adapters.INamespaceMap;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceSetImpl;
-import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
-import org.eclipse.bpmn2.util.Bpmn2Resource;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
+import org.eclipse.bpmn2.modeler.core.validation.SyntaxCheckerUtils;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.dd.dc.DcPackage;
-import org.eclipse.dd.di.DiPackage;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
@@ -62,40 +53,29 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.DynamicEObjectImpl;
-import org.eclipse.emf.ecore.impl.EAttributeImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.FeatureMap.Entry;
-import org.eclipse.emf.ecore.util.FeatureMapUtil;
+import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.platform.IDiagramContainer;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.xsd.XSDAttributeDeclaration;
import org.eclipse.xsd.XSDElementDeclaration;
@@ -112,6 +92,34 @@ public class ModelUtil {
// Map of ID strings and sequential counters for each BPMN2 element description.
public static HashMap<String, Integer> defaultIds = new HashMap<String, Integer>();
+ public enum Bpmn2DiagramType {
+ NONE("None"), //$NON-NLS-1$
+ PROCESS("Process"), //$NON-NLS-1$
+ CHOREOGRAPHY("Choreography"), //$NON-NLS-1$
+ COLLABORATION("Collaboration"), //$NON-NLS-1$
+ CONVERSATION("Conversation"); //$NON-NLS-1$
+ String value;
+ Bpmn2DiagramType(String value) {
+ this.value = value;
+ }
+
+ public static Bpmn2DiagramType fromString(String value) {
+ if (value != null) {
+ for (Bpmn2DiagramType type : Bpmn2DiagramType.values()) {
+ if (value.equalsIgnoreCase(type.value)) {
+ return type;
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ return value;
+ }
+ }
+
/**
* Clear the IDs hashmap for the given EMF Resource. This should be called
* when the editor is disposed to avoid unnecessary growth of the IDs table.
@@ -146,7 +154,7 @@ public class ModelUtil {
}
private static Object getKey(EObject obj) {
- Resource resource = getResource(obj);
+ Resource resource = ObjectPropertyProvider.getResource(obj);
if (resource==null) {
// System.out.println("The object type "+obj.getClass().getName()+" is not contained in a Resource");
return null;
@@ -157,7 +165,10 @@ public class ModelUtil {
private static Object getKey(Resource res) {
Assert.isTrue(res!=null);
- return res.getResourceSet();
+ // we may have more than one Bpmn2Resource in our ResourceSet asking for IDs
+ String key = Integer.toString(res.getResourceSet().hashCode());
+ key += "-" + res.getResourceSet().getResources().indexOf(res); //$NON-NLS-1$
+ return key;
}
/**
@@ -194,6 +205,8 @@ public class ModelUtil {
}
public static String generateID(EObject obj, Resource res, String name) {
+ if (res==null)
+ res = ObjectPropertyProvider.getResource(obj);
Object key = (res==null ? getKey(obj) : getKey(res));
if (key!=null) {
Hashtable<String, EObject> tab = ids.get(key);
@@ -299,7 +312,7 @@ public class ModelUtil {
* @param obj - the BPMN2 object
*/
public static String setID(EObject obj) {
- return setID(obj,getResource(obj));
+ return setID(obj,ObjectPropertyProvider.getResource(obj));
}
/**
@@ -312,11 +325,13 @@ public class ModelUtil {
*/
public static String setID(EObject obj, Resource res) {
String id = null;
- EStructuralFeature feature = ((EObject)obj).eClass().getEStructuralFeature("id"); //$NON-NLS-1$
- if (feature!=null) {
- if (obj.eGet(feature)==null) {
- id = generateID(obj,res);
- obj.eSet(feature, id);
+ if (obj!=null) {
+ EStructuralFeature feature = ((EObject)obj).eClass().getEStructuralFeature("id"); //$NON-NLS-1$
+ if (feature!=null) {
+ if (obj.eGet(feature)==null) {
+ id = generateID(obj,res);
+ obj.eSet(feature, id);
+ }
}
}
return id;
@@ -359,9 +374,10 @@ public class ModelUtil {
if (element != null) {
EStructuralFeature feature = element.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
if (feature==null)
- feature = getAnyAttribute(element,"name"); //$NON-NLS-1$
- if (feature!=null && element.eGet(feature) instanceof String)
- return (String) element.eGet(feature);
+ feature = ModelDecorator.getAnyAttribute(element,"name"); //$NON-NLS-1$
+ Object value;
+ if (feature!=null && (value = element.eGet(feature)) instanceof String)
+ return (String) value;
}
return null;
}
@@ -369,17 +385,11 @@ public class ModelUtil {
public static boolean hasName(BaseElement obj) {
EStructuralFeature feature = obj.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
if (feature==null)
- feature = getAnyAttribute(obj,"name"); //$NON-NLS-1$
+ feature = ModelDecorator.getAnyAttribute(obj,"name"); //$NON-NLS-1$
return feature!=null;
}
-/*
- public static String getLabel(EObject object) {
- if (object==null)
- return "";
- return toDisplayName(object.eClass().getName());
- }
-*/
- public static String toDisplayName(String anyName) {
+
+ public static String toCanonicalString(String anyName) {
// get rid of the "Impl" java suffix
anyName = anyName.replaceAll("Impl$", ""); //$NON-NLS-1$ //$NON-NLS-2$
String displayName = ""; //$NON-NLS-1$
@@ -401,6 +411,57 @@ public class ModelUtil {
}
return displayName.trim();
}
+
+ /*
+ * Fallbacks in case a property provider does not exist
+ */
+ public static String toCanonicalString(EObject object) {
+ if (object==null)
+ return ""; //$NON-NLS-1$
+
+ String objName = null;
+ if (object instanceof BPMNDiagram) {
+ Bpmn2DiagramType type = getDiagramType((BPMNDiagram)object);
+ if (type == Bpmn2DiagramType.CHOREOGRAPHY) {
+ objName = Messages.ModelUtil_Choreography_Diagram;
+ }
+ else if (type == Bpmn2DiagramType.COLLABORATION) {
+ objName = Messages.ModelUtil_Collaboration_Diagram;
+ }
+ else if (type == Bpmn2DiagramType.PROCESS) {
+ objName = Messages.ModelUtil_Process_Diagram;
+ }
+ }
+ if (objName==null){
+ objName = toCanonicalString( object.eClass().getName() );
+ }
+ EStructuralFeature feature = object.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+ if (feature!=null) {
+ String name = (String)object.eGet(feature);
+ if (name==null || name.isEmpty())
+ name = NLS.bind(Messages.ModelUtil_Unnamed_Object, objName);
+ else
+ name = objName + " \"" + name + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ return name;
+ }
+ feature = object.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
+ if (feature!=null) {
+ String id = (String)object.eGet(feature);
+ if (id==null || id.isEmpty())
+ id = Messages.ModelUtil_Unknown_Object + objName;
+ else
+ id = objName + " \"" + id + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ return id;
+ }
+ feature = object.eClass().getEStructuralFeature("qName"); //$NON-NLS-1$
+ if (feature!=null) {
+ Object qName = object.eGet(feature);
+ if (qName!=null) {
+ return qName.toString();
+ }
+ }
+ return objName;
+ }
@SuppressWarnings("unchecked")
public static List<EventDefinition> getEventDefinitions(Event event) {
@@ -489,87 +550,16 @@ public class ModelUtil {
public static Object resolveXSDObject(Object xsdObject) {
if (xsdObject instanceof XSDElementDeclaration) {
XSDElementDeclaration resolvedElement = ((XSDElementDeclaration)xsdObject).getResolvedElementDeclaration();
- if (resolvedElement != null) xsdObject = resolvedElement;
+ if (resolvedElement != null)
+ xsdObject = resolvedElement;
} else if (xsdObject instanceof XSDAttributeDeclaration) {
XSDAttributeDeclaration resolvedAttribute = ((XSDAttributeDeclaration)xsdObject).getResolvedAttributeDeclaration();
- if (resolvedAttribute != null) xsdObject = resolvedAttribute;
+ if (resolvedAttribute != null)
+ xsdObject = resolvedAttribute;
}
return xsdObject;
}
- /**
- * @param eObject
- * @return the namespace map for the given object.
- */
-
- @SuppressWarnings("unchecked")
- static public INamespaceMap<String, String> getNamespaceMap(EObject eObject) {
-
- if (eObject == null) {
- throw new NullPointerException(
- "eObject cannot be null in getNamespaceMap()"); //$NON-NLS-1$
- }
-
- INamespaceMap<String, String> nsMap = null;
- // Bug 120110 - this eObject may not have a namespace map, but its
- // ancestors might, so keep searching until we find one or until
- // we run out of ancestors.
- while (nsMap==null && eObject!=null) {
- nsMap = AdapterRegistry.INSTANCE.adapt(
- eObject, INamespaceMap.class);
- if (nsMap==null)
- eObject = eObject.eContainer();
- }
-
- if (nsMap == null) {
- throw new IllegalStateException(
- "INamespaceMap cannot be attached to an eObject"); //$NON-NLS-1$
- }
-
- return nsMap;
- }
-
- public static String getNamespacePrefix(EObject eObject, String namespace) {
-
- for (EObject context = eObject; context != null; context = context
- .eContainer()) {
- List<String> pfxList = getNamespaceMap(context).getReverse(
- namespace);
- if (pfxList.size() > 0) {
- return pfxList.get(0);
- }
- }
- return null;
- }
-
- public enum Bpmn2DiagramType {
- NONE("None"), //$NON-NLS-1$
- PROCESS("Process"), //$NON-NLS-1$
- CHOREOGRAPHY("Choreography"), //$NON-NLS-1$
- COLLABORATION("Collaboration"), //$NON-NLS-1$
- CONVERSATION("Conversation"); //$NON-NLS-1$
- String value;
- Bpmn2DiagramType(String value) {
- this.value = value;
- }
-
- public static Bpmn2DiagramType fromString(String value) {
- if (value != null) {
- for (Bpmn2DiagramType type : Bpmn2DiagramType.values()) {
- if (value.equalsIgnoreCase(type.value)) {
- return type;
- }
- }
- }
- return null;
- }
-
- @Override
- public String toString() {
- return value;
- }
- }
-
public static Bpmn2DiagramType getDiagramType(String name) {
for (Bpmn2DiagramType t : Bpmn2DiagramType.values()) {
if (t.toString().equalsIgnoreCase(name))
@@ -579,7 +569,8 @@ public class ModelUtil {
}
public static DiagramEditor getDiagramEditor(EObject object) {
- return getDiagramEditor(getResource(object));
+ DiagramEditor ed = getDiagramEditor(ObjectPropertyProvider.getResource(object));
+ return ed;
}
public static DiagramEditor getDiagramEditor(Resource res) {
@@ -616,7 +607,7 @@ public class ModelUtil {
}
public static Bpmn2DiagramType getDiagramType(BPMNDiagram diagram) {
- if (diagram!=null && getResource(diagram)!=null) {
+ if (diagram!=null && ObjectPropertyProvider.getResource(diagram)!=null) {
BPMNPlane plane = diagram.getPlane();
if (plane!=null) {
BaseElement be = plane.getBpmnElement();
@@ -675,288 +666,8 @@ public class ModelUtil {
return Messages.ModelUtil_Unknown_Diagram_Type;
}
- public static List<EStructuralFeature> getAnyAttributes(EObject object) {
- List<EStructuralFeature> list = new ArrayList<EStructuralFeature>();
- EStructuralFeature anyAttribute = ((EObject)object).eClass().getEStructuralFeature("anyAttribute"); //$NON-NLS-1$
- if (anyAttribute!=null && object.eGet(anyAttribute) instanceof BasicFeatureMap) {
- BasicFeatureMap map = (BasicFeatureMap)object.eGet(anyAttribute);
- for (Entry entry : map) {
- EStructuralFeature feature = entry.getEStructuralFeature();
- list.add(feature);
- }
- }
- return list;
- }
-
- public static EStructuralFeature getAnyAttribute(EObject object, String name) {
- EStructuralFeature anyAttribute = ((EObject)object).eClass().getEStructuralFeature("anyAttribute"); //$NON-NLS-1$
- if (anyAttribute!=null && object.eGet(anyAttribute) instanceof BasicFeatureMap) {
- BasicFeatureMap map = (BasicFeatureMap)object.eGet(anyAttribute);
- for (Entry entry : map) {
- EStructuralFeature feature = entry.getEStructuralFeature();
- if (feature.getName().equals(name))
- return feature;
- }
- }
- return null;
- }
-
- /**
- * Removed "deprecated" annotation: ModelExtensionDescriptor.populateObject() needs this
- */
- public static EStructuralFeature addAnyAttribute(EObject childObject, String name, String type, Object value) {
- EPackage pkg = childObject.eClass().getEPackage();
- String nsURI = pkg.getNsURI();
- return addAnyAttribute(childObject, nsURI, name, type, value);
- }
-
- /**
- * Removed "deprecated" annotation: ModelExtensionDescriptor.populateObject() needs this
- */
- @SuppressWarnings("unchecked")
- public static EStructuralFeature addAnyAttribute(EObject childObject, String namespace, String name, String type, Object value) {
- EStructuralFeature attr = null;
- EClass eclass = null;
- if (childObject instanceof EClass) {
- eclass = (EClass)childObject;
- childObject = ExtendedPropertiesAdapter.getDummyObject(eclass);
- }
- else
- eclass = childObject.eClass();
- EStructuralFeature anyAttribute = eclass.getEStructuralFeature(Bpmn2Package.BASE_ELEMENT__ANY_ATTRIBUTE);
- List<BasicFeatureMap.Entry> anyMap = (List<BasicFeatureMap.Entry>)childObject.eGet(anyAttribute);
- if (anyMap==null)
- return null;
- for (BasicFeatureMap.Entry fe : anyMap) {
- if (fe.getEStructuralFeature() instanceof EAttributeImpl) {
- EAttributeImpl a = (EAttributeImpl) fe.getEStructuralFeature();
- if (namespace.equals(a.getExtendedMetaData().getNamespace()) && name.equals(a.getName())) {
- attr = a;
- break;
- }
- }
- }
-
- // this featuremap can only hold attributes, not elements
- if (type==null)
- type = "E" + value.getClass().getSimpleName(); //$NON-NLS-1$
- EDataType eDataType = (EDataType)ModelUtil.getEClassifierFromString(null, type);//(EDataType)EcorePackage.eINSTANCE.getEClassifier(type);
- if (eDataType!=null) {
- if (attr==null) {
- attr = ExtendedMetaData.INSTANCE.demandFeature(namespace, name, false);
- attr.setEType(eDataType);
- anyMap.add( FeatureMapUtil.createEntry(attr, value) );
- }
- else {
- EClassifier dt = attr.getEType();
- if (dt==null || !eDataType.getInstanceClass().isAssignableFrom(dt.getInstanceClass()))
- throw new IllegalArgumentException(
- NLS.bind(
- Messages.ModelUtil_Illegal_Value,
- new Object[] {
- childObject.eClass().getName(),
- attr.getName(),
- attr.getEType().getName(),
- value.toString()
- }
- )
- );
- anyMap.add( FeatureMapUtil.createEntry(attr, value) );
- }
- }
- else if (attr==null) {
- attr = ExtendedMetaData.INSTANCE.demandFeature(namespace, name, false);
- anyMap.add( FeatureMapUtil.createEntry(attr, value) );
- }
- else {
- anyMap.add( FeatureMapUtil.createEntry(attr, value) );
- }
- return attr;
- }
-
- public static boolean isBpmnPackage(EPackage pkg) {
- return pkg == Bpmn2Package.eINSTANCE || pkg == BpmnDiPackage.eINSTANCE || pkg == DcPackage.eINSTANCE || pkg == DiPackage.eINSTANCE;
- }
-
- public static EAttribute createDynamicAttribute(EPackage pkg, EObject object, String name, String type) {
- if (isBpmnPackage(pkg)) {
- String namespace = TargetRuntime.getDefaultRuntime().getRuntimeExtension().getTargetNamespace(Bpmn2DiagramType.NONE);
- EStructuralFeature feature = ModelUtil.addAnyAttribute(object, namespace, name, type, null);
- if (feature instanceof EAttribute)
- return (EAttribute) feature;
- throw new IllegalArgumentException(NLS.bind(Messages.ModelUtil_Illegal_EPackage_For_Attribute, pkg.getName()));
- }
- EClass eClass = object instanceof EClass ? (EClass)object : object.eClass();
- EAttribute attr = null;
- EClass docRoot = (EClass)pkg.getEClassifier("DocumentRoot"); //$NON-NLS-1$
- if (docRoot==null) {
- ExtendedMetaData.INSTANCE.demandPackage(pkg.getNsURI());
- docRoot = ExtendedMetaData.INSTANCE.getDocumentRoot(pkg);
- }
- if (docRoot!=null) {
- for (EStructuralFeature f : docRoot.getEStructuralFeatures()) {
- if (f.getName().equals(name)) {
- if (f instanceof EAttribute) {
- attr = (EAttribute)f;
- break;
- }
- return null;
- }
- }
- }
-
- if (type==null)
- type = "EString"; //$NON-NLS-1$
-
- EClassifier eClassifier = null;
- if (type!=null) {
- eClassifier = getEClassifierFromString(pkg,type);
- if (eClassifier==null || !(eClassifier instanceof EDataType)) {
- String message =
- NLS.bind(
- Messages.ModelUtil_Unknown_Attribute_Data_Type,
- new Object[] {
- name,
- eClass.getName(),
- type
- }
- );
-
- MessageDialog.openError(Display.getDefault().getActiveShell(),
- Messages.ModelUtil_Internal_Error,
- message);
- throw new IllegalArgumentException(message);
- }
- }
- if (attr==null) {
- attr = EcorePackage.eINSTANCE.getEcoreFactory().createEAttribute();
- attr.setName(name);
- attr.setEType(eClassifier);
- ExtendedMetaData.INSTANCE.setFeatureKind(attr,ExtendedMetaData.ATTRIBUTE_FEATURE);
-
- docRoot.getEStructuralFeatures().add(attr);
- ExtendedMetaData.INSTANCE.setNamespace(attr, pkg.getNsURI());
- ExtendedMetaData.INSTANCE.setDocumentRoot(docRoot);
- }
- else if (eClassifier!=null)
- attr.setEType(eClassifier);
-
- // force this feature to be serialized regardless of whether its value is the default value
- attr.setUnsettable(true);
-
- return attr;
- }
-
- public static EReference createDynamicReference(EPackage pkg, EObject object, String name, String type) {
- if (isBpmnPackage(pkg)) {
- throw new IllegalArgumentException(NLS.bind(Messages.ModelUtil_Illegal_EPackage_For_Reference,pkg.getName()));
- }
- EClass eClass = object instanceof EClass ? (EClass)object : object.eClass();
- EReference ref = null;
- EClass docRoot = ExtendedMetaData.INSTANCE.getDocumentRoot(pkg);
- if (docRoot==null) {
- ExtendedMetaData.INSTANCE.demandPackage(pkg.getNsURI());
- docRoot = ExtendedMetaData.INSTANCE.getDocumentRoot(pkg);
- if (docRoot==null) {
- EClassifier e = pkg.getEClassifier("DocumentRoot"); //$NON-NLS-1$
- if (e instanceof EClass) {
- docRoot = (EClass)e;
- }
- }
- }
- if (docRoot!=null) {
- for (EStructuralFeature f : docRoot.getEStructuralFeatures()) {
- if (f.getName().equals(name)) {
- if (f instanceof EReference) {
- ref = (EReference)f;
- break;
- }
- return null;
- }
- }
- }
-
- EClassifier eClassifier = null;
- if (type!=null) {
- eClassifier = getEClassifierFromString(pkg,type);
- if (eClassifier==null || !(eClassifier instanceof EClass)) {
- String message =
- NLS.bind(
- Messages.ModelUtil_Unknown_Reference_Object_Type,
- new Object[] {
- name,
- eClass.getName(),
- type
- }
- );
-
- MessageDialog.openError(Display.getDefault().getActiveShell(),
- Messages.ModelUtil_Internal_Error,
- message);
- throw new IllegalArgumentException(message);
- }
- }
- if (ref==null) {
- ref = EcorePackage.eINSTANCE.getEcoreFactory().createEReference();
- ref.setName(name);
- ref.setEType(eClassifier);
- ExtendedMetaData.INSTANCE.setFeatureKind(ref,ExtendedMetaData.ATTRIBUTE_FEATURE);
-
- docRoot.getEStructuralFeatures().add(ref);
- ExtendedMetaData.INSTANCE.setNamespace(ref, pkg.getNsURI());
- ExtendedMetaData.INSTANCE.setDocumentRoot(docRoot);
- }
- else if (eClassifier!=null)
- ref.setEType(eClassifier);
-
- return ref;
- }
-
- public static boolean removeDynamicFeature(EPackage pkg, EObject object, String name) {
- if (isBpmnPackage(pkg)) {
- throw new IllegalArgumentException("Can not remove dynamic feature from "+pkg.getName()); //$NON-NLS-1$
- }
-
- EStructuralFeature anyAttribute = ((EObject)object).eClass().getEStructuralFeature("anyAttribute"); //$NON-NLS-1$
- if (anyAttribute!=null && object.eGet(anyAttribute) instanceof BasicFeatureMap) {
- BasicFeatureMap map = (BasicFeatureMap)object.eGet(anyAttribute);
- for (Entry entry : map) {
- EStructuralFeature feature = entry.getEStructuralFeature();
- if (feature.getName().equals(name)) {
- map.remove(entry);
- return true;
- }
- }
- }
-
- return false;
- }
-
- public static EClassifier getEClassifierFromString(EPackage pkg, String type) {
- EClassifier eClassifier = null;
- if (type==null) {
- return EcorePackage.eINSTANCE.getEObject();
- }
- if (pkg!=null) {
- eClassifier = pkg.getEClassifier(type);
- if (eClassifier!=null)
- return eClassifier;
- }
-
- eClassifier = EcorePackage.eINSTANCE.getEClassifier(type);
- if (eClassifier!=null)
- return eClassifier;
-
- eClassifier = Bpmn2Package.eINSTANCE.getEClassifier(type);
- if (eClassifier!=null)
- return eClassifier;
-
- eClassifier = BpmnDiPackage.eINSTANCE.getEClassifier(type);
- if (eClassifier!=null)
- return eClassifier;
-
- return null;
- }
+ private static EClass stringWrapperClass = null;
+ private static EPackage myPackage = null;
public static EObject createStringWrapper(String value) {
DynamicEObjectImpl de = new DynamicEObjectImpl() {
@@ -966,34 +677,55 @@ public class ModelUtil {
}
@Override
- public boolean equals(Object object) {
- if (object instanceof DynamicEObjectImpl) {
- DynamicEObjectImpl that = (DynamicEObjectImpl) object;
- if (eProxyURI()==null) {
- return that.eProxyURI()==null;
- }
- String thisString = eProxyURI().toString();
- String thatString = that.eProxyURI() == null ? null : that.eProxyURI().toString();
- return thisString.equals(thatString);
- }
- else if (object instanceof String) {
- String thisString = eProxyURI().toString();
- return thisString.equals(object);
+ public boolean equals(Object that) {
+ String thisValue = this.toString();
+ String thatValue = that.toString();
+ if (thisValue==null) {
+ return thatValue==null;
}
- return super.equals(object);
+ return thisValue.equals(thatValue);
}
+ @Override
+ public String toString() {
+ EStructuralFeature feature = this.eClass().getEStructuralFeature("value"); //$NON-NLS-1$
+ if (feature!=null) {
+ return (String)eGet(feature);
+ }
+ return null;
+ }
};
- de.eSetClass(EcorePackage.eINSTANCE.getEObject());
- de.eSetProxyURI(URI.createURI(value));
+
+ if (stringWrapperClass==null) {
+ myPackage = EcoreFactory.eINSTANCE.createEPackage();
+ stringWrapperClass = EcoreFactory.eINSTANCE.createEClass();
+ myPackage.getEClassifiers().add(stringWrapperClass);
+
+ stringWrapperClass.setName("StringWrapper"); //$NON-NLS-1$
+ stringWrapperClass.getESuperTypes().add(XMLTypePackage.eINSTANCE.getAnyType());
+ ExtendedMetaData.INSTANCE.setName(stringWrapperClass, ""); //$NON-NLS-1$
+ stringWrapperClass.setInstanceClass(AnyType.class);
+
+ EAttribute eAttribute = EcoreFactory.eINSTANCE.createEAttribute();
+ eAttribute.setName("value"); //$NON-NLS-1$
+ eAttribute.setChangeable(true);
+ eAttribute.setUnsettable(true);
+ eAttribute.setEType(EcorePackage.eINSTANCE.getEClassifier("EString")); //$NON-NLS-1$
+ stringWrapperClass.getEStructuralFeatures().add(eAttribute);
+
+// ExtendedMetaData.INSTANCE.setNamespace(eAttribute, ePackage.getNsURI());
+ ExtendedMetaData.INSTANCE.setFeatureKind(eAttribute, ExtendedMetaData.ATTRIBUTE_FEATURE);
+ ExtendedMetaData.INSTANCE.setName(eAttribute, "value"); //$NON-NLS-1$
+ }
+ de.eSetClass(stringWrapperClass);
+ de.eSet(stringWrapperClass.getEStructuralFeature("value"), value); //$NON-NLS-1$
+
return de;
}
public static String getStringWrapperValue(Object wrapper) {
if (wrapper instanceof DynamicEObjectImpl) {
- DynamicEObjectImpl de = (DynamicEObjectImpl)wrapper;
- URI uri = de.eProxyURI();
- return uri.toString();
+ return wrapper.toString();
}
else if (wrapper instanceof EObject) {
return EcoreUtil.getURI((EObject)wrapper).toString();
@@ -1001,17 +733,28 @@ public class ModelUtil {
return null;
}
+ public static String getStringWrapperTextValue(Object wrapper) {
+ String value = ModelUtil.getStringWrapperValue(wrapper);
+ return SyntaxCheckerUtils.fromXMLString(value);
+ }
+
public static boolean setStringWrapperValue(Object wrapper, String value) {
if (isStringWrapper(wrapper)) {
DynamicEObjectImpl de = (DynamicEObjectImpl)wrapper;
- de.eSetProxyURI(URI.createURI(value));
+ EStructuralFeature feature = de.eClass().getEStructuralFeature("value"); //$NON-NLS-1$
+ de.eSet(feature, value);
return true;
}
return false;
}
public static boolean isStringWrapper(Object wrapper) {
- return wrapper instanceof DynamicEObjectImpl;
+ if (wrapper instanceof DynamicEObjectImpl) {
+ EStructuralFeature feature = ((DynamicEObjectImpl)wrapper).eClass().getEStructuralFeature("value"); //$NON-NLS-1$
+ return feature!=null;
+
+ }
+ return false;
}
public static boolean isElementSelected(IDiagramContainer editor, PictogramElement element) {
@@ -1023,42 +766,25 @@ public class ModelUtil {
return false;
}
- /**
- * Given an EObject always returns the BPMN2 Resource that is associated with that object.
- * This may involve searching for all Resources in the ResourceSet that the EObject belongs to.
- * This also searches for a Resource in the object's InsertionAdapter if the object is not yet
- * contained in any Resource.
- *
- * @param object
- * @return
- */
- public static Resource getResource(EObject object) {
- Resource resource = null;
- if (object!=null) {
- resource = object.eResource();
- if (resource!=null) {
- ResourceSet rs = resource.getResourceSet();
- if (rs!=null) {
- for (Resource r : rs.getResources()) {
- if (r instanceof Bpmn2Resource) {
- return r;
- }
- }
- }
- }
- if (resource==null) {
- InsertionAdapter insertionAdapter = AdapterUtil.adapt(object, InsertionAdapter.class);
- if (insertionAdapter!=null)
- resource = insertionAdapter.getResource();
- // TODO: can we use any of the referenced objects to find a Resource?
+ public static Definitions getDefinitions(Object object) {
+ if (object instanceof DiagramEditor) {
+ DiagramEditor editor = (DiagramEditor) object;
+ object = editor.getDiagramTypeProvider().getDiagram();
+ }
+ if (object instanceof Diagram) {
+ object = ((Diagram)object).eResource();
+ }
+ if (object instanceof EObject) {
+ object = ObjectPropertyProvider.getResource((EObject)object);
+ }
+ if (object instanceof Resource) {
+ Resource resource = (Resource) object;
+ if (resource!=null && !resource.getContents().isEmpty() && !resource.getContents().get(0).eContents().isEmpty()) {
+ Object defs = resource.getContents().get(0).eContents().get(0);
+ if (defs instanceof Definitions)
+ return (Definitions)defs;
}
}
- return resource;
- }
-
- public static Resource getResource(DiagramEditor editor) {
- if (editor!=null)
- return getResource(editor.getDiagramTypeProvider().getDiagram());
return null;
}
@@ -1075,22 +801,8 @@ public class ModelUtil {
return container;
}
- public static Definitions getDefinitions(EObject object) {
- Resource resource = getResource(object);
- return getDefinitions(resource);
- }
-
- public static Definitions getDefinitions(Resource resource) {
- if (resource!=null && !resource.getContents().isEmpty() && !resource.getContents().get(0).eContents().isEmpty()) {
- Object defs = resource.getContents().get(0).eContents().get(0);
- if (defs instanceof Definitions)
- return (Definitions)defs;
- }
- return null;
- }
-
public static DocumentRoot getDocumentRoot(EObject object) {
- Resource resource = getResource(object);
+ Resource resource = ObjectPropertyProvider.getResource(object);
if (resource!=null) {
EList<EObject> contents = resource.getContents();
if (!contents.isEmpty() && contents.get(0) instanceof DocumentRoot)
@@ -1102,7 +814,7 @@ public class ModelUtil {
public static List<EObject> getAllReachableObjects(EObject object, EStructuralFeature feature) {
ArrayList<EObject> list = null;
if (object!=null && feature.getEType() instanceof EClass) {
- Resource resource = getResource(object);
+ Resource resource = ObjectPropertyProvider.getResource(object);
if (resource!=null) {
EClass eClass = (EClass)feature.getEType();
if (eClass != EcorePackage.eINSTANCE.getEObject()) {
@@ -1122,7 +834,7 @@ public class ModelUtil {
public static List<EObject> getAllReachableObjects(EObject object, EClass eClass) {
ArrayList<EObject> list = null;
- Resource resource = getResource(object);
+ Resource resource = ObjectPropertyProvider.getResource(object);
if (resource!=null) {
list = new ArrayList<EObject>();
if (eClass != EcorePackage.eINSTANCE.getEObject()) {
@@ -1223,99 +935,6 @@ public class ModelUtil {
return values;
}
- @SuppressWarnings("unchecked")
- public static <T> List<T> getAllExtensionAttributeValues(EObject object, Class<T> clazz) {
- List<T> results = new ArrayList<T>();
-
- if (object!=null) {
- EStructuralFeature evf = object.eClass().getEStructuralFeature("extensionValues"); //$NON-NLS-1$
- EList<ExtensionAttributeValue> list = (EList<ExtensionAttributeValue>)object.eGet(evf);
- for (ExtensionAttributeValue eav : list) {
- FeatureMap fm = eav.getValue();
- for (Entry e : fm) {
- if (clazz.isInstance(e.getValue())) {
- results.add((T)e.getValue());
- }
- }
- }
- }
- return results;
- }
-
- public static List<ExtensionAttributeValue> getExtensionAttributeValues(EObject be) {
- if (be instanceof Participant) {
- final Participant participant = (Participant) be;
- if (participant.getProcessRef() == null) {
- if (participant.eContainer() instanceof Collaboration) {
- Collaboration collab = (Collaboration) participant.eContainer();
- if (collab.eContainer() instanceof Definitions) {
- final Definitions definitions = getDefinitions(collab);
-
- TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(definitions.eResource());
-
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- Process process = Bpmn2ModelerFactory.create(Process.class);
- participant.setProcessRef(process);
- definitions.getRootElements().add(process);
- ModelUtil.setID(process);
- }
-
- });
-
- }
- }
- }
- return participant.getProcessRef().getExtensionValues();
- }
- if (be instanceof BPMNDiagram) {
- BPMNDiagram diagram = (BPMNDiagram) be;
- BaseElement bpmnElement = diagram.getPlane().getBpmnElement();
- if (bpmnElement instanceof org.eclipse.bpmn2.Process) {
- return bpmnElement.getExtensionValues();
- }
- }
- if (be instanceof BaseElement) {
- return ((BaseElement) be).getExtensionValues();
- }
-
- return new ArrayList<ExtensionAttributeValue>();
- }
-
- public static void addExtensionAttributeValue(EObject object, EStructuralFeature feature, Object value) {
- addExtensionAttributeValue(object, feature, value, false);
- }
-
- @SuppressWarnings("unchecked")
- public static void addExtensionAttributeValue(EObject object, EStructuralFeature feature, Object value, boolean delay) {
- EStructuralFeature evf = object.eClass().getEStructuralFeature("extensionValues"); //$NON-NLS-1$
- EList<EObject> list = (EList<EObject>)object.eGet(evf);
-
- if (list.size()==0) {
- ExtensionAttributeValue newItem = Bpmn2ModelerFactory.create(ExtensionAttributeValue.class);
- ModelUtil.setID(newItem);
- FeatureMap map = newItem.getValue();
- map.add(feature, value);
- if (delay) {
- InsertionAdapter.add(object, evf, newItem, feature, value);
- }
- else {
- list.add(newItem);
- }
- }
- else {
- ExtensionAttributeValue oldItem = (ExtensionAttributeValue) list.get(0);
- if (delay) {
- InsertionAdapter.add(object, evf, oldItem, feature, value);
- }
- else {
- FeatureMap map = oldItem.getValue();
- map.add(feature, value);
- }
- }
- }
-
/*
* Various model object and feature UI property methods
*/
@@ -1323,314 +942,22 @@ public class ModelUtil {
public static String getLabel(Object object) {
String label = ""; //$NON-NLS-1$
if (object instanceof EObject) {
- EObject eObject = (EObject)object;
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eObject);
- if (adapter!=null)
- label = adapter.getObjectDescriptor().getLabel(eObject);
- else
- label = toDisplayName( eObject.eClass().getName() );
+ return ExtendedPropertiesProvider.getLabel((EObject)object);
}
else
label = object.toString();
label = label.replaceAll(" Ref$", ""); //$NON-NLS-1$ //$NON-NLS-2$
return label;
}
-
- @SuppressWarnings("rawtypes")
- public static void setLabel(EObject object, EStructuralFeature feature, String label) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null)
- adapter.getFeatureDescriptor(feature).setLabel(label);
- }
-
- @SuppressWarnings("rawtypes")
- public static String getLabel(EObject object, EStructuralFeature feature) {
- String label = ""; //$NON-NLS-1$
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null)
- label = adapter.getFeatureDescriptor(feature).getLabel(object);
- else
- label = toDisplayName( feature.getName() );
- label = label.replaceAll(" Ref$", ""); //$NON-NLS-1$ //$NON-NLS-2$
- return label;
- }
-
+
@SuppressWarnings("rawtypes")
- public static String getDisplayName(Object object) {
+ public static String getTextValue(Object object) {
if (object instanceof EObject) {
- EObject eObject = (EObject)object;
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(eObject);
- if (adapter!=null) {
- String text = adapter.getObjectDescriptor().getDisplayName(eObject);
- if (text!=null && !text.isEmpty()) {
- return text;
- }
- }
- return getLongDisplayName(eObject);
+ return ExtendedPropertiesProvider.getTextValue((EObject)object);
}
return object==null ? null : object.toString();
}
-
- @SuppressWarnings("rawtypes")
- public static String getDisplayName(EObject object, EStructuralFeature feature) {
- if (feature==null)
- return getDisplayName(object);
-
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null)
- return adapter.getFeatureDescriptor(feature).getDisplayName(object);
- return getLongDisplayName(object, feature);
- }
-
- @SuppressWarnings("rawtypes")
- public static boolean setMultiLine(EObject object, EStructuralFeature feature, boolean multiLine) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null) {
- adapter.getFeatureDescriptor(feature).setMultiLine(multiLine);
- return true;
- }
- return false;
- }
-
- @SuppressWarnings("rawtypes")
- public static boolean isMultiLine(EObject object, EStructuralFeature feature) {
- if (feature==null)
- return false;
-
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null)
- return adapter.getFeatureDescriptor(feature).isMultiLine(object);
- return false;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public static Hashtable<String, Object> getChoiceOfValues(EObject object, EStructuralFeature feature) {
- if (feature==null)
- return null;
-
- if (feature.getEType() instanceof EEnum) {
- EEnum en = (EEnum)feature.getEType();
- Hashtable<String,Object> choices = new Hashtable<String,Object>();
- for (EEnumLiteral el : en.getELiterals()) {
- choices.put(el.getLiteral(), el.getInstance());
- }
- return choices;
- }
-
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null)
- return adapter.getFeatureDescriptor(feature).getChoiceOfValues(object);
- return null;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public static boolean setValue(TransactionalEditingDomain domain, final EObject object, final EStructuralFeature feature, Object value) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
-
- try {
- InsertionAdapter.executeIfNeeded(object);
- if (value instanceof EObject) {
- // make sure the new object is added to its control first
- // so that it inherits the control's Resource and EditingDomain
- // before we try to change its value.
- InsertionAdapter.executeIfNeeded((EObject)value);
- }
- if (value instanceof String && ((String) value).isEmpty()) {
- if (!(feature.getDefaultValue() instanceof String))
- value = null;
- }
-
- if (adapter!=null) {
- if (!adapter.getFeatureDescriptor(feature).equals(value)) {
- adapter.getFeatureDescriptor(feature).setValue(value);
- }
- }
- else if (domain!=null) {
- final Object v = value;
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- if (object.eGet(feature) instanceof List) {
- ((List)object.eGet(feature)).add(v);
- }
- else
- object.eSet(feature, v);
- }
- });
- }
- else {
- if (object.eGet(feature) instanceof List) {
- ((List)object.eGet(feature)).add(value);
- }
- else
- object.eSet(feature, value);
- }
- } catch (Exception e) {
- ErrorUtils.showErrorMessage(e.getMessage());
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("rawtypes")
- public static Object getValue(final EObject object, final EStructuralFeature feature) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- Object value = adapter==null ? object.eGet(feature) : adapter.getFeatureDescriptor(feature).getValue();
- return value;
- }
-
- public static boolean compare(EObject object1, EObject object2, boolean similar) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object1, null);
- if (adapter!=null)
- return adapter.getObjectDescriptor().compare(object1, object2, similar);
- return object1.equals(object2);
- }
- @SuppressWarnings("rawtypes")
- public static boolean canEdit(EObject object, EStructuralFeature feature) {
- if (feature!=null && feature.getEType() instanceof EClass) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_EDIT);
- if (result instanceof Boolean)
- return ((Boolean)result);
- }
- if (feature instanceof EReference) {
- if (((EReference)feature).isContainment())
- return true;
- if (Bpmn2Package.eINSTANCE.getRootElement().isSuperTypeOf((EClass)feature.getEType()))
- return true;
- if (feature.isMany())
- return true;
- return false;
- }
- return true;
- }
- return false;
- }
-
- @SuppressWarnings("rawtypes")
- public static boolean canCreateNew(EObject object, EStructuralFeature feature) {
- if (feature!=null && feature.getEType() instanceof EClass) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_CREATE_NEW);
- if (result instanceof Boolean)
- return ((Boolean)result);
- }
- if (feature instanceof EReference) {
- if (((EReference)feature).isContainment())
- return true;
- if (Bpmn2Package.eINSTANCE.getRootElement().isSuperTypeOf((EClass)feature.getEType()))
- return true;
- return false;
- }
- return true;
- }
- return false;
- }
-
- @SuppressWarnings("rawtypes")
- public static boolean canEditInline(EObject object, EStructuralFeature feature) {
- if (feature!=null && feature.getEType() instanceof EClass) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_EDIT_INLINE);
- if (result instanceof Boolean)
- return ((Boolean)result);
- }
- }
- return false;
- }
-
- @SuppressWarnings("rawtypes")
- public static boolean canSetNull(EObject object, EStructuralFeature feature) {
- if (feature!=null && feature.getEType() instanceof EClass) {
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_CAN_SET_NULL);
- if (result instanceof Boolean)
- return ((Boolean)result);
- }
- return true;
- }
- return false;
- }
-
- @SuppressWarnings("rawtypes")
- public static boolean isMultiChoice(EObject object, EStructuralFeature feature) {
- if (feature==null) {
- return false;
- }
- if (feature.getEType() instanceof EEnum) {
- return true;
- }
-
- ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object, feature);
- if (adapter!=null) {
- Object result = adapter.getProperty(feature, ExtendedPropertiesAdapter.UI_IS_MULTI_CHOICE);
- if (result instanceof Boolean)
- return ((Boolean)result);
- }
-
- return getChoiceOfValues(object,feature) != null;
- }
-
- /*
- * Fallbacks in case a property provider does not exist
- */
- public static String getLongDisplayName(EObject object) {
- String objName = null;
- if (object instanceof BPMNDiagram) {
- Bpmn2DiagramType type = getDiagramType((BPMNDiagram)object);
- if (type == Bpmn2DiagramType.CHOREOGRAPHY) {
- objName = Messages.ModelUtil_Choreography_Diagram;
- }
- else if (type == Bpmn2DiagramType.COLLABORATION) {
- objName = Messages.ModelUtil_Collaboration_Diagram;
- }
- else if (type == Bpmn2DiagramType.PROCESS) {
- objName = Messages.ModelUtil_Process_Diagram;
- }
- }
- if (objName==null){
- objName = toDisplayName( object.eClass().getName() );
- }
- EStructuralFeature feature = object.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
- if (feature!=null) {
- String name = (String)object.eGet(feature);
- if (name==null || name.isEmpty())
- name = NLS.bind(Messages.ModelUtil_Unnamed_Object, objName);
- else
- name = objName + " \"" + name + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- return name;
- }
- feature = object.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
- if (feature!=null) {
- String id = (String)object.eGet(feature);
- if (id==null || id.isEmpty())
- id = Messages.ModelUtil_Unknown_Object + objName;
- else
- id = objName + " \"" + id + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- return id;
- }
- feature = object.eClass().getEStructuralFeature("qName"); //$NON-NLS-1$
- if (feature!=null) {
- Object qName = object.eGet(feature);
- if (qName!=null) {
- return qName.toString();
- }
- }
- return objName;
- }
-
- public static String getLongDisplayName(EObject object, EStructuralFeature feature) {
- Object value = object.eGet(feature);
- if (value==null)
- return ""; //$NON-NLS-1$
- return value.toString();
- }
-
public static boolean isEmpty(Object result) {
if (result == null)
return true;
@@ -1762,7 +1089,7 @@ public class ModelUtil {
}
public static boolean isParticipantBand(Participant participant) {
- Resource resource = ModelUtil.getResource(participant);
+ Resource resource = ObjectPropertyProvider.getResource(participant);
for (ChoreographyActivity ca : ModelUtil.getAllObjectsOfType(resource, ChoreographyActivity.class)) {
if (ca.getParticipantRefs().contains(participant)) {
return true;
@@ -1770,4 +1097,34 @@ public class ModelUtil {
}
return false;
}
+
+ public static <T extends Adapter> T getAdapter(EObject object, Class<T> clazz) {
+ for (Adapter a : object.eAdapters()) {
+ if (clazz.isInstance(a))
+ return (T) a;
+ }
+ return null;
+ }
+
+ // FIXME: update Switchyard to use new API
+ @Deprecated
+ public static List<EStructuralFeature> getAnyAttributes(EObject object) {
+ return ModelDecorator.getAnyAttributes(object);
+ }
+
+ @Deprecated
+ public static String getDisplayName(EObject object) {
+ return getTextValue(object);
+ }
+
+ @Deprecated
+ public static String toDisplayName(String name) {
+ return toCanonicalString(name);
+ }
+
+ @Deprecated
+ public static Resource getResource(EObject object) {
+ return ObjectPropertyProvider.getResource(object);
+ }
+
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/NamespaceUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/NamespaceUtil.java
index f4a198f1..376918c0 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/NamespaceUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/NamespaceUtil.java
@@ -13,16 +13,20 @@
package org.eclipse.bpmn2.modeler.core.utils;
+import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.bpmn2.DocumentRoot;
+import org.eclipse.bpmn2.modeler.core.adapters.AdapterRegistry;
+import org.eclipse.bpmn2.modeler.core.adapters.INamespaceMap;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.util.TransactionUtil;
+
import javax.xml.namespace.QName;
/**
@@ -63,11 +67,11 @@ public class NamespaceUtil {
public static String normalizeQName(Resource resource, QName qname) {
String localPart = qname.getLocalPart();
String namespace = qname.getNamespaceURI();
- String prefix = qname.getPrefix();
+ String prefix = getPrefixForNamespace(resource, namespace);
if (prefix!=null && !prefix.isEmpty()) {
return prefix + ":" + localPart; //$NON-NLS-1$
}
- prefix = getPrefixForNamespace(resource, namespace);
+ prefix = qname.getPrefix();
if (prefix!=null && !prefix.isEmpty()) {
return prefix + ":" + localPart; //$NON-NLS-1$
}
@@ -101,24 +105,37 @@ public class NamespaceUtil {
String prefix = null;
Map<String,String> map = getXMLNSPrefixMap(resource);
if (map!=null) {
- prefix = "ns"; //$NON-NLS-1$
- int index = 1;
- while (map.containsKey(prefix+index))
- ++index;
- prefix = addNamespace(resource, prefix+index, namespace);
+ prefix = createUniquePrefix(map, "ns"); //$NON-NLS-1$
+ addNamespace(resource, prefix, namespace);
+ }
+ return prefix;
+ }
+
+ public static String createUniquePrefix(Map<String,String> map, String prefix) {
+ if (map!=null) {
+ if (map.containsKey(prefix)) {
+ int index = 1;
+ while (map.containsKey(prefix+index))
+ ++index;
+ prefix = prefix + index;
+ }
}
return prefix;
}
- public static String addNamespace(final Resource resource, final String prefix, final String namespace) {
+ public static String addNamespace(final Resource resource, String prefix, final String namespace) {
final Map<String,String> map = getXMLNSPrefixMap(resource);
if (map!=null) {
+ if (prefix==null) {
+ prefix = "ns"; //$NON-NLS-1$
+ }
+ final String pfx = createUniquePrefix(map, prefix);
TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(resource);
if (domain != null) {
domain.getCommandStack().execute(new RecordingCommand(domain) {
@Override
protected void doExecute() {
- map.put(prefix, namespace);
+ map.put(pfx, namespace);
}
});
}
@@ -188,4 +205,49 @@ public class NamespaceUtil {
}
return null;
}
+
+ /**
+ * @param eObject
+ * @return the namespace map for the given object.
+ */
+
+ @SuppressWarnings("unchecked")
+ static public INamespaceMap<String, String> getNamespaceMap(EObject eObject) {
+
+ if (eObject == null) {
+ throw new NullPointerException(
+ "eObject cannot be null in getNamespaceMap()"); //$NON-NLS-1$
+ }
+
+ INamespaceMap<String, String> nsMap = null;
+ // Bug 120110 - this eObject may not have a namespace map, but its
+ // ancestors might, so keep searching until we find one or until
+ // we run out of ancestors.
+ while (nsMap==null && eObject!=null) {
+ nsMap = AdapterRegistry.INSTANCE.adapt(
+ eObject, INamespaceMap.class);
+ if (nsMap==null)
+ eObject = eObject.eContainer();
+ }
+
+ if (nsMap == null) {
+ throw new IllegalStateException(
+ "INamespaceMap cannot be attached to an eObject"); //$NON-NLS-1$
+ }
+
+ return nsMap;
+ }
+
+ public static String getNamespacePrefix(EObject eObject, String namespace) {
+
+ for (EObject context = eObject; context != null; context = context
+ .eContainer()) {
+ List<String> pfxList = getNamespaceMap(context).getReverse(
+ namespace);
+ if (pfxList.size() > 0) {
+ return pfxList.get(0);
+ }
+ }
+ return null;
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/GraphicsUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeDecoratorUtil.java
index 3cc7a476..e9074640 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/GraphicsUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeDecoratorUtil.java
@@ -14,144 +14,43 @@ package org.eclipse.bpmn2.modeler.core.utils;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.ChoreographyActivity;
-import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.Event;
-import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.FlowElementsContainer;
-import org.eclipse.bpmn2.Gateway;
-import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.di.BPMNPlane;
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.participant.AddParticipantFeature;
-import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
-import org.eclipse.core.runtime.dynamichelpers.IFilter;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.datatypes.IDimension;
-import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.Image;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
import org.eclipse.graphiti.mm.algorithms.styles.Color;
+import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
-import org.eclipse.graphiti.mm.pictograms.Anchor;
-import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
-import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
-import org.eclipse.graphiti.mm.pictograms.FixPointAnchor;
-import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.PictogramLink;
+import org.eclipse.graphiti.mm.pictograms.PictogramsFactory;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.services.ILayoutService;
import org.eclipse.graphiti.services.IPeService;
-import org.eclipse.graphiti.ui.services.GraphitiUi;
import org.eclipse.graphiti.util.IColorConstant;
-public class GraphicsUtil {
+public class ShapeDecoratorUtil {
- private static final IGaService gaService = Graphiti.getGaService();
+ static final IGaService gaService = Graphiti.getGaService();
static final IPeService peService = Graphiti.getPeService();
- private static Map<Diagram, SizeTemplate> diagramSizeMap;
- // TODO move all size properties to separate interface
- public static final int DATA_WIDTH = 36;
- public static final int DATA_HEIGHT = 50;
-
- public static final int CHOREOGRAPHY_WIDTH = 150;
- public static final int CHOREOGRAPHY_HEIGHT = 150;
- public static final int PARTICIPANT_BAND_HEIGHT = 20;
-
- public static final int SHAPE_PADDING = 6;
- public static final int TEXT_PADDING = 5;
- public static final String LABEL_PROPERTY = "label"; //$NON-NLS-1$
-
- // TODO: Determine all cases to make a line break! The following implementation are the easy once.
- private static final String LINE_BREAK = "\n"; //$NON-NLS-1$
-
- public static class SizeTemplate{
-
- private Size eventSize = new Size(GraphicsUtil.EVENT_SIZE, GraphicsUtil.EVENT_SIZE);
- private Size gatewaySize = new Size(GraphicsUtil.GATEWAY_RADIUS*2, GraphicsUtil.GATEWAY_RADIUS*2);
- private Size activitySize = new Size(GraphicsUtil.TASK_DEFAULT_WIDTH, GraphicsUtil.TASK_DEFAULT_HEIGHT);
- private Size choreographySize = new Size(GraphicsUtil.CHOREOGRAPHY_WIDTH, GraphicsUtil.CHOREOGRAPHY_HEIGHT);
- private Size poolSize = new Size(AddParticipantFeature.DEFAULT_POOL_WIDTH, AddParticipantFeature.DEFAULT_POOL_HEIGHT);
- private Size participantBandSize = new Size(GraphicsUtil.CHOREOGRAPHY_WIDTH, GraphicsUtil.PARTICIPANT_BAND_HEIGHT);
-
- public Size getEventSize() {
- return eventSize;
- }
- public void setEventSize(Size eventSize) {
- this.eventSize = eventSize;
- }
- public Size getGatewaySize() {
- return gatewaySize;
- }
- public void setGatewaySize(Size gatewaySize) {
- this.gatewaySize = gatewaySize;
- }
- public Size getActivitySize() {
- return this.activitySize;
- }
- public void setActivitySize(Size activitySize) {
- this.activitySize = activitySize;
- }
- public Size getChoreographySize() {
- return choreographySize;
- }
- public void setChoreographySize(Size choreographySize) {
- this.choreographySize = choreographySize;
- this.participantBandSize.width = choreographySize.width;
- }
- public Size getPoolSize() {
- return poolSize;
- }
- public void setPoolSize(Size participantSize) {
- this.poolSize = participantSize;
- }
- public Size getParticipantBandSize() {
- return new Size(choreographySize.width, participantBandSize.height);
- }
- public void setParticipantBandSize(Size participantSize) {
- this.participantBandSize = participantSize;
- this.participantBandSize.width = choreographySize.width;
- }
- }
-
- public static class Size {
- private int width;
- private int height;
-
- public Size(int width, int height) {
- this.width = width;
- this.height = height;
- }
-
- public int getWidth() {
- return this.width;
- }
-
- public int getHeight() {
- return this.height;
- }
- }
+ private static final String DELETABLE_PROPERTY = "deletable"; //$NON-NLS-1$
+ public static final int GATEWAY_RADIUS = 25;
+ public static final int EVENT_SIZE = 36;
public static class Envelope {
public Rectangle rect;
@@ -197,166 +96,23 @@ public class GraphicsUtil {
public Polyline vertical;
}
- public static class LineSegment {
- private Point start;
- private Point end;
-
- public LineSegment() {
- this(0,0,0,0);
- }
- public LineSegment(Point start, Point end) {
- this(start.getX(),start.getY(), end.getX(),end.getY());
- }
- public LineSegment(int x1, int y1, int x2, int y2) {
- start = Graphiti.getCreateService().createPoint(x1, y1);
- end = Graphiti.getCreateService().createPoint(x2, y2);
- }
- public void setStart(Point p) {
- setStart(p.getX(),p.getY());
- }
- public void setStart(int x, int y) {
- start.setX(x);
- start.setY(y);
- }
- public void setEnd(Point p) {
- setEnd(p.getX(),p.getY());
- }
- public void setEnd(int x, int y) {
- end.setX(x);
- end.setY(y);
- }
- public Point getStart() {
- return start;
- }
- public Point getEnd() {
- return end;
- }
- public double getDistance(Point p) {
- // for vertical and horizontal line segments, the distance to a point
- // is the orthogonal distance if the point lies between the start and end
- // points of the line segment
- if (isHorizontal()) {
- if (p.getX()>=start.getX() && p.getX()<=end.getX())
- return Math.abs(start.getY() - p.getY());
- }
- if (isVertical()) {
- if (p.getY()>=start.getY() && p.getY()<=end.getY())
- return Math.abs(start.getX() - p.getX());
- }
- // otherwise, the distance is the minimum of the distances
- // of the point to the two endpoints of the line segment
- double d1 = getDistanceToStart(p);
- double d2 = getDistanceToEnd(p);
- return Math.min(d1, d2);
- }
- public boolean isHorizontal() {
- return Math.abs(start.getY() - end.getY()) <= 1;
- }
- public boolean isVertical() {
- return Math.abs(start.getX() - end.getX()) <= 1;
- }
- public boolean isSlanted() {
- return !isHorizontal() && !isVertical();
- }
- public double getDistanceToStart(Point p) {
- return Math.hypot(start.getX()-p.getX(), start.getY()-p.getY());
- }
- public double getDistanceToEnd(Point p) {
- return Math.hypot(end.getX()-p.getX(), end.getY()-p.getY());
- }
-
- public String toString() {
- return "[" + start.getX() + "," + start.getY() +"]" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- " [" + end.getX() + "," + end.getY() +"]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /* GATEWAY */
-
- private static final String DELETABLE_PROPERTY = "deletable"; //$NON-NLS-1$
-
- public static final int GATEWAY_RADIUS = 25;
- public static final int GATEWAY_TEXT_AREA = 15;
-
private static int generateRatioPointValue(float originalPointValue, float ratioValue) {
return Math.round(Float.valueOf(originalPointValue * ratioValue));
}
- // TODO: Think about line break in the ui...
- public static int getLabelHeight(AbstractText text) {
- if (text.getValue() != null && !text.getValue().isEmpty()) {
- int height = 14;
- String[] strings = text.getValue().split(LINE_BREAK);
- if (strings.length>0) {
- IDimension dim = GraphitiUi.getUiLayoutService().calculateTextSize(strings[0], text.getFont());
- height = dim.getHeight();
- }
- return strings.length * height;
- }
- return 0;
- }
-
- // TODO: Think about a maximum-width...
- public static int getLabelWidth(AbstractText text) {
- if (text.getValue() != null && !text.getValue().isEmpty()) {
- String[] strings = text.getValue().split(LINE_BREAK);
- int result = 0;
- for (String string : strings) {
- IDimension dim = GraphitiUi.getUiLayoutService().calculateTextSize(string, text.getFont());
- if (dim.getWidth() > result) {
- result = dim.getWidth();
- }
- }
- return result;
- }
- return 0;
- }
-
- public static void alignWithShape(AbstractText text, ContainerShape labelContainer,
- int width,
- int height,
- int shapeX,
- int shapeY,
- int preShapeX,
- int preShapeY){
- final int textHeight = getLabelHeight(text);
- final int textWidth = getLabelWidth(text);
-
- int currentLabelX = labelContainer.getGraphicsAlgorithm().getX();
- int currentLabelY = labelContainer.getGraphicsAlgorithm().getY();
-
- int newShapeX = shapeX - ((textWidth + SHAPE_PADDING) / 2) + width / 2;
- int newShapeY = shapeY + height + 2;
-
- if (currentLabelX > 0 && preShapeX > 0){
- newShapeX = currentLabelX + (shapeX - preShapeX);
- newShapeY = currentLabelY + (shapeY - preShapeY);
- }
-
- IGaService gaService = Graphiti.getGaService();
-
- gaService.setLocationAndSize(labelContainer.getGraphicsAlgorithm(),
- newShapeX , newShapeY ,
- textWidth + SHAPE_PADDING, textHeight + SHAPE_PADDING);
- gaService.setLocationAndSize(text,
- 0, 0,
- textWidth + TEXT_PADDING, textHeight + TEXT_PADDING);
- }
-
private static float calculateRatio(float x, float y) {
return x / y;
}
- private static int getShapeHeight(Shape shape) {
+ static int getShapeHeight(Shape shape) {
return shape.getGraphicsAlgorithm().getHeight();
}
- private static int getShapeWidth(Shape shape) {
+ static int getShapeWidth(Shape shape) {
return shape.getGraphicsAlgorithm().getWidth();
}
public static Shape getContainedShape(ContainerShape container, String propertyKey) {
- IPeService peService = Graphiti.getPeService();
Iterator<Shape> iterator = peService.getAllContainedShapes(container).iterator();
while (iterator.hasNext()) {
Shape shape = iterator.next();
@@ -370,7 +126,6 @@ public class GraphicsUtil {
public static List<PictogramElement> getContainedPictogramElements(PictogramElement container, String propertyKey) {
List<PictogramElement> pictogramElements = new ArrayList<PictogramElement>();
- IPeService peService = Graphiti.getPeService();
Iterator<PictogramElement> iterator = peService.getAllContainedPictogramElements(container).iterator();
while (iterator.hasNext()) {
PictogramElement pe = iterator.next();
@@ -382,8 +137,7 @@ public class GraphicsUtil {
return pictogramElements;
}
-// private static final int[] GATEWAY = { 0, GATEWAY_RADIUS, GATEWAY_RADIUS, 0, 2 * GATEWAY_RADIUS, GATEWAY_RADIUS,
-// GATEWAY_RADIUS, 2 * GATEWAY_RADIUS };
+ /* GATEWAY */
public static Polygon createGateway(Shape container, final int width, final int height) {
final int widthRadius = width / 2;
@@ -401,13 +155,6 @@ public class GraphicsUtil {
final float heightRatio = calculateRatio(gatewayHeight, Float.valueOf(GATEWAY_RADIUS * 2));
final float widthRatio = calculateRatio(gatewayWidth, Float.valueOf(GATEWAY_RADIUS * 2));
-
-// Polygon pentagon = gaService.createPolygon(pentagonShape,
-// new int[] { GATEWAY_RADIUS, 18,
-// GATEWAY_RADIUS + 8, GATEWAY_RADIUS - 2,
-// GATEWAY_RADIUS + 5, GATEWAY_RADIUS + 7,
-// GATEWAY_RADIUS - 5, GATEWAY_RADIUS + 7,
-// GATEWAY_RADIUS - 8, GATEWAY_RADIUS - 2 });
Polygon pentagon = gaService.createPolygon(pentagonShape,
new int[] { gatewayWidth / 2, generateRatioPointValue(18, heightRatio),
gatewayWidth / 2 + generateRatioPointValue(8, widthRatio), gatewayHeight / 2 - generateRatioPointValue(2, heightRatio),
@@ -432,7 +179,6 @@ public class GraphicsUtil {
Float width = gatewayHeight * new Float(0.8);
Float height = gatewayWidth * new Float(0.8);
-// gaService.setLocationAndSize(ellipse, 14, 14, 23, 23);
Ellipse ellipse = gaService.createEllipse(outer);
gaService.setLocationAndSize(ellipse,
Math.round(x), Math.round(y),
@@ -452,7 +198,6 @@ public class GraphicsUtil {
final float heightRatio = calculateRatio(gatewayHeight, Float.valueOf(GATEWAY_RADIUS * 2));
final float widthRatio = calculateRatio(gatewayWidth, Float.valueOf(GATEWAY_RADIUS * 2));
-// gaService.setLocationAndSize(ellipse, 12, 12, 27, 27);
gaService.setLocationAndSize(ellipse,
generateRatioPointValue(12, widthRatio),
generateRatioPointValue(12, heightRatio),
@@ -473,7 +218,6 @@ public class GraphicsUtil {
final float heightRatio = calculateRatio(gatewayHeight, Float.valueOf(GATEWAY_RADIUS * 2));
final float widthRatio = calculateRatio(gatewayWidth, Float.valueOf(GATEWAY_RADIUS * 2));
-// Polyline verticalLine = gaService.createPolyline(verticalShape, new int[] { 24, 7, 24, 43 });
Polyline verticalLine = gaService.createPolyline(verticalShape,
new int[] { generateRatioPointValue(24, widthRatio), generateRatioPointValue(7, heightRatio),
generateRatioPointValue(24, widthRatio), generateRatioPointValue(43, heightRatio) });
@@ -482,8 +226,6 @@ public class GraphicsUtil {
Shape horizontalShape = peService.createShape(container, false);
-// Polyline horizontalLine = gaService.createPolyline(horizontalShape, new int[] { 7, 24, 43, 24 });
-
Polyline horizontalLine = gaService.createPolyline(horizontalShape,
new int[] { generateRatioPointValue(7, widthRatio), generateRatioPointValue(24, heightRatio),
generateRatioPointValue(43, widthRatio), generateRatioPointValue(24, heightRatio) });
@@ -497,25 +239,21 @@ public class GraphicsUtil {
}
public static DiagonalCross createGatewayDiagonalCross(ContainerShape container) {
- IPeService service = Graphiti.getPeService();
-
final int gatewayHeight = getShapeHeight(container);
final int gatewayWidth = getShapeWidth(container);
final float heightRatio = calculateRatio(gatewayHeight, Float.valueOf(GATEWAY_RADIUS * 2));
final float widthRatio = calculateRatio(gatewayWidth, Float.valueOf(GATEWAY_RADIUS * 2));
- Shape diagonalDescShape = service.createShape(container, false);
-// Polyline diagonalDesc = gaService.createPolyline(diagonalDescShape, new int[] { 13, 14, 37, 37 });
+ Shape diagonalDescShape = peService.createShape(container, false);
Polyline diagonalDesc = gaService.createPolyline(diagonalDescShape,
new int[] { generateRatioPointValue(14, widthRatio), generateRatioPointValue(14, heightRatio),
generateRatioPointValue(37, widthRatio), generateRatioPointValue(37, heightRatio) });
diagonalDesc.setLineWidth(3);
peService.setPropertyValue(diagonalDescShape, DELETABLE_PROPERTY, "true"); //$NON-NLS-1$
- Shape diagonalAscShape = service.createShape(container, false);
+ Shape diagonalAscShape = peService.createShape(container, false);
-// Polyline diagonalAsc = gaService.createPolyline(diagonalAscShape, new int[] { 37, 14, 13, 37 });
Polyline diagonalAsc = gaService.createPolyline(diagonalAscShape,
new int[] { generateRatioPointValue(37, widthRatio), generateRatioPointValue(14, heightRatio),
generateRatioPointValue(14, widthRatio), generateRatioPointValue(37, heightRatio) });
@@ -567,40 +305,34 @@ public class GraphicsUtil {
}
public static Asterisk createGatewayAsterisk(ContainerShape container) {
- IPeService service = Graphiti.getPeService();
-
final int gatewayHeight = getShapeHeight(container);
final int gatewayWidth = getShapeWidth(container);
final float heightRatio = calculateRatio(gatewayHeight, Float.valueOf(GATEWAY_RADIUS * 2));
final float widthRatio = calculateRatio(gatewayWidth, Float.valueOf(GATEWAY_RADIUS * 2));
- Shape verticalShape = service.createShape(container, false);
-// Polyline vertical = gaService.createPolyline(verticalShape, new int[] { 23, 8, 23, 42 });
+ Shape verticalShape = peService.createShape(container, false);
Polyline vertical = gaService.createPolyline(verticalShape,
new int[] { generateRatioPointValue(24, widthRatio), generateRatioPointValue(7, heightRatio),
generateRatioPointValue(24, widthRatio), generateRatioPointValue(43, heightRatio) });
vertical.setLineWidth(3);
peService.setPropertyValue(verticalShape, DELETABLE_PROPERTY, "true"); //$NON-NLS-1$
- Shape horizontalShape = service.createShape(container, false);
-// Polyline horizontal = gaService.createPolyline(horizontalShape, new int[] { 8, 24, 42, 24 });
+ Shape horizontalShape = peService.createShape(container, false);
Polyline horizontal = gaService.createPolyline(horizontalShape,
new int[] { generateRatioPointValue(7, widthRatio), generateRatioPointValue(24, heightRatio),
generateRatioPointValue(43, widthRatio), generateRatioPointValue(24, heightRatio) });
horizontal.setLineWidth(3);
peService.setPropertyValue(horizontalShape, DELETABLE_PROPERTY, "true"); //$NON-NLS-1$
- Shape diagonalDescShape = service.createShape(container, false);
-// Polyline diagonalDesc = gaService.createPolyline(diagonalDescShape, new int[] { 13, 14, 37, 37 });
+ Shape diagonalDescShape = peService.createShape(container, false);
Polyline diagonalDesc = gaService.createPolyline(diagonalDescShape,
new int[] { generateRatioPointValue(14, widthRatio), generateRatioPointValue(14, heightRatio),
generateRatioPointValue(37, widthRatio), generateRatioPointValue(37, heightRatio) });
diagonalDesc.setLineWidth(3);
peService.setPropertyValue(diagonalDescShape, DELETABLE_PROPERTY, "true"); //$NON-NLS-1$
- Shape diagonalAscShape = service.createShape(container, false);
-// Polyline diagonalAsc = gaService.createPolyline(diagonalAscShape, new int[] { 37, 14, 13, 37 });
+ Shape diagonalAscShape = peService.createShape(container, false);
Polyline diagonalAsc = gaService.createPolyline(diagonalAscShape,
new int[] { generateRatioPointValue(37, widthRatio), generateRatioPointValue(14, heightRatio),
generateRatioPointValue(14, widthRatio), generateRatioPointValue(37, heightRatio) });
@@ -623,9 +355,6 @@ public class GraphicsUtil {
/* EVENT */
- public static final int EVENT_SIZE = 36;
-// public static final int EVENT_TEXT_AREA = 15;
-
public static Ellipse createEventShape(Shape container, final int width, final int height) {
Ellipse ellipse = gaService.createEllipse(container);
gaService.setLocationAndSize(ellipse, 0, 0, width, height);
@@ -639,7 +368,6 @@ public class GraphicsUtil {
final float heightRatio = calculateRatio(eventHeight, Float.valueOf(EVENT_SIZE));
final float widthRatio = calculateRatio(eventWidth, Float.valueOf(EVENT_SIZE));
-// return createEnvelope(shape, 9, 9, 18, 18);
return createEnvelope(shape,
generateRatioPointValue(9, widthRatio),
generateRatioPointValue(12, heightRatio),
@@ -655,8 +383,6 @@ public class GraphicsUtil {
final float heightRatio = calculateRatio(eventHeight, Float.valueOf(EVENT_SIZE));
final float widthRatio = calculateRatio(eventWidth, Float.valueOf(EVENT_SIZE));
-// return gaService.createPolygon(shape, new int[] { r, 7, r + 10, r - 4, r + 7, r + 10, r - 7, r + 10, r - 10,
-// r - 4 });
return gaService.createPolygon(shape,
new int[] { eventWidth / 2, generateRatioPointValue(7, heightRatio),
eventWidth / 2 + generateRatioPointValue(10, widthRatio), eventHeight / 2 - generateRatioPointValue(4, heightRatio),
@@ -679,9 +405,6 @@ public class GraphicsUtil {
Float height = eventHeight * new Float(0.8);
Ellipse circle = gaService.createEllipse(ellipse);
-// gaService.setLocationAndSize(circle,
-// generateRatioPointValue(4, widthRatio), generateRatioPointValue(4, heightRatio),
-// eventWidth - generateRatioPointValue(8, widthRatio), eventWidth - generateRatioPointValue(8, heightRatio));
gaService.setLocationAndSize(circle,
Math.round(x), Math.round(y),
width.intValue(), height.intValue());
@@ -698,6 +421,7 @@ public class GraphicsUtil {
final float widthRatio = calculateRatio(eventWidth, Float.valueOf(EVENT_SIZE));
Image image = gaService.createImage(shape, imageId);
+ image.setProportional(true);
gaService.setLocationAndSize(image,
generateRatioPointValue(8, widthRatio), generateRatioPointValue(8, heightRatio),
generateRatioPointValue(20, widthRatio), generateRatioPointValue(20, heightRatio));
@@ -880,7 +604,7 @@ public class GraphicsUtil {
generateRatioPointValue(28, widthRatio), generateRatioPointValue(24, heightRatio),
};
- shape = Graphiti.getPeService().createShape(shape.getContainer(), false);
+ shape = peService.createShape(shape.getContainer(), false);
Polyline polygon = gaService.createPolyline(shape, points);
polygon.setLineWidth(2);
polygon.setForeground(manageColor(shape, IColorConstant.RED));
@@ -888,11 +612,28 @@ public class GraphicsUtil {
}
public static Polygon createEventParallelMultiple(Shape shape) {
- int r = EVENT_SIZE / 2;
- int a = 3;
- int b = 11;
- int[] points = { r - a, r - b, r + a, r - b, r + a, r - a, r + b, r - a, r + b, r + a, r + a, r + a, r + a,
- r + b, r - a, r + b, r - a, r + a, r - b, r + a, r - b, r - a, r - a, r - a };
+ final int h = shape.getContainer().getGraphicsAlgorithm().getHeight();
+ final int w = shape.getContainer().getGraphicsAlgorithm().getWidth();
+
+ int w0 = w / 5;
+ int h0 = h / 5;
+ int x = 2*w0;
+ int y = h0;
+ int[] points = {
+ x, y,
+ x+w0, y,
+ x+w0, y+h0,
+ x+w0+w0, y+h0,
+ x+w0+w0, y+h0+h0,
+ x+w0, y+h0+h0,
+ x+w0, y+h0+h0+h0,
+ x, y+h0+h0+h0,
+ x, y+h0+h0,
+ x-w0, y+h0+h0,
+ x-w0, y+h0,
+ x, y+h0,
+ x, y,
+ };
Polygon cross = gaService.createPolygon(shape, points);
cross.setFilled(false);
cross.setLineWidth(1);
@@ -901,12 +642,10 @@ public class GraphicsUtil {
public static void deleteEventShape(ContainerShape containerShape) {
for (PictogramElement shape : containerShape.getChildren()) {
- if (shape.getLink() != null) {
- EList<EObject> objects = shape.getLink().getBusinessObjects();
- if (objects.size()>0 && objects.get(0) instanceof EventDefinition) {
- peService.deletePictogramElement(shape);
- break;
- }
+ String property = peService.getPropertyValue(shape, GraphitiConstants.EVENT_DEFINITION_SHAPE);
+ if (property != null) {
+ peService.deletePictogramElement(shape);
+ break;
}
}
}
@@ -934,31 +673,14 @@ public class GraphicsUtil {
return arrow;
}
- // ACTIVITY
-
- public static final int TASK_DEFAULT_WIDTH = 110;
- public static final int TASK_DEFAULT_HEIGHT = 50;
public static final int TASK_IMAGE_SIZE = 16;
- public static final int SUB_PROCEESS_DEFAULT_WIDTH = 300;
- public static final int SUB_PROCESS_DEFAULT_HEIGHT = 300;
-
public static final int MARKER_WIDTH = 10;
public static final int MARKER_HEIGHT = 10;
- private static final String ACTIVITY_MARKER_CONTAINER = "activity.marker.container"; //$NON-NLS-1$
- public static final String ACTIVITY_MARKER_COMPENSATE = "activity.marker.compensate"; //$NON-NLS-1$
- public static final String ACTIVITY_MARKER_LC_STANDARD = "activity.marker.lc.standard"; //$NON-NLS-1$
- public static final String ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL = "activity.marker.lc.multi.sequential"; //$NON-NLS-1$
- public static final String ACTIVITY_MARKER_LC_MULTI_PARALLEL = "activity.marker.lc.multi.parallel"; //$NON-NLS-1$
- public static final String ACTIVITY_MARKER_AD_HOC = "activity.marker.adhoc"; //$NON-NLS-1$
- public static final String ACTIVITY_MARKER_EXPAND = "activity.marker.expand"; //$NON-NLS-1$
- public static final String ACTIVITY_MARKER_OFFSET = "activity.marker.offset"; //$NON-NLS-1$
- public static final String EVENT_MARKER_CONTAINER = "event.marker.container"; //$NON-NLS-1$
-
private static GraphicsAlgorithmContainer createActivityMarkerCompensate(ContainerShape markerContainer) {
GraphicsAlgorithmContainer algorithmContainer = createActivityMarkerGaContainer(markerContainer,
- ACTIVITY_MARKER_COMPENSATE);
+ GraphitiConstants.ACTIVITY_MARKER_COMPENSATE);
Compensation compensation = createCompensation(algorithmContainer, MARKER_WIDTH, MARKER_HEIGHT);
compensation.arrow1.setForeground(manageColor(markerContainer, StyleUtil.CLASS_FOREGROUND));
compensation.arrow2.setForeground(manageColor(markerContainer, StyleUtil.CLASS_FOREGROUND));
@@ -967,7 +689,7 @@ public class GraphicsUtil {
private static GraphicsAlgorithmContainer createActivityMarkerStandardLoop(ContainerShape markerContainer) {
GraphicsAlgorithmContainer algorithmContainer = createActivityMarkerGaContainer(markerContainer,
- ACTIVITY_MARKER_LC_STANDARD);
+ GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
int[] xy = { 8, 10, 10, 5, 5, 0, 0, 5, 3, 10 };
int[] bend = { 0, 0, 3, 4, 4, 4, 4, 3, 3, 0 };
@@ -983,7 +705,7 @@ public class GraphicsUtil {
private static GraphicsAlgorithmContainer createActivityMarkerMultiParallel(ContainerShape markerContainer) {
GraphicsAlgorithmContainer algorithmContainer = createActivityMarkerGaContainer(markerContainer,
- ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
MultiInstance multiInstance = new MultiInstance();
multiInstance.line1 = gaService.createPolyline(algorithmContainer, new int[] { 2, 0, 2, MARKER_HEIGHT });
multiInstance.line2 = gaService.createPolyline(algorithmContainer, new int[] { 5, 0, 5, MARKER_HEIGHT });
@@ -996,7 +718,7 @@ public class GraphicsUtil {
private static GraphicsAlgorithmContainer createActivityMarkerMultiSequential(ContainerShape markerContainer) {
GraphicsAlgorithmContainer algorithmContainer = createActivityMarkerGaContainer(markerContainer,
- ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
MultiInstance multiInstance = new MultiInstance();
multiInstance.line1 = gaService.createPolyline(algorithmContainer, new int[] { 0, 2, MARKER_WIDTH, 2 });
multiInstance.line2 = gaService.createPolyline(algorithmContainer, new int[] { 0, 5, MARKER_WIDTH, 5 });
@@ -1009,7 +731,7 @@ public class GraphicsUtil {
private static GraphicsAlgorithmContainer createActivityMarkerAdHoc(ContainerShape markerContainer) {
GraphicsAlgorithmContainer algorithmContainer = createActivityMarkerGaContainer(markerContainer,
- ACTIVITY_MARKER_AD_HOC);
+ GraphitiConstants.ACTIVITY_MARKER_AD_HOC);
int[] xy = { 0, 8, 3, 2, 7, 8, 10, 2 };
int[] bend = { 0, 3, 3, 3, 3, 3, 3, 0 };
Polyline tilde = gaService.createPolyline(algorithmContainer, xy, bend);
@@ -1019,7 +741,7 @@ public class GraphicsUtil {
private static GraphicsAlgorithmContainer createActivityMarkerExpand(ContainerShape markerContainer) {
GraphicsAlgorithmContainer algorithmContainer = createActivityMarkerGaContainer(markerContainer,
- ACTIVITY_MARKER_EXPAND);
+ GraphitiConstants.ACTIVITY_MARKER_EXPAND);
Rectangle rect = gaService.createRectangle(algorithmContainer);
rect.setFilled(false);
@@ -1036,17 +758,17 @@ public class GraphicsUtil {
}
- private static ContainerShape getActivityMarkerContainer(ContainerShape container) {
- String property = peService.getPropertyValue(container, ACTIVITY_MARKER_CONTAINER);
+ private static ContainerShape getActivityMarker(ContainerShape container) {
+ String property = peService.getPropertyValue(container, GraphitiConstants.ACTIVITY_MARKER_CONTAINER);
if (property != null && new Boolean(property)) {
return container;
}
- return (ContainerShape) getContainedShape(container, ACTIVITY_MARKER_CONTAINER);
+ return (ContainerShape) getContainedShape(container, GraphitiConstants.ACTIVITY_MARKER_CONTAINER);
}
- private static ContainerShape createActivityMarkerContainer(ContainerShape container) {
+ private static ContainerShape createActivityMarker(ContainerShape container) {
- ContainerShape markerContainer = getActivityMarkerContainer(container);
+ ContainerShape markerContainer = getActivityMarker(container);
if (markerContainer==null) {
// need to create a marker container first
markerContainer = peService.createContainerShape(container, false);
@@ -1057,7 +779,8 @@ public class GraphicsUtil {
int w = 50;
int h = 10;
gaService.setLocationAndSize(markerInvisibleRect, x, y, w, h);
- peService.setPropertyValue(markerContainer, GraphicsUtil.ACTIVITY_MARKER_CONTAINER, Boolean.toString(true));
+ peService.setPropertyValue(markerContainer, GraphitiConstants.ACTIVITY_MARKER_CONTAINER, Boolean.toString(true));
+ peService.setPropertyValue(markerContainer, GraphitiConstants.ACTIVITY_BORDER, Boolean.toString(true));
createActivityMarkerCompensate(markerContainer);
createActivityMarkerStandardLoop(markerContainer);
@@ -1077,12 +800,12 @@ public class GraphicsUtil {
}
public static void setActivityMarkerOffest(ContainerShape container, int offset) {
- peService.setPropertyValue(container, GraphicsUtil.ACTIVITY_MARKER_OFFSET, Integer.toString(offset));
+ peService.setPropertyValue(container, GraphitiConstants.ACTIVITY_MARKER_OFFSET, Integer.toString(offset));
}
public static int getActivityMarkerOffest(ContainerShape container) {
int offset = 0;
- String s = peService.getPropertyValue(container, GraphicsUtil.ACTIVITY_MARKER_OFFSET);
+ String s = peService.getPropertyValue(container, GraphitiConstants.ACTIVITY_MARKER_OFFSET);
if (s!=null) {
try {
offset = Integer.parseInt(s);
@@ -1093,9 +816,9 @@ public class GraphicsUtil {
return offset;
}
- public static void layoutActivityMarkerContainer(ContainerShape container) {
+ public static void layoutActivityMarker(ContainerShape container) {
- ContainerShape markerContainer = getActivityMarkerContainer(container);
+ ContainerShape markerContainer = getActivityMarker(container);
if (markerContainer!=null) {
int lastX = 0;
Iterator<Shape> iterator = peService.getAllContainedShapes(markerContainer).iterator();
@@ -1120,27 +843,67 @@ public class GraphicsUtil {
public static void showActivityMarker(ContainerShape container, String property) {
- ContainerShape markerContainer = getActivityMarkerContainer(container);
+ ContainerShape markerContainer = getActivityMarker(container);
if (markerContainer==null) {
- markerContainer = createActivityMarkerContainer(container);
+ markerContainer = createActivityMarker(container);
}
- GraphicsUtil.getContainedShape(markerContainer, property).setVisible(true);
- layoutActivityMarkerContainer(container);
+ ShapeDecoratorUtil.getContainedShape(markerContainer, property).setVisible(true);
+ layoutActivityMarker(container);
}
public static void hideActivityMarker(ContainerShape container, String property) {
- ContainerShape markerContainer = getActivityMarkerContainer(container);
+ ContainerShape markerContainer = getActivityMarker(container);
if (markerContainer==null) {
- markerContainer = createActivityMarkerContainer(container);
+ markerContainer = createActivityMarker(container);
}
- GraphicsUtil.getContainedShape(markerContainer, property).setVisible(false);
- layoutActivityMarkerContainer(container);
+ ShapeDecoratorUtil.getContainedShape(markerContainer, property).setVisible(false);
+ layoutActivityMarker(container);
+ }
+
+ public static boolean isActivityMarker(PictogramElement pe) {
+ String property = peService.getPropertyValue(pe, GraphitiConstants.ACTIVITY_MARKER_CONTAINER);
+ return new Boolean(property).booleanValue();
+ }
+
+ public static Shape createActivityBorder(ContainerShape containerShape, BaseElement businessObject) {
+ Shape shape = peService.createShape(containerShape, false);
+ RoundedRectangle rect = gaService.createRoundedRectangle(shape, 5, 5);
+ StyleUtil.applyStyle(rect, businessObject);
+ IDimension dim = gaService.calculateSize(containerShape.getGraphicsAlgorithm());
+ gaService.setLocationAndSize(rect, 0, 0, dim.getWidth(), dim.getHeight());
+ peService.setPropertyValue(shape, GraphitiConstants.ACTIVITY_BORDER, Boolean.TRUE.toString());
+ link(shape, businessObject);
+ return shape;
}
+ public static boolean isActivityBorder(PictogramElement pe) {
+ String value = peService.getPropertyValue(pe, GraphitiConstants.ACTIVITY_BORDER);
+ return new Boolean(value);
+ }
+
+ public static Image createActivityImage(ContainerShape containerShape, String imageId) {
+ if (imageId!=null && !imageId.trim().isEmpty()) {
+ GraphicsAlgorithmContainer ga = containerShape.getChildren().get(0).getGraphicsAlgorithm();
+ Image img = gaService.createImage(ga, imageId.trim());
+ gaService.setLocationAndSize(img, 2, 2, TASK_IMAGE_SIZE, TASK_IMAGE_SIZE);
+ return img;
+ }
+ return null;
+ }
+
+ private static void link(PictogramElement pe, EObject object) {
+ PictogramLink link = pe.getLink();
+ if (link==null) {
+ link = PictogramsFactory.eINSTANCE.createPictogramLink();
+ pe.setLink(link);
+ }
+ link.getBusinessObjects().add(object);
+ }
+
private static Color manageColor(PictogramElement pe, IColorConstant colorConstant) {
- Diagram diagram = Graphiti.getPeService().getDiagramForPictogramElement(pe);
- return Graphiti.getGaService().manageColor(diagram, colorConstant);
+ Diagram diagram = peService.getDiagramForPictogramElement(pe);
+ return gaService.manageColor(diagram, colorConstant);
}
private static GraphicsAlgorithmContainer createActivityMarkerGaContainer(ContainerShape markerContainer,
@@ -1188,668 +951,51 @@ public class GraphicsUtil {
return compensation;
}
-
- /**
- * Check if the given Point is with a given distance of the given Location.
- *
- * @param p - the Point to check
- * @param loc - the target Location
- * @param dist - the maximum distance horizontally and vertically from the given Location
- * @return true if the point lies within the rectangular area of the Location.
- */
- public static boolean isPointNear(Point p, ILocation loc, int dist) {
- int x = p.getX();
- int y = p.getY();
- int lx = loc.getX();
- int ly = loc.getY();
- return lx-dist <= x && x <= lx+dist && ly-dist <= y && y <= ly+dist;
- }
-
- public static void setEventSize(int width, int height, Diagram diagram) {
- if (diagramSizeMap == null) {
- diagramSizeMap = new HashMap<Diagram, GraphicsUtil.SizeTemplate>();
- SizeTemplate temp = new SizeTemplate();
- temp.setEventSize(new Size(EVENT_SIZE, EVENT_SIZE));
- temp.setGatewaySize(new Size(GATEWAY_RADIUS*2, GATEWAY_RADIUS*2));
- }
-
- SizeTemplate sizeTemplate = diagramSizeMap.get(diagram);
- if (sizeTemplate == null) {
- sizeTemplate = new SizeTemplate();
- diagramSizeMap.put(diagram, sizeTemplate);
- }
- sizeTemplate.setEventSize(new Size(width, height));
- }
-
- public static void setGatewaySize(int width, int height, Diagram diagram) {
- if (diagramSizeMap == null) {
- diagramSizeMap = new HashMap<Diagram, GraphicsUtil.SizeTemplate>();
- }
-
- SizeTemplate sizeTemplate = diagramSizeMap.get(diagram);
- if (sizeTemplate == null) {
- sizeTemplate = new SizeTemplate();
- diagramSizeMap.put(diagram, sizeTemplate);
- }
- sizeTemplate.setGatewaySize(new Size(width, height));
- }
-
- public static void setActivitySize(int width, int height, Diagram diagram) {
- if (diagramSizeMap == null) {
- diagramSizeMap = new HashMap<Diagram, GraphicsUtil.SizeTemplate>();
- }
-
- SizeTemplate sizeTemplate = diagramSizeMap.get(diagram);
- if (sizeTemplate == null) {
- sizeTemplate = new SizeTemplate();
- diagramSizeMap.put(diagram, sizeTemplate);
- }
- sizeTemplate.setActivitySize(new Size(width, height));
- }
- public static Size getEventSize(Diagram diagram) {
- if (diagramSizeMap != null) {
- SizeTemplate temp = diagramSizeMap.get(diagram);
- if (temp != null) {
- return temp.getEventSize();
- }
- }
- return new Size(EVENT_SIZE, EVENT_SIZE);
- }
-
- public static Size getGatewaySize(Diagram diagram) {
- if (diagramSizeMap != null) {
- SizeTemplate temp = diagramSizeMap.get(diagram);
- if (temp != null) {
- return temp.getGatewaySize();
- }
- }
- return new Size(GATEWAY_RADIUS*2, GATEWAY_RADIUS*2);
- }
-
- public static Size getActivitySize(Diagram diagram) {
- if (diagramSizeMap != null) {
- SizeTemplate temp = diagramSizeMap.get(diagram);
- if (temp != null) {
- return temp.getActivitySize();
- }
- }
- return new Size(TASK_DEFAULT_WIDTH, TASK_DEFAULT_HEIGHT);
- }
-
- public static Size getChoreographySize(Diagram diagram) {
- if (diagramSizeMap != null) {
- SizeTemplate temp = diagramSizeMap.get(diagram);
- if (temp != null) {
- return temp.getChoreographySize();
- }
- }
- return new Size(CHOREOGRAPHY_WIDTH, CHOREOGRAPHY_HEIGHT);
- }
-
- public static Size getPoolSize(Diagram diagram) {
- if (diagramSizeMap != null) {
- SizeTemplate temp = diagramSizeMap.get(diagram);
- if (temp != null) {
- return temp.getPoolSize();
- }
- }
- return new Size(AddParticipantFeature.DEFAULT_POOL_WIDTH, AddParticipantFeature.DEFAULT_POOL_HEIGHT);
- }
-
- public static Size getParticipantBandSize(Diagram diagram) {
- if (diagramSizeMap != null) {
- SizeTemplate temp = diagramSizeMap.get(diagram);
- if (temp != null) {
- return temp.getParticipantBandSize();
- }
- }
- return new Size(GraphicsUtil.CHOREOGRAPHY_WIDTH, GraphicsUtil.PARTICIPANT_BAND_HEIGHT);
- }
-
- public static Size getShapeSize(BaseElement be, Diagram diagram) {
- if (be instanceof Event)
- return getEventSize(diagram);
- if (be instanceof Gateway)
- return getGatewaySize(diagram);
- if (be instanceof Activity)
- return getActivitySize(diagram);
- if (be instanceof ChoreographyActivity)
- return getChoreographySize(diagram);
- if (be instanceof Participant) {
- // determine if the Participant is a Pool or a Participant Band
- // by finding all ChoreographyActivities in this diagram; if
- // the Participant is referenced by a ChoreographyActivity, it is
- // assumed to be a Participant Band.
- if (ModelUtil.isParticipantBand((Participant)be))
- return getParticipantBandSize(diagram);
- return getPoolSize(diagram);
- }
- return new Size(TASK_DEFAULT_WIDTH,TASK_DEFAULT_HEIGHT);
- }
-
- public static boolean contains(Shape parent, Shape child) {
- IDimension size = calculateSize(child);
- ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(child);
- return contains(parent, createPoint(loc.getX(), loc.getY()))
- && contains(parent, createPoint(loc.getX() + size.getWidth(), loc.getY()))
- && contains(parent, createPoint(loc.getX() + size.getWidth(), loc.getY() + size.getHeight()))
- && contains(parent, createPoint(loc.getX(), loc.getY() + size.getHeight()));
- }
-
- public static boolean contains(Shape shape, Point point) {
- IDimension size = calculateSize(shape);
- ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
- int x = point.getX();
- int y = point.getY();
- return x>loc.getX() && x<loc.getX() + size.getWidth() &&
- y>loc.getY() && y<loc.getY() + size.getHeight();
- }
-
- public static boolean intersects(Shape shape1, Shape shape2) {
- ILayoutService layoutService = Graphiti.getLayoutService();
- ILocation loc2 = layoutService.getLocationRelativeToDiagram(shape2);
- int x2 = loc2.getX();
- int y2 = loc2.getY();
- int w2 = getShapeWidth(shape2);
- int h2 = getShapeHeight(shape2);
- return intersects(shape1, x2, y2, w2, h2);
- }
-
- public static boolean intersects(Shape shape1, int x2, int y2, int w2, int h2) {
- ILayoutService layoutService = Graphiti.getLayoutService();
- ILocation loc1 = layoutService.getLocationRelativeToDiagram(shape1);
- int x1 = loc1.getX();
- int y1 = loc1.getY();
- int w1 = getShapeWidth(shape1);
- int h1 = getShapeHeight(shape1);
- return intersects(x1, y1, w1, h1, x2, y2, w2, h2);
- }
-
- public static boolean intersects(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2) {
- if(x2<=x1 || y1<=y2) {
- int t1, t2, t3, t4;
- t1 = x1; x1 = x2; x2 = t1;
- t2 = y1; y1 = y2; y2 = t2;
- t3 = w1; w1 = w2; w2 = t3;
- t4 = h1; h1 = h2; h2 = t4;
- }
- if( y2 + h2 < y1 || y1 + h1 < y2 || x2 + w2 < x1 || x1 + w1 < x2 ) {
- return false;
- }
- return true;
- }
-
- public static boolean intersects(Shape shape, Connection connection) {
- Point p1 = createPoint(connection.getStart());
- Point p3 = createPoint(connection.getEnd());
- if (connection instanceof FreeFormConnection) {
- FreeFormConnection ffc = (FreeFormConnection) connection;
- Point p2 = p1;
- for (Point p : ffc.getBendpoints()) {
- if (intersectsLine(shape, p1, p))
- return true;
- p2 = p1 = p;
- }
- if (intersectsLine(shape, p2, p3))
- return true;
- }
- else if (intersectsLine(shape, p1, p3))
+ public static boolean isValidationDecorator(PictogramElement pe) {
+ String value = peService.getPropertyValue(pe, GraphitiConstants.VALIDATION_DECORATOR);
+ if (new Boolean(value))
return true;
return false;
}
-
- public static boolean intersectsLine(Shape shape, Point p1, Point p2) {
- ILocation loc = peService.getLocationRelativeToDiagram(shape);
- IDimension size = calculateSize(shape);
- // adjust the shape rectangle so that a point touching one of the edges
- // is not considered to be "intersecting"
- if (size.getWidth()>2) {
- loc.setX(loc.getX()+1);
- size.setWidth(size.getWidth()-2);
- }
- if (size.getHeight()>2) {
- loc.setY(loc.getY()+1);
- size.setHeight(size.getHeight()-2);
- }
- return RectangleIntersectsLine.intersectsLine(
- p1.getX(), p1.getY(), p2.getX(), p2.getY(),
- loc.getX(), loc.getY(), size.getWidth(), size.getHeight());
-
-// java.awt.Rectangle rect = new java.awt.Rectangle(loc.getX(), loc.getY(), size.getWidth(), size.getHeight());
-// return rect.intersectsLine(start.getX(), start.getY(), end.getX(), end.getY());
- }
-
- /**
- * Code copied from {@link java.awt.geom.Rectangle2D#intersectsLine(double, double, double, double)}
- * in an attempt to avoid loading the java.awt package here...
- */
- public static final class RectangleIntersectsLine {
- private static final int OUT_LEFT = 1;
- private static final int OUT_TOP = 2;
- private static final int OUT_RIGHT = 4;
- private static final int OUT_BOTTOM = 8;
-
- private static int outcode(double pX, double pY, double rectX, double rectY, double rectWidth, double rectHeight) {
- int out = 0;
- if (rectWidth <= 0) {
- out |= OUT_LEFT | OUT_RIGHT;
- } else if (pX < rectX) {
- out |= OUT_LEFT;
- } else if (pX > rectX + rectWidth) {
- out |= OUT_RIGHT;
- }
- if (rectHeight <= 0) {
- out |= OUT_TOP | OUT_BOTTOM;
- } else if (pY < rectY) {
- out |= OUT_TOP;
- } else if (pY > rectY + rectHeight) {
- out |= OUT_BOTTOM;
- }
- return out;
- }
-
- public static boolean intersectsLine(double lineX1, double lineY1, double lineX2, double lineY2, double rectX, double rectY, double rectWidth, double rectHeight) {
- int out1, out2;
- if ((out2 = outcode(lineX2, lineY2, rectX, rectY, rectWidth, rectHeight)) == 0) {
- return true;
- }
- while ((out1 = outcode(lineX1, lineY1, rectX, rectY, rectWidth, rectHeight)) != 0) {
- if ((out1 & out2) != 0) {
- return false;
- }
- if ((out1 & (OUT_LEFT | OUT_RIGHT)) != 0) {
- double x = rectX;
- if ((out1 & OUT_RIGHT) != 0) {
- x += rectWidth;
- }
- lineY1 = lineY1 + (x - lineX1) * (lineY2 - lineY1) / (lineX2 - lineX1);
- lineX1 = x;
- } else {
- double y = rectY;
- if ((out1 & OUT_BOTTOM) != 0) {
- y += rectHeight;
- }
- lineX1 = lineX1 + (y - lineY1) * (lineX2 - lineX1) / (lineY2 - lineY1);
- lineY1 = y;
- }
- }
- return true;
- }
- }
-
- public static boolean intersects(Point p1Start, Point p1End, Point p2Start, Point p2End) {
- return isLineIntersectingLine(
- p1Start.getX(), p1Start.getY(),
- p1End.getX(), p1End.getY(),
- p2Start.getX(), p2Start.getY(),
- p2End.getX(), p2End.getY()
- );
- }
-
- /**
- * Check if two line segments intersects. Integer domain.
- *
- * @param x0, y0, x1, y1 End points of first line to check.
- * @param x2, yy, x3, y3 End points of second line to check.
- * @return True if the two lines intersects.
- */
- public static boolean isLineIntersectingLine(int x0, int y0, int x1,
- int y1, int x2, int y2, int x3, int y3) {
- int s1 = sameSide(x0, y0, x1, y1, x2, y2, x3, y3);
- int s2 = sameSide(x2, y2, x3, y3, x0, y0, x1, y1);
-
- return s1 <= 0 && s2 <= 0;
- }
-
- /**
- * Check if two points are on the same side of a given line. Algorithm from
- * Sedgewick page 350.
- *
- * @param x0, y0, x1, y1 The line.
- * @param px0, py0 First point.
- * @param px1, py1 Second point.
- * @return <0 if points on opposite sides. =0 if one of the points is
- * exactly on the line >0 if points on same side.
- */
- private static int sameSide(int x0, int y0, int x1, int y1,
- int px0, int py0, int px1, int py1) {
- int sameSide = 0;
-
- int dx = x1 - x0;
- int dy = y1 - y0;
- int dx1 = px0 - x0;
- int dy1 = py0 - y0;
- int dx2 = px1 - x1;
- int dy2 = py1 - y1;
-
- // Cross product of the vector from the endpoint of the line to the
- // point
- int c1 = dx * dy1 - dy * dx1;
- int c2 = dx * dy2 - dy * dx2;
-
- if (c1 != 0 && c2 != 0)
- sameSide = c1 < 0 != c2 < 0 ? -1 : 1;
- else if (dx == 0 && dx1 == 0 && dx2 == 0)
- sameSide = !isBetween(y0, y1, py0) && !isBetween(y0, y1, py1) ? 1
- : 0;
- else if (dy == 0 && dy1 == 0 && dy2 == 0)
- sameSide = !isBetween(x0, x1, px0) && !isBetween(x0, x1, px1) ? 1
- : 0;
-
- return sameSide;
- }
-
- /**
- * Return true if c is between a and b.
- */
- private static boolean isBetween(int a, int b, int c) {
- return b > a ? c >= a && c <= b : c >= b && c <= a;
- }
-
- public static Color clone(Color c) {
- return c;
- }
-
- public static boolean pointsEqual(Point p1, Point p2) {
- return p1.getX()==p2.getX() && p1.getY()==p2.getY();
- }
-
- public static Point createPoint(Point p) {
- return gaService.createPoint(p.getX(), p.getY());
- }
-
- public static Point createPoint(int x, int y) {
- return gaService.createPoint(x, y);
- }
-
- public static Point createPoint(Anchor a) {
- return createPoint(peService.getLocationRelativeToDiagram(a));
- }
-
- public static Point createPoint(AnchorContainer ac) {
- if (ac instanceof Shape)
- return createPoint(peService.getLocationRelativeToDiagram((Shape)ac));
- return null;
- }
-
- public static Point getShapeCenter(AnchorContainer shape) {
- Point p = createPoint(shape);
- IDimension size = calculateSize(shape);
- p.setX( p.getX() + size.getWidth()/2 );
- p.setY( p.getY() + size.getHeight()/2 );
- return p;
- }
-
- public static Point createPoint(ILocation loc) {
- return createPoint(loc.getX(), loc.getY());
- }
-
- public static Point getMidpoint(Point p1, Point p2) {
- int dx = p2.getX() - p1.getX();
- int dy = p2.getY() - p1.getY();
- int x = p1.getX() + dx/2;
- int y = p1.getY() + dy/2;
- return createPoint(x,y);
- }
-
- public static double getLength(ILocation start, ILocation end) {
- double a = (double)(start.getX() - end.getX());
- double b = (double)(start.getY() - end.getY());
- return Math.sqrt(a*a + b*b);
- }
-
- public static double getLength(List<Point> points) {
- double length = 0;
- int size = points.size();
- if (size>=2) {
- Point p1 = points.get(0);
- for (int i=1; i<size-1; ++i) {
- Point p2 = points.get(i);
- length += getLength(p1,p2);
- p1 = p2;
- }
- }
- return length;
- }
-
- public static double getLength(Point p1, Point p2) {
- double a = (double)(p1.getX() - p2.getX());
- double b = (double)(p1.getY() - p2.getY());
- return Math.sqrt(a*a + b*b);
- }
-
- /**
- * Check if the line segment defined by the two Points is vertical.
- *
- * @param p1
- * @param p2
- * @return true if the line segment is vertical
- */
- public final static boolean isVertical(Point p1, Point p2) {
- return Math.abs(p1.getX() - p2.getX()) == 0;
- }
-
- /**
- * Check if the line segment defined by the two Points is horizontal.
- *
- * @param p1
- * @param p2
- * @return true if the line segment is horizontal
- */
- public final static boolean isHorizontal(Point p1, Point p2) {
- return Math.abs(p1.getY() - p2.getY()) == 0;
- }
-
- /**
- * Check if the line segment defined by the two Points is neither horizontal nor vertical.
- *
- * @param p1
- * @param p2
- * @return true if the line segment is slanted
- */
- public final static boolean isSlanted(Point p1, Point p2) {
- return !isHorizontal(p1, p2) && !isVertical(p1,p2);
- }
-
- public static Point getVertMidpoint(Point start, Point end, double fract) {
- Point m = GraphicsUtil.createPoint(start);
- int d = (int)(fract * (double)(end.getY() - start.getY()));
- m.setY(start.getY()+d);
- return m;
- }
-
- public static Point getHorzMidpoint(Point start, Point end, double fract) {
- Point m = GraphicsUtil.createPoint(start);
- int d = (int)(fract * (double)(end.getX() - start.getX()));
- m.setX(start.getX()+d);
- return m;
- }
- public static IDimension calculateSize(AnchorContainer shape) {
- GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
- if (ga!=null)
- return gaService.calculateSize(ga);
-
- IDimension dim = null;
- if (shape instanceof ContainerShape) {
- ContainerShape cs = (ContainerShape)shape;
- for (Shape s : cs.getChildren()) {
- ga = s.getGraphicsAlgorithm();
- if (ga!=null) {
- IDimension d = gaService.calculateSize(ga);
- if (dim==null)
- dim = d;
- else {
- if (d.getWidth() > dim.getWidth())
- dim.setWidth(d.getWidth());
- if (d.getHeight() > dim.getHeight())
- dim.setHeight(d.getHeight());
- }
- }
- }
- }
- return dim;
- }
-
- public static boolean debug = false;
-
- public static void dump(String label, List<ContainerShape> shapes) {
- if (shapes!=null) {
- if (debug) {
- System.out.println(label);
- for (ContainerShape shape : shapes)
- dump(1, "",shape,0,0); //$NON-NLS-1$
- System.out.println(""); //$NON-NLS-1$
- }
- }
- }
-
- public static void dump(String label, Anchor anchor) {
- if (debug) {
- System.out.print(label+" "); //$NON-NLS-1$
- ILocation loc = peService.getLocationRelativeToDiagram(anchor);
- System.out.print(" at "+loc.getX()+", "+loc.getY()); //$NON-NLS-1$ //$NON-NLS-2$
- dump(" parent=", (ContainerShape)anchor.getParent()); //$NON-NLS-1$
- if (AnchorUtil.isBoundaryAnchor(anchor)) {
- String property = Graphiti.getPeService().getPropertyValue(
- anchor, AnchorUtil.BOUNDARY_FIXPOINT_ANCHOR);
- if (property != null && anchor instanceof FixPointAnchor) {
- System.out.println(" location="+AnchorLocation.getLocation(property)); //$NON-NLS-1$
- }
- }
- }
- }
-
- public static void dump(String label, ContainerShape shape) {
- dump(0, label,shape,0,0);
- }
-
- public static void dump(int level, String label, ContainerShape shape) {
- dump(level, label,shape,0,0);
- }
-
- public static void dump(int level, String label, ContainerShape shape, int x, int y) {
- if (debug) {
- String text = getDebugText(shape);
- for (int i=0; i<level; ++i)
- System.out.print(" "); //$NON-NLS-1$
- System.out.print(label+" "+text); //$NON-NLS-1$
- if (x>0 && y>0) {
- System.out.println(" at "+x+", "+y); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else
- System.out.println(""); //$NON-NLS-1$
- }
- }
-
- public static String getDebugText(ContainerShape shape) {
- EObject be = BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
- String id = ""; //$NON-NLS-1$
- if (be instanceof BaseElement) {
- id = " " + ((BaseElement)be).getId(); //$NON-NLS-1$
- }
- String text = be.eClass().getName()+id+": "+ModelUtil.getDisplayName(be); //$NON-NLS-1$
- return text;
- }
-
- public static void dump(String label) {
- if (debug) {
- System.out.println(label);
+ public static PictogramElement createValidationDecorator(ContainerShape containerShape) {
+ for (PictogramElement pe : containerShape.getChildren()) {
+ if (isValidationDecorator(pe))
+ return pe;
}
- }
-
- public static LineSegment[] getEdges(Shape shape) {
- ILocation loc = peService.getLocationRelativeToDiagram(shape);
- IDimension size = GraphicsUtil.calculateSize(shape);
- LineSegment top = new LineSegment(loc.getX(),loc.getY(),
- loc.getX()+size.getWidth(), loc.getY());
- LineSegment left = new LineSegment(loc.getX(),loc.getY(), loc.getX(),
- loc.getY()+size.getHeight());
- LineSegment bottom = new LineSegment(loc.getX(), loc.getY()+size.getHeight(),
- loc.getX()+size.getWidth(), loc.getY()+size.getHeight());
- LineSegment right = new LineSegment(loc.getX()+size.getWidth(), loc.getY(),
- loc.getX()+size.getWidth(), loc.getY()+size.getHeight());
- return new LineSegment[] {top, bottom, left, right};
- }
-
- public static LineSegment findNearestEdge(Shape shape, Point p) {
- LineSegment edges[] = getEdges(shape);
- LineSegment top = edges[0];
- LineSegment bottom = edges[1];
- LineSegment left = edges[2];
- LineSegment right = edges[3];
- double minDist;
- double dist;
- LineSegment result;
-
- minDist = top.getDistance(p);
- result = top;
+ PictogramElement decorator = Graphiti.getPeCreateService().createShape(containerShape, false);
+ peService.setPropertyValue(decorator, GraphitiConstants.VALIDATION_DECORATOR, "true");
+ Rectangle rect = Graphiti.getGaCreateService().createInvisibleRectangle(decorator);
+ rect.setX(-5);
+ rect.setY(-5);
+ rect.setWidth(0);
+ rect.setHeight(0);
- dist = bottom.getDistance(p);
- if (dist<minDist) {
- minDist = dist;
- result = bottom;
- }
- dist = left.getDistance(p);
- if (dist<minDist) {
- minDist = dist;
- result = left;
- }
- dist = right.getDistance(p);
- if (dist<minDist) {
- minDist = dist;
- result = right;
- }
- return result;
+ return decorator;
}
- public static void sendToFront(Shape shape) {
- peService.sendToFront(shape);
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(shape, BPMNShape.class);
- if (bpmnShape!=null) {
- BPMNPlane plane = (BPMNPlane)bpmnShape.eContainer();
- plane.getPlaneElement().remove(bpmnShape);
- plane.getPlaneElement().add(bpmnShape);
- }
- }
+ public static ContainerShape createEventSubProcessDecorator(ContainerShape subProcessShape, boolean isInterrupting) {
+ ContainerShape decoratorShape = Graphiti.getPeCreateService().createContainerShape(subProcessShape, false);
+ Rectangle invisibleRect = Graphiti.getGaCreateService().createInvisibleRectangle(decoratorShape);
- public static void sendToBack(Shape shape) {
- peService.sendToBack(shape);
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(shape, BPMNShape.class);
- if (bpmnShape!=null) {
- BPMNPlane plane = (BPMNPlane)bpmnShape.eContainer();
- plane.getPlaneElement().remove(bpmnShape);
- plane.getPlaneElement().add(0,bpmnShape);
- }
- }
-
- public interface IShapeFilter {
- boolean matches(Shape shape);
- }
-
- /**
- * Shape Filter that matches only Container Shapes and not Labels
- */
- public class ContainerShapeFilter implements IShapeFilter {
- public boolean matches(Shape shape) {
- return shape instanceof ContainerShape && !FeatureSupport.isLabelShape(shape);
- }
+ ContainerShape circleShape = Graphiti.getPeCreateService().createContainerShape(decoratorShape, false);
+ Ellipse circle = Graphiti.getGaCreateService().createEllipse(circleShape);
+ gaService.setLocationAndSize(circle, 0, 0, 20, 20);
+ circle.setForeground(manageColor(decoratorShape, StyleUtil.CLASS_FOREGROUND));
+ circle.setFilled(false);
+ if (!isInterrupting)
+ circle.setLineStyle(LineStyle.DASH);
+ peService.setPropertyValue(decoratorShape, GraphitiConstants.EVENT_SUBPROCESS_DECORATOR_CONTAINER, Boolean.TRUE.toString());
+ gaService.setLocationAndSize(invisibleRect, 1, 1, 20, 20);
+
+ return decoratorShape;
}
- public static Shape findShapeAt(ContainerShape containerShape, Point p, IShapeFilter filter) {
- for (Shape c : containerShape.getChildren()) {
- if (c instanceof ContainerShape) {
- Shape cc = findShapeAt((ContainerShape) c, p, filter);
- if (cc!=null)
- return cc;
- }
- if (GraphicsUtil.contains(c, p)) {
- if (filter.matches(c)) {
- return c;
- }
- }
- }
- return null;
+ public static boolean isEventSubProcessDecorator(PictogramElement pe) {
+ String property = peService.getPropertyValue(pe, GraphitiConstants.EVENT_SUBPROCESS_DECORATOR_CONTAINER);
+ if (property!=null)
+ return true;
+ return false;
}
}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeLayoutManager.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeLayoutManager.java
index 7fb25147..fc6d3a39 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeLayoutManager.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/ShapeLayoutManager.java
@@ -106,6 +106,9 @@ public class ShapeLayoutManager {
List<ContainerShape> middleShapes = new ArrayList<ContainerShape>();
List<ContainerShape> endShapes = new ArrayList<ContainerShape>();
for (ContainerShape child : childShapes) {
+ if (!child.isActive())
+ continue;
+
BaseElement be = BusinessObjectUtil.getFirstBaseElement(child);
if (be instanceof Participant && ModelUtil.isParticipantBand((Participant)be))
continue;
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SimpleTreeIterator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SimpleTreeIterator.java
new file mode 100644
index 00000000..3326da40
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/SimpleTreeIterator.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.core.utils;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public abstract class SimpleTreeIterator<T extends Object> implements Iterable<T> {
+
+ public SimpleTreeIterator() {
+ }
+
+ public abstract Iterator<T> iterator();
+
+ public class TreeIterator implements Iterator<T> {
+ int iteratorIndex = -1;
+ int childIndex = 0;
+ List<T> children;
+ List<Iterator<T>> iterators;
+
+ public TreeIterator(List<T> children) {
+ this.children = children;
+ }
+
+ public boolean hasChildren() {
+ return children.size()>0;
+ }
+
+ @Override
+ public boolean hasNext() {
+ if (!hasChildren())
+ return false;
+
+ if (iteratorIndex==-1) {
+ iteratorIndex = 0;
+ iterators = new ArrayList<Iterator<T>>();
+ for (T child : children) {
+ iterators.add(((Iterable)child).iterator());
+ }
+ }
+ return iteratorIndex<iterators.size() || childIndex<children.size();
+ }
+
+ @Override
+ public T next() {
+ if (!hasChildren())
+ return null;
+ while (iteratorIndex<iterators.size()) {
+ Iterator<T> iter = iterators.get(iteratorIndex);
+ if (iter.hasNext())
+ return iter.next();
+ ++iteratorIndex;
+ }
+ if (childIndex<children.size()) {
+ T child = children.get(childIndex);
+ ++childIndex;
+ return child;
+ }
+ return null;
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/StyleUtil.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/StyleUtil.java
index 8845d716..b27da6c3 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/StyleUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/StyleUtil.java
@@ -28,6 +28,8 @@ import org.eclipse.graphiti.mm.algorithms.styles.LocationType;
import org.eclipse.graphiti.mm.algorithms.styles.Style;
import org.eclipse.graphiti.mm.algorithms.styles.StylesFactory;
import org.eclipse.graphiti.mm.algorithms.styles.StylesPackage;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
@@ -41,6 +43,8 @@ public class StyleUtil {
private static final String CLASS_ID = "E-CLASS"; //$NON-NLS-1$
private static final String FILL_STYLE = "fill.style"; //$NON-NLS-1$
+ private static final IGaService gaService = Graphiti.getGaService();
+ private static final IPeService peService = Graphiti.getPeService();
public enum FillStyle {
FILL_STYLE_NONE,
@@ -56,7 +60,6 @@ public class StyleUtil {
Style s = findStyle(diagram, CLASS_ID);
if(s == null) {
- IGaService gaService = Graphiti.getGaService();
s = gaService.createStyle(diagram, CLASS_ID);
s.setForeground(gaService.manageColor(diagram, CLASS_FOREGROUND));
s.setBackground(gaService.manageColor(diagram, CLASS_BACKGROUND));
@@ -77,8 +80,8 @@ public class StyleUtil {
return null;
}
- public static Diagram findDiagram(GraphicsAlgorithm shape) {
- EObject container = shape.eContainer();
+ public static Diagram findDiagram(GraphicsAlgorithm ga) {
+ EObject container = ga.eContainer();
while (container!=null && !(container instanceof Diagram)) {
container = container.eContainer();
}
@@ -86,7 +89,7 @@ public class StyleUtil {
}
public static void setFillStyle(GraphicsAlgorithm ga, FillStyle fillStyle) {
- Graphiti.getPeService().setPropertyValue(ga, FILL_STYLE, fillStyle.toString());
+ peService.setPropertyValue(ga, FILL_STYLE, fillStyle.toString());
}
public static void applyStyle(GraphicsAlgorithm ga, BaseElement be) {
@@ -95,54 +98,60 @@ public class StyleUtil {
public static void applyStyle(GraphicsAlgorithm ga, BaseElement be, ShapeStyle ss) {
if (be!=null) {
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
-
Diagram diagram = findDiagram(ga);
- String id = null;
-
+
if (ss==null) {
- Bpmn2Preferences pref = Bpmn2Preferences.getInstance(be);
- ss = pref.getShapeStyle(be);
- id = pref.getShapeStyleId(be);
- }
- else {
- id = ss.toString();
+ // fetch ShapeStyle for this BaseElement from the User Preferences
+ ss = Bpmn2Preferences.getInstance(be).getShapeStyle(be);
}
- IColorConstant foreground = ga instanceof AbstractText ? ss.getTextColor() : ss.getShapeForeground();
+ IColorConstant foreground = ga instanceof AbstractText ? ss.getLabelForeground() : ss.getShapeForeground();
IColorConstant background = ss.getShapeBackground();
- if (peService.getPropertyValue(ga, Bpmn2Preferences.PREF_SHAPE_STYLE)==null) {
- peService.setPropertyValue(ga, Bpmn2Preferences.PREF_SHAPE_STYLE, Boolean.toString(true));
- }
-
if (BusinessObjectUtil.isConnection(be.eClass().getInstanceClass())) {
+ ga.setForeground(gaService.manageColor(diagram, foreground));
if (ga instanceof AbstractText) {
- Font f = ss.getTextFont();
+ Font f = ss.getLabelFont();
((AbstractText)ga).setFont(gaService.manageFont(diagram, f.getName(), f.getSize(), f.isItalic(), f.isBold()));
- }
- else
- ga.setLineWidth(2);
+ // NB: this is now done in the AbstractAddLabelFeature, not here!
+// ((AbstractText)ga).setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
+// ((AbstractText)ga).setVerticalAlignment(Orientation.ALIGNMENT_TOP);
- if (ga.getForeground()==null)
- ga.setForeground(gaService.manageColor(diagram, foreground));
- // by default the fill color for connection decorators is the
- // connection line foreground color
- if (ga.getBackground()==null)
+ }
+ else if (ga.eContainer() instanceof ConnectionDecorator) {
+ // this is a connection arrow or tail, set its fill color
+ // the same as the line color
ga.setBackground(gaService.manageColor(diagram, foreground));
+ }
+ else if (ga.eContainer() instanceof Connection) {
+ ga.setLineWidth(ss.getDefaultWidth());
+ // this is the connection line itself, set its color to
+ // foreground and make sure all of the connection decorators
+ // are set to the same
+ Connection c = (Connection) ga.eContainer();
+ for (ConnectionDecorator cd : c.getConnectionDecorators()) {
+ if (!FeatureSupport.isLabelShape(cd)) {
+ cd.getGraphicsAlgorithm().setForeground(gaService.manageColor(diagram, foreground));
+ cd.getGraphicsAlgorithm().setBackground(gaService.manageColor(diagram, foreground));
+ }
+ }
+ }
}
else {
// Style only used for drawing gradients
+ String id = ss.toString();
Style s = findStyle(diagram, id);
if(s == null) {
s = gaService.createStyle(diagram, id);
}
if (ga instanceof AbstractText) {
- Font f = ss.getTextFont();
+ Font f = ss.getLabelFont();
((AbstractText)ga).setFont(gaService.manageFont(diagram, f.getName(), f.getSize(), f.isItalic(), f.isBold()));
ga.setForeground(gaService.manageColor(diagram, foreground));
+ // NB: this is now done in the AbstractAddLabelFeature, not here!
+// ((AbstractText)ga).setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
+// ((AbstractText)ga).setVerticalAlignment(Orientation.ALIGNMENT_TOP);
// Text does not have a fill style (yet)
return;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Timer.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Timer.java
new file mode 100644
index 00000000..ad65e05f
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Timer.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.core.utils;
+
+import java.util.Stack;
+
+/**
+ *
+ */
+public class Timer {
+
+ class Interval {
+ String msg;
+ long t1, t2;
+
+ Interval(String msg) {
+ this.msg = msg;
+ System.err.println("Start: "+msg);
+ t1 = System.currentTimeMillis();
+ }
+
+ void stop() {
+ t2 = System.currentTimeMillis();
+ System.err.println("Stop: "+msg+" " + (double)(t2-t1)/1000.0+" sec");
+ }
+ }
+
+ private Stack<Interval> stack = new Stack<Interval>();
+
+ public static Timer INSTANCE = new Timer();
+
+ public void mark(String msg) {
+ stop();
+ stack.push(new Interval(msg));
+ }
+
+ public void start(String msg) {
+ stack.push(new Interval(msg));
+ }
+
+ public void stop() {
+ if (!stack.isEmpty()) {
+ Interval i = stack.pop();
+ i.stop();
+ }
+ }
+
+ public void stopAll() {
+ while (!stack.isEmpty()) {
+ stop();
+ }
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Tuple.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Tuple.java
index 1caca1ea..1caca1ea 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Tuple.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/Tuple.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/messages.properties
index 351087a6..3cbc5978 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
ErrorUtils_Title=An error occured
FixDuplicateIdsDialog_Duplicate_ID={0} and {1} have the same ID
FixDuplicateIdsDialog_Message=This file is corrupt because multiple elements have the same ID\!\nYou can repair this file by reassigning new IDs for the duplicate elements.\nSimply select the elements for which you wish to reassign new IDs.\nNote that if you do not "Select All", the file will still be corrupt.
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ProjectValidator.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ProjectValidator.java
index f102833f..0a5a8f5c 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ProjectValidator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ProjectValidator.java
@@ -15,12 +15,12 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ProxyURIConverterImplExtension;
import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.builder.BPMN2Nature;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceSetImpl;
+import org.eclipse.bpmn2.modeler.core.model.ProxyURIConverterImplExtension;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.core.resources.IFile;
@@ -86,7 +86,7 @@ public class BPMN2ProjectValidator extends AbstractValidator {
}
Bpmn2ModelerResourceSetImpl rs = new Bpmn2ModelerResourceSetImpl();
- getTargetRuntime().setResourceSet(rs);
+ getTargetRuntime().registerExtensionResourceFactory(rs);
URI modelUri = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
rs.setURIConverter(new ProxyURIConverterImplExtension(modelUri));
Map<Object,Object> options = new HashMap<Object,Object>();
@@ -146,7 +146,7 @@ public class BPMN2ProjectValidator extends AbstractValidator {
cd.getContentType().getId());
}
String ext = file.getFileExtension();
- if ("bpmn".equals(ext) || "bpmn2".equals(ext))
+ if ("bpmn".equals(ext) || "bpmn2".equals(ext)) //$NON-NLS-1$ //$NON-NLS-2$
return true;
} catch (Exception e) {
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java
index 561168eb..37b0eb91 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationConstraints.java
@@ -68,6 +68,7 @@ import org.eclipse.bpmn2.SignalEventDefinition;
import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.TimerEventDefinition;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
@@ -139,22 +140,28 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
return ctx.createSuccessStatus();
}
- public IStatus createFailureStatus(IValidationContext ctx, EObject object, Object... messageArgs) {
- IStatus status = ctx.createFailureStatus(messageArgs);
+ public IStatus createFailureStatus(IValidationContext ctx, EObject object, String featureName, String message) {
ctx.addResult(object);
+ if (featureName!=null && !featureName.isEmpty()) {
+ EStructuralFeature feature = object.eClass().getEStructuralFeature(featureName);
+ if (feature!=null)
+ ctx.addResult(feature);
+ }
+ IStatus status = ctx.createFailureStatus(message);
return status;
}
public IStatus createMissingFeatureStatus(IValidationContext ctx, EObject object, String featureName) {
EStructuralFeature feature = object.eClass().getEStructuralFeature(featureName);
+ ctx.addResult(object);
+ ctx.addResult(feature);
// change error message slightly for connections
String message;
if (feature.getEType() == Bpmn2Package.eINSTANCE.getSequenceFlow())
- message = NLS.bind(Messages.BPMN2ValidationConstraints_Missing_Connection, ModelUtil.getLabel(object), ModelUtil.getLabel(object, feature));
+ message = NLS.bind(Messages.BPMN2ValidationConstraints_Missing_Connection, ExtendedPropertiesProvider.getLabel(object), ExtendedPropertiesProvider.getLabel(object, feature));
else
- message = NLS.bind(Messages.BPMN2ValidationConstraints_Missing_Feature, ModelUtil.getLabel(object), ModelUtil.getLabel(object, feature));
+ message = NLS.bind(Messages.BPMN2ValidationConstraints_Missing_Feature, ExtendedPropertiesProvider.getLabel(object), ExtendedPropertiesProvider.getLabel(object, feature));
IStatus status = ctx.createFailureStatus(message);
- ctx.addResult(object);
return status;
}
@@ -177,10 +184,10 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
}
}
if (!foundStartEvent) {
- return createFailureStatus(ctx, be, Messages.BPMN2ValidationConstraints_6);
+ return createFailureStatus(ctx, be, null, Messages.BPMN2ValidationConstraints_6);
}
if (!foundEndEvent) {
- return createFailureStatus(ctx, be, Messages.BPMN2ValidationConstraints_7);
+ return createFailureStatus(ctx, be, null, Messages.BPMN2ValidationConstraints_7);
}
if (isEmpty(process.getName())) {
return createMissingFeatureStatus(ctx,be,"name"); //$NON-NLS-1$
@@ -189,7 +196,7 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
else {
// see Bug 425903 - need to figure this out...
// if (ProcessType.NONE.equals(process.getProcessType())) {
-// return createFailureStatus(ctx, be, Messages.BPMN2ValidationConstraints_0);
+// return createFailureStatus(ctx, be, "processType", Messages.BPMN2ValidationConstraints_0);
// }
// report errors only
}
@@ -328,42 +335,88 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
Gateway elem = (Gateway) be;
if (!warnings) {
- if (elem.getGatewayDirection() == null
- || elem.getGatewayDirection().getValue() == GatewayDirection.UNSPECIFIED.getValue()) {
- ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
- return createMissingFeatureStatus(ctx,be,"gatewayDirection"); //$NON-NLS-1$
+ GatewayDirection direction = elem.getGatewayDirection();
+ int incoming = elem.getIncoming().size();
+ int outgoing = elem.getOutgoing().size();
+ if (direction == GatewayDirection.CONVERGING) {
+ // Converging gateways MUST have multiple incoming, and zero or one outgoing connection
+ if (incoming<1) {
+ ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
+ Messages.BPMN2ValidationConstraints_10);
+ }
+ if (outgoing>1) {
+ ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
+ Messages.BPMN2ValidationConstraints_11);
+ }
}
+ else if (direction == GatewayDirection.DIVERGING) {
+ // Diverging gateways MUST have zero or one incoming, and multiple outgoing connections
+ if (incoming>1) {
+ ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
+ Messages.BPMN2ValidationConstraints_12);
+ }
+ if (outgoing<1) {
+ ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
+ Messages.BPMN2ValidationConstraints_13);
+ }
+ }
+ else if (direction == GatewayDirection.MIXED) {
+ // Mixed gateways MUST have multiple incoming, and multiple outgoing connections
+ if (incoming<1) {
+ ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
+ Messages.BPMN2ValidationConstraints_14);
+ }
+ if (outgoing<1) {
+ ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
+ Messages.BPMN2ValidationConstraints_15);
+ }
+ }
+ else {
+ // Unspecified gateways MUST have either multiple incoming, or multiple outgoing connections
+ if (outgoing<1 && incoming<1) {
+ ctx.addResult(Bpmn2Package.eINSTANCE.getGateway_GatewayDirection());
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
+ Messages.BPMN2ValidationConstraints_16);
+ }
+ }
+
if (elem instanceof ExclusiveGateway) {
- if (elem.getGatewayDirection().getValue() != GatewayDirection.DIVERGING.getValue()
- && elem.getGatewayDirection().getValue() != GatewayDirection.CONVERGING.getValue()) {
- return createFailureStatus(ctx,be,
+ if (direction != GatewayDirection.DIVERGING
+ && direction != GatewayDirection.CONVERGING) {
+ return createFailureStatus(ctx,be, "gatewayDirection", //$NON-NLS-1$
Messages.BPMN2ValidationConstraints_29);
}
}
if (elem instanceof EventBasedGateway) {
- if (elem.getGatewayDirection().getValue() != GatewayDirection.DIVERGING.getValue()) {
- return createFailureStatus(ctx,be,
+ if (direction != GatewayDirection.DIVERGING) {
+ return createFailureStatus(ctx,be,"gatewayDirection", //$NON-NLS-1$
Messages.BPMN2ValidationConstraints_30);
}
}
if (elem instanceof ParallelGateway) {
- if (elem.getGatewayDirection().getValue() != GatewayDirection.DIVERGING.getValue()
- && elem.getGatewayDirection().getValue() != GatewayDirection.CONVERGING.getValue()) {
- return createFailureStatus(ctx,be,
+ if (direction != GatewayDirection.DIVERGING
+ && direction != GatewayDirection.CONVERGING) {
+ return createFailureStatus(ctx,be,"gatewayDirection", //$NON-NLS-1$
Messages.BPMN2ValidationConstraints_31);
}
}
if (elem instanceof InclusiveGateway) {
- if (elem.getGatewayDirection().getValue() != GatewayDirection.DIVERGING.getValue()
- && elem.getGatewayDirection().getValue() != GatewayDirection.CONVERGING.getValue()) {
- return createFailureStatus(ctx,be,
+ if (direction != GatewayDirection.DIVERGING
+ && direction != GatewayDirection.CONVERGING) {
+ return createFailureStatus(ctx,be,"gatewayDirection", //$NON-NLS-1$
Messages.BPMN2ValidationConstraints_32);
}
}
if (elem instanceof ComplexGateway) {
- if (elem.getGatewayDirection().getValue() != GatewayDirection.DIVERGING.getValue()
- && elem.getGatewayDirection().getValue() != GatewayDirection.CONVERGING.getValue()) {
- return createFailureStatus(ctx,be,
+ if (direction != GatewayDirection.DIVERGING
+ && direction != GatewayDirection.CONVERGING) {
+ return createFailureStatus(ctx,be,"gatewayDirection", //$NON-NLS-1$
Messages.BPMN2ValidationConstraints_33);
}
}
@@ -452,10 +505,10 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
else if (be instanceof ChoreographyActivity) {
ChoreographyActivity elem = (ChoreographyActivity)be;
if (elem.getParticipantRefs().size()<2) {
- return createFailureStatus(ctx,be,Messages.BPMN2ValidationConstraints_45);
+ return createFailureStatus(ctx,be,"participantRefs",Messages.BPMN2ValidationConstraints_45); //$NON-NLS-1$
}
if (elem.getInitiatingParticipantRef()==null) {
- return createFailureStatus(ctx,be,Messages.BPMN2ValidationConstraints_46);
+ return createFailureStatus(ctx,be,"initiatingParticipantRef",Messages.BPMN2ValidationConstraints_46); //$NON-NLS-1$
}
}
else if (be instanceof Resource) {
@@ -469,11 +522,11 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
for (MessageFlow mf : elem.getMessageFlowRef()) {
InteractionNode in = mf.getSourceRef();
if (!elem.getParticipantRefs().contains(in)) {
- return createFailureStatus(ctx,be,Messages.BPMN2ValidationConstraints_48);
+ return createFailureStatus(ctx,be,"participantRefs",Messages.BPMN2ValidationConstraints_48); //$NON-NLS-1$
}
in = mf.getTargetRef();
if (!elem.getParticipantRefs().contains(in)) {
- return createFailureStatus(ctx,be,Messages.BPMN2ValidationConstraints_49);
+ return createFailureStatus(ctx,be,"participantRefs",Messages.BPMN2ValidationConstraints_49); //$NON-NLS-1$
}
}
}
@@ -574,11 +627,8 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
private IStatus validateEventDefinition(IValidationContext ctx, EventDefinition ed) {
if (ed instanceof TimerEventDefinition) {
TimerEventDefinition ted = (TimerEventDefinition) ed;
- if ( ted.getTimeDate() == null
- && ted.getTimeDuration() == null
- && ted.getTimeCycle() == null
- ) {
- return createFailureStatus(ctx,ed,Messages.BPMN2ValidationConstraints_52);
+ if (ted.getTimeDate() == null && ted.getTimeDuration() == null && ted.getTimeCycle() == null) {
+ return createFailureStatus(ctx,ed,"timeCycle",Messages.BPMN2ValidationConstraints_52); //$NON-NLS-1$
}
} else if (ed instanceof SignalEventDefinition) {
if (!isValidForExecutableProcess(ed, ((SignalEventDefinition) ed).getSignalRef())) {
@@ -696,19 +746,19 @@ public class BPMN2ValidationConstraints extends AbstractModelConstraint {
if (id == itemDefinition)
continue;
- if (ModelUtil.compare(id, itemDefinition,true)) {
+ if (ExtendedPropertiesProvider.compare(id, itemDefinition,true)) {
Object structureRef = itemDefinition.getStructureRef();
if (structureRef==null ||
(ModelUtil.isStringWrapper(structureRef) &&
ModelUtil.getStringWrapperValue(structureRef).isEmpty()))
continue;
- return createFailureStatus(ctx,be,
+ return createFailureStatus(ctx,be,"structureRef", //$NON-NLS-1$
NLS.bind(
Messages.BPMN2ValidationConstraints_Duplicate_Data_Type,
new Object[] {
id.getItemKind(),
(id.isIsCollection() ? "[]" : ""), //$NON-NLS-1$ //$NON-NLS-2$
- ModelUtil.getDisplayName(id)
+ ExtendedPropertiesProvider.getTextValue(id)
}
)
);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java
index 47be0bad..47be0bad 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/BPMN2ValidationStatusLoader.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/FormalExpressionConstraint.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/FormalExpressionConstraint.java
index c07db5d0..c07db5d0 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/FormalExpressionConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/FormalExpressionConstraint.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/LiveValidationListener.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/LiveValidationListener.java
index 276933fe..276933fe 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/LiveValidationListener.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/LiveValidationListener.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/Messages.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/Messages.java
index 48fdba6c..1872c9dc 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.core.validation;
import org.eclipse.osgi.util.NLS;
@@ -10,6 +20,15 @@ public class Messages extends NLS {
public static String BPMN2ProjectValidator_Title;
public static String BPMN2ValidationConstraints_0;
public static String BPMN2ValidationConstraints_2;
+
+ public static String BPMN2ValidationConstraints_10;
+ public static String BPMN2ValidationConstraints_11;
+ public static String BPMN2ValidationConstraints_12;
+ public static String BPMN2ValidationConstraints_13;
+ public static String BPMN2ValidationConstraints_14;
+ public static String BPMN2ValidationConstraints_15;
+ public static String BPMN2ValidationConstraints_16;
+
public static String BPMN2ValidationConstraints_29;
public static String BPMN2ValidationConstraints_Missing_Connection;
public static String BPMN2ValidationConstraints_30;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ResourcePropertyTester.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ResourcePropertyTester.java
index fa4f94e6..84e0e79a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ResourcePropertyTester.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ResourcePropertyTester.java
@@ -39,8 +39,8 @@ public class ResourcePropertyTester extends PropertyTester {
if (rt != null) {
ToolPaletteDescriptor tpd = rt.getToolPalette(object);
if (tpd != null) {
- for (String profile : tpd.getProfiles()) {
- if (profile.equals(expectedValue))
+ for (String profileId : tpd.getProfileIds()) {
+ if (profileId.equals(expectedValue))
return true;
}
if (expectedValue instanceof String)
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java
index d30e7293..00829ee0 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java
@@ -74,7 +74,7 @@ public class SyntaxCheckerUtils {
public static final String toXMLString(String string) {
if (string==null || string.isEmpty())
- return "";
+ return ""; //$NON-NLS-1$
StringBuffer xmlString = new StringBuffer();
int stringLength = string.length();
@@ -82,15 +82,15 @@ public class SyntaxCheckerUtils {
for (int i = 0; i < stringLength; i++) {
char c = string.charAt(i);
if (c == '"')
- xmlString.append("&quot;");
+ xmlString.append("&quot;"); //$NON-NLS-1$
else if (c == '&')
- xmlString.append("&amp;");
+ xmlString.append("&amp;"); //$NON-NLS-1$
else if (c == '\'')
- xmlString.append("&apos;");
+ xmlString.append("&apos;"); //$NON-NLS-1$
else if (c == '<')
- xmlString.append("&lt;");
+ xmlString.append("&lt;"); //$NON-NLS-1$
else if (c == '>')
- xmlString.append("&gt;");
+ xmlString.append("&gt;"); //$NON-NLS-1$
else
xmlString.append(c);
}
@@ -99,7 +99,7 @@ public class SyntaxCheckerUtils {
public static final String fromXMLString(String xmlString) {
if (xmlString==null || xmlString.isEmpty())
- return "";
+ return ""; //$NON-NLS-1$
StringBuffer string = new StringBuffer();
int stringLength = xmlString.length();
@@ -110,15 +110,15 @@ public class SyntaxCheckerUtils {
int si = xmlString.indexOf(';', i);
if (si>0) {
String ss = xmlString.substring(i, si);
- if ("&quot".equals(ss))
+ if ("&quot".equals(ss)) //$NON-NLS-1$
c = '"';
- else if ("&amp".equals(ss))
+ else if ("&amp".equals(ss)) //$NON-NLS-1$
c = '&';
- else if ("&apos".equals(ss))
+ else if ("&apos".equals(ss)) //$NON-NLS-1$
c = '\'';
- else if ("&lt".equals(ss))
+ else if ("&lt".equals(ss)) //$NON-NLS-1$
c = '<';
- else if ("&gt".equals(ss))
+ else if ("&gt".equals(ss)) //$NON-NLS-1$
c = '>';
else
si = -1;
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/TaskNameNotEmpty.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/TaskNameNotEmpty.java
index 7ffbcf6f..7ffbcf6f 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/TaskNameNotEmpty.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/TaskNameNotEmpty.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidIdConstraint.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidIdConstraint.java
index 20e23d42..20e23d42 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidIdConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidIdConstraint.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationDelegateClientSelector.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationDelegateClientSelector.java
index 126b8d35..126b8d35 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationDelegateClientSelector.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationDelegateClientSelector.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationErrorHandler.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationErrorHandler.java
index c80765c2..c80765c2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationErrorHandler.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationErrorHandler.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapter.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapter.java
index a8163ac9..a8163ac9 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapterFactory.java
index 0f538fbe..0f538fbe 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/ValidationStatusAdapterFactory.java
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/messages.properties b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/messages.properties
index cc71ae1a..d8198184 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
BPMN2ProjectValidator_No_Project_Nature=The project "{0}" has not been configured with the BPMN2 Project Nature.\n\nAdding the BPMN2 Project Nature will cause all BPMN2 files in this project to be validated automatically whenever the project is built.\n\nDo you want to add this Nature to the Project now?
BPMN2ProjectValidator_Dont_Ask_Again=Don't ask me again
BPMN2ProjectValidator_Invalid_File=Invalid bpmn2 file
@@ -9,11 +19,23 @@ BPMN2ValidationConstraints_Duplicate_Data_Type=The {0}{1} Data Type {2} is alrea
BPMN2ValidationConstraints_Duplicate_Input=Input Parameter "{0}" is already defined
BPMN2ValidationConstraints_Duplicate_Output=Output Parameter "{0}" is already defined
BPMN2ValidationConstraints_2=No targetNamespace defined
-BPMN2ValidationConstraints_29=Invalid Gateway direction for Exclusive Gateway. It should be "Converging" or "Diverging"
-BPMN2ValidationConstraints_30=Invalid Gateway direction for EventBased Gateway. It should be "Diverging"
-BPMN2ValidationConstraints_31=Invalid Gateway direction for Parallel Gateway. It should be "Converging" or "Diverging"
-BPMN2ValidationConstraints_32=Invalid Gateway direction for Inclusive Gateway. It should be "Converging" or "Diverging"
-BPMN2ValidationConstraints_33=Invalid Gateway direction for Complex Gateway. It should be "Converging" or "Diverging"
+
+BPMN2ValidationConstraints_10=Converging Gateway must have multiple incoming Sequence Flows
+BPMN2ValidationConstraints_11=Converging Gateway must have zero or one outgoing Sequence Flow
+
+BPMN2ValidationConstraints_12=Diverging Gateway must have zero or one incoming Sequence Flow
+BPMN2ValidationConstraints_13=Diverging Gateway must have multiple outgoing Sequence Flows
+
+BPMN2ValidationConstraints_14=Mixed Gateway must have multiple incoming Sequence Flows
+BPMN2ValidationConstraints_15=Mixed Gateway must have multiple outgoing Sequence Flows
+
+BPMN2ValidationConstraints_16=Unspecified Gateway must have either multiple incoming or outgoing Sequence Flows
+
+BPMN2ValidationConstraints_29=Exclusive Gateway should be either Converging or Diverging
+BPMN2ValidationConstraints_30=EventBased Gateway should be Diverging
+BPMN2ValidationConstraints_31=Parallel Gateway should be either Converging or Diverging
+BPMN2ValidationConstraints_32=Inclusive Gateway should be either Converging or Diverging
+BPMN2ValidationConstraints_33=Complex Gateway should be either Converging or Diverging
BPMN2ValidationConstraints_45=ChoreographyActivity must have at least two Participants
BPMN2ValidationConstraints_46=ChoreographyActivity has no initiating Participant
BPMN2ValidationConstraints_48=Message Flow source is not a Participant of the Choreography Task
diff --git a/org.eclipse.bpmn2.modeler.core/util/enablements2xml.awk b/plugins/org.eclipse.bpmn2.modeler.core/util/enablements2xml.awk
index b63ee750..b63ee750 100644
--- a/org.eclipse.bpmn2.modeler.core/util/enablements2xml.awk
+++ b/plugins/org.eclipse.bpmn2.modeler.core/util/enablements2xml.awk
diff --git a/org.eclipse.bpmn2.modeler.ui/.classpath b/plugins/org.eclipse.bpmn2.modeler.help/.classpath
index ad32c83a..ad32c83a 100644
--- a/org.eclipse.bpmn2.modeler.ui/.classpath
+++ b/plugins/org.eclipse.bpmn2.modeler.help/.classpath
diff --git a/org.eclipse.bpmn2.modeler.help/.project b/plugins/org.eclipse.bpmn2.modeler.help/.project
index 57b575f8..57b575f8 100644
--- a/org.eclipse.bpmn2.modeler.help/.project
+++ b/plugins/org.eclipse.bpmn2.modeler.help/.project
diff --git a/org.eclipse.bpmn2.modeler.help/BPMN2 Modeler User Guide.docx b/plugins/org.eclipse.bpmn2.modeler.help/BPMN2 Modeler User Guide.docx
index 77bef30a..77bef30a 100644
--- a/org.eclipse.bpmn2.modeler.help/BPMN2 Modeler User Guide.docx
+++ b/plugins/org.eclipse.bpmn2.modeler.help/BPMN2 Modeler User Guide.docx
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpmn2.modeler.help/META-INF/MANIFEST.MF
index 22e8c778..7c3c6d85 100644
--- a/org.eclipse.bpmn2.modeler.help/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpmn2.modeler.help/META-INF/MANIFEST.MF
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: BPMN2 Modeler Help
+Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpmn2.modeler.help;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.bpmn2.modeler.help.Activator
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.help
diff --git a/org.eclipse.bpmn2.modeler.wsil.feature/about.html b/plugins/org.eclipse.bpmn2.modeler.help/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.wsil.feature/about.html
+++ b/plugins/org.eclipse.bpmn2.modeler.help/about.html
diff --git a/org.eclipse.bpmn2.modeler.help/build.properties b/plugins/org.eclipse.bpmn2.modeler.help/build.properties
index fc53675d..c536a41b 100644
--- a/org.eclipse.bpmn2.modeler.help/build.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.help/build.properties
@@ -4,4 +4,5 @@ bin.includes = plugin.xml,\
META-INF/,\
.,\
html/,\
- *.xml
+ *.xml,\
+ about.html
diff --git a/org.eclipse.bpmn2.modeler.help/context.xml b/plugins/org.eclipse.bpmn2.modeler.help/context.xml
index 70e4162c..70e4162c 100644
--- a/org.eclipse.bpmn2.modeler.help/context.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.help/context.xml
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/epl-v10.html b/plugins/org.eclipse.bpmn2.modeler.help/epl-v10.html
index 91531ed4..91531ed4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/epl-v10.html
+++ b/plugins/org.eclipse.bpmn2.modeler.help/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER.htm
index 79555275..79555275 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image003.jpg
index 25479778..25479778 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image004.jpg
index 06140460..06140460 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image005.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image005.jpg
index 242c5025..242c5025 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image005.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image005.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image006.jpg
index a9ca800f..a9ca800f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image007.jpg
index 85b6c035..85b6c035 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image008.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image008.jpg
index 4948e481..4948e481 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image008.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image008.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image009.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image009.jpg
index 965406f2..965406f2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image009.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image009.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image010.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image010.jpg
index 7f44ac04..7f44ac04 100644
--- a/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image010.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/ANATOMY OF THE BPMN2 MODELER_files/image010.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE.htm
index 4b3e445d..4b3e445d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ChoreographyDiagramType.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ChoreographyDiagramType.png
index c0faccb2..c0faccb2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ChoreographyDiagramType.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ChoreographyDiagramType.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/CollaborationDiagramType.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/CollaborationDiagramType.png
index 2fe83c53..2fe83c53 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/CollaborationDiagramType.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/CollaborationDiagramType.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ConversationDiagramType.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ConversationDiagramType.png
index ff1708b6..ff1708b6 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ConversationDiagramType.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ConversationDiagramType.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ProcessDiagramWithLanes.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ProcessDiagramWithLanes.jpg
index 70338611..70338611 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ProcessDiagramWithLanes.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/ProcessDiagramWithLanes.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image003.jpg
index cc54d633..cc54d633 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image004.jpg
index 95697ac0..95697ac0 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image005.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image005.png
index 35378c92..35378c92 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image005.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image005.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image006.jpg
index ce553139..ce553139 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image007.jpg
index 13313b3e..13313b3e 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image008.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image008.png
index d422bd82..d422bd82 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image008.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image008.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image009.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image009.png
index 6849e2cd..6849e2cd 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image009.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image009.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image010.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image010.png
index a92a5194..a92a5194 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image010.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image010.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image011.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image011.png
index 0f72e008..0f72e008 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image011.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image011.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image012.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image012.png
index 8b282cda..8b282cda 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image012.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image012.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image013.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image013.jpg
index bb113334..bb113334 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image013.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image013.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image014.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image014.png
index e2dba2be..e2dba2be 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image014.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image014.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image015.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image015.png
index 4c9e8d69..4c9e8d69 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image015.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image015.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image016.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image016.png
index bcde710d..bcde710d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image016.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image016.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image017.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image017.png
index 066aceb8..066aceb8 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image017.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image017.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image018.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image018.png
index 25a47f0f..25a47f0f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image018.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image018.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image019.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image019.jpg
index 11e22371..11e22371 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image019.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image019.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image020.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image020.png
index c5ba3ac2..c5ba3ac2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image020.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image020.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image021.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image021.png
index 830c8ad6..830c8ad6 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image021.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image021.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image022.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image022.png
index 54afd6e5..54afd6e5 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image022.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image022.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image023.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image023.png
index 8976f889..8976f889 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image023.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image023.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image024.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image024.png
index 9bf38744..9bf38744 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image024.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image024.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image025.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image025.png
index 82ce2729..82ce2729 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image025.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image025.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image026.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image026.png
index 9c230dfa..9c230dfa 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image026.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image026.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image027.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image027.png
index dfb310d0..dfb310d0 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image027.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image027.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image028.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image028.png
index 7f39685d..7f39685d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image028.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image028.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image029.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image029.png
index 87ab6775..87ab6775 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image029.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image029.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image030.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image030.png
index 72a5867f..72a5867f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image030.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image030.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image031.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image031.png
index d8767a88..d8767a88 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image031.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image031.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image032.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image032.png
index d25293c9..d25293c9 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image032.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image032.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image033.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image033.png
index 9b6b84dd..9b6b84dd 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image033.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image033.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image034.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image034.png
index 161a41d8..161a41d8 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image034.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image034.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image035.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image035.png
index 7f851c33..7f851c33 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image035.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image035.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image036.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image036.png
index 8a592f6b..8a592f6b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image036.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image036.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image037.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image037.png
index 746c38ed..746c38ed 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image037.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image037.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image038.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image038.png
index fcd2c18c..fcd2c18c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image038.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image038.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image039.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image039.png
index 00ed9e2c..00ed9e2c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image039.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image039.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image040.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image040.png
index 9f64d6a2..9f64d6a2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image040.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image040.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image041.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image041.png
index 801245ef..801245ef 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image041.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image041.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image042.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image042.png
index 86c55da6..86c55da6 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image042.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image042.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image043.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image043.png
index 2a127e23..2a127e23 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image043.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image043.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image044.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image044.jpg
index d3835486..d3835486 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image044.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image044.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image045.png b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image045.png
index 3c3e3aa2..3c3e3aa2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image045.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image045.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image046.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image046.jpg
index 319e28be..319e28be 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image046.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image046.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image047.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image047.jpg
index 6ca6fe99..6ca6fe99 100644
--- a/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image047.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/APPENDIX_ BPMN 2.0 REFERENCE_files/image047.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS.htm
index 20b0f006..20b0f006 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image003.jpg
index d074aa0e..d074aa0e 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image004.jpg
index e936a100..e936a100 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image005.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image005.jpg
index 5a0cdf16..5a0cdf16 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image005.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image005.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image006.jpg
index f05f7177..f05f7177 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image007.jpg
index d9a8e4e1..d9a8e4e1 100644
--- a/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/BPMN2 NEW FILE WIZARDS_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES.htm
index 96a0b4e0..96a0b4e0 100644
--- a/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/FIGURES AND TABLES_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING.htm
index 36ba5425..36ba5425 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image003.jpg
index 4bbc1883..4bbc1883 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image004.jpg
index ea045de6..ea045de6 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image005.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image005.jpg
index e3d950a2..e3d950a2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image005.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image005.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image006.jpg
index 59e91532..59e91532 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image007.jpg
index c4ae831c..c4ae831c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image008.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image008.png
index f926b1a3..f926b1a3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image008.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image008.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image009.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image009.png
index 20cb9f63..20cb9f63 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image009.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image009.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image010.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image010.png
index a10b0913..a10b0913 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image010.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image010.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image011.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image011.png
index 8160a973..8160a973 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image011.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image011.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image012.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image012.png
index 7bb2f240..7bb2f240 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image012.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image012.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image013.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image013.png
index 7c557f52..7c557f52 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image013.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image013.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image014.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image014.png
index e7c73795..e7c73795 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image014.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image014.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image015.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image015.png
index 710a8720..710a8720 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image015.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image015.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image016.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image016.png
index e85ad838..e85ad838 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image016.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image016.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image017.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image017.png
index 147f3000..147f3000 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image017.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image017.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image018.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image018.png
index 74907ec2..74907ec2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image018.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image018.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image019.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image019.png
index 34c5bfe3..34c5bfe3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image019.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image019.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image020.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image020.png
index 743dee91..743dee91 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image020.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image020.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image021.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image021.png
index da26a8eb..da26a8eb 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image021.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image021.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image022.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image022.png
index cf392651..cf392651 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image022.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image022.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image023.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image023.png
index 78074395..78074395 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image023.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image023.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image024.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image024.png
index 057f7480..057f7480 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image024.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image024.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image025.png b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image025.png
index 62823df6..62823df6 100644
--- a/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image025.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/GRAPHICAL EDITING_files/image025.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES.htm
index 7471290a..7471290a 100644
--- a/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/IMPORTING BPMN2 FILES_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION.htm
index 96b225f2..96b225f2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image003.png b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image003.png
index f926b1a3..f926b1a3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image003.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image003.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image004.jpg
index 539786da..539786da 100644
--- a/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/INTRODUCTION_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/MsoStyles-modified.css b/plugins/org.eclipse.bpmn2.modeler.help/html/MsoStyles-modified.css
index 0f4794ee..0f4794ee 100644
--- a/org.eclipse.bpmn2.modeler.help/html/MsoStyles-modified.css
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/MsoStyles-modified.css
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW.htm
index 759a2a24..759a2a24 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image003.jpg
index 3d67fe79..3d67fe79 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image004.png b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image004.png
index 34a28636..34a28636 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image004.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image004.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image005.png b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image005.png
index 1b64874c..1b64874c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image005.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image005.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image006.png b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image006.png
index 174cf778..174cf778 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image006.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image006.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image007.jpg
index 1d2b4944..1d2b4944 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image008.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image008.jpg
index 86ee1b20..86ee1b20 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image008.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image008.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image009.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image009.jpg
index 6071facb..6071facb 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image009.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image009.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image010.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image010.jpg
index 6ddd11c7..6ddd11c7 100644
--- a/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image010.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/OUTLINE VIEW_files/image010.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS.htm
index b9914a4e..b9914a4e 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image003.jpg
index 9396f9e0..9396f9e0 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image004.jpg
index 51810129..51810129 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image005.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image005.jpg
index 2c7acbde..2c7acbde 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image005.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image005.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image006.jpg
index c119c7d3..c119c7d3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image007.jpg
index dbf0d61d..dbf0d61d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image008.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image008.jpg
index d65a6b6c..d65a6b6c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image008.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image008.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image009.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image009.jpg
index 6e0743d3..6e0743d3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image009.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image009.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image010.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image010.jpg
index 172a593a..172a593a 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image010.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image010.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image011.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image011.jpg
index 7b658147..7b658147 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image011.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image011.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image012.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image012.jpg
index 1c7b14c9..1c7b14c9 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image012.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image012.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image013.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image013.jpg
index 86eb57a9..86eb57a9 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image013.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image013.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image014.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image014.jpg
index ee3889db..ee3889db 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image014.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image014.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image015.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image015.jpg
index acef1c5d..acef1c5d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image015.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image015.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image016.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image016.jpg
index 13b4f441..13b4f441 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image016.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image016.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image017.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image017.jpg
index 1a94c57f..1a94c57f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image017.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image017.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image018.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image018.jpg
index 6e5bfe40..6e5bfe40 100644
--- a/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image018.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/POPUP DIALOGS_files/image018.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW.htm
index 75688bf5..75688bf5 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image003.jpg
index 43e82843..43e82843 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image004.jpg
index b4b9ce43..b4b9ce43 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image005.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image005.jpg
index 3817dbce..3817dbce 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image005.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image005.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image006.jpg
index 8da37058..8da37058 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image007.jpg
index 70cfb71d..70cfb71d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image008.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image008.jpg
index 71b4c609..71b4c609 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image008.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image008.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image009.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image009.jpg
index d1ceda69..d1ceda69 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image009.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image009.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image010.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image010.jpg
index 81d56a44..81d56a44 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image010.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image010.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image011.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image011.jpg
index 3822a72b..3822a72b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image011.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image011.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image012.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image012.jpg
index efb704f5..efb704f5 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image012.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image012.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image013.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image013.jpg
index 343aba79..343aba79 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image013.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image013.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image014.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image014.jpg
index ba2a788b..ba2a788b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image014.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image014.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image015.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image015.jpg
index 6f6608fd..6f6608fd 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image015.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image015.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image016.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image016.jpg
index 7a75a34a..7a75a34a 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image016.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image016.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image017.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image017.jpg
index e570291c..e570291c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image017.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image017.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image018.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image018.jpg
index fc8a49a3..fc8a49a3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image018.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image018.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image019.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image019.jpg
index 626a8f92..626a8f92 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image019.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image019.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image020.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image020.jpg
index d7f36ad3..d7f36ad3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image020.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image020.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image021.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image021.jpg
index 92b2b5bc..92b2b5bc 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image021.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image021.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image022.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image022.jpg
index be7fa5d4..be7fa5d4 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image022.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image022.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image023.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image023.jpg
index 742c0700..742c0700 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image023.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image023.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image024.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image024.jpg
index 7c9b014c..7c9b014c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image024.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image024.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image025.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image025.jpg
index 48f0e477..48f0e477 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image025.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image025.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image026.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image026.jpg
index 0e875d82..0e875d82 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image026.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image026.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image027.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image027.jpg
index ddbaacce..ddbaacce 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image027.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image027.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image028.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image028.jpg
index 51334422..51334422 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image028.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image028.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image029.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image029.jpg
index c093b7a6..c093b7a6 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image029.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image029.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image030.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image030.jpg
index f711c04f..f711c04f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image030.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image030.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image031.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image031.jpg
index 243f1ad7..243f1ad7 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image031.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image031.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image032.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image032.jpg
index 6e40d466..6e40d466 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image032.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image032.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image033.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image033.jpg
index 1f0f7f1e..1f0f7f1e 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image033.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image033.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image034.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image034.jpg
index cbe6996e..cbe6996e 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image034.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image034.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image035.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image035.jpg
index d26abc28..d26abc28 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image035.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image035.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image036.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image036.jpg
index 764271a5..764271a5 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image036.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image036.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image037.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image037.jpg
index 6206c58f..6206c58f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image037.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image037.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image038.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image038.png
index 23fcaca3..23fcaca3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image038.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image038.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image039.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image039.jpg
index ff55a4e8..ff55a4e8 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image039.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image039.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image040.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image040.png
index 8270e499..8270e499 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image040.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image040.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image041.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image041.jpg
index 7c6668e5..7c6668e5 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image041.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image041.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image042.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image042.jpg
index efa56adc..efa56adc 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image042.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image042.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image043.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image043.png
index 8fbb870e..8fbb870e 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image043.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image043.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image044.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image044.png
index 0c833dfd..0c833dfd 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image044.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image044.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image045.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image045.png
index 975cc5f5..975cc5f5 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image045.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image045.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image046.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image046.png
index 1782487b..1782487b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image046.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image046.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image047.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image047.png
index 997b2b9b..997b2b9b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image047.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image047.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image048.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image048.png
index 19ad8a86..19ad8a86 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image048.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image048.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image049.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image049.png
index 35d9056d..35d9056d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image049.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image049.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image050.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image050.png
index d27a0cf3..d27a0cf3 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image050.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image050.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image051.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image051.png
index 8df40bcc..8df40bcc 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image051.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image051.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image052.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image052.png
index 9cedf553..9cedf553 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image052.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image052.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image053.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image053.png
index d634723c..d634723c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image053.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image053.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image054.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image054.png
index c3742f5b..c3742f5b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image054.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image054.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image055.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image055.png
index 63d26e85..63d26e85 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image055.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image055.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image056.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image056.png
index 2005001a..2005001a 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image056.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image056.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image057.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image057.png
index 11ddb72c..11ddb72c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image057.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image057.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image058.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image058.jpg
index 7e29bd4d..7e29bd4d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image058.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image058.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image059.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image059.jpg
index 86eb57a9..86eb57a9 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image059.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image059.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image060.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image060.jpg
index 23ecec73..23ecec73 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image060.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image060.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image061.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image061.jpg
index 4f522fb1..4f522fb1 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image061.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image061.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image062.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image062.jpg
index bf50dc60..bf50dc60 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image062.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image062.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image063.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image063.png
index b1bf8ef5..b1bf8ef5 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image063.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image063.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image064.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image064.jpg
index 49847f1b..49847f1b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image064.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image064.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image065.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image065.png
index e4c030e9..e4c030e9 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image065.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image065.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image066.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image066.png
index 004cfc8b..004cfc8b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image066.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image066.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image067.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image067.png
index 050ea8dc..050ea8dc 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image067.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image067.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image068.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image068.png
index 4a49e102..4a49e102 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image068.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image068.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image069.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image069.png
index b936c887..b936c887 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image069.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image069.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image070.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image070.png
index 3a439c20..3a439c20 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image070.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image070.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image071.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image071.png
index 59fc4f73..59fc4f73 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image071.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image071.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image072.png b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image072.png
index 3e117940..3e117940 100644
--- a/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image072.png
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/PROPERTY VIEW_files/image072.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS.htm
index 58ada5c0..58ada5c0 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image003.jpg
index c628aaae..c628aaae 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image004.jpg
index ab45020d..ab45020d 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image005.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image005.jpg
index b2ccd66c..b2ccd66c 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image005.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image005.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image006.jpg
index bab2a09a..bab2a09a 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image007.jpg
index 3f81f440..3f81f440 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image008.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image008.jpg
index 5330a86f..5330a86f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image008.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image008.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image009.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image009.jpg
index 8080e6cb..8080e6cb 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image009.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image009.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image010.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image010.jpg
index 709b4da8..709b4da8 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image010.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image010.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image011.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image011.jpg
index 9997b32a..9997b32a 100644
--- a/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image011.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/TARGET RUNTIME EXTENSIONS_files/image011.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES.htm b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES.htm
index beaf5bb0..beaf5bb0 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES.htm
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES.htm
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image001.gif b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image001.gif
index 4b235594..4b235594 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image001.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image001.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image002.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image002.jpg
index 8941b78b..8941b78b 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image002.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image002.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image003.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image003.jpg
index ffac7fab..ffac7fab 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image003.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image003.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image004.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image004.jpg
index 0b7e16c2..0b7e16c2 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image004.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image004.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image005.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image005.jpg
index 1c3a1752..1c3a1752 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image005.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image005.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image006.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image006.jpg
index fdf72b19..fdf72b19 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image006.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image006.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image007.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image007.jpg
index 4aeaa929..4aeaa929 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image007.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image007.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image008.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image008.jpg
index 7f67b32f..7f67b32f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image008.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image008.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image009.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image009.jpg
index f08db9a1..f08db9a1 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image009.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image009.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image010.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image010.jpg
index 2e992225..2e992225 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image010.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image010.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image011.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image011.jpg
index 5f2f737f..5f2f737f 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image011.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image011.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image012.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image012.jpg
index b614b255..b614b255 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image012.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image012.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image013.jpg b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image013.jpg
index 0515dd16..0515dd16 100644
--- a/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image013.jpg
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/USER PREFERENCES_files/image013.jpg
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.help/html/toc.html b/plugins/org.eclipse.bpmn2.modeler.help/html/toc.html
index 499a4948..499a4948 100644
--- a/org.eclipse.bpmn2.modeler.help/html/toc.html
+++ b/plugins/org.eclipse.bpmn2.modeler.help/html/toc.html
diff --git a/plugins/org.eclipse.bpmn2.modeler.help/license.html b/plugins/org.eclipse.bpmn2.modeler.help/license.html
new file mode 100644
index 00000000..6e579a58
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.help/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ 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, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.help/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.help/plugin.properties
new file mode 100644
index 00000000..dbf56e73
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.help/plugin.properties
@@ -0,0 +1,2 @@
+pluginName = BPMN2 Modeler Online Help
+providerName = Eclipse SOA
diff --git a/org.eclipse.bpmn2.modeler.help/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.help/plugin.xml
index a572289f..a572289f 100644
--- a/org.eclipse.bpmn2.modeler.help/plugin.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.help/plugin.xml
diff --git a/org.eclipse.bpmn2.modeler.help/pom.xml b/plugins/org.eclipse.bpmn2.modeler.help/pom.xml
index d93fe06b..571b08c2 100644
--- a/org.eclipse.bpmn2.modeler.help/pom.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.help/pom.xml
@@ -12,15 +12,16 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
<artifactId>org.eclipse.bpmn2.modeler.help</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
- <name>BPMN2 Modeler Help</name>
+ <name>BPMN2 Modeler Plugins: Help</name>
<description>Context Help for BPMN2 Modeler</description>
</project>
diff --git a/org.eclipse.bpmn2.modeler.help/scripts/buildlinks.sh b/plugins/org.eclipse.bpmn2.modeler.help/scripts/buildlinks.sh
index e81fa643..e81fa643 100644
--- a/org.eclipse.bpmn2.modeler.help/scripts/buildlinks.sh
+++ b/plugins/org.eclipse.bpmn2.modeler.help/scripts/buildlinks.sh
diff --git a/org.eclipse.bpmn2.modeler.help/scripts/fixlinks.sh b/plugins/org.eclipse.bpmn2.modeler.help/scripts/fixlinks.sh
index 4dc979c7..4dc979c7 100644
--- a/org.eclipse.bpmn2.modeler.help/scripts/fixlinks.sh
+++ b/plugins/org.eclipse.bpmn2.modeler.help/scripts/fixlinks.sh
diff --git a/org.eclipse.bpmn2.modeler.help/scripts/links.txt b/plugins/org.eclipse.bpmn2.modeler.help/scripts/links.txt
index 27b3340d..27b3340d 100644
--- a/org.eclipse.bpmn2.modeler.help/scripts/links.txt
+++ b/plugins/org.eclipse.bpmn2.modeler.help/scripts/links.txt
diff --git a/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/Activator.java b/plugins/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/Activator.java
index 19a9ff21..feeca126 100644
--- a/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/Activator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/Activator.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.help;
import org.eclipse.jface.resource.ImageDescriptor;
diff --git a/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/IHelpContexts.java b/plugins/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/IHelpContexts.java
index a5db381c..74ebf27c 100644
--- a/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/IHelpContexts.java
+++ b/plugins/org.eclipse.bpmn2.modeler.help/src/org/eclipse/bpmn2/modeler/help/IHelpContexts.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.help;
public interface IHelpContexts {
diff --git a/org.eclipse.bpmn2.modeler.help/toc.xml b/plugins/org.eclipse.bpmn2.modeler.help/toc.xml
index f9e448af..f9e448af 100644
--- a/org.eclipse.bpmn2.modeler.help/toc.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.help/toc.xml
diff --git a/org.eclipse.bpmn2.modeler.runtime.example/.classpath b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.classpath
index 121e527a..121e527a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/.classpath
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.classpath
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.project b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.project
index c8937e44..c8937e44 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.project
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.project
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF
index fc4d1b4f..0dc0ced0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.bpmn2.modeler.wsil/about.html b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/about.html
index 3408ea2e..3408ea2e 100644
--- a/org.eclipse.bpmn2.modeler.wsil/about.html
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/about.html
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/build.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/build.properties
index db3357a3..db3357a3 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/build.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/build.properties
diff --git a/org.eclipse.bpmn2.modeler.ui/epl-v10.html b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/epl-v10.html
index 91531ed4..91531ed4 100644
--- a/org.eclipse.bpmn2.modeler.ui/epl-v10.html
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CancelEndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CancelEndEvent.png
index b9b5d940..b9b5d940 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CancelEndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CancelEndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationEndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationEndEvent.png
index 66e8c084..66e8c084 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationEndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationEndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationStartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationStartEvent.png
index c7ec8a3f..c7ec8a3f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationStartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/CompensationStartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalCatchEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalCatchEvent.png
index bd206422..bd206422 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalCatchEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalCatchEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalStartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalStartEvent.png
index 24751a26..24751a26 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalStartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ConditionalStartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EndEvent.png
index 4e719a0a..4e719a0a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorCatchEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorCatchEvent.png
index 010072ca..010072ca 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorCatchEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorCatchEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorEndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorEndEvent.png
index 73cd55d5..73cd55d5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorEndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorEndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorStartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorStartEvent.png
index ce987d8f..ce987d8f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorStartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/ErrorStartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationCatchEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationCatchEvent.png
index 9437da95..9437da95 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationCatchEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationCatchEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationEndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationEndEvent.png
index f1eeb477..f1eeb477 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationEndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationEndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationStartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationStartEvent.png
index 2b32d4bc..2b32d4bc 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationStartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationStartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationThrowEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationThrowEvent.png
index bc04a6b8..bc04a6b8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationThrowEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/EscalationThrowEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/IntermediateEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/IntermediateEvent.png
index 19c4644f..19c4644f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/IntermediateEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/IntermediateEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageCatchEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageCatchEvent.png
index a818ba8f..a818ba8f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageCatchEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageCatchEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageEndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageEndEvent.png
index 6fcd217b..6fcd217b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageEndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageEndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageStartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageStartEvent.png
index 27d7a3c8..27d7a3c8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageStartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageStartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageThrowEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageThrowEvent.png
index 065884af..065884af 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageThrowEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/MessageThrowEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalCatchEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalCatchEvent.png
index 3c6eadb5..3c6eadb5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalCatchEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalCatchEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalEndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalEndEvent.png
index 12ee2cde..12ee2cde 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalEndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalEndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalStartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalStartEvent.png
index f06274d4..f06274d4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalStartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalStartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalThrowEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalThrowEvent.png
index 5d59464b..5d59464b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalThrowEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/SignalThrowEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/StartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/StartEvent.png
index 5f4f29bc..5f4f29bc 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/StartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/StartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TerminateEndEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TerminateEndEvent.png
index b6494611..b6494611 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TerminateEndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TerminateEndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerCatchEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerCatchEvent.png
index 39c38b93..39c38b93 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerCatchEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerCatchEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerStartEvent.png b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerStartEvent.png
index 1c022c50..1c022c50 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerStartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/small/TimerStartEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/wizard.gif b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/wizard.gif
index 4cbbe980..4cbbe980 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/wizard.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/icons/wizard.gif
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/license.html b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/license.html
new file mode 100644
index 00000000..6e579a58
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ 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, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/README.txt b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/README.txt
index 312b3ba8..312b3ba8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/README.txt
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/README.txt
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/bpsim.ecore b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/bpsim.ecore
index bdf73ea4..bdf73ea4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/bpsim.ecore
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/bpsim.ecore
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.ecore b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.ecore
index 62196974..62196974 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.ecore
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.ecore
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.genmodel b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.genmodel
index 8d72516e..8d72516e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.genmodel
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/drools.genmodel
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.genmodel b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.genmodel
index a22dd038..a22dd038 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.genmodel
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.genmodel
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.xsd b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.xsd
index 43683e00..43683e00 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.xsd
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpmn2emfextmodel.xsd
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.ecore b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.ecore
index bdf73ea4..bdf73ea4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.ecore
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.ecore
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.genmodel b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.genmodel
index 618b1e78..618b1e78 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.genmodel
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.genmodel
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.xsd b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.xsd
index a5011988..a5011988 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.xsd
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/bpsim.xsd
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/drools.ecore b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/drools.ecore
index 91128bc5..91128bc5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/drools.ecore
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/drools.ecore
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/oursimchanges.xml b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/oursimchanges.xml
index ab9bd5fa..ab9bd5fa 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/oursimchanges.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/model/latest/oursimchanges.xml
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties
index c3b0fd29..9b9ed308 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.properties
@@ -15,13 +15,13 @@
# $Id$
pluginName = BPMN2 Modeler Runtime extensions for JBoss jBPM
-providerName = Eclipse.org
+providerName = Eclipse SOA
PREFERENCE_PAGE_JBPM=jBPM Runtime
runtime.description = BPMN2 Modeler customizations for the JBoss jBPM engine
runtime.name = JBoss jBPM Business Process Engine
-propertyTab.label = Description
-propertyTab.label.0 = Process
+propertyTab.label.General = General
+propertyTab.label.Process = Process
propertyTab.label.1 = Interfaces
propertyTab.label.2 = Definitions
propertyTab.label.3 = Data Items
@@ -56,10 +56,11 @@ modelExtension.name.9 = BoundaryEvent Extensions
modelExtension.name.10 = IntermediateCatchEvent Extensions
modelExtension.name.11 = IntermediateThrowEvent Extensions
modelExtension.name.12 = UserTask Extensions
-category.name = Activities
-tool.name = AdHoc Subprocess
-tool.name.0 = Subprocess
-tool.name.1 = Reusable Subprocess
+category.name = Tasks
+category.name.0.1 = Sub Processes
+tool.name = AdHoc SubProcess
+tool.name.0 = SubProcess
+tool.name.1 = Reusable Process
tool.name.2 = Manual Task
tool.name.3 = User Task
tool.name.4 = Script Task
@@ -82,7 +83,7 @@ tool.name.16 = Parallel
category.name.4 = Intermediate Catch Events
tool.name.17 = Signal
tool.name.18 = Timer
-category.name.5 = Activities
+category.name.5 = Tasks
tool.name.19 = Business Rule Task
tool.name.20 = Call Activity
tool.name.21 = Script Task
@@ -95,10 +96,13 @@ tool.name.25 = Terminate
category.name.8 = Gateways
tool.name.26 = Data-based Exclusive (XOR)
tool.name.27 = Parallel
-category.name.9 = Activities
-tool.name.28 = AdHoc Subprocess
-tool.name.29 = Subprocess
-tool.name.30 = Reusable Subprocess
+category.name.9 = Tasks
+category.name.9.1 = Sub Processes
+tool.name.AdHoc.SubProcess = AdHoc Subprocess
+tool.name.Embedded.SubProcess = Embedded SubProcess
+tool.name.MultiInstance.SubProcess = Multiple Instances
+tool.name.Event.SubProcess = Event SubProcess
+tool.name.Reusable.Process = Reusable Process
tool.name.31 = Task
tool.name.32 = Manual Task
tool.name.33 = User Task
@@ -111,7 +115,8 @@ category.name.10 = Artifacts
tool.name.39 = Group
tool.name.40 = Text Annotation
category.name.11 = Boundary Events
-tool.name.41 = Boundary
+tool.name.41 = Cancel
+tool.name.41.1 = Compensation
tool.name.42 = Conditional
tool.name.43 = Error
tool.name.44 = Escalation
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
index 02b3d612..4bf4f98a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/plugin.xml
@@ -28,7 +28,7 @@
id="bpmn2.jbpm.description.tab"
replaceTab="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmDescriptionPropertySection"
- label="%propertyTab.label">
+ label="%propertyTab.label.General">
</propertyTab>
<propertyTab
@@ -37,7 +37,7 @@
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.JbpmProcessDiagramPropertySection"
type="org.eclipse.bpmn2.di.BPMNDiagram"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
- label="%propertyTab.label.0">
+ label="%propertyTab.label.Process">
</propertyTab>
<propertyTab
@@ -279,14 +279,13 @@
class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters.JbpmGlobalTypePropertiesAdapter">
</propertyExtension>
-<!-- This needs to go into the SwitchYard extension for the jBPM Target Runtime extension
<propertyExtension
- id="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.propertyExtension.serviceTask"
+ id="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.propertyExtension.MultiInstanceLoopCharacteristics"
runtimeId="org.jboss.runtime.jbpm5"
- type="org.eclipse.bpmn2.ServiceTask"
- class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters.JbpmServiceTaskPropertiesAdapter">
+ type="org.eclipse.bpmn2.MultiInstanceLoopCharacteristics"
+ class="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters.JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter">
</propertyExtension>
--->
+
<propertyExtension
id="org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.propertyExtension.exclusiveGateway"
runtimeId="org.jboss.runtime.jbpm5"
@@ -481,7 +480,7 @@
runtimeId="org.jboss.runtime.jbpm5"
name="%modelExtension.name.0"
type="SequenceFlow">
- <property name="priority" value="1" type="EInt"/>
+ <property name="priority" value="1"/>
<property name="name" value=""/>
</modelExtension>
@@ -685,7 +684,7 @@
<modelEnablement
runtimeId="org.jboss.runtime.jbpm5"
- type="Process"
+ id="profile.1"
profile="Full">
<enable object="AdHocSubProcess" feature="cancelRemainingInstances"/>
<enable object="AdHocSubProcess" feature="completionCondition"/>
@@ -693,29 +692,24 @@
<enable object="AdHocSubProcess" feature="isForCompensation"/>
<enable object="AdHocSubProcess" feature="name"/>
<enable object="AdHocSubProcess" feature="properties"/>
- <enable object="Assignment" feature="anyAttribute"/>
<enable object="Assignment" feature="extensionValues"/>
<enable object="Assignment" feature="from"/>
<enable object="Assignment" feature="to"/>
- <enable object="Association" feature="anyAttribute"/>
<enable object="Association" feature="associationDirection"/>
<enable object="Association" feature="documentation"/>
<enable object="Association" feature="extensionDefinitions"/>
<enable object="Association" feature="extensionValues"/>
<enable object="Association" feature="id"/>
- <enable object="BaseElement" feature="anyAttribute"/>
<enable object="BaseElement" feature="extensionValues"/>
<enable object="BPSimDataType"/>
<enable object="BoundaryEvent" feature="attachedToRef"/>
<enable object="BoundaryEvent" feature="cancelActivity"/>
<enable object="BoundaryEvent" feature="eventDefinitions"/>
<enable object="BoundaryEvent" feature="name"/>
- <enable object="BusinessRuleTask" feature="anyAttribute"/>
<enable object="BusinessRuleTask" feature="isForCompensation"/>
<enable object="BusinessRuleTask" feature="name"/>
<enable object="BusinessRuleTask" feature="ruleFlowGroup"/>
- <enable object="CancelEventDefinition"/>
- <enable object="CallActivity" feature="anyAttribute"/>
+<!-- <enable object="CancelEventDefinition"/> -->
<enable object="CallActivity" feature="calledElementRef"/>
<enable object="CallActivity" feature="dataInputAssociations"/>
<enable object="CallActivity" feature="dataOutputAssociations"/>
@@ -729,43 +723,36 @@
<enable object="CompensateEventDefinition" feature="activityRef"/>
<enable object="ConditionalEventDefinition" feature="condition"/>
<enable object="DataAssociation"/>
- <enable object="DataInput" feature="anyAttribute"/>
<enable object="DataInput" feature="documentation"/>
<enable object="DataInput" feature="extensionDefinitions"/>
<enable object="DataInput" feature="extensionValues"/>
<enable object="DataInput" feature="id"/>
<enable object="DataInput" feature="itemSubjectRef"/>
<enable object="DataInput" feature="name"/>
- <enable object="DataInputAssociation" feature="anyAttribute"/>
<enable object="DataInputAssociation" feature="assignment"/>
<enable object="DataInputAssociation" feature="extensionValues"/>
<enable object="DataInputAssociation" feature="sourceRef"/>
<enable object="DataInputAssociation" feature="targetRef"/>
<enable object="DataObject" feature="id"/>
<enable object="DataObject" feature="itemSubjectRef"/>
- <enable object="DataOutput" feature="anyAttribute"/>
<enable object="DataOutput" feature="documentation"/>
<enable object="DataOutput" feature="extensionDefinitions"/>
<enable object="DataOutput" feature="extensionValues"/>
<enable object="DataOutput" feature="id"/>
<enable object="DataOutput" feature="itemSubjectRef"/>
<enable object="DataOutput" feature="name"/>
- <enable object="DataOutputAssociation" feature="anyAttribute"/>
<enable object="DataOutputAssociation" feature="assignment"/>
<enable object="DataOutputAssociation" feature="extensionValues"/>
<enable object="DataOutputAssociation" feature="sourceRef"/>
<enable object="DataOutputAssociation" feature="targetRef"/>
- <enable object="DataState" feature="anyAttribute"/>
<enable object="DataState" feature="extensionValues"/>
<enable object="DataState" feature="name"/>
- <enable object="Definitions" feature="anyAttribute"/>
<enable object="Definitions" feature="diagrams"/>
<enable object="Definitions" feature="exporter"/>
<enable object="Definitions" feature="exporterVersion"/>
<enable object="Definitions" feature="extensionValues"/>
<enable object="Definitions" feature="extensions"/>
<enable object="Definitions" feature="rootElements"/>
- <enable object="Documentation" feature="anyAttribute"/>
<enable object="Documentation" feature="extensionValues"/>
<enable object="Documentation" feature="text"/>
<enable object="Documentation" feature="textFormat"/>
@@ -773,12 +760,10 @@
<enable object="EndEvent" feature="dataInputs"/>
<enable object="EndEvent" feature="eventDefinitions"/>
<enable object="EndEvent" feature="name"/>
- <enable object="Error" feature="anyAttribute"/>
<enable object="Error" feature="errorCode"/>
<enable object="Error" feature="extensionValues"/>
<enable object="Error" feature="name"/>
<enable object="Error" feature="structureRef"/>
- <enable object="ErrorEventDefinition" feature="anyAttribute"/>
<enable object="ErrorEventDefinition" feature="errorRef"/>
<enable object="ErrorEventDefinition" feature="extensionValues"/>
<enable object="Escalation" feature="escalationCode"/>
@@ -789,7 +774,6 @@
<enable object="EventBasedGateway" feature="gatewayDirection"/>
<enable object="EventBasedGateway" feature="instantiate"/>
<enable object="EventBasedGateway" feature="name"/>
- <enable object="EventDefinition" feature="anyAttribute"/>
<enable object="EventDefinition" feature="documentation"/>
<enable object="EventDefinition" feature="extensionDefinitions"/>
<enable object="EventDefinition" feature="extensionValues"/>
@@ -797,12 +781,10 @@
<enable object="ExclusiveGateway" feature="default"/>
<enable object="ExclusiveGateway" feature="gatewayDirection"/>
<enable object="ExclusiveGateway" feature="name"/>
- <enable object="Expression" feature="anyAttribute"/>
<enable object="Expression" feature="extensionValues"/>
<enable object="FormalExpression" feature="body"/>
<enable object="FormalExpression" feature="language"/>
<enable object="GlobalType"/>
- <enable object="Group" feature="anyAttribute"/>
<enable object="Group" feature="documentation"/>
<enable object="Group" feature="extensionDefinitions"/>
<enable object="Group" feature="extensionValues"/>
@@ -811,14 +793,12 @@
<enable object="InclusiveGateway" feature="default"/>
<enable object="InclusiveGateway" feature="gatewayDirection"/>
<enable object="InclusiveGateway" feature="name"/>
- <enable object="InputOutputSpecification" feature="anyAttribute"/>
<enable object="InputOutputSpecification" feature="dataInputs"/>
<enable object="InputOutputSpecification" feature="dataOutputs"/>
<enable object="InputOutputSpecification" feature="documentation"/>
<enable object="InputOutputSpecification" feature="extensionDefinitions"/>
<enable object="InputOutputSpecification" feature="extensionValues"/>
<enable object="InputOutputSpecification" feature="id"/>
- <enable object="Interface" feature="anyAttribute"/>
<enable object="Interface" feature="documentation"/>
<enable object="Interface" feature="extensionDefinitions"/>
<enable object="Interface" feature="extensionValues"/>
@@ -833,20 +813,17 @@
<enable object="IntermediateThrowEvent" feature="eventDefinitions"/>
<enable object="IntermediateThrowEvent" feature="inputSet"/>
<enable object="IntermediateThrowEvent" feature="name"/>
- <enable object="ItemAwareElement" feature="anyAttribute"/>
<enable object="ItemAwareElement" feature="documentation"/>
<enable object="ItemAwareElement" feature="extensionDefinitions"/>
<enable object="ItemAwareElement" feature="extensionValues"/>
<enable object="ItemAwareElement" feature="id"/>
<enable object="ItemAwareElement" feature="itemSubjectRef"/>
- <enable object="ItemDefinition" feature="anyAttribute"/>
<enable object="ItemDefinition" feature="id"/>
<enable object="ItemDefinition" feature="structureRef"/>
<enable object="Lane" feature="flowNodeRefs"/>
<enable object="Lane" feature="id"/>
<enable object="Lane" feature="name"/>
<enable object="LaneSet" feature="name"/>
- <enable object="ManualTask" feature="anyAttribute"/>
<enable object="ManualTask" feature="dataInputAssociations"/>
<enable object="ManualTask" feature="dataOutputAssociations"/>
<enable object="ManualTask" feature="extensionValues"/>
@@ -860,7 +837,6 @@
<enable object="MultiInstanceLoopCharacteristics" feature="loopDataInputRef"/>
<enable object="OnEntryScriptType"/>
<enable object="OnExitScriptType"/>
- <enable object="Operation" feature="anyAttribute"/>
<enable object="Operation" feature="documentation"/>
<enable object="Operation" feature="extensionDefinitions"/>
<enable object="Operation" feature="extensionValues"/>
@@ -872,7 +848,6 @@
<enable object="ParallelGateway" feature="gatewayDirection"/>
<enable object="ParallelGateway" feature="name"/>
<enable object="Process" feature="adHoc"/>
- <enable object="Process" feature="anyAttribute"/>
<enable object="Process" feature="flowElements"/>
<enable object="Process" feature="id"/>
<enable object="Process" feature="isExecutable"/>
@@ -891,7 +866,6 @@
<enable object="ReceiveTask" feature="messageRef"/>
<enable object="ReceiveTask" feature="name"/>
<enable object="ReceiveTask" feature="operationRef"/>
- <enable object="RootElement" feature="anyAttribute"/>
<enable object="RootElement" feature="extensionValues"/>
<enable object="ScriptTask" feature="isForCompensation"/>
<enable object="ScriptTask" feature="name"/>
@@ -909,7 +883,6 @@
<enable object="SequenceFlow" feature="priority"/>
<enable object="SequenceFlow" feature="sourceRef"/>
<enable object="SequenceFlow" feature="targetRef"/>
- <enable object="ServiceTask" feature="anyAttribute"/>
<enable object="ServiceTask" feature="dataInputAssociations"/>
<enable object="ServiceTask" feature="dataOutputAssociations"/>
<enable object="ServiceTask" feature="ioSpecification"/>
@@ -921,20 +894,20 @@
<enable object="Signal" feature="name"/>
<enable object="SignalEventDefinition" feature="signalRef"/>
<enable object="StartEvent" feature="name"/>
+ <enable object="StartEvent" feature="isInterrupting"/>
<enable object="StartEvent" feature="eventDefinitions"/>
<enable object="SubProcess" feature="flowElements"/>
<enable object="SubProcess" feature="isForCompensation"/>
+ <enable object="SubProcess" feature="triggeredByEvent"/>
<enable object="SubProcess" feature="loopCharacteristics"/>
<enable object="SubProcess" feature="name"/>
<enable object="SubProcess" feature="properties"/>
- <enable object="Task" feature="anyAttribute"/>
<enable object="Task" feature="dataInputAssociations"/>
<enable object="Task" feature="dataOutputAssociations"/>
<enable object="Task" feature="extensionValues"/>
<enable object="Task" feature="ioSpecification"/>
<enable object="Task" feature="isForCompensation"/>
<enable object="Task" feature="name"/>
- <enable object="TextAnnotation" feature="anyAttribute"/>
<enable object="TextAnnotation" feature="documentation"/>
<enable object="TextAnnotation" feature="extensionDefinitions"/>
<enable object="TextAnnotation" feature="extensionValues"/>
@@ -945,7 +918,6 @@
<enable object="ThrowEvent" feature="dataInputAssociation"/>
<enable object="TimerEventDefinition" feature="timeCycle"/>
<enable object="TimerEventDefinition" feature="timeDuration"/>
- <enable object="UserTask" feature="anyAttribute"/>
<enable object="UserTask" feature="dataInputAssociations"/>
<enable object="UserTask" feature="dataOutputAssociations"/>
<enable object="UserTask" feature="extensionValues"/>
@@ -957,10 +929,10 @@
<modelEnablement
runtimeId="org.jboss.runtime.jbpm5"
- type="Process"
+ id="profile.2"
profile="Simple"
- ref="org.jboss.runtime.jbpm5:Process:Full">
- <!-- copy the enablements from "Process" diagram type -->
+ ref="org.jboss.runtime.jbpm5:profile.1">
+ <!-- copy the enablements from "Full" profile -->
<!-- and then disable these objects and features -->
<disable object="AdHocSubProcess"/>
<disable object="Assignment"/>
@@ -992,6 +964,7 @@
<disable object="ScriptTask" feature="isForCompensation"/>
<disable object="SendTask"/>
<disable object="SubProcess" feature="isForCompensation"/>
+ <disable object="SubProcess" feature="triggeredByEvent"/>
<disable object="Task" feature="extensionValues"/>
<disable object="UserTask" feature="extensionValues"/>
<disable object="Process" feature="adHoc"/>
@@ -1009,12 +982,10 @@
<modelEnablement
runtimeId="org.jboss.runtime.jbpm5"
- type="Process"
+ id="profile.3"
profile="RuleFlow">
- <enable object="BusinessRuleTask" feature="anyAttribute"/>
<enable object="BusinessRuleTask" feature="name"/>
<enable object="BusinessRuleTask" feature="ruleFlowGroup"/>
- <enable object="CallActivity" feature="anyAttribute"/>
<enable object="CallActivity" feature="calledElementRef"/>
<enable object="CallActivity" feature="dataInputAssociations"/>
<enable object="CallActivity" feature="dataOutputAssociations"/>
@@ -1035,7 +1006,6 @@
<enable object="FormalExpression" feature="body"/>
<enable object="FormalExpression" feature="language"/>
<enable object="GlobalType"/>
- <enable object="InputOutputSpecification" feature="anyAttribute"/>
<enable object="InputOutputSpecification" feature="dataInputs"/>
<enable object="InputOutputSpecification" feature="dataOutputs"/>
<enable object="InputOutputSpecification" feature="documentation"/>
@@ -1052,14 +1022,12 @@
<enable object="ParallelGateway" feature="id"/>
<enable object="ParallelGateway" feature="name"/>
<enable object="ParallelGateway" feature="outgoing"/>
- <enable object="Process" feature="anyAttribute"/>
<enable object="Process" feature="flowElements"/>
<enable object="Process" feature="id"/>
<enable object="Process" feature="name"/>
<enable object="Process" feature="packageName"/>
<enable object="Process" feature="properties"/>
<enable object="Process" feature="version"/>
- <enable object="Property" feature="anyAttribute"/>
<enable object="Property" feature="documentation"/>
<enable object="Property" feature="extensionDefinitions"/>
<enable object="Property" feature="extensionValues"/>
@@ -1069,9 +1037,7 @@
<enable object="ScriptTask" feature="name"/>
<enable object="ScriptTask" feature="script"/>
<enable object="ScriptTask" feature="scriptFormat"/>
- <enable object="SequenceFlow" feature="anyAttribute"/>
<enable object="SequenceFlow" feature="auditing"/>
- <enable object="SequenceFlow" feature="categoryValueRef"/>
<enable object="SequenceFlow" feature="conditionExpression"/>
<enable object="SequenceFlow" feature="documentation"/>
<enable object="SequenceFlow" feature="extensionDefinitions"/>
@@ -1092,12 +1058,9 @@
<toolPalette
id="org.jboss.runtime.jbpm5.toolpalette.simple"
runtimeId="org.jboss.runtime.jbpm5"
- type="Process" profile="Simple">
+ profile="Simple">
- <category id="org.jboss.runtime.jbpm5.toolpalette.simple.Activities" name="%category.name">
- <tool name="%tool.name" object="AdHocSubProcess"/>
- <tool name="%tool.name.0" object="SubProcess"/>
- <tool name="%tool.name.1" object="CallActivity"/>
+ <category id="org.jboss.runtime.jbpm5.toolpalette.simple.Tasks" name="%category.name">
<tool name="%tool.name.2" object="ManualTask"/>
<tool name="%tool.name.3" object="UserTask"/>
<tool name="%tool.name.4" object="ScriptTask"/>
@@ -1105,6 +1068,11 @@
<tool name="%tool.name.6" object="SendTask"/>
<tool name="%tool.name.7" object="ReceiveTask"/>
</category>
+ <category id="org.jboss.runtime.jbpm5.toolpalette.simple.SubProcesses" name="%category.name.0.1">
+ <tool name="%tool.name" object="AdHocSubProcess"/>
+ <tool name="%tool.name.0" object="SubProcess"/>
+ <tool name="%tool.name.1" object="CallActivity"/>
+ </category>
<category id="org.jboss.runtime.jbpm5.toolpalette.simple.BoundaryEvents" name="%category.name.0">
<tool name="%tool.name.8" object="BoundaryEvent+ErrorEventDefinition" icon="ErrorCatchEvent.png"/>
<tool name="%tool.name.9" object="BoundaryEvent+TimerEventDefinition" icon="TimerCatchEvent.png"/>
@@ -1131,9 +1099,9 @@
<toolPalette
id="org.jboss.runtime.jbpm5.toolpalette.ruleFlow"
runtimeId="org.jboss.runtime.jbpm5"
- type="Process" profile="RuleFlow">
+ profile="RuleFlow">
- <category id="org.jboss.runtime.jbpm5.toolpalette.ruleFlow.Activities" name="%category.name.5">
+ <category id="org.jboss.runtime.jbpm5.toolpalette.ruleFlow.Tasks" name="%category.name.5">
<tool name="%tool.name.19" object="BusinessRuleTask"/>
<tool name="%tool.name.20" object="CallActivity"/>
<tool name="%tool.name.21" object="ScriptTask"/>
@@ -1155,12 +1123,9 @@
<toolPalette
id="org.jboss.runtime.jbpm5.toolpalette.full"
runtimeId="org.jboss.runtime.jbpm5"
- type="Process" profile="Full">
+ profile="Full">
- <category id="org.jboss.runtime.jbpm5.toolpalette.full.Activities" name="%category.name.9">
- <tool name="%tool.name.28" object="AdHocSubProcess"/>
- <tool name="%tool.name.29" object="SubProcess"/>
- <tool name="%tool.name.30" object="CallActivity"/>
+ <category id="org.jboss.runtime.jbpm5.toolpalette.full.Tasks" name="%category.name.9">
<tool name="%tool.name.31" object="Task"/>
<tool name="%tool.name.32" object="ManualTask"/>
<tool name="%tool.name.33" object="UserTask"/>
@@ -1170,12 +1135,20 @@
<tool name="%tool.name.37" object="SendTask"/>
<tool name="%tool.name.38" object="ReceiveTask"/>
</category>
+ <category id="org.jboss.runtime.jbpm5.toolpalette.full.SubProcesses" name="%category.name.9.1">
+ <tool name="%tool.name.AdHoc.SubProcess" object="AdHocSubProcess"/>
+ <tool name="%tool.name.Embedded.SubProcess" object="SubProcess"/>
+ <tool name="%tool.name.MultiInstance.SubProcess" object="SubProcess[$loopCharacteristics=MultiInstanceLoopCharacteristics]"/>
+ <tool name="%tool.name.Event.SubProcess" object="SubProcess[$triggeredByEvent=true,$name='Event Handler']"/>
+ <tool name="%tool.name.Reusable.Process" object="CallActivity"/>
+ </category>
<category id="org.jboss.runtime.jbpm5.toolpalette.full.Artifacts" name="%category.name.10">
<tool name="%tool.name.39" object="Group"/>
<tool name="%tool.name.40" object="TextAnnotation"/>
</category>
- <category id="org.jboss.runtime.jbpm5.toolpalette.simple.BoundaryEvents" name="%category.name.11">
- <tool name="%tool.name.41" object="BoundaryEvent" icon="IntermediateEvent.png"/>
+ <category id="org.jboss.runtime.jbpm5.toolpalette.full.BoundaryEvents" name="%category.name.11">
+<!-- <tool name="%tool.name.41" object="BoundaryEvent+CancelEventDefinition" icon="CancelEndEvent.png"/> -->
+ <tool name="%tool.name.41.1" object="BoundaryEvent+CompensateEventDefinition" icon="CompensationStartEvent.png"/>
<tool name="%tool.name.42" object="BoundaryEvent+ConditionalEventDefinition" icon="ConditionalCatchEvent.png"/>
<tool name="%tool.name.43" object="BoundaryEvent+ErrorEventDefinition" icon="ErrorCatchEvent.png"/>
<tool name="%tool.name.44" object="BoundaryEvent+EscalationEventDefinition" icon="EscalationCatchEvent.png"/>
@@ -1193,7 +1166,7 @@
<tool name="%tool.name.52" object="DataObject"/>
</category>
<category id="org.jboss.runtime.jbpm5.toolpalette.full.EndEvents" name="%category.name.14">
- <tool name="%tool.name.53" object="EndEvent+CancelEventDefinition" icon="CancelEndEvent.png"/>
+<!-- <tool name="%tool.name.53" object="EndEvent+CancelEventDefinition" icon="CancelEndEvent.png"/> -->
<tool name="%tool.name.54" object="EndEvent+CompensateEventDefinition" icon="CompensationEndEvent.png"/>
<tool name="%tool.name.55" object="EndEvent" icon="EndEvent.png"/>
<tool name="%tool.name.56" object="EndEvent+ErrorEventDefinition" icon="ErrorEndEvent.png"/>
@@ -1235,10 +1208,25 @@
<tool name="%tool.name.82" object="Lane"/>
</category>
- <category id="org.bpmn2.modeler.toolpalette.process.patterns" fromPalette="org.bpmn2.modeler.toolpalette.process.default"/>
+ <category id="org.bpmn2.modeler.toolpalette.process.patterns" fromPalette="org.bpmn2.modeler.toolpalette.full"/>
</toolPalette>
+ <typeLanguage name="Java Types" uri="http://www.java.com/javaTypes" prefix="java">
+ <type name="Boolean" qname="Boolean"/>
+ <type name="Float" qname="Float"/>
+ <type name="Integer" qname="Integer"/>
+ <type name="String" qname="String"/>
+ <type name="Object" qname="Object"/>
+ </typeLanguage>
+ <expressionLanguage name="mvel" uri="http://www.mvel.org/2.0"/>
+ <expressionLanguage name="Java" uri="http://www.java.com/java"/>
+ <expressionLanguage name="Rule" uri="http://www.jboss.org/drools/rule"/>
+
+ <serviceImplementation name="Java" uri="Java"/>
+ <serviceImplementation name="SwitchYard Service" uri="##SwitchYard"/>
+ <serviceImplementation name="Web Service" uri="##WebService"/>
+ <serviceImplementation name="Unspecified" uri="##unspecified"/>
</extension>
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/pom.xml b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/pom.xml
index 4a333842..62e264ef 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/pom.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/pom.xml
@@ -12,15 +12,16 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
<artifactId>org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
- <name>BPMN2 Modeler jBPM Runtime</name>
+ <name>BPMN2 Modeler Plugins: jBPM Runtime</name>
<description>BPMN2 Modeler Runtime Specialization for JBoss jBPM</description>
</project>
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Activator.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Activator.java
index 196ba878..196ba878 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Activator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Activator.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5ImageProvider.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5ImageProvider.java
index 797f3478..797f3478 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5ImageProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5ImageProvider.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5RuntimeExtension.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5RuntimeExtension.java
index 73219674..d71e153a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5RuntimeExtension.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/JBPM5RuntimeExtension.java
@@ -39,7 +39,9 @@ import org.eclipse.bpmn2.SendTask;
import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.PropertiesCompositeFactory;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
@@ -110,14 +112,6 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
public final static String JBPM5_RUNTIME_ID = "org.jboss.runtime.jbpm5"; //$NON-NLS-1$
private static final String DROOLS_NAMESPACE = "http://www.jboss.org/drools"; //$NON-NLS-1$
- private static final String[] typeLanguages = new String[] {
- "http://www.java.com/javaTypes", "Java", //$NON-NLS-1$ //$NON-NLS-2$
- };
- private static final String [] expressionLanguages = new String[] {
- "http://www.mvel.org/2.0", "mvel", //$NON-NLS-1$ //$NON-NLS-2$
- "http://www.java.com/java", "java", //$NON-NLS-1$ //$NON-NLS-2$
- "http://www.jboss.org/drools/rule", "Rule", //$NON-NLS-1$ //$NON-NLS-2$
- };
private List<WorkItemDefinition> workItemDefinitions;
private static boolean initialized = false;
@@ -138,16 +132,6 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
return DROOLS_NAMESPACE;
}
- @Override
- public String[] getTypeLanguages() {
- return typeLanguages;
- }
-
- @Override
- public String[] getExpressionLanguages() {
- return expressionLanguages;
- }
-
public List<WorkItemDefinition> getWorkItemDefinitions() {
if (workItemDefinitions==null)
workItemDefinitions = new ArrayList<WorkItemDefinition>();
@@ -164,102 +148,101 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
return null;
}
- /**
- * Initialize in this case finds all the *.wid/*.conf files in the project
- * and creates CustomTaskDescriptors for each task included
- * @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#initialize(DiagramEditor)
- */
- public void initialize(DiagramEditor editor) {
- if (!initialized) {
- // Register all of our Property Tab Detail overrides here.
- PropertiesCompositeFactory.register(Activity.class, JbpmActivityDetailComposite.class);
- PropertiesCompositeFactory.register(DataInput.class, JbpmDataAssociationDetailComposite.class);
- PropertiesCompositeFactory.register(DataOutput.class, JbpmDataAssociationDetailComposite.class);
- PropertiesCompositeFactory.register(Event.class, JbpmCommonEventDetailComposite.class);
- PropertiesCompositeFactory.register(Gateway.class, JbpmGatewayDetailComposite.class);
- PropertiesCompositeFactory.register(GlobalType.class, GlobalTypeDetailComposite.class);
- PropertiesCompositeFactory.register(ImportType.class, JbpmImportTypeDetailComposite.class);
- PropertiesCompositeFactory.register(ItemDefinition.class, JbpmItemDefinitionListComposite.class);
- PropertiesCompositeFactory.register(ManualTask.class, JbpmManualTaskDetailComposite.class);
- PropertiesCompositeFactory.register(Message.class, JbpmMessageDetailComposite.class);
- PropertiesCompositeFactory.register(Message.class, JbpmMessageListComposite.class);
- PropertiesCompositeFactory.register(MultiInstanceLoopCharacteristics.class, JbpmMultiInstanceDetailComposite.class);
- PropertiesCompositeFactory.register(ReceiveTask.class, JbpmReceiveTaskDetailComposite.class);
- PropertiesCompositeFactory.register(ScriptTask.class, JbpmScriptTaskDetailComposite.class);
- PropertiesCompositeFactory.register(SendTask.class, JbpmSendTaskDetailComposite.class);
- PropertiesCompositeFactory.register(SequenceFlow.class, JbpmSequenceFlowDetailComposite.class);
- PropertiesCompositeFactory.register(Task.class, JbpmTaskDetailComposite.class);
- PropertiesCompositeFactory.register(ItemDefinition.class, JbpmItemDefinitionDetailComposite.class);
- PropertiesCompositeFactory.register(Interface.class, JbpmInterfaceDetailComposite.class);
- initialized = true;
- }
-
- ISelection sel = editor.getEditorSite().getWorkbenchWindow().getSelectionService().getSelection();
- if (sel instanceof IStructuredSelection) {
- Object o = ((IStructuredSelection)sel).getFirstElement();
- // TODO: if selection came from a Guvnor Repository view, this will be a
- // org.guvnor.tools.views.model.TreeObject - figure out how to add this dependency.
- // In this case we may want to explicitly make the editor read-only
- }
-
- IProject project = Bpmn2Preferences.getActiveProject();
- if (project != null) {
- getWorkItemDefinitions();
- workItemDefinitions.clear();
- try {
- final WIDResourceVisitor visitor = new WIDResourceVisitor();
- project.accept(visitor, IResource.DEPTH_INFINITE, false);
- if (visitor.getWIDFiles().size() > 0) {
- Iterator<IFile> fileIter = visitor.getWIDFiles().iterator();
- while (fileIter.hasNext()) {
- IFile file = fileIter.next();
- HashMap<String, WorkItemDefinition> widMap =
- new LinkedHashMap<String, WorkItemDefinition>();
- WIDHandler.evaluateWorkDefinitions(widMap, file);
- workItemDefinitions.addAll(widMap.values());
- }
- }
- if (!workItemDefinitions.isEmpty()) {
- List<CustomTaskDescriptor> removed = new ArrayList<CustomTaskDescriptor>();
- for (CustomTaskDescriptor d : TargetRuntime.getCurrentRuntime().getCustomTasks()) {
- if (!d.isPermanent())
- removed.add(d);
+ @Override
+ public void notify(LifecycleEvent event) {
+ if (event.eventType == EventType.EDITOR_INITIALIZED) {
+ if (!initialized) {
+ // Register all of our Property Tab Detail overrides here.
+ PropertiesCompositeFactory.register(Activity.class, JbpmActivityDetailComposite.class);
+ PropertiesCompositeFactory.register(DataInput.class, JbpmDataAssociationDetailComposite.class);
+ PropertiesCompositeFactory.register(DataOutput.class, JbpmDataAssociationDetailComposite.class);
+ PropertiesCompositeFactory.register(Event.class, JbpmCommonEventDetailComposite.class);
+ PropertiesCompositeFactory.register(Gateway.class, JbpmGatewayDetailComposite.class);
+ PropertiesCompositeFactory.register(GlobalType.class, GlobalTypeDetailComposite.class);
+ PropertiesCompositeFactory.register(ImportType.class, JbpmImportTypeDetailComposite.class);
+ PropertiesCompositeFactory.register(ItemDefinition.class, JbpmItemDefinitionListComposite.class);
+ PropertiesCompositeFactory.register(ManualTask.class, JbpmManualTaskDetailComposite.class);
+ PropertiesCompositeFactory.register(Message.class, JbpmMessageDetailComposite.class);
+ PropertiesCompositeFactory.register(Message.class, JbpmMessageListComposite.class);
+ PropertiesCompositeFactory.register(MultiInstanceLoopCharacteristics.class, JbpmMultiInstanceDetailComposite.class);
+ PropertiesCompositeFactory.register(ReceiveTask.class, JbpmReceiveTaskDetailComposite.class);
+ PropertiesCompositeFactory.register(ScriptTask.class, JbpmScriptTaskDetailComposite.class);
+ PropertiesCompositeFactory.register(SendTask.class, JbpmSendTaskDetailComposite.class);
+ PropertiesCompositeFactory.register(SequenceFlow.class, JbpmSequenceFlowDetailComposite.class);
+ PropertiesCompositeFactory.register(Task.class, JbpmTaskDetailComposite.class);
+ PropertiesCompositeFactory.register(ItemDefinition.class, JbpmItemDefinitionDetailComposite.class);
+ PropertiesCompositeFactory.register(Interface.class, JbpmInterfaceDetailComposite.class);
+ initialized = true;
+ }
+
+ DiagramEditor editor = (DiagramEditor) event.target;
+ ISelection sel = editor.getEditorSite().getWorkbenchWindow().getSelectionService().getSelection();
+ if (sel instanceof IStructuredSelection) {
+ Object o = ((IStructuredSelection)sel).getFirstElement();
+ // TODO: if selection came from a Guvnor Repository view, this will be a
+ // org.guvnor.tools.views.model.TreeObject - figure out how to add this dependency.
+ // In this case we may want to explicitly make the editor read-only
+ }
+
+ IProject project = Bpmn2Preferences.getActiveProject();
+ if (project != null) {
+ getWorkItemDefinitions();
+ workItemDefinitions.clear();
+ try {
+ final WIDResourceVisitor visitor = new WIDResourceVisitor();
+ project.accept(visitor, IResource.DEPTH_INFINITE, false);
+ if (visitor.getWIDFiles().size() > 0) {
+ Iterator<IFile> fileIter = visitor.getWIDFiles().iterator();
+ while (fileIter.hasNext()) {
+ IFile file = fileIter.next();
+ HashMap<String, WorkItemDefinition> widMap =
+ new LinkedHashMap<String, WorkItemDefinition>();
+ WIDHandler.evaluateWorkDefinitions(widMap, file);
+ workItemDefinitions.addAll(widMap.values());
+ }
}
- TargetRuntime.getCurrentRuntime().getCustomTasks().removeAll(removed);
-
- java.util.Iterator<WorkItemDefinition> widIterator = workItemDefinitions.iterator();
- while(widIterator.hasNext()) {
- final WorkItemDefinition wid = widIterator.next();
- final CustomTaskDescriptor ctd = convertWIDtoCT(wid);
- if (ctd != null) {
- if (TargetRuntime.getCurrentRuntime().customTaskExists(ctd.getId())) {
- Display.getDefault().asyncExec( new Runnable() {
- @Override
- public void run() {
- MessageDialog.openError(Display.getDefault().getActiveShell(),
- Messages.JBPM5RuntimeExtension_Duplicate_Task_Title,
- Messages.JBPM5RuntimeExtension_Duplicate_Task_Message+
- ctd.getId()+
- "' was already defined.\n"+ //$NON-NLS-1$
- "The new Custom Task defined in the file: "+ //$NON-NLS-1$
- wid.getDefinitionFile().getFullPath().toString()+"\n"+ //$NON-NLS-1$
- "will be ignored."); //$NON-NLS-1$
- }
- });
+ if (!workItemDefinitions.isEmpty()) {
+ List<CustomTaskDescriptor> removed = new ArrayList<CustomTaskDescriptor>();
+ for (CustomTaskDescriptor d : TargetRuntime.getCurrentRuntime().getCustomTaskDescriptors()) {
+ if (!d.isPermanent())
+ removed.add(d);
+ }
+ TargetRuntime.getCurrentRuntime().getCustomTaskDescriptors().removeAll(removed);
+
+ java.util.Iterator<WorkItemDefinition> widIterator = workItemDefinitions.iterator();
+ while(widIterator.hasNext()) {
+ final WorkItemDefinition wid = widIterator.next();
+ final CustomTaskDescriptor ctd = convertWIDtoCT(wid);
+ if (ctd != null) {
+ if (TargetRuntime.getCurrentRuntime().customTaskExists(ctd.getId())) {
+ Display.getDefault().asyncExec( new Runnable() {
+ @Override
+ public void run() {
+ MessageDialog.openError(Display.getDefault().getActiveShell(),
+ Messages.JBPM5RuntimeExtension_Duplicate_Task_Title,
+ Messages.JBPM5RuntimeExtension_Duplicate_Task_Message+
+ ctd.getId()+
+ "' was already defined.\n"+ //$NON-NLS-1$
+ "The new Custom Task defined in the file: "+ //$NON-NLS-1$
+ wid.getDefinitionFile().getFullPath().toString()+"\n"+ //$NON-NLS-1$
+ "will be ignored."); //$NON-NLS-1$
+ }
+ });
+ }
+ else
+ TargetRuntime.getCurrentRuntime().addCustomTask(ctd);
}
- else
- TargetRuntime.getCurrentRuntime().addCustomTask(ctd);
}
}
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (WIDException e) {
+ e.printStackTrace();
}
- } catch (CoreException e) {
- e.printStackTrace();
- } catch (WIDException e) {
- e.printStackTrace();
}
+
+ editor.getEditingDomain().addResourceSetListener(this);
}
-
- editor.getEditingDomain().addResourceSetListener(this);
}
/*
@@ -270,10 +253,11 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
private CustomTaskDescriptor convertWIDtoCT ( WorkItemDefinition wid ) {
if (wid != null) {
String id = wid.getName();
- String name = wid.getName();
+ String name = wid.getDisplayName();
CustomTaskDescriptor ct = new CustomTaskDescriptor(id,name);
ct.setType("Task"); //$NON-NLS-1$
- ct.setDescription(wid.getName());
+ ct.setDescription(wid.getDescription());
+ ct.setCategory(wid.getCategory());
ct.setFeatureContainer(new JbpmCustomTaskFeatureContainer());
ct.getFeatureContainer().setCustomTaskDescriptor(ct);
ct.getFeatureContainer().setId(id);
@@ -349,7 +333,7 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
String value = getWIDPropertyValue(propName, wid);
String description = null;
String type = "EString"; //$NON-NLS-1$
- Property prop = new Property(name, description);
+ Property prop = new Property(null, name, description);
prop.type = type;
if (value == null && propName.equalsIgnoreCase("icon")) { //$NON-NLS-1$
value = "task.png"; //$NON-NLS-1$
@@ -373,8 +357,8 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
Property prop = (Property) values[i];
if (prop.name.equals("dataInputs")) { //$NON-NLS-1$
inputCounter++;
- Property dataInputAssociations = new Property ( "dataInputAssociations", null); //$NON-NLS-1$
- Property targetRef = new Property ("targetRef", null); //$NON-NLS-1$
+ Property dataInputAssociations = new Property (prop, "dataInputAssociations", null); //$NON-NLS-1$
+ Property targetRef = new Property (dataInputAssociations, "targetRef", null); //$NON-NLS-1$
targetRef.ref = "ioSpecification/dataInputs#" + inputCounter; //$NON-NLS-1$
dataInputAssociations.getValues().add(targetRef);
ct.getProperties().add(dataInputAssociations);
@@ -400,11 +384,11 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
* @param wid
*/
private Property createIOSpecificationSection ( CustomTaskDescriptor ct, WorkItemDefinition wid ) {
- Property ioSpecification = new Property ( "ioSpecification", null); //$NON-NLS-1$
+ Property ioSpecification = new Property (null,"ioSpecification", null); //$NON-NLS-1$
for (Entry<String, String> entry : wid.getParameters().entrySet()) {
- Property dataInputs = new Property("dataInputs", null); //$NON-NLS-1$
- Property dataInputsName = new Property("name", null); //$NON-NLS-1$
+ Property dataInputs = new Property(ioSpecification,"dataInputs", null); //$NON-NLS-1$
+ Property dataInputsName = new Property(dataInputs,"name", null); //$NON-NLS-1$
dataInputsName.getValues().add(entry.getKey());
dataInputs.getValues().add(dataInputsName);
ioSpecification.getValues().add(dataInputs);
@@ -420,8 +404,8 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
// ioSpecification.getValues().add(dataOutputs);
// } else {
for (Entry<String, String> entry : wid.getResults().entrySet()) {
- Property dataOutputs = new Property("dataOutputs", null); //$NON-NLS-1$
- Property dataOutputsName = new Property("name", null); //$NON-NLS-1$
+ Property dataOutputs = new Property(ioSpecification,"dataOutputs", null); //$NON-NLS-1$
+ Property dataOutputsName = new Property(dataOutputs,"name", null); //$NON-NLS-1$
dataOutputsName.getValues().add(entry.getKey());
dataOutputs.getValues().add(dataOutputsName);
ioSpecification.getValues().add(dataOutputs);
@@ -431,19 +415,19 @@ public class JBPM5RuntimeExtension implements IBpmn2RuntimeExtension, ResourceSe
Object[] values = ioSpecification.getValues().toArray();
int inputCounter = -1;
int outputCounter = -1;
- Property inputSets = new Property("inputSets", null); //$NON-NLS-1$
- Property outputSets = new Property("outputSets", null); //$NON-NLS-1$
+ Property inputSets = new Property(ioSpecification,"inputSets", null); //$NON-NLS-1$
+ Property outputSets = new Property(ioSpecification,"outputSets", null); //$NON-NLS-1$
for (int i = 0; i < values.length; i++) {
if (values[i] instanceof Property) {
Property prop = (Property) values[i];
if (prop.name.equals("dataInputs")) { //$NON-NLS-1$
inputCounter++;
- Property inputSetsRef = new Property ("dataInputRefs", null); //$NON-NLS-1$
+ Property inputSetsRef = new Property (inputSets,"dataInputRefs", null); //$NON-NLS-1$
inputSetsRef.ref = "ioSpecification/dataInputs#" + inputCounter; //$NON-NLS-1$
inputSets.getValues().add(inputSetsRef);
} else if (prop.name.equals("dataOutputs")) { //$NON-NLS-1$
outputCounter++;
- Property outputSetsRef = new Property ("dataOutputRefs", null); //$NON-NLS-1$
+ Property outputSetsRef = new Property (outputSets,"dataOutputRefs", null); //$NON-NLS-1$
outputSetsRef.ref = "ioSpecification/dataOutputs#" + outputCounter; //$NON-NLS-1$
outputSets.getValues().add(outputSetsRef);
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Messages.java
index 72cf1d30..82d61793 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/ProcessVariableNameChangeAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/ProcessVariableNameChangeAdapter.java
index 37f61d69..8a0e775c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/ProcessVariableNameChangeAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/ProcessVariableNameChangeAdapter.java
@@ -11,7 +11,6 @@
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5;
import org.eclipse.bpmn2.modeler.core.validation.SyntaxCheckerUtils;
-import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.GlobalType;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
@@ -143,7 +142,7 @@ public class ProcessVariableNameChangeAdapter implements Adapter {
EObject object = (EObject)newTarget;
EStructuralFeature feature = object.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
if (feature!=null) {
- Object oldValue = null;
+ Object oldValue = "";
Object newValue = object.eGet(feature);
Notification notification = new ENotificationImpl((InternalEObject)object,
Notification.SET, feature,
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/EditBeanDialog.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/EditBeanDialog.java
index 5478e100..5478e100 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/EditBeanDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/EditBeanDialog.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java
new file mode 100644
index 00000000..8d1e4735
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/Messages.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.customeditor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.customeditor.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/SampleCustomEditor.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/SampleCustomEditor.java
index bb38ddc2..bb38ddc2 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/SampleCustomEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/SampleCustomEditor.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/messages.properties
index e69de29b..e69de29b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/customeditor/messages.properties
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/ParameterDefinition.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/ParameterDefinition.java
index ccf37572..ccf37572 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/ParameterDefinition.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/ParameterDefinition.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/TypeObject.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/TypeObject.java
index 4acfb94a..4acfb94a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/TypeObject.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/TypeObject.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/Work.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/Work.java
index d5dfca35..d5dfca35 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/Work.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/Work.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinition.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinition.java
index 296d982e..296d982e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinition.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinition.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinitionExtension.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinitionExtension.java
index e7a281fa..e7a281fa 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinitionExtension.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkDefinitionExtension.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkEditor.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkEditor.java
index 37ae9ca0..37ae9ca0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/WorkEditor.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataType.java
index e55caad6..e55caad6 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeFactory.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeFactory.java
index aeff7b74..aeff7b74 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeFactory.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeRegistry.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeRegistry.java
index f4dda85d..f4dda85d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeRegistry.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/DataTypeRegistry.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/InstanceDataTypeFactory.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/InstanceDataTypeFactory.java
index 798e906e..798e906e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/InstanceDataTypeFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/InstanceDataTypeFactory.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/Messages.java
index 5e2b1502..257679c5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.datatype.impl;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/NewInstanceDataTypeFactory.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/NewInstanceDataTypeFactory.java
index b72a2d69..b72a2d69 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/NewInstanceDataTypeFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/NewInstanceDataTypeFactory.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties
new file mode 100644
index 00000000..8ab6bd63
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+InstanceDataTypeFactory_Cannot_Create=Could not create data type for class {0}
+NewInstanceDataTypeFactory_Cannot_Create=Could not create data type for class {0}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/BooleanDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/BooleanDataType.java
index 2fae21e8..aa78ee0b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/BooleanDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/BooleanDataType.java
@@ -54,6 +54,6 @@ public final class BooleanDataType
}
public String getStringType() {
- return "Boolean"; //$NON-NLS-1$
+ return "java.lang.Boolean"; //$NON-NLS-1$
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/EnumDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/EnumDataType.java
index aae28ff4..aae28ff4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/EnumDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/EnumDataType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/FloatDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/FloatDataType.java
index 794118ce..8ad5d141 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/FloatDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/FloatDataType.java
@@ -57,6 +57,6 @@ public final class FloatDataType
}
public String getStringType() {
- return "Float"; //$NON-NLS-1$
+ return "java.lang.Float"; //$NON-NLS-1$
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/IntegerDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/IntegerDataType.java
index cc84777a..48ecd8da 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/IntegerDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/IntegerDataType.java
@@ -57,7 +57,7 @@ public class IntegerDataType
}
public String getStringType() {
- return "Integer"; //$NON-NLS-1$
+ return "java.lang.Integer"; //$NON-NLS-1$
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/Messages.java
index 3dff6272..64ca7aa1 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.datatype.impl.type;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/StringDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/StringDataType.java
index 55e4a5ad..6d45e00d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/StringDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/StringDataType.java
@@ -54,6 +54,6 @@ public class StringDataType implements DataType {
}
public String getStringType() {
- return "String"; //$NON-NLS-1$
+ return "java.lang.String"; //$NON-NLS-1$
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/UndefinedDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/UndefinedDataType.java
index 76d35095..6ef9dbfc 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/UndefinedDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/UndefinedDataType.java
@@ -59,6 +59,6 @@ public final class UndefinedDataType implements DataType {
}
public String getStringType() {
- return "Object"; //$NON-NLS-1$
+ return "java.lang.Object"; //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties
new file mode 100644
index 00000000..f576c1a8
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/datatype/impl/type/messages.properties
@@ -0,0 +1,15 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+EnumDataType_3=Could not find data type {0}
+EnumDataType_4=IllegalAccessException {0}
+EnumDataType_5=InvocationTargetException {0}
+EnumDataType_6=NoSuchMethodException {0}
+UndefinedDataType_Undefined=Undefined datatype
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/Messages.java
index 7ed9a073..6a655c1a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.impl;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/ParameterDefinitionImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/ParameterDefinitionImpl.java
index 799ad519..799ad519 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/ParameterDefinitionImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/ParameterDefinitionImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionExtensionImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionExtensionImpl.java
index c00f968c..c00f968c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionExtensionImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionExtensionImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionImpl.java
index 7f9dfb20..7f9dfb20 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkDefinitionImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkImpl.java
index cf886062..cf886062 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/WorkImpl.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties
new file mode 100644
index 00000000..04324fe2
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/drools/process/core/impl/messages.properties
@@ -0,0 +1,14 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+ParameterDefinitionImpl_Null_Name=Name cannot be null
+ParameterDefinitionImpl_Null_Parameter=Data type cannot be null
+WorkImpl_Null_Parameter=Parameter name is null
+WorkImpl_Work_Item_Name=Work {0}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmBusinessRuleTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmBusinessRuleTaskFeatureContainer.java
index e9f30663..96c6bd26 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmBusinessRuleTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmBusinessRuleTaskFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.activity.task.BusinessRuleTaskFeatu
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmBusinessRuleTaskFeatureContainer extends BusinessRuleTaskFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmCustomTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmCustomTaskFeatureContainer.java
index 8c4dfffb..c7aa4654 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmCustomTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmCustomTaskFeatureContainer.java
@@ -26,12 +26,14 @@ import org.eclipse.bpmn2.ItemKind;
import org.eclipse.bpmn2.OutputSet;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.JBPM5RuntimeExtension;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.customeditor.SampleCustomEditor;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.ParameterDefinition;
@@ -45,7 +47,6 @@ import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.util.JbpmModelUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.wid.WorkItemDefinition;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.TaskFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.TaskFeatureContainer.CreateTaskFeature;
import org.eclipse.emf.ecore.EObject;
@@ -59,12 +60,9 @@ import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.features.context.ICustomContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.Image;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer {
@@ -115,7 +113,7 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
// make sure the ioSpecification has both a default InputSet and OutputSet
InputOutputSpecification ioSpecification = task.getIoSpecification();
if (ioSpecification!=null) {
- Resource resource = ModelUtil.getResource(context.getTargetContainer());
+ Resource resource = getResource(context);
if (ioSpecification.getInputSets().size()==0) {
InputSet is = Bpmn2ModelerFactory.create(resource, InputSet.class);
ioSpecification.getInputSets().add(is);
@@ -128,9 +126,10 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
// Create the ItemDefinitions for each I/O parameter if needed
JBPM5RuntimeExtension rx = (JBPM5RuntimeExtension)customTaskDescriptor.getRuntime().getRuntimeExtension();
- WorkItemDefinition wid = rx.getWorkItemDefinition(name);
- if (task.getIoSpecification()!=null && wid!=null) {
- for (DataInput input : task.getIoSpecification().getDataInputs()) {
+ String id = customTaskDescriptor.getId();
+ WorkItemDefinition wid = rx.getWorkItemDefinition(id);
+ if (ioSpecification!=null && wid!=null) {
+ for (DataInput input : ioSpecification.getDataInputs()) {
for (Entry<String, String> entry : wid.getParameters().entrySet()) {
if (input.getName().equals(entry.getKey())) {
if (entry.getValue()!=null)
@@ -139,7 +138,7 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
}
}
}
- for (DataOutput output : task.getIoSpecification().getDataOutputs()) {
+ for (DataOutput output : ioSpecification.getDataOutputs()) {
for (Entry<String, String> entry : wid.getResults().entrySet()) {
if (output.getName().equals(entry.getKey())) {
if (entry.getValue()!=null)
@@ -163,13 +162,7 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
protected void decorateShape(IAddContext context, ContainerShape containerShape, Task businessObject) {
super.decorateShape(context, containerShape, businessObject);
final String iconPath = (String) customTaskDescriptor.getPropertyValue("icon"); //$NON-NLS-1$
- if (iconPath != null && iconPath.trim().length() > 0) {
- GraphicsAlgorithmContainer ga = getGraphicsAlgorithm(containerShape);
- IGaService service = Graphiti.getGaService();
- Image img = service.createImage(ga, iconPath);
- service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE,
- GraphicsUtil.TASK_IMAGE_SIZE);
- }
+ ShapeDecoratorUtil.createActivityImage(containerShape, iconPath);
}
}
@@ -177,7 +170,7 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
if (object==null)
return null;
- List<EStructuralFeature> features = ModelUtil.getAnyAttributes(object);
+ List<EStructuralFeature> features = ModelDecorator.getAnyAttributes(object);
for (EStructuralFeature f : features) {
if ("taskName".equals(f.getName())) { //$NON-NLS-1$
Object attrValue = object.eGet(f);
@@ -244,7 +237,7 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
Object o = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pes[0]);
if (o instanceof Task) {
Task task = (Task)o;
- List<EStructuralFeature> features = ModelUtil.getAnyAttributes(task);
+ List<EStructuralFeature> features = ModelDecorator.getAnyAttributes(task);
for (EStructuralFeature f : features) {
if ("taskName".equals(f.getName())) { //$NON-NLS-1$
// make sure the Work Item Definition exists
@@ -275,7 +268,7 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
PictogramElement pe = ((ICustomContext) context).getPictogramElements()[0];
final Task task = (Task)Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
String taskName = ""; //$NON-NLS-1$
- List<EStructuralFeature> features = ModelUtil.getAnyAttributes(task);
+ List<EStructuralFeature> features = ModelDecorator.getAnyAttributes(task);
for (EStructuralFeature f : features) {
if ("taskName".equals(f.getName())) { //$NON-NLS-1$
taskName = (String)task.eGet(f);
@@ -306,7 +299,7 @@ public class JbpmCustomTaskFeatureContainer extends CustomShapeFeatureContainer
if (ModelUtil.isStringWrapper(structureRef)) {
ParameterDefinition parameterDefinition = w.getParameterDefinition(name);
try {
- Object value = parameterDefinition.getType().readValue(ModelUtil.getStringWrapperValue(structureRef));
+ Object value = parameterDefinition.getType().readValue(ModelUtil.getStringWrapperTextValue(structureRef));
w.setParameter(name, value);
}
catch (Exception e) {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmEndEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmEndEventFeatureContainer.java
index 00ea9ce4..c60020a9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmEndEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmEndEventFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.event.EndEventFeatureContainer;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmEndEventFeatureContainer extends EndEventFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmErrorEventDefinitionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmErrorEventDefinitionFeatureContainer.java
index fe10119f..fe10119f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmErrorEventDefinitionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmErrorEventDefinitionFeatureContainer.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateCatchEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateCatchEventFeatureContainer.java
index 5d628123..38dd96aa 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateCatchEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateCatchEventFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.event.IntermediateCatchEventFeature
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmIntermediateCatchEventFeatureContainer extends IntermediateCatchEventFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateThrowEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateThrowEventFeatureContainer.java
index 3c729c13..adbd8b07 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateThrowEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmIntermediateThrowEventFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.event.IntermediateThrowEventFeature
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmIntermediateThrowEventFeatureContainer extends IntermediateThrowEventFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmManualTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmManualTaskFeatureContainer.java
index c0ce715e..0b3bce92 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmManualTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmManualTaskFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.activity.task.ManualTaskFeatureCont
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmManualTaskFeatureContainer extends ManualTaskFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmReceiveTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmReceiveTaskFeatureContainer.java
index 0c095bfd..1a23514f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmReceiveTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmReceiveTaskFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.activity.task.ReceiveTaskFeatureCon
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmReceiveTaskFeatureContainer extends ReceiveTaskFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmScriptTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmScriptTaskFeatureContainer.java
index e5a92482..e58c3863 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmScriptTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmScriptTaskFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.activity.task.ScriptTaskFeatureCont
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmScriptTaskFeatureContainer extends ScriptTaskFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSendTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSendTaskFeatureContainer.java
index dba29151..cc1e5513 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSendTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSendTaskFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.activity.task.SendTaskFeatureContai
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmSendTaskFeatureContainer extends SendTaskFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSequenceFlowFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSequenceFlowFeatureContainer.java
index aa7aab9b..5c0d2aba 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSequenceFlowFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSequenceFlowFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.flow.SequenceFlowFeatureContainer;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmSequenceFlowFeatureContainer extends
@@ -33,6 +34,8 @@ public class JbpmSequenceFlowFeatureContainer extends
BaseElement be = BusinessObjectUtil.getFirstBaseElement(pe);
ElementParameters ep = JbpmModelUtil.getElementParameters(be);
getFeatureProvider().link(pe, ep);
+// ColorChangeAdapter adapter = new ColorChangeAdapter();
+// adapter.adapt((ContainerShape)pe);
return pe;
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmServiceTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmServiceTaskFeatureContainer.java
index 24f42b51..99b03662 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmServiceTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmServiceTaskFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.activity.task.ServiceTaskFeatureCon
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmServiceTaskFeatureContainer extends ServiceTaskFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSignalEventDefinitionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSignalEventDefinitionFeatureContainer.java
index b1b29cc6..b1b29cc6 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSignalEventDefinitionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmSignalEventDefinitionFeatureContainer.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmStartEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmStartEventFeatureContainer.java
index c82145c3..556b0bd9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmStartEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmStartEventFeatureContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.modeler.ui.features.event.StartEventFeatureContainer;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class JbpmStartEventFeatureContainer extends StartEventFeatureContainer {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTaskFeatureContainer.java
index 78438799..d5b07ee8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTaskFeatureContainer.java
@@ -11,9 +11,7 @@
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.features;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.task.AddTaskFeature;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.bpsim.ElementParameters;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.util.JbpmModelUtil;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.TaskFeatureContainer;
@@ -29,7 +27,7 @@ public class JbpmTaskFeatureContainer extends TaskFeatureContainer {
return new JbpmAddTaskFeature(fp);
}
- public static class JbpmAddTaskFeature extends AddTaskFeature<Task> {
+ public static class JbpmAddTaskFeature extends AddTaskFeature {
public JbpmAddTaskFeature(IFeatureProvider fp) {
super(fp);
@@ -37,8 +35,8 @@ public class JbpmTaskFeatureContainer extends TaskFeatureContainer {
@Override
public PictogramElement add(IAddContext context) {
- PictogramElement pe = super.add(context);
- BaseElement be = BusinessObjectUtil.getFirstBaseElement(pe);
+ final BaseElement be = getBusinessObject(context);
+ final PictogramElement pe = super.add(context);
ElementParameters ep = JbpmModelUtil.getElementParameters(be);
getFeatureProvider().link(pe, ep);
return pe;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTerminateEventDefinitionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTerminateEventDefinitionFeatureContainer.java
index e6c1a2cc..e6c1a2cc 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTerminateEventDefinitionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTerminateEventDefinitionFeatureContainer.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTimerEventDefinitionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTimerEventDefinitionFeatureContainer.java
index f65f902a..f65f902a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTimerEventDefinitionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmTimerEventDefinitionFeatureContainer.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmUserTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmUserTaskFeatureContainer.java
index 0390af82..cb75ceeb 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmUserTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/JbpmUserTaskFeatureContainer.java
@@ -27,6 +27,7 @@ import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/Messages.java
index 1385fcfa..b5442823 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.features;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties
new file mode 100644
index 00000000..32222d6f
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/features/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+JbpmCustomTaskFeatureContainer_Description=Configure the Parameters for this Custom Task
+JbpmCustomTaskFeatureContainer_Name=Configure Work Item
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties
new file mode 100644
index 00000000..1957d030
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/messages.properties
@@ -0,0 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+Activator_Error=An error occured
+JBPM5RuntimeExtension_Duplicate_Task_Message=A Custom Task with id {0} was already defined.\nThe new Custom Task defined in the file {1} will be ignored.
+JBPM5RuntimeExtension_Duplicate_Task_Title=Duplicate Custom Task
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BPSimDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BPSimDataType.java
index 60eab4e4..60eab4e4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BPSimDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BPSimDataType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BetaDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BetaDistributionType.java
index 051a48b2..051a48b2 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BetaDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BetaDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BinomialDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BinomialDistributionType.java
index bfad62d6..bfad62d6 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BinomialDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BinomialDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BooleanParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BooleanParameterType.java
index d8a85d8f..d8a85d8f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BooleanParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BooleanParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimFactory.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimFactory.java
index 7454d41b..7454d41b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimFactory.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimPackage.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimPackage.java
index e176bbf8..e176bbf8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimPackage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/BpsimPackage.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Calendar.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Calendar.java
index 29dcccfb..29dcccfb 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Calendar.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Calendar.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ConstantParameter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ConstantParameter.java
index b2426c01..b2426c01 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ConstantParameter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ConstantParameter.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ControlParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ControlParameters.java
index ce3b0e99..ce3b0e99 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ControlParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ControlParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/CostParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/CostParameters.java
index ee431855..ee431855 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/CostParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/CostParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DateTimeParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DateTimeParameterType.java
index 55dca4da..55dca4da 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DateTimeParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DateTimeParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DistributionParameter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DistributionParameter.java
index ec4ccfbf..ec4ccfbf 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DistributionParameter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DistributionParameter.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DocumentRoot.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DocumentRoot.java
index eadcc584..eadcc584 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DocumentRoot.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DocumentRoot.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DurationParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DurationParameterType.java
index 2ce90d8f..2ce90d8f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DurationParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/DurationParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParameters.java
index 87a92220..87a92220 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParametersType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParametersType.java
index b1cb99b0..b1cb99b0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParametersType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ElementParametersType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/EnumParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/EnumParameterType.java
index 512d8b6a..512d8b6a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/EnumParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/EnumParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ErlangDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ErlangDistributionType.java
index 1af8d181..1af8d181 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ErlangDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ErlangDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ExpressionParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ExpressionParameterType.java
index b6f8fc23..b6f8fc23 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ExpressionParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ExpressionParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/FloatingParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/FloatingParameterType.java
index 33f90569..33f90569 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/FloatingParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/FloatingParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/GammaDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/GammaDistributionType.java
index 132382ba..132382ba 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/GammaDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/GammaDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/LogNormalDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/LogNormalDistributionType.java
index ef0c600f..ef0c600f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/LogNormalDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/LogNormalDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NegativeExponentialDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NegativeExponentialDistributionType.java
index b65bd95b..b65bd95b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NegativeExponentialDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NegativeExponentialDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NormalDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NormalDistributionType.java
index 473fb224..473fb224 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NormalDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NormalDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NumericParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NumericParameterType.java
index 781804cf..781804cf 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NumericParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/NumericParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Parameter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Parameter.java
index e145c9a6..e145c9a6 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Parameter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Parameter.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ParameterValue.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ParameterValue.java
index 6e65ae71..6e65ae71 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ParameterValue.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ParameterValue.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PoissonDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PoissonDistributionType.java
index 5d26f453..5d26f453 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PoissonDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PoissonDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PriorityParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PriorityParameters.java
index 594b4399..594b4399 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PriorityParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PriorityParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyParameters.java
index c13a3678..c13a3678 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyType.java
index e09f9b26..e09f9b26 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/PropertyType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResourceParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResourceParameters.java
index 2d0b47a7..2d0b47a7 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResourceParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResourceParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResultType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResultType.java
index ae2a8221..ae2a8221 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResultType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ResultType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Scenario.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Scenario.java
index 122550ff..122550ff 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Scenario.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/Scenario.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParameters.java
index 9e2c4c85..9e2c4c85 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParametersType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParametersType.java
index 5231a2a2..5231a2a2 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParametersType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/ScenarioParametersType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/StringParameterType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/StringParameterType.java
index da49f36c..da49f36c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/StringParameterType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/StringParameterType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeParameters.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeParameters.java
index 59594cef..59594cef 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeParameters.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeParameters.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeUnit.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeUnit.java
index b4d30571..b4d30571 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeUnit.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TimeUnit.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TriangularDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TriangularDistributionType.java
index 5114a142..5114a142 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TriangularDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TriangularDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TruncatedNormalDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TruncatedNormalDistributionType.java
index bd854f33..bd854f33 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TruncatedNormalDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/TruncatedNormalDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UniformDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UniformDistributionType.java
index 2b1fa209..2b1fa209 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UniformDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UniformDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionDataPointType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionDataPointType.java
index 6819b30d..6819b30d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionDataPointType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionDataPointType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionType.java
index 40527e24..40527e24 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/UserDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/VendorExtension.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/VendorExtension.java
index a01e7d2c..a01e7d2c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/VendorExtension.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/VendorExtension.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/WeibullDistributionType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/WeibullDistributionType.java
index 8f260758..8f260758 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/WeibullDistributionType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/WeibullDistributionType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BPSimDataTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BPSimDataTypeImpl.java
index 51a48138..51a48138 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BPSimDataTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BPSimDataTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BetaDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BetaDistributionTypeImpl.java
index 678d6ca1..678d6ca1 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BetaDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BetaDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BinomialDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BinomialDistributionTypeImpl.java
index 5c668d15..5c668d15 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BinomialDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BinomialDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BooleanParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BooleanParameterTypeImpl.java
index 8926eb85..8926eb85 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BooleanParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BooleanParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimFactoryImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimFactoryImpl.java
index 53dfa682..53dfa682 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimFactoryImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimFactoryImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimPackageImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimPackageImpl.java
index 6cb94f5b..6cb94f5b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimPackageImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/BpsimPackageImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CalendarImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CalendarImpl.java
index 8a484bdc..8a484bdc 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CalendarImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CalendarImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ConstantParameterImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ConstantParameterImpl.java
index f3d0fa81..f3d0fa81 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ConstantParameterImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ConstantParameterImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ControlParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ControlParametersImpl.java
index 947b3288..947b3288 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ControlParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ControlParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CostParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CostParametersImpl.java
index c0ce0be7..c0ce0be7 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CostParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/CostParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DateTimeParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DateTimeParameterTypeImpl.java
index 5c3b3e10..5c3b3e10 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DateTimeParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DateTimeParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DistributionParameterImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DistributionParameterImpl.java
index db7543dd..db7543dd 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DistributionParameterImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DistributionParameterImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DocumentRootImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DocumentRootImpl.java
index d583c870..d583c870 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DocumentRootImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DocumentRootImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DurationParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DurationParameterTypeImpl.java
index 78b3e2cf..78b3e2cf 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DurationParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/DurationParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersImpl.java
index 15bb218c..15bb218c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersTypeImpl.java
index f3b0e4ea..f3b0e4ea 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ElementParametersTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/EnumParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/EnumParameterTypeImpl.java
index 8b7eee3e..8b7eee3e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/EnumParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/EnumParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ErlangDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ErlangDistributionTypeImpl.java
index 412ffc99..412ffc99 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ErlangDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ErlangDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ExpressionParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ExpressionParameterTypeImpl.java
index e17a070e..e17a070e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ExpressionParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ExpressionParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/FloatingParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/FloatingParameterTypeImpl.java
index a8b6cfe9..a8b6cfe9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/FloatingParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/FloatingParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/GammaDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/GammaDistributionTypeImpl.java
index ad3cb044..ad3cb044 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/GammaDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/GammaDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/LogNormalDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/LogNormalDistributionTypeImpl.java
index 45f45c1e..45f45c1e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/LogNormalDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/LogNormalDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NegativeExponentialDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NegativeExponentialDistributionTypeImpl.java
index 8d1ff713..8d1ff713 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NegativeExponentialDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NegativeExponentialDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NormalDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NormalDistributionTypeImpl.java
index f86438c6..f86438c6 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NormalDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NormalDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NumericParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NumericParameterTypeImpl.java
index 25377e88..25377e88 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NumericParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/NumericParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterImpl.java
index 3d90e642..3d90e642 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterValueImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterValueImpl.java
index b1f123a5..b1f123a5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterValueImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ParameterValueImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PoissonDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PoissonDistributionTypeImpl.java
index abb820d9..abb820d9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PoissonDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PoissonDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PriorityParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PriorityParametersImpl.java
index c08e4356..c08e4356 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PriorityParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PriorityParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyParametersImpl.java
index f0c9d883..f0c9d883 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyTypeImpl.java
index 93218fef..93218fef 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/PropertyTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ResourceParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ResourceParametersImpl.java
index b2aa0580..b2aa0580 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ResourceParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ResourceParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioImpl.java
index b7baa411..b7baa411 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersImpl.java
index 29c9329f..29c9329f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersTypeImpl.java
index 4239e64f..4239e64f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/ScenarioParametersTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/StringParameterTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/StringParameterTypeImpl.java
index ff2d9449..ff2d9449 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/StringParameterTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/StringParameterTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TimeParametersImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TimeParametersImpl.java
index 75446cf1..75446cf1 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TimeParametersImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TimeParametersImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TriangularDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TriangularDistributionTypeImpl.java
index 7107c255..7107c255 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TriangularDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TriangularDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TruncatedNormalDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TruncatedNormalDistributionTypeImpl.java
index accf925f..accf925f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TruncatedNormalDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/TruncatedNormalDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UniformDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UniformDistributionTypeImpl.java
index 91de9254..91de9254 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UniformDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UniformDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionDataPointTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionDataPointTypeImpl.java
index 847647d9..847647d9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionDataPointTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionDataPointTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionTypeImpl.java
index 7f1b6650..7f1b6650 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/UserDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/VendorExtensionImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/VendorExtensionImpl.java
index a009ea1e..a009ea1e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/VendorExtensionImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/VendorExtensionImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/WeibullDistributionTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/WeibullDistributionTypeImpl.java
index 251dcb52..251dcb52 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/WeibullDistributionTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/impl/WeibullDistributionTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimAdapterFactory.java
index f773dcf2..f773dcf2 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimAdapterFactory.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceFactoryImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceFactoryImpl.java
index 56804dc4..56804dc4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceFactoryImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceFactoryImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceImpl.java
index e9bb225a..e9bb225a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimResourceImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimSwitch.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimSwitch.java
index 7ff49ca0..7ff49ca0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimSwitch.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimSwitch.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimXMLProcessor.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimXMLProcessor.java
index c6baeeb7..c6baeeb7 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimXMLProcessor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/bpsim/util/BpsimXMLProcessor.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/BPSimDataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/BPSimDataType.java
index afba4c85..afba4c85 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/BPSimDataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/BPSimDataType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DocumentRoot.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DocumentRoot.java
index c36428f5..c36428f5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DocumentRoot.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DocumentRoot.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsFactory.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsFactory.java
index 497a8926..497a8926 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsFactory.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsPackage.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsPackage.java
index 882fc7ba..882fc7ba 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsPackage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/DroolsPackage.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ExternalProcess.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ExternalProcess.java
index 81c54a30..81c54a30 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ExternalProcess.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ExternalProcess.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/GlobalType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/GlobalType.java
index 3f044d7c..3f044d7c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/GlobalType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/GlobalType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ImportType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ImportType.java
index 3b3ad081..3b3ad081 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ImportType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/ImportType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetadataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetadataType.java
index f7a5ba37..f7a5ba37 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetadataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetadataType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetaentryType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetaentryType.java
index a69f257a..a69f257a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetaentryType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/MetaentryType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnEntryScriptType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnEntryScriptType.java
index 7bdd0569..7bdd0569 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnEntryScriptType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnEntryScriptType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnExitScriptType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnExitScriptType.java
index a952abb8..a952abb8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnExitScriptType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/OnExitScriptType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/BPSimDataTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/BPSimDataTypeImpl.java
index 03274b40..03274b40 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/BPSimDataTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/BPSimDataTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DocumentRootImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DocumentRootImpl.java
index 0d8e44dc..0d8e44dc 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DocumentRootImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DocumentRootImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsFactoryImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsFactoryImpl.java
index fa20d71d..fa20d71d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsFactoryImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsFactoryImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsPackageImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsPackageImpl.java
index f1695452..f1695452 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsPackageImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/DroolsPackageImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ExternalProcessImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ExternalProcessImpl.java
index 559e87ba..559e87ba 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ExternalProcessImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ExternalProcessImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/GlobalTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/GlobalTypeImpl.java
index a050223d..a050223d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/GlobalTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/GlobalTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ImportTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ImportTypeImpl.java
index 60a62470..60a62470 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ImportTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/ImportTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetadataTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetadataTypeImpl.java
index a8b91437..a8b91437 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetadataTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetadataTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetaentryTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetaentryTypeImpl.java
index e750144b..e750144b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetaentryTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/MetaentryTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnEntryScriptTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnEntryScriptTypeImpl.java
index 42313c70..42313c70 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnEntryScriptTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnEntryScriptTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnExitScriptTypeImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnExitScriptTypeImpl.java
index d9e77b66..d9e77b66 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnExitScriptTypeImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/impl/OnExitScriptTypeImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsAdapterFactory.java
index 1f73f807..1f73f807 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsAdapterFactory.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceFactoryImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceFactoryImpl.java
index fca84c62..fca84c62 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceFactoryImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceFactoryImpl.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceImpl.java
index 49b82663..fdb58931 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsResourceImpl.java
@@ -24,21 +24,30 @@ import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.CallActivity;
import org.eclipse.bpmn2.CallableElement;
+import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.DataAssociation;
+import org.eclipse.bpmn2.DataInput;
+import org.eclipse.bpmn2.DataInputAssociation;
import org.eclipse.bpmn2.DataObject;
+import org.eclipse.bpmn2.DataOutput;
+import org.eclipse.bpmn2.DataOutputAssociation;
import org.eclipse.bpmn2.DataStore;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.Event;
+import org.eclipse.bpmn2.InputSet;
import org.eclipse.bpmn2.Interface;
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.LoopCharacteristics;
import org.eclipse.bpmn2.Message;
import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
+import org.eclipse.bpmn2.OutputSet;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.Property;
import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.ProcessVariableNameChangeAdapter;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.DroolsFactory;
@@ -141,7 +150,85 @@ public class DroolsResourceImpl extends Bpmn2ModelerResourceImpl {
if (o instanceof GlobalType && f==Bpmn2Package.eINSTANCE.getBaseElement_Id()) {
return false;
}
-
+
+ // workaround for Bug 430953 don't save the following collections:
+ //
+ // OutputSet
+ // DataOutputs
+ // DataOutputAssociation
+ // InputSet
+ // DataInputs
+ // DataInputAssociations
+ //
+ // if no associations have been made.
+ if (o instanceof CatchEvent) {
+ CatchEvent event = (CatchEvent) o;
+ String featureName = f.getName();
+ if ( featureName.equals("outputSet") ||
+ featureName.equals("dataOutputs") ||
+ featureName.equals("dataOutputAssociation")) {
+ if ( event.getOutputSet()==null ||
+ event.getOutputSet().getDataOutputRefs().size()==0 ||
+ event.getDataOutputAssociation().size()==0 ||
+ event.getDataOutputs().size()==0) {
+ return false;
+ }
+ DataOutputAssociation association = event.getDataOutputAssociation().get(0);
+ if (association.getTargetRef()==null)
+ return false;
+ }
+ }
+ if (o.eContainer() instanceof CatchEvent) {
+ CatchEvent event = (CatchEvent) o.eContainer();
+ if ( o instanceof OutputSet ||
+ o instanceof DataOutput ||
+ o instanceof DataOutputAssociation) {
+ if ( event.getOutputSet()==null ||
+ event.getOutputSet().getDataOutputRefs().size()==0 ||
+ event.getDataOutputAssociation().size()==0 ||
+ event.getDataOutputs().size()==0) {
+ return false;
+ }
+ DataOutputAssociation association = event.getDataOutputAssociation().get(0);
+ if (association.getTargetRef()==null)
+ return false;
+ }
+ }
+
+ if (o instanceof ThrowEvent) {
+ ThrowEvent event = (ThrowEvent) o;
+ String featureName = f.getName();
+ if ( featureName.equals("inputSet") ||
+ featureName.equals("dataInputs") ||
+ featureName.equals("dataInputAssociation")) {
+ if ( event.getInputSet()==null ||
+ event.getInputSet().getDataInputRefs().size()==0 ||
+ event.getDataInputAssociation().size()==0 ||
+ event.getDataInputs().size()==0) {
+ return false;
+ }
+ DataInputAssociation association = event.getDataInputAssociation().get(0);
+ if (association.getTargetRef()==null)
+ return false;
+ }
+ }
+ if (o.eContainer() instanceof ThrowEvent) {
+ ThrowEvent event = (ThrowEvent) o.eContainer();
+ if ( o instanceof InputSet ||
+ o instanceof DataInput ||
+ o instanceof DataInputAssociation) {
+ if ( event.getInputSet()==null ||
+ event.getInputSet().getDataInputRefs().size()==0 ||
+ event.getDataInputAssociation().size()==0 ||
+ event.getDataInputs().size()==0) {
+ return false;
+ }
+ DataInputAssociation association = event.getDataInputAssociation().get(0);
+ if (association.getTargetRef()==null)
+ return false;
+ }
+ }
+
return super.shouldSaveFeature(o, f);
}
@@ -428,7 +515,8 @@ public class DroolsResourceImpl extends Bpmn2ModelerResourceImpl {
// since these are (theoretically) supposed to be unique; but it is what it is...
if (childObject instanceof Property ||
childObject instanceof DataObject ||
- childObject instanceof Message) {
+ childObject instanceof Message ||
+ (childObject instanceof DataInput && childObject.eContainer() instanceof MultiInstanceLoopCharacteristics)) {
EStructuralFeature nameFeature = childObject.eClass().getEStructuralFeature("name");
if (nameFeature!=null) {
Object value = childObject.eGet(nameFeature);
@@ -570,7 +658,7 @@ public class DroolsResourceImpl extends Bpmn2ModelerResourceImpl {
return p;
}
- for (GlobalType g : ModelUtil.getAllExtensionAttributeValues(process, GlobalType.class)) {
+ for (GlobalType g : ModelDecorator.getAllExtensionAttributeValues(process, GlobalType.class)) {
if (ids.equals(g.getIdentifier()))
return g;
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsSwitch.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsSwitch.java
index 56b6131b..56b6131b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsSwitch.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsSwitch.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsValidator.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsValidator.java
index 0e7339c2..0e7339c2 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsValidator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsValidator.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsXMLProcessor.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsXMLProcessor.java
index fb685245..fb685245 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsXMLProcessor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/model/drools/util/DroolsXMLProcessor.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/JbpmPreferencePage.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/JbpmPreferencePage.java
index 781de1c1..781de1c1 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/JbpmPreferencePage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/JbpmPreferencePage.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/Messages.java
index bd275f86..a95b3ca9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.preferences;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties
new file mode 100644
index 00000000..d41f89b1
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/preferences/messages.properties
@@ -0,0 +1,12 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+JbpmPreferencePage_Enable_Simulation=Enable Simulation Parameters
+JbpmPreferencePage_JBPM_Settings=jBPM Runtime-specific Settings
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityDetailComposite.java
index cca49cd6..62177af0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityDetailComposite.java
@@ -21,7 +21,7 @@ import org.eclipse.bpmn2.ExtensionAttributeValue;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.DroolsFactory;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.DroolsPackage;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.OnEntryScriptType;
@@ -97,7 +97,7 @@ public class JbpmActivityDetailComposite extends ActivityDetailComposite {
@SuppressWarnings("unchecked")
private <T extends EObject> T getOrCreateEntryExitScript(final Activity be, final Class<T> clazz) {
T result = null;
- List<T> scriptList = ModelUtil.getAllExtensionAttributeValues(be, clazz);
+ List<T> scriptList = ModelDecorator.getAllExtensionAttributeValues(be, clazz);
if (scriptList.size()>0)
result = scriptList.get(0);
else {
@@ -113,7 +113,7 @@ public class JbpmActivityDetailComposite extends ActivityDetailComposite {
f = DroolsPackage.eINSTANCE.getDocumentRoot_OnEntryScript();
else
f = DroolsPackage.eINSTANCE.getDocumentRoot_OnExitScript();
- ModelUtil.addExtensionAttributeValue(be, f, script, true);
+ ModelDecorator.addExtensionAttributeValue(be, f, script, true);
result = script;
}
return result;
@@ -161,7 +161,7 @@ public class JbpmActivityDetailComposite extends ActivityDetailComposite {
public void notifyChanged(Notification notification) {
super.notifyChanged(notification);
if (notification.getNotifier()==businessObject && notification.getNewValue()==null) {
- // It's possible that the user did an UNDO which removed the On Entry/Exit Scripts,
+ // It's possible that the user did an COMMAND_UNDO which removed the On Entry/Exit Scripts,
// do we need to reset the business object for the On Entry/Exit Script editors?
if (onEntryScriptEditor!=null && onExitScriptEditor!=null) {
Object oldValue = notification.getOldValue();
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityPropertySection.java
index 9cbdaad8..9cbdaad8 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmActivityPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmBusinessRuleTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmBusinessRuleTaskPropertySection.java
index 849c6e5c..849c6e5c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmBusinessRuleTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmBusinessRuleTaskPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityDetailComposite.java
index e00f7edf..fd21b95d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityDetailComposite.java
@@ -16,6 +16,7 @@ package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
import org.eclipse.bpmn2.CallableElement;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextAndButtonObjectEditor;
@@ -55,7 +56,7 @@ public class JbpmCallActivityDetailComposite extends JbpmActivityDetailComposite
if (parent==null)
parent = getAttributesParent();
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
ObjectEditor editor = new TextAndButtonObjectEditor(this,object,reference) {
@Override
@@ -71,7 +72,7 @@ public class JbpmCallActivityDetailComposite extends JbpmActivityDetailComposite
};
- String initialValue = ModelUtil.getDisplayName(object,feature);
+ String initialValue = ExtendedPropertiesProvider.getTextValue(object,feature);
InputDialog dialog = new InputDialog(
getShell(),
Messages.JbpmCallActivityDetailComposite_Title,
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityPropertySection.java
index 5b63f342..5b63f342 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCallActivityPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java
index 4e19b8db..94cac372 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventDetailComposite.java
@@ -16,14 +16,18 @@ package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
import java.util.List;
import org.eclipse.bpmn2.CatchEvent;
+import org.eclipse.bpmn2.ConditionalEventDefinition;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.CommonEventDetailComposite;
+import org.eclipse.bpmn2.modeler.ui.property.events.ConditionalEventDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.EventDefinitionsListComposite;
+import org.eclipse.bpmn2.modeler.ui.property.events.TimerEventDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.events.EventDefinitionsListComposite.EventDefinitionsDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.tasks.DataAssociationDetailComposite.MapType;
import org.eclipse.emf.ecore.EClass;
@@ -61,6 +65,12 @@ public class JbpmCommonEventDetailComposite extends CommonEventDetailComposite {
@Override
public AbstractDetailComposite createDetailComposite(Class eClass, Composite parent, int style) {
+ if (eClass==TimerEventDefinition.class) {
+ return new TimerEventDefinitionDetailComposite(parent, style);
+ }
+ if (eClass==ConditionalEventDefinition.class){
+ return new ConditionalEventDefinitionDetailComposite(parent, style);
+ }
EventDefinitionsDetailComposite details = new EventDefinitionsDetailComposite(parent, (Event)getBusinessObject()) {
@Override
public void createBindings(EObject be) {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventPropertySection.java
index 5397339c..5397339c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCommonEventPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskDetailComposite.java
index b22b804e..b22b804e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java
index b0bc311b..85f25ac1 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmCustomTaskPropertySection.java
@@ -17,8 +17,8 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -52,7 +52,7 @@ public class JbpmCustomTaskPropertySection extends JbpmTaskPropertySection imple
EObject object = BusinessObjectUtil.getBusinessObjectForSelection(selection);
if (object.eClass() == Bpmn2Package.eINSTANCE.getTask() && isModelObjectEnabled(object)) {
- List<EStructuralFeature> features = ModelUtil.getAnyAttributes(object);
+ List<EStructuralFeature> features = ModelDecorator.getAnyAttributes(object);
for (EStructuralFeature f : features) {
if ("displayName".equals(f.getName())) //$NON-NLS-1$
return true;
@@ -64,7 +64,7 @@ public class JbpmCustomTaskPropertySection extends JbpmTaskPropertySection imple
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof Task)
return be;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataAssociationDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataAssociationDetailComposite.java
index b4e12f0d..b4e12f0d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataAssociationDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataAssociationDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsDetailComposite.java
index 5a35e838..ed0b5b40 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsDetailComposite.java
@@ -20,6 +20,7 @@ import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.ProcessVariableNameChangeAdapter;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.DroolsFactory;
@@ -57,7 +58,6 @@ public class JbpmDataItemsDetailComposite extends DataItemsDetailComposite {
if (propertiesProvider==null) {
propertiesProvider = new AbstractPropertiesProvider(object) {
String[] properties = new String[] {
- "rootElements#Process.global", //$NON-NLS-1$
"rootElements#Process.properties", //$NON-NLS-1$
"rootElements#Process.resources", //$NON-NLS-1$
};
@@ -94,7 +94,7 @@ public class JbpmDataItemsDetailComposite extends DataItemsDetailComposite {
String name = base + suffix;
for (;;) {
boolean found = false;
- for (Object g : ModelUtil.getAllExtensionAttributeValues(object, GlobalType.class)) {
+ for (Object g : ModelDecorator.getAllExtensionAttributeValues(object, GlobalType.class)) {
if (name.equals(((GlobalType)g).getIdentifier()) ) {
found = true;
break;
@@ -116,8 +116,8 @@ public class JbpmDataItemsDetailComposite extends DataItemsDetailComposite {
};
globalsTable.bindList(process, DroolsPackage.eINSTANCE.getDocumentRoot_Global());
globalsTable.setTitle(
- NLS.bind(Messages.JbpmDataItemsDetailComposite_Title
- ,ModelUtil.getLongDisplayName(process)));
+ NLS.bind(Messages.JbpmDataItemsDetailComposite_GlobalVariablesTitle
+ ,ModelUtil.toCanonicalString(process)));
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsPropertySection.java
index 3da95369..3da95369 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDataItemsPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertyComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertyComposite.java
index 6e5f6d70..faf03b31 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertyComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertyComposite.java
@@ -54,7 +54,6 @@ public class JbpmDefinitionsPropertyComposite extends DefinitionsPropertyComposi
String[] properties = new String[] {
"name", //$NON-NLS-1$
"imports", //$NON-NLS-1$
- "rootElements#ItemDefinition", //$NON-NLS-1$
"rootElements#Resource", //$NON-NLS-1$
"rootElements#Message", //$NON-NLS-1$
"rootElements#Error", //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java
index f38adfec..f38adfec 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDefinitionsPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java
index 529030ae..6840a184 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmDescriptionPropertySection.java
@@ -105,5 +105,9 @@ public class JbpmDescriptionPropertySection extends DescriptionPropertySection {
}
}
+ @Override
+ protected void bindAppearance(EObject be) {
+ // TODO: support the color/appearance extensions defined by jBPM Web Designer
+ }
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java
index 512f14f5..512f14f5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmEmptyPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayDetailComposite.java
index 62cf827f..62cf827f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayPropertySection.java
index 7923b882..7923b882 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmGatewayPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportObjectEditor.java
index 8e075dbc..8e075dbc 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportObjectEditor.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportTypeDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportTypeDetailComposite.java
index 1af50e55..1af50e55 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportTypeDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmImportTypeDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfaceDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfaceDetailComposite.java
index 13b6a0e9..28fe557e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfaceDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfaceDetailComposite.java
@@ -11,8 +11,8 @@
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
import org.eclipse.bpmn2.Interface;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.property.data.InterfaceDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.editors.SchemaObjectEditor;
import org.eclipse.emf.ecore.EObject;
@@ -38,7 +38,7 @@ public class JbpmInterfaceDetailComposite extends InterfaceDetailComposite {
parent = getAttributesParent();
final Interface iface = (Interface)object;
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
JbpmImportObjectEditor editor = new JbpmImportObjectEditor(this,object,reference);
editor.createControl(parent,displayName);
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfacePropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfacePropertySection.java
index e123f2de..e123f2de 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfacePropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmInterfacePropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersDetailComposite.java
index a47addb3..11c104e5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersDetailComposite.java
@@ -21,9 +21,9 @@ import org.eclipse.bpmn2.ReceiveTask;
import org.eclipse.bpmn2.SendTask;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
+import org.eclipse.bpmn2.modeler.core.runtime.BaseRuntimeExtensionDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.ModelExtensionAdapter;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
import org.eclipse.bpmn2.modeler.ui.property.tasks.IoParametersDetailComposite;
import org.eclipse.emf.ecore.EObject;
@@ -72,8 +72,8 @@ public class JbpmIoParametersDetailComposite extends IoParametersDetailComposite
}
public static boolean isCustomTask(EObject object) {
- ModelExtensionAdapter adapter = ModelExtensionDescriptor.getModelExtensionAdapter(object);
- if (adapter!=null && adapter.getDescriptor() instanceof CustomTaskDescriptor) {
+ CustomTaskDescriptor ctd = BaseRuntimeExtensionDescriptor.getDescriptor(object, CustomTaskDescriptor.class);
+ if (ctd!=null) {
return true;
}
return false;
@@ -93,9 +93,9 @@ public class JbpmIoParametersDetailComposite extends IoParametersDetailComposite
return false;
List<Property> props = null;
- ModelExtensionAdapter adapter = ModelExtensionDescriptor.getModelExtensionAdapter(activity);
- if (adapter!=null) {
- props = adapter.getProperties("ioSpecification/dataInputs/name"); //$NON-NLS-1$
+ CustomTaskDescriptor ctd = BaseRuntimeExtensionDescriptor.getDescriptor(activity, CustomTaskDescriptor.class);
+ if (ctd!=null) {
+ props = ctd.getProperties("ioSpecification/dataInputs/name"); //$NON-NLS-1$
if (props!=null) {
for (Property p : props) {
Object propName = p.getFirstStringValue();
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersListComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersListComposite.java
index 11abe3da..6978ac9d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersListComposite.java
@@ -20,9 +20,9 @@ import org.eclipse.bpmn2.SendTask;
import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeContentProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.TableColumn;
+import org.eclipse.bpmn2.modeler.core.runtime.BaseRuntimeExtensionDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.ModelExtensionAdapter;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
import org.eclipse.bpmn2.modeler.ui.property.tasks.IoParameterNameColumn;
import org.eclipse.bpmn2.modeler.ui.property.tasks.IoParametersDetailComposite;
@@ -80,7 +80,7 @@ public class JbpmIoParametersListComposite extends IoParametersListComposite {
else if (activity instanceof ReceiveTask) {
enabled = ((ReceiveTask)activity).getOperationRef()==null && ((ReceiveTask)activity).getMessageRef()==null;
}
- else if (CustomTaskDescriptor.getDescriptor(activity) != null) {
+ else if (BaseRuntimeExtensionDescriptor.getDescriptor(activity, CustomTaskDescriptor.class) != null) {
enabled = false;
}
@@ -100,12 +100,12 @@ public class JbpmIoParametersListComposite extends IoParametersListComposite {
Object elements[] = super.getElements(inputElement);
List<Property> props = null;
- ModelExtensionAdapter adapter = ModelExtensionDescriptor.getModelExtensionAdapter(activity);
- if (adapter!=null && !(adapter.getDescriptor() instanceof CustomTaskDescriptor)) {
+ ModelExtensionDescriptor med = BaseRuntimeExtensionDescriptor.getDescriptor(activity, ModelExtensionDescriptor.class);
+ if (med!=null) {
if (JbpmIoParametersListComposite.this.isInput)
- props = adapter.getProperties("ioSpecification/dataInputs/name"); //$NON-NLS-1$
+ props = med.getProperties("ioSpecification/dataInputs/name"); //$NON-NLS-1$
else
- props = adapter.getProperties("ioSpecification/dataOutputs/name"); //$NON-NLS-1$
+ props = med.getProperties("ioSpecification/dataOutputs/name"); //$NON-NLS-1$
List<Object> filtered = new ArrayList<Object>();
for (Object e : elements) {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersPropertySection.java
index 5aac09a0..72b0e4ce 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmIoParametersPropertySection.java
@@ -32,7 +32,7 @@ public class JbpmIoParametersPropertySection extends IoParametersPropertySection
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof ScriptTask || be==null)
return null;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionDetailComposite.java
index 86e6fa4e..6fe80bfb 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionDetailComposite.java
@@ -12,6 +12,7 @@ package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.ItemKind;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor;
@@ -43,7 +44,7 @@ public class JbpmItemDefinitionDetailComposite extends
parent = getAttributesParent();
final ItemDefinition def = (ItemDefinition)object;
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
if (def.getItemKind().equals(ItemKind.INFORMATION)) {
JbpmImportObjectEditor editor = new JbpmImportObjectEditor(this,object,reference);
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionListComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionListComposite.java
index 49cced37..49cced37 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmItemDefinitionListComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskDetailComposite.java
index 671f7271..671f7271 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskPropertySection.java
index 00be34b4..00be34b4 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmManualTaskPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmMultiInstanceDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmMultiInstanceDetailComposite.java
index e5dad490..314b42bd 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmMultiInstanceDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmMultiInstanceDetailComposite.java
@@ -26,7 +26,6 @@ public class JbpmMultiInstanceDetailComposite extends
public JbpmMultiInstanceDetailComposite(AbstractBpmn2PropertySection section) {
super(section);
- // TODO Auto-generated constructor stub
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmProcessDiagramPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmProcessDiagramPropertySection.java
index fbbced16..fbbced16 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmProcessDiagramPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmProcessDiagramPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskDetailComposite.java
index 9c539f83..9c539f83 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskPropertySection.java
index ccb5d6d9..ccb5d6d9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmReceiveTaskPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskDetailComposite.java
index 41e9f420..41e9f420 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskPropertySection.java
index cfb482d6..cfb482d6 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmScriptTaskPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskDetailComposite.java
index 7184f424..7184f424 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskPropertySection.java
index 03bbe477..03bbe477 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSendTaskPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowDetailComposite.java
index 648eba35..648eba35 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java
index 33907e94..33907e94 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSequenceFlowPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskDetailComposite.java
index e03a526d..e03a526d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskPropertySection.java
index 56dea1ee..56dea1ee 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmServiceTaskPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessDetailComposite.java
index e50253c6..e50253c6 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessPropertySection.java
index 55f35b7c..55f35b7c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmSubProcessPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskDetailComposite.java
index 32b0e4ff..bdcd79c9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskDetailComposite.java
@@ -40,8 +40,8 @@ import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.IntObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.NCNameObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor;
+import org.eclipse.bpmn2.modeler.core.runtime.BaseRuntimeExtensionDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.ModelExtensionAdapter;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.util.EList;
@@ -98,14 +98,14 @@ public class JbpmTaskDetailComposite extends JbpmActivityDetailComposite {
*/
protected void createInputParameterBindings(Task task) {
- ModelExtensionAdapter adapter = ModelExtensionDescriptor.getModelExtensionAdapter(task);
- if (adapter != null) {
+ ModelExtensionDescriptor med = BaseRuntimeExtensionDescriptor.getDescriptor(task, ModelExtensionDescriptor.class);
+ if (med != null) {
// This Task object has <modelExtension> properties defined in the plugin.xml
// check if any of the <property> elements extend the DataInputs or DataOutputs
// (i.e. the I/O Parameter mappings) and create Object Editors for them.
// If the Task does not define these parameter mappings, create temporary objects
// for the editors (these will go away if they are not touched by the user)
- List<Property> props = adapter.getProperties("ioSpecification/dataInputs/name"); //$NON-NLS-1$
+ List<Property> props = med.getProperties("ioSpecification/dataInputs/name"); //$NON-NLS-1$
InputOutputSpecification ioSpec = task.getIoSpecification();
if (ioSpec==null) {
ioSpec = createModelObject(InputOutputSpecification.class);
@@ -207,7 +207,7 @@ public class JbpmTaskDetailComposite extends JbpmActivityDetailComposite {
editor = new TextObjectEditor(this,fromExpression,attribute);
((TextObjectEditor)editor).setMultiLine(false);
}
- editor.createControl(getAttributesParent(),ModelUtil.toDisplayName(name));
+ editor.createControl(getAttributesParent(),ModelUtil.toCanonicalString(name));
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java
index 6d4178e5..3d135ef0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmTaskPropertySection.java
@@ -17,8 +17,8 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.property.tasks.TaskPropertySection;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -37,7 +37,7 @@ public class JbpmTaskPropertySection extends TaskPropertySection {
if (super.appliesTo(part, selection)) {
EObject object = BusinessObjectUtil.getBusinessObjectForSelection(selection);
if (object!=null && Bpmn2Package.eINSTANCE.getTask().isInstance(object)) {
- List<EStructuralFeature> features = ModelUtil.getAnyAttributes(object);
+ List<EStructuralFeature> features = ModelDecorator.getAnyAttributes(object);
for (EStructuralFeature f : features) {
if ("displayName".equals(f.getName())) //$NON-NLS-1$
// don't display this tab for Custom Tasks
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskDetailComposite.java
index 33e5297b..33e5297b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskPropertySection.java
index f208d033..f208d033 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/JbpmUserTaskPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/Messages.java
index 8437b017..58ba05cd 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
import org.eclipse.osgi.util.NLS;
@@ -13,7 +23,8 @@ public class Messages extends NLS {
public static String JbpmCommonEventDetailComposite_Error_Message;
public static String JbpmCommonEventDetailComposite_Error_Title;
public static String JbpmCommonEventDetailComposite_Title;
- public static String JbpmDataItemsDetailComposite_Title;
+ public static String JbpmDataItemsDetailComposite_GlobalVariablesTitle;
+ public static String JbpmDataItemsDetailComposite_LocalVariablesTitle;
public static String JbpmDataItemsPropertySection_Dialog_Cancelled;
public static String JbpmDataItemsPropertySection_Duplicate_Import;
public static String JbpmDefinitionsPropertyComposite_Imports_Title;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationDetailComposite.java
index 3653e0e0..509c4c17 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationDetailComposite.java
@@ -22,12 +22,12 @@ import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.UserTask;
import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ComboObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.IntObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.bpsim.BpsimPackage;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.bpsim.ControlParameters;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.bpsim.CostParameters;
@@ -120,7 +120,7 @@ public class SimulationDetailComposite extends DefaultDetailComposite {
@Override
public void createBindings(EObject be) {
- setTitle( ModelUtil.getLabel(be.eClass())+Messages.SimulationDetailComposite_Title);
+ setTitle( ExtendedPropertiesProvider.getLabel(be.eClass())+Messages.SimulationDetailComposite_Title);
if (be instanceof BPMNDiagram)
{
BPSimDataType pad = JbpmModelUtil.getBPSimData(be);
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java
index 2bdcef3e..2bdcef3e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/SimulationPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmCorrelationPropertyPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmCorrelationPropertyPropertiesAdapter.java
index 05946605..73213980 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmCorrelationPropertyPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmCorrelationPropertyPropertiesAdapter.java
@@ -27,11 +27,11 @@ public class JbpmCorrelationPropertyPropertiesAdapter extends CorrelationPropert
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getCorrelationProperty_Type();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<CorrelationProperty>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<CorrelationProperty>(this, object, feature) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- return JbpmModelUtil.collectAllDataTypes(adopt(context));
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataAssociationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataAssociationPropertiesAdapter.java
index dd97b35f..9dffcd8e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataAssociationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataAssociationPropertiesAdapter.java
@@ -14,6 +14,7 @@ import java.util.Hashtable;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataAssociation;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.DataAssociationPropertiesAdapter;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EObject;
@@ -29,27 +30,26 @@ public class JbpmDataAssociationPropertiesAdapter extends
EStructuralFeature ref;
ref = Bpmn2Package.eINSTANCE.getDataAssociation_SourceRef();
- setFeatureDescriptor(ref, new JbpmSourceTargetFeatureDescriptor(adapterFactory,object,ref) {
+ setFeatureDescriptor(ref, new JbpmSourceTargetFeatureDescriptor(this,object,ref) {
});
ref = Bpmn2Package.eINSTANCE.getDataAssociation_TargetRef();
- setFeatureDescriptor(ref, new JbpmSourceTargetFeatureDescriptor(adapterFactory,object,ref) {
+ setFeatureDescriptor(ref, new JbpmSourceTargetFeatureDescriptor(this,object,ref) {
});
}
public class JbpmSourceTargetFeatureDescriptor extends SourceTargetFeatureDescriptor {
- public JbpmSourceTargetFeatureDescriptor(AdapterFactory adapterFactory,
+ public JbpmSourceTargetFeatureDescriptor(ExtendedPropertiesAdapter<DataAssociation> owner,
DataAssociation object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
+ super(owner, object, feature);
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- EObject object = adopt(context);
- Hashtable<String, Object> choices = super.getChoiceOfValues(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String, Object> choices = super.getChoiceOfValues();
// GlobalType extensions can not be used for DataAssociations (as of jBPM 6)
// but maybe this will be supported in the future.
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataInputPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataInputPropertiesAdapter.java
index 1762567d..eaeb370a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataInputPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataInputPropertiesAdapter.java
@@ -19,8 +19,6 @@ import org.eclipse.bpmn2.modeler.ui.adapters.properties.DataInputPropertiesAdapt
import org.eclipse.bpmn2.modeler.ui.adapters.properties.ItemDefinitionRefFeatureDescriptor;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
public class JbpmDataInputPropertiesAdapter extends DataInputPropertiesAdapter {
@@ -33,29 +31,20 @@ public class JbpmDataInputPropertiesAdapter extends DataInputPropertiesAdapter {
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setFeatureDescriptor(feature,
- new ItemDefinitionRefFeatureDescriptor<DataInput>(adapterFactory,object,feature) {
+ new ItemDefinitionRefFeatureDescriptor<DataInput>(this,object,feature) {
- @Override
- public void setValue(Object context, final Object value) {
- final DataInput dataInput = adopt(context);
-
- TransactionalEditingDomain domain = getEditingDomain(object);
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- dataInput.setItemSubjectRef(JbpmModelUtil.getDataType(dataInput, value));
- }
- });
+ @Override
+ protected void internalSet(DataInput dataInput, EStructuralFeature feature, Object value, int index) {
+ dataInput.setItemSubjectRef(JbpmModelUtil.getDataType(dataInput, value));
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final DataInput property = adopt(context);
- return JbpmModelUtil.collectAllDataTypes(property);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataOutputPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataOutputPropertiesAdapter.java
index 54873775..61e2a8d9 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataOutputPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmDataOutputPropertiesAdapter.java
@@ -19,8 +19,6 @@ import org.eclipse.bpmn2.modeler.ui.adapters.properties.DataOutputPropertiesAdap
import org.eclipse.bpmn2.modeler.ui.adapters.properties.ItemDefinitionRefFeatureDescriptor;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
public class JbpmDataOutputPropertiesAdapter extends DataOutputPropertiesAdapter {
@@ -33,29 +31,20 @@ public class JbpmDataOutputPropertiesAdapter extends DataOutputPropertiesAdapter
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setFeatureDescriptor(feature,
- new ItemDefinitionRefFeatureDescriptor<DataOutput>(adapterFactory,object,feature) {
+ new ItemDefinitionRefFeatureDescriptor<DataOutput>(this,object,feature) {
- @Override
- public void setValue(Object context, final Object value) {
- final DataOutput dataInput = adopt(context);
-
- TransactionalEditingDomain domain = getEditingDomain(object);
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- dataInput.setItemSubjectRef(JbpmModelUtil.getDataType(dataInput, value));
- }
- });
+ @Override
+ protected void internalSet(DataOutput dataInput, EStructuralFeature feature, Object value, int index) {
+ dataInput.setItemSubjectRef(JbpmModelUtil.getDataType(dataInput, value));
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final DataOutput property = adopt(context);
- return JbpmModelUtil.collectAllDataTypes(property);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmErrorPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmErrorPropertiesAdapter.java
index 11793719..d9dd90eb 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmErrorPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmErrorPropertiesAdapter.java
@@ -27,11 +27,11 @@ public class JbpmErrorPropertiesAdapter extends ErrorPropertiesAdapter {
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getError_StructureRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Error>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Error>(this, object, feature) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- return JbpmModelUtil.collectAllDataTypes(adopt(context));
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmEscalationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmEscalationPropertiesAdapter.java
index 702a111b..082d0b96 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmEscalationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmEscalationPropertiesAdapter.java
@@ -27,11 +27,11 @@ public class JbpmEscalationPropertiesAdapter extends EscalationPropertiesAdapter
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getEscalation_StructureRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Escalation>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Escalation>(this, object, feature) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- return JbpmModelUtil.collectAllDataTypes(adopt(context));
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmFormalExpressionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmFormalExpressionPropertiesAdapter.java
index f3ca6a2a..02989f28 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmFormalExpressionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmFormalExpressionPropertiesAdapter.java
@@ -19,6 +19,7 @@ import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.ExpressionLanguageDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.FormalExpressionPropertiesAdapter;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -39,23 +40,21 @@ public class JbpmFormalExpressionPropertiesAdapter extends FormalExpressionPrope
final EStructuralFeature language = Bpmn2Package.eINSTANCE.getFormalExpression_Language();
setFeatureDescriptor(language,
- new FeatureDescriptor<FormalExpression>(adapterFactory,object,language) {
+ new FeatureDescriptor<FormalExpression>(this,object,language) {
+
@Override
- public String getLabel(Object context) {
- FormalExpression object = adopt(context);
+ public String getLabel() {
if (object.eContainer() instanceof SequenceFlow)
return Messages.JbpmFormalExpressionPropertiesAdapter_Condition_Language;
return Messages.JbpmFormalExpressionPropertiesAdapter_Script_Language;
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- FormalExpression object = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
choiceOfValues = new Hashtable<String, Object>();
TargetRuntime rt = TargetRuntime.getCurrentRuntime();
- String[] s = rt.getRuntimeExtension().getExpressionLanguages();
- for (int i=0; i<s.length; i+=2) {
- choiceOfValues.put(s[i+1], s[i]);
+ for (ExpressionLanguageDescriptor el : rt.getExpressionLanguageDescriptors()) {
+ choiceOfValues.put(el.getName(), el.getUri());
}
if (!(object.eContainer() instanceof SequenceFlow))
choiceOfValues.remove(Messages.JbpmFormalExpressionPropertiesAdapter_Rule);
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGatewayPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGatewayPropertiesAdapter.java
index 564829d6..1409775b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGatewayPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGatewayPropertiesAdapter.java
@@ -30,12 +30,11 @@ public class JbpmGatewayPropertiesAdapter extends
EStructuralFeature ref;
ref = Bpmn2Package.eINSTANCE.getGateway_GatewayDirection();
- setFeatureDescriptor(ref, new FeatureDescriptor<Gateway>(adapterFactory,object,ref) {
+ setFeatureDescriptor(ref, new FeatureDescriptor<Gateway>(this,object,ref) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- EObject object = adopt(context);
- Hashtable<String, Object> choices = super.getChoiceOfValues(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String, Object> choices = super.getChoiceOfValues();
choices.remove("Unspecified"); //$NON-NLS-1$
choices.remove("Mixed"); //$NON-NLS-1$
return choices;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGlobalTypePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGlobalTypePropertiesAdapter.java
index 99743415..3fbb44bf 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGlobalTypePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmGlobalTypePropertiesAdapter.java
@@ -23,8 +23,6 @@ import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.GlobalType;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.util.JbpmModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
/**
* @author Bob Brodt
@@ -41,11 +39,13 @@ public class JbpmGlobalTypePropertiesAdapter extends ExtendedPropertiesAdapter<G
EStructuralFeature feature = DroolsPackage.eINSTANCE.getGlobalType_Identifier();
setFeatureDescriptor(feature,
- new FeatureDescriptor<GlobalType>(adapterFactory,object,feature) {
+ new FeatureDescriptor<GlobalType>(this,object,feature) {
+
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return Messages.JbpmGlobalTypePropertiesAdapter_Name;
}
+
});
feature = DroolsPackage.eINSTANCE.getGlobalType_Type();
@@ -53,49 +53,40 @@ public class JbpmGlobalTypePropertiesAdapter extends ExtendedPropertiesAdapter<G
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setFeatureDescriptor(feature,
- new FeatureDescriptor<GlobalType>(adapterFactory,object,feature) {
- @Override
- public String getLabel(Object context) {
+ new FeatureDescriptor<GlobalType>(this,object,feature) {
+
+ @Override
+ public String getLabel() {
return Messages.JbpmGlobalTypePropertiesAdapter_Data_Type_Label;
}
@Override
- public void setValue(Object context, final Object value) {
- final GlobalType global = adopt(context);
-
- TransactionalEditingDomain domain = getEditingDomain(object);
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- global.setType(JbpmModelUtil.getDataType(value));
- }
- });
+ protected void internalSet(GlobalType global, EStructuralFeature feature, Object value, int index) {
+ global.setType(JbpmModelUtil.getDataType(value));
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final GlobalType global = adopt(context);
- return JbpmModelUtil.collectAllDataTypes(global);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
}
);
- setObjectDescriptor(new ObjectDescriptor<GlobalType>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<GlobalType>(this,object) {
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return Messages.JbpmGlobalTypePropertiesAdapter_Label;
}
@Override
- public String getDisplayName(Object context) {
- GlobalType object = adopt(context);
+ public String getTextValue() {
return object.getIdentifier();
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMessagePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMessagePropertiesAdapter.java
index 81dd1f60..f2abc131 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMessagePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMessagePropertiesAdapter.java
@@ -27,17 +27,11 @@ public class JbpmMessagePropertiesAdapter extends MessagePropertiesAdapter {
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getMessage_ItemRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Message>(adapterFactory, object, feature) {
-
- @Override
- public String getLabel(Object context) {
- // TODO Auto-generated method stub
- return super.getLabel(context);
- }
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Message>(this, object, feature) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- return JbpmModelUtil.collectAllDataTypes(adopt(context));
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
});
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java
new file mode 100644
index 00000000..7a6b1f3d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.DataInput;
+import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
+import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.ProcessVariableNameChangeAdapter;
+import org.eclipse.bpmn2.modeler.ui.adapters.properties.MultiInstanceLoopCharacteristicsPropertiesAdapter;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter extends MultiInstanceLoopCharacteristicsPropertiesAdapter {
+
+ /**
+ * @param adapterFactory
+ * @param object
+ */
+ public JbpmMultiInstanceLoopCharacteristicsPropertiesAdapter(AdapterFactory adapterFactory, MultiInstanceLoopCharacteristics object) {
+ super(adapterFactory, object);
+
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getMultiInstanceLoopCharacteristics_InputDataItem();
+ setFeatureDescriptor(feature,
+ new FeatureDescriptor<MultiInstanceLoopCharacteristics>(this,object,feature) {
+
+ @Override
+ public EObject createFeature(Resource resource, EClass eclass) {
+ DataInput input = (DataInput) super.createFeature(resource, eclass);
+ input.eAdapters().add(new ProcessVariableNameChangeAdapter());
+ return input;
+ }
+ });
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnEntryScriptPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnEntryScriptPropertiesAdapter.java
index 327102a8..298ffc43 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnEntryScriptPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnEntryScriptPropertiesAdapter.java
@@ -35,10 +35,10 @@ public class JbpmOnEntryScriptPropertiesAdapter extends ExtendedPropertiesAdapte
EStructuralFeature ref = DroolsPackage.eINSTANCE.getOnEntryScriptType_Script();
setFeatureDescriptor(ref,
- new FeatureDescriptor<OnEntryScriptType>(adapterFactory,object,ref) {
+ new FeatureDescriptor<OnEntryScriptType>(this, object,ref) {
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnExitScriptPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnExitScriptPropertiesAdapter.java
index 836e8699..7b94a76f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnExitScriptPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmOnExitScriptPropertiesAdapter.java
@@ -35,10 +35,10 @@ public class JbpmOnExitScriptPropertiesAdapter extends ExtendedPropertiesAdapter
EStructuralFeature ref = DroolsPackage.eINSTANCE.getOnExitScriptType_Script();
setFeatureDescriptor(ref,
- new FeatureDescriptor<OnExitScriptType>(adapterFactory,object,ref) {
+ new FeatureDescriptor<OnExitScriptType>(this, object,ref) {
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmPropertyPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmPropertyPropertiesAdapter.java
index b40b06bf..e5d6a128 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmPropertyPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmPropertyPropertiesAdapter.java
@@ -17,14 +17,13 @@ import java.util.Hashtable;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Property;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
+import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.Messages;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.util.JbpmModelUtil;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.ItemDefinitionRefFeatureDescriptor;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.PropertyPropertiesAdapter;
import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
/**
* @author Bob Brodt
@@ -45,38 +44,32 @@ public class JbpmPropertyPropertiesAdapter extends PropertyPropertiesAdapter {
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setFeatureDescriptor(feature,
- new ItemDefinitionRefFeatureDescriptor<Property>(adapterFactory,object,feature) {
+ new ItemDefinitionRefFeatureDescriptor<Property>(this,object,feature) {
- @Override
- public void setValue(Object context, final Object value) {
- final Property property = adopt(context);
-
- TransactionalEditingDomain domain = getEditingDomain(object);
- if (domain==null && value instanceof EObject) {
- domain = getEditingDomain(value);
- }
- if (domain!=null) {
- domain.getCommandStack().execute(new RecordingCommand(domain) {
- @Override
- protected void doExecute() {
- property.setItemSubjectRef(JbpmModelUtil.getDataType(property, value));
- }
- });
- }
+ @Override
+ protected void internalSet(Property property, EStructuralFeature feature, Object value, int index) {
+ property.setItemSubjectRef(JbpmModelUtil.getDataType(property, value));
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final Property property = adopt(context);
- return JbpmModelUtil.collectAllDataTypes(property);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
}
);
- }
+
+ setObjectDescriptor(new ObjectDescriptor<Property>(this,object) {
+
+ @Override
+ public String getLabel() {
+ return Messages.JbpmDataItemsDetailComposite_LocalVariablesTitle;
+ }
+ });
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmResourceParameterPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmResourceParameterPropertiesAdapter.java
index e76d30d1..b306d655 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmResourceParameterPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmResourceParameterPropertiesAdapter.java
@@ -27,11 +27,11 @@ public class JbpmResourceParameterPropertiesAdapter extends ResourceParameterPro
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getResourceParameter_Type();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<ResourceParameter>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<ResourceParameter>(this, object, feature) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- return JbpmModelUtil.collectAllDataTypes(adopt(context));
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmSignalPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmSignalPropertiesAdapter.java
index dfd6de42..123a1656 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmSignalPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/JbpmSignalPropertiesAdapter.java
@@ -27,11 +27,11 @@ public class JbpmSignalPropertiesAdapter extends SignalPropertiesAdapter {
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getSignal_StructureRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Signal>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Signal>(this, object, feature) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- return JbpmModelUtil.collectAllDataTypes(adopt(context));
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return JbpmModelUtil.getChoiceOfValues(object);
}
});
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/Messages.java
index bc88e83d..ab1a5466 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties
new file mode 100644
index 00000000..c92ec9e1
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/adapters/messages.properties
@@ -0,0 +1,16 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+JbpmFormalExpressionPropertiesAdapter_Condition_Language=Condition Language
+JbpmFormalExpressionPropertiesAdapter_Rule=Rule
+JbpmFormalExpressionPropertiesAdapter_Script_Language=Script Language
+JbpmGlobalTypePropertiesAdapter_Data_Type_Label=Data Type
+JbpmGlobalTypePropertiesAdapter_Label=Global Variable
+JbpmGlobalTypePropertiesAdapter_Name=Name
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/messages.properties
index a1d3a364..a2feac43 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/property/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
JbpmActivityDetailComposite_On_Entry_Script=On Entry Script
JbpmActivityDetailComposite_On_Exit_Script=On Exit Script
JbpmActivityDetailComposite_Script_Details=Script Details
@@ -7,7 +17,8 @@ JbpmCallActivityDetailComposite_Title=Called Activity
JbpmCommonEventDetailComposite_Error_Message=Can not add more than one Event Definition
JbpmCommonEventDetailComposite_Error_Title=Not Supported
JbpmCommonEventDetailComposite_Title=Event Definitions
-JbpmDataItemsDetailComposite_Title=Global List for {0}
+JbpmDataItemsDetailComposite_GlobalVariablesTitle=Global Variable List for {0}
+JbpmDataItemsDetailComposite_LocalVariablesTitle=Local Variable
JbpmDataItemsPropertySection_Dialog_Cancelled=Dialog Cancelled
JbpmDataItemsPropertySection_Duplicate_Import=Import Already Exists
JbpmDefinitionsPropertyComposite_Imports_Title=Imports
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmInterfaceImportDialog.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmInterfaceImportDialog.java
index 6e0d67ea..6e0d67ea 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmInterfaceImportDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmInterfaceImportDialog.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmModelUtil.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmModelUtil.java
index 18d6a7ff..282c5733 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmModelUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/JbpmModelUtil.java
@@ -30,8 +30,11 @@ import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.UserTask;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.datatype.DataType;
@@ -189,7 +192,7 @@ public class JbpmModelUtil {
}
final String className = type.getFullyQualifiedName('.');
- List<ImportType> allImports = ModelUtil.getAllExtensionAttributeValues(process, ImportType.class);
+ List<ImportType> allImports = ModelDecorator.getAllExtensionAttributeValues(process, ImportType.class);
for (ImportType it : allImports) {
if (className.equals(it.getName())) {
if (recursive) {
@@ -216,14 +219,13 @@ public class JbpmModelUtil {
ImportHandler importer = new ImportHandler();
importer.setCreateVariables(createVariables);
- ModelUtil.addExtensionAttributeValue(fProcess,
+ ModelDecorator.addExtensionAttributeValue(fProcess,
DroolsPackage.eINSTANCE.getDocumentRoot_ImportType(), newImport);
if (recursive) {
if (object instanceof ItemDefinition) {
// update the ItemDefinition passed to us
ItemDefinition oldItemDef = (ItemDefinition)object;
- String oldName = ModelUtil.getStringWrapperValue(oldItemDef.getStructureRef());
// and now update the existing item's structureRef
oldItemDef.setItemKind(ItemKind.INFORMATION);
EObject structureRef = ModelUtil.createStringWrapper(className);
@@ -264,55 +266,55 @@ public class JbpmModelUtil {
* @param object - a context EObject used to search for ItemDefinitions, Globals and Imports
* @return a map of Strings and Objects representing the various data types
*/
- public static Hashtable<String, Object> collectAllDataTypes(EObject object) {
+ public static Hashtable<String, Object> getChoiceOfValues(EObject object) {
- Hashtable<String,Object> choices = new Hashtable<String,Object>();
- Definitions defs = ModelUtil.getDefinitions(object);
-
- // add all native types (as defined in the DataTypeRegistry)
- DataTypeRegistry.getFactory("dummy"); //$NON-NLS-1$
- for (Entry<String, DataTypeFactory> e : DataTypeRegistry.instance.entrySet()) {
- DataType dt = e.getValue().createDataType();
- if (dt instanceof EnumDataType || dt instanceof UndefinedDataType)
- continue;
- String dts = dt.getStringType();
-
- ItemDefinition itemDef = null;
- List<ItemDefinition> itemDefs = ModelUtil.getAllRootElements(defs, ItemDefinition.class);
- for (ItemDefinition id : itemDefs) {
- String ids = ModelUtil.getStringWrapperValue(id.getStructureRef());
- if (ids==null || ids.isEmpty())
- ids = id.getId();
- if (ids.equals(dts)) {
- itemDef = id;
- break;
- }
- }
- if (itemDef==null) {
- // create a new ItemDefinition for the jBPM data type
- itemDef = Bpmn2ModelerFactory.create(ItemDefinition.class);
- itemDef.setItemKind(ItemKind.INFORMATION);
- itemDef.setStructureRef(ModelUtil.createStringWrapper(dts));
- itemDef.setId("_"+dts); //$NON-NLS-1$
- if (defs!=null) {
- InsertionAdapter.add(defs, Bpmn2Package.eINSTANCE.getDefinitions_RootElements(), itemDef);
- }
- }
- choices.put(dt.getStringType(),itemDef);
- }
-
- // add all imported data types
+// Hashtable<String,Object> choices = new Hashtable<String,Object>();
+// Definitions definitions = ModelUtil.getDefinitions(object);
+//
+// // add all native types (as defined in the DataTypeRegistry)
+// DataTypeRegistry.getFactory("dummy"); //$NON-NLS-1$
+// for (Entry<String, DataTypeFactory> e : DataTypeRegistry.instance.entrySet()) {
+// DataType dt = e.getValue().createDataType();
+// if (dt instanceof EnumDataType || dt instanceof UndefinedDataType)
+// continue;
+// String dts = dt.getStringType();
+//
+// ItemDefinition itemDef = null;
+// List<ItemDefinition> itemDefs = ModelUtil.getAllRootElements(definitions, ItemDefinition.class);
+// for (ItemDefinition id : itemDefs) {
+// String ids = ModelUtil.getStringWrapperValue(id.getStructureRef());
+// if (ids==null || ids.isEmpty())
+// ids = id.getId();
+// if (ids.equals(dts)) {
+// itemDef = id;
+// break;
+// }
+// }
+// if (itemDef==null) {
+// // create a new ItemDefinition for the jBPM data type
+// itemDef = Bpmn2ModelerFactory.create(ItemDefinition.class);
+// itemDef.setItemKind(ItemKind.INFORMATION);
+// itemDef.setStructureRef(ModelUtil.createStringWrapper(dts));
+// itemDef.setId("_"+dts); //$NON-NLS-1$
+// if (definitions!=null) {
+// InsertionAdapter.add(definitions, Bpmn2Package.eINSTANCE.getDefinitions_RootElements(), itemDef);
+// }
+// }
+// choices.put(dt.getStringType(),itemDef);
+// }
+//
+// // add all imported data types
// EObject process = object;
// while (process!=null && !(process instanceof org.eclipse.bpmn2.Process))
// process = process.eContainer();
// if (process==null) {
-// List<Process> list = ModelUtil.getAllRootElements(defs, Process.class);
+// List<Process> list = ModelUtil.getAllRootElements(definitions, Process.class);
// if (list.size()>0)
// process = list.get(0);
// }
//
// String s;
-// List<ImportType> imports = ModelUtil.getAllExtensionAttributeValues(process, ImportType.class);
+// List<ImportType> imports = ModelDecorator.getAllExtensionAttributeValues(process, ImportType.class);
// for (ImportType it : imports) {
// s = it.getName();
// if (s!=null && !s.isEmpty())
@@ -320,17 +322,19 @@ public class JbpmModelUtil {
// }
//
// // add all Global variable types
-// List<GlobalType> globals = ModelUtil.getAllExtensionAttributeValues(process, GlobalType.class);
+// List<GlobalType> globals = ModelDecorator.getAllExtensionAttributeValues(process, GlobalType.class);
// for (GlobalType gt : globals) {
// s = gt.getType();
// if (s!=null && !s.isEmpty())
// choices.put(s, gt);
// }
-
- // add all ItemDefinitions
- choices.putAll( ItemDefinitionPropertiesAdapter.getChoiceOfValues(object) );
+//
+// // add all ItemDefinitions
+// choices.putAll( ItemDefinitionPropertiesAdapter.getChoiceOfValues(object) );
+//
+// return choices;
- return choices;
+ return ItemDefinitionPropertiesAdapter.getChoiceOfValues(object);
}
/**
@@ -355,7 +359,7 @@ public class JbpmModelUtil {
stringValue = ((ImportType)value).getName();
}
else if (value instanceof ItemDefinition) {
- stringValue = ModelUtil.getDisplayName((ItemDefinition)value);
+ stringValue = ExtendedPropertiesProvider.getTextValue((ItemDefinition)value);
}
return stringValue;
}
@@ -393,11 +397,11 @@ public class JbpmModelUtil {
public static ItemDefinition findOrCreateItemDefinition(EObject context, String structureRef) {
ItemDefinition itemDef = null;
- Definitions definitions = ModelUtil.getDefinitions(context);
- Resource resource = ModelUtil.getResource(context);
+ Resource resource = ObjectPropertyProvider.getResource(context);
+ Definitions definitions = ModelUtil.getDefinitions(resource);
List<ItemDefinition> itemDefs = ModelUtil.getAllRootElements(definitions, ItemDefinition.class);
for (ItemDefinition id : itemDefs) {
- String s = ModelUtil.getStringWrapperValue(id.getStructureRef());
+ String s = ModelUtil.getStringWrapperTextValue(id.getStructureRef());
if (s!=null && s.equals(structureRef)) {
itemDef = id;
break;
@@ -417,7 +421,7 @@ public class JbpmModelUtil {
public static BPSimDataType getBPSimData(EObject object) {
BPSimDataType processAnalysisData = null;
Relationship rel = null;
- Resource resource = ModelUtil.getResource(object);
+ Resource resource = ObjectPropertyProvider.getResource(object);
Definitions definitions = (Definitions) ModelUtil.getDefinitions(object);
List<Relationship> relationships = definitions.getRelationships();
if (relationships.size()==0) {
@@ -432,7 +436,7 @@ public class JbpmModelUtil {
rel = relationships.get(0);
}
- for (ExtensionAttributeValue v : ModelUtil.getExtensionAttributeValues(rel)) {
+ for (ExtensionAttributeValue v : ModelDecorator.getExtensionAttributeValues(rel)) {
for (org.eclipse.emf.ecore.util.FeatureMap.Entry entry : v.getValue()) {
if (entry.getValue() instanceof BPSimDataType) {
processAnalysisData = (BPSimDataType)entry.getValue();
@@ -442,7 +446,7 @@ public class JbpmModelUtil {
}
if (processAnalysisData==null) {
processAnalysisData = BpsimFactory.eINSTANCE.createBPSimDataType();
- ModelUtil.addExtensionAttributeValue(rel, BpsimPackage.eINSTANCE.getDocumentRoot_BPSimData(), processAnalysisData);
+ ModelDecorator.addExtensionAttributeValue(rel, BpsimPackage.eINSTANCE.getDocumentRoot_BPSimData(), processAnalysisData);
}
if (processAnalysisData.getScenario().size()==0) {
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/Messages.java
index 68183524..1dbf253b 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.util;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/messages.properties
index cc096de3..88300389 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/util/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
JbpmImportDialog_Create_Process_Variables_Label=Create Process Variables
JbpmInterfaceImportDialog_Available_Methods=Available Methods:
JbpmInterfaceImportDialog_Select_All=Select All
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/BusinessRuleTaskConstraint.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/BusinessRuleTaskConstraint.java
index db0e8c5c..db0e8c5c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/BusinessRuleTaskConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/BusinessRuleTaskConstraint.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/CallActivityConstraint.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/CallActivityConstraint.java
index 3fb5979c..3fb5979c 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/CallActivityConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/CallActivityConstraint.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/DroolsPackage.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/DroolsPackage.java
index 5ae470a7..5ae470a7 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/DroolsPackage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/DroolsPackage.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/GatewayConstraint.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/GatewayConstraint.java
index ff8d1cda..b83623af 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/GatewayConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/GatewayConstraint.java
@@ -41,7 +41,7 @@ public class GatewayConstraint extends AbstractModelConstraint {
if (sf.getExtensionValues() != null && sf.getExtensionValues().size() > 0) {
boolean foundProbability = false;
for (ExtensionAttributeValue extattrval : sf.getExtensionValues()) {
- FeatureMap extensionElements = extattrval.getValue();
+ Bpmn2FeatureMap extensionElements = extattrval.getValue();
@SuppressWarnings("unchecked")
List<MetadataType> metadataTypeExtensions = (List<MetadataType>) extensionElements.get(
DroolsPackage.Literals.DOCUMENT_ROOT__METADATA, true);
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/IDiagramProfile.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/IDiagramProfile.java
index b211e320..b211e320 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/IDiagramProfile.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/IDiagramProfile.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/Messages.java
index b962fcd6..010cb930 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.validation;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetadataType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetadataType.java
index 8f208f45..8f208f45 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetadataType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetadataType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetaentryType.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetaentryType.java
index 2d402004..2d402004 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetaentryType.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/MetaentryType.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessConstraint.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessConstraint.java
index 6724ea9e..6724ea9e 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessConstraint.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessVariableNameConstraint.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessVariableNameConstraint.java
index 820009fa..ca7c1fcf 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessVariableNameConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ProcessVariableNameConstraint.java
@@ -15,6 +15,7 @@ import org.eclipse.bpmn2.DataObject;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.Message;
import org.eclipse.bpmn2.Property;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.drools.GlobalType;
import org.eclipse.core.runtime.IStatus;
@@ -53,8 +54,8 @@ public class ProcessVariableNameConstraint extends AbstractModelConstraint {
if (id1.equals(id2)) {
String msg = NLS.bind(
Messages.ProcessVariableNameConstraint_Duplicate_ID,
- ModelUtil.getLabel(o1)+" "+ModelUtil.getDisplayName(o1), //$NON-NLS-1$
- ModelUtil.getLabel(o2)+" "+ModelUtil.getDisplayName(o2)); //$NON-NLS-1$
+ ExtendedPropertiesProvider.getLabel(o1)+" "+ExtendedPropertiesProvider.getTextValue(o1), //$NON-NLS-1$
+ ExtendedPropertiesProvider.getLabel(o2)+" "+ExtendedPropertiesProvider.getTextValue(o2)); //$NON-NLS-1$
return ctx.createFailureStatus(msg);
}
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java
index 6c20466d..6c20466d 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/ServletUtil.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/TaskConstraint.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/TaskConstraint.java
index 60227315..fd7fadb5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/TaskConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/TaskConstraint.java
@@ -38,7 +38,7 @@ public class TaskConstraint extends AbstractModelConstraint {
boolean foundRange = false;
boolean foundStandardDeviation = false;
for (ExtensionAttributeValue extattrval : ta.getExtensionValues()) {
- FeatureMap extensionElements = extattrval.getValue();
+ Bpmn2FeatureMap extensionElements = extattrval.getValue();
if (extensionElements == null) {
continue;
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/UserTaskConstraint.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/UserTaskConstraint.java
index b30a620f..e58c4059 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/UserTaskConstraint.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/UserTaskConstraint.java
@@ -79,7 +79,7 @@ public class UserTaskConstraint extends AbstractModelConstraint {
if (ut.getExtensionValues() != null && ut.getExtensionValues().size() > 0) {
boolean foundStaffAvailability = false;
for (ExtensionAttributeValue extattrval : ut.getExtensionValues()) {
- FeatureMap extensionElements = extattrval.getValue();
+ Bpmn2FeatureMap extensionElements = extattrval.getValue();
if (extensionElements!=null) {
@SuppressWarnings("unchecked")
List<MetadataType> metadataTypeExtensions = (List<MetadataType>) extensionElements.get(
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/messages.properties
index 9e79363e..72facc34 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/validation/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
BusinessRuleTaskConstraint_No_Ruleflow_Group=Business Rule Task has no ruleflow group
CallActivityConstraint_No_Called_Element=Reusable Subprocess has no called element specified.
CallActivityConstraint_No_Process=No existing process exists with ID {0}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDException.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDException.java
index ea82caf0..ea82caf0 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDException.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDException.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDHandler.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDHandler.java
index b1a1f0fe..1e8d01eb 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDHandler.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WIDHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
* All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -7,6 +7,8 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
+ *
+ * @author Brian Fitzpatrick
******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.wid;
@@ -15,7 +17,11 @@ import java.io.FileNotFoundException;
import java.util.Iterator;
import java.util.Map;
import java.util.Scanner;
+import java.util.Map.Entry;
+import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.datatype.DataType;
+import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.datatype.DataTypeFactory;
+import org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.drools.process.core.datatype.DataTypeRegistry;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
@@ -153,6 +159,10 @@ public class WIDHandler {
currentWid.setName(value);
} else if (name.equalsIgnoreCase("displayName")) { //$NON-NLS-1$
currentWid.setDispalyName(value);
+ } else if (name.equalsIgnoreCase("description")) { //$NON-NLS-1$
+ currentWid.setDescription(value);
+ } else if (name.equalsIgnoreCase("category")) { //$NON-NLS-1$
+ currentWid.setCategory(value);
} else if (name.equalsIgnoreCase("icon")) { //$NON-NLS-1$
currentWid.setIcon(value);
} else if (name.equalsIgnoreCase("customEditor")) { //$NON-NLS-1$
@@ -164,6 +174,13 @@ public class WIDHandler {
if (value.startsWith("new") && value.indexOf("(")>0) { //$NON-NLS-1$ //$NON-NLS-2$
int index = value.indexOf("("); //$NON-NLS-1$
value = value.substring(3,index).trim();
+ // look up the DataType in the registry and replace the DataType
+ // name with its Java type equivalent name
+ DataTypeFactory dtf = DataTypeRegistry.getFactory(value);
+ if (dtf!=null) {
+ DataType dt = dtf.createDataType();
+ value = dt.getStringType();
+ }
}
if (current == Section.PARAMETERS)
currentWid.getParameters().put(name, value);
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinition.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinition.java
index 13300965..aa88ecb1 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinition.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinition.java
@@ -24,11 +24,15 @@ public interface WorkItemDefinition {
public String getName();
public void setName ( String name );
public String getDisplayName();
+ public String getDescription();
+ public String getCategory();
public String getCustomEditor();
public String getEclipseCustomEditor();
public void setCustomEditor ( String editor );
public void setEclipseCustomEditor ( String editor );
public void setDispalyName ( String displayName );
+ public void setDescription ( String description );
+ public void setCategory ( String category );
public String getIcon();
public void setIcon ( String iconPath );
public LinkedHashMap<String, String> getParameters();
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinitionImpl.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinitionImpl.java
index ead9eafe..f396c76a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinitionImpl.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wid/WorkItemDefinitionImpl.java
@@ -24,6 +24,7 @@ public class WorkItemDefinitionImpl implements WorkItemDefinition {
public String toString() {
return "WorkItemDefinitionImpl [widName=" + widName //$NON-NLS-1$
+ ", widDisplayName=" + widDisplayName //$NON-NLS-1$
+ + ", widCategory=" + widCategory //$NON-NLS-1$
+ ", widIcon=" + widIcon //$NON-NLS-1$
+ ", widCustomEditor=" + widCustomEditor //$NON-NLS-1$
+ ", widEclipseCustomEditor=" + widEclipseCustomEditor //$NON-NLS-1$
@@ -34,6 +35,8 @@ public class WorkItemDefinitionImpl implements WorkItemDefinition {
private String widName;
private String widDisplayName;
+ private String widDescription;
+ private String widCategory;
private String widIcon;
private String widCustomEditor;
private String widEclipseCustomEditor;
@@ -52,6 +55,16 @@ public class WorkItemDefinitionImpl implements WorkItemDefinition {
}
@Override
+ public String getDescription() {
+ return widDescription;
+ }
+
+ @Override
+ public String getCategory() {
+ return widCategory;
+ }
+
+ @Override
public String getIcon() {
return this.widIcon;
}
@@ -82,6 +95,16 @@ public class WorkItemDefinitionImpl implements WorkItemDefinition {
}
@Override
+ public void setDescription(String description) {
+ this.widDescription = description;
+ }
+
+ @Override
+ public void setCategory(String category) {
+ this.widCategory = category;
+ }
+
+ @Override
public void setIcon(String iconPath) {
this.widIcon = iconPath;
}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/Messages.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/Messages.java
index a90b1139..07046815 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.wizards;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizard.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizard.java
index 4e025c27..4e025c27 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizard.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizard.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizardPage1.java b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizardPage1.java
index c3453d3f..c3453d3f 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizardPage1.java
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/NewJbpmProcessWizardPage1.java
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/messages.properties b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/messages.properties
index d5c7b4cf..6ed480c5 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/src/org/eclipse/bpmn2/modeler/runtime/jboss/jbpm5/wizards/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
NewJbpmProcessWizard_Configuring_Project_Message=Configuring project for jBPM Runtime...
NewJbpmProcessWizard_Error_No_Container=Container "{0}" does not exist.
NewJbpmProcessWizard_Error_Title=Error
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.classpath b/plugins/org.eclipse.bpmn2.modeler.ui/.classpath
index 121e527a..ad32c83a 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/.classpath
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/.gitignore b/plugins/org.eclipse.bpmn2.modeler.ui/.gitignore
new file mode 100644
index 00000000..c438aa30
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/.gitignore
@@ -0,0 +1,2 @@
+cache/
+doc/
diff --git a/org.eclipse.bpmn2.modeler.ui/.options b/plugins/org.eclipse.bpmn2.modeler.ui/.options
index 6575425b..6575425b 100644
--- a/org.eclipse.bpmn2.modeler.ui/.options
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/.options
diff --git a/org.eclipse.bpmn2.modeler.ui/.project b/plugins/org.eclipse.bpmn2.modeler.ui/.project
index 244bb622..244bb622 100644
--- a/org.eclipse.bpmn2.modeler.ui/.project
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/.project
diff --git a/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF
index 35ee3948..0613e46b 100644
--- a/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpmn2.modeler.ui;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.bpmn2.modeler.ui.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/about.html b/plugins/org.eclipse.bpmn2.modeler.ui/about.html
new file mode 100644
index 00000000..3408ea2e
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/about.html
@@ -0,0 +1,26 @@
+<!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, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/build.properties b/plugins/org.eclipse.bpmn2.modeler.ui/build.properties
index c8de4ff4..f299d27c 100644
--- a/org.eclipse.bpmn2.modeler.ui/build.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/build.properties
@@ -17,4 +17,6 @@ bin.includes = META-INF/,\
about.html,\
plugin.properties,\
.options
-src.includes = icons/bpmn2_editor_16.png
+src.includes = doc/,\
+ schema/,\
+ src/
diff --git a/org.eclipse.bpmn2.modeler.wsil/epl-v10.html b/plugins/org.eclipse.bpmn2.modeler.ui/epl-v10.html
index 91531ed4..91531ed4 100644
--- a/org.eclipse.bpmn2.modeler.wsil/epl-v10.html
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/epl-v10.html
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/AdHocSubProcess.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/AdHocSubProcess.png
index 819a487d..819a487d 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/AdHocSubProcess.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/AdHocSubProcess.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Association.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Association.png
index 411c534b..411c534b 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Association.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Association.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNDiagram.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNDiagram.png
index 1fd02fcd..1fd02fcd 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNDiagram.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNDiagram.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNEdge.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNEdge.png
index 83232a9a..83232a9a 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNEdge.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNEdge.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNLabel.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNLabel.png
new file mode 100644
index 00000000..fc549691
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNLabel.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNShape.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNShape.png
index 4f219082..4f219082 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNShape.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNShape.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNSubDiagram.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNSubDiagram.png
index 4c4d6961..4c4d6961 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNSubDiagram.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BPMNSubDiagram.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/BoundaryEvent.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BoundaryEvent.png
index 161c682d..161c682d 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/BoundaryEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BoundaryEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/BusinessRuleTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BusinessRuleTask.png
index c5f12302..c5f12302 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/BusinessRuleTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/BusinessRuleTask.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.png
new file mode 100644
index 00000000..a6233fae
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallActivity.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallChoreography.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallChoreography.png
new file mode 100644
index 00000000..ccddb65b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallChoreography.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallConversation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallConversation.png
new file mode 100644
index 00000000..5257f7c6
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallConversation.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalBusinessRuleTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalBusinessRuleTask.png
new file mode 100644
index 00000000..e5011456
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalBusinessRuleTask.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalManualTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalManualTask.png
new file mode 100644
index 00000000..0c508a80
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalManualTask.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalScriptTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalScriptTask.png
new file mode 100644
index 00000000..86966458
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalScriptTask.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalTask.png
new file mode 100644
index 00000000..658dfb3c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalTask.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalUserTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalUserTask.png
new file mode 100644
index 00000000..40b96bb0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CallGlobalUserTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/CancelEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CancelEventDefinition.png
index 8e2fc911..8e2fc911 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/CancelEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CancelEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Category.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Category.png
index 818601d5..818601d5 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Category.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Category.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Choreography.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Choreography.png
index 327fce03..327fce03 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Choreography.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Choreography.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ChoreographyTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ChoreographyTask.png
index 7aad3458..7aad3458 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ChoreographyTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ChoreographyTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Collaboration.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Collaboration.png
index a502bff2..a502bff2 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Collaboration.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Collaboration.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/CompensateEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CompensateEventDefinition.png
index da7d3f85..da7d3f85 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/CompensateEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CompensateEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ComplexGateway.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ComplexGateway.png
index 6940fa7f..6940fa7f 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ComplexGateway.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ComplexGateway.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ConditionalEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ConditionalEventDefinition.png
index 16c471ef..16c471ef 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ConditionalEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ConditionalEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Conversation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Conversation.png
index 5fdee901..5fdee901 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Conversation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Conversation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ConversationLink.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ConversationLink.png
index 5c798c75..5c798c75 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ConversationLink.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ConversationLink.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/CustomTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CustomTask.png
index 4ab63692..4ab63692 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/CustomTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/CustomTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataAssociation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataAssociation.png
index 8eac8b29..8eac8b29 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataAssociation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataAssociation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataInput.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataInput.png
index e4f44fd3..e4f44fd3 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataInput.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataInput.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataInputAssociation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataInputAssociation.png
index 7565c7a5..7565c7a5 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataInputAssociation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataInputAssociation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataObject.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataObject.png
index eb40567c..eb40567c 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataObject.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataObject.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataObjectReference.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataObjectReference.png
index eb40567c..eb40567c 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataObjectReference.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataObjectReference.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutput.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutput.png
index c30f93b2..c30f93b2 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutput.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutput.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutputAssociation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutputAssociation.png
index 1bcf69c9..1bcf69c9 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutputAssociation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataOutputAssociation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataStore.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataStore.png
index 9149be60..9149be60 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataStore.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataStore.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/DataStoreReference.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataStoreReference.png
index 9149be60..9149be60 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/DataStoreReference.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/DataStoreReference.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/EndEvent.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EndEvent.png
index 852ba49c..852ba49c 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/EndEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EndEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Error.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Error.png
index 20ea30e6..20ea30e6 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Error.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Error.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ErrorEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ErrorEventDefinition.png
index 20ea30e6..20ea30e6 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ErrorEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ErrorEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Escalation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Escalation.png
index cb3d16b2..cb3d16b2 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Escalation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Escalation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/EscalationEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EscalationEventDefinition.png
index cb3d16b2..cb3d16b2 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/EscalationEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EscalationEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/EventBasedGateway.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EventBasedGateway.png
index b90f4e24..b90f4e24 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/EventBasedGateway.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/EventBasedGateway.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ExclusiveGateway.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ExclusiveGateway.png
index 11c9dfcf..11c9dfcf 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ExclusiveGateway.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ExclusiveGateway.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalBusinessRuleTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalBusinessRuleTask.png
index 70ad835f..70ad835f 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalBusinessRuleTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalBusinessRuleTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalManualTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalManualTask.png
index cfa6193a..cfa6193a 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalManualTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalManualTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalScriptTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalScriptTask.png
index 03f8e9c8..03f8e9c8 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalScriptTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalScriptTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalUserTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalUserTask.png
index c97bfe86..c97bfe86 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalUserTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/GlobalUserTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Group.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Group.png
index 6f975ace..6f975ace 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Group.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Group.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/InMessage.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/InMessage.png
index 7aa77fe2..7aa77fe2 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/InMessage.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/InMessage.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/InclusiveGateway.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/InclusiveGateway.png
index 6b47c05f..6b47c05f 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/InclusiveGateway.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/InclusiveGateway.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Interface.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Interface.png
index 65124b56..65124b56 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Interface.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Interface.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateCatchEvent.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateCatchEvent.png
index 3868f350..3868f350 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateCatchEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateCatchEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateThrowEvent.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateThrowEvent.png
index 7ce8b341..7ce8b341 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateThrowEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/IntermediateThrowEvent.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ItemDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ItemDefinition.png
index 67d96abb..67d96abb 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ItemDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ItemDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Lane.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Lane.png
index d37d5fd4..d37d5fd4 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Lane.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Lane.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/LinkEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/LinkEventDefinition.png
index 16448df8..16448df8 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/LinkEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/LinkEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ManualTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ManualTask.png
index 16c56155..16c56155 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ManualTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ManualTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Message.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Message.png
index fe21e714..fe21e714 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Message.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Message.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/MessageEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/MessageEventDefinition.png
index b2aec346..b2aec346 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/MessageEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/MessageEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/MessageFlow.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/MessageFlow.png
index 366d9a61..366d9a61 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/MessageFlow.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/MessageFlow.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Operation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Operation.png
index 68a23dfb..68a23dfb 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Operation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Operation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/OutMessage.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/OutMessage.png
index 79c3e93e..79c3e93e 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/OutMessage.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/OutMessage.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ParallelGateway.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ParallelGateway.png
index c0e4d275..c0e4d275 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ParallelGateway.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ParallelGateway.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Participant.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Participant.png
index 069cd109..069cd109 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Participant.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Participant.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ParticipantBand.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ParticipantBand.png
index c4493b97..c4493b97 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ParticipantBand.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ParticipantBand.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerEntity.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerEntity.png
index 7e43a25a..7e43a25a 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerEntity.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerEntity.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerRole.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerRole.png
index e517ad2a..e517ad2a 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerRole.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/PartnerRole.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Process.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Process.png
index a6b50368..a6b50368 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Process.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Process.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ReceiveTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ReceiveTask.png
index d6afd7df..d6afd7df 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ReceiveTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ReceiveTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Resource.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Resource.png
index 9da70ceb..9da70ceb 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Resource.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Resource.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ScriptTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ScriptTask.png
index 85d6ee3d..85d6ee3d 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ScriptTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ScriptTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/SendTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SendTask.png
index e13dddcf..e13dddcf 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/SendTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SendTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/SequenceFlow.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SequenceFlow.png
index f800a157..f800a157 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/SequenceFlow.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SequenceFlow.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/ServiceTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ServiceTask.png
index ca24c3ce..ca24c3ce 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/ServiceTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/ServiceTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Signal.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Signal.png
index b101d6d9..b101d6d9 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Signal.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Signal.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/SignalEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SignalEventDefinition.png
index b101d6d9..b101d6d9 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/SignalEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SignalEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/StartEvent.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/StartEvent.png
index e3e262c8..e3e262c8 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/StartEvent.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/StartEvent.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubChoreography.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubChoreography.png
new file mode 100644
index 00000000..caeed78b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubChoreography.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubConversation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubConversation.png
new file mode 100644
index 00000000..c15d00a2
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubConversation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/SubProcess.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubProcess.png
index eb6239ea..eb6239ea 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/SubProcess.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/SubProcess.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/Task.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Task.png
index 9640688e..9640688e 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/Task.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Task.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/TerminateEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TerminateEventDefinition.png
index 8b17e59b..8b17e59b 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/TerminateEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TerminateEventDefinition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/TextAnnotation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TextAnnotation.png
index 2f440519..2f440519 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/TextAnnotation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TextAnnotation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/TimerEventDefinition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TimerEventDefinition.png
index 4221d38f..4221d38f 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/TimerEventDefinition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/TimerEventDefinition.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.png
new file mode 100644
index 00000000..791f6193
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/Transaction.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/UserTask.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/UserTask.png
index 2fa87888..2fa87888 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/UserTask.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/UserTask.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/action.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/action.gif
index f3e64758..f3e64758 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/action.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/action.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/addmessage.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/addmessage.png
index 13daa3d5..13daa3d5 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/addmessage.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/addmessage.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/addparticipant.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/addparticipant.png
index 24f886fe..24f886fe 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/addparticipant.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/addparticipant.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/blackbox.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/blackbox.png
index da26a8eb..da26a8eb 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/blackbox.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/blackbox.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/close.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/close.png
index f27249f1..f27249f1 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/close.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/close.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/collapse.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/collapse.png
index a54ded95..a54ded95 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/collapse.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/collapse.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/configure.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/configure.png
index 8b4ab371..8b4ab371 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/configure.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/configure.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/disabled.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/disabled.png
index 24bc7d57..24bc7d57 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/disabled.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/disabled.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/expand.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/expand.png
index 02589237..02589237 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/expand.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/expand.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/folder.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/folder.png
index 4728cc93..4728cc93 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/folder.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/folder.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/folder_disabled.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/folder_disabled.png
index aded6ae9..aded6ae9 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/folder_disabled.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/folder_disabled.png
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/info.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/info.png
new file mode 100644
index 00000000..eff9e5af
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/info.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/morph.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/morph.png
index a6bc77ca..a6bc77ca 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/morph.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/morph.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/properties.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/properties.png
index 468bc6ac..468bc6ac 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/properties.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/properties.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/pullup.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/pullup.png
index c6ef26e5..c6ef26e5 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/pullup.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/pullup.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/pushdown.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/pushdown.png
index de94fa0d..de94fa0d 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/pushdown.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/pushdown.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/removemessage.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/removemessage.png
index 628bf2f5..628bf2f5 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/removemessage.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/removemessage.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/rotate.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/rotate.png
index d408140e..d408140e 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/rotate.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/rotate.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/16/whitebox.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/whitebox.png
index d299fddf..d299fddf 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/16/whitebox.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/16/whitebox.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/20/BusinessModel.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/BusinessModel.png
index 3bd94f08..3bd94f08 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/20/BusinessModel.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/BusinessModel.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/20/Condition.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Condition.png
index 3c48f49e..3c48f49e 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/20/Condition.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Condition.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/20/InterchangeModel.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/InterchangeModel.png
index cfdc1b98..cfdc1b98 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/20/InterchangeModel.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/InterchangeModel.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/20/Multiple.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Multiple.png
index 41d00225..41d00225 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/20/Multiple.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Multiple.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/20/Thumbnail.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Thumbnail.png
index 1d472246..1d472246 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/20/Thumbnail.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Thumbnail.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/20/Timer.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Timer.png
index 7e1b21bf..7e1b21bf 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/20/Timer.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/20/Timer.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/bpmn2_editor_16.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/bpmn2_editor_16.png
index 3a990af4..3a990af4 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/bpmn2_editor_16.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/bpmn2_editor_16.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDAttributeDeclaration.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDAttributeDeclaration.gif
index e65b1ed8..e65b1ed8 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDAttributeDeclaration.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDAttributeDeclaration.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDComplexTypeDefinition.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDComplexTypeDefinition.gif
index 358cbcb8..358cbcb8 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDComplexTypeDefinition.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDComplexTypeDefinition.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDElementDeclaration.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDElementDeclaration.gif
index dd45f08f..dd45f08f 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDElementDeclaration.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDElementDeclaration.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDSimpleTypeDefinition.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDSimpleTypeDefinition.gif
index 75f33c24..75f33c24 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDSimpleTypeDefinition.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/XSDSimpleTypeDefinition.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2error.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2error.png
index deba876c..deba876c 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2error.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2error.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2input.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2input.png
index c98588aa..c98588aa 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2input.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2input.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2interface.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2interface.png
index 9ac85c39..9ac85c39 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2interface.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2interface.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2operation.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2operation.png
index 9352ad24..9352ad24 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2operation.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2operation.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2output.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2output.png
index ecc851ba..ecc851ba 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2output.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2output.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2process.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2process.png
index 698cb6c1..698cb6c1 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2process.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/bpmn2process.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-checked.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-checked.png
index bb838661..bb838661 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-checked.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-checked.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-unchecked.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-unchecked.png
index 95791f61..95791f61 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-unchecked.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/checkbox-unchecked.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/input.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/input.gif
index fe6b3498..fe6b3498 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/input.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/input.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaClass.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaClass.png
index 139db18b..139db18b 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaClass.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaClass.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaInterface.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaInterface.png
index f352c9c0..f352c9c0 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaInterface.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaInterface.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicField.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicField.png
index e302d7e1..e302d7e1 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicField.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicField.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicMethod.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicMethod.png
index b95cdb92..b95cdb92 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicMethod.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/javaPublicMethod.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/message.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/message.gif
index 9ad7599b..9ad7599b 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/message.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/message.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/message_part.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/message_part.gif
index 0c90c65e..0c90c65e 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/message_part.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/message_part.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/operation.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/operation.gif
index 0afe38fb..0afe38fb 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/operation.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/operation.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/output.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/output.gif
index bd0918ce..bd0918ce 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/output.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/output.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/throw.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/throw.gif
index 13db66e3..13db66e3 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/throw.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/throw.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj16/wsdl_port_type.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/wsdl_port_type.gif
index ab9ff0ba..ab9ff0ba 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj16/wsdl_port_type.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj16/wsdl_port_type.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj20/message.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/message.png
index 9c75994a..9c75994a 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj20/message.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/message.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj20/message_part.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/message_part.png
index 149de33b..149de33b 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj20/message_part.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/message_part.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj20/throw.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/throw.png
index 996fbab2..996fbab2 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj20/throw.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/throw.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/obj20/wsdl_port_type.png b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/wsdl_port_type.png
index 1b72cc23..1b72cc23 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/obj20/wsdl_port_type.png
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/obj20/wsdl_port_type.png
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography-pushed.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography-pushed.gif
index 61e96273..61e96273 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography-pushed.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography-pushed.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography.gif
index 2e62d801..2e62d801 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/choreography.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration-pushed.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration-pushed.gif
index 72163042..72163042 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration-pushed.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration-pushed.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration.gif
index 13252a22..13252a22 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/collaboration.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/wizards/process-pushed.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/process-pushed.gif
index fa3d2c52..fa3d2c52 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/wizards/process-pushed.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/process-pushed.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.ui/icons/wizards/process.gif b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/process.gif
index 73515757..73515757 100644
--- a/org.eclipse.bpmn2.modeler.ui/icons/wizards/process.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/icons/wizards/process.gif
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/license.html b/plugins/org.eclipse.bpmn2.modeler.ui/license.html
new file mode 100644
index 00000000..6e579a58
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ 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, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.ui/plugin-old.xml
index 46a57f3a..42154376 100644
--- a/org.eclipse.bpmn2.modeler.ui/plugin.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/plugin-old.xml
@@ -11,12 +11,6 @@
</extension>
<extension point="org.eclipse.ui.editors">
- <!--
- The multipage editor is still experimental.
- To quickly revert back to the original, single page editor
- simply replace the editor class with this:
- class="org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor"
- -->
<editor
class="org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor"
contributorClass="org.eclipse.graphiti.ui.editor.DiagramEditorActionBarContributor"
@@ -39,7 +33,7 @@
file-extensions="bpmn,bpmn2,bpmn20,xml"
priority="high">
<describer
- class="org.eclipse.bpmn2.modeler.ui.BPMN2ContentDescriber"
+ class="org.eclipse.bpmn2.modeler.ui.Bpmn2ContentDescriber"
plugin="org.eclipse.bpmn2.modeler.ui">
</describer>
</content-type>
@@ -125,7 +119,7 @@
<extension point="org.eclipse.graphiti.ui.diagramTypeProviders">
<diagramTypeProvider
- class="org.eclipse.bpmn2.modeler.ui.diagram.MainBPMNDiagramTypeProvider"
+ class="org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2DiagramTypeProvider"
description="This is the editor for the BPMN2 diagram"
id="org.eclipse.bpmn2.modeler.ui.diagram.MainBPMNDiagramType" name="BPMN2 Editor">
<diagramType
@@ -154,19 +148,31 @@
uri="http://www.omg.org/spec/BPMN/20100524/MODEL-XMI"
resourceFactory="org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceFactoryImpl">
</model>
-
+
<!-- ======================================== -->
- <!-- ========= Default EndPoint Ext ========= -->
+ <!-- =========== Model Extensions ========== -->
<!-- ======================================== -->
+ <dataType name="EColor" class="org.eclipse.bpmn2.modeler.ui.property.EColorConversionDelegate"/>
+ <dataType name="EFont" class="org.eclipse.bpmn2.modeler.ui.property.EFontConversionDelegate"/>
+
<modelExtension
- id="org.eclipse.bpmn2.modeler.runtime.none.modelExtension.endpoint"
- runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
- name="Default EndPoint Extension"
- type="EndPoint">
- <property name="serviceAddress" type="EString"/>
+ id="org.eclipse.bpmn2.modeler.runtime.none.modelExtension.appearance.BaseElement"
+ uri="http://org.eclipse.bpmn2/ext"
+ name="BaseElement Appearance"
+ type="BaseElement">
+ <property name="style" type="ShapeStyle" label="%appearance">
+ <value>
+ <property name="shapeForeground" type="EColor" label="%border.color" />
+ <property name="shapeBackground" type="EColor" label="%fill.color" />
+ <property name="labelForeground" type="EColor" label="%label.color" />
+ <property name="labelFont" type="EFont" label="%label.font" />
+ <property name="labelPosition" type="LabelPosition:EEnum" value="%label.position.values" label="%label.position" />
+ <property name="routingStyle" type="RoutingStyle:EEnum" value="%routing.style.values" label="%routing.style" />
+ </value>
+ </property>
</modelExtension>
-
+
<!-- ======================================== -->
<!-- ============ Property Tabs ============ -->
<!-- ======================================== -->
@@ -174,8 +180,9 @@
<propertyTab
id="org.eclipse.bpmn2.modeler.description.tab"
class="org.eclipse.bpmn2.modeler.ui.property.DescriptionPropertySection"
+ image="icons/20/Thumbnail.png"
popup="true"
- label="%propertyTab.label">
+ label="%propertyTab.label.General">
</propertyTab>
<!-- ============ Diagrams ============ -->
@@ -726,7 +733,7 @@
<category id="org.bpmn2.modeler.toolpalette.default.categories"/>
<category id="org.bpmn2.modeler.toolpalette.process.patterns" name="%category.name">
- <tool name="%tool.name" id="org.bpmn2.modeler.tool.arbitrary.cycles" description="%tool.description">
+ <tool name="%tool.name" id="org.bpmn2.modeler.tool.arbitrary.cycles" description="%arbitrary.cycles.description">
<object type="Task[$name='Task A']" id="arbitrary.cycles.taskA" optional="true"/>
<object type="Task[$name='Task B',x=200]" id="arbitrary.cycles.taskB"/>
<object type="Task[$name='Task C',x=200,y=100]" id="arbitrary.cycles.taskC"/>
@@ -753,7 +760,7 @@
<object type="SequenceFlow[source='arbitrary.cycles.xor5',target='arbitrary.cycles.taskG']"/>
<object type="SequenceFlow[source='arbitrary.cycles.xor5',target='arbitrary.cycles.xor2']" />
</tool>
-
+
<tool name="%tool.name.0" id="org.bpmn2.modeler.tool.deferred.choice">
<object type="Task[$name='Task A',y=50]" id="deferred.choice.taskA" optional="true"/>
<object type="Task[$name='Task B',x=300]" id="deferred.choice.taskB"/>
@@ -966,6 +973,7 @@
<enable object="MultiInstanceLoopCharacteristics"/>
<enable object="Lane"/>
<enable object="LaneSet"/>
+ <enable object="Participant"/>
<enable object="Resource"/>
<enable object="ResourceAssignmentExpression"/>
<enable object="ResourceParameter"/>
@@ -991,7 +999,8 @@
<enable object="Assignment"/>
<enable object="FormalExpression"/>
<disable object="FormalExpression" feature="evaluatesToTypeRef"/>
-<!-- <enable object="EndPoint" feature="serviceAddress"/> -->
+ <enable object="EndPoint"/>
+ <enable object="Documentation"/>
</modelEnablement>
<modelEnablement
@@ -1131,7 +1140,40 @@
<style object="TextAnnotation" foreground="546778" background="D4E7F8" textColor="546778" font="arial,10,-,-"/>
<style object="Transaction" foreground="546778" background="D4E7F8" textColor="546778" font="arial,10,-,-"/>
<style object="UserTask" foreground="546778" background="D4E7F8" textColor="546778" font="arial,10,-,-"/>
+ <style object="CANVAS" background="FFFFFF"/>
+ <style object="GRID" foreground="E3EEF9"/>
+
+ <typeLanguage name="XSD Schema" uri="http://www.w3.org/2001/XMLSchema" prefix="xs">
+ <type name="string"/>
+ <type name="date"/>
+ <type name="byte"/>
+ <type name="decimal"/>
+ <type name="int"/>
+ <type name="integer"/>
+ <type name="long"/>
+ <type name="short"/>
+ <type name="boolean"/>
+ </typeLanguage>
+
+ <typeLanguage name="Java Types" uri="http://www.java.com/javaTypes" prefix="java">
+ <type name="Boolean" qname="java.lang.Boolean"/>
+ <type name="Byte" qname="java.lang.Byte"/>
+ <type name="Character" qname="java.lang.Character"/>
+ <type name="Float" qname="java.lang.Float"/>
+ <type name="Integer" qname="java.lang.Integer"/>
+ <type name="Long" qname="java.lang.Long"/>
+ <type name="Short" qname="java.lang.Short"/>
+ <type name="Double" qname="java.lang.Double"/>
+ <type name="String" qname="java.lang.String"/>
+ <type name="Object" qname="java.lang.Object"/>
+ </typeLanguage>
+
+ <expressionLanguage name="XPath" uri="http://www.w3.org/1999/XPath"/>
+ <expressionLanguage name="Java" uri="http://www.java.com/java"/>
+ <serviceImplementation name="Web Service" uri="##WebService"/>
+ <serviceImplementation name="Unspecified" uri="##unspecified"/>
+
</extension>
<!-- menu commands -->
diff --git a/org.eclipse.bpmn2.modeler.ui/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
index 08eba8fc..bd8f94f7 100644
--- a/org.eclipse.bpmn2.modeler.ui/plugin.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.properties
@@ -9,7 +9,7 @@
# Red Hat, Inc. - initial API and implementation
###############################################################################
pluginName = BPMN2 Modeler UI
-providerName = Eclipse.org
+providerName = Eclipse SOA
# Preference Page titles
PREFERENCE_PAGE_EDITOR=Editor
@@ -27,11 +27,11 @@ extension.name = Bpmn2DiagramEditorInputFactory
page.name = BPMN2
runtime.description = Default runtime definition
runtime.name = None
-propertyTab.label = Description
-propertyTab.label.0 = Process
-propertyTab.label.1 = Definitions
-propertyTab.label.2 = Assocation
-propertyTab.label.3 = Data Assocation
+propertyTab.label.General = General
+propertyTab.label.Process = Process
+propertyTab.label.Definitions = Definitions
+propertyTab.label.2 = Association
+propertyTab.label.3 = Data Association
propertyTab.label.4 = Sequence Flow
propertyTab.label.5 = Message Flow
propertyTab.label.6 = Call Activity
@@ -60,7 +60,6 @@ propertyTab.label.28 = Conditional Event
propertyTab.label.29 = Compensate Event
propertyTab.label.30 = Error Event
propertyTab.label.31 = Escalation Event
-propertyTab.label.32 = Error Event
propertyTab.label.33 = Link Event
propertyTab.label.34 = Message Event
propertyTab.label.35 = Signal Event
@@ -91,7 +90,7 @@ propertyTab.label.59 = Category
propertyTab.label.60 = Participant
category.name = Workflow Patterns
-tool.description = Arbitrary Cycles Pattern
+arbitrary.cycles.description = Arbitrary Cycles Pattern
tool.name = Arbitrary Cycles
tool.name.0 = Deferred Choice
tool.name.1 = Exclusive Choice
@@ -110,4 +109,14 @@ menu.label = Diagram
command.label = Create Process Diagram
command.label.0 = Create Choreography Diagram
command.label.1 = Create Collaboration Diagram
-extension-point.name = BPMN2 Modeler UI contributions \ No newline at end of file
+extension-point.name = BPMN2 Modeler UI contributions
+
+appearance = Appearance
+border.color = Line Color
+fill.color = Fill Color
+label.color = Label Color
+label.font = Label Font
+label.position = Label Position
+label.position.values = Below Figure,Above Figure,Left of Figure,Right of Figure,Top Inside Figure,Center of Figure,Bottom Inside Figure,Left Inside Figure,Right Inside Figure,Movable
+routing.style = Routing Style
+routing.style.values = Direct Automatic Manhattan
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml
new file mode 100644
index 00000000..7bf3bbdd
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/plugin.xml
@@ -0,0 +1,1395 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.bpmn2.modeler.ui" name="%extension-point.name" schema="schema/org.eclipse.bpmn2.modeler.ui.exsd"/>
+ <extension point="org.eclipse.ui.newWizards">
+ <!-- <primaryWizard id="org.eclipse.bpmn2.modeler.ui.diagram"> </primaryWizard> -->
+ <wizard category="org.eclipse.bpmn2.wizardCategory"
+ class="org.eclipse.bpmn2.modeler.ui.wizards.BPMN2DiagramWizard" icon="icons/bpmn2_editor_16.png"
+ id="org.eclipse.bpmn2.modeler.ui.diagram" name="%wizard.name">
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor"
+ contributorClass="org.eclipse.graphiti.ui.editor.DiagramEditorActionBarContributor"
+ default="true"
+ extensions="bpmn,bpmn2"
+ icon="icons/bpmn2_editor_16.png"
+ id="org.eclipse.bpmn2.modeler.ui.bpmn2editor"
+ name="%editor.name"
+ matchingStrategy="org.eclipse.bpmn2.modeler.ui.editor.BPMN2EditorMatchingStrategy">
+ <contentTypeBinding contentTypeId="org.eclipse.bpmn2.content-type.xml">
+ </contentTypeBinding>
+ </editor>
+ </extension>
+
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.core.runtime.xml"
+ id="org.eclipse.bpmn2.content-type.xml"
+ name="%content-type.name"
+ file-extensions="bpmn,bpmn2,bpmn20,xml"
+ priority="high">
+ <describer
+ class="org.eclipse.bpmn2.modeler.ui.Bpmn2ContentDescriber"
+ plugin="org.eclipse.bpmn2.modeler.ui">
+ </describer>
+ </content-type>
+ <file-association
+ content-type="org.eclipse.bpmn2.content-type.xml"
+ file-extensions="bpmn,bpmn2">
+ </file-association>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.elementFactories"
+ id=".Bpmn2DiagramEditorInputFactory"
+ name="%extension.name">
+ <factory
+ class="org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInputFactory"
+ id= "org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInputFactory"/>
+ </extension>
+
+ <!-- Preference Pages -->
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.bpmn2.modeler.ui.preferences.Bpmn2HomePreferencePage"
+ id="org.eclipse.bpmn2.modeler.BPMN2"
+ name="%PREFERENCE_PAGE_HOME"/>
+ <page
+ category="org.eclipse.bpmn2.modeler.BPMN2"
+ class="org.eclipse.bpmn2.modeler.ui.preferences.Bpmn2EditorPreferencePage"
+ id="org.eclipse.bpmn2.modeler.Editor"
+ name="%PREFERENCE_PAGE_EDITOR"/>
+
+ <page
+ category="org.eclipse.bpmn2.modeler.BPMN2/org.eclipse.bpmn2.modeler.Editor"
+ class="org.eclipse.bpmn2.modeler.ui.preferences.Bpmn2EditorAppearancePreferencePage"
+ id="org.eclipse.bpmn2.modeler.Appearance"
+ name="%PREFERENCE_PAGE_APPEARANCE"/>
+ <page
+ category="org.eclipse.bpmn2.modeler.BPMN2/org.eclipse.bpmn2.modeler.Editor"
+ class="org.eclipse.bpmn2.modeler.ui.preferences.Bpmn2EditorBehaviorPreferencePage"
+ id="org.eclipse.bpmn2.modeler.Behavior"
+ name="%PREFERENCE_PAGE_BEHAVIOR"/>
+ <page
+ category="org.eclipse.bpmn2.modeler.BPMN2/org.eclipse.bpmn2.modeler.Editor"
+ class="org.eclipse.bpmn2.modeler.ui.preferences.ToolProfilesPreferencePage"
+ id="org.eclipse.bpmn2.modeler.Profiles"
+ name="%PREFERENCE_PAGE_PROFILES"/>
+ </extension>
+
+ <!-- Property Pages - these per-project settings override the global preferences (above)-->
+
+ <extension point="org.eclipse.ui.propertyPages">
+ <page class="org.eclipse.bpmn2.modeler.ui.preferences.Bpmn2PropertyPage"
+ id="org.eclipse.bpmn2.modeler.ui" name="%page.name">
+ <enabledWhen>
+ <or>
+ <!-- TODO: do we need a java project? <adapt type="org.eclipse.core.resources.IProject">
+ <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.jdt.core.javanature">
+ </test> </adapt> -->
+ <adapt type="org.eclipse.core.resources.IProject">
+ </adapt>
+ </or>
+ </enabledWhen>
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="org.eclipse.bpmn2.modeler.ui.PropertyContributor"
+ labelProvider="org.eclipse.bpmn2.modeler.ui.property.PropertyLabelProvider"
+ tabDescriptorProvider="org.eclipse.bpmn2.modeler.ui.property.PropertyTabDescriptorProvider">
+ <propertyCategory category="BPMN2">
+ </propertyCategory>
+ </propertyContributor>
+ </extension>
+
+ <extension point="org.eclipse.graphiti.ui.diagramTypes">
+ <diagramType description="This is the diagram type for the BMPN2 diagram"
+ id="org.eclipse.bpmn2.modeler.ui.diagram.MainBPMNDiagramType" name="BPMN2 Diagram Type"
+ type="BPMN2">
+ </diagramType>
+ </extension>
+
+ <extension point="org.eclipse.graphiti.ui.diagramTypeProviders">
+ <diagramTypeProvider
+ class="org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2DiagramTypeProvider"
+ description="This is the editor for the BPMN2 diagram"
+ id="org.eclipse.bpmn2.modeler.ui.diagram.MainBPMNDiagramType" name="BPMN2 Editor">
+ <diagramType
+ id="org.eclipse.bpmn2.modeler.ui.diagram.MainBPMNDiagramType">
+ </diagramType>
+ <imageProvider id="org.eclipse.bpmn2.modeler.ui.ImageProvider">
+ </imageProvider>
+ </diagramTypeProvider>
+ </extension>
+
+ <extension point="org.eclipse.graphiti.ui.imageProviders">
+ <imageProvider class="org.eclipse.bpmn2.modeler.ui.ImageProvider"
+ id="org.eclipse.bpmn2.modeler.ui.ImageProvider">
+ </imageProvider>
+ </extension>
+
+ <!-- Provide a default "runtime" behavior -->
+
+ <extension point="org.eclipse.bpmn2.modeler.runtime">
+ <runtime class="org.eclipse.bpmn2.modeler.ui.DefaultBpmn2RuntimeExtension"
+ description="%runtime.description" id="org.eclipse.bpmn2.modeler.runtime.none"
+ name="%runtime.name">
+ </runtime>
+
+ <model runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ uri="http://www.omg.org/spec/BPMN/20100524/MODEL-XMI"
+ resourceFactory="org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceFactoryImpl">
+ </model>
+
+ <!-- ======================================== -->
+ <!-- =========== Model Extensions ========== -->
+ <!-- ======================================== -->
+
+ <dataType name="EColor" class="org.eclipse.bpmn2.modeler.ui.property.EColorConversionDelegate"/>
+ <dataType name="EFont" class="org.eclipse.bpmn2.modeler.ui.property.EFontConversionDelegate"/>
+
+ <modelExtension
+ id="org.eclipse.bpmn2.modeler.runtime.none.modelExtension.appearance.BaseElement"
+ uri="http://org.eclipse.bpmn2/ext"
+ name="BaseElement Appearance"
+ type="BaseElement"
+ decorator="org.eclipse.bpmn2.modeler.ui.DefaultObjectDecorator">
+ <property name="style" type="ShapeStyle" label="%appearance">
+ <value>
+ <property name="shapeForeground" type="EColor" label="%border.color" />
+ <property name="shapeBackground" type="EColor" label="%fill.color" />
+ <property name="labelForeground" type="EColor" label="%label.color" />
+ <property name="labelFont" type="EFont" label="%label.font" />
+ <property name="labelPosition" type="LabelPosition:EEnum" value="%label.position.values" label="%label.position" />
+ <property name="routingStyle" type="RoutingStyle:EEnum" value="%routing.style.values" label="%routing.style" />
+ </value>
+ </property>
+ </modelExtension>
+
+ <!-- ======================================== -->
+ <!-- ============ Property Tabs ============ -->
+ <!-- ======================================== -->
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.DescriptionPropertySection"
+ image="icons/20/Thumbnail.png"
+ popup="true"
+ label="%propertyTab.label.General">
+ </propertyTab>
+
+ <!-- ============ Diagrams ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.process.diagram.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.diagrams.ProcessDiagramPropertySection"
+ type="org.eclipse.bpmn2.di.BPMNDiagram"
+ label="%propertyTab.label.Process">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.participant.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.diagrams.ParticipantPropertySection"
+ type="org.eclipse.bpmn2.Participant"
+ label="%propertyTab.label.60">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.definitions.tab"
+ afterTab="org.eclipse.bpmn2.modeler.interface.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.diagrams.DefinitionsPropertySection"
+ type="org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process"
+ label="%propertyTab.label.Definitions">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.collaboration.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="isClosed correlationKeys"
+ type="org.eclipse.bpmn2.Collaboration"
+ label="Collaboration">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.choreography.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="isClosed correlationKeys"
+ type="org.eclipse.bpmn2.Choreography"
+ label="Choreography">
+ </propertyTab>
+
+ <!-- ============ Connections ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.assocation.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="associationDirection"
+ type="org.eclipse.bpmn2.Association"
+ label="%propertyTab.label.2">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.dataAssocation.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="transformation assignment"
+ type="org.eclipse.bpmn2.DataInputAssociation org.eclipse.bpmn2.DataOutputAssociation"
+ label="%propertyTab.label.3">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.sequenceflow.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.connectors.SequenceFlowPropertySection"
+ type="org.eclipse.bpmn2.SequenceFlow"
+ label="%propertyTab.label.4">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.messageFlow.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.connectors.MessageFlowPropertySection"
+ type="org.eclipse.bpmn2.MessageFlow"
+ label="%propertyTab.label.5">
+ </propertyTab>
+
+ <!-- ============ Activities ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.callActivity.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ type="org.eclipse.bpmn2.CallActivity"
+ label="%propertyTab.label.6">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.subProcess.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessPropertySection"
+ type="org.eclipse.bpmn2.SubProcess"
+ label="%propertyTab.label.7">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.adHocSubProcess.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ type="org.eclipse.bpmn2.AdHocSubProcess"
+ label="%propertyTab.label.8">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.transaction.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ type="org.eclipse.bpmn2.Transaction"
+ label="%propertyTab.label.9">
+ </propertyTab>
+
+ <!-- ============ Tasks ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.task.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.TaskPropertySection"
+ type="org.eclipse.bpmn2.Task"
+ label="%propertyTab.label.10">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.businessRuleTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ type="org.eclipse.bpmn2.BusinessRuleTask"
+ label="%propertyTab.label.11">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.manualTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ManualTaskPropertySection"
+ type="org.eclipse.bpmn2.ManualTask"
+ label="%propertyTab.label.12">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.receiveTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ features="implementation instantiate messageRef operationRef isForCompensation"
+ type="org.eclipse.bpmn2.ReceiveTask"
+ label="%propertyTab.label.13">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.scriptTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ScriptTaskPropertySection"
+ type="org.eclipse.bpmn2.ScriptTask"
+ label="%propertyTab.label.14">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.sendTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ features="implementation messageRef operationRef isForCompensation"
+ type="org.eclipse.bpmn2.SendTask"
+ label="%propertyTab.label.15">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.serviceTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ features="implementation operationRef isForCompensation"
+ type="org.eclipse.bpmn2.ServiceTask"
+ label="%propertyTab.label.16">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.userTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ features="implementation resources renderings isForCompensation"
+ type="org.eclipse.bpmn2.UserTask"
+ label="%propertyTab.label.17">
+ </propertyTab>
+
+ <!-- ============ Global Tasks ============ -->
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.globalBusinessRuleTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ features="implementation resources"
+ type="org.eclipse.bpmn2.GlobalBusinessRuleTask"
+ label="%propertyTab.label.18">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.globalManualTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="resources"
+ type="org.eclipse.bpmn2.GlobalManualTask"
+ label="%propertyTab.label.19">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.globalScriptTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="scriptLanguage script resources"
+ type="org.eclipse.bpmn2.GlobalScriptTask"
+ label="%propertyTab.label.20">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.globalUserTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ features="implementation resources"
+ type="org.eclipse.bpmn2.GlobalUserTask"
+ label="%propertyTab.label.21">
+ </propertyTab>
+
+ <!-- ============ Choreography Activities ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.callChoreography.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.ActivityPropertySection"
+ type="org.eclipse.bpmn2.CallChoreography"
+ label="%propertyTab.label.22">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.choreographyTask.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="loopType initiatingParticipantRef correlationKeys messageFlowRef"
+ type="org.eclipse.bpmn2.ChoreographyTask"
+ label="%propertyTab.label.23">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.subChoreography.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="anyAttribute loopType participantRefs initiatingParticipantRef correlationKeys artifacts"
+ type="org.eclipse.bpmn2.SubChoreography"
+ label="%propertyTab.label.24">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.conversation.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="correlationKeys"
+ type="org.eclipse.bpmn2.Conversation"
+ label="%propertyTab.label.25">
+ </propertyTab>
+
+ <!-- ============ Gateways ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.gateway.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.gateways.GatewayPropertySection"
+ type="org.eclipse.bpmn2.Gateway"
+ label="%propertyTab.label.26">
+ </propertyTab>
+
+ <!-- ============ Events ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.commonEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.events.CommonEventPropertySection"
+ type="org.eclipse.bpmn2.Event"
+ label="%propertyTab.label.27">
+ </propertyTab>
+
+ <!-- ============ Event Definitionss ============ -->
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.conditionalEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.events.ConditionalEventDefinitionPropertySection"
+ type="org.eclipse.bpmn2.ConditionalEventDefinition"
+ label="%propertyTab.label.28">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.compensateEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="activityRef waitForCompletion"
+ type="org.eclipse.bpmn2.CompensateEventDefinition"
+ label="%propertyTab.label.29">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.errorEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="errorRef"
+ type="org.eclipse.bpmn2.ErrorEventDefinition"
+ label="%propertyTab.label.30">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.escalationEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="escalationRef"
+ type="org.eclipse.bpmn2.EscalationEventDefinition"
+ label="%propertyTab.label.31">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.linkEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="name"
+ type="org.eclipse.bpmn2.LinkEventDefinition"
+ label="%propertyTab.label.33">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.messageEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="messageRef operationReft"
+ type="org.eclipse.bpmn2.MessageEventDefinition"
+ label="%propertyTab.label.34">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.signalEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="signalRef"
+ type="org.eclipse.bpmn2.SignalEventDefinition"
+ label="%propertyTab.label.35">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.timerEvent.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.events.TimerEventDefinitionPropertySection"
+ type="org.eclipse.bpmn2.TimerEventDefinition"
+ label="%propertyTab.label.36">
+ </propertyTab>
+
+ <!-- ============ Artifacts ============ -->
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.group.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="categoryValueRef"
+ type="org.eclipse.bpmn2.Group"
+ label="%propertyTab.label.37">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.textAnnotation.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.artifact.TextAnnotationPropertySection"
+ type="org.eclipse.bpmn2.TextAnnotation"
+ label="%propertyTab.label.38">
+ </propertyTab>
+
+ <!-- ============ Root Elements ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.error.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="errorCode structureRef"
+ type="org.eclipse.bpmn2.Error"
+ label="%propertyTab.label.39">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.escalation.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="escalationCode structureRef"
+ type="org.eclipse.bpmn2.Escalation"
+ label="%propertyTab.label.40">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.interface.tab"
+ afterTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.InterfacePropertySection"
+ type="org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process org.eclipse.bpmn2.Participant"
+ label="%propertyTab.label.41">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.interface.details.tab"
+ afterTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.InterfacePropertySection"
+ type="org.eclipse.bpmn2.Interface"
+ label="%propertyTab.label.42">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.operation.tab"
+ afterTab="org.eclipse.bpmn2.modeler.process.diagram.tab"
+ class="default"
+ features="implementationRef inMessageRef outMessageRef errorRefs"
+ type="org.eclipse.bpmn2.Operation"
+ label="%propertyTab.label.43">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.itemDefinition.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="itemKind structureRef isCollection"
+ type="org.eclipse.bpmn2.ItemDefinition"
+ label="%propertyTab.label.44">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.message.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="itemRef"
+ type="org.eclipse.bpmn2.Message"
+ label="%propertyTab.label.45">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.partnerEntity.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="participantRef"
+ type="org.eclipse.bpmn2.PartnerEntity"
+ label="%propertyTab.label.46">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.partnerRole.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="participantRef"
+ type="org.eclipse.bpmn2.PartnerRole"
+ label="%propertyTab.label.47">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.resource.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="resourceParameters"
+ type="org.eclipse.bpmn2.Resource"
+ label="%propertyTab.label.48">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.signal.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="structureRef"
+ type="org.eclipse.bpmn2.Signal"
+ label="%propertyTab.label.49">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.category.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="categoryValue"
+ type="org.eclipse.bpmn2.Category"
+ label="%propertyTab.label.59">
+ </propertyTab>
+
+ <!-- ============ Item Aware Elements ============ -->
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.dataitems.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.diagrams.DataItemsPropertySection"
+ type="org.eclipse.bpmn2.di.BPMNDiagram org.eclipse.bpmn2.Process"
+ label="%propertyTab.label.50">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.dataInput.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.DataInputPropertySection"
+ type="org.eclipse.bpmn2.DataInput"
+ label="%propertyTab.label.51">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.dataobject.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.DataObjectPropertySection"
+ type="org.eclipse.bpmn2.DataObject org.eclipse.bpmn2.DataObjectReference"
+ label="%propertyTab.label.52">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.dataobjectref.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.DataObjectReferencePropertySection"
+ type="org.eclipse.bpmn2.DataObjectReference"
+ label="%propertyTab.label.53">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.dataOutput.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.DataOutputPropertySection"
+ type="org.eclipse.bpmn2.DataOutput"
+ label="%propertyTab.label.54">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.datastore.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.DataStorePropertySection"
+ type="org.eclipse.bpmn2.DataStore org.eclipse.bpmn2.DataStoreReference"
+ label="%propertyTab.label.55">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.datastoreref.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.data.DataStoreReferencePropertySection"
+ type="org.eclipse.bpmn2.DataStoreReference"
+ label="%propertyTab.label.56">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.activity.io.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.tasks.IoParametersPropertySection"
+ label="%propertyTab.label.57">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.correlationproperty.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="correlationPropertyRetrievalExpression type"
+ type="org.eclipse.bpmn2.CorrelationProperty"
+ label="Correlation Property">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.correlation.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="default"
+ features="messagePath messageRef"
+ type="org.eclipse.bpmn2.CorrelationPropertyRetrievalExpression"
+ label="Correlation">
+ </propertyTab>
+
+ <propertyTab
+ id="org.eclipse.bpmn2.modeler.advanced.tab"
+ afterTab="org.eclipse.bpmn2.modeler.description.tab"
+ class="org.eclipse.bpmn2.modeler.ui.property.AdvancedPropertySection"
+ popup="false"
+ label="%propertyTab.label.58">
+ </propertyTab>
+
+ <toolPalette
+ id="org.bpmn2.modeler.toolpalette.full"
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ profile="profile.1">
+
+ <category id="org.bpmn2.modeler.toolpalette.default.categories"/>
+
+ <category id="org.bpmn2.modeler.toolpalette.process.patterns" name="%category.name">
+ <tool name="%tool.name" id="org.bpmn2.modeler.tool.arbitrary.cycles" description="%arbitrary.cycles.description">
+ <object type="Task[$name='Task A']" id="arbitrary.cycles.taskA" optional="true"/>
+ <object type="Task[$name='Task B',x=200]" id="arbitrary.cycles.taskB"/>
+ <object type="Task[$name='Task C',x=200,y=100]" id="arbitrary.cycles.taskC"/>
+ <object type="Task[$name='Task D',x=400,y=50]" id="arbitrary.cycles.taskD"/>
+ <object type="Task[$name='Task E',x=600]" id="arbitrary.cycles.taskE"/>
+ <object type="Task[$name='Task F',x=600,y=100]" id="arbitrary.cycles.taskF"/>
+ <object type="Task[$name='Task G',x=700,y=200]" id="arbitrary.cycles.taskG" optional="true"/>
+ <object type="ExclusiveGateway[x=100]" id="arbitrary.cycles.xor1"/>
+ <object type="ExclusiveGateway[x=100,y=200]" id="arbitrary.cycles.xor2"/>
+ <object type="ExclusiveGateway[x=300,y=50]" id="arbitrary.cycles.xor3"/>
+ <object type="ExclusiveGateway[x=500,y=50]" id="arbitrary.cycles.xor4"/>
+ <object type="ExclusiveGateway[x=600,y=200]" id="arbitrary.cycles.xor5"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.taskA',target='arbitrary.cycles.xor1']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.xor1',target='arbitrary.cycles.taskB']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.xor1',target='arbitrary.cycles.xor2']" />
+ <object type="SequenceFlow[source='arbitrary.cycles.xor2',target='arbitrary.cycles.taskC']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.taskB',target='arbitrary.cycles.xor3']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.taskC',target='arbitrary.cycles.xor3']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.xor3',target='arbitrary.cycles.taskD']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.taskD',target='arbitrary.cycles.xor4']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.xor4',target='arbitrary.cycles.taskE']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.xor4',target='arbitrary.cycles.taskF']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.taskF',target='arbitrary.cycles.xor5']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.xor5',target='arbitrary.cycles.taskG']"/>
+ <object type="SequenceFlow[source='arbitrary.cycles.xor5',target='arbitrary.cycles.xor2']" />
+ </tool>
+
+ <tool name="%tool.name.0" id="org.bpmn2.modeler.tool.deferred.choice">
+ <object type="Task[$name='Task A',y=50]" id="deferred.choice.taskA" optional="true"/>
+ <object type="Task[$name='Task B',x=300]" id="deferred.choice.taskB"/>
+ <object type="Task[$name='Task C',x=300,y=100]" id="deferred.choice.taskC"/>
+ <object type="EventBasedGateway[x=100,y=50]" id="deferred.choice.gateway"/>
+ <object type="IntermediateCatchEvent[x=200]+MessageEventDefinition" id="deferred.choice.event1"/>
+ <object type="IntermediateCatchEvent[x=200,y=100]+MessageEventDefinition" id="deferred.choice.event2"/>
+ <object type="SequenceFlow[source='deferred.choice.taskA',target='deferred.choice.gateway']"/>
+ <object type="SequenceFlow[source='deferred.choice.gateway',target='deferred.choice.event1']"/>
+ <object type="SequenceFlow[source='deferred.choice.gateway',target='deferred.choice.event2']"/>
+ <object type="SequenceFlow[source='deferred.choice.event1',target='deferred.choice.taskB']"/>
+ <object type="SequenceFlow[source='deferred.choice.event2',target='deferred.choice.taskC']"/>
+ </tool>
+
+ <tool name="%tool.name.1" id="org.bpmn2.modeler.tool.exclusive.choice">
+ <object type="Task[$name='Task A',y=100]" id="exclusive.choice.taskA" optional="true"/>
+ <object type="Task[$name='Task B',x=200]" id="exclusive.choice.taskB"/>
+ <object type="Task[$name='Task C',x=200,y=100]" id="exclusive.choice.taskC"/>
+ <object type="Task[$name='Task D',x=200,y=200]" id="exclusive.choice.taskD"/>
+ <object type="ExclusiveGateway[x=100,y=100]" id="exclusive.choice.gateway"/>
+ <object type="SequenceFlow[source='exclusive.choice.taskA',target='exclusive.choice.gateway']"/>
+ <object type="SequenceFlow[source='exclusive.choice.gateway',target='exclusive.choice.taskB']"/>
+ <object type="SequenceFlow[source='exclusive.choice.gateway',target='exclusive.choice.taskC']"/>
+ <object type="SequenceFlow[source='exclusive.choice.gateway',target='exclusive.choice.taskD']"/>
+ </tool>
+
+ <tool name="%tool.name.2" id="org.bpmn2.modeler.tool.implicit.termination">
+ <object type="StartEvent[y=50]" id="implicit.termination.start"/>
+ <object type="Task[$name='Task A',x=100,y=50]" id="implicit.termination.taskA"/>
+ <object type="Task[$name='Task B1',x=300]" id="implicit.termination.taskB"/>
+ <object type="Task[$name='Task B2',x=300,y=100]" id="implicit.termination.taskC"/>
+ <object type="ExclusiveGateway[x=200,y=50]" id="implicit.termination.gateway"/>
+ <object type="EndEvent[x=400]+TerminateEventDefinition" id="implicit.termination.end1"/>
+ <object type="EndEvent[x=400,y=100]+TerminateEventDefinition" id="implicit.termination.end2"/>
+ <object type="SequenceFlow[source='implicit.termination.start',target='implicit.termination.taskA']"/>
+ <object type="SequenceFlow[source='implicit.termination.taskA',target='implicit.termination.gateway']"/>
+ <object type="SequenceFlow[source='implicit.termination.gateway',target='implicit.termination.taskB']"/>
+ <object type="SequenceFlow[source='implicit.termination.gateway',target='implicit.termination.taskC']"/>
+ <object type="SequenceFlow[source='implicit.termination.taskB',target='implicit.termination.end1']"/>
+ <object type="SequenceFlow[source='implicit.termination.taskC',target='implicit.termination.end2']"/>
+ </tool>
+
+ <tool name="%tool.name.3" id="org.bpmn2.modeler.tool.mi.no.sync">
+ <object type="Task[$name='Task A']" id="mi.no.sync.taskA" optional="true"/>
+ <object type="SubProcess[$name='Task B',$loopCharacteristics=$MultiInstanceLoopCharacteristics,x=200,width=200,height=100]" id="mi.no.sync.taskB"/>
+ <object type="Task[$name='Task C',x=400]" id="mi.no.sync.taskC" optional="true"/>
+ <object type="SequenceFlow[source='mi.no.sync.taskA',target='mi.no.sync.taskB']"/>
+ <object type="SequenceFlow[source='mi.no.sync.taskB',target='mi.no.sync.taskC']"/>
+ </tool>
+
+ <tool name="%tool.name.4" id="org.bpmn2.modeler.tool.parallel.split">
+ <object type="Task[$name='Task A',y=50]" id="parallel.split.taskA" optional="true"/>
+ <object type="Task[$name='Task B',x=200]" id="parallel.split.taskB" optional="true"/>
+ <object type="Task[$name='Task C',x=200,y=100]" id="parallel.split.taskC" optional="true"/>
+ <object type="ParallelGateway[x=100,y=50]" id="parallel.split.gateway"/>
+ <object type="SequenceFlow[source='parallel.split.taskA',target='parallel.split.gateway']"/>
+ <object type="SequenceFlow[source='parallel.split.gateway',target='parallel.split.taskB']"/>
+ <object type="SequenceFlow[source='parallel.split.gateway',target='parallel.split.taskC']"/>
+ </tool>
+
+ <tool name="%tool.name.5" id="org.bpmn2.modeler.tool.sequence">
+ <object type="Task[$name='Task A']" id="sequence.taskA" optional="true"/>
+ <object type="Task[$name='Task B',x=200]" id="sequence.taskB"/>
+ <object type="Task[$name='Task C',x=400]" id="sequence.taskC"/>
+ <object type="SequenceFlow[source='sequence.taskA',target='sequence.taskB']"/>
+ <object type="SequenceFlow[source='sequence.taskB',target='sequence.taskC']"/>
+ </tool>
+
+ <tool name="%tool.name.6" id="org.bpmn2.modeler.tool.simple.merge">
+ <object type="Task[$name='Task B']" id="simple.merge.taskB" optional="true"/>
+ <object type="Task[$name='Task C',y=100]" id="simple.merge.taskC" optional="true"/>
+ <object type="Task[$name='Task D',y=200]" id="simple.merge.taskD" optional="true"/>
+ <object type="Task[$name='Task E',x=200,y=100]" id="simple.merge.taskE" optional="true"/>
+ <object type="ExclusiveGateway[x=100,y=100,$gatewayDirection=Converging]" id="simple.merge.gateway"/>
+ <object type="SequenceFlow[source='simple.merge.taskB',target='simple.merge.gateway']"/>
+ <object type="SequenceFlow[source='simple.merge.taskC',target='simple.merge.gateway']"/>
+ <object type="SequenceFlow[source='simple.merge.taskD',target='simple.merge.gateway']"/>
+ <object type="SequenceFlow[source='simple.merge.gateway',target='simple.merge.taskE']"/>
+ </tool>
+
+ <tool name="%tool.name.7" id="org.bpmn2.modeler.tool.synchronization">
+ <object type="Task[$name='Task B1']" id="synchronization.taskB1" optional="true"/>
+ <object type="Task[$name='Task B2',y=100]" id="synchronization.taskB2" optional="true"/>
+ <object type="Task[$name='Task C',x=200,y=50]" id="synchronization.taskC" optional="true"/>
+ <object type="ParallelGateway[x=100,y=50,$gatewayDirection=Converging]" id="synchronization.gateway"/>
+ <object type="SequenceFlow[source='synchronization.taskB1',target='synchronization.gateway']"/>
+ <object type="SequenceFlow[source='synchronization.taskB2',target='synchronization.gateway']"/>
+ <object type="SequenceFlow[source='synchronization.gateway',target='synchronization.taskC']"/>
+ </tool>
+
+ <tool name="%tool.name.8" id="org.bpmn2.modeler.tool.synchronizing.merge">
+ <object type="Task[$name='Task A',y=100]" id="synchronizing.merge.taskA" optional="true"/>
+ <object type="Task[$name='Task B',x=200]" id="synchronizing.merge.taskB"/>
+ <object type="Task[$name='Task C',x=200,y=200]" id="synchronizing.merge.taskC"/>
+ <object type="Task[$name='Task D',x=400,y=100]" id="synchronizing.merge.taskD" optional="true"/>
+ <object type="InclusiveGateway[x=100,y=100,$gatewayDirection=Diverging]" id="synchronizing.merge.gateway1"/>
+ <object type="InclusiveGateway[x=300,y=100,$gatewayDirection=Converging]" id="synchronizing.merge.gateway2"/>
+ <object type="SequenceFlow[source='synchronizing.merge.taskA',target='synchronizing.merge.gateway1']"/>
+ <object type="SequenceFlow[source='synchronizing.merge.gateway1',target='synchronizing.merge.taskB']"/>
+ <object type="SequenceFlow[source='synchronizing.merge.gateway1',target='synchronizing.merge.taskC']"/>
+ <object type="SequenceFlow[source='synchronizing.merge.taskB',target='synchronizing.merge.gateway2']"/>
+ <object type="SequenceFlow[source='synchronizing.merge.taskC',target='synchronizing.merge.gateway2']"/>
+ <object type="SequenceFlow[source='synchronizing.merge.gateway2',target='synchronizing.merge.taskD']"/>
+ </tool>
+
+ </category>
+
+ </toolPalette>
+
+ <toolPalette
+ id="org.bpmn2.modeler.toolpalette.descriptive"
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ profile="profile.2">
+ <category id="org.bpmn2.modeler.toolpalette.default.categories"/>
+ </toolPalette>
+
+ <toolPalette
+ id="org.bpmn2.modeler.toolpalette.analytic"
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ profile="profile.3">
+ <category id="org.bpmn2.modeler.toolpalette.default.categories"/>
+ </toolPalette>
+
+ <toolPalette
+ id="org.bpmn2.modeler.toolpalette.executable"
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ profile="profile.4">
+ <category id="org.bpmn2.modeler.toolpalette.default.categories"/>
+ </toolPalette>
+
+ <toolPalette
+ id="org.bpmn2.modeler.toolpalette.choreography"
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ profile="profile.5">
+ <category id="org.bpmn2.modeler.toolpalette.default.categories"/>
+ </toolPalette>
+
+ <toolPalette
+ id="org.bpmn2.modeler.toolpalette.conversation"
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ profile="profile.6">
+ <category id="org.bpmn2.modeler.toolpalette.default.categories"/>
+ </toolPalette>
+
+ <!-- ======================================== -->
+ <!-- === Model Enablements and Profiles ==== -->
+ <!-- ======================================== -->
+
+ <modelEnablement
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ id="profile.1"
+ profile="Full"
+ description="All BPMN2 elements and attributes">
+ <enable object="all"/>
+ </modelEnablement>
+
+ <modelEnablement
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ id="profile.2"
+ profile="Descriptive"
+ description="Descriptive Process Modeling Conformance">
+ <enable object="Collaboration"/>
+ <enable object="Process"/>
+ <enable object="Correlation"/>
+ <enable object="CorrelationProperty"/>
+ <enable object="CorrelationPropertyBinding"/>
+ <enable object="CorrelationPropertyRetrievalExpression"/>
+ <enable object="CorrelationSubsciption"/>
+ <enable object="Process"/>
+ <enable object="Process"/>
+ <enable object="Participant" feature="name"/>
+ <enable object="Participant" feature="processRef"/>
+ <enable object="Lane" feature="name"/>
+ <enable object="SequenceFlow" feature="name"/>
+ <enable object="MessageFlow" feature="name"/>
+ <enable object="ExclusiveGateway" feature="name"/>
+ <enable object="ParallelGateway" feature="name"/>
+ <enable object="Task" feature="name"/>
+ <enable object="UserTask" feature="name"/>
+ <enable object="ServiceTask" feature="name"/>
+ <enable object="SubProcess" feature="name"/>
+ <enable object="CallActivity" feature="name"/>
+ <enable object="CallActivity" feature="calledElementRef"/>
+ <enable object="CallableElement"/>
+ <enable object="DataObject" feature="name"/>
+ <enable object="TextAnnotation" feature="text"/>
+ <enable object="CallActivity" feature="name"/>
+ <enable object="Association" feature="name"/>
+ <enable object="Association" feature="associationDirection"/>
+ <enable object="DataInputAssociation"/>
+ <enable object="DataOutputAssociation"/>
+ <enable object="DataStore" feature="name"/>
+ <enable object="DataStoreReference" feature="name"/>
+ <enable object="DataStoreReference" feature="dataStoreRef"/>
+ <enable object="StartEvent" feature="name"/>
+ <enable object="EndEvent" feature="name"/>
+ <enable object="MessageEventDefinition"/>
+ <enable object="TimerEventDefinition"/>
+ <enable object="Documentation"/>
+ <enable object="Group"/>
+ <enable object="Category"/>
+ <enable object="CategoryValue"/>
+ <enable object="Message"/>
+ </modelEnablement>
+
+ <modelEnablement
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ id="profile.3"
+ profile="Analytic"
+ description="Analytic Process Modeling Conformance"
+ ref="org.eclipse.bpmn2.modeler.runtime.none:profile.2">
+ <enable object="SequenceFlow" feature="conditionExpression"/>
+ <enable object="ExclusiveGateway" feature="default"/>
+ <enable object="InclusiveGateway" feature="name"/>
+ <enable object="InclusiveGateway" feature="default"/>
+ <enable object="InclusiveGateway" feature="eventGatewayType"/>
+ <enable object="EventBasedGateway" feature="name"/>
+ <enable object="EventBasedGateway" feature="eventGatewayType"/>
+ <enable object="SendTask" feature="name"/>
+ <enable object="ReceiveTask" feature="name"/>
+ <enable object="StandardLoopCharacteristics"/>
+ <enable object="MultiInstanceLoopCharacteristics"/>
+ <enable object="SignalEventDefinition"/>
+ <enable object="Signal"/>
+ <enable object="EscalationEventDefinition"/>
+ <enable object="Escalation"/>
+ <enable object="ErrorEventDefinition"/>
+ <enable object="Error"/>
+ <enable object="ConditionalEventDefinition"/>
+ <enable object="IntermediateCatchEvent"/>
+ <enable object="IntermediateThrowEvent"/>
+ <enable object="BoundaryEvent"/>
+ </modelEnablement>
+
+ <modelEnablement
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ id="profile.4"
+ profile="Executable"
+ description="Common Executable Process Modeling Conformance"
+ ref="org.eclipse.bpmn2.modeler.runtime.none:profile.3">
+ <enable object="BusinessRuleTask"/>
+ <enable object="AdHocSubProcess"/>
+ <enable object="GlobalTask"/>
+ <enable object="GlobalBusinessRuleTask"/>
+ <enable object="GlobalManualTask"/>
+ <enable object="GlobalScriptTask"/>
+ <enable object="GlobalUserTask"/>
+ <enable object="Transaction"/>
+ <enable object="ManualTask"/>
+ <enable object="ScriptTask"/>
+ <enable object="ResourceRole"/>
+ <enable object="Rendering"/>
+ <enable object="InputOutputSpecification"/>
+ <enable object="InputSet"/>
+ <enable object="OutputSet"/>
+ <enable object="DataInput"/>
+ <enable object="DataOutput"/>
+ <enable object="ItemDefinition"/>
+ <enable object="Operation"/>
+ <enable object="Interface"/>
+ <enable object="Assignment"/>
+ <enable object="ComplexGateway"/>
+ <enable object="CompensateEventDefinition"/>
+ <enable object="LinkEventDefinition"/>
+ <enable object="CancelEventDefinition"/>
+ <enable object="TerminateEventDefinition"/>
+ </modelEnablement>
+
+ <modelEnablement
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ id="profile.5"
+ profile="Choreography"
+ description="Choreography and Collaboration Modeling Conformance">
+ <enable object="Choreography"/>
+ <enable object="Participant" feature="name"/>
+ <enable object="Lane" feature="name"/>
+ <enable object="ChoreographyTask"/>
+ <enable object="GlobalChoreographyTask"/>
+ <enable object="CallChoreography"/>
+ <enable object="SubChoreography"/>
+ <enable object="StartEvent"/>
+ <enable object="EndEvent"/>
+ <enable object="BoundaryEvent"/>
+ <enable object="IntermediateCatchEvent"/>
+ <enable object="IntermediateThrowEvent"/>
+ <enable object="ConditionalEventDefinition"/>
+ <enable object="MessageEventDefinition"/>
+ <enable object="Message"/>
+ <enable object="MessageFlow"/>
+ <enable object="TimerEventDefinition"/>
+ <enable object="SignalEventDefinition"/>
+ <enable object="Signal"/>
+ <enable object="InclusiveGateway"/>
+ <enable object="ExclusiveGateway"/>
+ <enable object="ParallelGateway"/>
+ <enable object="ConditionalGateway"/>
+ <enable object="ComplexGateway"/>
+ <enable object="EventBasedGateway"/>
+ </modelEnablement>
+
+ <modelEnablement
+ runtimeId="org.eclipse.bpmn2.modeler.runtime.none"
+ id="profile.6"
+ profile="Conversation"
+ description="Conversation Modeling">
+ <enable object="Participant" feature="name"/>
+ <enable object="Lane" feature="name"/>
+ <enable object="Conversation"/>
+ <enable object="ConversationLink"/>
+ <enable object="ConversationAssociation"/>
+ <enable object="GlobalConversation"/>
+ <enable object="CallConversation"/>
+ <enable object="SubConversation"/>
+ </modelEnablement>
+
+ <style object="SHAPES" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="DATA" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="50"/>
+ <style object="DataInput" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="50"/>
+ <style object="DataObject" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="50"/>
+ <style object="DataObjectReference" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="50"/>
+ <style object="DataOutput" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="50"/>
+ <style object="DataStoreReference" shapeBackground="D4E7F8" defaultWidth="50" defaultHeight="50"/>
+ <style object="Message" shapeBackground="D4E7F8" defaultWidth="30" defaultHeight="20"/>
+
+ <style object="EVENTS" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="36"/>
+ <style object="BoundaryEvent" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="36"/>
+ <style object="EndEvent" shapeBackground="FF8080" defaultWidth="36" defaultHeight="36"/>
+ <style object="IntermediateCatchEvent" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="36"/>
+ <style object="IntermediateThrowEvent" shapeBackground="D4E7F8" defaultWidth="36" defaultHeight="36"/>
+ <style object="StartEvent" shapeBackground="80FF80" defaultWidth="36" defaultHeight="36"/>
+
+ <style object="GATEWAYS" shapeBackground="C8C864" defaultWidth="50" defaultHeight="50"/>
+ <style object="ComplexGateway" shapeBackground="C8C864" defaultWidth="50" defaultHeight="50"/>
+ <style object="EventBasedGateway" shapeBackground="C8C864" defaultWidth="50" defaultHeight="50"/>
+ <style object="ExclusiveGateway" shapeBackground="C8C864" defaultWidth="50" defaultHeight="50"/>
+ <style object="InclusiveGateway" shapeBackground="C8C864" defaultWidth="50" defaultHeight="50"/>
+ <style object="ParallelGateway" shapeBackground="C8C864" defaultWidth="50" defaultHeight="50"/>
+
+ <style object="CHOREOGRAPHY" shapeBackground="D4E7F8" defaultWidth="150" defaultHeight="150"/>
+ <style object="CallChoreography" shapeBackground="D4E7F8" defaultWidth="150" defaultHeight="150"/>
+ <style object="ChoreographyTask" shapeBackground="D4E7F8" defaultWidth="150" defaultHeight="150"/>
+ <style object="SubChoreography" shapeBackground="D4E7F8" defaultWidth="150" defaultHeight="150"/>
+
+ <style object="TASKS" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="BusinessRuleTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="ManualTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="ReceiveTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="ScriptTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="SendTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="ServiceTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="Task" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="UserTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+
+ <style object="GLOBAL_TASKS" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="CallActivity" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="GlobalBusinessRuleTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="GlobalManualTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="GlobalScriptTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="GlobalTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+ <style object="GlobalUserTask" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="50"/>
+
+ <style object="SUBPROCESS" shapeBackground="D4E7F8" defaultWidth="3000" defaultHeight="150"/>
+ <style object="AdHocSubProcess" shapeBackground="D4E7F8" defaultWidth="300" defaultHeight="150"/>
+ <style object="SubProcess" shapeBackground="D4E7F8" defaultWidth="300" defaultHeight="150"/>
+ <style object="Transaction" shapeBackground="D4E7F8" defaultWidth="300" defaultHeight="150"/>
+
+ <style object="CONVERSATION" shapeBackground="D4E7F8" defaultWidth="58" defaultHeight="50"/>
+ <style object="CallConversation" shapeBackground="D4E7F8" defaultWidth="58" defaultHeight="50"/>
+ <style object="Conversation" shapeBackground="D4E7F8" defaultWidth="58" defaultHeight="50"/>
+ <style object="SubConversation" shapeBackground="D4E7F8" defaultWidth="58" defaultHeight="50"/>
+
+ <style object="ARTIFACTS" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="110"/>
+ <style object="Group" shapeBackground="D4E7F8" defaultWidth="110" defaultHeight="110"/>
+ <style object="TextAnnotation" shapeBackground="80FF80" defaultWidth="100" defaultHeight="150"/>
+
+ <style object="SWIMLANES" shapeBackground="D4E7F8" defaultWidth="150" defaultHeight="500"/>
+ <style object="Lane" shapeBackground="D4E7F8" defaultWidth="150" defaultHeight="500"/>
+ <style object="Participant" shapeBackground="D4E7F8" defaultWidth="150" defaultHeight="500"/>
+
+ <style object="CONNECTIONS" shapeBackground="D4E7F8" defaultWidth="2"/>
+ <style object="Association" shapeBackground="D4E7F8" defaultWidth="2"/>
+ <style object="ConversationLink" shapeBackground="D4E7F8" defaultWidth="4"/>
+ <style object="DataAssociation" shapeBackground="D4E7F8" defaultWidth="2"/>
+ <style object="DataInputAssociation" shapeBackground="D4E7F8" defaultWidth="2"/>
+ <style object="DataOutputAssociation" shapeBackground="D4E7F8" defaultWidth="2"/>
+ <style object="MessageFlow" shapeBackground="D4E7F8" defaultWidth="2"/>
+ <style object="SequenceFlow" shapeBackground="D4E7F8" defaultWidth="2"/>
+
+ <style object="CANVAS" shapeBackground="FFFFFF"/>
+ <style object="GRID" shapeForeground="E3EEF9" useDefaultSize="true" defaultWidth="10" defaultHeight="10"/>
+
+ <typeLanguage name="XSD Schema" uri="http://www.w3.org/2001/XMLSchema" prefix="xs">
+ <type name="string"/>
+ <type name="date"/>
+ <type name="byte"/>
+ <type name="decimal"/>
+ <type name="int"/>
+ <type name="integer"/>
+ <type name="long"/>
+ <type name="short"/>
+ <type name="boolean"/>
+ </typeLanguage>
+
+ <typeLanguage name="Java Types" uri="http://www.java.com/javaTypes" prefix="java">
+ <type name="Boolean" qname="java.lang.Boolean"/>
+ <type name="Byte" qname="java.lang.Byte"/>
+ <type name="Character" qname="java.lang.Character"/>
+ <type name="Float" qname="java.lang.Float"/>
+ <type name="Integer" qname="java.lang.Integer"/>
+ <type name="Long" qname="java.lang.Long"/>
+ <type name="Short" qname="java.lang.Short"/>
+ <type name="Double" qname="java.lang.Double"/>
+ <type name="String" qname="java.lang.String"/>
+ <type name="Object" qname="java.lang.Object"/>
+ </typeLanguage>
+
+ <expressionLanguage name="XPath" uri="http://www.w3.org/1999/XPath"/>
+ <expressionLanguage name="Java" uri="http://www.java.com/java"/>
+
+ <serviceImplementation name="Web Service" uri="##WebService"/>
+ <serviceImplementation name="Unspecified" uri="##unspecified"/>
+
+ </extension>
+
+ <!-- menu commands -->
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.bpmn2.modeler.command.category"
+ name="%category.name.0">
+ </category>
+ <command
+ id="org.eclipse.bpmn2.modeler.command.createProcess"
+ categoryId="org.eclipse.bpmn2.modeler.command.category"
+ name="%command.name"/>
+ <command
+ id="org.eclipse.bpmn2.modeler.command.createChoreography"
+ categoryId="org.eclipse.bpmn2.modeler.command.category"
+ name="%command.name.0">
+ </command>
+ <command
+ id="org.eclipse.bpmn2.modeler.command.createCollaboration"
+ categoryId="org.eclipse.bpmn2.modeler.command.category"
+ name="%command.name.1">
+ </command>
+ </extension>
+
+ <!-- menu handlers -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.bpmn2.modeler.ui.commands.CreateDiagramCommand"
+ commandId="org.eclipse.bpmn2.modeler.command.createProcess">
+ </handler>
+ <handler
+ class="org.eclipse.bpmn2.modeler.ui.commands.CreateDiagramCommand"
+ commandId="org.eclipse.bpmn2.modeler.command.createChoreography">
+ </handler>
+ <handler
+ class="org.eclipse.bpmn2.modeler.ui.commands.CreateDiagramCommand"
+ commandId="org.eclipse.bpmn2.modeler.command.createCollaboration">
+ </handler>
+ </extension>
+
+ <!-- menu -->
+ <extension
+ id="org.eclipse.bpmn2.modeler.diagram.menu.extension"
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI= "menu:org.eclipse.ui.main.menu?after=additions">
+ <menu
+ id="org.eclipse.bpmn2.modeler.diagram.menu"
+ label="%menu.label">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.bpmn2.modeler.ui.bpmn2editor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ locationURI= "menu:org.eclipse.bpmn2.modeler.diagram.menu?after=additions">
+ <command
+ commandId="org.eclipse.bpmn2.modeler.command.createProcess"
+ id= "createProcess"
+ label= "%command.label">
+ </command>
+ <command
+ commandId="org.eclipse.bpmn2.modeler.command.createChoreography"
+ id= "createChoreography"
+ label= "%command.label.0">
+ </command>
+ <command
+ commandId="org.eclipse.bpmn2.modeler.command.createCollaboration"
+ id= "createCollaboration"
+ label= "%command.label.1">
+ </command>
+ </menuContribution>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+ARROW_UP">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="moveup">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+ARROW_DOWN">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="movedown">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+ARROW_LEFT">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="moveleft">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+ARROW_RIGHT">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="moveright">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+M2+ARROW_UP">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="moveup10">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+M2+ARROW_DOWN">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="movedown10">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+M2+ARROW_LEFT">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="moveleft10">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+M2+ARROW_RIGHT">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="moveright10">
+ </parameter>
+ </key>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.graphiti.ui.featureExecutionCommand"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+D">
+ <parameter
+ id="org.eclipse.graphiti.ui.featureHint"
+ value="duplicate">
+ </parameter>
+ </key>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/pom.xml b/plugins/org.eclipse.bpmn2.modeler.ui/pom.xml
new file mode 100644
index 00000000..a8b0bc28
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/pom.xml
@@ -0,0 +1,46 @@
+<!-- Copyright (c) 2011, 2012, 2013 Red Hat, Inc. All rights reserved. This program is made available under the terms of
+ the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+ Contributors: Red Hat, Inc. - initial API and implementation -->
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.ui</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <name>BPMN2 Modeler Plugins: UI</name>
+ <description>Main UI for BPMN2 Modeler</description>
+
+<!--
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9.1</version>
+ <configuration>
+ <destDir>doc</destDir>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ -->
+</project>
diff --git a/org.eclipse.bpmn2.modeler.ui/schema/org.eclipse.bpmn2.modeler.ui.exsd b/plugins/org.eclipse.bpmn2.modeler.ui/schema/org.eclipse.bpmn2.modeler.ui.exsd
index 1d785b04..072ecd42 100644
--- a/org.eclipse.bpmn2.modeler.ui/schema/org.eclipse.bpmn2.modeler.ui.exsd
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/schema/org.eclipse.bpmn2.modeler.ui.exsd
@@ -107,7 +107,7 @@
The class that implements the Graphiti Tool Behavior Provider, i.e. extends the org.eclipse.bpmn2.ui.BPMN2ToolBehaviorProvider class.
</documentation>
<appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.bpmn2.modeler.ui.diagram.BPMNToolBehaviorProvider:"/>
+ <meta.attribute kind="java" basedOn="org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2ToolBehaviorProvider:"/>
</appinfo>
</annotation>
</attribute>
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java
index 88d30af5..88d30af5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/BPMN2ContentDescriber.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2ContentDescriber.java
index 1f5fd0d0..71f6975e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/BPMN2ContentDescriber.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2ContentDescriber.java
@@ -31,14 +31,14 @@ import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.content.ITextContentDescriber;
import org.xml.sax.InputSource;
-public class BPMN2ContentDescriber implements ITextContentDescriber {
+public class Bpmn2ContentDescriber implements ITextContentDescriber {
private static final String BPMN2_NAMESPACE = "http://www.omg.org/spec/BPMN/20100524/MODEL"; //$NON-NLS-1$
private static final String ROOT_ELEMENT = "definitions"; //$NON-NLS-1$
private RootElementParser parser;
- public BPMN2ContentDescriber() {
+ public Bpmn2ContentDescriber() {
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java
index 79042b0d..79042b0d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java
index 59e5fbfd..59e5fbfd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultBpmn2RuntimeExtension.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultBpmn2RuntimeExtension.java
index 3e84badb..6fe692a1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultBpmn2RuntimeExtension.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultBpmn2RuntimeExtension.java
@@ -18,11 +18,23 @@ import org.apache.xerces.xni.Augmentations;
import org.apache.xerces.xni.QName;
import org.apache.xerces.xni.XMLAttributes;
import org.apache.xerces.xni.XNIException;
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2FeatureMap;
+import org.eclipse.bpmn2.modeler.ui.property.StyleChangeAdapter;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
+import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IEditorInput;
import org.xml.sax.InputSource;
@@ -31,21 +43,21 @@ import org.xml.sax.InputSource;
public class DefaultBpmn2RuntimeExtension implements IBpmn2RuntimeExtension {
private static final String targetNamespace = "http://org.eclipse.bpmn2/default"; //$NON-NLS-1$
- private static final String[] typeLanguages = new String[] {
- "http://www.w3.org/2001/XMLSchema", "XML Schema", //$NON-NLS-1$ //$NON-NLS-2$
- };
- private static final String[] expressionLanguages = new String[] {
- "http://www.w3.org/1999/XPath", "XPath", //$NON-NLS-1$ //$NON-NLS-2$
- };
public DefaultBpmn2RuntimeExtension() {
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#isContentForRuntime(org.eclipse.ui.IEditorInput)
+ */
@Override
public boolean isContentForRuntime(IEditorInput input) {
return false;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#getTargetNamespace(org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType)
+ */
@Override
public String getTargetNamespace(Bpmn2DiagramType diagramType){
String type = ""; //$NON-NLS-1$
@@ -60,27 +72,29 @@ public class DefaultBpmn2RuntimeExtension implements IBpmn2RuntimeExtension {
type = "/choreography"; //$NON-NLS-1$
break;
default:
- type = "/ext"; //$NON-NLS-1$
+ type = ""; //$NON-NLS-1$
break;
}
return targetNamespace + type;
}
- @Override
- public String[] getTypeLanguages() {
- return typeLanguages;
- }
-
- @Override
- public String[] getExpressionLanguages() {
- return expressionLanguages;
- }
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension#notify(org.eclipse.bpmn2.modeler.core.LifecycleEvent)
+ */
@Override
- public void initialize(DiagramEditor editor) {
+ public void notify(LifecycleEvent event) {
+// System.out.println(event.eventType+ ": " + event.target);
+ if (event.eventType.equals(EventType.PICTOGRAMELEMENT_ADDED)) {
+ StyleChangeAdapter.adapt((PictogramElement) event.target);
+ }
+ else if (event.eventType.equals(EventType.BUSINESSOBJECT_CREATED) && event.target instanceof BaseElement) {
+ BaseElement object = (BaseElement) event.target;
+ if (Bpmn2FeatureMap.ALL_SHAPES.contains(object.getClass()) && ShapeStyle.hasStyle(object))
+ ShapeStyle.createStyleObject(object);
+ }
}
-
/**
* A simple XML parser that checks if the root element of an xml document contains any
* namespace definitions matching the given namespace URI.
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultObjectDecorator.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultObjectDecorator.java
new file mode 100644
index 00000000..796c516c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/DefaultObjectDecorator.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui;
+
+import org.eclipse.bpmn2.modeler.core.runtime.IObjectDecorator;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2FeatureMap;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ *
+ */
+public class DefaultObjectDecorator implements IObjectDecorator {
+
+ /**
+ *
+ */
+ public DefaultObjectDecorator() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IObjectDecorator#canApply(org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public boolean canApply(String id, Resource resource, EObject object) {
+ return Bpmn2FeatureMap.ALL_SHAPES.contains(object.eClass().getInstanceClass());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.runtime.IObjectDecorator#apply(org.eclipse.emf.ecore.resource.Resource, java.lang.Object)
+ */
+ @Override
+ public boolean apply(String id, Resource resource, Object object) {
+ return true;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IConstants.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IConstants.java
index c353fb99..583bf431 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IConstants.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IConstants.java
@@ -66,6 +66,7 @@ public interface IConstants {
public final String ICON_BOUNDARYEVENT = "16/BoundaryEvent.png"; //$NON-NLS-1$
public final String ICON_BUSINESSRULETASK = "16/BusinessRuleTask.png"; //$NON-NLS-1$
public final String ICON_CALLACTIVITY = "16/CallActivity.png"; //$NON-NLS-1$
+ public final String ICON_CALLCHOREOGRAPHY = "16/CallChoreography.png"; //$NON-NLS-1$
public final String ICON_CANCEL = "16/Cancel.png"; //$NON-NLS-1$
public final String ICON_CANCELEVENTDEFINITION = "16/CancelEventDefinition.png"; //$NON-NLS-1$
public final String ICON_CATEGORY = "16/Category.png"; //$NON-NLS-1$
@@ -120,6 +121,7 @@ public interface IConstants {
public final String ICON_SIGNAL = "16/Signal.png"; //$NON-NLS-1$
public final String ICON_SIGNALEVENTDEFINITION = "16/SignalEventDefinition.png"; //$NON-NLS-1$
public final String ICON_STARTEVENT = "16/StartEvent.png"; //$NON-NLS-1$
+ public final String ICON_SUBCHOREOGRAPHY = "16/SubChoreography.png"; //$NON-NLS-1$
public final String ICON_SUBPROCESS = "16/SubProcess.png"; //$NON-NLS-1$
public final String ICON_TASK = "16/Task.png"; //$NON-NLS-1$
public final String ICON_TERMINATEEVENTDEFINITION = "16/TerminateEventDefinition.png"; //$NON-NLS-1$
@@ -129,6 +131,7 @@ public interface IConstants {
public final String ICON_USERTASK = "16/UserTask.png"; //$NON-NLS-1$
public final String ICON_BPMNSHAPE = "16/BPMNShape.png"; //$NON-NLS-1$
public final String ICON_BPMNEDGE = "16/BPMNEdge.png"; //$NON-NLS-1$
+ public final String ICON_BPMNLABEL = "16/BPMNLabel.png"; //$NON-NLS-1$
public final String ICON_BPMNDIAGRAM = "16/BPMNDiagram.png"; //$NON-NLS-1$
public final String ICON_BPMNSUBDIAGRAM = "16/BPMNSubDiagram.png"; //$NON-NLS-1$
public final String ICON_PROCESS = "16/Process.png"; //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IFileChangeListener.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IFileChangeListener.java
index 3cb4ae42..3cb4ae42 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IFileChangeListener.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/IFileChangeListener.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/ImageProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/ImageProvider.java
index 049d047b..1070c169 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/ImageProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/ImageProvider.java
@@ -17,6 +17,8 @@ import org.eclipse.bpmn2.Association;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.BusinessRuleTask;
import org.eclipse.bpmn2.CallActivity;
+import org.eclipse.bpmn2.CallChoreography;
+import org.eclipse.bpmn2.CallConversation;
import org.eclipse.bpmn2.CancelEventDefinition;
import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.CompensateEventDefinition;
@@ -52,6 +54,8 @@ import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.SignalEventDefinition;
import org.eclipse.bpmn2.StartEvent;
+import org.eclipse.bpmn2.SubChoreography;
+import org.eclipse.bpmn2.SubConversation;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.TerminateEventDefinition;
@@ -132,16 +136,26 @@ public class ImageProvider extends AbstractImageProvider {
public static final String IMG_16_DATA_INPUT = PREFIX + DataInput.class.getSimpleName().toLowerCase() + dot16;
public static final String IMG_16_DATA_OUTPUT = PREFIX + DataOutput.class.getSimpleName().toLowerCase() + dot16;
public static final String IMG_16_CALL_ACTIVITY = PREFIX + CallActivity.class.getSimpleName().toLowerCase() + dot16;
+
+ public static final String IMG_16_CALL_GLOBAL_TASK = PREFIX + "CallGlobalTask" + dot16;
+ public static final String IMG_16_CALL_GLOBAL_BUSINESS_RULE_TASK = PREFIX + "CallGlobalBusinessRuleTask" + dot16;
+ public static final String IMG_16_CALL_GLOBAL_MANUAL_TASK = PREFIX + "CallGlobalManualTask" + dot16;
+ public static final String IMG_16_CALL_GLOBAL_SCRIPT_TASK= PREFIX + "CallGlobalScriptTask" + dot16;
+ public static final String IMG_16_CALL_GLOBAL_USER_TASK = PREFIX + "CallGlobalUserTask" + dot16;
+
public static final String IMG_16_CONVERSATION = PREFIX + Conversation.class.getSimpleName().toLowerCase() + dot16;
- public static final String IMG_16_CONVERSATION_LINK = PREFIX + ConversationLink.class.getSimpleName().toLowerCase()
- + dot16;
- public static final String IMG_16_CHOREOGRAPHY_TASK = PREFIX + ChoreographyTask.class.getSimpleName().toLowerCase()
- + dot16;
+ public static final String IMG_16_SUB_CONVERSATION = PREFIX + SubConversation.class.getSimpleName().toLowerCase() + dot16;
+ public static final String IMG_16_CALL_CONVERSATION = PREFIX + CallConversation.class.getSimpleName().toLowerCase() + dot16;
- public static final String IMG_20_CONDITION = PREFIX
- + ConditionalEventDefinition.class.getSimpleName().toLowerCase() + dot20;
+
+ public static final String IMG_16_CONVERSATION_LINK = PREFIX + ConversationLink.class.getSimpleName().toLowerCase() + dot16;
+ public static final String IMG_16_CHOREOGRAPHY_TASK = PREFIX + ChoreographyTask.class.getSimpleName().toLowerCase() + dot16;
+ public static final String IMG_16_SUB_CHOREOGRAPHY = PREFIX + SubChoreography.class.getSimpleName().toLowerCase() + dot16;
+ public static final String IMG_16_CALL_CHOREOGRAPHY = PREFIX + CallChoreography.class.getSimpleName().toLowerCase() + dot16;
+
+ public static final String IMG_20_CONDITION = PREFIX + ConditionalEventDefinition.class.getSimpleName().toLowerCase() + dot20;
public static final String IMG_20_TIMER = PREFIX + TimerEventDefinition.class.getSimpleName().toLowerCase() + dot20;
- public static final String IMG_20_MULTIPLE = PREFIX + "multipleeventdefinition" + dot20; // FIXME //$NON-NLS-1$
+ public static final String IMG_20_MULTIPLE = PREFIX + "multipleeventdefinition" + dot20; //$NON-NLS-1$
public static final String IMG_16_ACTION = "default_action"; //$NON-NLS-1$
@@ -158,7 +172,8 @@ public class ImageProvider extends AbstractImageProvider {
public static final String IMG_16_PUSHDOWN = PREFIX + "pushdown" + dot16; //$NON-NLS-1$
public static final String IMG_16_PULLUP = PREFIX + "pullup" + dot16; //$NON-NLS-1$
- public final String IMG_16_PROPERTIES = "org.eclipse.bpmn2.modeler.icons." + "properties" + dot16; //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String IMG_16_PROPERTIES = "org.eclipse.bpmn2.modeler.icons." + "properties" + dot16; //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String IMG_16_INFO = "org.eclipse.bpmn2.modeler.icons." + "info" + dot16; //$NON-NLS-1$ //$NON-NLS-2$
public static final String IMG_16_MORPH = PREFIX + "morph" + dot16; //$NON-NLS-1$
@@ -208,9 +223,20 @@ public class ImageProvider extends AbstractImageProvider {
addImageFilePath(IMG_16_DATA_INPUT, ICONS_16 + "DataInput.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_DATA_OUTPUT, ICONS_16 + "DataOutput.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_CALL_ACTIVITY, ICONS_16 + "CallActivity.png"); //$NON-NLS-1$
+
+ addImageFilePath(IMG_16_CALL_GLOBAL_TASK, ICONS_16 + "CallGlobalTask.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_CALL_GLOBAL_BUSINESS_RULE_TASK, ICONS_16 + "CallGlobalBusinessRuleTask.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_CALL_GLOBAL_MANUAL_TASK, ICONS_16 + "CallGlobalManualTask.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_CALL_GLOBAL_SCRIPT_TASK, ICONS_16 + "CallGlobalScriptTask.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_CALL_GLOBAL_USER_TASK, ICONS_16 + "CallGlobalUserTask.png"); //$NON-NLS-1$
+
addImageFilePath(IMG_16_CONVERSATION, ICONS_16 + "Conversation.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_SUB_CONVERSATION, ICONS_16 + "SubConversation.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_CALL_CONVERSATION, ICONS_16 + "CallConversation.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_CONVERSATION_LINK, ICONS_16 + "ConversationLink.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_CHOREOGRAPHY_TASK, ICONS_16 + "ChoreographyTask.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_SUB_CHOREOGRAPHY, ICONS_16 + "SubChoreography.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_CALL_CHOREOGRAPHY, ICONS_16 + "CallChoreography.png"); //$NON-NLS-1$
addImageFilePath(IMG_20_CONDITION, ICONS_20 + "Condition.png"); //$NON-NLS-1$
addImageFilePath(IMG_20_TIMER, ICONS_20 + "Timer.png"); //$NON-NLS-1$
@@ -226,6 +252,7 @@ public class ImageProvider extends AbstractImageProvider {
addImageFilePath(IMG_16_REMOVE_MESSAGE, ICONS_16 + "removemessage.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_ROTATE, ICONS_16 + "rotate.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_PROPERTIES, ICONS_16 + "properties.png"); //$NON-NLS-1$
+ addImageFilePath(IMG_16_INFO, ICONS_16 + "info.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_WHITEBOX, ICONS_16 + "whitebox.png"); //$NON-NLS-1$
addImageFilePath(IMG_16_BLACKBOX, ICONS_16 + "blackbox.png"); //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java
index 73623e37..0787fa9e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Messages.java
@@ -28,71 +28,39 @@ public class Messages extends NLS {
public static String SchemaImportDialog_15;
public static String SchemaImportDialog_16;
-
public static String SchemaImportDialog_20;
public static String SchemaImportDialog_BPMN2_Button;
-
public static String SchemaImportDialog_Browse_BPMN2_Title;
-
public static String SchemaImportDialog_Browse_Button;
-
public static String SchemaImportDialog_Browse_Java_Title;
-
public static String SchemaImportDialog_Browse_WSDL_Title;
-
public static String SchemaImportDialog_Browse_XML_Title;
-
public static String SchemaImportDialog_Browse_XSD_Title;
-
public static String SchemaImportDialog_File_System_Button;
-
public static String SchemaImportDialog_Import_Source_Title;
-
public static String SchemaImportDialog_Import_Type_Title;
-
public static String SchemaImportDialog_Interfaces_Label;
-
public static String SchemaImportDialog_Invalid_Location;
-
public static String SchemaImportDialog_Java_Button;
-
public static String SchemaImportDialog_Java_Types_Label;
-
public static String SchemaImportDialog_Load_Button;
-
public static String SchemaImportDialog_Load_Failed_Message;
-
public static String SchemaImportDialog_Loaded_Message;
-
public static String SchemaImportDialog_Loading_Message;
-
public static String SchemaImportDialog_Location_Label;
-
public static String SchemaImportDialog_Ports_Title;
-
public static String SchemaImportDialog_Select_Java_Message;
-
public static String SchemaImportDialog_Select_Resource_Title;
-
public static String SchemaImportDialog_Structure_Label;
-
public static String SchemaImportDialog_Type_Label;
-
public static String SchemaImportDialog_Types_Label;
-
public static String SchemaImportDialog_URL_Button;
-
public static String SchemaImportDialog_Workspace_Button;
-
public static String SchemaImportDialog_WSDL_Button;
-
public static String SchemaImportDialog_XSD_Button;
-
public static String XSDSchemaTreeNode_1;
public static String XSDSchemaTreeNode_0;
-
public static String ModelTreeLabelProvider_s1_s2;
-
public static String InputMessageAdapter_0;
public static String MessageAdapter_Message_1;
public static String OperationAdapter_Operation_1;
@@ -109,126 +77,121 @@ public class Messages extends NLS {
public static String XSDTypeDefinitionAdapter_XSD_Type_1;
public static String XSDSimpleTypeDefinitionAdapter_0;
- public static String Bpmn2EditorAppearancePreferencePage_Colors_Group;
-
- public static String Bpmn2EditorAppearancePreferencePage_GraphicalElements_Group;
-
- public static String Bpmn2EditorPreferencePage_Activities;
+ public static String Bpmn2EditorPreferencePage_Colors_Group;
+ public static String Bpmn2EditorPreferencePage_GraphicalElements_Group;
+
+ public static String Bpmn2EditorPreferencePage_GridHeight;
+ public static String Bpmn2EditorPreferencePage_GridWidth;
+ public static String Bpmn2EditorPreferencePage_SnapToGrid;
+ public static String Bpmn2EditorPreferencePage_DefaultHeight;
+ public static String Bpmn2EditorPreferencePage_DefaultWidth;
+ public static String Bpmn2EditorPreferencePage_UseDefaultSize;
+
public static String Bpmn2EditorPreferencePage_Change_Button;
-
- public static String Bpmn2EditorPreferencePage_Connections;
-
- public static String Bpmn2EditorPreferencePage_Containers;
-
- public static String Bpmn2EditorPreferencePage_Data_Elements;
-
- public static String Bpmn2EditorPreferencePage_Events;
-
public static String Bpmn2EditorPreferencePage_Fill_Color_Label;
-
public static String Bpmn2EditorPreferencePage_Foreground_Color_Label;
-
- public static String Bpmn2EditorPreferencePage_Gateways;
-
public static String Bpmn2EditorPreferencePage_Label_Color_Label;
-
public static String Bpmn2EditorPreferencePage_Label_Font_Label;
-
public static String Bpmn2EditorPreferencePage_MultiSelected_Color_Label;
-
public static String Bpmn2EditorPreferencePage_Override_Size_Label;
-
public static String Bpmn2EditorPreferencePage_Routing_Style_Label;
-
+ public static String Bpmn2EditorPreferencePage_Label_Location_Label;
public static String Bpmn2EditorPreferencePage_Selected_Color_Label;
-
public static String Bpmn2HomePreferencePage_Default_DI_Values_Title;
-
public static String Bpmn2PreferencePage_HomePage_Description;
-
public static String Bpmn2PropertyPage_HomePage_Description;
-
public static String CommonLabels_Data_Type;
-
public static String DefaultSchemaImportDialog_All;
-
public static String DefaultSchemaImportDialog_BPMN2_Filter_1;
-
public static String DefaultSchemaImportDialog_BPMN2_Filter_2;
-
public static String DefaultSchemaImportDialog_BPMN2_Type;
-
public static String DefaultSchemaImportDialog_Java_Filter_1;
-
public static String DefaultSchemaImportDialog_Java_Filter_2;
-
public static String DefaultSchemaImportDialog_Java_Filter_3;
-
public static String DefaultSchemaImportDialog_Missing_Namespace_Message;
-
public static String DefaultSchemaImportDialog_WSDL_Filter;
-
public static String DefaultSchemaImportDialog_WSDL_Type;
-
public static String DefaultSchemaImportDialog_XML_Filter;
-
public static String DefaultSchemaImportDialog_XSD_Filter;
-
public static String DefaultSchemaImportDialog_XSD_Type;
-
- public static String UI_UnknownDiagram_long_description;
- public static String UI_Process_long_description;
- public static String UI_Choreography_long_description;
- public static String UI_Collaboration_long_description;
-
- public static String UI_SequenceFlow_long_description;
- public static String UI_MessageFlow_long_description;
- public static String UI_Association_long_description;
- public static String UI_Annotation_long_description;
- public static String UI_Task_long_description;
- public static String UI_ManualTask_long_description;
- public static String UI_UserTask_long_description;
- public static String UI_BusinessRuleTask_long_description;
- public static String UI_ServiceTask_long_description;
- public static String UI_SendTask_long_description;
- public static String UI_ReceiveTask_long_description;
- public static String UI_ChoreographyTask_long_description;
- public static String UI_ScriptTask_long_description;
-
- public static String UI_StartEvent_long_description;
- public static String UI_EndEvent_long_description;
- public static String UI_IntermediateThrowEvent_long_description;
- public static String UI_IntermediateCatchEvent_long_description;
- public static String UI_BoundaryEvent_long_description;
- public static String UI_DataStore_long_description;
- public static String UI_DataInput_long_description;
- public static String UI_DataOutput_long_description;
- public static String UI_Message_long_description;
+ public static String UI_UnknownDiagram_description;
+ public static String UI_Process_description;
+ public static String UI_Choreography_description;
+ public static String UI_Collaboration_description;
+ public static String UI_SequenceFlow_description;
+ public static String UI_MessageFlow_description;
+ public static String UI_Association_description;
+ public static String UI_Annotation_description;
+ public static String UI_Task_description;
+ public static String UI_ManualTask_description;
+ public static String UI_UserTask_description;
+ public static String UI_BusinessRuleTask_description;
+ public static String UI_ServiceTask_description;
+ public static String UI_SendTask_description;
+ public static String UI_ReceiveTask_description;
+ public static String UI_Task_tooltip;
+ public static String UI_ManualTask_tooltip;
+ public static String UI_UserTask_tooltip;
+ public static String UI_BusinessRuleTask_tooltip;
+ public static String UI_ServiceTask_tooltip;
+ public static String UI_SendTask_tooltip;
+ public static String UI_ReceiveTask_tooltip;
+ public static String UI_ChoreographyTask_description;
+ public static String UI_ScriptTask_description;
+ public static String UI_StartEvent_description;
+ public static String UI_EndEvent_description;
+ public static String UI_IntermediateThrowEvent_description;
+ public static String UI_IntermediateCatchEvent_description;
+ public static String UI_BoundaryEvent_description;
+ public static String UI_DataStore_description;
+ public static String UI_DataStoreReference_description;
+ public static String UI_DataInput_description;
+ public static String UI_DataOutput_description;
+ public static String UI_DataObject_description;
+ public static String UI_DataObjectReference_description;
+ public static String UI_ItemDefinition_description;
+ public static String UI_Message_description;
+ public static String UI_Error_description;
+ public static String UI_Signal_description;
+ public static String UI_Escalation_description;
+ public static String UI_EndPoint_description;
+ public static String UI_Category_description;
+ public static String UI_Interface_description;
+ public static String UI_Operation_description;
+ public static String UI_CancelEventDefinition_description;
+ public static String UI_CompensateEventDefinition_description;
- public static String UI_ExclusiveGateway_long_description;
- public static String UI_InclusiveGateway_long_description;
- public static String UI_ParallelGateway_long_description;
- public static String UI_EventBasedGateway_long_description;
- public static String UI_ComplexGateway_long_description;
-
- public static String UI_Participant_long_description;
- public static String UI_ParticipantBand_long_description;
- public static String UI_Lane_long_description;
- public static String UI_SubProcess_long_description;
- public static String UI_Transaction_long_description;
- public static String UI_ConversationLink_long_description;
- public static String UI_CallChoreography_long_description;
- public static String UI_AdHocSubProcess_long_description;
-
- public static String UI_Group_long_description;
- public static String UI_SubChoreography_long_description;
- public static String UI_CallActivity_long_description;
- public static String UI_Conversation_long_description;
- public static String UI_CallConversation_long_description;
- public static String UI_SubConversation_long_description;
- public static String UI_TextAnnotation_long_description;
-
+ // TODO: add descriptions for these in messages.properties
+ public static String UI_ConditionalEventDefinition_description;
+ public static String UI_ErrorEventDefinition_description;
+ public static String UI_EscalationEventDefinition_description;
+ public static String UI_LingEventDefinition_description;
+ public static String UI_MessageEventDefinition_description;
+ public static String UI_SignalEventDefinition_description;
+ public static String UI_TerminateEventDefinition_description;
+ public static String UI_TimerEventDefinition_description;
+
+ public static String UI_ExclusiveGateway_description;
+ public static String UI_InclusiveGateway_description;
+ public static String UI_ParallelGateway_description;
+ public static String UI_EventBasedGateway_description;
+ public static String UI_ComplexGateway_description;
+ public static String UI_Participant_description;
+ public static String UI_ParticipantBand_description;
+ public static String UI_Lane_description;
+ public static String UI_SubProcess_description;
+ public static String UI_Transaction_description;
+ public static String UI_ConversationLink_description;
+ public static String UI_CallChoreography_description;
+ public static String UI_AdHocSubProcess_description;
+ public static String UI_Group_description;
+ public static String UI_SubChoreography_description;
+ public static String UI_CallActivity_description;
+ public static String UI_Conversation_description;
+ public static String UI_CallConversation_description;
+ public static String UI_SubConversation_description;
+ public static String UI_TextAnnotation_description;
public static String UI_Any_name_description;
public static String UI_Documentation_text_description;
public static String UI_Any_isForCompensation_description;
@@ -240,7 +203,6 @@ public class Messages extends NLS {
public static String UI_Any_operationRef_description;
public static String UI_Any_messageRef_description;
public static String UI_Any_instantiate_description;
-
public static String UI_Any_itemSubjectRef_description;
public static String UI_Any_itemKind_description;
public static String UI_Any_isCollection_description;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorDiItemProviderAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorDiItemProviderAdapterFactory.java
index d8ba96fe..362c47f5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorDiItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorDiItemProviderAdapterFactory.java
@@ -69,37 +69,40 @@ public class Bpmn2EditorDiItemProviderAdapterFactory extends BpmnDiItemProviderA
return adapter;
adapter = new ExtendedPropertiesAdapter(adapterFactory,object);
- adapter.setObjectDescriptor(new ObjectDescriptor(adapterFactory, object) {
+ adapter.setObjectDescriptor(new ObjectDescriptor(adapter, object) {
@Override
- public String getLabel(Object context) {
- EObject object = adopt(context);
+ public String getLabel() {
ExtendedPropertiesAdapter adapter = getBpmnElementAdapter(object);
if (adapter!=null) {
BaseElement bpmnElement = getBpmnElement(object);
if (bpmnElement!=null)
- return adapter.getObjectDescriptor().getLabel(context);
+ return adapter.getObjectDescriptor().getLabel();
}
if (ModelUtil.isStringWrapper(object)) {
return Messages.CommonLabels_Data_Type;
}
- return super.getLabel(context);
+ return super.getLabel();
}
@Override
- public String getDisplayName(Object context) {
- EObject object = adopt(context);
+ public String getTextValue() {
+ if (object instanceof BPMNDiagram) {
+ String name = ((BPMNDiagram)object).getName();
+ if (name!=null && !name.isEmpty())
+ return name;
+ }
ExtendedPropertiesAdapter adapter = getBpmnElementAdapter(object);
if (adapter!=null) {
BaseElement bpmnElement = getBpmnElement(object);
if (bpmnElement!=null)
- return adapter.getObjectDescriptor().getDisplayName(context);
+ return adapter.getObjectDescriptor().getTextValue();
}
if (ModelUtil.isStringWrapper(object)) {
- return ModelUtil.getStringWrapperValue(object);
+ return ModelUtil.getStringWrapperTextValue(object);
}
- return super.getDisplayName(context);
+ return super.getTextValue();
}
});
return adapter;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorItemProviderAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorItemProviderAdapterFactory.java
index 3bf53e15..ad8509b8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2EditorItemProviderAdapterFactory.java
@@ -44,6 +44,7 @@ import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.Gateway;
import org.eclipse.bpmn2.GlobalScriptTask;
+import org.eclipse.bpmn2.Group;
import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.InputOutputSpecification;
import org.eclipse.bpmn2.InputSet;
@@ -93,7 +94,7 @@ import org.eclipse.bpmn2.modeler.ui.adapters.properties.CompensateEventDefinitio
import org.eclipse.bpmn2.modeler.ui.adapters.properties.CorrelationKeyPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.CorrelationPropertyBindingPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.CorrelationPropertyPropertiesAdapter;
-import org.eclipse.bpmn2.modeler.ui.adapters.properties.CorrelationPropertyRetrievalExpressionPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.ui.adapters.properties.CorrelationPropertyREPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.DataAssociationPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.DataInputPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.DataObjectReferencePropertiesAdapter;
@@ -109,6 +110,7 @@ import org.eclipse.bpmn2.modeler.ui.adapters.properties.EventPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.FlowElementPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.FormalExpressionPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.GlobalScriptTaskPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.ui.adapters.properties.GroupPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.ImportPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.InputSetPropertiesAdapter;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.InterfacePropertiesAdapter;
@@ -162,7 +164,7 @@ public class Bpmn2EditorItemProviderAdapterFactory extends Bpmn2ItemProviderAdap
public Adapter adaptNew(Notifier object, Object type) {
if (type == ExtendedPropertiesAdapter.class && object instanceof EObject) {
Adapter adapter = bpmn2ModelSwitch.doSwitch((EObject) object);
- if (adapter!=null && !(object instanceof EClass)) {
+ if (adapter!=null && !(object instanceof EClass) && !((EObject)object).eAdapters().contains(adapter)) {
((EObject)object).eAdapters().add(adapter);
}
return adapter;
@@ -188,8 +190,8 @@ public class Bpmn2EditorItemProviderAdapterFactory extends Bpmn2ItemProviderAdap
super();
this.adapterFactory = adapterFactory;
// This adapter can handle the <propertyExtension>s from foreign models also!
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()){
- for (PropertyExtensionDescriptor ped : rt.getPropertyExtensions()) {
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()){
+ for (PropertyExtensionDescriptor ped : rt.getPropertyExtensionDescriptors()) {
AdapterRegistry.INSTANCE.registerFactory(ped.getInstanceClass(), adapterFactory);
}
}
@@ -211,7 +213,8 @@ public class Bpmn2EditorItemProviderAdapterFactory extends Bpmn2ItemProviderAdap
*
* If no adapter is found for the given EObject, a generic one is constructed and returned.
*/
- @Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
public ExtendedPropertiesAdapter defaultCase(EObject object) {
ExtendedPropertiesAdapter adapter = null;
if (object instanceof EClass) {
@@ -259,27 +262,21 @@ public class Bpmn2EditorItemProviderAdapterFactory extends Bpmn2ItemProviderAdap
if (adapter==null) {
adapter = new ExtendedPropertiesAdapter(adapterFactory,object);
- adapter.setObjectDescriptor(new ObjectDescriptor(adapterFactory, object) {
+ adapter.setObjectDescriptor(new ObjectDescriptor(adapter,object) {
@Override
- public String getLabel(Object context) {
- EObject object = this.object;
- if (context instanceof EObject)
- object = (EObject)context;
+ public String getLabel() {
if (ModelUtil.isStringWrapper(object)) {
return Messages.CommonLabels_Data_Type;
}
- return super.getLabel(context);
+ return super.getLabel();
}
@Override
- public String getDisplayName(Object context) {
- EObject object = this.object;
- if (context instanceof EObject)
- object = (EObject)context;
+ public String getTextValue() {
if (ModelUtil.isStringWrapper(object)) {
- return ModelUtil.getStringWrapperValue(object);
+ return ModelUtil.getStringWrapperTextValue(object);
}
- return super.getDisplayName(context);
+ return super.getTextValue();
}
});
}
@@ -461,7 +458,7 @@ public class Bpmn2EditorItemProviderAdapterFactory extends Bpmn2ItemProviderAdap
ExtendedPropertiesAdapter adapter = getTargetRuntimeAdapter(object);
if (adapter!=null)
return adapter;
- return new CorrelationPropertyRetrievalExpressionPropertiesAdapter(adapterFactory,object);
+ return new CorrelationPropertyREPropertiesAdapter(adapterFactory,object);
}
@Override
@@ -757,5 +754,13 @@ public class Bpmn2EditorItemProviderAdapterFactory extends Bpmn2ItemProviderAdap
return new DocumentationPropertiesAdapter(adapterFactory,object);
}
+ @Override
+ public ExtendedPropertiesAdapter caseGroup(Group object) {
+ ExtendedPropertiesAdapter adapter = getTargetRuntimeAdapter(object);
+ if (adapter!=null)
+ return adapter;
+ return new GroupPropertiesAdapter(adapterFactory,object);
+ }
+
};
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2WSDLAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2WSDLAdapterFactory.java
index f4caaf65..f4caaf65 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2WSDLAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2WSDLAdapterFactory.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2XSDAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2XSDAdapterFactory.java
index 65ddb5d2..65ddb5d2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2XSDAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/Bpmn2XSDAdapterFactory.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/DefinitionAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/DefinitionAdapter.java
index 5220c4fa..5220c4fa 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/DefinitionAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/DefinitionAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/FaultAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/FaultAdapter.java
index fa093679..fa093679 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/FaultAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/FaultAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/ILabeledElement.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/ILabeledElement.java
index 17a795dd..17a795dd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/ILabeledElement.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/ILabeledElement.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/INamedElement.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/INamedElement.java
index 4497f077..4497f077 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/INamedElement.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/INamedElement.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/InputMessageAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/InputMessageAdapter.java
index c9718a38..c9718a38 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/InputMessageAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/InputMessageAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/MessageAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/MessageAdapter.java
index 70e793f3..70e793f3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/MessageAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/MessageAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OperationAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OperationAdapter.java
index efb22c5a..efb22c5a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OperationAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OperationAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OutputMessageAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OutputMessageAdapter.java
index 17c866ce..17c866ce 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OutputMessageAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/OutputMessageAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PartAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PartAdapter.java
index 69d0b2c1..69d0b2c1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PartAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PartAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PortTypeAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PortTypeAdapter.java
index d33f31d5..d33f31d5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PortTypeAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/PortTypeAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAbstractAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAbstractAdapter.java
index 218f99e6..ffc3c87e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAbstractAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAbstractAdapter.java
@@ -18,6 +18,7 @@ import java.util.Map;
import org.eclipse.bpmn2.modeler.core.adapters.AbstractAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.IStatefullAdapter;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.IConstants;
import org.eclipse.emf.ecore.EObject;
@@ -46,7 +47,7 @@ public class XSDAbstractAdapter extends AbstractAdapter
// if this is
if (context instanceof EObject) {
EObject eObject = (EObject) context;
- return ModelUtil.getNamespacePrefix(eObject, namespace);
+ return NamespaceUtil.getNamespacePrefix(eObject, namespace);
} else if (context instanceof Map) {
return (String) ((Map)context).get(namespace);
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAttributeDeclarationAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAttributeDeclarationAdapter.java
index f9fb75de..f9fb75de 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAttributeDeclarationAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDAttributeDeclarationAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDComplexTypeDefinitionAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDComplexTypeDefinitionAdapter.java
index d57156a5..d57156a5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDComplexTypeDefinitionAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDComplexTypeDefinitionAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDElementDeclarationAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDElementDeclarationAdapter.java
index ce5a5e7e..ce5a5e7e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDElementDeclarationAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDElementDeclarationAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSchemaAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSchemaAdapter.java
index a0306193..a0306193 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSchemaAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSchemaAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSimpleTypeDefinitionAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSimpleTypeDefinitionAdapter.java
index c14707ce..c14707ce 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSimpleTypeDefinitionAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDSimpleTypeDefinitionAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDTypeDefinitionAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDTypeDefinitionAdapter.java
index 23c215b8..23c215b8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDTypeDefinitionAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/XSDTypeDefinitionAdapter.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java
new file mode 100644
index 00000000..cecdf51c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ActivityPropertiesAdapter.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.adapters.properties;
+
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.AdHocSubProcess;
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
+import org.eclipse.bpmn2.StandardLoopCharacteristics;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class ActivityPropertiesAdapter<T extends Activity> extends ExtendedPropertiesAdapter<T> {
+
+ /**
+ * @param adapterFactory
+ * @param object
+ */
+ public ActivityPropertiesAdapter(AdapterFactory adapterFactory, T object) {
+ super(adapterFactory, object);
+
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getActivity_LoopCharacteristics();
+ setProperty(feature, UI_CAN_CREATE_NEW, Boolean.FALSE);
+ setProperty(feature, UI_CAN_EDIT, Boolean.FALSE);
+ setFeatureDescriptor(feature,
+ new FeatureDescriptor<T>(this,object,feature) {
+ @Override
+ protected void internalSet(T object, EStructuralFeature feature, Object value, int index) {
+ if (value instanceof String) {
+ if ("MultiInstanceLoopCharacteristics".equals(value)) {
+ MultiInstanceLoopCharacteristics lc = Bpmn2ModelerFactory.create(getResource(), MultiInstanceLoopCharacteristics.class);
+ value = lc;
+ }
+ else if ("StandardLoopCharacteristics".equals(value)) {
+ StandardLoopCharacteristics lc = Bpmn2ModelerFactory.create(getResource(), StandardLoopCharacteristics.class);
+ value = lc;
+ }
+ }
+ super.internalSet(object, feature, value, index);
+ }
+ }
+ );
+
+ feature = Bpmn2Package.eINSTANCE.getActivity_Properties();
+ setFeatureDescriptor(feature,
+ new FeatureDescriptor<T>(this,object,feature) {
+ @Override
+ public EObject createFeature(Resource resource, EClass eclass) {
+ return PropertyPropertiesAdapter.createProperty(object.getProperties());
+ }
+ }
+ );
+
+ if (object instanceof AdHocSubProcess) {
+ feature = Bpmn2Package.eINSTANCE.getAdHocSubProcess_CompletionCondition();
+ setFeatureDescriptor(feature,
+ new FeatureDescriptor<T>(this,object,feature) {
+ @Override
+ public String getLabel() {
+ return Messages.ActivityPropertiesAdapter_CompletionCondition_Label;
+ }
+ }
+ );
+ }
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/BusinessRuleTaskPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/BusinessRuleTaskPropertiesAdapter.java
index 09e8ddf0..09e8ddf0 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/BusinessRuleTaskPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/BusinessRuleTaskPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallActivityPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallActivityPropertiesAdapter.java
index 35a0db10..818a062e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallActivityPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallActivityPropertiesAdapter.java
@@ -25,6 +25,7 @@ import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.DocumentRoot;
import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -51,15 +52,15 @@ public class CallActivityPropertiesAdapter extends ActivityPropertiesAdapter<Cal
setProperty(ce, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setFeatureDescriptor(ce,
- new RootElementRefFeatureDescriptor<CallActivity>(adapterFactory,object,ce) {
+ new RootElementRefFeatureDescriptor<CallActivity>(this,object,ce) {
+
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return Messages.CallActivityPropertiesAdapter_Called_Activity;
}
@Override
- public String getDisplayName(Object context) {
- CallActivity object = adopt(context);
+ public String getTextValue() {
CallableElement ce = object.getCalledElementRef();
if (ce!=null && ce.eIsProxy()) {
URI uri = ((InternalEObject)ce).eProxyURI();
@@ -67,12 +68,11 @@ public class CallActivityPropertiesAdapter extends ActivityPropertiesAdapter<Cal
return uri.fragment();
return uri.lastSegment();
}
- return super.getDisplayName(context);
+ return super.getTextValue();
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final CallActivity activity = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> choices = new Hashtable<String,Object>();
String label;
Definitions defs = ModelUtil.getDefinitions(object);
@@ -80,7 +80,7 @@ public class CallActivityPropertiesAdapter extends ActivityPropertiesAdapter<Cal
// first add all local processes and global whatnots
List<CallableElement> localProcesses = ModelUtil.getAllRootElements(defs, CallableElement.class);
for (CallableElement elem : localProcesses) {
- label = ModelUtil.getDisplayName(elem) + " (" + elem.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ label = ExtendedPropertiesProvider.getTextValue(elem) + " (" + elem.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
choices.put(label, elem);
}
@@ -90,12 +90,12 @@ public class CallActivityPropertiesAdapter extends ActivityPropertiesAdapter<Cal
for (Import imp : imports) {
if (ImportUtil.IMPORT_TYPE_BPMN2.equals(imp.getImportType())) {
// load the process file and look for callable elements
- Object object = importer.loadImport(imp);
- if (object instanceof DocumentRoot) {
- Definitions importDefs = ((DocumentRoot)object).getDefinitions();
+ Object importedObject = importer.loadImport(imp);
+ if (importedObject instanceof DocumentRoot) {
+ Definitions importDefs = ((DocumentRoot)importedObject).getDefinitions();
for (RootElement elem : importDefs.getRootElements()) {
if (elem instanceof CallableElement) {
- label = ModelUtil.getDisplayName(elem) + " (" + imp.getLocation() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ label = ExtendedPropertiesProvider.getTextValue(elem) + " (" + imp.getLocation() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
choices.put(label, elem);
}
}
@@ -104,7 +104,7 @@ public class CallActivityPropertiesAdapter extends ActivityPropertiesAdapter<Cal
}
// remove the Call Activity's owning CallableElement (can't make recursive calls?)
- EObject parent = activity.eContainer();
+ EObject parent = object.eContainer();
while (parent!=null && !(parent instanceof CallableElement)) {
parent = parent.eContainer();
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallChoreographyPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallChoreographyPropertiesAdapter.java
index 58b05a4b..b2ebab63 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallChoreographyPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallChoreographyPropertiesAdapter.java
@@ -26,6 +26,7 @@ import org.eclipse.bpmn2.DocumentRoot;
import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -47,11 +48,10 @@ public class CallChoreographyPropertiesAdapter extends ExtendedPropertiesAdapter
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getCallChoreography_CalledChoreographyRef();
setFeatureDescriptor(ref,
- new RootElementRefFeatureDescriptor<CallChoreography>(adapterFactory,object,ref) {
+ new RootElementRefFeatureDescriptor<CallChoreography>(this,object,ref) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final CallChoreography activity = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> choices = new Hashtable<String,Object>();
String label;
Definitions defs = ModelUtil.getDefinitions(object);
@@ -59,7 +59,7 @@ public class CallChoreographyPropertiesAdapter extends ExtendedPropertiesAdapter
// first add all local Choreographies
List<Choreography> localChoreographies = ModelUtil.getAllRootElements(defs, Choreography.class);
for (Choreography elem : localChoreographies) {
- label = ModelUtil.getDisplayName(elem) + " (" + elem.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ label = ExtendedPropertiesProvider.getTextValue(elem) + " (" + elem.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
choices.put(label, elem);
}
@@ -74,7 +74,7 @@ public class CallChoreographyPropertiesAdapter extends ExtendedPropertiesAdapter
Definitions importDefs = ((DocumentRoot)object).getDefinitions();
for (RootElement elem : importDefs.getRootElements()) {
if (elem instanceof Choreography) {
- label = ModelUtil.getDisplayName(elem) + " (" + imp.getLocation() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ label = ExtendedPropertiesProvider.getTextValue(elem) + " (" + imp.getLocation() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
choices.put(label, elem);
}
}
@@ -83,7 +83,7 @@ public class CallChoreographyPropertiesAdapter extends ExtendedPropertiesAdapter
}
// remove the Call Choreography's owning Choreography (can't make recursive calls?)
- EObject parent = activity.eContainer();
+ EObject parent = object.eContainer();
while (parent!=null && !(parent instanceof RootElement)) {
parent = parent.eContainer();
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallConversationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallConversationPropertiesAdapter.java
index b1a7e77a..fd39b955 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallConversationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CallConversationPropertiesAdapter.java
@@ -26,6 +26,7 @@ import org.eclipse.bpmn2.DocumentRoot;
import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -47,11 +48,10 @@ public class CallConversationPropertiesAdapter extends ExtendedPropertiesAdapter
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getCallConversation_CalledCollaborationRef();
setFeatureDescriptor(ref,
- new RootElementRefFeatureDescriptor<CallConversation>(adapterFactory,object,ref) {
+ new RootElementRefFeatureDescriptor<CallConversation>(this,object,ref) {
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final CallConversation activity = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> choices = new Hashtable<String,Object>();
String label;
Definitions defs = ModelUtil.getDefinitions(object);
@@ -59,7 +59,7 @@ public class CallConversationPropertiesAdapter extends ExtendedPropertiesAdapter
// first add all local Collaborations
List<Collaboration> localCollaborations = ModelUtil.getAllRootElements(defs, Collaboration.class);
for (Collaboration elem : localCollaborations) {
- label = ModelUtil.getDisplayName(elem) + " (" + elem.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ label = ExtendedPropertiesProvider.getTextValue(elem) + " (" + elem.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
choices.put(label, elem);
}
@@ -69,12 +69,12 @@ public class CallConversationPropertiesAdapter extends ExtendedPropertiesAdapter
for (Import imp : imports) {
if (ImportUtil.IMPORT_TYPE_BPMN2.equals(imp.getImportType())) {
// load the bpmn file and look for Collaborations
- Object object = importer.loadImport(imp);
- if (object instanceof DocumentRoot) {
- Definitions importDefs = ((DocumentRoot)object).getDefinitions();
+ Object importedObject = importer.loadImport(imp);
+ if (importedObject instanceof DocumentRoot) {
+ Definitions importDefs = ((DocumentRoot)importedObject).getDefinitions();
for (RootElement elem : importDefs.getRootElements()) {
if (elem instanceof Collaboration) {
- label = ModelUtil.getDisplayName(elem) + " (" + imp.getLocation() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ label = ExtendedPropertiesProvider.getTextValue(elem) + " (" + imp.getLocation() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
choices.put(label, elem);
}
}
@@ -83,7 +83,7 @@ public class CallConversationPropertiesAdapter extends ExtendedPropertiesAdapter
}
// remove the Call Collaboration's owning Collaboration (can't make recursive calls?)
- EObject parent = activity.eContainer();
+ EObject parent = object.eContainer();
while (parent!=null && !(parent instanceof RootElement)) {
parent = parent.eContainer();
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CatchEventPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CatchEventPropertiesAdapter.java
index c060205e..2184f31b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CatchEventPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CatchEventPropertiesAdapter.java
@@ -17,7 +17,7 @@ import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.DataOutput;
import org.eclipse.bpmn2.OutputSet;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.emf.common.notify.AdapterFactory;
@@ -42,21 +42,31 @@ public class CatchEventPropertiesAdapter extends EventPropertiesAdapter<CatchEve
EStructuralFeature feature;
feature = Bpmn2Package.eINSTANCE.getCatchEvent_DataOutputs();
- setFeatureDescriptor(feature, new FeatureDescriptor<CatchEvent>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new FeatureDescriptor<CatchEvent>(this, object, feature) {
@Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- final CatchEvent catchEvent = adopt(context);
- OutputSet outputSet = catchEvent.getOutputSet();
+ public EObject createFeature(Resource resource, EClass eclass) {
+ OutputSet outputSet = object.getOutputSet();
if (outputSet==null) {
outputSet = Bpmn2ModelerFactory.create(OutputSet.class);
- catchEvent.setOutputSet(outputSet);
+ object.setOutputSet(outputSet);
}
- DataOutput dataOutput = DataOutputPropertiesAdapter.createDataOutput(resource, catchEvent.getDataOutputs());
+ DataOutput dataOutput = DataOutputPropertiesAdapter.createDataOutput(resource, object.getDataOutputs());
outputSet.getDataOutputRefs().add(dataOutput);
return dataOutput;
}
});
+
+ if (object instanceof StartEvent) {
+ feature = Bpmn2Package.eINSTANCE.getStartEvent_IsInterrupting();
+ setFeatureDescriptor(feature, new FeatureDescriptor<CatchEvent>(this, object, feature) {
+
+ @Override
+ public String getLabel() {
+ return "Cancel Activity";
+ }
+ });
+ }
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CategoryValuePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CategoryValuePropertiesAdapter.java
index c36ae434..58a0668c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CategoryValuePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CategoryValuePropertiesAdapter.java
@@ -16,6 +16,7 @@ package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Category;
import org.eclipse.bpmn2.CategoryValue;
+import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
@@ -43,11 +44,10 @@ public class CategoryValuePropertiesAdapter extends ExtendedPropertiesAdapter<Ca
setProperty(Bpmn2Package.eINSTANCE.getCategoryValue_CategorizedFlowElements(), UI_CAN_EDIT, Boolean.FALSE);
setFeatureDescriptor(ref,
- new FeatureDescriptor<CategoryValue>(adapterFactory,object,ref) {
+ new FeatureDescriptor<CategoryValue>(this, object,ref) {
@Override
- public String getDisplayName(Object context) {
- CategoryValue categoryValue = adopt(context);
- return CategoryValuePropertiesAdapter.getDisplayName(categoryValue);
+ public String getTextValue() {
+ return CategoryValuePropertiesAdapter.getDisplayName(object);
}
@Override
@@ -56,32 +56,30 @@ public class CategoryValuePropertiesAdapter extends ExtendedPropertiesAdapter<Ca
}
@Override
- public void setValue(Object context, Object value) {
- CategoryValue categoryValue = adopt(context);
+ protected void internalSet(CategoryValue categoryValue, EStructuralFeature feature, Object value, int index) {
if (value instanceof String) {
- int i = ((String) value).indexOf(":");
+ int i = ((String) value).indexOf(":"); //$NON-NLS-1$
if (i>=0)
value = ((String) value).substring(i+1);
}
- super.setValue(context, value);
+ super.internalSet(categoryValue, feature, value, index);
}
}
);
- setObjectDescriptor(new ObjectDescriptor<CategoryValue>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<CategoryValue>(this, object) {
@Override
- public String getDisplayName(Object context) {
- CategoryValue categoryValue = adopt(context);
- return CategoryValuePropertiesAdapter.getDisplayName(categoryValue);
+ public String getTextValue() {
+ return CategoryValuePropertiesAdapter.getDisplayName(object);
}
});
}
private static String getDisplayName(CategoryValue categoryValue) {
Category category = (Category) categoryValue.eContainer();
- String prefix = category==null ? "" : category.getName() + ":";
+ String prefix = (category==null || category.getName()==null) ? "" : category.getName() + ":"; //$NON-NLS-1$
String suffix = categoryValue.getValue();
return prefix + suffix;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CompensateEventDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CompensateEventDefinitionPropertiesAdapter.java
index 0e6fefc9..0e6fefc9 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CompensateEventDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CompensateEventDefinitionPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationKeyPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationKeyPropertiesAdapter.java
index 804f00cb..3b6e2819 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationKeyPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationKeyPropertiesAdapter.java
@@ -33,7 +33,7 @@ public class CorrelationKeyPropertiesAdapter extends ExtendedPropertiesAdapter<C
super(adapterFactory, object);
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getCorrelationKey_CorrelationPropertyRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<CorrelationKey>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<CorrelationKey>(this,object,ref));
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyBindingPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyBindingPropertiesAdapter.java
index 1eacfac0..515222e6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyBindingPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyBindingPropertiesAdapter.java
@@ -33,7 +33,7 @@ public class CorrelationPropertyBindingPropertiesAdapter extends ExtendedPropert
super(adapterFactory, object);
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getCorrelationPropertyBinding_CorrelationPropertyRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<CorrelationPropertyBinding>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<CorrelationPropertyBinding>(this,object,ref));
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyPropertiesAdapter.java
index 7c1dd605..c746020d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyPropertiesAdapter.java
@@ -33,7 +33,7 @@ public class CorrelationPropertyPropertiesAdapter extends RootElementPropertiesA
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getCorrelationProperty_Type();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<CorrelationProperty>(adapterFactory, object, feature));
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<CorrelationProperty>(this, object, feature));
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyRetrievalExpressionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyREPropertiesAdapter.java
index 5eea4851..e34d6e08 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyRetrievalExpressionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/CorrelationPropertyREPropertiesAdapter.java
@@ -23,17 +23,17 @@ import org.eclipse.emf.ecore.EStructuralFeature;
* @author Bob Brodt
*
*/
-public class CorrelationPropertyRetrievalExpressionPropertiesAdapter extends ExtendedPropertiesAdapter<CorrelationPropertyRetrievalExpression> {
+public class CorrelationPropertyREPropertiesAdapter extends ExtendedPropertiesAdapter<CorrelationPropertyRetrievalExpression> {
/**
* @param adapterFactory
* @param object
*/
- public CorrelationPropertyRetrievalExpressionPropertiesAdapter(AdapterFactory adapterFactory, CorrelationPropertyRetrievalExpression object) {
+ public CorrelationPropertyREPropertiesAdapter(AdapterFactory adapterFactory, CorrelationPropertyRetrievalExpression object) {
super(adapterFactory, object);
- EStructuralFeature ref = Bpmn2Package.eINSTANCE.getCorrelationPropertyRetrievalExpression_MessageRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<CorrelationPropertyRetrievalExpression>(adapterFactory,object,ref));
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getCorrelationPropertyRetrievalExpression_MessageRef();
+ setFeatureDescriptor(feature, new RootElementRefFeatureDescriptor<CorrelationPropertyRetrievalExpression>(this,object,feature));
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java
index ac90361d..ecabf183 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataAssociationPropertiesAdapter.java
@@ -20,6 +20,7 @@ import java.util.List;
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.CallableElement;
+import org.eclipse.bpmn2.CategoryValue;
import org.eclipse.bpmn2.DataAssociation;
import org.eclipse.bpmn2.DataInput;
import org.eclipse.bpmn2.DataInputAssociation;
@@ -40,11 +41,12 @@ import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.features.flow.DataAssociationFeatureContainer;
@@ -88,14 +90,14 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
EStructuralFeature ref;
ref = Bpmn2Package.eINSTANCE.getDataAssociation_SourceRef();
- setFeatureDescriptor(ref, new SourceTargetFeatureDescriptor(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new SourceTargetFeatureDescriptor(this,object,ref));
setProperty(ref, UI_CAN_EDIT_INLINE, Boolean.FALSE);
setProperty(ref, UI_CAN_EDIT, Boolean.FALSE);
setProperty(ref, UI_CAN_CREATE_NEW, Boolean.FALSE);
setProperty(ref, UI_IS_MULTI_CHOICE, Boolean.TRUE);
ref = Bpmn2Package.eINSTANCE.getDataAssociation_TargetRef();
- setFeatureDescriptor(ref, new SourceTargetFeatureDescriptor(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new SourceTargetFeatureDescriptor(this,object,ref));
setProperty(ref, UI_CAN_EDIT_INLINE, Boolean.FALSE);
setProperty(ref, UI_CAN_EDIT, Boolean.FALSE);
setProperty(ref, UI_CAN_CREATE_NEW, Boolean.FALSE);
@@ -104,26 +106,25 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
public class SourceTargetFeatureDescriptor extends FeatureDescriptor<DataAssociation> {
- public SourceTargetFeatureDescriptor(AdapterFactory adapterFactory, DataAssociation object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
+ public SourceTargetFeatureDescriptor(ExtendedPropertiesAdapter<DataAssociation> owner, DataAssociation object,
+ EStructuralFeature feature) {
+ super(owner, object, feature);
}
-
+
@Override
- public String getLabel(Object context) {
- Object object = adopt(context);
+ public String getLabel() {
if (object instanceof DataInputAssociation)
return Messages.DataAssociationPropertiesAdapter_Source;
return Messages.DataAssociationPropertiesAdapter_Target;
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
+ public Hashtable<String, Object> getChoiceOfValues() {
List<EObject> values = new ArrayList<EObject>();
// search for all Properties and DataStores
// Properties are contained in the nearest enclosing Process or Event;
// DataStores are contained in the DocumentRoot
- DataAssociation association = adopt(context);
- EObject container = ModelUtil.getContainer(association);
+ EObject container = ModelUtil.getContainer(object);
values.addAll( ModelUtil.collectAncestorObjects(container, "properties", new Class[] {Activity.class}) ); //$NON-NLS-1$
values.addAll( ModelUtil.collectAncestorObjects(container, "properties", new Class[] {Process.class}) ); //$NON-NLS-1$
values.addAll( ModelUtil.collectAncestorObjects(container, "properties", new Class[] {Event.class}) ); //$NON-NLS-1$
@@ -134,7 +135,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
if (activity!=null) {
InputOutputSpecification ioSpec = activity.getIoSpecification();
if (ioSpec!=null) {
- if (association instanceof DataInputAssociation)
+ if (object instanceof DataInputAssociation)
values.addAll(ioSpec.getDataInputs());
else
values.addAll(ioSpec.getDataOutputs());
@@ -145,7 +146,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
if (callable!=null) {
InputOutputSpecification ioSpec = callable.getIoSpecification();
if (ioSpec!=null) {
- if (association instanceof DataInputAssociation)
+ if (object instanceof DataInputAssociation)
values.addAll(ioSpec.getDataInputs());
else
values.addAll(ioSpec.getDataOutputs());
@@ -153,18 +154,17 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
}
super.setChoiceOfValues(values);
- return super.getChoiceOfValues(context);
+ return super.getChoiceOfValues();
}
@Override
- public EObject createFeature(Resource resource, Object context, EClass eClass) {
- DataAssociation association = adopt(context);
+ public EObject createFeature(Resource resource, EClass eClass) {
// what kind of object should we create? Property or DataStore?
if (eClass==null) {
- if (ModelUtil.findNearestAncestor(association, new Class[] {Process.class, Event.class}) != null)
+ if (ModelUtil.findNearestAncestor(object, new Class[] {Process.class, Event.class}) != null)
// nearest ancestor is a Process or Event, so new object will be a Property
eClass = Bpmn2Package.eINSTANCE.getProperty();
- else if(ModelUtil.findNearestAncestor(association, new Class[] {DocumentRoot.class}) != null)
+ else if(ModelUtil.findNearestAncestor(object, new Class[] {DocumentRoot.class}) != null)
eClass = Bpmn2Package.eINSTANCE.getDataStore();
}
if (eClass!=null) {
@@ -175,9 +175,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
@SuppressWarnings("unchecked")
@Override
- public void setValue(Object context, Object value) {
- final DataAssociation association = adopt(context);
-
+ protected void internalSet(DataAssociation association, EStructuralFeature feature, Object value, int index) {
EObject container = null;
EStructuralFeature containerFeature = null;
if (value instanceof Property) {
@@ -200,7 +198,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
}
else if (value instanceof String) {
// first check if a property with this name already exists
- Hashtable<String, Object> choices = getChoiceOfValues(object);
+ Hashtable<String, Object> choices = getChoiceOfValues();
Property property = (Property)choices.get(value);
if (property==null) {
// need to create a new one!
@@ -221,7 +219,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
containerFeature = container.eClass().getEStructuralFeature("properties"); //$NON-NLS-1$
property = Bpmn2ModelerFactory.create(Property.class);
ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(property);
- adapter.getObjectDescriptor().setDisplayName((String)value);
+ adapter.getObjectDescriptor().setTextValue((String)value);
}
value = property;
}
@@ -230,30 +228,11 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
final EStructuralFeature cf = containerFeature;
final ItemAwareElement v = (ItemAwareElement)value;
- TransactionalEditingDomain editingDomain = getEditingDomain(association);
if (feature == Bpmn2Package.eINSTANCE.getDataAssociation_SourceRef()) {
- if (editingDomain == null) {
- setSourceRef(association, v, c, cf);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- setSourceRef(association, v, c, cf);
- }
- });
- }
+ setSourceRef(association, v, c, cf);
}
else {
- if (editingDomain == null) {
- setTargetRef(association, v, c, cf);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- setTargetRef(association, v, c, cf);
- }
- });
- }
+ setTargetRef(association, v, c, cf);
}
}
@@ -270,6 +249,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
association.getSourceRef().clear();
else
association.getSourceRef().add(value);
+ updateConnectionIfNeeded(association, value);
}
else {
if (container!=null) {
@@ -283,6 +263,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
association.getSourceRef().clear();
else
association.getSourceRef().set(0,value);
+ updateConnectionIfNeeded(association, value);
}
if (association.getTargetRef()!=null) {
ItemAwareElement targetRef = association.getTargetRef();
@@ -290,6 +271,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
targetRef.setItemSubjectRef(value.getItemSubjectRef());
else
targetRef.setItemSubjectRef(null);
+ updateConnectionIfNeeded(association, value);
}
}
@@ -310,22 +292,28 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
else
sourceRef.setItemSubjectRef(null);
}
+ updateConnectionIfNeeded(association, value);
}
private void updateConnectionIfNeeded(DataAssociation association, ItemAwareElement value) {
DiagramEditor diagramEditor = ModelUtil.getDiagramEditor(association);
+ if (diagramEditor==null)
+ return;
+ boolean hasDoneChanges = false;
Diagram diagram = diagramEditor.getDiagramTypeProvider().getDiagram();
IFeatureProvider fp = diagramEditor.getDiagramTypeProvider().getFeatureProvider();
- Shape owner = null;
+ Shape taskShape = null;
EObject container = association.eContainer();
if (container instanceof Activity || container instanceof Event) {
for (PictogramElement pe : Graphiti.getLinkService().getPictogramElements(diagram, container)) {
- if (pe instanceof Shape && BusinessObjectUtil.getFirstElementOfType(pe, BPMNShape.class)!=null)
- owner = (Shape) pe;
+ if (pe instanceof Shape && BusinessObjectUtil.getFirstElementOfType(pe, BPMNShape.class)!=null) {
+ taskShape = (Shape) pe;
+ break;
+ }
}
}
- PictogramElement pe = null;
+ Shape dataShape = null;
if (value instanceof DataObject ||
value instanceof DataObjectReference ||
value instanceof DataStore ||
@@ -335,7 +323,7 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
List<PictogramElement> pes = Graphiti.getLinkService().getPictogramElements(diagram, (EObject)value);
for (PictogramElement p : pes) {
if (BusinessObjectUtil.getFirstElementOfType(p, BPMNShape.class)!=null) {
- pe = p;
+ dataShape = (Shape) p;
break;
}
}
@@ -346,28 +334,29 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
// There's an existing DataAssociation connection which needs to
// either be reconnected or deleted, depending on what the combobox
// selection is.
- if (pe!=null) {
+ if (dataShape!=null) {
// need to reconnect the DataAssociation
ReconnectionContext rc = null;
- if (association instanceof DataOutputAssociation) {
+ if (association instanceof DataInputAssociation) {
Point p = GraphicsUtil.createPoint(connection.getStart());
- Anchor a = AnchorUtil.findNearestAnchor((AnchorContainer) pe, p);
+ Anchor a = AnchorUtil.findNearestAnchor((AnchorContainer) dataShape, p);
rc = new ReconnectionContext(connection, connection.getStart(), a, null);
- rc.setTargetPictogramElement(pe);
+ rc.setTargetPictogramElement(dataShape);
rc.setTargetLocation(Graphiti.getPeService().getLocationRelativeToDiagram(a));
- rc.setReconnectType(ReconnectionContext.RECONNECT_TARGET);
+ rc.setReconnectType(ReconnectionContext.RECONNECT_SOURCE);
}
else {
Point p = GraphicsUtil.createPoint(connection.getEnd());
- Anchor a = AnchorUtil.findNearestAnchor(owner, p);
+ Anchor a = AnchorUtil.findNearestAnchor(dataShape, p);
rc = new ReconnectionContext(connection, a, connection.getEnd(), null);
- rc.setTargetPictogramElement(pe);
+ rc.setTargetPictogramElement(dataShape);
rc.setTargetLocation(Graphiti.getPeService().getLocationRelativeToDiagram(a));
- rc.setReconnectType(ReconnectionContext.RECONNECT_SOURCE);
+ rc.setReconnectType(ReconnectionContext.RECONNECT_TARGET);
}
IReconnectionFeature rf = fp.getReconnectionFeature(rc);
if (rf.canReconnect(rc)) {
rf.reconnect(rc);
+ hasDoneChanges = true;
}
}
else {
@@ -378,14 +367,14 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
df.delete(dc);
}
}
- else if (pe!=null){
+ else if (dataShape!=null){
// There is no existing DataAssociation connection, but the newly selected source or target
// is some kind of data object shape, so we need to create a connection between the Activity
// (or Throw/Catch Event) that owns the DataAssociation, and the new data object shape.
- Point p = GraphicsUtil.createPoint((AnchorContainer) pe);
- Anchor ownerAnchor = AnchorUtil.findNearestAnchor(owner, p);
- p = GraphicsUtil.createPoint(owner);
- Anchor peAnchor = AnchorUtil.findNearestAnchor((AnchorContainer) pe, p);
+ Point p = GraphicsUtil.createPoint((AnchorContainer) dataShape);
+ Anchor ownerAnchor = AnchorUtil.findNearestAnchor(taskShape, p);
+ p = GraphicsUtil.createPoint(taskShape);
+ Anchor peAnchor = AnchorUtil.findNearestAnchor((AnchorContainer) dataShape, p);
AddConnectionContext ac = null;
if (association instanceof DataOutputAssociation) {
ac = new AddConnectionContext(ownerAnchor, peAnchor);
@@ -393,13 +382,17 @@ public class DataAssociationPropertiesAdapter extends ExtendedPropertiesAdapter<
else {
ac = new AddConnectionContext(peAnchor, ownerAnchor);
}
- ac.putProperty(ContextConstants.BUSINESS_OBJECT, association);
+ ac.putProperty(GraphitiConstants.BUSINESS_OBJECT, association);
ac.setNewObject(association);
IAddFeature af = fp.getAddFeature(ac);
if (af.canAdd(ac)) {
af.add(ac);
+ hasDoneChanges = true;
}
}
+ if (hasDoneChanges) {
+ FeatureSupport.updateConnection(diagramEditor.getDiagramTypeProvider().getFeatureProvider(), connection);
+ }
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataInputPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataInputPropertiesAdapter.java
index a29b3d90..ab1eac84 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataInputPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataInputPropertiesAdapter.java
@@ -17,6 +17,7 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataInput;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
@@ -38,10 +39,10 @@ public class DataInputPropertiesAdapter extends ItemAwareElementPropertiesAdapte
public DataInputPropertiesAdapter(AdapterFactory adapterFactory, DataInput object) {
super(adapterFactory, object);
EStructuralFeature f = Bpmn2Package.eINSTANCE.getDataInput_Name();
- final FeatureDescriptor<DataInput> fd = new FeatureDescriptor<DataInput>(adapterFactory,object, f) {
+ final FeatureDescriptor<DataInput> fd = new FeatureDescriptor<DataInput>(this,object,f) {
@Override
- public void setDisplayName(String text) {
+ public void setTextValue(String text) {
int i = text.lastIndexOf("/"); //$NON-NLS-1$
if (i>=0)
text = text.substring(i+1);
@@ -59,7 +60,7 @@ public class DataInputPropertiesAdapter extends ItemAwareElementPropertiesAdapte
if (text!=null) {
if (dataInput.isIsCollection())
text += "[]"; //$NON-NLS-1$
- String type = ModelUtil.getDisplayName(dataInput.getItemSubjectRef());
+ String type = ExtendedPropertiesProvider.getTextValue(dataInput.getItemSubjectRef());
if (type!=null)
text += " (" + type + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -69,17 +70,17 @@ public class DataInputPropertiesAdapter extends ItemAwareElementPropertiesAdapte
};
setFeatureDescriptor(f, fd);
- setObjectDescriptor(new ObjectDescriptor<DataInput>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<DataInput>(this,object) {
@Override
- public void setDisplayName(String text) {
- fd.setDisplayName(text);
+ public void setTextValue(String text) {
+ fd.setTextValue(text);
ModelUtil.setID(object);
}
@Override
- public String getDisplayName(Object context) {
- return fd.getChoiceString(context);
+ public String getTextValue() {
+ return fd.getChoiceString(object);
}
});
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataObjectReferencePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataObjectReferencePropertiesAdapter.java
index 80999806..bb576b4f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataObjectReferencePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataObjectReferencePropertiesAdapter.java
@@ -15,9 +15,8 @@ package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataObjectReference;
-import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
/**
@@ -34,7 +33,20 @@ public class DataObjectReferencePropertiesAdapter extends ItemAwareElementProper
super(adapterFactory, object);
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getDataStoreReference_DataStoreRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<DataObjectReference>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<DataObjectReference>(this,object,ref));
+
+ setObjectDescriptor(new ObjectDescriptor<DataObjectReference>(this, object) {
+ @Override
+ public String getTextValue() {
+ String text = super.getTextValue();
+ text += " ["; //$NON-NLS-1$
+ if (object.getDataState()!=null) {
+ text += object.getDataState().getName();
+ }
+ text += "]"; //$NON-NLS-1$
+ return text;
+ }
+ });
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataOutputPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataOutputPropertiesAdapter.java
index 3ea38c28..46198aa2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataOutputPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataOutputPropertiesAdapter.java
@@ -17,6 +17,7 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataOutput;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
@@ -38,10 +39,10 @@ public class DataOutputPropertiesAdapter extends ItemAwareElementPropertiesAdapt
public DataOutputPropertiesAdapter(AdapterFactory adapterFactory, DataOutput object) {
super(adapterFactory, object);
EStructuralFeature f = Bpmn2Package.eINSTANCE.getDataOutput_Name();
- final FeatureDescriptor<DataOutput> fd = new FeatureDescriptor<DataOutput>(adapterFactory,object, f) {
+ final FeatureDescriptor<DataOutput> fd = new FeatureDescriptor<DataOutput>(this,object,f) {
@Override
- public void setDisplayName(String text) {
+ public void setTextValue(String text) {
int i = text.lastIndexOf("/"); //$NON-NLS-1$
if (i>=0)
text = text.substring(i+1);
@@ -59,7 +60,7 @@ public class DataOutputPropertiesAdapter extends ItemAwareElementPropertiesAdapt
if (text!=null) {
if (dataOutput.isIsCollection())
text += "[]"; //$NON-NLS-1$
- String type = ModelUtil.getDisplayName(dataOutput.getItemSubjectRef());
+ String type = ExtendedPropertiesProvider.getTextValue(dataOutput.getItemSubjectRef());
if (type!=null)
text += " (" + type + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -69,17 +70,17 @@ public class DataOutputPropertiesAdapter extends ItemAwareElementPropertiesAdapt
};
setFeatureDescriptor(f, fd);
- setObjectDescriptor(new ObjectDescriptor<DataOutput>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<DataOutput>(this,object) {
@Override
- public void setDisplayName(String text) {
- fd.setDisplayName(text);
+ public void setTextValue(String text) {
+ fd.setTextValue(text);
ModelUtil.setID(object);
}
@Override
- public String getDisplayName(Object context) {
- return fd.getChoiceString(context);
+ public String getTextValue() {
+ return fd.getChoiceString(object);
}
});
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataStoreReferencePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataStoreReferencePropertiesAdapter.java
index 294ef7b5..762881e3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataStoreReferencePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DataStoreReferencePropertiesAdapter.java
@@ -32,7 +32,7 @@ public class DataStoreReferencePropertiesAdapter extends ItemAwareElementPropert
super(adapterFactory, object);
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getDataStoreReference_DataStoreRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<DataStoreReference>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<DataStoreReference>(this,object,ref));
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java
new file mode 100644
index 00000000..5f1aa9a5
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DefinitionsPropertiesAdapter.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.adapters.properties;
+
+import java.util.Hashtable;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.ItemDefinition;
+import org.eclipse.bpmn2.modeler.core.IBpmn2RuntimeExtension;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.runtime.ExpressionLanguageDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.runtime.TypeLanguageDescriptor;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class DefinitionsPropertiesAdapter extends ExtendedPropertiesAdapter<Definitions> {
+
+ /**
+ * @param adapterFactory
+ * @param object
+ */
+ public DefinitionsPropertiesAdapter(AdapterFactory adapterFactory, Definitions object) {
+ super(adapterFactory, object);
+
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getDefinitions_TypeLanguage();
+ setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
+
+ setFeatureDescriptor(feature, new FeatureDescriptor<Definitions>(this,object, feature) {
+
+ @Override
+ protected void internalSet(Definitions object, EStructuralFeature feature, Object value, int index) {
+ super.internalSet(object, feature, value, index);
+ }
+
+ @Override
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String,Object> choices = new Hashtable<String,Object>();
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ for (TypeLanguageDescriptor tld : rt.getTypeLanguageDescriptors()) {
+ choices.put(tld.getName(), tld.getUri());
+ }
+ return choices;
+ }
+ });
+
+ setObjectDescriptor(new ObjectDescriptor<Definitions>(this,object) {
+ @Override
+ public Definitions createObject(Resource resource, EClass eclass) {
+ Definitions definitions = Bpmn2ModelerFactory.create(Definitions.class);
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ definitions.setTypeLanguage(rt.getTypeLanguage());
+ definitions.setExpressionLanguage(rt.getExpressionLanguage());
+ return definitions;
+ }
+ });
+
+ feature = Bpmn2Package.eINSTANCE.getDefinitions_ExpressionLanguage();
+ setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
+
+ setFeatureDescriptor(feature, new FeatureDescriptor<Definitions>(this,object, feature) {
+
+ @Override
+ protected void internalSet(Definitions object, EStructuralFeature feature, Object value, int index) {
+ super.internalSet(object, feature, value, index);
+ }
+
+ @Override
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String,Object> choices = new Hashtable<String,Object>();
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ for (ExpressionLanguageDescriptor eld : rt.getExpressionLanguageDescriptors()) {
+ choices.put(eld.getName(), eld.getUri());
+ }
+ return choices;
+ }
+ });
+
+ setObjectDescriptor(new ObjectDescriptor<Definitions>(this,object) {
+ @Override
+ public Definitions createObject(Resource resource, EClass eclass) {
+ Definitions definitions = Bpmn2ModelerFactory.create(Definitions.class);
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ definitions.setTypeLanguage(rt.getTypeLanguage());
+ definitions.setExpressionLanguage(rt.getExpressionLanguage());
+ return definitions;
+ }
+ });
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DocumentationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DocumentationPropertiesAdapter.java
index 35ec18fb..b6366437 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DocumentationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/DocumentationPropertiesAdapter.java
@@ -13,16 +13,12 @@
package org.eclipse.bpmn2.modeler.ui.adapters.properties;
-import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Documentation;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
/**
* @author Bob Brodt
@@ -37,32 +33,18 @@ public class DocumentationPropertiesAdapter extends ExtendedPropertiesAdapter<Do
public DocumentationPropertiesAdapter(AdapterFactory adapterFactory, Documentation object) {
super(adapterFactory, object);
- final EStructuralFeature textFeature = Bpmn2Package.eINSTANCE.getDocumentation_Text();
- setFeatureDescriptor(textFeature,
- new FeatureDescriptor<Documentation>(adapterFactory,object,textFeature) {
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getDocumentation_Text();
+ setFeatureDescriptor(feature,
+ new FeatureDescriptor<Documentation>(this,object,feature) {
@Override
-
- public void setValue(Object context, final Object value) {
- final Documentation documentation = adopt(context);
- final String text = value==null ? "" : value.toString();
- InsertionAdapter.executeIfNeeded(documentation);
- TransactionalEditingDomain editingDomain = getEditingDomain(documentation);
- final BaseElement owner = (BaseElement) documentation.eContainer();
- if (editingDomain == null) {
- documentation.setText(text);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- documentation.setText(text);
- }
- });
- }
+ protected void internalSet(Documentation documentation, EStructuralFeature feature, Object value, int index) {
+ String text = value==null ? "" : value.toString(); //$NON-NLS-1$
+ documentation.setText(text);
}
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
// formal expression body is always a multiline text field
return true;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorEventDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorEventDefinitionPropertiesAdapter.java
index 45ab8ad6..45ab8ad6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorEventDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorEventDefinitionPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorPropertiesAdapter.java
index 67324bc8..ab50495b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ErrorPropertiesAdapter.java
@@ -15,6 +15,7 @@ package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Error;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -33,21 +34,25 @@ public class ErrorPropertiesAdapter extends RootElementPropertiesAdapter<Error>
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getError_StructureRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Error>(adapterFactory, object, feature));
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Error>(this, object, feature));
- setObjectDescriptor(new RootElementObjectDescriptor<Error>(adapterFactory, object) {
+ setObjectDescriptor(new RootElementObjectDescriptor<Error>(this, object) {
@Override
- public String getDisplayName(Object context) {
- final Error error = adopt(context);
+ public String getTextValue() {
String text = ""; //$NON-NLS-1$
- if (error.getName()!=null) {
- text += error.getName();
+ if (object.getName()!=null) {
+ text += object.getName();
}
- else if (error.getErrorCode()!=null) {
- text += Messages.ErrorPropertiesAdapter_Error_Code + error.getErrorCode();
+ else if (object.getErrorCode()!=null) {
+ text += Messages.ErrorPropertiesAdapter_Error_Code + object.getErrorCode();
}
if (text.isEmpty())
- text = Messages.ErrorPropertiesAdapter_ID + error.getId();
+ text = Messages.ErrorPropertiesAdapter_ID + object.getId();
+
+ if (object.getStructureRef()!=null) {
+ String type = "(" + ExtendedPropertiesProvider.getTextValue(object.getStructureRef()) +")"; //$NON-NLS-1$ //$NON-NLS-2$
+ text += type;
+ }
return text;
}
});
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationEventDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationEventDefinitionPropertiesAdapter.java
index d780b66d..d780b66d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationEventDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationEventDefinitionPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationPropertiesAdapter.java
index 8fdc1bc2..ec00c928 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EscalationPropertiesAdapter.java
@@ -33,21 +33,20 @@ public class EscalationPropertiesAdapter extends RootElementPropertiesAdapter<Es
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getEscalation_StructureRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Escalation>(adapterFactory, object, feature));
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Escalation>(this, object, feature));
- setObjectDescriptor(new RootElementObjectDescriptor<Escalation>(adapterFactory, object) {
+ setObjectDescriptor(new RootElementObjectDescriptor<Escalation>(this, object) {
@Override
- public String getDisplayName(Object context) {
- final Escalation escalation = adopt(context);
+ public String getTextValue() {
String text = ""; //$NON-NLS-1$
- if (escalation.getName()!=null) {
- text += escalation.getName();
+ if (object.getName()!=null) {
+ text += object.getName();
}
- else if (escalation.getEscalationCode()!=null) {
- text += Messages.EscalationPropertiesAdapter_Escalation_Code + escalation.getEscalationCode();
+ else if (object.getEscalationCode()!=null) {
+ text += Messages.EscalationPropertiesAdapter_Escalation_Code + object.getEscalationCode();
}
if (text.isEmpty())
- text = Messages.EscalationPropertiesAdapter_ID + escalation.getId();
+ text = Messages.EscalationPropertiesAdapter_ID + object.getId();
return text;
}
});
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventDefinitionPropertiesAdapter.java
index 11c42125..bd89dfd4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventDefinitionPropertiesAdapter.java
@@ -14,6 +14,7 @@ import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.resource.Resource;
public class EventDefinitionPropertiesAdapter<T extends EventDefinition> extends ExtendedPropertiesAdapter<T> {
@@ -21,10 +22,10 @@ public class EventDefinitionPropertiesAdapter<T extends EventDefinition> extends
public EventDefinitionPropertiesAdapter(AdapterFactory adapterFactory, T object) {
super(adapterFactory, object);
- setObjectDescriptor(new ObjectDescriptor<T>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<T>(this,object) {
@Override
- public T createObject(Resource resource, Object context) {
- T rootElement = super.createObject(resource, context);
+ public T createObject(Resource resource, EClass eclass) {
+ T rootElement = super.createObject(resource, eclass);
return rootElement;
}
});
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventPropertiesAdapter.java
index 622395bd..bf632d13 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/EventPropertiesAdapter.java
@@ -38,11 +38,10 @@ public class EventPropertiesAdapter<T extends Event> extends ExtendedPropertiesA
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getEvent_Properties();
setFeatureDescriptor(feature,
- new FeatureDescriptor<T>(adapterFactory,object,feature) {
+ new FeatureDescriptor<T>(this,object,feature) {
@Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- T event = adopt(context);
- return PropertyPropertiesAdapter.createProperty(event.getProperties());
+ public EObject createFeature(Resource resource, EClass eclass) {
+ return PropertyPropertiesAdapter.createProperty(object.getProperties());
}
}
);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FlowElementPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FlowElementPropertiesAdapter.java
index ac8e03fe..e5155876 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FlowElementPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FlowElementPropertiesAdapter.java
@@ -13,13 +13,18 @@
package org.eclipse.bpmn2.modeler.ui.adapters.properties;
+import java.util.Hashtable;
+
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.DataObject;
+import org.eclipse.bpmn2.Error;
import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
@@ -41,11 +46,12 @@ public class FlowElementPropertiesAdapter<T extends FlowElement> extends Extende
*/
public FlowElementPropertiesAdapter(AdapterFactory adapterFactory, T object) {
super(adapterFactory, object);
+
EStructuralFeature f = Bpmn2Package.eINSTANCE.getFlowElement_Name();
- final FeatureDescriptor<T> fd = new FeatureDescriptor<T>(adapterFactory,object, f) {
+ final FeatureDescriptor<T> fd = new FeatureDescriptor<T>(this,object,f) {
@Override
- public void setDisplayName(String text) {
+ public void setTextValue(String text) {
int i = text.lastIndexOf("/"); //$NON-NLS-1$
if (i>=0)
text = text.substring(i+1);
@@ -54,27 +60,26 @@ public class FlowElementPropertiesAdapter<T extends FlowElement> extends Extende
}
@Override
- public String getDisplayName(Object context) {
+ public String getTextValue() {
String text = ""; //$NON-NLS-1$
- T flowElement = adopt(context);
if (feature.getName().equals("name")) //$NON-NLS-1$
- return (String)flowElement.getName();
+ return (String)object.getName();
- EStructuralFeature f = flowElement.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+ EStructuralFeature f = object.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
if (f!=null) {
- String name = (String)flowElement.eGet(f);
+ String name = (String)object.eGet(f);
if (name!=null && !name.isEmpty())
text = name;
}
if (text.isEmpty()) {
- f = flowElement.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
+ f = object.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
if (f!=null) {
- Object id = flowElement.eGet(f);
+ Object id = object.eGet(f);
if (id!=null && !id.toString().isEmpty()) {
- String className = flowElement.eClass().getName();
+ String className = object.eClass().getName();
String idString = id.toString();
if (!idString.contains(className)) {
- text = ModelUtil.toDisplayName(className) + " '" + id + "'"; //$NON-NLS-1$ //$NON-NLS-2$
+ text = ModelUtil.toCanonicalString(className) + " '" + id + "'"; //$NON-NLS-1$ //$NON-NLS-2$
}
else
text = idString;
@@ -99,14 +104,14 @@ public class FlowElementPropertiesAdapter<T extends FlowElement> extends Extende
break;
}
if (container instanceof Activity || container instanceof Process) {
- text = ModelUtil.getDisplayName(container) + "/" + text; //$NON-NLS-1$
+ text = ExtendedPropertiesProvider.getTextValue(container) + "/" + text; //$NON-NLS-1$
}
container = container.eContainer();
}
if (text!=null) {
if (flowElement instanceof ItemAwareElement) {
- String type = ModelUtil.getDisplayName(((ItemAwareElement)flowElement).getItemSubjectRef());
+ String type = ExtendedPropertiesProvider.getTextValue(((ItemAwareElement)flowElement).getItemSubjectRef());
if (type!=null)
text += " (" + type + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -116,18 +121,31 @@ public class FlowElementPropertiesAdapter<T extends FlowElement> extends Extende
};
setFeatureDescriptor(f, fd);
+
+ if (object instanceof ItemAwareElement) {
+ f = Bpmn2Package.eINSTANCE.getItemAwareElement_ItemSubjectRef();
+ setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
+ setFeatureDescriptor(f, new ItemDefinitionRefFeatureDescriptor<T>(this, object, f) {
+
+ @Override
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return super.getChoiceOfValues();
+ }
+
+ });
+ }
- setObjectDescriptor(new ObjectDescriptor<T>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<T>(this,object) {
@Override
- public void setDisplayName(String text) {
- fd.setDisplayName(text);
+ public void setTextValue(String text) {
+ fd.setTextValue(text);
ModelUtil.setID(object);
}
@Override
- public String getDisplayName(Object context) {
- return fd.getDisplayName(context);
+ public String getTextValue() {
+ return fd.getTextValue();
}
});
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FormalExpressionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FormalExpressionPropertiesAdapter.java
index 71170f35..2d143a1c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FormalExpressionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/FormalExpressionPropertiesAdapter.java
@@ -16,6 +16,7 @@ package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import java.util.Hashtable;
import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Documentation;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
@@ -24,6 +25,7 @@ import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.runtime.ExpressionLanguageDescriptor;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.FeatureMap;
@@ -46,46 +48,32 @@ public class FormalExpressionPropertiesAdapter extends ExtendedPropertiesAdapter
final EStructuralFeature body = Bpmn2Package.eINSTANCE.getFormalExpression_Body();
setFeatureDescriptor(body,
- new FeatureDescriptor<FormalExpression>(adapterFactory,object,body) {
+ new FeatureDescriptor<FormalExpression>(this,object,body) {
@Override
-
- public void setValue(Object context, final Object value) {
- final FormalExpression formalExpression = adopt(context);
- final String body = value==null ? null : value.toString();
+ protected void internalSet(FormalExpression formalExpression, EStructuralFeature feature, Object value, int index) {
+ String body = value==null ? null : value.toString();
InsertionAdapter.executeIfNeeded(formalExpression);
- TransactionalEditingDomain editingDomain = getEditingDomain(formalExpression);
- if (editingDomain == null) {
- formalExpression.setBody(body);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- formalExpression.setBody(body);
- }
- });
- }
+ formalExpression.setBody(body);
}
@Override
- public String getDisplayName(Object context) {
- FormalExpression expression = adopt(context);
- String body = ModelUtil.getExpressionBody(expression);
+ public String getTextValue() {
+ String body = ModelUtil.getExpressionBody(object);
if (body==null)
return ""; //$NON-NLS-1$
return body;
}
@Override
- public String getLabel(Object context) {
- FormalExpression expression = adopt(context);
- if (expression.eContainer() instanceof SequenceFlow)
+ public String getLabel() {
+ if (object.eContainer() instanceof SequenceFlow)
return Messages.FormalExpressionPropertiesAdapter_Constraint;
return Messages.FormalExpressionPropertiesAdapter_Script;
}
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
// formal expression body is always a multiline text field
return true;
}
@@ -96,20 +84,20 @@ public class FormalExpressionPropertiesAdapter extends ExtendedPropertiesAdapter
setProperty(language, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setProperty(language, UI_CAN_SET_NULL, Boolean.TRUE);
setFeatureDescriptor(language,
- new FeatureDescriptor<FormalExpression>(adapterFactory,object,language) {
+ new FeatureDescriptor<FormalExpression>(this,object,language) {
+
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return Messages.FormalExpressionPropertiesAdapter_Script_Language;
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
+ public Hashtable<String, Object> getChoiceOfValues() {
if (choiceOfValues==null) {
choiceOfValues = new Hashtable<String, Object>();
TargetRuntime rt = TargetRuntime.getCurrentRuntime();
- String[] s = rt.getRuntimeExtension().getExpressionLanguages();
- for (int i=0; i<s.length; i+=2) {
- choiceOfValues.put(s[i+1], s[i]);
+ for (ExpressionLanguageDescriptor el : rt.getExpressionLanguageDescriptors()) {
+ choiceOfValues.put(el.getName(), el.getUri());
}
}
return choiceOfValues;
@@ -120,12 +108,12 @@ public class FormalExpressionPropertiesAdapter extends ExtendedPropertiesAdapter
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getFormalExpression_EvaluatesToTypeRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<FormalExpression>(adapterFactory, object, feature));
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<FormalExpression>(this, object, feature));
- setObjectDescriptor(new ObjectDescriptor<FormalExpression>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<FormalExpression>(this,object) {
@Override
- public String getDisplayName(Object context) {
- return getFeatureDescriptor(body).getDisplayName(context);
+ public String getTextValue() {
+ return getFeatureDescriptor(body).getTextValue();
}
});
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GlobalScriptTaskPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GlobalScriptTaskPropertiesAdapter.java
index c4edd9f7..d4d8c472 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GlobalScriptTaskPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GlobalScriptTaskPropertiesAdapter.java
@@ -36,32 +36,30 @@ public class GlobalScriptTaskPropertiesAdapter extends ExtendedPropertiesAdapter
EStructuralFeature ref = Bpmn2Package.eINSTANCE.getGlobalScriptTask_Script();
setFeatureDescriptor(ref,
- new FeatureDescriptor<GlobalScriptTask>(adapterFactory,object,ref) {
+ new FeatureDescriptor<GlobalScriptTask>(this,object,ref) {
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
@Override
- public String getDisplayName(Object context) {
- GlobalScriptTask task = adopt(context);
- if (task.getScript()==null)
+ public String getTextValue() {
+ if (object.getScript()==null)
return ""; //$NON-NLS-1$
- return task.getScript();
+ return object.getScript();
}
});
ref = Bpmn2Package.eINSTANCE.getGlobalScriptTask_ScriptLanguage();
setFeatureDescriptor(ref,
- new FeatureDescriptor<GlobalScriptTask>(adapterFactory,object,ref) {
+ new FeatureDescriptor<GlobalScriptTask>(this,object,ref) {
@Override
- public String getDisplayName(Object context) {
- GlobalScriptTask task = adopt(context);
- if (task.getScriptLanguage()==null)
+ public String getTextValue() {
+ if (object.getScriptLanguage()==null)
return ""; //$NON-NLS-1$
- return task.getScriptLanguage();
+ return object.getScriptLanguage();
}
});
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GroupPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GroupPropertiesAdapter.java
new file mode 100644
index 00000000..59d5acea
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/GroupPropertiesAdapter.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.adapters.properties;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Factory;
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Category;
+import org.eclipse.bpmn2.CategoryValue;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.Group;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
+
+/**
+ *
+ */
+public class GroupPropertiesAdapter extends ExtendedPropertiesAdapter<Group> {
+
+ /**
+ * @param adapterFactory
+ * @param object
+ */
+ public GroupPropertiesAdapter(AdapterFactory adapterFactory, Group object) {
+ super(adapterFactory, object);
+
+ EStructuralFeature feature = Bpmn2Package.eINSTANCE.getGroup_CategoryValueRef();
+ setProperty(feature, UI_CAN_CREATE_NEW, Boolean.TRUE);
+
+ this.setFeatureDescriptor(feature, new FeatureDescriptor<Group>(this, object, feature) {
+
+ @Override
+ public EObject createFeature(Resource resource, EClass eclass) {
+ Category category = null;
+ CategoryValue categoryValue = null;
+ Definitions definitions = ModelUtil.getDefinitions(resource);
+ List<Category> categories = ModelUtil.getAllRootElements(definitions, Category.class);
+ if (categories.size()==0) {
+ category = (Category) Bpmn2Factory.eINSTANCE.create(Bpmn2Package.eINSTANCE.getCategory());
+ ModelUtil.setID(category, resource);
+ InsertionAdapter.add(definitions, Bpmn2Package.eINSTANCE.getDefinitions_RootElements(), category);
+ }
+ else {
+ category = categories.get(0);
+ }
+ String title = Messages.GroupPropertiesAdapter_CreateCategory_Title;
+ InputDialog dialog = new InputDialog(null, title, Messages.GroupPropertiesAdapter_CreateCategory_Prompt, "", null); //$NON-NLS-2$
+ if (dialog.open() == Window.OK) {
+ String name = dialog.getValue();
+ if (!name.isEmpty()) {
+ categoryValue = (CategoryValue) Bpmn2Factory.eINSTANCE.create(Bpmn2Package.eINSTANCE.getCategoryValue());
+ ModelUtil.setID(categoryValue,resource);
+ categoryValue.setValue(name);
+ category.getCategoryValue().add(categoryValue);
+ }
+ }
+ return categoryValue;
+ }
+
+ });
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ImportPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ImportPropertiesAdapter.java
index 9aae8d1b..268f61b8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ImportPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ImportPropertiesAdapter.java
@@ -20,16 +20,15 @@ public class ImportPropertiesAdapter extends ExtendedPropertiesAdapter<Import> {
public ImportPropertiesAdapter(AdapterFactory adapterFactory, Import object) {
super(adapterFactory, object);
- setObjectDescriptor(new ObjectDescriptor<Import>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<Import>(this,object) {
@Override
- public String getDisplayName(Object context) {
- Import imp = adopt(context);
- String text = imp.getLocation();
+ public String getTextValue() {
+ String text = object.getLocation();
return text==null ? "" : text; //$NON-NLS-1$
}
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return Messages.ImportPropertiesAdapter_Import;
}
});
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InputSetPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InputSetPropertiesAdapter.java
index 641fd427..42ff6c5d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InputSetPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InputSetPropertiesAdapter.java
@@ -27,8 +27,8 @@ import org.eclipse.bpmn2.OutputSet;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.OutputSetPropertiesAdapter.InputSetFeatureDescriptor;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EObject;
@@ -41,35 +41,35 @@ public class InputSetPropertiesAdapter extends ExtendedPropertiesAdapter<InputSe
EStructuralFeature f = Bpmn2Package.eINSTANCE.getInputSet_DataInputRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new DataInputFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new DataInputFeatureDescriptor(this,object, f));
f = Bpmn2Package.eINSTANCE.getInputSet_OptionalInputRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new DataInputFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new DataInputFeatureDescriptor(this,object, f));
f = Bpmn2Package.eINSTANCE.getInputSet_WhileExecutingInputRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new DataInputFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new DataInputFeatureDescriptor(this,object, f));
f = Bpmn2Package.eINSTANCE.getInputSet_OutputSetRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new OutputSetFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new OutputSetFeatureDescriptor(this,object, f));
}
protected class DataInputFeatureDescriptor extends FeatureDescriptor<InputSet> {
-
- public DataInputFeatureDescriptor(AdapterFactory adapterFactory, InputSet object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
- }
+ public DataInputFeatureDescriptor(ExtendedPropertiesAdapter<InputSet> owner, InputSet object,
+ EStructuralFeature feature) {
+ super(owner, object, feature);
+ }
+
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- InputSet inputSet = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> values = new Hashtable<String, Object>();
List<DataInput> valid = new ArrayList<DataInput>();
if (feature == Bpmn2Package.eINSTANCE.getInputSet_DataInputRefs()) {
// choices are all DataInputs in scope
- EObject container = inputSet.eContainer();
+ EObject container = object.eContainer();
while (container!=null) {
if (container instanceof ThrowEvent) {
valid.addAll( ((ThrowEvent)container).getDataInputs() );
@@ -99,32 +99,31 @@ public class InputSetPropertiesAdapter extends ExtendedPropertiesAdapter<InputSe
}
else {
// choices are only the DataInputs listed in "InputSet.dataInputRefs"
- valid.addAll(inputSet.getDataInputRefs());
+ valid.addAll(object.getDataInputRefs());
}
for (DataInput data : valid) {
- values.put( ModelUtil.getDisplayName(data), data);
+ values.put( ExtendedPropertiesProvider.getTextValue(data), data);
}
return values;
}
}
protected class OutputSetFeatureDescriptor extends FeatureDescriptor<InputSet> {
-
- public OutputSetFeatureDescriptor(AdapterFactory adapterFactory, InputSet object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
- }
-
+ public OutputSetFeatureDescriptor(ExtendedPropertiesAdapter<InputSet> owner, InputSet object,
+ EStructuralFeature feature) {
+ super(owner, object, feature);
+ }
+
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- InputSet inputSet = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> values = new Hashtable<String, Object>();
- EObject container = inputSet.eContainer();
+ EObject container = object.eContainer();
if (container instanceof InputOutputSpecification) {
// an InputSet.outputSetRefs can only reference OutputSets in the same InputOutputSpecification
InputOutputSpecification ioSpec = (InputOutputSpecification)container;
for (OutputSet os : ioSpec.getOutputSets()) {
- values.put( ModelUtil.getDisplayName(os), os);
+ values.put( ExtendedPropertiesProvider.getTextValue(os), os);
}
}
return values;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InterfacePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InterfacePropertiesAdapter.java
index cf3df615..99d3d264 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InterfacePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/InterfacePropertiesAdapter.java
@@ -13,6 +13,8 @@
package org.eclipse.bpmn2.modeler.ui.adapters.properties;
+import java.util.Iterator;
+
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Interface;
@@ -20,8 +22,8 @@ import org.eclipse.bpmn2.Operation;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
@@ -49,62 +51,60 @@ public class InterfacePropertiesAdapter extends ExtendedPropertiesAdapter<Interf
setFeatureDescriptor(ref, new ImplementationRefFeatureDescriptor<Interface>(this, adapterFactory, object, ref));
ref = Bpmn2Package.eINSTANCE.getInterface_Operations();
- setFeatureDescriptor(ref, new FeatureDescriptor<Interface>(adapterFactory, object, ref) {
+ setFeatureDescriptor(ref, new FeatureDescriptor<Interface>(this,object, ref) {
@Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- Interface intf = adopt(context);
+ public EObject createFeature(Resource resource, EClass eclass) {
Operation operation = Bpmn2ModelerFactory.create(Operation.class);
ModelUtil.setID(operation, resource);
- operation.setName( ModelUtil.toDisplayName(operation.getId()) );
+ operation.setName( ModelUtil.toCanonicalString(operation.getId()) );
// InsertionAdapter.add(intf, Bpmn2Package.eINSTANCE.getInterface_Operations(), operation);
- intf.getOperations().add(operation);
+ object.getOperations().add(operation);
return operation;
}
-
+
+ @Override
+ public String getLabel() {
+ return Messages.Interface_Operations_Label;
+ }
+
+ @Override
+ public String getTextValue() {
+ String text = ""; //$NON-NLS-1$
+ Iterator<Operation> iter = object.getOperations().iterator();
+ while (iter.hasNext()) {
+ Operation op = iter.next();
+ String name = op.getName();
+ if (name==null || name.isEmpty())
+ name = op.getId();
+ text += name;
+ if (iter.hasNext())
+ text += ", "; //$NON-NLS-1$
+ }
+ return text;
+ }
});
+
+
}
public static class ImplementationRefFeatureDescriptor<T extends BaseElement> extends FeatureDescriptor<T> {
public ImplementationRefFeatureDescriptor(final ExtendedPropertiesAdapter<T> owner,
AdapterFactory adapterFactory, final T object, final EStructuralFeature feature) {
- super(adapterFactory, object, feature);
+ super(owner, object, feature);
owner.setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.FALSE);
-
- owner.setObjectDescriptor(new ObjectDescriptor<T>(adapterFactory, object) {
- @Override
- public String getDisplayName(Object context) {
- return owner.getFeatureDescriptor(feature).getDisplayName(context);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof BaseElement) {
- BaseElement other = (BaseElement)obj;
- String otherName = ModelUtil.getName(other);
- Object otherValue = other.eGet(feature);
- if (ModelUtil.compare(otherName, ModelUtil.getName(object))) {
- if (ModelUtil.compare(otherValue, (object).eGet(feature)))
- return true;
- }
- }
- return false;
- }
- });
-
}
@Override
- public String getDisplayName(Object context) {
- final T object = adopt(context);
- Resource resource = ModelUtil.getResource(object);
+ public String getTextValue() {
+ Resource resource = ObjectPropertyProvider.getResource(object);
String text = null;
EObject value = (EObject)object.eGet(feature);
if (value!=null) {
if (ModelUtil.isStringWrapper(value)) {
- text = ModelUtil.getStringWrapperValue( object.eGet(feature) ); // + type;
+ text = ModelUtil.getStringWrapperTextValue( object.eGet(feature) ); // + type;
}
else if (value instanceof PortType) {
PortType portType = (PortType)value;
@@ -121,7 +121,7 @@ public class InterfacePropertiesAdapter extends ExtendedPropertiesAdapter<Interf
text += name;
}
if (text==null)
- return ModelUtil.getDisplayName(object.eGet(feature));
+ return ModelUtil.getTextValue(object.eGet(feature));
return text;
}
text = ModelUtil.getName(object);
@@ -131,30 +131,26 @@ public class InterfacePropertiesAdapter extends ExtendedPropertiesAdapter<Interf
}
@Override
- public EObject createFeature(Resource resource, Object context, EClass eClass) {
- final T object = adopt(context);
-
+ public EObject createFeature(Resource resource, EClass eClass) {
EObject impl = ModelUtil.createStringWrapper(""); //$NON-NLS-1$
object.eSet(feature,impl);
return impl;
}
@Override
- public Object getValue(Object context) {
- final T object = adopt(context);
+ public Object getValue() {
Object value = object.eGet(feature);
if (value!=null) {
if (ModelUtil.isStringWrapper(value))
return value;
- return getDisplayName(context);
+ return getTextValue();
}
return ModelUtil.createStringWrapper(""); //$NON-NLS-1$
}
@Override
- public void setValue(Object context, Object value) {
- T object = adopt(context);
- Resource resource = ModelUtil.getResource(object);
+ protected void internalSet(T object, EStructuralFeature feature, Object value, int index) {
+ Resource resource = ObjectPropertyProvider.getResource(object);
if (value instanceof PortType) {
PortType portType = (PortType)value;
@@ -172,7 +168,7 @@ public class InterfacePropertiesAdapter extends ExtendedPropertiesAdapter<Interf
else if (!ModelUtil.isStringWrapper(value)) {
return;
}
- super.setValue(object,value);
+ super.internalSet(object, feature, value, index);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/IoSpecificationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/IoSpecificationPropertiesAdapter.java
index 3c1ab5cd..24aca4cf 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/IoSpecificationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/IoSpecificationPropertiesAdapter.java
@@ -49,17 +49,16 @@ public class IoSpecificationPropertiesAdapter extends ExtendedPropertiesAdapter<
EStructuralFeature feature;
feature = Bpmn2Package.eINSTANCE.getInputOutputSpecification_DataInputs();
- setFeatureDescriptor(feature, new FeatureDescriptor<InputOutputSpecification>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new FeatureDescriptor<InputOutputSpecification>(this,object, feature) {
@Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- final InputOutputSpecification ioSpecification = adopt(context);
- List<InputSet> inputSets = ioSpecification.getInputSets();
+ public EObject createFeature(Resource resource, EClass eclass) {
+ List<InputSet> inputSets = object.getInputSets();
if (inputSets.size()==0) {
inputSets.add(Bpmn2ModelerFactory.create(InputSet.class));
}
InputSet inputSet = inputSets.get(0);
- DataInput dataInput = DataInputPropertiesAdapter.createDataInput(resource, ioSpecification.getDataInputs());
+ DataInput dataInput = DataInputPropertiesAdapter.createDataInput(resource, object.getDataInputs());
inputSet.getDataInputRefs().add(dataInput);
return dataInput;
@@ -67,27 +66,26 @@ public class IoSpecificationPropertiesAdapter extends ExtendedPropertiesAdapter<
});
feature = Bpmn2Package.eINSTANCE.getInputOutputSpecification_DataOutputs();
- setFeatureDescriptor(feature, new FeatureDescriptor<InputOutputSpecification>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new FeatureDescriptor<InputOutputSpecification>(this,object, feature) {
@Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- final InputOutputSpecification ioSpecification = adopt(context);
- List<OutputSet> outputSets = ioSpecification.getOutputSets();
+ public EObject createFeature(Resource resource, EClass eclass) {
+ List<OutputSet> outputSets = object.getOutputSets();
if (outputSets.size()==0) {
outputSets.add(Bpmn2ModelerFactory.create(OutputSet.class));
}
OutputSet outputSet = outputSets.get(0);
- DataOutput dataOutput = DataOutputPropertiesAdapter.createDataOutput(resource, ioSpecification.getDataOutputs());
+ DataOutput dataOutput = DataOutputPropertiesAdapter.createDataOutput(resource, object.getDataOutputs());
outputSet.getDataOutputRefs().add(dataOutput);
return dataOutput;
}
});
- setObjectDescriptor(new ObjectDescriptor<InputOutputSpecification>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<InputOutputSpecification>(this,object) {
@Override
- public InputOutputSpecification createObject(Resource resource, Object context) {
+ public InputOutputSpecification createObject(Resource resource, EClass eclass) {
InputOutputSpecification ioSpec = Bpmn2ModelerFactory.eINSTANCE.createInputOutputSpecification();
ModelUtil.setID(ioSpec, resource);
InputSet is = Bpmn2ModelerFactory.eINSTANCE.createInputSet();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java
index 95f6a604..e289e998 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemAwareElementPropertiesAdapter.java
@@ -19,17 +19,15 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataState;
import org.eclipse.bpmn2.ItemAwareElement;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
/**
* @author Bob Brodt
@@ -47,16 +45,18 @@ public class ItemAwareElementPropertiesAdapter<T extends ItemAwareElement> exten
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getItemAwareElement_ItemSubjectRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
+ setProperty(feature, UI_CAN_CREATE_NEW, Boolean.FALSE);
+
setFeatureDescriptor(feature,
- new ItemDefinitionRefFeatureDescriptor<T>(adapterFactory, object, feature)
+ new ItemDefinitionRefFeatureDescriptor<T>(this, object, feature)
);
feature = Bpmn2Package.eINSTANCE.getItemAwareElement_DataState();
setFeatureDescriptor(feature,
- new FeatureDescriptor<T>(adapterFactory,object,feature) {
+ new FeatureDescriptor<T>(this, object,feature) {
+
@Override
- public void setValue(Object context, Object value) {
- final ItemAwareElement element = adopt(context);
+ protected void internalSet(ItemAwareElement element, EStructuralFeature feature, Object value, int index) {
if (value instanceof String) {
// construct a DataState from the given name string
DataState ds = Bpmn2ModelerFactory.create(DataState.class);
@@ -64,33 +64,24 @@ public class ItemAwareElementPropertiesAdapter<T extends ItemAwareElement> exten
value = ds;
}
if (value instanceof DataState) {
- final DataState oldValue = (DataState) element.eGet(feature);
+ DataState oldValue = (DataState) element.eGet(feature);
if (value != oldValue) {
// if this DataState belongs to some other ItemAwareElement, make a copy
- final DataState newValue = (DataState)(((DataState)value).eContainer()!=null ?
- EcoreUtil.copy((DataState) value) : value);
- TransactionalEditingDomain editingDomain = getEditingDomain(element);
- if (editingDomain == null) {
- element.eSet(feature, value);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- element.eSet(feature, newValue);
- newValue.setId(null);
- ModelUtil.setID(newValue);
- }
- });
- }
+ DataState newValue = null;
+ if (((DataState)value).eContainer()!=null)
+ newValue = EcoreUtil.copy((DataState) value);
+ else
+ newValue = (DataState)value;
+ element.eSet(feature, newValue);
}
}
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String,Object> choices = new Hashtable<String,Object>();
try {
- Resource resource = ModelUtil.getResource(object);
+ Resource resource = ObjectPropertyProvider.getResource(object);
List<DataState> states = ModelHandler.getAll(resource, DataState.class);
for (DataState s : states) {
String label = s.getName();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionPropertiesAdapter.java
index 1831d7a9..f08c2e8e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionPropertiesAdapter.java
@@ -19,10 +19,15 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.ItemDefinition;
+import org.eclipse.bpmn2.ItemKind;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectPropertyProvider;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.runtime.TypeLanguageDescriptor;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
import org.eclipse.bpmn2.modeler.core.validation.SyntaxCheckerUtils;
@@ -31,7 +36,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xml.type.internal.DataValue.URI;
+import org.eclipse.wst.wsdl.Fault;
import org.eclipse.wst.wsdl.Message;
import org.eclipse.xsd.XSDElementDeclaration;
@@ -53,41 +58,41 @@ public class ItemDefinitionPropertiesAdapter extends ExtendedPropertiesAdapter<I
setProperty(ref, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setFeatureDescriptor(ref,
- new FeatureDescriptor<ItemDefinition>(adapterFactory,object,ref) {
+ new FeatureDescriptor<ItemDefinition>(this,object,ref) {
+
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return Messages.ItemDefinitionPropertiesAdapter_Structure;
}
@Override
- public String getDisplayName(Object context) {
- ItemDefinition itemDefinition = adopt(context);
- String value = ItemDefinitionPropertiesAdapter.getStructureName(itemDefinition);
- value = SyntaxCheckerUtils.fromXMLString((String)value);
- return value;
+ public String getTextValue() {
+ return ItemDefinitionPropertiesAdapter.getStructureName(object);
}
@Override
- public EObject createFeature(Resource resource, Object context, EClass eClass) {
- final ItemDefinition itemDefinition = adopt(context);
+ public EObject createFeature(Resource resource, EClass eClass) {
EObject structureRef = ModelUtil.createStringWrapper(""); //$NON-NLS-1$
- itemDefinition.setStructureRef(structureRef);
+ object.setStructureRef(structureRef);
return structureRef;
}
@Override
- public Object getValue(Object context) {
- ItemDefinition itemDefinition = adopt(context);
- Object value = ItemDefinitionPropertiesAdapter.getStructureRef(itemDefinition);
+ public Object getValue() {
+ Object value = ItemDefinitionPropertiesAdapter.getStructureRef(object);
if (value==null || (ModelUtil.isStringWrapper(value) && ModelUtil.getStringWrapperValue(value).isEmpty())) {
- value = itemDefinition.getId();
+ value = object.getId();
}
return value;
}
@Override
- public void setValue(Object context, Object value) {
- ItemDefinition itemDefinition = adopt(context);
+ protected void internalSet(ItemDefinition itemDefinition, EStructuralFeature feature, Object value, int index) {
+ if (value instanceof ItemDefinition) {
+ value = ((ItemDefinition)value).getStructureRef();
+ if (ModelUtil.isStringWrapper(value))
+ value = ModelUtil.getStringWrapperTextValue(value);
+ }
if (value instanceof String) {
if (itemDefinition.getStructureRef()==null) {
String oldValue = ItemDefinitionPropertiesAdapter.getStructureName(itemDefinition);
@@ -96,31 +101,30 @@ public class ItemDefinitionPropertiesAdapter extends ExtendedPropertiesAdapter<I
value = SyntaxCheckerUtils.toXMLString((String)value);
value = ModelUtil.createStringWrapper((String)value);
}
- super.setValue(context, value);
+ super.internalSet(itemDefinition, feature, value, index);
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- ItemDefinition itemDefinition = adopt(context);
- return ItemDefinitionPropertiesAdapter.getChoiceOfValues(itemDefinition);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return ItemDefinitionPropertiesAdapter.getChoiceOfValues(object);
}
}
);
- setObjectDescriptor(new ObjectDescriptor<ItemDefinition>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<ItemDefinition>(this,object) {
+
@Override
- public String getDisplayName(Object context) {
- ItemDefinition itemDefinition = adopt(context);
- return ItemDefinitionPropertiesAdapter.getDisplayName(itemDefinition);
+ public String getTextValue() {
+ return ItemDefinitionPropertiesAdapter.getDisplayName(object);
}
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return ItemDefinitionPropertiesAdapter.getLabel();
}
@Override
- public ItemDefinition createObject(Resource resource, Object context) {
+ public ItemDefinition createObject(Resource resource, EClass eclass) {
ItemDefinition itemDefinition = ItemDefinitionPropertiesAdapter.createItemDefinition(resource);
return itemDefinition;
}
@@ -139,7 +143,7 @@ public class ItemDefinitionPropertiesAdapter extends ExtendedPropertiesAdapter<I
return false;
}
if (ModelUtil.isStringWrapper(thisStructure)) {
- String thisWrapper = ModelUtil.getStringWrapperValue(object.getStructureRef());
+ String thisWrapper = ModelUtil.getStringWrapperTextValue(object.getStructureRef());
return thisWrapper.equals(otherWrapper);
}
}
@@ -153,7 +157,7 @@ public class ItemDefinitionPropertiesAdapter extends ExtendedPropertiesAdapter<I
* Methods for dealing with ItemDefinitions
*/
public static String getLabel() {
- return Messages.ItemDefinitionPropertiesAdapter_Data_Type;
+ return Messages.ItemDefinitionPropertiesAdapter_ItemDefinition_Label;
}
public static ItemDefinition createItemDefinition(Resource resource) {
@@ -178,22 +182,32 @@ public class ItemDefinitionPropertiesAdapter extends ExtendedPropertiesAdapter<I
}
public static String getStructureName(ItemDefinition itemDefinition) {
- Resource resource = ModelUtil.getResource(itemDefinition);
+ Resource resource = ObjectPropertyProvider.getResource(itemDefinition);
String name = ""; //$NON-NLS-1$
if (itemDefinition!=null) {
Object value = itemDefinition.getStructureRef();
- if (value!=null) {
- if (value instanceof XSDElementDeclaration) {
- XSDElementDeclaration elem = (XSDElementDeclaration)value;
- name = elem.getQName();
- }
- else if (value instanceof Message) {
- Message message = (Message)value;
- name = NamespaceUtil.normalizeQName(resource,message.getQName());
- }
- else if (ModelUtil.isStringWrapper(value))
- name = ModelUtil.getStringWrapperValue(value);
+ if (value instanceof XSDElementDeclaration) {
+ XSDElementDeclaration elem = (XSDElementDeclaration)value;
+ String prefix = NamespaceUtil.getPrefixForNamespace(resource, elem.getSchema().getTargetNamespace());
+ name = elem.getName();
+ if (prefix!=null && !prefix.isEmpty())
+ name = prefix + ":" + name; //$NON-NLS-1$
+ }
+ else if (value instanceof Message) {
+ Message message = (Message)value;
+ name = NamespaceUtil.normalizeQName(resource,message.getQName());
+ }
+ else if (value instanceof Fault) {
+ Fault fault = (Fault)value;
+ String prefix = NamespaceUtil.getPrefixForNamespace(resource, fault.getEnclosingDefinition().getTargetNamespace());
+ name = fault.getName();
+ if (prefix!=null && !prefix.isEmpty())
+ name = prefix + ":" + name; //$NON-NLS-1$
}
+ else if (ModelUtil.isStringWrapper(value)) {
+ name = ModelUtil.getStringWrapperTextValue(value);
+ }
+
if (name==null || name.isEmpty()) {
name = ModelUtil.generateUndefinedID(itemDefinition.getId());
}
@@ -211,18 +225,46 @@ public class ItemDefinitionPropertiesAdapter extends ExtendedPropertiesAdapter<I
}
public static Hashtable<String, Object> getChoiceOfValues(EObject context) {
- // add all ItemDefinitions
Hashtable<String,Object> choices = new Hashtable<String,Object>();
if (context!=null) {
String s;
- Definitions defs = ModelUtil.getDefinitions(context);
- List<ItemDefinition> itemDefs = ModelUtil.getAllRootElements(defs, ItemDefinition.class);
+ Definitions definitions = ModelUtil.getDefinitions(context);
+ // add all existing ItemDefinitions
+ List<ItemDefinition> itemDefs = ModelUtil.getAllRootElements(definitions, ItemDefinition.class);
for (ItemDefinition id : itemDefs) {
s = getDisplayName(id);
if (s==null || s.isEmpty())
s = id.getId();
choices.put(s,id);
}
+
+ // add all primitive data types defined by the default typeLanguage
+ String typeLanguage = definitions.getTypeLanguage();
+ if (typeLanguage!=null) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ TypeLanguageDescriptor tld = rt.getTypeLanguageDescriptor(typeLanguage);
+ if (tld!=null) {
+ for (TypeLanguageDescriptor.Type type : tld.getTypes()) {
+ // We'll create temporary ItemDefinition objects for all of these
+ // that don't already have ItemDefinitions. Attach an InsertionAdapter
+ // that will cause these to be added to our Definitions if the user
+ // changes anything in one of these temporary objects; this includes
+ // setting the object as the target of an ItemAwareElement.itemSubjectRef
+ s = type.getQName(definitions.eResource());
+ if (!choices.containsKey(s)) {
+ ItemDefinition itemDefinition = Bpmn2ModelerFactory.eINSTANCE.createItemDefinition();
+ itemDefinition.setStructureRef(ModelUtil.createStringWrapper(s));
+ itemDefinition.setItemKind(ItemKind.INFORMATION);
+ ModelUtil.setID(itemDefinition, context.eResource());
+ InsertionAdapter.add(
+ definitions,
+ Bpmn2Package.eINSTANCE.getDefinitions_RootElements(),
+ itemDefinition);
+ choices.put(type.getQName(definitions.eResource()), itemDefinition);
+ }
+ }
+ }
+ }
}
return choices;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java
new file mode 100644
index 00000000..93f9e9d8
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ItemDefinitionRefFeatureDescriptor.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.adapters.properties;
+
+import java.util.Hashtable;
+
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.CatchEvent;
+import org.eclipse.bpmn2.DataInput;
+import org.eclipse.bpmn2.DataInputAssociation;
+import org.eclipse.bpmn2.DataOutput;
+import org.eclipse.bpmn2.DataOutputAssociation;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.InputOutputSpecification;
+import org.eclipse.bpmn2.ItemDefinition;
+import org.eclipse.bpmn2.ItemKind;
+import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class ItemDefinitionRefFeatureDescriptor<T extends BaseElement> extends FeatureDescriptor<T> {
+
+ protected ImportUtil importer = new ImportUtil();
+
+ /**
+ * @param adapterFactory
+ * @param object
+ * @param feature
+ */
+ public ItemDefinitionRefFeatureDescriptor(ExtendedPropertiesAdapter<T> owner, T object, EStructuralFeature feature) {
+ super(owner, object, feature);
+ owner.setProperty(feature, ExtendedPropertiesAdapter.UI_CAN_CREATE_NEW, Boolean.FALSE);
+
+ // I found a couple of instances where this class was used for references that were NOT
+ // RootElements - just check to make sure here...
+ Assert.isTrue( RootElement.class.isAssignableFrom(feature.getEType().getInstanceClass()) );
+ }
+
+ @Override
+ public String getLabel() {
+ return ItemDefinitionPropertiesAdapter.getLabel();
+ }
+
+ @Override
+ public String getTextValue() {
+ ItemDefinition itemDefinition = (ItemDefinition) object.eGet(feature);
+ return ItemDefinitionPropertiesAdapter.getDisplayName(itemDefinition);
+ }
+
+ @Override
+ public EObject createFeature(Resource resource, EClass eClass) {
+ ItemDefinition itemDefinition = ItemDefinitionPropertiesAdapter.createItemDefinition(object.eResource());
+ return itemDefinition;
+ }
+
+ @Override
+ public Object getValue() {
+ ItemDefinition itemDefinition = (ItemDefinition) object.eGet(feature);
+ return ItemDefinitionPropertiesAdapter.getStructureRef(itemDefinition);
+ }
+
+ @Override
+ protected void internalSet(T object, EStructuralFeature feature, Object value, int index) {
+ Definitions definitions = ModelUtil.getDefinitions(object);
+ if (value instanceof String) {
+ value = importer.createItemDefinition(definitions, null, (String)value, ItemKind.INFORMATION);
+ }
+
+ if (value==null || value instanceof ItemDefinition) {
+ ItemDefinition itemDefinition = (ItemDefinition) value;
+
+ super.internalSet(object, feature, itemDefinition, index);
+
+ // if there are any DataInputAssociations or DataOutputAssociations that map to this object
+ // then change their ItemDefinitions to match.
+ if (definitions!=null) {
+ TreeIterator<EObject> iter = definitions.eAllContents();
+ while (iter.hasNext()) {
+ EObject o = iter.next();
+ if (o instanceof DataInput) {
+ DataInput input = (DataInput) o;
+ if (input.eContainer() instanceof InputOutputSpecification) {
+ InputOutputSpecification ioSpec = (InputOutputSpecification) input.eContainer();
+ if (ioSpec.eContainer() instanceof Activity) {
+ Activity activity = (Activity) ioSpec.eContainer();
+ for (DataInputAssociation dia : activity.getDataInputAssociations()) {
+ if (!dia.getSourceRef().isEmpty() && dia.getSourceRef().get(0) == object) {
+ input.setItemSubjectRef(itemDefinition);
+ }
+ }
+ }
+ }
+ else if (input.eContainer() instanceof ThrowEvent) {
+ ThrowEvent event = (ThrowEvent) input.eContainer();
+ for (DataInputAssociation dia : event.getDataInputAssociation()) {
+ if (!dia.getSourceRef().isEmpty() && dia.getSourceRef().get(0) == object) {
+ input.setItemSubjectRef(itemDefinition);
+ }
+ }
+ }
+ }
+ else if (o instanceof DataOutput) {
+ DataOutput output = (DataOutput) o;
+ if (output.eContainer() instanceof InputOutputSpecification) {
+ InputOutputSpecification ioSpec = (InputOutputSpecification) output.eContainer();
+ if (ioSpec.eContainer() instanceof Activity) {
+ Activity activity = (Activity) ioSpec.eContainer();
+ for (DataOutputAssociation doa : activity.getDataOutputAssociations()) {
+ if (doa.getTargetRef() == object) {
+ output.setItemSubjectRef(itemDefinition);
+ }
+ }
+ }
+ }
+ else if (output.eContainer() instanceof CatchEvent) {
+ CatchEvent event = (CatchEvent) output.eContainer();
+ for (DataOutputAssociation doa : event.getDataOutputAssociation()) {
+ if (doa.getTargetRef() == object) {
+ output.setItemSubjectRef(itemDefinition);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return ItemDefinitionPropertiesAdapter.getChoiceOfValues(object);
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java
index 89238e4b..87b84bcc 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/LinkEventDefinitionPropertiesAdapter.java
@@ -46,20 +46,18 @@ public class LinkEventDefinitionPropertiesAdapter extends EventDefinitionPropert
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getLinkEventDefinition_Target();
setFeatureDescriptor(ref,
- new FeatureDescriptor<LinkEventDefinition>(adapterFactory,object,ref) {
+ new FeatureDescriptor<LinkEventDefinition>(this, object,ref) {
@Override
- public String getDisplayName(Object context) {
- final LinkEventDefinition led = adopt(context);
- String name = led.getName();
+ public String getTextValue() {
+ String name = object.getName();
if (name==null || name.isEmpty())
- name = led.getId();
+ name = object.getId();
return name;
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- LinkEventDefinition object = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
// add all ItemDefinitions
Hashtable<String,Object> choices = new Hashtable<String,Object>();
String s;
@@ -67,7 +65,7 @@ public class LinkEventDefinitionPropertiesAdapter extends EventDefinitionPropert
List<LinkEventDefinition> links = (List)ModelUtil.getAllReachableObjects(defs, Bpmn2Package.eINSTANCE.getLinkEventDefinition());
for (LinkEventDefinition link : links) {
if (link!=object) {
- s = getDisplayName(link);
+ s = getTextValue();
choices.put(s,link);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageEventDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageEventDefinitionPropertiesAdapter.java
index d844542d..3d388165 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageEventDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageEventDefinitionPropertiesAdapter.java
@@ -34,9 +34,9 @@ public class MessageEventDefinitionPropertiesAdapter extends EventDefinitionProp
EStructuralFeature ref = Bpmn2Package.eINSTANCE.getMessageEventDefinition_OperationRef();
setProperty(ref, UI_CAN_CREATE_NEW, Boolean.FALSE);
setProperty(ref, UI_CAN_EDIT, Boolean.FALSE);
- setFeatureDescriptor(ref, new OperationRefFeatureDescriptor<MessageEventDefinition>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new OperationRefFeatureDescriptor<MessageEventDefinition>(this,object,ref));
ref = Bpmn2Package.eINSTANCE.getMessageEventDefinition_MessageRef();
- setFeatureDescriptor(ref, new MessageRefFeatureDescriptor<MessageEventDefinition>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new MessageRefFeatureDescriptor<MessageEventDefinition>(this,object,ref));
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java
new file mode 100644
index 00000000..9a635a58
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageFlowPropertiesAdapter.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.adapters.properties;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Message;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.ReceiveTask;
+import org.eclipse.bpmn2.SendTask;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+
+/**
+ * @author Gary Brown
+ *
+ */
+public class MessageFlowPropertiesAdapter extends ExtendedPropertiesAdapter<MessageFlow> {
+
+ /**
+ * @param adapterFactory
+ * @param object
+ */
+ public MessageFlowPropertiesAdapter(AdapterFactory adapterFactory, MessageFlow object) {
+ super(adapterFactory, object);
+
+ EStructuralFeature ref = Bpmn2Package.eINSTANCE.getMessageFlow_MessageRef();
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<MessageFlow>(this,object,ref) {
+
+ protected void internalSet(MessageFlow messageFlow, EStructuralFeature feature, Object value, int index) {
+ if (value instanceof Message || value==null) {
+ final Message message = (Message)value;
+ ResourceSet resourceSet = messageFlow.eResource().getResourceSet();
+
+ // first change the MessageRef on the SendTask
+ messageFlow.setMessageRef(message);
+
+ // If the source and/or target of this Message Flow are a SendTask
+ // or ReceiveTask make sure the messageRef is the same as ours
+ List<Connection> connections = DIUtils.getConnections(resourceSet, messageFlow);
+ for (Connection connection : connections) {
+ Object o = BusinessObjectUtil.getFirstBaseElement(connection.getEnd().getParent());
+ if (o instanceof ReceiveTask) {
+ ((ReceiveTask)o).setMessageRef(message);
+ }
+ o = BusinessObjectUtil.getFirstBaseElement(connection.getStart().getParent());
+ if (o instanceof SendTask) {
+ ((SendTask)o).setMessageRef(message);
+ }
+ }
+ }
+ }
+
+ });
+
+ setObjectDescriptor(new ObjectDescriptor<MessageFlow>(this,object) {
+ @Override
+ public String getTextValue() {
+ String text = ""; //$NON-NLS-1$
+ if (object.getName()!=null)
+ text = object.getName();
+ else {
+ if (object.getMessageRef()!=null) {
+ text += ChoreographyUtil.getMessageFlowName(object);
+ }
+
+ if (object.getSourceRef() != null) {
+ text += "(" + ExtendedPropertiesProvider.getTextValue(object.getSourceRef())+"->"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (object.getTargetRef() != null) {
+ text += ExtendedPropertiesProvider.getTextValue(object.getTargetRef());
+ }
+ text += ")"; //$NON-NLS-1$
+ }
+ }
+ return text;
+ }
+ });
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessagePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessagePropertiesAdapter.java
index 9c910b01..374936b4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessagePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessagePropertiesAdapter.java
@@ -15,7 +15,7 @@ package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Message;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -34,13 +34,12 @@ public class MessagePropertiesAdapter extends RootElementPropertiesAdapter<Messa
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getMessage_ItemRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Message>(adapterFactory, object, feature));
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Message>(this, object, feature));
- setObjectDescriptor(new RootElementObjectDescriptor<Message>(adapterFactory, object) {
+ setObjectDescriptor(new RootElementObjectDescriptor<Message>(this, object) {
@Override
- public String getDisplayName(Object context) {
- final Message mesg = adopt(context);
- String text = ChoreographyUtil.getMessageName(mesg);
+ public String getTextValue() {
+ String text = ChoreographyUtil.getMessageName(object);
return text;
}
});
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageRefFeatureDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageRefFeatureDescriptor.java
index 9f7e480a..6e2c176e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageRefFeatureDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MessageRefFeatureDescriptor.java
@@ -18,9 +18,8 @@ import java.util.Hashtable;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Message;
import org.eclipse.bpmn2.Operation;
-import org.eclipse.bpmn2.SendTask;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.emf.ecore.EStructuralFeature;
/**
@@ -28,20 +27,14 @@ import org.eclipse.emf.ecore.EStructuralFeature;
*
*/
public class MessageRefFeatureDescriptor<T extends BaseElement> extends RootElementRefFeatureDescriptor<T> {
-
- /**
- * @param adapterFactory
- * @param object
- * @param feature
- */
- public MessageRefFeatureDescriptor(AdapterFactory adapterFactory, T object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
- }
+ public MessageRefFeatureDescriptor(ExtendedPropertiesAdapter<T> owner, T object, EStructuralFeature feature) {
+ super(owner, object, feature);
+ }
+
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- Hashtable<String, Object> choices = super.getChoiceOfValues(context);
- final T object = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String, Object> choices = super.getChoiceOfValues();
Operation operation = null;
EStructuralFeature f = object.eClass().getEStructuralFeature("operationRef"); //$NON-NLS-1$
if (f!=null && object.eGet(f)!=null) {
@@ -49,16 +42,16 @@ public class MessageRefFeatureDescriptor<T extends BaseElement> extends RootElem
}
if (operation==null) {
- choices = super.getChoiceOfValues(context);
+ choices = super.getChoiceOfValues();
}
else {
choices = new Hashtable<String,Object>();
Message message = operation.getOutMessageRef();
if (message!=null)
- choices.put(ModelUtil.getDisplayName(message), message);
+ choices.put(ExtendedPropertiesProvider.getTextValue(message), message);
message = operation.getInMessageRef();
if (message!=null)
- choices.put(ModelUtil.getDisplayName(message), message);
+ choices.put(ExtendedPropertiesProvider.getTextValue(message), message);
}
return choices;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/Messages.java
index 8f07c871..cbc6d721 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/Messages.java
@@ -1,9 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.adapters.properties.messages"; //$NON-NLS-1$
+ public static String ActivityPropertiesAdapter_CompletionCondition_Label;
public static String CallActivityPropertiesAdapter_Called_Activity;
public static String DataAssociationPropertiesAdapter_Source;
public static String DataAssociationPropertiesAdapter_Target;
@@ -14,9 +25,11 @@ public class Messages extends NLS {
public static String FormalExpressionPropertiesAdapter_Constraint;
public static String FormalExpressionPropertiesAdapter_Script;
public static String FormalExpressionPropertiesAdapter_Script_Language;
+ public static String GroupPropertiesAdapter_CreateCategory_Prompt;
+ public static String GroupPropertiesAdapter_CreateCategory_Title;
public static String ImportPropertiesAdapter_Import;
public static String ItemAwareElementPropertiesAdapter_ID;
- public static String ItemDefinitionPropertiesAdapter_Data_Type;
+ public static String ItemDefinitionPropertiesAdapter_ItemDefinition_Label;
public static String ItemDefinitionPropertiesAdapter_Structure;
public static String OperationPropertiesAdapter_Title;
public static String ParticipantPropertiesAdapter_Multiplicity;
@@ -24,8 +37,10 @@ public class Messages extends NLS {
public static String PropertyPropertiesAdapter_LocalVar_Prefix;
public static String PropertyPropertiesAdapter_ProcessVar_Prefix;
public static String PropertyPropertiesAdapter_TaskVar_Prefix;
- public static String PropertyPropertiesAdapter_Variable;
+ public static String PropertyPropertiesAdapter_Property_Label;
public static String SignalPropertiesAdapter_ID;
+ public static String Interface_Operations_Label;
+ public static String Interface_Implementation_Label;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java
index e4c2f2c2..d12eca56 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/MultiInstanceLoopCharacteristicsPropertiesAdapter.java
@@ -55,7 +55,7 @@ public class MultiInstanceLoopCharacteristicsPropertiesAdapter extends ExtendedP
public MultiInstanceLoopCharacteristicsPropertiesAdapter(AdapterFactory adapterFactory, MultiInstanceLoopCharacteristics object) {
super(adapterFactory, object);
- setFeatureDescriptor(LOOP_DATA_INPUT_REF, new LoopCharacteristicsDataIoFeatureDescriptor(adapterFactory,object, LOOP_DATA_INPUT_REF));
+ setFeatureDescriptor(LOOP_DATA_INPUT_REF, new LoopCharacteristicsDataIoFeatureDescriptor(this, object, LOOP_DATA_INPUT_REF));
setProperty(LOOP_DATA_INPUT_REF, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setProperty(LOOP_DATA_INPUT_REF, UI_CAN_EDIT, Boolean.TRUE);
setProperty(LOOP_DATA_INPUT_REF, UI_CAN_CREATE_NEW, Boolean.TRUE);
@@ -63,7 +63,7 @@ public class MultiInstanceLoopCharacteristicsPropertiesAdapter extends ExtendedP
// setFeatureDescriptor(INPUT_DATA_ITEM, new LoopCharacteristicsDataIoFeatureDescriptor(adapterFactory,object, INPUT_DATA_ITEM));
// setProperty(INPUT_DATA_ITEM, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(LOOP_DATA_OUTPUT_REF, new LoopCharacteristicsDataIoFeatureDescriptor(adapterFactory,object, LOOP_DATA_OUTPUT_REF));
+ setFeatureDescriptor(LOOP_DATA_OUTPUT_REF, new LoopCharacteristicsDataIoFeatureDescriptor(this, object, LOOP_DATA_OUTPUT_REF));
setProperty(LOOP_DATA_OUTPUT_REF, UI_IS_MULTI_CHOICE, Boolean.TRUE);
setProperty(LOOP_DATA_OUTPUT_REF, UI_CAN_EDIT, Boolean.TRUE);
setProperty(LOOP_DATA_OUTPUT_REF, UI_CAN_CREATE_NEW, Boolean.TRUE);
@@ -88,23 +88,19 @@ public class MultiInstanceLoopCharacteristicsPropertiesAdapter extends ExtendedP
*/
protected class LoopCharacteristicsDataIoFeatureDescriptor extends FeatureDescriptor<MultiInstanceLoopCharacteristics> {
- /**
- * @param adapterFactory
- * @param object
- * @param feature
- */
- public LoopCharacteristicsDataIoFeatureDescriptor(AdapterFactory adapterFactory, MultiInstanceLoopCharacteristics object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
+ public LoopCharacteristicsDataIoFeatureDescriptor(
+ ExtendedPropertiesAdapter<MultiInstanceLoopCharacteristics> owner,
+ MultiInstanceLoopCharacteristics object, EStructuralFeature feature) {
+ super(owner, object, feature);
}
-
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- MultiInstanceLoopCharacteristics loopCharacteristics = adopt(context);
-
- EObject value = super.createFeature(resource, context, eclass);
+
+ @Override
+ public EObject createFeature(Resource resource, EClass eclass) {
+ EObject value = super.createFeature(resource, eclass);
// if the new object is the collection reference, we need to attach it to the
// activity's InputOutputSpecification.
if (feature==LOOP_DATA_INPUT_REF || feature==LOOP_DATA_OUTPUT_REF) {
- Activity container = (Activity)ModelUtil.getContainer(loopCharacteristics);
+ Activity container = (Activity)ModelUtil.getContainer(object);
EStructuralFeature f = container.eClass().getEStructuralFeature("ioSpecification"); //$NON-NLS-1$
if (f!=null) {
InputOutputSpecification ioSpecification = (InputOutputSpecification)container.eGet(f);
@@ -121,11 +117,10 @@ public class MultiInstanceLoopCharacteristicsPropertiesAdapter extends ExtendedP
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> choices = new Hashtable<String, Object>();
- MultiInstanceLoopCharacteristics loopCharacteristics = adopt(context);
- Activity container = (Activity)ModelUtil.getContainer(loopCharacteristics);
+ Activity container = (Activity)ModelUtil.getContainer(object);
List values = new ArrayList<EObject>();
if (feature == LOOP_DATA_INPUT_REF || feature == LOOP_DATA_OUTPUT_REF) {
// if (container instanceof Task)
@@ -145,7 +140,7 @@ public class MultiInstanceLoopCharacteristicsPropertiesAdapter extends ExtendedP
if (container instanceof SubProcess) {
// Collect all DataObjects from Process and SubProcess ancestors
// DataObjects are FlowElements, so we will have to weed those out from other FlowElements.
- List<EObject> flowElements = ModelUtil.collectAncestorObjects(loopCharacteristics, "flowElements", new Class[] {Process.class, SubProcess.class}); //$NON-NLS-1$
+ List<EObject> flowElements = ModelUtil.collectAncestorObjects(object, "flowElements", new Class[] {Process.class, SubProcess.class}); //$NON-NLS-1$
for (EObject fe : flowElements) {
if (fe instanceof DataObjectReference) {
fe = ((DataObjectReference)fe).getDataObjectRef();
@@ -175,7 +170,7 @@ public class MultiInstanceLoopCharacteristicsPropertiesAdapter extends ExtendedP
}
}
super.setChoiceOfValues(choices);
- return super.getChoiceOfValues(context);
+ return super.getChoiceOfValues();
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationPropertiesAdapter.java
index 0af0d870..9d7e9c69 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationPropertiesAdapter.java
@@ -25,6 +25,7 @@ import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.adapters.properties.InterfacePropertiesAdapter.ImplementationRefFeatureDescriptor;
import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jface.viewers.ILabelProvider;
@@ -53,18 +54,18 @@ public class OperationPropertiesAdapter extends ExtendedPropertiesAdapter<Operat
setFeatureDescriptor(ref, new ImplementationRefFeatureDescriptor<Operation>(this, adapterFactory, object, ref));
ref = Bpmn2Package.eINSTANCE.getOperation_InMessageRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<Operation>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<Operation>(this,object,ref));
setProperty(ref, UI_IS_MULTI_CHOICE, Boolean.TRUE);
ref = Bpmn2Package.eINSTANCE.getOperation_OutMessageRef();
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<Operation>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<Operation>(this,object,ref));
setProperty(ref, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setObjectDescriptor( new ObjectDescriptor<Operation>(adapterFactory, object) {
+ setObjectDescriptor( new ObjectDescriptor<Operation>(this,object) {
@Override
- public Operation createObject(Resource resource, Object context) {
- Operation operation = super.createObject(resource, context);
+ public Operation createObject(Resource resource, EClass eclass) {
+ Operation operation = super.createObject(resource, eclass);
// find an Interface to which we can add this new Operation
// Ask user which Interface if there are more than one.
Definitions definitions = ModelUtil.getDefinitions(resource);
@@ -115,7 +116,7 @@ public class OperationPropertiesAdapter extends ExtendedPropertiesAdapter<Operat
@Override
public String getText(Object element) {
- return ModelUtil.toDisplayName( ((Interface)element).getName() );
+ return ModelUtil.toCanonicalString( ((Interface)element).getName() );
}
});
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationRefFeatureDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationRefFeatureDescriptor.java
index cc648d77..aa239e78 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationRefFeatureDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OperationRefFeatureDescriptor.java
@@ -20,9 +20,9 @@ import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.Interface;
import org.eclipse.bpmn2.Operation;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EStructuralFeature;
/**
@@ -31,15 +31,10 @@ import org.eclipse.emf.ecore.EStructuralFeature;
*/
public class OperationRefFeatureDescriptor<T extends BaseElement> extends FeatureDescriptor<T> {
- /**
- * @param adapterFactory
- * @param object
- * @param feature
- */
- public OperationRefFeatureDescriptor(AdapterFactory adapterFactory, T object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
+ public OperationRefFeatureDescriptor(ExtendedPropertiesAdapter<T> owner, T object, EStructuralFeature feature) {
+ super(owner, object, feature);
}
-
+
@Override
public String getChoiceString(Object value) {
Operation op = (Operation)value;
@@ -48,9 +43,8 @@ public class OperationRefFeatureDescriptor<T extends BaseElement> extends Featur
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final T object = adopt(context);
- Hashtable<String,Object> choices = super.getChoiceOfValues(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
+ Hashtable<String,Object> choices = super.getChoiceOfValues();
// collect all defined Interfaces and add their Operations to the list of available choices
// Whether or not the Interface is actually supported by the underlying Process is a job
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OutputSetPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OutputSetPropertiesAdapter.java
index 99fe63dc..0e95d261 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OutputSetPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/OutputSetPropertiesAdapter.java
@@ -26,8 +26,8 @@ import org.eclipse.bpmn2.OutputSet;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -39,35 +39,35 @@ public class OutputSetPropertiesAdapter extends ExtendedPropertiesAdapter<Output
EStructuralFeature f = Bpmn2Package.eINSTANCE.getOutputSet_DataOutputRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new DataOutputFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new DataOutputFeatureDescriptor(this,object, f));
f = Bpmn2Package.eINSTANCE.getOutputSet_OptionalOutputRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new DataOutputFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new DataOutputFeatureDescriptor(this,object, f));
f = Bpmn2Package.eINSTANCE.getOutputSet_WhileExecutingOutputRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new DataOutputFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new DataOutputFeatureDescriptor(this,object, f));
f = Bpmn2Package.eINSTANCE.getOutputSet_InputSetRefs();
setProperty(f, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(f, new InputSetFeatureDescriptor(adapterFactory,object, f));
+ setFeatureDescriptor(f, new InputSetFeatureDescriptor(this,object, f));
}
protected class DataOutputFeatureDescriptor extends FeatureDescriptor<OutputSet> {
- public DataOutputFeatureDescriptor(AdapterFactory adapterFactory, OutputSet object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
+ public DataOutputFeatureDescriptor(ExtendedPropertiesAdapter<OutputSet> owner, OutputSet object,
+ EStructuralFeature feature) {
+ super(owner, object, feature);
}
-
+
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- OutputSet outputSet = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> values = new Hashtable<String, Object>();
List<DataOutput> valid = new ArrayList<DataOutput>();
if (feature == Bpmn2Package.eINSTANCE.getOutputSet_DataOutputRefs()) {
// choices are all DataOutputs in scope
- EObject container = outputSet.eContainer();
+ EObject container = object.eContainer();
while (container!=null) {
if (container instanceof CatchEvent) {
valid.addAll( ((CatchEvent)container).getDataOutputs() );
@@ -97,10 +97,10 @@ public class OutputSetPropertiesAdapter extends ExtendedPropertiesAdapter<Output
}
else {
// choices are only the DataOutputs listed in "InputSet.dataOutputRefs"
- valid.addAll(outputSet.getDataOutputRefs());
+ valid.addAll(object.getDataOutputRefs());
}
for (DataOutput data : valid) {
- values.put( ModelUtil.getDisplayName(data), data);
+ values.put( ExtendedPropertiesProvider.getTextValue(data), data);
}
return values;
}
@@ -108,21 +108,22 @@ public class OutputSetPropertiesAdapter extends ExtendedPropertiesAdapter<Output
protected class InputSetFeatureDescriptor extends FeatureDescriptor<OutputSet> {
- public InputSetFeatureDescriptor(AdapterFactory adapterFactory, OutputSet object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
- }
-
+ public InputSetFeatureDescriptor(ExtendedPropertiesAdapter<OutputSet> owner, OutputSet object,
+ EStructuralFeature feature) {
+ super(owner, object, feature);
+ }
+
+
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- OutputSet outputSet = adopt(context);
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String, Object> values = new Hashtable<String, Object>();
- EObject container = outputSet.eContainer();
+ EObject container = object.eContainer();
if (container instanceof InputOutputSpecification) {
// an OutputSet.outputSetRefs can only reference OutputSets in the same InputOutputSpecification
InputOutputSpecification ioSpec = (InputOutputSpecification)container;
for (InputSet is : ioSpec.getInputSets()) {
- values.put( ModelUtil.getDisplayName(is), is);
+ values.put( ExtendedPropertiesProvider.getTextValue(is), is);
}
}
return values;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ParticipantPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ParticipantPropertiesAdapter.java
index 522fb6da..a2d96242 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ParticipantPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ParticipantPropertiesAdapter.java
@@ -33,9 +33,11 @@ import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
@@ -57,13 +59,13 @@ public class ParticipantPropertiesAdapter extends ExtendedPropertiesAdapter<Part
EStructuralFeature ref = Bpmn2Package.eINSTANCE.getParticipant_ProcessRef();
setProperty(ref, UI_CAN_CREATE_NEW, Boolean.FALSE);
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<Participant>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<Participant>(this,object,ref));
- setObjectDescriptor(new ObjectDescriptor<Participant>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<Participant>(this,object) {
@Override
- public Participant createObject(Resource resource, Object context) {
- Participant participant = super.createObject(resource, context);
+ public Participant createObject(Resource resource, EClass eclass) {
+ Participant participant = super.createObject(resource, eclass);
Definitions definitions = null;
if (resource!=null)
@@ -92,19 +94,13 @@ public class ParticipantPropertiesAdapter extends ExtendedPropertiesAdapter<Part
break;
}
}
+ if (participant.eContainer()==null) {
+ // no Collaboration element found - create one
+ Collaboration collaboration = Bpmn2ModelerFactory.create(resource, Collaboration.class);
+ definitions.getRootElements().add(collaboration);
+ collaboration.getParticipants().add(participant);
+ }
}
-//
-// BPMNDiagram bpmnDiagram = BpmnDiFactory.eINSTANCE.createBPMNDiagram();
-// ModelUtil.setID(bpmnDiagram, resource);
-// bpmnDiagram.setName(process.getName());
-//
-// definitions.getDiagrams().add(bpmnDiagram);
-//
-// BPMNPlane plane = BpmnDiFactory.eINSTANCE.createBPMNPlane();
-// ModelUtil.setID(plane, resource);
-// plane.setBpmnElement(process);
-//
-// bpmnDiagram.setPlane(plane);
return participant;
}
@@ -116,16 +112,15 @@ public class ParticipantPropertiesAdapter extends ExtendedPropertiesAdapter<Part
setProperty(ref, UI_CAN_CREATE_NEW, Boolean.TRUE);
setProperty(ref, UI_CAN_EDIT, Boolean.TRUE);
setProperty(ref, UI_IS_MULTI_CHOICE, Boolean.FALSE);
- setFeatureDescriptor(ref, new FeatureDescriptor<Participant>(adapterFactory,object,ref) {
+ setFeatureDescriptor(ref, new FeatureDescriptor<Participant>(this,object,ref) {
@Override
- public String getLabel(Object context) {
+ public String getLabel() {
return Messages.ParticipantPropertiesAdapter_Multiplicity;
}
@Override
- public String getDisplayName(Object context) {
- Participant object = adopt(context);
+ public String getTextValue() {
ParticipantMultiplicity pm = object.getParticipantMultiplicity();
if (pm!=null) {
return pm.getMinimum() + ".." + pm.getMaximum(); //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ProcessPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ProcessPropertiesAdapter.java
index 2e98cb09..cb115a86 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ProcessPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ProcessPropertiesAdapter.java
@@ -15,9 +15,7 @@ package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Definitions;
-import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.Process;
-import org.eclipse.bpmn2.Property;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
@@ -29,8 +27,6 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
/**
* @author Bob Brodt
@@ -48,61 +44,37 @@ public class ProcessPropertiesAdapter extends RootElementPropertiesAdapter<Proce
feature = Bpmn2Package.eINSTANCE.getCallableElement_Name();
setFeatureDescriptor(feature,
- new FeatureDescriptor<Process>(adapterFactory,object,feature) {
+ new FeatureDescriptor<Process>(this,object,feature) {
+
@Override
- public void setValue(Object context, final Object value) {
+ protected void internalSet(Process process, EStructuralFeature feature, Object value, int index) {
// changing the process name also changes its BPMNDiagram name
// which is used as the tab label in the multipage editor
- final Process process = adopt(context);
- BPMNDiagram bpmnDiagram = null;
- Definitions defs = ModelUtil.getDefinitions(process);
- if (defs!=null) {
- for (BPMNDiagram d : defs.getDiagrams()) {
- if (d.getPlane().getBpmnElement() == process) {
- bpmnDiagram = d;
- break;
- }
- }
- }
+ // NO! This is a bad idea.
+// BPMNDiagram bpmnDiagram = null;
+// Definitions defs = ModelUtil.getDefinitions(process);
+// if (defs!=null) {
+// for (BPMNDiagram d : defs.getDiagrams()) {
+// if (d.getPlane().getBpmnElement() == process) {
+// bpmnDiagram = d;
+// break;
+// }
+// }
+// }
- TransactionalEditingDomain editingDomain = getEditingDomain(process);
- if (editingDomain == null) {
- process.setName((String)value);
- if (bpmnDiagram!=null)
- bpmnDiagram.setName((String)value);
- } else {
- final BPMNDiagram d = bpmnDiagram;
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- process.setName((String)value);
- if (d!=null)
- d.setName((String)value);
- }
- });
- }
+ process.setName((String)value);
+// if (bpmnDiagram!=null)
+// bpmnDiagram.setName((String)value);
}
}
);
- setObjectDescriptor(new ObjectDescriptor<Process>(adapterFactory, object) {
- @Override
- public Process createObject(Resource resource, Object context) {
- ExtendedPropertiesAdapter adapter = (ExtendedPropertiesAdapter) AdapterUtil.adapt(
- Bpmn2Package.eINSTANCE.getRootElement(),
- ExtendedPropertiesAdapter.class);
- Process process = (Process) adapter.getObjectDescriptor().createObject(resource, object);
- return process;
- }
- });
-
feature = Bpmn2Package.eINSTANCE.getProcess_Properties();
setFeatureDescriptor(feature,
- new FeatureDescriptor<Process>(adapterFactory,object,feature) {
+ new FeatureDescriptor<Process>(this,object,feature) {
@Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- Process process = adopt(context);
- return PropertyPropertiesAdapter.createProperty(process.getProperties());
+ public EObject createFeature(Resource resource, EClass eclass) {
+ return PropertyPropertiesAdapter.createProperty(object.getProperties());
}
}
);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java
index 85c5fdd9..757bdc60 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/PropertyPropertiesAdapter.java
@@ -26,6 +26,7 @@ import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.Property;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
@@ -49,10 +50,10 @@ public class PropertyPropertiesAdapter extends ItemAwareElementPropertiesAdapter
super(adapterFactory, object);
EStructuralFeature f = Bpmn2Package.eINSTANCE.getProperty_Name();
- final FeatureDescriptor<Property> fd = new FeatureDescriptor<Property>(adapterFactory,object, f) {
+ final FeatureDescriptor<Property> fd = new FeatureDescriptor<Property>(this,object,f) {
@Override
- public void setDisplayName(String text) {
+ public void setTextValue(String text) {
int i = text.lastIndexOf("/"); //$NON-NLS-1$
if (i>=0)
text = text.substring(i+1);
@@ -75,10 +76,10 @@ public class PropertyPropertiesAdapter extends ItemAwareElementPropertiesAdapter
break;
}
else if (container instanceof Activity || container instanceof Process) {
- text = ModelUtil.getDisplayName(container) + "/" + text; //$NON-NLS-1$
+ text = ExtendedPropertiesProvider.getTextValue(container) + "/" + text; //$NON-NLS-1$
}
else if (container instanceof CatchEvent || container instanceof ThrowEvent) {
- text = ModelUtil.getDisplayName(container) + "/" + text; //$NON-NLS-1$
+ text = ExtendedPropertiesProvider.getTextValue(container) + "/" + text; //$NON-NLS-1$
}
container = container.eContainer();
}
@@ -88,22 +89,22 @@ public class PropertyPropertiesAdapter extends ItemAwareElementPropertiesAdapter
};
setFeatureDescriptor(f, fd);
- setObjectDescriptor(new ObjectDescriptor<Property>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<Property>(this,object) {
@Override
- public void setDisplayName(String text) {
- fd.setDisplayName(text);
+ public void setTextValue(String text) {
+ fd.setTextValue(text);
ModelUtil.setID(object);
}
@Override
- public String getDisplayName(Object context) {
- return fd.getChoiceString(context);
+ public String getTextValue() {
+ return fd.getChoiceString(object);
}
@Override
- public String getLabel(Object context) {
- return Messages.PropertyPropertiesAdapter_Variable;
+ public String getLabel() {
+ return Messages.PropertyPropertiesAdapter_Property_Label;
}
});
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ReceiveTaskPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ReceiveTaskPropertiesAdapter.java
index 0d281ed6..fe8efce2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ReceiveTaskPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ReceiveTaskPropertiesAdapter.java
@@ -61,24 +61,12 @@ public class ReceiveTaskPropertiesAdapter extends TaskPropertiesAdapter<ReceiveT
setProperty(feature, UI_CAN_EDIT, Boolean.TRUE);
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new MessageRefFeatureDescriptor<ReceiveTask>(adapterFactory,object,feature) {
+ setFeatureDescriptor(feature, new MessageRefFeatureDescriptor<ReceiveTask>(this,object,feature) {
@Override
- public void setValue(Object context, final Object value) {
+ protected void internalSet(ReceiveTask receiveTask, EStructuralFeature feature, Object value, int index) {
if (value instanceof Message || value==null) {
- final ReceiveTask object = adopt(context);
- final Message message = (Message)value;
- final TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- setMessageRef(object, message);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- setMessageRef(object, message);
- }
- });
- }
+ setMessageRef(receiveTask, (Message)value);
}
}
@@ -86,27 +74,15 @@ public class ReceiveTaskPropertiesAdapter extends TaskPropertiesAdapter<ReceiveT
feature = Bpmn2Package.eINSTANCE.getReceiveTask_OperationRef();
setProperty(feature, UI_CAN_CREATE_NEW, Boolean.TRUE);
- setProperty(feature, UI_CAN_EDIT, Boolean.FALSE);
+ setProperty(feature, UI_CAN_EDIT, Boolean.TRUE);
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new OperationRefFeatureDescriptor<ReceiveTask>(adapterFactory,object,feature) {
+ setFeatureDescriptor(feature, new OperationRefFeatureDescriptor<ReceiveTask>(this,object,feature) {
@Override
- public void setValue(Object context, final Object value) {
+ protected void internalSet(ReceiveTask receiveTask, EStructuralFeature feature, Object value, int index) {
if (value instanceof Operation || value==null) {
- final ReceiveTask object = adopt(context);
- final Operation operation = (Operation)value;
- final TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- setOperationRef(object, operation);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- setOperationRef(object, operation);
- }
- });
- }
+ setOperationRef(receiveTask, (Operation)value);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceAssignmentExpressionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceAssignmentExpressionPropertiesAdapter.java
index 9d186b9f..69d67195 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceAssignmentExpressionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceAssignmentExpressionPropertiesAdapter.java
@@ -22,10 +22,7 @@ import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
/**
* @author Bob Brodt
@@ -42,14 +39,13 @@ public class ResourceAssignmentExpressionPropertiesAdapter extends ExtendedPrope
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getResourceAssignmentExpression_Expression();
setFeatureDescriptor(ref,
- new FeatureDescriptor<ResourceAssignmentExpression>(adapterFactory,object,ref) {
+ new FeatureDescriptor<ResourceAssignmentExpression>(this,object,ref) {
@Override
- public String getDisplayName(Object context) {
- ResourceAssignmentExpression rae = adopt(context);
+ public String getTextValue() {
String text = null;
- if (rae.getExpression() instanceof FormalExpression) {
- text = ModelUtil.getExpressionBody((FormalExpression)rae.getExpression());
+ if (object.getExpression() instanceof FormalExpression) {
+ text = ModelUtil.getExpressionBody((FormalExpression)object.getExpression());
}
if (text==null)
return ""; //$NON-NLS-1$
@@ -57,48 +53,24 @@ public class ResourceAssignmentExpressionPropertiesAdapter extends ExtendedPrope
}
@Override
- public void setValue(Object context, Object value) {
- final ResourceAssignmentExpression rae = adopt(context);
+ protected void internalSet(ResourceAssignmentExpression rae, EStructuralFeature feature, Object value, int index) {
if (!(rae.getExpression() instanceof FormalExpression)) {
if (value instanceof String) {
final FormalExpression e = Bpmn2ModelerFactory.create(FormalExpression.class);
e.setBody((String) value);
- TransactionalEditingDomain editingDomain = getEditingDomain(rae);
- if (editingDomain == null) {
- rae.eSet(feature, e);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- rae.eSet(feature, e);
- ModelUtil.setID(e);
- }
- });
- }
+ rae.eSet(feature, e);
}
else if (value instanceof FormalExpression) {
- final FormalExpression e = (FormalExpression)value;
- TransactionalEditingDomain editingDomain = getEditingDomain(rae);
- if (editingDomain == null) {
- rae.eSet(feature, e);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- rae.eSet(feature, e);
- ModelUtil.setID(e);
- }
- });
- }
+ rae.eSet(feature, (FormalExpression)value);
}
}
}
}
);
- setObjectDescriptor(new ObjectDescriptor<ResourceAssignmentExpression>(adapterFactory, object) {
+ setObjectDescriptor(new ObjectDescriptor<ResourceAssignmentExpression>(this,object) {
@Override
- public String getDisplayName(Object context) {
- return getFeatureDescriptor(ref).getDisplayName(context);
+ public String getTextValue() {
+ return getFeatureDescriptor(ref).getTextValue();
}
});
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterBindingPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterBindingPropertiesAdapter.java
index 7fd99951..7fd99951 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterBindingPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterBindingPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterPropertiesAdapter.java
index d573e9ad..dc718ff2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceParameterPropertiesAdapter.java
@@ -34,7 +34,7 @@ public class ResourceParameterPropertiesAdapter extends ExtendedPropertiesAdapte
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getResourceParameter_Type();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<ResourceParameter>(adapterFactory, object, feature));
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<ResourceParameter>(this, object, feature));
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceRolePropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceRolePropertiesAdapter.java
index af620a92..815b9ef3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceRolePropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ResourceRolePropertiesAdapter.java
@@ -41,30 +41,28 @@ public class ResourceRolePropertiesAdapter extends ExtendedPropertiesAdapter<Res
final EStructuralFeature ref = Bpmn2Package.eINSTANCE.getResourceRole_ResourceAssignmentExpression();
setFeatureDescriptor(ref,
- new FeatureDescriptor<ResourceRole>(adapterFactory,object,ref) {
+ new FeatureDescriptor<ResourceRole>(this,object,ref) {
@Override
- public String getDisplayName(Object context) {
- final ResourceRole rr = adopt(context);
- ResourceAssignmentExpression rae = rr.getResourceAssignmentExpression();
+ public String getTextValue() {
+ ResourceAssignmentExpression rae = object.getResourceAssignmentExpression();
if (rae!=null) {
ExtendedPropertiesAdapter<ResourceAssignmentExpression> adapter =
ExtendedPropertiesAdapter.adapt(rae);
- return adapter.getObjectDescriptor().getDisplayName(rae);
+ return adapter.getObjectDescriptor().getTextValue();
}
return ""; //$NON-NLS-1$
}
@Override
- public void setValue(Object context, Object value) {
- final ResourceRole rr = adopt(context);
+ protected void internalSet(ResourceRole rr, EStructuralFeature feature, Object value, int index) {
if (value instanceof FormalExpression) {
ResourceAssignmentExpression rae = rr.getResourceAssignmentExpression();
if (rae!=null) {
ExtendedPropertiesAdapter<ResourceAssignmentExpression> adapter =
ExtendedPropertiesAdapter.adapt(rae);
EStructuralFeature raeFeature = Bpmn2Package.eINSTANCE.getResourceAssignmentExpression_Expression();
- adapter.getFeatureDescriptor(raeFeature).setValue(rae, value);
+ adapter.getFeatureDescriptor(raeFeature).setValue(value);
}
}
else if (value instanceof ResourceAssignmentExpression) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementPropertiesAdapter.java
index 531a4bad..fac33cac 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementPropertiesAdapter.java
@@ -18,8 +18,10 @@ import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
import org.eclipse.bpmn2.modeler.core.adapters.ObjectDescriptor;
+import org.eclipse.bpmn2.modeler.core.model.RootElementComparator;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.ECollections;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
@@ -49,32 +51,47 @@ public class RootElementPropertiesAdapter<T extends RootElement> extends Extende
EList<EClass> supertypes = ((EClass)type).getEAllSuperTypes();
for (EClass st : supertypes) {
if (st == Bpmn2Package.eINSTANCE.getRootElement()) {
- setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<T>(adapterFactory,object,ref));
+ setFeatureDescriptor(ref, new RootElementRefFeatureDescriptor<T>(this,object,ref));
}
}
}
}
- setObjectDescriptor(new RootElementObjectDescriptor<T>(adapterFactory, object));
+ setObjectDescriptor(new RootElementObjectDescriptor<T>(this, object));
}
public class RootElementObjectDescriptor<T extends RootElement> extends ObjectDescriptor<T> {
- public RootElementObjectDescriptor(AdapterFactory adapterFactory,T object) {
- super(adapterFactory, object);
+ public RootElementObjectDescriptor(ExtendedPropertiesAdapter<T> owner, T object) {
+ super(owner, object);
}
@Override
- public T createObject(Resource resource, Object context) {
- T rootElement = super.createObject(resource, context);
+ public T createObject(Resource resource, EClass eclass) {
+ T rootElement = super.createObject(resource, eclass);
Definitions definitions = null;
if (resource!=null)
definitions = (Definitions) resource.getContents().get(0).eContents().get(0);
else
definitions = ModelUtil.getDefinitions(rootElement);
- if (definitions!=null)
- definitions.getRootElements().add(rootElement);
+ if (definitions!=null) {
+ try {
+ definitions.getRootElements().add(rootElement);
+ ECollections.sort((EList<RootElement>)definitions.getRootElements(), new RootElementComparator());
+ }
+ catch (IllegalStateException e) {
+ try {
+ // well this is odd...
+ // even though we did not have an open write transaction,
+ // the getRootElements().add() does not get rolled back.
+ definitions.getRootElements().remove(rootElement);
+ }
+ catch (Exception e2) {
+ throw e;
+ }
+ }
+ }
return rootElement;
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementRefFeatureDescriptor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementRefFeatureDescriptor.java
index 06608bdc..4e46b4ad 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementRefFeatureDescriptor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/RootElementRefFeatureDescriptor.java
@@ -19,18 +19,16 @@ import java.util.Iterator;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.RootElement;
-import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.core.runtime.Assert;
/**
* @author Bob Brodt
@@ -38,22 +36,12 @@ import org.eclipse.core.runtime.Assert;
*/
public class RootElementRefFeatureDescriptor<T extends BaseElement> extends FeatureDescriptor<T> {
- /**
- * @param adapterFactory
- * @param object
- * @param feature
- */
- public RootElementRefFeatureDescriptor(AdapterFactory adapterFactory, T object, EStructuralFeature feature) {
- super(adapterFactory, object, feature);
- // I found a couple of instances where this class was used for references that were NOT
- // RootElements - just check to make sure here...
- Assert.isTrue( RootElement.class.isAssignableFrom(feature.getEType().getInstanceClass()) );
+ public RootElementRefFeatureDescriptor(ExtendedPropertiesAdapter<T> owner, T object, EStructuralFeature feature) {
+ super(owner, object, feature);
}
-
- @Override
- public EObject createFeature(Resource resource, Object context, EClass eClass) {
- final T object = adopt(context);
+ @Override
+ public EObject createFeature(Resource resource, EClass eClass) {
if (resource==null && object.eResource()!=null)
resource = object.eResource();
@@ -75,9 +63,7 @@ public class RootElementRefFeatureDescriptor<T extends BaseElement> extends Feat
}
@Override
- public Hashtable<String, Object> getChoiceOfValues(Object context) {
- final T object = adopt(context);
-
+ public Hashtable<String, Object> getChoiceOfValues() {
Hashtable<String,Object> choices = new Hashtable<String,Object>();
Object value = object.eGet(feature);
if (value instanceof EList) {
@@ -85,7 +71,7 @@ public class RootElementRefFeatureDescriptor<T extends BaseElement> extends Feat
while (iter.hasNext()) {
value = iter.next();
if (value instanceof RootElement)
- choices.put(ModelUtil.getDisplayName(value), value);
+ choices.put(ModelUtil.getTextValue(value), value);
}
}
else if (value instanceof EObject) {
@@ -97,7 +83,7 @@ public class RootElementRefFeatureDescriptor<T extends BaseElement> extends Feat
if (definitions!=null) {
for (RootElement re : definitions.getRootElements()) {
if (re.eClass() == feature.getEType()) {
- choices.put(ModelUtil.getDisplayName(re), re);
+ choices.put(ExtendedPropertiesProvider.getTextValue(re), re);
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ScriptTaskPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ScriptTaskPropertiesAdapter.java
index b4a9efac..1c1cc507 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ScriptTaskPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ScriptTaskPropertiesAdapter.java
@@ -36,32 +36,30 @@ public class ScriptTaskPropertiesAdapter extends TaskPropertiesAdapter<ScriptTas
EStructuralFeature ref = Bpmn2Package.eINSTANCE.getScriptTask_Script();
setFeatureDescriptor(ref,
- new FeatureDescriptor<ScriptTask>(adapterFactory,object,ref) {
+ new FeatureDescriptor<ScriptTask>(this,object,ref) {
@Override
- public boolean isMultiLine(Object context) {
+ public boolean isMultiLine() {
return true;
}
@Override
- public String getDisplayName(Object context) {
- ScriptTask task = adopt(context);
- if (task.getScript()==null)
+ public String getTextValue() {
+ if (object.getScript()==null)
return ""; //$NON-NLS-1$
- return task.getScript();
+ return object.getScript();
}
});
ref = Bpmn2Package.eINSTANCE.getScriptTask_ScriptFormat();
setFeatureDescriptor(ref,
- new FeatureDescriptor<ScriptTask>(adapterFactory,object,ref) {
+ new FeatureDescriptor<ScriptTask>(this,object,ref) {
@Override
- public String getDisplayName(Object context) {
- ScriptTask task = adopt(context);
- if (task.getScriptFormat()==null)
+ public String getTextValue() {
+ if (object.getScriptFormat()==null)
return ""; // TODO: is there a default mime-type? //$NON-NLS-1$
- return task.getScriptFormat();
+ return object.getScriptFormat();
}
});
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SendTaskPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SendTaskPropertiesAdapter.java
index 77fa2b89..af006ae6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SendTaskPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SendTaskPropertiesAdapter.java
@@ -24,6 +24,7 @@ import org.eclipse.bpmn2.SendTask;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.RecordingCommand;
@@ -50,23 +51,12 @@ public class SendTaskPropertiesAdapter extends TaskPropertiesAdapter<SendTask> {
setProperty(feature, UI_CAN_EDIT, Boolean.TRUE);
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new MessageRefFeatureDescriptor<SendTask>(adapterFactory,object,feature) {
+ setFeatureDescriptor(feature, new MessageRefFeatureDescriptor<SendTask>(this,object,feature) {
- public void setValue(Object context, final Object value) {
+ @Override
+ protected void internalSet(SendTask sendTask, EStructuralFeature feature, Object value, int index) {
if (value instanceof Message || value==null) {
- final SendTask object = adopt(context);
- final Message message = (Message)value;
- final TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- setMessageRef(object, message);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- setMessageRef(object, message);
- }
- });
- }
+ setMessageRef(sendTask, (Message)value);
}
}
@@ -74,26 +64,15 @@ public class SendTaskPropertiesAdapter extends TaskPropertiesAdapter<SendTask> {
feature = Bpmn2Package.eINSTANCE.getSendTask_OperationRef();
setProperty(feature, UI_CAN_CREATE_NEW, Boolean.TRUE);
- setProperty(feature, UI_CAN_EDIT, Boolean.FALSE);
+ setProperty(feature, UI_CAN_EDIT, Boolean.TRUE);
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new OperationRefFeatureDescriptor<SendTask>(adapterFactory,object,feature) {
+ setFeatureDescriptor(feature, new OperationRefFeatureDescriptor<SendTask>(this,object,feature) {
- public void setValue(Object context, final Object value) {
+ @Override
+ protected void internalSet(SendTask sendTask, EStructuralFeature feature, Object value, int index) {
if (value instanceof Operation || value==null) {
- final SendTask object = adopt(context);
- final Operation operation = (Operation)value;
- final TransactionalEditingDomain editingDomain = getEditingDomain(object);
- if (editingDomain == null) {
- setOperationRef(object, operation);
- } else {
- editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
- @Override
- protected void doExecute() {
- setOperationRef(object, operation);
- }
- });
- }
+ setOperationRef(sendTask, (Operation)value);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SequenceFlowPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SequenceFlowPropertiesAdapter.java
index e6176dca..e6176dca 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SequenceFlowPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SequenceFlowPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ServiceTaskPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ServiceTaskPropertiesAdapter.java
index 2c7266ea..65b02e04 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ServiceTaskPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ServiceTaskPropertiesAdapter.java
@@ -14,16 +14,24 @@
package org.eclipse.bpmn2.modeler.ui.adapters.properties;
import java.util.Hashtable;
+import java.util.Map.Entry;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.modeler.core.adapters.FeatureDescriptor;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.runtime.ServiceImplementationDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
/**
- * @author Bob Brodt
- *
+ * Extended Properties Adapter for Service Tasks.
+ * <p>
+ * This adapter initializes Service Task Operation features and provides Service
+ * Implementation selection choices for the UI.
*/
public class ServiceTaskPropertiesAdapter extends TaskPropertiesAdapter<ServiceTask> {
@@ -39,10 +47,35 @@ public class ServiceTaskPropertiesAdapter extends TaskPropertiesAdapter<ServiceT
setProperty(feature, UI_CAN_EDIT, Boolean.TRUE);
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new OperationRefFeatureDescriptor<ServiceTask>(adapterFactory,object,feature));
+ setFeatureDescriptor(feature, new OperationRefFeatureDescriptor<ServiceTask>(this,object,feature));
feature = Bpmn2Package.eINSTANCE.getServiceTask_Implementation();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
+
+ setFeatureDescriptor(feature,
+ new FeatureDescriptor<ServiceTask>(this,object,feature) {
+
+ @Override
+ public Hashtable<String, Object> getChoiceOfValues() {
+ return ServiceTaskPropertiesAdapter.getChoiceOfValues(object);
+ }
+ }
+ );
}
+ public static Hashtable<String, Object> getChoiceOfValues(EObject object) {
+ Hashtable<String,Object> choices = new Hashtable<String,Object>();
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ for (ServiceImplementationDescriptor eld : rt.getServiceImplementationDescriptors()) {
+ choices.put(eld.getName(), ModelUtil.createStringWrapper(eld.getUri()));
+ }
+
+ Bpmn2Preferences prefs = Bpmn2Preferences.getInstance(object);
+ for (Entry<String, String> entry : prefs.getServiceImplementations().entrySet()) {
+ if (!choices.containsKey(entry.getKey())) {
+ choices.put(entry.getKey(), ModelUtil.createStringWrapper(entry.getValue()));
+ }
+ }
+ return choices;
+ }
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalEventDefinitionPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalEventDefinitionPropertiesAdapter.java
index e8c6de37..e8c6de37 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalEventDefinitionPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalEventDefinitionPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalPropertiesAdapter.java
index 31974f97..625de7f6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/SignalPropertiesAdapter.java
@@ -33,18 +33,17 @@ public class SignalPropertiesAdapter extends RootElementPropertiesAdapter<Signal
EStructuralFeature feature = Bpmn2Package.eINSTANCE.getSignal_StructureRef();
setProperty(feature, UI_IS_MULTI_CHOICE, Boolean.TRUE);
- setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Signal>(adapterFactory, object, feature));
+ setFeatureDescriptor(feature, new ItemDefinitionRefFeatureDescriptor<Signal>(this, object, feature));
- setObjectDescriptor(new RootElementObjectDescriptor<Signal>(adapterFactory, object) {
+ setObjectDescriptor(new RootElementObjectDescriptor<Signal>(this, object) {
@Override
- public String getDisplayName(Object context) {
- final Signal signal = adopt(context);
+ public String getTextValue() {
String text = ""; //$NON-NLS-1$
- if (signal.getName()!=null) {
- text += signal.getName();
+ if (object.getName()!=null) {
+ text += object.getName();
}
if (text.isEmpty())
- text = Messages.SignalPropertiesAdapter_ID + signal.getId();
+ text = Messages.SignalPropertiesAdapter_ID + object.getId();
return text;
}
});
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/TaskPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/TaskPropertiesAdapter.java
index 1ee6ad7e..1ee6ad7e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/TaskPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/TaskPropertiesAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ThrowEventPropertiesAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ThrowEventPropertiesAdapter.java
index 7084377a..0f996f7a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ThrowEventPropertiesAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/ThrowEventPropertiesAdapter.java
@@ -42,17 +42,16 @@ public class ThrowEventPropertiesAdapter extends EventPropertiesAdapter<ThrowEve
EStructuralFeature feature;
feature = Bpmn2Package.eINSTANCE.getThrowEvent_DataInputs();
- setFeatureDescriptor(feature, new FeatureDescriptor<ThrowEvent>(adapterFactory, object, feature) {
+ setFeatureDescriptor(feature, new FeatureDescriptor<ThrowEvent>(this,object, feature) {
@Override
- public EObject createFeature(Resource resource, Object context, EClass eclass) {
- final ThrowEvent throwEvent = adopt(context);
- InputSet inputSet = throwEvent.getInputSet();
+ public EObject createFeature(Resource resource, EClass eclass) {
+ InputSet inputSet = object.getInputSet();
if (inputSet==null) {
inputSet = Bpmn2ModelerFactory.create(InputSet.class);
- throwEvent.setInputSet(inputSet);
+ object.setInputSet(inputSet);
}
- DataInput dataInput = DataInputPropertiesAdapter.createDataInput(resource, throwEvent.getDataInputs());
+ DataInput dataInput = DataInputPropertiesAdapter.createDataInput(resource, object.getDataInputs());
inputSet.getDataInputRefs().add(dataInput);
return dataInput;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/messages.properties
index 8f7dd228..27cf3f34 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/adapters/properties/messages.properties
@@ -1,3 +1,14 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+ActivityPropertiesAdapter_CompletionCondition_Label=Completion Condition
CallActivityPropertiesAdapter_Called_Activity=Called Activity
DataAssociationPropertiesAdapter_Source=Source
DataAssociationPropertiesAdapter_Target=Target
@@ -8,9 +19,11 @@ EscalationPropertiesAdapter_ID=ID:
FormalExpressionPropertiesAdapter_Constraint=Constraint
FormalExpressionPropertiesAdapter_Script=Script
FormalExpressionPropertiesAdapter_Script_Language=Script Language
+GroupPropertiesAdapter_CreateCategory_Prompt=Enter Category
+GroupPropertiesAdapter_CreateCategory_Title=Create Category
ImportPropertiesAdapter_Import=Import
ItemAwareElementPropertiesAdapter_ID=ID:
-ItemDefinitionPropertiesAdapter_Data_Type=Data Type
+ItemDefinitionPropertiesAdapter_ItemDefinition_Label=Data Type
ItemDefinitionPropertiesAdapter_Structure=Structure
OperationPropertiesAdapter_Title=Select an Interface for the new Operation
ParticipantPropertiesAdapter_Multiplicity=Multiplicity
@@ -18,5 +31,7 @@ PropertyPropertiesAdapter_EventVar_Prefix=eventVar
PropertyPropertiesAdapter_LocalVar_Prefix=localVar
PropertyPropertiesAdapter_ProcessVar_Prefix=processVar
PropertyPropertiesAdapter_TaskVar_Prefix=taskVar
-PropertyPropertiesAdapter_Variable=Variable
+PropertyPropertiesAdapter_Property_Label=Properties
SignalPropertiesAdapter_ID=ID:
+Interface_Operations_Label=Defined Operations
+Interface_Implementation_Label=Implementation
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/CreateDiagramCommand.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/CreateDiagramCommand.java
index a84f0194..a84f0194 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/CreateDiagramCommand.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/CreateDiagramCommand.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/Messages.java
index 922abec2..aef3800a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.commands;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties
new file mode 100644
index 00000000..9ac33a48
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/commands/messages.properties
@@ -0,0 +1,17 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+CreateDiagramCommand_Title=New {0} Diagram
+CreateDiagramCommand_Message=Enter {0} Name
+CreateDiagramCommand_Choreography=Choreography
+CreateDiagramCommand_Collaboration=Collaboration
+CreateDiagramCommand_Invalid_Duplicate=The {0} already exists.
+CreateDiagramCommand_Invalid_Empty=Name must not be empty
+CreateDiagramCommand_Process=Process
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMNFeatureProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java
index 647c7643..b721458f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMNFeatureProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMN2FeatureProvider.java
@@ -14,7 +14,7 @@ package org.eclipse.bpmn2.modeler.ui.diagram;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Hashtable;
+import java.util.LinkedHashMap;
import java.util.List;
import org.eclipse.bpmn2.AdHocSubProcess;
@@ -23,6 +23,7 @@ import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.BusinessRuleTask;
import org.eclipse.bpmn2.CallActivity;
import org.eclipse.bpmn2.CallChoreography;
+import org.eclipse.bpmn2.CallConversation;
import org.eclipse.bpmn2.CancelEventDefinition;
import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.CompensateEventDefinition;
@@ -41,6 +42,11 @@ import org.eclipse.bpmn2.ErrorEventDefinition;
import org.eclipse.bpmn2.EscalationEventDefinition;
import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.ExclusiveGateway;
+import org.eclipse.bpmn2.GlobalBusinessRuleTask;
+import org.eclipse.bpmn2.GlobalManualTask;
+import org.eclipse.bpmn2.GlobalScriptTask;
+import org.eclipse.bpmn2.GlobalTask;
+import org.eclipse.bpmn2.GlobalUserTask;
import org.eclipse.bpmn2.Group;
import org.eclipse.bpmn2.InclusiveGateway;
import org.eclipse.bpmn2.IntermediateCatchEvent;
@@ -61,6 +67,7 @@ import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.SignalEventDefinition;
import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.SubChoreography;
+import org.eclipse.bpmn2.SubConversation;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.TerminateEventDefinition;
@@ -69,17 +76,27 @@ import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.Transaction;
import org.eclipse.bpmn2.UserTask;
import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.di.DIImport;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateConnectionFeature;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
import org.eclipse.bpmn2.modeler.core.features.BPMNDiagramFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomConnectionFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer.CreateCustomShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.DefaultCopyBPMNElementFeature;
import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.DefaultPasteBPMNElementFeature;
import org.eclipse.bpmn2.modeler.core.features.DefaultRemoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.IBpmn2FeatureProvider;
import org.eclipse.bpmn2.modeler.core.features.IConnectionFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.ICustomElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.IShapeFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.ICustomElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.bendpoint.AddBendpointFeature;
import org.eclipse.bpmn2.modeler.core.features.bendpoint.MoveBendpointFeature;
import org.eclipse.bpmn2.modeler.core.features.bendpoint.RemoveBendpointFeature;
@@ -91,13 +108,9 @@ import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.AdHocSubProcessFeatureContainer;
-import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.CallActivityFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.TransactionFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.BusinessRuleTaskFeatureContainer;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomConnectionFeatureContainer;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer.CreateCustomShapeFeature;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.ManualTaskFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.ReceiveTaskFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.ScriptTaskFeatureContainer;
@@ -107,12 +120,20 @@ import org.eclipse.bpmn2.modeler.ui.features.activity.task.TaskFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.task.UserTaskFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.artifact.GroupFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.artifact.TextAnnotationFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.CallActivityFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.CallGlobalBusinessRuleTaskFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.CallGlobalManualTaskFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.CallGlobalScriptTaskFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.CallGlobalTaskFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.CallGlobalUserTaskFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.choreography.CallChoreographyFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyMessageLinkFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyTaskFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.choreography.SubChoreographyFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.conversation.CallConversationFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.conversation.ConversationFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.conversation.ConversationLinkFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.conversation.SubConversationFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.data.DataInputFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.data.DataObjectFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.data.DataObjectReferenceFeatureContainer;
@@ -157,8 +178,10 @@ import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeature;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveBendpointFeature;
+import org.eclipse.graphiti.features.IMoveConnectionDecoratorFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IPasteFeature;
+import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.IReconnectionFeature;
import org.eclipse.graphiti.features.IRemoveBendpointFeature;
import org.eclipse.graphiti.features.IRemoveFeature;
@@ -173,6 +196,7 @@ import org.eclipse.graphiti.features.context.IDeleteContext;
import org.eclipse.graphiti.features.context.IDirectEditingContext;
import org.eclipse.graphiti.features.context.ILayoutContext;
import org.eclipse.graphiti.features.context.IMoveBendpointContext;
+import org.eclipse.graphiti.features.context.IMoveConnectionDecoratorContext;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
import org.eclipse.graphiti.features.context.IPasteContext;
import org.eclipse.graphiti.features.context.IPictogramElementContext;
@@ -182,9 +206,9 @@ import org.eclipse.graphiti.features.context.IRemoveContext;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.ILinkService;
import org.eclipse.graphiti.ui.features.DefaultFeatureProvider;
/**
@@ -193,24 +217,24 @@ import org.eclipse.graphiti.ui.features.DefaultFeatureProvider;
* @author imeikas
*
*/
-public class BPMNFeatureProvider extends DefaultFeatureProvider {
+@SuppressWarnings("rawtypes")
+public class BPMN2FeatureProvider extends DefaultFeatureProvider implements IBpmn2FeatureProvider {
- private Hashtable<Class,IFeatureContainer> containers;
- private Hashtable<String,ICustomElementFeatureContainer> customTaskContainers;
+ private LinkedHashMap<Class,IFeatureContainer> containers;
+ private LinkedHashMap<String,ICustomElementFeatureContainer> customTaskContainers;
private ICreateFeature[] createFeatures;
private ICreateConnectionFeature[] createConnectionFeatures;
private HashMap<Class,IFeature> mapBusinessObjectClassToCreateFeature = new HashMap<Class,IFeature>();
private DefaultCopyBPMNElementFeature defaultCopyFeature = new DefaultCopyBPMNElementFeature(this);
private DefaultPasteBPMNElementFeature defaultPasteFeature = new DefaultPasteBPMNElementFeature(this);
- public BPMNFeatureProvider(IDiagramTypeProvider dtp) {
+ public BPMN2FeatureProvider(IDiagramTypeProvider dtp) {
super(dtp);
updateFeatureLists();
}
private void initializeFeatureContainers() {
- containers = new Hashtable<Class,IFeatureContainer>();
- containers.put(LabelFeatureContainer.class,new LabelFeatureContainer());
+ containers = new LinkedHashMap<Class,IFeatureContainer>();
containers.put(Group.class,new GroupFeatureContainer());
containers.put(DataObject.class,new DataObjectFeatureContainer());
containers.put(DataObjectReference.class,new DataObjectReferenceFeatureContainer());
@@ -239,6 +263,11 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
containers.put(ComplexGateway.class,new ComplexGatewayFeatureContainer());
containers.put(AdHocSubProcess.class,new AdHocSubProcessFeatureContainer());
containers.put(CallActivity.class,new CallActivityFeatureContainer());
+ containers.put(GlobalTask.class,new CallGlobalTaskFeatureContainer());
+ containers.put(GlobalBusinessRuleTask.class,new CallGlobalBusinessRuleTaskFeatureContainer());
+ containers.put(GlobalManualTask.class,new CallGlobalManualTaskFeatureContainer());
+ containers.put(GlobalScriptTask.class,new CallGlobalScriptTaskFeatureContainer());
+ containers.put(GlobalUserTask.class,new CallGlobalUserTaskFeatureContainer());
containers.put(Transaction.class,new TransactionFeatureContainer());
containers.put(SubProcess.class,new SubProcessFeatureContainer());
containers.put(ConditionalEventDefinition.class,new ConditionalEventDefinitionContainer());
@@ -255,6 +284,8 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
containers.put(MessageFlow.class,new MessageFlowFeatureContainer());
containers.put(Association.class,new AssociationFeatureContainer());
containers.put(Conversation.class,new ConversationFeatureContainer());
+ containers.put(SubConversation.class,new SubConversationFeatureContainer());
+ containers.put(CallConversation.class,new CallConversationFeatureContainer());
containers.put(ConversationLink.class,new ConversationLinkFeatureContainer());
containers.put(DataAssociation.class,new DataAssociationFeatureContainer());
containers.put(SubChoreography.class,new SubChoreographyFeatureContainer());
@@ -271,7 +302,7 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
public void addFeatureContainer(String id, ICustomElementFeatureContainer fc) throws Exception {
if (customTaskContainers==null) {
- customTaskContainers = new Hashtable<String,ICustomElementFeatureContainer>();
+ customTaskContainers = new LinkedHashMap<String,ICustomElementFeatureContainer>();
}
customTaskContainers.put(id,fc);
updateFeatureLists();
@@ -285,19 +316,19 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
// and replace the ones in our list of FeatureContainers
BPMN2Editor editor = BPMN2Editor.getActiveEditor(); //(BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();;
TargetRuntime rt = editor.getTargetRuntime();
- for (FeatureContainerDescriptor fcd : rt.getFeatureContainers()) {
- IFeatureContainer container = fcd.getFeatureContainer();
- if (container instanceof IConnectionFeatureContainer) {
- ICreateConnectionFeature createConnectionFeature = ((IConnectionFeatureContainer)container)
+ for (FeatureContainerDescriptor fcd : rt.getFeatureContainerDescriptors()) {
+ IFeatureContainer fc = fcd.getFeatureContainer();
+ if (fc instanceof IConnectionFeatureContainer) {
+ ICreateConnectionFeature createConnectionFeature = ((IConnectionFeatureContainer)fc)
.getCreateConnectionFeature(this);
if (createConnectionFeature!=null) {
- containers.put(fcd.getType(), container);
+ containers.put(fcd.getType(), fc);
}
}
- else {
- ICreateFeature createFeature = ((IShapeFeatureContainer)container).getCreateFeature(this);
+ if (fc instanceof IShapeFeatureContainer) {
+ ICreateFeature createFeature = ((IShapeFeatureContainer)fc).getCreateFeature(this);
if (createFeature != null) {
- containers.put(fcd.getType(), container);
+ containers.put(fcd.getType(), fc);
}
}
}
@@ -314,7 +345,7 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
createConnectionFeatureList.add(createConnectionFeature);
}
}
- else {
+ if (fc instanceof IShapeFeatureContainer) {
ICreateFeature createFeature = ((IShapeFeatureContainer) fc).getCreateFeature(this);
if (createFeature != null) {
createFeaturesList.add(createFeature);
@@ -330,7 +361,7 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
createConnectionFeatureList.add(createConnectionFeature);
}
}
- else {
+ if (fc instanceof IShapeFeatureContainer) {
ICreateFeature createFeature = ((IShapeFeatureContainer) fc).getCreateFeature(this);
if (createFeature != null) {
createFeaturesList.add(createFeature);
@@ -350,13 +381,13 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
continue;
}
AbstractBpmn2CreateFeature acf = (AbstractBpmn2CreateFeature)cf;
- mapBusinessObjectClassToCreateFeature.put(acf.getBusinessObjectClass().getInstanceClass(), cf);
+ mapBusinessObjectClassToCreateFeature.put(acf.getFeatureClass().getInstanceClass(), cf);
}
}
for (IFeature cf : createConnectionFeatures) {
if (cf instanceof AbstractCreateFlowFeature) {
AbstractBpmn2CreateConnectionFeature acf = (AbstractBpmn2CreateConnectionFeature)cf;
- mapBusinessObjectClassToCreateFeature.put(acf.getBusinessObjectClass().getInstanceClass(), cf);
+ mapBusinessObjectClassToCreateFeature.put(acf.getFeatureClass().getInstanceClass(), cf);
}
}
}
@@ -381,12 +412,9 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
// The special LabelFeatureContainer is used to add labels to figures that were
// added within the given IContext
- LabelFeatureContainer lfc = (LabelFeatureContainer) containers.get(LabelFeatureContainer.class);
- if (lfc.getApplyObject(context)!=null)
- return lfc;
-// Object property = context.getProperty(ContextConstants.LABEL_CONTEXT);
-// if ( property!=null && (Boolean)property )
-// return containers.get(LabelFeatureContainer.class);
+// LabelFeatureContainer lfc = (LabelFeatureContainer) containers.get(LabelFeatureContainer.class);
+// if (lfc.getApplyObject(context)!=null)
+// return lfc;
EObject object = getApplyObject(context);
if (object!=null) {
@@ -426,7 +454,7 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
if (id!=null) {
BPMN2Editor editor = (BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();
TargetRuntime rt = editor.getTargetRuntime();
- for (CustomTaskDescriptor ct : rt.getCustomTasks()) {
+ for (CustomTaskDescriptor ct : rt.getCustomTaskDescriptors()) {
if (id.equals(ct.getId())) {
ICustomElementFeatureContainer container = (ICustomElementFeatureContainer)ct.getFeatureContainer();
return container.getAddFeature(this);
@@ -498,6 +526,17 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
}
@Override
+ public IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IMoveConnectionDecoratorContext context) {
+ IFeatureContainer container = getFeatureContainer(context);
+ if (container instanceof IConnectionFeatureContainer) {
+ IMoveConnectionDecoratorFeature feature = ((IConnectionFeatureContainer)container).getMoveConnectionDecoratorFeature(this);
+ if (feature != null)
+ return feature;
+ }
+ return super.getMoveConnectionDecoratorFeature(context);
+ }
+
+ @Override
public IResizeShapeFeature getResizeShapeFeature(IResizeShapeContext context) {
IFeatureContainer container = getFeatureContainer(context);
if (container instanceof IShapeFeatureContainer) {
@@ -525,15 +564,11 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
@Override
public IReconnectionFeature getReconnectionFeature(IReconnectionContext context) {
- for (IFeatureContainer container : containers.values()) {
- Object o = container.getApplyObject(context);
- if (o != null && container.canApplyTo(o) && container instanceof IConnectionFeatureContainer) {
- IReconnectionFeature feature = ((IConnectionFeatureContainer)container).getReconnectionFeature(this);
- if (feature == null) {
- break;
- }
+ IFeatureContainer container = getFeatureContainer(context);
+ if (container instanceof IConnectionFeatureContainer) {
+ IReconnectionFeature feature = ((IConnectionFeatureContainer)container).getReconnectionFeature(this);
+ if (feature != null)
return feature;
- }
}
return super.getReconnectionFeature(context);
}
@@ -563,18 +598,41 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
@Override
public ICustomFeature[] getCustomFeatures(ICustomContext context) {
- ILinkService ls = Graphiti.getLinkService();
List<ICustomFeature> list = new ArrayList<ICustomFeature>();
BPMN2Editor editor = (BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();;
TargetRuntime rt = editor.getTargetRuntime();
- for (CustomTaskDescriptor ct : rt.getCustomTasks()) {
- ICustomElementFeatureContainer ctf = ct.getFeatureContainer();
- if (ctf!=null) {
- ICustomFeature[] cfa = ctf.getCustomFeatures(this);
- if (cfa!=null) {
- for (ICustomFeature cf : cfa) {
- if (cf.isAvailable(context)) {
+ String id = CustomElementFeatureContainer.getId(context);
+ if (id!=null) {
+ for (CustomTaskDescriptor ct : rt.getCustomTaskDescriptors()) {
+ ICustomElementFeatureContainer ctf = ct.getFeatureContainer();
+ if (ctf!=null && id.equals(ctf.getId())) {
+ ICustomFeature[] cfa = ctf.getCustomFeatures(this);
+ if (cfa!=null) {
+ for (ICustomFeature cf : cfa) {
+ if (cf.isAvailable(context)) {
+ boolean found = false;
+ for (ICustomFeature cfl : list) {
+ if (cfl.getClass() == cf.getClass()) {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ list.add(cf);
+ }
+ }
+ }
+ }
+ }
+ }
+ else {
+ for (IFeatureContainer fc : containers.values()) {
+ Object o = fc.getApplyObject(context);
+ if (o!=null && fc.canApplyTo(o)) {
+ ICustomFeature[] cfa = fc.getCustomFeatures(this);
+ if (cfa!=null) {
+ for (ICustomFeature cf : cfa) {
boolean found = false;
for (ICustomFeature cfl : list) {
if (cfl.getClass() == cf.getClass()) {
@@ -589,25 +647,6 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
}
}
}
- for (IFeatureContainer fc : containers.values()) {
- Object o = fc.getApplyObject(context);
- if (o!=null && fc.canApplyTo(o)) {
- ICustomFeature[] cfa = fc.getCustomFeatures(this);
- if (cfa!=null) {
- for (ICustomFeature cf : cfa) {
- boolean found = false;
- for (ICustomFeature cfl : list) {
- if (cfl.getClass() == cf.getClass()) {
- found = true;
- break;
- }
- }
- if (!found)
- list.add(cf);
- }
- }
- }
- }
// list.add(new ValidateModelFeature(this));
return list.toArray(new ICustomFeature[list.size()]);
@@ -616,7 +655,7 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
// TODO: move this to the adapter registry
public IFeature getCreateFeatureForPictogramElement(PictogramElement pe) {
if (pe!=null) {
- String id = Graphiti.getPeService().getPropertyValue(pe,ICustomElementFeatureContainer.CUSTOM_ELEMENT_ID);
+ String id = Graphiti.getPeService().getPropertyValue(pe,GraphitiConstants.CUSTOM_ELEMENT_ID);
if (id!=null) {
for (IFeatureContainer container : containers.values()) {
if (container instanceof ICustomElementFeatureContainer) {
@@ -680,4 +719,75 @@ public class BPMNFeatureProvider extends DefaultFeatureProvider {
return defaultPasteFeature;
return null;
}
+
+ @Override
+ public IReason canAdd(IAddContext context) {
+ IReason reason = super.canAdd(context);
+ LifecycleEvent event = new LifecycleEvent(EventType.PICTOGRAMELEMENT_CAN_ADD, this, context, context.getNewObject());
+ event.doit = reason.toBoolean();
+ TargetRuntime.getCurrentRuntime().notify(event);
+ if (event.doit != reason.toBoolean())
+ reason = (event.doit ? Reason.createTrueReason() : Reason.createFalseReason());
+ return reason;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ LifecycleEvent event = new LifecycleEvent(EventType.PICTOGRAMELEMENT_UPDATE_NEEDED, this, context, context.getPictogramElement());
+ event.doit = reason.toBoolean();
+ TargetRuntime.getCurrentRuntime().notify(event);
+ if (event.doit != reason.toBoolean())
+ reason = (event.doit ? Reason.createTrueReason() : Reason.createFalseReason());
+ return reason;
+ }
+
+ @Override
+ public IReason canUpdate(IUpdateContext context) {
+ IReason reason = super.canUpdate(context);
+ LifecycleEvent event = new LifecycleEvent(EventType.PICTOGRAMELEMENT_CAN_UPDATE, this, context, context.getPictogramElement());
+ event.doit = reason.toBoolean();
+ TargetRuntime.getCurrentRuntime().notify(event);
+ if (event.doit != reason.toBoolean())
+ reason = (event.doit ? Reason.createTrueReason() : Reason.createFalseReason());
+ return reason;
+ }
+
+ @Override
+ public IReason canLayout(ILayoutContext context) {
+ IReason reason = super.canLayout(context);
+ LifecycleEvent event = new LifecycleEvent(EventType.PICTOGRAMELEMENT_CAN_LAYOUT, this, context, context.getPictogramElement());
+ event.doit = reason.toBoolean();
+ TargetRuntime.getCurrentRuntime().notify(event);
+ if (event.doit != reason.toBoolean())
+ reason = (event.doit ? Reason.createTrueReason() : Reason.createFalseReason());
+ return reason;
+ }
+
+ @Override
+ public PictogramElement addIfPossible(IAddContext context) {
+ IAddFeature addElementFeature = getAddFeature(context);
+ PictogramElement pe = super.addIfPossible(context);
+ if (pe!=null) {
+ PictogramElement le = null;
+ if (addElementFeature instanceof AbstractBpmn2AddFeature) {
+ context.putProperty(GraphitiConstants.PICTOGRAM_ELEMENT, pe);
+ IAddFeature addLabelFeature = ((AbstractBpmn2AddFeature)addElementFeature).getAddLabelFeature(this);
+ if (addLabelFeature!=null && addLabelFeature.canAdd(context)) {
+ le = addLabelFeature.add(context);
+ }
+ }
+
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ List<PictogramElement> pes = new ArrayList<PictogramElement>();
+ rt.notify(new LifecycleEvent(EventType.PICTOGRAMELEMENT_ADDED, this, context, pe));
+
+ if (le!=null) {
+ ((AbstractBpmn2AddFeature)addElementFeature).updatePictogramElement(context, pe);
+ if (!DIImport.isImporting(context))
+ ((AbstractBpmn2AddFeature)addElementFeature).layoutPictogramElement(context, pe);
+ }
+ }
+ return pe;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/MainBPMNDiagramTypeProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2DiagramTypeProvider.java
index 46d92979..f3e92fa0 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/MainBPMNDiagramTypeProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2DiagramTypeProvider.java
@@ -15,6 +15,7 @@ package org.eclipse.bpmn2.modeler.ui.diagram;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
+import org.eclipse.bpmn2.DataState;
import org.eclipse.bpmn2.ParticipantMultiplicity;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.ui.Activator;
@@ -29,13 +30,13 @@ import org.eclipse.graphiti.notification.DefaultNotificationService;
import org.eclipse.graphiti.notification.INotificationService;
import org.eclipse.graphiti.tb.IToolBehaviorProvider;
-public class MainBPMNDiagramTypeProvider extends AbstractDiagramTypeProvider {
+public class Bpmn2DiagramTypeProvider extends AbstractDiagramTypeProvider {
private IToolBehaviorProvider[] toolBehaviorProviders;
private INotificationService notificationService;
- public MainBPMNDiagramTypeProvider() {
+ public Bpmn2DiagramTypeProvider() {
super();
- setFeatureProvider(new BPMNFeatureProvider(this));
+ setFeatureProvider(new BPMN2FeatureProvider(this));
}
@Override
@@ -45,7 +46,7 @@ public class MainBPMNDiagramTypeProvider extends AbstractDiagramTypeProvider {
TargetRuntime rt = editor.getTargetRuntime();
IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(
Activator.UI_EXTENSION_ID);
- BPMNToolBehaviorProvider provider = null;
+ Bpmn2ToolBehaviorProvider provider = null;
try {
for (IConfigurationElement e : config) {
if (e.getName().equals("toolProvider")) { //$NON-NLS-1$
@@ -57,7 +58,7 @@ public class MainBPMNDiagramTypeProvider extends AbstractDiagramTypeProvider {
Constructor ctor = null;
Class providerClass = Class.forName(className, true, cl);
ctor = providerClass.getConstructor(IDiagramTypeProvider.class);
- provider = (BPMNToolBehaviorProvider)ctor.newInstance(this);
+ provider = (Bpmn2ToolBehaviorProvider)ctor.newInstance(this);
break;
}
}
@@ -68,7 +69,7 @@ public class MainBPMNDiagramTypeProvider extends AbstractDiagramTypeProvider {
}
if (provider==null)
- provider = new BPMNToolBehaviorProvider(this);
+ provider = new Bpmn2ToolBehaviorProvider(this);
toolBehaviorProviders = new IToolBehaviorProvider[] { provider };
}
return toolBehaviorProviders;
@@ -103,6 +104,10 @@ public class MainBPMNDiagramTypeProvider extends AbstractDiagramTypeProvider {
if (cbo==null)
continue;
}
+ else if (cbo instanceof DataState) {
+ // this requires a change in the PE's label
+ cbo = ((DataState)cbo).eContainer();
+ }
final PictogramElement[] allPictogramElementsForBusinessObject = featureProvider.getAllPictogramElementsForBusinessObject(cbo);
for (PictogramElement pe : allPictogramElementsForBusinessObject) {
changedAndRelatedBOs.add(pe);
@@ -110,5 +115,15 @@ public class MainBPMNDiagramTypeProvider extends AbstractDiagramTypeProvider {
}
return changedAndRelatedBOs.toArray(new PictogramElement[0]);
}
+
+ @Override
+ public void updatePictogramElements(PictogramElement[] dirtyPes) {
+ ArrayList<PictogramElement> updated = new ArrayList<PictogramElement>();
+ for (PictogramElement pe : dirtyPes) {
+ if (!updated.contains(pe))
+ updated.add(pe);
+ }
+ super.updatePictogramElements(updated.toArray(new PictogramElement[updated.size()]));
+ }
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/FeatureMap.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2FeatureMap.java
index 39b98729..260aa2a0 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/FeatureMap.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2FeatureMap.java
@@ -10,10 +10,11 @@
*
* @author Innar Made
******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui;
+package org.eclipse.bpmn2.modeler.ui.diagram;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import org.eclipse.bpmn2.AdHocSubProcess;
@@ -22,6 +23,7 @@ import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.BusinessRuleTask;
import org.eclipse.bpmn2.CallActivity;
import org.eclipse.bpmn2.CallChoreography;
+import org.eclipse.bpmn2.CallConversation;
import org.eclipse.bpmn2.CancelEventDefinition;
import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.CompensateEventDefinition;
@@ -40,6 +42,11 @@ import org.eclipse.bpmn2.ErrorEventDefinition;
import org.eclipse.bpmn2.EscalationEventDefinition;
import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.ExclusiveGateway;
+import org.eclipse.bpmn2.GlobalBusinessRuleTask;
+import org.eclipse.bpmn2.GlobalManualTask;
+import org.eclipse.bpmn2.GlobalScriptTask;
+import org.eclipse.bpmn2.GlobalTask;
+import org.eclipse.bpmn2.GlobalUserTask;
import org.eclipse.bpmn2.Group;
import org.eclipse.bpmn2.InclusiveGateway;
import org.eclipse.bpmn2.IntermediateCatchEvent;
@@ -60,6 +67,7 @@ import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.SignalEventDefinition;
import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.SubChoreography;
+import org.eclipse.bpmn2.SubConversation;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.TerminateEventDefinition;
@@ -67,15 +75,25 @@ import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.Transaction;
import org.eclipse.bpmn2.UserTask;
+import org.eclipse.bpmn2.modeler.ui.features.data.DataObjectFeatureContainer.AddDataObjectFeature;
-public class FeatureMap {
- public static final List<Class> CONNECTORS;
+@SuppressWarnings("rawtypes")
+public class Bpmn2FeatureMap {
+ public static final List<Class> CONNECTIONS;
public static final List<Class> EVENT_DEFINITIONS;
public static final List<Class> EVENTS;
public static final List<Class> GATEWAYS;
public static final List<Class> TASKS;
+ public static final List<Class> GLOBAL_TASKS;
+ public static final List<Class> SUBPROCESS;
+ public static final List<Class> CHOREOGRAPHY;
+ public static final List<Class> CONVERSATION;
public static final List<Class> DATA;
- public static final List<Class> OTHER;
+ public static final List<Class> ALL_DATA;
+ public static final List<Class> ARTIFACTS;
+ public static final List<Class> SWIMLANES;
+ public static HashSet<Class> ALL_SHAPES;
+
static {
ArrayList<Class> features = new ArrayList<Class>();
features.add(SequenceFlow.class);
@@ -83,7 +101,7 @@ public class FeatureMap {
features.add(Association.class);
features.add(DataAssociation.class);
features.add(ConversationLink.class);
- CONNECTORS = Collections.unmodifiableList(features);
+ CONNECTIONS = Collections.unmodifiableList(features);
features = new ArrayList<Class>();
features.add(ConditionalEventDefinition.class);
@@ -124,31 +142,81 @@ public class FeatureMap {
features.add(ServiceTask.class);
features.add(SendTask.class);
features.add(ReceiveTask.class);
- features.add(ChoreographyTask.class);
TASKS = Collections.unmodifiableList(features);
features = new ArrayList<Class>();
+ features.add(CallActivity.class);
+ features.add(GlobalTask.class);
+ features.add(GlobalBusinessRuleTask.class);
+ features.add(GlobalManualTask.class);
+ features.add(GlobalScriptTask.class);
+ features.add(GlobalUserTask.class);
+ GLOBAL_TASKS = Collections.unmodifiableList(features);
+
+ features = new ArrayList<Class>();
+ features.add(AdHocSubProcess.class);
+ features.add(SubProcess.class);
+ features.add(Transaction.class);
+ SUBPROCESS = Collections.unmodifiableList(features);
+
+ // this is used by the tool palette
+ // it does NOT include DataObjectReference because
+ // that object needs to be handled by the {@link AddDataObjectFeature}
+ features = new ArrayList<Class>();
features.add(DataObject.class);
// features.add(DataObjectReference.class);
features.add(DataStoreReference.class);
features.add(DataInput.class);
features.add(DataOutput.class);
+ features.add(Message.class);
DATA = Collections.unmodifiableList(features);
+ // and this is used by the Appearance Preference Page
+ // this DOES include DataObjectReference because
+ // we MAY want to be able to change the appearance of
+ // these things independently of DataObjects
+ features = new ArrayList<Class>();
+ features.add(DataObject.class);
+ features.add(DataObjectReference.class);
+ features.add(DataStoreReference.class);
+ features.add(DataInput.class);
+ features.add(DataOutput.class);
+ features.add(Message.class);
+ ALL_DATA = Collections.unmodifiableList(features);
+
+ features = new ArrayList<Class>();
+ features.add(ChoreographyTask.class);
+ features.add(SubChoreography.class);
+ features.add(CallChoreography.class);
+ CHOREOGRAPHY = Collections.unmodifiableList(features);
+
+ features = new ArrayList<Class>();
+ features.add(Conversation.class);
+ features.add(SubConversation.class);
+ features.add(CallConversation.class);
+ CONVERSATION = Collections.unmodifiableList(features);
+
features = new ArrayList<Class>();
features.add(Lane.class);
features.add(Participant.class);
+ SWIMLANES = Collections.unmodifiableList(features);
+
+ features = new ArrayList<Class>();
features.add(TextAnnotation.class);
- features.add(SubProcess.class);
- features.add(Transaction.class);
features.add(Group.class);
- features.add(AdHocSubProcess.class);
- features.add(CallActivity.class);
- features.add(Message.class);
- features.add(Conversation.class);
- features.add(SubChoreography.class);
- features.add(CallChoreography.class);
- OTHER = Collections.unmodifiableList(features);
+ ARTIFACTS = Collections.unmodifiableList(features);
+ ALL_SHAPES = new HashSet<Class>();
+ ALL_SHAPES.addAll(CONNECTIONS);
+ ALL_SHAPES.addAll(EVENTS);
+ ALL_SHAPES.addAll(GATEWAYS);
+ ALL_SHAPES.addAll(TASKS);
+ ALL_SHAPES.addAll(GLOBAL_TASKS);
+ ALL_SHAPES.addAll(SUBPROCESS);
+ ALL_SHAPES.addAll(CHOREOGRAPHY);
+ ALL_SHAPES.addAll(CONVERSATION);
+ ALL_SHAPES.addAll(ALL_DATA);
+ ALL_SHAPES.addAll(ARTIFACTS);
+ ALL_SHAPES.addAll(SWIMLANES);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMNToolBehaviorProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2ToolBehaviorProvider.java
index ed053b67..e2e86826 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/BPMNToolBehaviorProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Bpmn2ToolBehaviorProvider.java
@@ -16,19 +16,25 @@ import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
-import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Group;
import org.eclipse.bpmn2.modeler.core.features.CompoundCreateFeature;
import org.eclipse.bpmn2.modeler.core.features.CompoundCreateFeaturePart;
+import org.eclipse.bpmn2.modeler.core.features.CustomConnectionFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.IBpmn2AddFeature;
import org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature;
import org.eclipse.bpmn2.modeler.core.features.ShowPropertiesFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.ActivitySelectionBehavior;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.features.command.CustomKeyCommandFeature;
-import org.eclipse.bpmn2.modeler.core.features.command.ICustomCommandFeature;
import org.eclipse.bpmn2.modeler.core.features.event.EventSelectionBehavior;
+import org.eclipse.bpmn2.modeler.core.features.gateway.GatewaySelectionBehavior;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor.CategoryDescriptor;
@@ -37,19 +43,14 @@ import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor.ToolPart;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.Tuple;
import org.eclipse.bpmn2.modeler.core.validation.ValidationStatusAdapter;
import org.eclipse.bpmn2.modeler.ui.Activator;
-import org.eclipse.bpmn2.modeler.ui.FeatureMap;
import org.eclipse.bpmn2.modeler.ui.IConstants;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomConnectionFeatureContainer;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographySelectionBehavior;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
@@ -71,7 +72,6 @@ import org.eclipse.graphiti.features.IFeatureCheckerHolder;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.IDoubleClickContext;
-import org.eclipse.graphiti.features.context.IMoveShapeContext;
import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.features.context.impl.AddBendpointContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
@@ -82,7 +82,6 @@ import org.eclipse.graphiti.features.context.impl.MoveBendpointContext;
import org.eclipse.graphiti.features.context.impl.MoveShapeContext;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
-import org.eclipse.graphiti.mm.Property;
import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.Polyline;
@@ -90,10 +89,10 @@ import org.eclipse.graphiti.mm.algorithms.styles.Point;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.palette.IPaletteCompartmentEntry;
import org.eclipse.graphiti.palette.IToolEntry;
import org.eclipse.graphiti.palette.impl.ConnectionCreationToolEntry;
@@ -113,11 +112,11 @@ import org.eclipse.graphiti.util.LocationInfo;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Display;
-public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implements IFeatureCheckerHolder {
+public class Bpmn2ToolBehaviorProvider extends DefaultToolBehaviorProvider implements IFeatureCheckerHolder {
protected BPMN2Editor editor;
protected TargetRuntime targetRuntime;
- protected BPMNFeatureProvider featureProvider;
+ protected BPMN2FeatureProvider featureProvider;
protected ModelEnablements modelEnablements;
protected Hashtable<String, PaletteCompartmentEntry> categories = new Hashtable<String, PaletteCompartmentEntry>();
protected List<IPaletteCompartmentEntry> palette;
@@ -126,16 +125,19 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
protected class ProfileSelectionToolEntry extends ToolEntry {
BPMN2Editor editor;
- ProfileSelectionToolEntry(BPMN2Editor editor, String label) {
- super(label, null, null, null, null);
+ ProfileSelectionToolEntry(BPMN2Editor editor, String profileId) {
+ super("", null, null, null, null);
+ TargetRuntime rt = editor.getTargetRuntime();
+ ModelEnablementDescriptor med = rt.getModelEnablements(profileId);
+ setLabel(med.getProfileName());
+ setId(profileId);
+ setDescription(med.getDescription());
this.editor = editor;
}
public Tool createTool() {
- String profile = getLabel();
- Bpmn2DiagramType diagramType = ModelUtil.getDiagramType(editor);
TargetRuntime rt = editor.getTargetRuntime();
- editor.getPreferences().setDefaultToolProfile(rt, diagramType, profile);
+ editor.getPreferences().setDefaultToolProfile(rt, getId());
Display.getDefault().asyncExec(new Runnable() {
@Override
@@ -154,28 +156,26 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
@Override
public ImageDescriptor getSmallIcon() {
- Bpmn2DiagramType diagramType = ModelUtil.getDiagramType(editor);
TargetRuntime rt = editor.getTargetRuntime();
- String profile = editor.getPreferences().getDefaultToolProfile(rt, diagramType);
- if (getLabel().equals(profile))
+ String profileId = editor.getPreferences().getDefaultToolProfile(rt);
+ if (getId().equals(profileId))
return Activator.getDefault().getImageDescriptor(IConstants.ICON_CHECKBOX_CHECKED_16);
return Activator.getDefault().getImageDescriptor(IConstants.ICON_CHECKBOX_UNCHECKED_16);
}
}
- public BPMNToolBehaviorProvider(IDiagramTypeProvider diagramTypeProvider) {
+ public Bpmn2ToolBehaviorProvider(IDiagramTypeProvider diagramTypeProvider) {
super(diagramTypeProvider);
}
public void createPaletteProfilesGroup(BPMN2Editor editor, PaletteRoot paletteRoot) {
TargetRuntime rt = editor.getTargetRuntime();
- Bpmn2DiagramType diagramType = ModelUtil.getDiagramType(editor);
PaletteDrawer drawer = new PaletteDrawer(Messages.BPMNToolBehaviorProvider_Profiles_Drawer_Label, null);
int size = 0;
- for (String profile : editor.getPreferences().getAllToolProfiles(rt, diagramType)) {
- drawer.add(new ProfileSelectionToolEntry(editor, profile));
+ for (String profileId : editor.getPreferences().getAllToolProfiles(rt)) {
+ drawer.add(new ProfileSelectionToolEntry(editor, profileId));
++size;
}
if (size>1) {
@@ -190,15 +190,14 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
editor = (BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();
targetRuntime = editor.getTargetRuntime();
modelEnablements = editor.getModelEnablements();
- featureProvider = (BPMNFeatureProvider)getFeatureProvider();
+ featureProvider = (BPMN2FeatureProvider)getFeatureProvider();
palette = new ArrayList<IPaletteCompartmentEntry>();
- Bpmn2DiagramType diagramType = ModelUtil.getDiagramType(editor.getBpmnDiagram());
- String profile = editor.getPreferences().getDefaultToolProfile(targetRuntime, diagramType);
+ String profile = editor.getPreferences().getDefaultToolProfile(targetRuntime);
PaletteCompartmentEntry compartmentEntry = null;
categories.clear();
- ToolPaletteDescriptor toolPaletteDescriptor = targetRuntime.getToolPalette(diagramType, profile);
+ ToolPaletteDescriptor toolPaletteDescriptor = targetRuntime.getToolPalette(profile);
if (toolPaletteDescriptor!=null) {
boolean needCustomTaskDrawer = true;
for (CategoryDescriptor category : toolPaletteDescriptor.getCategories()) {
@@ -219,13 +218,13 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
compartmentEntry.setInitiallyOpen(false);
categories.put(category.getName(), compartmentEntry);
}
- createEntry(feature, compartmentEntry);
+ createEntry(tool, feature, compartmentEntry);
}
}
// if there are no tools defined for this category, check if it will be
// used for only Custom Tasks. If so, create the category anyway.
if (compartmentEntry==null) {
- for (CustomTaskDescriptor tc : targetRuntime.getCustomTasks()) {
+ for (CustomTaskDescriptor tc : targetRuntime.getCustomTaskDescriptors()) {
if (category.getName().equals(tc.getCategory())) {
compartmentEntry = new PaletteCompartmentEntry(category.getName(), category.getIcon());
compartmentEntry.setInitiallyOpen(false);
@@ -254,9 +253,9 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
String fromPalette = category.getFromPalette();
String id = category.getId();
if (fromPalette!=null && id!=null) {
- for (TargetRuntime otherRt : TargetRuntime.getAllRuntimes()) {
+ for (TargetRuntime otherRt : TargetRuntime.createTargetRuntimes()) {
if (otherRt!=rt) {
- for (ToolPaletteDescriptor tp : otherRt.getToolPalettes()) {
+ for (ToolPaletteDescriptor tp : otherRt.getToolPaletteDescriptors()) {
if ( fromPalette.equals(tp.getId())) {
for (CategoryDescriptor c : tp.getCategories()) {
if (id.equals(c.getId())) {
@@ -275,9 +274,9 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
String fromPalette = tool.getFromPalette();
String id = tool.getId();
if (fromPalette!=null && id!=null) {
- for (TargetRuntime otherRt : TargetRuntime.getAllRuntimes()) {
+ for (TargetRuntime otherRt : TargetRuntime.createTargetRuntimes()) {
if (otherRt!=rt) {
- for (ToolPaletteDescriptor tp : otherRt.getToolPalettes()) {
+ for (ToolPaletteDescriptor tp : otherRt.getToolPaletteDescriptors()) {
if ( fromPalette.equals(tp.getId())) {
for (CategoryDescriptor c : tp.getCategories()) {
for (ToolDescriptor t : c.getTools()) {
@@ -295,16 +294,39 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
}
private void createDefaultpalette() {
- createConnectors(palette);
- createTasksCompartments(palette);
- createGatewaysCompartments(palette);
- createEventsCompartments(palette);
- createEventDefinitionsCompartments(palette);
- createDataCompartments(palette);
- createOtherCompartments(palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Connectors_Drawer_Label,Bpmn2FeatureMap.CONNECTIONS,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_SwimLanes_Drawer_Label,Bpmn2FeatureMap.SWIMLANES,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Tasks_Drawer_Label,Bpmn2FeatureMap.TASKS,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Gateways_Drawer_Label,Bpmn2FeatureMap.GATEWAYS,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Events_Drawer_Label,Bpmn2FeatureMap.EVENTS,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Event_Definitions_Drawer_Label,Bpmn2FeatureMap.EVENT_DEFINITIONS,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Data_Items_Drawer_Label,Bpmn2FeatureMap.DATA,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_SubProcess_Drawer_Label,Bpmn2FeatureMap.SUBPROCESS,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_GlobalTasks_Drawer_Label,Bpmn2FeatureMap.GLOBAL_TASKS,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Choreography_Drawer_Label,Bpmn2FeatureMap.CHOREOGRAPHY,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Conversation_Drawer_Label,Bpmn2FeatureMap.CONVERSATION,palette);
+ createDrawer(Messages.BPMNToolBehaviorProvider_Artifact_Drawer_Label,Bpmn2FeatureMap.ARTIFACTS,palette);
createCustomTasks(palette);
}
+ @SuppressWarnings("rawtypes")
+ public static List<Tuple<String, List<Class>>> getDefaultPaletteDrawers() {
+ List<Tuple<String, List<Class>>> drawers = new ArrayList<Tuple<String, List<Class>>>();
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Connectors_Drawer_Label,Bpmn2FeatureMap.CONNECTIONS));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_SwimLanes_Drawer_Label,Bpmn2FeatureMap.SWIMLANES));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Tasks_Drawer_Label,Bpmn2FeatureMap.TASKS));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Gateways_Drawer_Label,Bpmn2FeatureMap.GATEWAYS));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Events_Drawer_Label,Bpmn2FeatureMap.EVENTS));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Event_Definitions_Drawer_Label,Bpmn2FeatureMap.EVENT_DEFINITIONS));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Data_Items_Drawer_Label,Bpmn2FeatureMap.DATA));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_SubProcess_Drawer_Label,Bpmn2FeatureMap.SUBPROCESS));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_GlobalTasks_Drawer_Label,Bpmn2FeatureMap.GLOBAL_TASKS));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Choreography_Drawer_Label,Bpmn2FeatureMap.CHOREOGRAPHY));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Conversation_Drawer_Label,Bpmn2FeatureMap.CONVERSATION));
+ drawers.add(new Tuple<String,List<Class>>(Messages.BPMNToolBehaviorProvider_Artifact_Drawer_Label,Bpmn2FeatureMap.ARTIFACTS));
+ return drawers;
+ }
+
public List<IToolEntry> getTools() {
List<IToolEntry> tools = new ArrayList<IToolEntry>();
if (palette==null)
@@ -352,6 +374,12 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
if (eClass!=null) {
parentFeature = featureProvider.getCreateFeatureForBusinessObject(eClass.getInstanceClass());
}
+ else {
+ Activator.logError(new IllegalArgumentException(
+ "The object type '"+name+"' referenced by the tool '"+root.getName()+"'is undefined"
+ ));
+ }
+
if (root!=null) {
if (node!=null) {
CompoundCreateFeaturePart n = node.addChild(parentFeature);
@@ -381,71 +409,15 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
}
getCreateFeature(tool, root, node, childToolPart);
}
-
- return parentFeature;
- }
-
- private void createEventsCompartments(List<IPaletteCompartmentEntry> palette) {
- PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(Messages.BPMNToolBehaviorProvider_Events_Drawer_Label, null);
-
- createEntries(FeatureMap.EVENTS, compartmentEntry);
-
- if (compartmentEntry.getToolEntries().size()>0)
- palette.add(compartmentEntry);
- }
-
- private void createOtherCompartments(List<IPaletteCompartmentEntry> palette) {
- PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(Messages.BPMNToolBehaviorProvider_Other_Drawer_Label, null);
- compartmentEntry.setInitiallyOpen(false);
-
- createEntries(FeatureMap.OTHER, compartmentEntry);
- if (compartmentEntry.getToolEntries().size()>0)
- palette.add(compartmentEntry);
- }
-
- private void createDataCompartments(List<IPaletteCompartmentEntry> palette) {
- PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(Messages.BPMNToolBehaviorProvider_Data_Items_Drawer_Label, null);
- compartmentEntry.setInitiallyOpen(false);
-
- createEntries(FeatureMap.DATA, compartmentEntry);
-
- if (compartmentEntry.getToolEntries().size()>0)
- palette.add(compartmentEntry);
+ return parentFeature;
}
- private void createEventDefinitionsCompartments(List<IPaletteCompartmentEntry> palette) {
- PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(Messages.BPMNToolBehaviorProvider_Event_Definitions_Drawer_Label, null);
+ private void createDrawer(String name, List<Class> items, List<IPaletteCompartmentEntry> palette) {
+ PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(name, null);
compartmentEntry.setInitiallyOpen(false);
- createEntries(FeatureMap.EVENT_DEFINITIONS, compartmentEntry);
-
- if (compartmentEntry.getToolEntries().size()>0)
- palette.add(compartmentEntry);
- }
-
- private void createGatewaysCompartments(List<IPaletteCompartmentEntry> palette) {
- PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(Messages.BPMNToolBehaviorProvider_Gateways_Drawer_Label, null);
-
- createEntries(FeatureMap.GATEWAYS, compartmentEntry);
-
- if (compartmentEntry.getToolEntries().size()>0)
- palette.add(compartmentEntry);
- }
-
- private void createTasksCompartments(List<IPaletteCompartmentEntry> palette) {
- PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(Messages.BPMNToolBehaviorProvider_Tasks_Drawer_Label, null);
-
- createEntries(FeatureMap.TASKS, compartmentEntry);
-
- if (compartmentEntry.getToolEntries().size()>0)
- palette.add(compartmentEntry);
- }
-
- private void createConnectors(List<IPaletteCompartmentEntry> palette) {
- PaletteCompartmentEntry compartmentEntry = new PaletteCompartmentEntry(Messages.BPMNToolBehaviorProvider_Connectors_Drawer_Label, null);
-
- createEntries(FeatureMap.CONNECTORS, compartmentEntry);
+ createEntries(items, compartmentEntry);
if (compartmentEntry.getToolEntries().size()>0)
palette.add(compartmentEntry);
@@ -469,13 +441,13 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
if (feature instanceof ICreateFeature) {
ICreateFeature cf = (ICreateFeature)feature;
ObjectCreationToolEntry objectCreationToolEntry = new ObjectCreationToolEntry(cf.getCreateName(),
- cf.getCreateDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId(), cf);
+ cf.getDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId(), cf);
compartmentEntry.addToolEntry(objectCreationToolEntry);
}
else if (feature instanceof ICreateConnectionFeature) {
ICreateConnectionFeature cf = (ICreateConnectionFeature)feature;
ConnectionCreationToolEntry connectionCreationToolEntry = new ConnectionCreationToolEntry(
- cf.getCreateName(), cf.getCreateDescription(), cf.getCreateImageId(),
+ cf.getCreateName(), cf.getDescription(), cf.getCreateImageId(),
cf.getCreateLargeImageId());
connectionCreationToolEntry.addCreateConnectionFeature(cf);
compartmentEntry.addToolEntry(connectionCreationToolEntry);
@@ -483,7 +455,7 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
}
}
- private void createEntry(IFeature feature, PaletteCompartmentEntry compartmentEntry) {
+ private void createEntry(ToolDescriptor tool, IFeature feature, PaletteCompartmentEntry compartmentEntry) {
if (modelEnablements.isEnabled(feature) || feature instanceof CompoundCreateFeature) {
IFeature targetFeature = feature;
if (feature instanceof CompoundCreateFeature) {
@@ -492,15 +464,26 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
}
if (targetFeature instanceof ICreateFeature) {
ICreateFeature cf = (ICreateFeature)feature;
- ObjectCreationToolEntry objectCreationToolEntry = new ObjectCreationToolEntry(cf.getCreateName(),
- cf.getCreateDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId(), cf);
+ String name = tool.getName();
+ if (name==null)
+ name = cf.getName();
+ String description = tool.getDescription();
+ if (description==null)
+ description = cf.getCreateDescription();
+ ObjectCreationToolEntry objectCreationToolEntry = new ObjectCreationToolEntry(
+ name, description, cf.getCreateImageId(), cf.getCreateLargeImageId(), cf);
compartmentEntry.addToolEntry(objectCreationToolEntry);
}
else if (targetFeature instanceof ICreateConnectionFeature) {
ICreateConnectionFeature cf = (ICreateConnectionFeature)feature;
+ String name = tool.getName();
+ if (name==null)
+ name = cf.getName();
+ String description = tool.getDescription();
+ if (description==null)
+ description = cf.getCreateDescription();
ConnectionCreationToolEntry connectionCreationToolEntry = new ConnectionCreationToolEntry(
- cf.getCreateName(), cf.getCreateDescription(), cf.getCreateImageId(),
- cf.getCreateLargeImageId());
+ name, description, cf.getCreateImageId(), cf.getCreateLargeImageId());
connectionCreationToolEntry.addCreateConnectionFeature(cf);
compartmentEntry.addToolEntry(connectionCreationToolEntry);
}
@@ -518,31 +501,31 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
categories.put(e.getLabel(), (PaletteCompartmentEntry) e);
}
- for (CustomTaskDescriptor tc : rt.getCustomTasks()) {
- CustomElementFeatureContainer container = (CustomElementFeatureContainer)tc.getFeatureContainer();
+ for (CustomTaskDescriptor ctd : rt.getCustomTaskDescriptors()) {
+ CustomElementFeatureContainer container = (CustomElementFeatureContainer)ctd.getFeatureContainer();
if (!container.isAvailable(featureProvider))
continue;
IToolEntry toolEntry = null;
- String id = tc.getId();
+ String id = ctd.getId();
container.setId(id);
featureProvider.addFeatureContainer(id, container);
if (container instanceof CustomShapeFeatureContainer) {
ICreateFeature cf = ((CustomShapeFeatureContainer)container).getCreateFeature(featureProvider);
- ObjectCreationToolEntry objectCreationToolEntry = new ObjectCreationToolEntry(tc.getName(),
- cf.getCreateDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId(), cf);
+ ObjectCreationToolEntry objectCreationToolEntry = new ObjectCreationToolEntry(ctd.getName(),
+ ctd.getDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId(), cf);
toolEntry = objectCreationToolEntry;
}
else if (container instanceof CustomConnectionFeatureContainer) {
ICreateConnectionFeature cf = ((CustomConnectionFeatureContainer)container).getCreateConnectionFeature(featureProvider);
ConnectionCreationToolEntry connectionCreationToolEntry = new ConnectionCreationToolEntry(
- cf.getCreateName(), cf.getCreateDescription(), cf.getCreateImageId(),
+ cf.getCreateName(), ctd.getDescription(), cf.getCreateImageId(),
cf.getCreateLargeImageId());
connectionCreationToolEntry.addCreateConnectionFeature(cf);
toolEntry = connectionCreationToolEntry;
}
- String category = tc.getCategory();
+ String category = ctd.getCategory();
if (category==null || category.isEmpty())
category = Messages.BPMNToolBehaviorProvider_Custom_Tasks_Drawer_Label;
@@ -576,6 +559,10 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
};
}
+ private boolean isLabelShape(PictogramElement pe) {
+ return FeatureSupport.isLabelShape(pe) && FeatureSupport.getLabelOwner(pe)!=null;
+ }
+
@Override
public GraphicsAlgorithm[] getClickArea(PictogramElement pe) {
if (ActivitySelectionBehavior.canApplyTo(pe)) {
@@ -584,11 +571,12 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
return EventSelectionBehavior.getClickArea(pe);
} else if (ChoreographySelectionBehavior.canApplyTo(pe)) {
return ChoreographySelectionBehavior.getClickArea(pe);
+ } else if (GatewaySelectionBehavior.canApplyTo(pe)) {
+ return GatewaySelectionBehavior.getClickArea(pe);
+ } else if (isLabelShape(pe)) {
+ return getClickArea(FeatureSupport.getLabelOwner(pe));
}
else {
- if (pe instanceof ContainerShape) {
- BaseElement be = BusinessObjectUtil.getFirstBaseElement((ContainerShape)pe);
- }
}
return super.getClickArea(pe);
}
@@ -609,6 +597,10 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
return EventSelectionBehavior.getSelectionBorder(pe);
} else if (ChoreographySelectionBehavior.canApplyTo(pe)) {
return ChoreographySelectionBehavior.getSelectionBorder(pe);
+ } else if (GatewaySelectionBehavior.canApplyTo(pe)) {
+ return GatewaySelectionBehavior.getSelectionBorder(pe);
+ } else if (isLabelShape(pe)) {
+ return getSelectionBorder(FeatureSupport.getLabelOwner(pe));
}
else if (pe instanceof ContainerShape) {
if (((ContainerShape)pe).getChildren().size()>0) {
@@ -621,12 +613,20 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
return ga;
}
}
- else if (pe instanceof Shape) {
- return ((Shape)pe).getGraphicsAlgorithm();
- }
return super.getSelectionBorder(pe);
}
+ @Override
+ public PictogramElement getSelection(PictogramElement originalPe, PictogramElement[] oldSelection) {
+ if (isLabelShape(originalPe)) {
+ if (FeatureSupport.getLabelPosition(originalPe)!=LabelPosition.MOVABLE) {
+ return FeatureSupport.getLabelOwner(originalPe);
+ }
+ }
+
+ return null;
+ }
+
public static Point getMouseLocation(IFeatureProvider fp) {
DiagramBehavior db = (DiagramBehavior) fp.getDiagramTypeProvider().getDiagramBehavior();
org.eclipse.draw2d.geometry.Point p = db.getMouseLocation();
@@ -639,13 +639,10 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
public IContextButtonPadData getContextButtonPad(final IPictogramElementContext context) {
IContextButtonPadData data = super.getContextButtonPad(context);
PictogramElement pe = context.getPictogramElement();
- final IFeatureProvider fp = getFeatureProvider();
-
- if (pe instanceof Shape && FeatureSupport.isLabelShape((Shape)pe)) {
- // labels don't have a buttonpad
- setGenericContextButtons(data, pe, 0);
- return data;
+ if (isLabelShape(pe)) {
+ pe = FeatureSupport.getLabelOwner(pe);
}
+ final IFeatureProvider fp = getFeatureProvider();
if( pe.getGraphicsAlgorithm()!= null && pe.getGraphicsAlgorithm().getWidth() < 40 ){
ILocation origin = getAbsoluteLocation(pe.getGraphicsAlgorithm());
@@ -658,6 +655,7 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
if (ChoreographyUtil.isChoreographyParticipantBand(pe)) {
genericButtons |= CONTEXT_BUTTON_REMOVE;
}
+
setGenericContextButtons(data, pe, genericButtons);
// 2. set the expand & collapse buttons
@@ -726,10 +724,17 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
return data;
}
+
+ protected ILocation getAbsoluteLocation(GraphicsAlgorithm ga) {
+ if (ga.eContainer() instanceof ConnectionDecorator) {
+ return Graphiti.getPeService().getLocationRelativeToDiagram((ConnectionDecorator)ga.eContainer());
+ }
+ return super.getAbsoluteLocation(ga);
+ }
@Override
+ @SuppressWarnings("rawtypes")
public void postExecute(IExecutionInfo executionInfo) {
- BPMN2Editor editor = (BPMN2Editor)getDiagramTypeProvider().getDiagramEditor();
for (IFeatureAndContext fc : executionInfo.getExecutionList()) {
IContext context = fc.getContext();
IFeature feature = fc.getFeature();
@@ -743,28 +748,6 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
((IBpmn2CreateFeature)feature).postExecute(executionInfo);
}
}
- else if (context instanceof UpdateContext) {
- PictogramElement pe = ((UpdateContext)context).getPictogramElement();
- if (!(pe instanceof Connection)) {
- editor.setPictogramElementForSelection(pe);
- }
- editor.refresh();
- }
- else if (context instanceof MoveShapeContext) {
- PictogramElement pe = ((MoveShapeContext)context).getPictogramElement();
- editor.setPictogramElementForSelection(pe);
- editor.refresh();
- }
- else if (context instanceof AddBendpointContext) {
- PictogramElement pe = ((AddBendpointContext)context).getConnection();
- editor.setPictogramElementForSelection(pe);
- editor.refresh();
- }
- else if (context instanceof MoveBendpointContext) {
- PictogramElement pe = ((MoveBendpointContext)context).getConnection();
- editor.setPictogramElementForSelection(pe);
- editor.refresh();
- }
}
}
@@ -806,17 +789,15 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
public IDecorator[] getDecorators(PictogramElement pe) {
List<IDecorator> decorators = new ArrayList<IDecorator>();
- // labels should not be decorated
- String labelProperty = Graphiti.getPeService().getPropertyValue(pe, GraphicsUtil.LABEL_PROPERTY);
- if (!Boolean.parseBoolean(labelProperty)) {
+ if (ShapeDecoratorUtil.isValidationDecorator(pe)) {
IFeatureProvider featureProvider = getFeatureProvider();
- Object bo = featureProvider.getBusinessObjectForPictogramElement(pe);
+ Object bo = featureProvider.getBusinessObjectForPictogramElement((PictogramElement) pe.eContainer());
if (bo!=null) {
ValidationStatusAdapter statusAdapter = (ValidationStatusAdapter) EcoreUtil.getRegisteredAdapter((EObject) bo,
ValidationStatusAdapter.class);
if (statusAdapter != null) {
- final IImageDecorator decorator;
- final IStatus status = statusAdapter.getValidationStatus();
+ IImageDecorator decorator;
+ IStatus status = statusAdapter.getValidationStatus();
switch (status.getSeverity()) {
case IStatus.INFO:
decorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_INFORMATION_TSK);
@@ -832,12 +813,6 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
break;
}
if (decorator != null) {
- GraphicsAlgorithm ga = getSelectionBorder(pe);
- if (ga == null) {
- ga = pe.getGraphicsAlgorithm();
- }
- decorator.setX(-5);
- decorator.setY(-5);
decorator.setMessage(status.getMessage());
decorators.add(decorator);
}
@@ -854,7 +829,7 @@ public class BPMNToolBehaviorProvider extends DefaultToolBehaviorProvider implem
commandFeature = new CustomKeyCommandFeature(getFeatureProvider());
if (commandFeature.isAvailable(hint)) {
- context.putProperty(ICustomCommandFeature.COMMAND_HINT, hint);
+ context.putProperty(GraphitiConstants.COMMAND_HINT, hint);
return commandFeature;
}
return super.getCommandFeature(context, hint);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Messages.java
index a391f9ad..e3b0bbd1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.diagram;
import org.eclipse.osgi.util.NLS;
@@ -13,7 +23,12 @@ public class Messages extends NLS {
public static String BPMNToolBehaviorProvider_Event_Definitions_Drawer_Label;
public static String BPMNToolBehaviorProvider_Events_Drawer_Label;
public static String BPMNToolBehaviorProvider_Gateways_Drawer_Label;
- public static String BPMNToolBehaviorProvider_Other_Drawer_Label;
+ public static String BPMNToolBehaviorProvider_Artifact_Drawer_Label;
+ public static String BPMNToolBehaviorProvider_SubProcess_Drawer_Label;
+ public static String BPMNToolBehaviorProvider_GlobalTasks_Drawer_Label;
+ public static String BPMNToolBehaviorProvider_Choreography_Drawer_Label;
+ public static String BPMNToolBehaviorProvider_Conversation_Drawer_Label;
+ public static String BPMNToolBehaviorProvider_SwimLanes_Drawer_Label;
public static String BPMNToolBehaviorProvider_Profiles_Drawer_Label;
public static String BPMNToolBehaviorProvider_Tasks_Drawer_Label;
public static String BPMNToolBehaviorProvider_Unnamed_Profile;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties
new file mode 100644
index 00000000..4eab54cb
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/diagram/messages.properties
@@ -0,0 +1,28 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+BPMNToolBehaviorProvider_Click_Drag_Prompt=Click and drag to create a\n
+BPMNToolBehaviorProvider_Click_Drag_Prompt_Last_Separator=\ or
+BPMNToolBehaviorProvider_Click_Drag_Prompt_Separator=,
+BPMNToolBehaviorProvider_Connectors_Drawer_Label=Connectors
+BPMNToolBehaviorProvider_Custom_Tasks_Drawer_Label=Custom Tasks
+BPMNToolBehaviorProvider_Data_Items_Drawer_Label=Data Items
+BPMNToolBehaviorProvider_Event_Definitions_Drawer_Label=Event Definitions
+BPMNToolBehaviorProvider_Events_Drawer_Label=Events
+BPMNToolBehaviorProvider_Gateways_Drawer_Label=Gateways
+BPMNToolBehaviorProvider_Artifact_Drawer_Label=Artifacts
+BPMNToolBehaviorProvider_SubProcess_Drawer_Label=Sub Processes
+BPMNToolBehaviorProvider_GlobalTasks_Drawer_Label=Global Tasks
+BPMNToolBehaviorProvider_Choreography_Drawer_Label=Choreography
+BPMNToolBehaviorProvider_Conversation_Drawer_Label=Conversation
+BPMNToolBehaviorProvider_SwimLanes_Drawer_Label=Swim Lanes
+BPMNToolBehaviorProvider_Profiles_Drawer_Label=Profiles
+BPMNToolBehaviorProvider_Tasks_Drawer_Label=Tasks
+BPMNToolBehaviorProvider_Unnamed_Profile=Unnamed
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditingDomainListener.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditingDomainListener.java
index 6c2b9e6d..3b23466c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditingDomainListener.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditingDomainListener.java
@@ -12,6 +12,9 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.editor;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -36,6 +39,8 @@ public class BPMN2EditingDomainListener extends TransactionalEditingDomainListen
@Override
public void transactionStarting(TransactionalEditingDomainEvent event) {
diagnostics = null;
+ super.transactionStarting(event);
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.TRANSACTION_STARTING, event.getTransaction()));
}
/**
@@ -44,9 +49,16 @@ public class BPMN2EditingDomainListener extends TransactionalEditingDomainListen
@Override
public void transactionClosed(TransactionalEditingDomainEvent event) {
super.transactionClosed(event);
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.TRANSACTION_CLOSED, event.getTransaction()));
}
@Override
+ public void transactionInterrupted(TransactionalEditingDomainEvent event) {
+ super.transactionInterrupted(event);
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.TRANSACTION_INTERRUPTED, event.getTransaction()));
+ }
+
+ @Override
public void handleException(Exception e) {
String source = null;
int code = 0;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
index f8737c84..e92c6579 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
@@ -28,6 +28,7 @@ import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.Category;
import org.eclipse.bpmn2.CompensateEventDefinition;
import org.eclipse.bpmn2.ConditionalEventDefinition;
+import org.eclipse.bpmn2.CorrelationPropertyRetrievalExpression;
import org.eclipse.bpmn2.DataInput;
import org.eclipse.bpmn2.DataObject;
import org.eclipse.bpmn2.DataObjectReference;
@@ -79,19 +80,23 @@ import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.modeler.core.Bpmn2TabbedPropertySheetPage;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
-import org.eclipse.bpmn2.modeler.core.ProxyURIConverterImplExtension;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
+import org.eclipse.bpmn2.modeler.core.builder.BPMN2Builder;
import org.eclipse.bpmn2.modeler.core.di.DIImport;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.Bpmn2TabbedPropertySheetPage;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDialogComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.PropertiesCompositeFactory;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandlerLocator;
+import org.eclipse.bpmn2.modeler.core.model.ProxyURIConverterImplExtension;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
@@ -107,7 +112,7 @@ import org.eclipse.bpmn2.modeler.core.validation.BPMN2ValidationStatusLoader;
import org.eclipse.bpmn2.modeler.help.IHelpContexts;
import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInput;
-import org.eclipse.bpmn2.modeler.ui.diagram.BPMNToolBehaviorProvider;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2ToolBehaviorProvider;
import org.eclipse.bpmn2.modeler.ui.property.PropertyTabDescriptorProvider;
import org.eclipse.bpmn2.modeler.ui.property.artifact.CategoryDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.artifact.TextAnnotationDetailComposite;
@@ -127,6 +132,7 @@ import org.eclipse.bpmn2.modeler.ui.property.data.OperationDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.data.ResourceAssignmentExpressionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.data.ResourceParameterBindingDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.data.ResourceRoleDetailComposite;
+import org.eclipse.bpmn2.modeler.ui.property.diagrams.CorrelationPropertyREListComposite;
import org.eclipse.bpmn2.modeler.ui.property.diagrams.DefinitionsPropertyComposite.ImportDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.diagrams.ItemDefinitionDetailComposite;
import org.eclipse.bpmn2.modeler.ui.property.diagrams.ItemDefinitionListComposite;
@@ -187,7 +193,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.NotificationFilter;
import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain.Lifecycle;
import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
import org.eclipse.gef.EditPart;
@@ -205,6 +210,7 @@ import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
import org.eclipse.graphiti.ui.editor.DiagramBehavior;
import org.eclipse.graphiti.ui.editor.DiagramEditor;
@@ -218,6 +224,7 @@ import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchListener;
@@ -234,14 +241,11 @@ import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.ITabDescriptorProvider;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-/**
- *
- */
@SuppressWarnings("restriction")
public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListener, IGotoMarker {
static {
- TargetRuntime.getAllRuntimes();
+ TargetRuntime.createTargetRuntimes();
PropertiesCompositeFactory.register(EObject.class, DefaultDetailComposite.class);
PropertiesCompositeFactory.register(EObject.class, DefaultListComposite.class);
PropertiesCompositeFactory.register(EObject.class, DefaultDialogComposite.class);
@@ -276,6 +280,7 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
PropertiesCompositeFactory.register(Operation.class, OperationDetailComposite.class);
PropertiesCompositeFactory.register(ItemDefinition.class, ItemDefinitionDetailComposite.class);
PropertiesCompositeFactory.register(ItemDefinition.class, ItemDefinitionListComposite.class);
+ PropertiesCompositeFactory.register(CorrelationPropertyRetrievalExpression.class, CorrelationPropertyREListComposite.class);
PropertiesCompositeFactory.register(Property.class, PropertyListComposite.class);
PropertiesCompositeFactory.register(ResourceRole.class, ResourceRoleListComposite.class);
PropertiesCompositeFactory.register(Event.class, CommonEventDetailComposite.class);
@@ -363,7 +368,7 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
return activeEditor;
}
- public IEditorInput getCurrentInput() {
+ public IEditorInput getEditorInput() {
return currentInput;
}
@@ -385,7 +390,9 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
-
+ if (input instanceof IFileEditorInput) {
+ BPMN2Builder.INSTANCE.loadExtensions( ((IFileEditorInput)input).getFile().getProject() );
+ }
setActiveEditor(this);
currentInput = input;
@@ -459,13 +466,15 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
// Determine which Target Runtime to use for this input and initialize the ResourceSet
TargetRuntime targetRuntime = getTargetRuntime(input);
+ getTargetRuntime().notify(new LifecycleEvent(EventType.EDITOR_STARTUP,this));
+
ResourceSet resourceSet = getEditingDomain().getResourceSet();
resourceSet.setURIConverter(new ProxyURIConverterImplExtension(modelUri));
resourceSet.eAdapters().add(editorAdapter = new DiagramEditorAdapter(this));
// Tell the TargetRuntime about the ResourceSet. This allows the TargetRuntime to provide its
// own ResourceFactory if needed.
- targetRuntime.setResourceSet(resourceSet);
+ targetRuntime.registerExtensionResourceFactory(resourceSet);
// Now create the BPMN2 model resource, or reuse the one from the already open editor.
if (otherEditor==null) {
@@ -491,7 +500,7 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
// custom tasks should be added to the current target runtime's custom tasks list
// where they will be picked up by the toolpalette refresh.
setActiveEditor(this); // set the Bpmn2Preferences.activeProject just before RT extension is initialized
- getTargetRuntime().getRuntimeExtension().initialize(this);
+ getTargetRuntime().notify(new LifecycleEvent(EventType.EDITOR_INITIALIZED,this));
if (otherEditor==null) {
// Import the BPMNDI model that creates the Graphiti shapes, connections, etc.
@@ -513,9 +522,6 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
commandStack.saveIsDone();
commandStack.flush();
}
-
- // tell our TargetRuntime about this resource
- getTargetRuntime().setResource(bpmnResource);
// Load error markers
loadMarkers();
@@ -598,11 +604,6 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
public String getContributorId() {
return CONTRIBUTOR_ID;
}
-
- public TargetRuntime getTargetRuntime(ITabDescriptorProvider tdp) {
- tabDescriptorProvider = tdp;
- return getTargetRuntime();
- }
public TargetRuntime getTargetRuntime() {
if (targetRuntime==null) {
@@ -612,22 +613,20 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
}
public ModelEnablements getModelEnablements() {
- Bpmn2DiagramType diagramType = ModelUtil.getDiagramType(bpmnDiagram);
- String profile = getPreferences().getDefaultToolProfile(getTargetRuntime(), diagramType);
+ String profileId = getPreferences().getDefaultToolProfile(getTargetRuntime());
if (modelEnablements!=null) {
- if ( !modelEnablements.getProfile().equals(profile) ||
- !modelEnablements.getDiagramType().equals(diagramType)) {
+ if (!modelEnablements.getId().equals(profileId)) {
modelEnablements = null;
}
}
if (modelEnablements==null) {
- modelEnablements = getPreferences().getModelEnablements(getTargetRuntime(), diagramType, profile);
+ modelEnablements = getPreferences().getModelEnablements(getTargetRuntime(), profileId);
if (modelEnablements.size()==0) {
- // This Target Runtime doesn't define a profile for the current diagram type,
+ // This Target Runtime doesn't define a Tool Profile
// so we'll use the one for Default Runtime
- profile = getPreferences().getDefaultToolProfile(TargetRuntime.getDefaultRuntime(), diagramType);
- ModelEnablements defaultEnablements = getPreferences().getModelEnablements(TargetRuntime.getDefaultRuntime(), diagramType, profile);
+ profileId = getPreferences().getDefaultToolProfile(TargetRuntime.getDefaultRuntime());
+ ModelEnablements defaultEnablements = getPreferences().getModelEnablements(TargetRuntime.getDefaultRuntime(), profileId);
modelEnablements.copy(defaultEnablements);
}
}
@@ -644,7 +643,7 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
// generic property sheets and other default behavior.
targetRuntime = getPreferences().getRuntime();
if (targetRuntime == TargetRuntime.getDefaultRuntime()) {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
if (rt.getRuntimeExtension().isContentForRuntime(input)) {
targetRuntime = rt;
break;
@@ -665,8 +664,8 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
// force a reload of this
modelEnablements = null;
pr.updatePaletteEntries();
- BPMNToolBehaviorProvider toolBehaviorProvider =
- (BPMNToolBehaviorProvider)getDiagramTypeProvider().
+ Bpmn2ToolBehaviorProvider toolBehaviorProvider =
+ (Bpmn2ToolBehaviorProvider)getDiagramTypeProvider().
getCurrentToolBehaviorProvider();
toolBehaviorProvider.createPaletteProfilesGroup(this, pr);
}
@@ -834,15 +833,19 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
@Override
public Object getAdapter(Class required) {
+ if (required==DiagramEditor.class) {
+ return this;
+ }
if (required==ITabDescriptorProvider.class) {
if (tabDescriptorProvider==null) {
- IWorkbenchPage page = getEditorSite().getPage();
- String viewID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
- try {
- page.showView(viewID, null, IWorkbenchPage.VIEW_CREATE);
- page.showView(viewID, null, IWorkbenchPage.VIEW_ACTIVATE);
- }
- catch (Exception e) {}
+ tabDescriptorProvider = new PropertyTabDescriptorProvider();
+// IWorkbenchPage page = getEditorSite().getPage();
+// String viewID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+// try {
+// page.showView(viewID, null, IWorkbenchPage.VIEW_CREATE);
+// page.showView(viewID, null, IWorkbenchPage.VIEW_ACTIVATE);
+// }
+// catch (Exception e) {}
}
return tabDescriptorProvider;
}
@@ -876,9 +879,8 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
return getModelEnablements();
}
if (required == ToolPaletteDescriptor.class) {
- Bpmn2DiagramType diagramType = ModelUtil.getDiagramType(bpmnDiagram);
- String profile = getPreferences().getDefaultToolProfile(getTargetRuntime(), diagramType);
- return getTargetRuntime().getToolPalette(diagramType, profile);
+ String profileId = getPreferences().getDefaultToolProfile(getTargetRuntime());
+ return getTargetRuntime().getToolPalette(profileId);
}
if (required == NotificationFilter.class) {
if (saveInProgress)
@@ -886,12 +888,17 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
else
return null;
}
+ if (required==GraphicalViewer.class) {
+ return getGraphicalViewer();
+ }
return super.getAdapter(required);
}
@Override
public void dispose() {
+ getTargetRuntime().notify(new LifecycleEvent(EventType.EDITOR_SHUTDOWN,this));
+
// clear ID mapping tables if no more instances of editor are active
int instances = 0;
IWorkbenchPage[] pages = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPages();
@@ -917,10 +924,16 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
}
}
}
- if (modelHandler!=null)
+ if (modelHandler!=null) {
ModelUtil.clearIDs(modelHandler.getResource(), instances==0);
+ modelHandler.dispose();
+ }
getPreferences().removePreferenceChangeListener(this);
+ // cancel the Property Sheet Page job
+ if (propertySheetPage!=null)
+ propertySheetPage.selectionChanged(this, null);
+
// get rid of cached Property Tab Descriptors
if (tabDescriptorProvider instanceof PropertyTabDescriptorProvider)
((PropertyTabDescriptorProvider)tabDescriptorProvider).disposeTabDescriptors(bpmnResource);
@@ -1304,8 +1317,9 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
if (event.getKey().contains("/"+Bpmn2Preferences.PREF_MODEL_ENABLEMENT+"/")) //$NON-NLS-1$ //$NON-NLS-2$
modelEnablements = null;
-
- if (event.getKey().contains(Bpmn2Preferences.PREF_SHOW_ADVANCED_PROPERTIES)) {
+
+ if (event.getKey().contains(Bpmn2Preferences.PREF_SHOW_ADVANCED_PROPERTIES) ||
+ event.getKey().contains("/"+Bpmn2Preferences.PREF_TOOL_PROFILE+"/")) { //$NON-NLS-1$ //$NON-NLS-2$
// get rid of cached Property Tab Descriptors
if (tabDescriptorProvider instanceof PropertyTabDescriptorProvider)
((PropertyTabDescriptorProvider)tabDescriptorProvider).disposeTabDescriptors(bpmnResource);
@@ -1348,6 +1362,37 @@ public class BPMN2Editor extends DiagramEditor implements IPreferenceChangeListe
}
});
}
+
+ if (event.getKey().contains(ShapeStyle.Category.GRID.name())) { //$NON-NLS-1$
+ getEditingDomain().getCommandStack().execute(new RecordingCommand(getEditingDomain()) {
+ @Override
+ protected void doExecute() {
+ ShapeStyle ss = getPreferences().getShapeStyle(ShapeStyle.Category.GRID);
+ Diagram diagram = getDiagramTypeProvider().getDiagram();
+ diagram.setGridUnit(ss.getDefaultWidth());
+ diagram.setVerticalGridUnit(ss.getDefaultHeight());
+ diagram.setSnapToGrid(ss.getSnapToGrid());
+ GraphicsAlgorithm ga = diagram.getGraphicsAlgorithm();
+ IGaService gaService = Graphiti.getGaService();
+ ga.setForeground(gaService.manageColor(diagram, ss.getShapeForeground()));
+ refresh();
+ }
+ });
+ }
+
+ if (event.getKey().contains(ShapeStyle.Category.CANVAS.name())) { //$NON-NLS-1$
+ getEditingDomain().getCommandStack().execute(new RecordingCommand(getEditingDomain()) {
+ @Override
+ protected void doExecute() {
+ ShapeStyle ss = getPreferences().getShapeStyle(ShapeStyle.Category.CANVAS);
+ Diagram diagram = getDiagramTypeProvider().getDiagram();
+ GraphicsAlgorithm ga = diagram.getGraphicsAlgorithm();
+ IGaService gaService = Graphiti.getGaService();
+ ga.setBackground(gaService.manageColor(diagram, ss.getShapeBackground()));
+ refresh();
+ }
+ });
+ }
}
public static BPMN2Editor findOpenEditor(IEditorPart newEditor, IEditorInput newInput) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorDiagramBehavior.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorDiagramBehavior.java
index 087fc28b..6de025a5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorDiagramBehavior.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorDiagramBehavior.java
@@ -78,6 +78,10 @@ public class BPMN2EditorDiagramBehavior extends DiagramBehavior {
action.setEnabled(action.isEnabled());
manager.add(action);
}
+
+ action = getDiagramContainer().getActionRegistry().getAction("show.property.view"); //$NON-NLS-1$
+ action.setText(action.getText());
+ manager.add(action);
}
};
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorMatchingStrategy.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorMatchingStrategy.java
index b3ccbda0..b3ccbda0 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorMatchingStrategy.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorMatchingStrategy.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java
index 060b75a3..6c5edc8f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java
@@ -13,9 +13,13 @@
package org.eclipse.bpmn2.modeler.ui.editor;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent;
+import org.eclipse.bpmn2.modeler.core.LifecycleEvent.EventType;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceSetImpl;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.validation.ValidationStatusAdapterFactory;
import org.eclipse.core.commands.operations.DefaultOperationHistory;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
@@ -72,7 +76,7 @@ public class BPMN2EditorUpdateBehavior extends DefaultUpdateBehavior {
IDiagramContainerUI dc = diagramBehavior.getDiagramContainer();
if (dc instanceof BPMN2Editor) {
BPMN2Editor editor = (BPMN2Editor) dc;
- BPMN2Editor openEditor = BPMN2Editor.findOpenEditor(editor, editor.getCurrentInput());
+ BPMN2Editor openEditor = BPMN2Editor.findOpenEditor(editor, editor.getEditorInput());
if (openEditor!=null) {
BPMN2EditorUpdateBehavior updateBehavior = (BPMN2EditorUpdateBehavior) openEditor.getDiagramBehavior().getUpdateBehavior();
editingDomain = updateBehavior.editingDomain;
@@ -92,7 +96,7 @@ public class BPMN2EditorUpdateBehavior extends DefaultUpdateBehavior {
IDiagramContainerUI dc = diagramBehavior.getDiagramContainer();
if (dc instanceof BPMN2Editor) {
BPMN2Editor editor = (BPMN2Editor) dc;
- BPMN2Editor openEditor = BPMN2Editor.findOpenEditor(editor, editor.getCurrentInput());
+ BPMN2Editor openEditor = BPMN2Editor.findOpenEditor(editor, editor.getEditorInput());
if (openEditor==null)
super.dispose();
}
@@ -151,4 +155,19 @@ public class BPMN2EditorUpdateBehavior extends DefaultUpdateBehavior {
return bpmnEditor.handleResourceMoved(resource, newURI);
}
- }} \ No newline at end of file
+ }
+
+ @Override
+ public void historyNotification(OperationHistoryEvent event) {
+ super.historyNotification(event);
+
+ switch (event.getEventType()) {
+ case OperationHistoryEvent.REDONE:
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.COMMAND_REDO, event.getOperation()));
+ break;
+ case OperationHistoryEvent.UNDONE:
+ TargetRuntime.getCurrentRuntime().notify(new LifecycleEvent(EventType.COMMAND_UNDO, event.getOperation()));
+ break;
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MarkerChangeListener.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MarkerChangeListener.java
index 350a3397..c22da9ef 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MarkerChangeListener.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MarkerChangeListener.java
@@ -16,7 +16,7 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
-import org.eclipse.bpmn2.modeler.core.Bpmn2TabbedPropertySheetPage;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.Bpmn2TabbedPropertySheetPage;
import org.eclipse.bpmn2.modeler.core.validation.BPMN2ValidationStatusLoader;
import org.eclipse.bpmn2.modeler.core.validation.ValidationStatusAdapter;
import org.eclipse.core.resources.IMarker;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java
index fa620aaa..95a2df76 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2MultiPageEditor.java
@@ -17,7 +17,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInput;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -182,7 +182,7 @@ public class BPMN2MultiPageEditor extends MultiPageEditorPart implements IGotoMa
--pageIndex;
addPage(pageIndex, designEditor, BPMN2MultiPageEditor.this.getEditorInput());
defaultTabHeight = tabFolder.getTabHeight();
- setPageText(pageIndex,ModelUtil.getDisplayName( designEditor.getBpmnDiagram() ));
+ setPageText(pageIndex,ExtendedPropertiesProvider.getTextValue( designEditor.getBpmnDiagram() ));
defaultTabHeight = tabFolder.getTabHeight();
@@ -213,7 +213,7 @@ public class BPMN2MultiPageEditor extends MultiPageEditorPart implements IGotoMa
CTabItem oldItem = tabFolder.getItem(pageIndex-1);
CTabItem newItem = tabFolder.getItem(pageIndex);
newItem.setControl( oldItem.getControl() );
- setPageText(pageIndex,ModelUtil.getDisplayName(bpmnDiagram));
+ setPageText(pageIndex,ExtendedPropertiesProvider.getTextValue(bpmnDiagram));
setActivePage(pageIndex);
updateTabs();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java
index 8571aacd..8571aacd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/ConnectionLayerClippingStrategy.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/ConnectionLayerClippingStrategy.java
index 81643ea2..0700cdda 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/ConnectionLayerClippingStrategy.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/ConnectionLayerClippingStrategy.java
@@ -27,6 +27,7 @@ import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.LayerConstants;
import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
+import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
@@ -58,54 +59,60 @@ public class ConnectionLayerClippingStrategy implements IClippingStrategy {
@Override
public Rectangle[] getClip(IFigure childFigure) {
- for (Object value : graphicalViewer.getEditPartRegistry().values()) {
- GraphicalEditPart part = (GraphicalEditPart)value;
- if (part.getFigure() == childFigure) {
- Object model = part.getModel();
- if (model instanceof Connection) {
- Connection connection = (Connection)model;
- AnchorContainer source = connection.getStart().getParent();
- AnchorContainer target = connection.getEnd().getParent();
- if (source.eContainer() != target.eContainer()) {
- // don't clip the connection if source and target are not in the same container
- return new Rectangle[] {childFigure.getBounds()};
- }
- BaseElement businessObject = BusinessObjectUtil.getFirstBaseElement(connection);
- if (businessObject instanceof MessageFlow) {
- ContainerShape messageShape = MessageFlowFeatureContainer.findMessageShape(connection);
- if (messageShape!=null) {
- Rectangle inner = getClip(messageShape)[0];
- Rectangle outer = childFigure.getBounds();
- return getClip(outer,inner);
+ try {
+ for (Object value : graphicalViewer.getEditPartRegistry().values()) {
+ GraphicalEditPart part = (GraphicalEditPart)value;
+ if (part.getFigure() == childFigure) {
+ Object model = part.getModel();
+ if (model instanceof Connection) {
+ Connection connection = (Connection)model;
+ AnchorContainer source = connection.getStart().getParent();
+ AnchorContainer target = connection.getEnd().getParent();
+ if (source.eContainer() != target.eContainer()) {
+ // don't clip the connection if source and target are not in the same container
+ return new Rectangle[] {childFigure.getBounds()};
}
- }
- else if (businessObject!=null) {
- EObject container = businessObject.eContainer();
- if (container instanceof SubProcess) {
- // don't clip if contents of SubProcess have been moved to a different
- // BPMNDiagram ("pushed down")
- BPMNEdge bpmnEdge = BusinessObjectUtil.getFirstElementOfType(connection, BPMNEdge.class);
- if (bpmnEdge!=null) {
- for (PictogramElement pe : Graphiti.getLinkService().getPictogramElements(diagram, container)) {
- if (pe instanceof ContainerShape) {
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(pe, BPMNShape.class);
- if (bpmnShape!=null) {
- if (bpmnShape.eContainer()!=bpmnEdge.eContainer())
- continue;
+ BaseElement businessObject = BusinessObjectUtil.getFirstBaseElement(connection);
+ if (businessObject instanceof MessageFlow) {
+ ContainerShape messageShape = MessageFlowFeatureContainer.findMessageShape(connection);
+ if (messageShape!=null) {
+ Rectangle inner = getClip(messageShape)[0];
+ Rectangle outer = childFigure.getBounds();
+ return getClip(outer,inner);
+ }
+ }
+ else if (businessObject!=null) {
+ EObject container = businessObject.eContainer();
+ if (container instanceof SubProcess) {
+ // don't clip if contents of SubProcess have been moved to a different
+ // BPMNDiagram ("pushed down")
+ BPMNEdge bpmnEdge = BusinessObjectUtil.getFirstElementOfType(connection, BPMNEdge.class);
+ if (bpmnEdge!=null) {
+ for (PictogramElement pe : Graphiti.getLinkService().getPictogramElements(diagram, container)) {
+ if (pe instanceof ContainerShape) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(pe, BPMNShape.class);
+ if (bpmnShape!=null) {
+ if (bpmnShape.eContainer()!=bpmnEdge.eContainer())
+ continue;
+ }
+ // don't clip connection if the source or target is this SubProcess
+ EObject sourceBo = BusinessObjectUtil.getFirstBaseElement(source);
+ EObject targetBo = BusinessObjectUtil.getFirstBaseElement(target);
+ if (sourceBo!=container && targetBo!=container)
+ return getClip((ContainerShape)pe);
}
- // don't clip connection if the source or target is this SubProcess
- EObject sourceBo = BusinessObjectUtil.getFirstBaseElement(source);
- EObject targetBo = BusinessObjectUtil.getFirstBaseElement(target);
- if (sourceBo!=container && targetBo!=container)
- return getClip((ContainerShape)pe);
}
- }
- }
+ }
+ }
}
}
}
}
}
+ catch (Exception ex) {
+ // Ignore exceptions: this could happen if a source or target shape of a connection has already been removed
+ // before the connection has been removed. It all depends on the order in which they were created.
+ }
return new Rectangle[] {childFigure.getBounds()};
}
@@ -137,7 +144,8 @@ public class ConnectionLayerClippingStrategy implements IClippingStrategy {
}
private Rectangle[] getClip(ContainerShape pe) {
+ ILocation loc = Graphiti.getPeService().getLocationRelativeToDiagram(pe);
GraphicsAlgorithm ga = pe.getGraphicsAlgorithm();
- return new Rectangle[] { new Rectangle(ga.getX(), ga.getY(), ga.getWidth(), ga.getHeight()) };
+ return new Rectangle[] { new Rectangle(loc.getX(), loc.getY(), ga.getWidth(), ga.getHeight()) };
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
index 7f9900ab..b89c4ffa 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
@@ -21,17 +21,16 @@ import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNPlane;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -43,14 +42,11 @@ import org.eclipse.emf.transaction.ResourceSetListener;
import org.eclipse.emf.transaction.RollbackException;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.ContextMenuProvider;
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.gef.ui.actions.WorkbenchPartAction;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.ui.editor.DiagramEditorContextMenuProvider;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.osgi.util.NLS;
@@ -67,6 +63,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.views.contentoutline.ContentOutline;
@@ -237,7 +234,7 @@ public class DesignEditor extends BPMN2Editor {
CTabItem item = new CTabItem(tabFolder, SWT.NONE);
item.setControl(container);
BaseElement be = bd.getPlane().getBpmnElement();
- item.setText(ModelUtil.getDisplayName(be));
+ item.setText(ExtendedPropertiesProvider.getTextValue(be));
item.setData(bd);
}
@@ -434,6 +431,37 @@ public class DesignEditor extends BPMN2Editor {
}
};
registry.registerAction(action);
+
+ action = new WorkbenchPartAction(multipageEditor.getDesignEditor()) {
+
+ @Override
+ protected void init() {
+ super.init();
+ setId("show.property.view"); //$NON-NLS-1$
+ }
+
+ @Override
+ public String getText() {
+ return Messages.DesignEditor_Show_Property_View_Action;
+ }
+
+ @Override
+ protected boolean calculateEnabled() {
+ return true;
+ }
+
+ public void run() {
+ IWorkbenchPage page = getEditorSite().getPage();
+ String viewID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+ try {
+ page.showView(viewID, null, IWorkbenchPage.VIEW_CREATE);
+ page.showView(viewID, null, IWorkbenchPage.VIEW_ACTIVATE);
+ }
+ catch (Exception e) {}
+ }
+ };
+ registry.registerAction(action);
+
}
public class AddRemoveDiagramListener implements ResourceSetListener {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditorSite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditorSite.java
index 908ff5b9..908ff5b9 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditorSite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditorSite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/Messages.java
index 9be09e76..eb05ba49 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.editor;
import org.eclipse.osgi.util.NLS;
@@ -13,6 +23,7 @@ public class Messages extends NLS {
public static String DesignEditor_Diagram_Tab;
public static String DesignEditor_Hide_Source_View_Action;
public static String DesignEditor_Show_Source_View_Action;
+ public static String DesignEditor_Show_Property_View_Action;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/SourceViewer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/SourceViewer.java
index 7a670082..7a670082 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/SourceViewer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/SourceViewer.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties
new file mode 100644
index 00000000..987fe67a
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/messages.properties
@@ -0,0 +1,20 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+BPMN2Editor_Cannot_Create_Editor_Input=Can't create BPMN2Editor Input
+BPMN2MultiPageEditor_Source_Tab=Source
+BPMN2PersistencyBehavior_Cannot_Save_Title=Can not save file
+DesignEditor_Delete_Diagram_Action=Delete Diagram {0}
+DesignEditor_Delete_Page_Title=Delete Page
+DesignEditor_DeletePage_Message=Are you sure you want to delete the page {0}?
+DesignEditor_Diagram_Tab=Diagram
+DesignEditor_Hide_Source_View_Action=Hide Source View
+DesignEditor_Show_Source_View_Action=Show Source View
+DesignEditor_Show_Property_View_Action=Show Property View
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractAppendNodeFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractAppendNodeFeature.java
index 1a04822b..ffe64ba1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractAppendNodeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractAppendNodeFeature.java
@@ -25,7 +25,7 @@ import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.SequenceFlow;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
@@ -35,7 +35,7 @@ import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.Tuple;
-import org.eclipse.bpmn2.modeler.ui.diagram.BPMNToolBehaviorProvider;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2ToolBehaviorProvider;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
@@ -192,7 +192,7 @@ public abstract class AbstractAppendNodeFeature<T extends FlowNode> extends Abst
}
protected ICreateFeature selectNewShape() {
- BPMNToolBehaviorProvider toolProvider = getToolProvider();
+ Bpmn2ToolBehaviorProvider toolProvider = getToolProvider();
List<IToolEntry> tools = getTools();
ICreateFeature feature = null;
@@ -421,11 +421,11 @@ public abstract class AbstractAppendNodeFeature<T extends FlowNode> extends Abst
return connection;
}
- protected BPMNToolBehaviorProvider getToolProvider() {
+ protected Bpmn2ToolBehaviorProvider getToolProvider() {
IToolBehaviorProvider[] toolProviders = getFeatureProvider().getDiagramTypeProvider().getAvailableToolBehaviorProviders();
for (IToolBehaviorProvider tp : toolProviders) {
- if (tp instanceof BPMNToolBehaviorProvider) {
- return (BPMNToolBehaviorProvider)tp;
+ if (tp instanceof Bpmn2ToolBehaviorProvider) {
+ return (Bpmn2ToolBehaviorProvider)tp;
}
}
return null;
@@ -433,7 +433,7 @@ public abstract class AbstractAppendNodeFeature<T extends FlowNode> extends Abst
protected List<IToolEntry> getTools() {
List<IToolEntry> tools = new ArrayList<IToolEntry>();
- BPMNToolBehaviorProvider toolProvider = getToolProvider();
+ Bpmn2ToolBehaviorProvider toolProvider = getToolProvider();
if (toolProvider!=null) {
List<EClass> availableTypes = getAvailableTypes();
@@ -475,7 +475,7 @@ public abstract class AbstractAppendNodeFeature<T extends FlowNode> extends Abst
cc.setTargetContainer((ContainerShape)container);
// set the IMPORT flag so that the new shape's location is not adjusted during creation
- cc.putProperty(DIImport.IMPORT_PROPERTY, Boolean.TRUE);
+ cc.putProperty(GraphitiConstants.IMPORT_PROPERTY, Boolean.TRUE);
return cc;
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractDefaultDeleteFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractDefaultDeleteFeature.java
index d756694b..f6e91f10 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractDefaultDeleteFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractDefaultDeleteFeature.java
@@ -12,7 +12,11 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features;
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.RootElement;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDeleteContext;
@@ -23,8 +27,15 @@ public class AbstractDefaultDeleteFeature extends DefaultDeleteBPMNShapeFeature
@Override
public void delete(IDeleteContext context) {
+ RootElement container = null;
+ BaseElement element = BusinessObjectUtil.getFirstBaseElement(context.getPictogramElement());
+ if (element!=null && element.eContainer() instanceof RootElement) {
+ container = (RootElement) element.eContainer();
+ }
deletePeEnvironment(context.getPictogramElement());
super.delete(context);
+
+ DIUtils.deleteContainerIfPossible(container);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractMorphNodeFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractMorphNodeFeature.java
index 70eb0d1c..42bcca59 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractMorphNodeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractMorphNodeFeature.java
@@ -23,15 +23,15 @@ import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.FlowElement;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature;
+import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer.CreateCustomShapeFeature;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.ui.diagram.BPMNToolBehaviorProvider;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomShapeFeatureContainer.CreateCustomShapeFeature;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2ToolBehaviorProvider;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
@@ -180,7 +180,7 @@ public abstract class AbstractMorphNodeFeature<T extends FlowNode> extends Abstr
protected ICreateFeature selectNewShape(ICustomContext context) {
DiagramEditor editor = (DiagramEditor)getDiagramEditor();
- BPMNToolBehaviorProvider toolProvider = getToolProvider();
+ Bpmn2ToolBehaviorProvider toolProvider = getToolProvider();
List<IToolEntry> tools = getTools(context);
ICreateFeature feature = null;
@@ -305,7 +305,7 @@ public abstract class AbstractMorphNodeFeature<T extends FlowNode> extends Abstr
createContext.setTargetContainer(oldShape.getContainer());
createContext.setLocation(x, y);
createContext.setSize(w, h);
- createContext.putProperty(DIImport.IMPORT_PROPERTY, Boolean.TRUE);
+ createContext.putProperty(GraphitiConstants.IMPORT_PROPERTY, Boolean.TRUE);
Object[] created = createFeature.create(createContext);
FlowElement newObject = (FlowElement) created[0];
@@ -370,12 +370,12 @@ public abstract class AbstractMorphNodeFeature<T extends FlowNode> extends Abstr
return children;
}
- protected BPMNToolBehaviorProvider getToolProvider() {
+ protected Bpmn2ToolBehaviorProvider getToolProvider() {
IToolBehaviorProvider[] toolProviders = getFeatureProvider().getDiagramTypeProvider().getAvailableToolBehaviorProviders();
- BPMNToolBehaviorProvider toolProvider = null;
+ Bpmn2ToolBehaviorProvider toolProvider = null;
for (IToolBehaviorProvider tp : toolProviders) {
- if (tp instanceof BPMNToolBehaviorProvider) {
- return (BPMNToolBehaviorProvider)tp;
+ if (tp instanceof Bpmn2ToolBehaviorProvider) {
+ return (Bpmn2ToolBehaviorProvider)tp;
}
}
return null;
@@ -383,7 +383,7 @@ public abstract class AbstractMorphNodeFeature<T extends FlowNode> extends Abstr
protected List<IToolEntry> getTools(ICustomContext context) {
List<IToolEntry> tools = new ArrayList<IToolEntry>();
- BPMNToolBehaviorProvider toolProvider = getToolProvider();
+ Bpmn2ToolBehaviorProvider toolProvider = getToolProvider();
if (toolProvider!=null) {
List<EClass> availableTypes = getAvailableTypes(context);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractRotateContainerFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractRotateContainerFeature.java
index a96b7f67..41ade13e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractRotateContainerFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/AbstractRotateContainerFeature.java
@@ -13,32 +13,28 @@
package org.eclipse.bpmn2.modeler.ui.features;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Hashtable;
import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.RoutingNet;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
-import org.eclipse.graphiti.mm.pictograms.Anchor;
-import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
@@ -95,17 +91,22 @@ public abstract class AbstractRotateContainerFeature extends AbstractCustomFeatu
ContainerShape container = (ContainerShape)pes[0];
boolean horz = FeatureSupport.isHorizontal(container);
- List<Shape> moved = new ArrayList<Shape>();
- changeOrientation(container, !horz, moved);
- FeatureSupport.redraw(container);
+ Hashtable<Shape, Point> offsetMap = new Hashtable<Shape, Point>();
+ changeOrientation(container, !horz, offsetMap);
+ layoutPictogramElement(container);
+// FeatureSupport.redrawLanes(getFeatureProvider(), container);
- for (Shape shape : moved) {
+ for (Shape shape : offsetMap.keySet()) {
FeatureSupport.updateConnections(getFeatureProvider(), shape);
}
+ IUpdateContext updateContext = new UpdateContext(container);
+ updateContext.putProperty(GraphitiConstants.FORCE_UPDATE_ALL, Boolean.TRUE);
+ updateContext.putProperty(GraphitiConstants.LABEL_OFFSET_MAP, offsetMap);
+ getFeatureProvider().updateIfPossible(updateContext);
}
}
- private void changeOrientation(ContainerShape container, boolean horz, List<Shape> moved) {
+ private void changeOrientation(ContainerShape container, boolean horz, Hashtable<Shape, Point> offsetMap) {
// Recursively change the orientation of Lanes and "Pools" (Participants).
// Note that this does not apply to Participant bands contained in a ChoreographTask.
@@ -127,18 +128,21 @@ public abstract class AbstractRotateContainerFeature extends AbstractCustomFeatu
// Activities and other child figures only change location, not size
// so simply swap x and y as a first cut.
// TODO: replace this with auto layout algorithm, TBD later
- gaService.setLocationAndSize(ga, y, x, width, height);
+ gaService.setLocationAndSize(ga, y - width/2 + height/2, x - height/2 + width/2, width, height);
layoutPictogramElement(container);
}
DIUtils.updateDIShape(container);
for (Shape shape : container.getChildren()) {
- if (shape instanceof ContainerShape) {
- changeOrientation((ContainerShape) shape, horz, moved);
+ if (FeatureSupport.hasBPMNShape(shape)) {
+ ILocation preLoc = Graphiti.getPeService().getLocationRelativeToDiagram(shape);
+ changeOrientation((ContainerShape) shape, horz, offsetMap);
if (BusinessObjectUtil.getBusinessObjectForPictogramElement(shape) instanceof ChoreographyTask)
- ChoreographyUtil.moveChoreographyMessageLinks((ContainerShape) shape);
- moved.add(shape);
+ ChoreographyUtil.updateChoreographyMessageLinks(getFeatureProvider(), shape);
+ ILocation postLoc = Graphiti.getPeService().getLocationRelativeToDiagram(shape);
+ Point p = Graphiti.getCreateService().createPoint(postLoc.getX() - preLoc.getX(), postLoc.getY() - preLoc.getY());
+ offsetMap.put(shape, p);
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AbstractActivityFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AbstractActivityFeatureContainer.java
index e52b11b1..d0c4aa2a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AbstractActivityFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AbstractActivityFeatureContainer.java
@@ -13,17 +13,16 @@
package org.eclipse.bpmn2.modeler.ui.features.activity;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.MoveActivityFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.UpdateActivityCompensateMarkerFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.UpdateActivityLoopAndMultiInstanceMarkerFeature;
-import org.eclipse.bpmn2.modeler.ui.features.activity.task.CustomConnectionFeatureContainer.CreateCustomConnectionFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
import org.eclipse.bpmn2.modeler.ui.features.event.AppendEventFeature;
import org.eclipse.bpmn2.modeler.ui.features.gateway.AppendGatewayFeature;
-import org.eclipse.graphiti.features.ICreateConnectionFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IMoveShapeFeature;
@@ -31,27 +30,28 @@ import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
public abstract class AbstractActivityFeatureContainer extends BaseElementFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- UpdateActivityCompensateMarkerFeature compensateMarkerUpdateFeature = new UpdateActivityCompensateMarkerFeature(
- fp);
- UpdateActivityLoopAndMultiInstanceMarkerFeature loopAndMultiInstanceUpdateFeature = new UpdateActivityLoopAndMultiInstanceMarkerFeature(
- fp);
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(compensateMarkerUpdateFeature);
- multiUpdate.addUpdateFeature(loopAndMultiInstanceUpdateFeature);
- AbstractUpdateBaseElementFeature nameUpdateFeature = new AbstractUpdateBaseElementFeature(fp) {
+ multiUpdate.addFeature(new UpdateActivityCompensateMarkerFeature(fp));
+ multiUpdate.addFeature(new UpdateActivityLoopAndMultiInstanceMarkerFeature(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp) {
@Override
public boolean canUpdate(IUpdateContext context) {
Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
return bo != null && bo instanceof BaseElement && canApplyTo((BaseElement) bo);
}
- };
- multiUpdate.addUpdateFeature(nameUpdateFeature);
+
+ @Override
+ protected LabelPosition getLabelPosition(AbstractText text) {
+ return LabelPosition.CENTER;
+ }
+ });
return multiUpdate;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AppendActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AppendActivityFeature.java
index 237838dd..237838dd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AppendActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/AppendActivityFeature.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/DeleteActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/DeleteActivityFeature.java
index eaec2f99..eaec2f99 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/DeleteActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/DeleteActivityFeature.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/Messages.java
index deb11421..1701ed20 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.activity;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/MorphActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/MorphActivityFeature.java
index ac2beb8d..ac2beb8d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/MorphActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/MorphActivityFeature.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties
new file mode 100644
index 00000000..f7ca2ec7
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/messages.properties
@@ -0,0 +1,14 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+AppendActivityFeature_Description=Create a new Activity and connect it to this item
+AppendActivityFeature_Name=Append Activity
+MorphActivityFeature_Description=Change the Activity type
+MorphActivityFeature_Name=Morph Activity
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AbstractExpandableActivityFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AbstractExpandableActivityFeatureContainer.java
index 7f576cad..efb522e3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AbstractExpandableActivityFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AbstractExpandableActivityFeatureContainer.java
@@ -13,15 +13,12 @@
package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.CallActivity;
-import org.eclipse.bpmn2.CallChoreography;
-import org.eclipse.bpmn2.FlowElementsContainer;
-import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.task.DirectEditTaskFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.ui.features.activity.AbstractActivityFeatureContainer;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IDirectEditingFeature;
@@ -29,8 +26,9 @@ import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public abstract class AbstractExpandableActivityFeatureContainer extends AbstractActivityFeatureContainer {
@@ -40,30 +38,45 @@ public abstract class AbstractExpandableActivityFeatureContainer extends Abstrac
}
@Override
- public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutExpandableActivityFeature(fp);
- }
-
- @Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- IUpdateFeature updateFeature = super.getUpdateFeature(fp);
- MultiUpdateFeature multiUpdate;
- if (updateFeature instanceof MultiUpdateFeature)
- multiUpdate = (MultiUpdateFeature)updateFeature;
- else
- multiUpdate = new MultiUpdateFeature(fp);
- AbstractUpdateBaseElementFeature nameUpdateFeature = new AbstractUpdateBaseElementFeature(fp) {
- @Override
- public boolean canUpdate(IUpdateContext context) {
- Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
- return bo != null && bo instanceof BaseElement && canApplyTo((BaseElement) bo);
+ MultiUpdateFeature multiUpdate = (MultiUpdateFeature) super.getUpdateFeature(fp);
+ // we'll provide our own label update feature so remove the one from super()
+ for (IUpdateFeature feature : multiUpdate.getFeatures()) {
+ if (feature instanceof UpdateLabelFeature) {
+ multiUpdate.getFeatures().remove(feature);
+ break;
+ }
+ }
+ multiUpdate.addFeature(new UpdateExpandableActivityFeature(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp) {
+
+ protected LabelPosition getHorizontalLabelPosition(AbstractText text) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(text);
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(pe);
+ if (FeatureSupport.isElementExpanded(be)) {
+ return LabelPosition.LEFT;
+ }
+ return LabelPosition.CENTER;
+ }
+
+ protected LabelPosition getVerticalLabelPosition(AbstractText text) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(text);
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(pe);
+ if (FeatureSupport.isElementExpanded(be)) {
+ return LabelPosition.TOP;
+ }
+ return LabelPosition.CENTER;
}
- };
- multiUpdate.addUpdateFeature(nameUpdateFeature);
+ });
return multiUpdate;
}
@Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return new LayoutExpandableActivityFeature(fp);
+ }
+
+ @Override
public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
return new ResizeExpandableActivityFeature(fp);
}
@@ -85,26 +98,4 @@ public abstract class AbstractExpandableActivityFeatureContainer extends Abstrac
thisFeatures[4+i] = superFeatures[i];
return thisFeatures;
}
-
- public static boolean isExpandableElement(Object object) {
- return object instanceof FlowElementsContainer
- || object instanceof CallActivity
- || object instanceof CallChoreography;
- }
-
- public static boolean isElementExpanded(Object object) {
- if (isExpandableElement(object)) {
- BaseElement be = (BaseElement)object;
- // if the BaseElement has its own BPMNDiagram page it should be considered
- // to be collapsed and should be represented as such.
- // TODO: this condition should be removed once we implement Link events as
- // "off page" connectors.
- BPMNDiagram bpmnDiagram = DIUtils.findBPMNDiagram(be);
- // otherwise check the "isExpanded" state of the BPMNShape element.
- BPMNShape bpmnShape = DIUtils.findBPMNShape(be);
- if (bpmnShape!=null && bpmnShape.isIsExpanded() && bpmnDiagram==null)
- return true;
- }
- return false;
- }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AdHocSubProcessFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AdHocSubProcessFeatureContainer.java
index 20c36994..f4d09451 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AdHocSubProcessFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AdHocSubProcessFeatureContainer.java
@@ -13,10 +13,15 @@
package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
import org.eclipse.bpmn2.AdHocSubProcess;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.AbstractCreateExpandableFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
@@ -24,6 +29,8 @@ import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
public class AdHocSubProcessFeatureContainer extends AbstractExpandableActivityFeatureContainer {
@@ -44,29 +51,20 @@ public class AdHocSubProcessFeatureContainer extends AbstractExpandableActivityF
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, AdHocSubProcess businessObject) {
super.decorateShape(context, containerShape, businessObject);
- GraphicsUtil.showActivityMarker(containerShape, GraphicsUtil.ACTIVITY_MARKER_AD_HOC);
+ ShapeDecoratorUtil.showActivityMarker(containerShape, GraphitiConstants.ACTIVITY_MARKER_AD_HOC);
}
- };
- }
- @Override
- public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- IUpdateFeature updateFeature = super.getUpdateFeature(fp);
- MultiUpdateFeature multiUpdate;
- if (updateFeature instanceof MultiUpdateFeature)
- multiUpdate = (MultiUpdateFeature)updateFeature;
- else
- multiUpdate = new MultiUpdateFeature(fp);
-
- UpdateExpandableActivityFeature ueaf = new UpdateExpandableActivityFeature(fp);
- multiUpdate.addUpdateFeature(ueaf);
- return multiUpdate;
+ @Override
+ public Class getBusinessObjectType() {
+ return AdHocSubProcess.class;
+ }
+ };
}
public static class CreateAdHocSubProcessFeature extends AbstractCreateExpandableFlowNodeFeature<AdHocSubProcess> {
public CreateAdHocSubProcessFeature(IFeatureProvider fp) {
- super(fp, Messages.AdHocSubProcessFeatureContainer_Name, Messages.AdHocSubProcessFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java
new file mode 100644
index 00000000..ea1d7eda
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/AddExpandableActivityFeature.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
+
+
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.activity.AbstractAddActivityFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.graphiti.datatypes.IDimension;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+
+public abstract class AddExpandableActivityFeature<T extends Activity>
+ extends AbstractAddActivityFeature<T> {
+
+ public AddExpandableActivityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
+
+ boolean isTriggeredByEvent = false;
+ boolean isExpanded = true;
+
+ if (businessObject instanceof SubProcess) {
+ SubProcess subprocess = (SubProcess) businessObject;
+ isTriggeredByEvent = subprocess.isTriggeredByEvent();
+
+ BPMNShape bpmnShape = DIUtils.findBPMNShape(subprocess);
+ if (bpmnShape != null) {
+ isExpanded = bpmnShape.isIsExpanded();
+ }
+ }
+ peService.setPropertyValue(containerShape, GraphitiConstants.TRIGGERED_BY_EVENT, Boolean.toString(isTriggeredByEvent));
+ FeatureSupport.setElementExpanded(containerShape, isExpanded);
+
+ if (!isExpanded){
+ ShapeDecoratorUtil.showActivityMarker(containerShape, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ FeatureSupport.updateCollapsedSize(containerShape);
+ }
+ else {
+ ShapeDecoratorUtil.hideActivityMarker(containerShape, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ FeatureSupport.updateExpandedSize(containerShape);
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CollapseFlowNodeFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CollapseFlowNodeFeature.java
index f6ea6ca0..145b8219 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CollapseFlowNodeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CollapseFlowNodeFeature.java
@@ -14,11 +14,15 @@ package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.FlowNode;
-import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
@@ -63,8 +67,8 @@ public class CollapseFlowNodeFeature extends AbstractCustomFeature {
public boolean canExecute(ICustomContext context) {
PictogramElement[] pes = context.getPictogramElements();
if (pes != null && pes.length == 1) {
- Object bo = getBusinessObjectForPictogramElement(pes[0]);
- return AbstractExpandableActivityFeatureContainer.isElementExpanded(bo);
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(pes[0]);
+ return FeatureSupport.isElementExpanded(be);
}
return false;
}
@@ -81,8 +85,10 @@ public class CollapseFlowNodeFeature extends AbstractCustomFeature {
try {
BPMNShape bpmnShape = DIUtils.findBPMNShape(flowNode);
if (bpmnShape.isIsExpanded()) {
+ Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(getDiagram());
+ ShapeStyle ss = preferences.getShapeStyle("TASKS");
- // SubProcess is collapsed - resize to standard modelObject size
+ // SubProcess is expanded - resize to standard Task size
// NOTE: children tasks will be set not-visible in LayoutExpandableActivityFeature
bpmnShape.setIsExpanded(false);
@@ -90,10 +96,19 @@ public class CollapseFlowNodeFeature extends AbstractCustomFeature {
GraphicsAlgorithm ga = containerShape.getGraphicsAlgorithm();
ResizeShapeContext resizeContext = new ResizeShapeContext(containerShape);
IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(resizeContext);
+ IDimension oldSize = FeatureSupport.getCollapsedSize(containerShape);
int oldWidth = ga.getWidth();
int oldHeight = ga.getHeight();
- int newWidth = GraphicsUtil.getActivitySize(getDiagram()).getWidth();
- int newHeight = GraphicsUtil.getActivitySize(getDiagram()).getHeight();
+ FeatureSupport.setExpandedSize(containerShape, oldWidth, oldHeight);
+
+ int newWidth = ss.getDefaultWidth();
+ int newHeight = ss.getDefaultHeight();
+ if (newWidth < oldSize.getWidth())
+ oldSize.setWidth(newWidth);
+ if (newHeight < oldSize.getHeight())
+ oldSize.setHeight(newHeight);
+ newWidth = oldSize.getWidth();
+ newHeight = oldSize.getHeight();
resizeContext.setX(ga.getX() + oldWidth/2 - newWidth/2);
resizeContext.setY(ga.getY() + oldHeight/2 - newHeight/2);
resizeContext.setWidth(newWidth);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/DeleteExpandableActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/DeleteExpandableActivityFeature.java
index 87727bd6..87727bd6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/DeleteExpandableActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/DeleteExpandableActivityFeature.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ExpandFlowNodeFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ExpandFlowNodeFeature.java
index 851687a7..2e5f462c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ExpandFlowNodeFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ExpandFlowNodeFeature.java
@@ -12,11 +12,15 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.bpmn2.modeler.ui.features.choreography.ShowDiagramPageFeature;
+import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
@@ -76,8 +80,8 @@ public class ExpandFlowNodeFeature extends ShowDiagramPageFeature {
boolean ret = false;
PictogramElement[] pes = context.getPictogramElements();
if (pes != null && pes.length == 1) {
- Object bo = getBusinessObjectForPictogramElement(pes[0]);
- return !AbstractExpandableActivityFeatureContainer.isElementExpanded(bo);
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(pes[0]);
+ return !FeatureSupport.isElementExpanded(be);
}
return ret;
}
@@ -108,11 +112,17 @@ public class ExpandFlowNodeFeature extends ShowDiagramPageFeature {
GraphicsAlgorithm ga = containerShape.getGraphicsAlgorithm();
ResizeShapeContext resizeContext = new ResizeShapeContext(containerShape);
IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(resizeContext);
+ IDimension oldSize = FeatureSupport.getExpandedSize(containerShape);
int oldWidth = ga.getWidth();
int oldHeight = ga.getHeight();
+ FeatureSupport.setCollapsedSize(containerShape, oldWidth, oldHeight);
ResizeExpandableActivityFeature.SizeCalculator newSize = new ResizeExpandableActivityFeature.SizeCalculator(containerShape);
- int newWidth = newSize.getWidth();
- int newHeight = newSize.getHeight();
+ if (newSize.getWidth() > oldSize.getWidth())
+ oldSize.setWidth(newSize.getWidth());
+ if (newSize.getHeight() > oldSize.getHeight())
+ oldSize.setHeight(newSize.getHeight());
+ int newWidth = oldSize.getWidth();
+ int newHeight = oldSize.getHeight();
resizeContext.setX(ga.getX() + oldWidth/2 - newWidth/2);
resizeContext.setY(ga.getY() + oldHeight/2 - newHeight/2);
resizeContext.setWidth(newWidth);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/LayoutExpandableActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/LayoutExpandableActivityFeature.java
index b9429b48..e8138726 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/LayoutExpandableActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/LayoutExpandableActivityFeature.java
@@ -13,53 +13,24 @@
package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.activity.LayoutActivityFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.context.ILayoutContext;
import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
-import org.eclipse.graphiti.services.Graphiti;
public class LayoutExpandableActivityFeature extends LayoutActivityFeature {
public LayoutExpandableActivityFeature(IFeatureProvider fp) {
super(fp);
}
-
- @Override
- protected boolean layoutHook(Shape shape, GraphicsAlgorithm ga, Object bo, int newWidth, int newHeight) {
- if (bo != null && ga instanceof AbstractText) {
- // this hook will be called for all shapes contained by the expandable activity;
- // make sure we only set size/location for our own text
- EObject container = shape.eContainer();
- while (container!=null) {
- if (container instanceof ContainerShape) {
- EObject object = BusinessObjectUtil.getBusinessObjectForPictogramElement(shape);
- if (object instanceof FlowElementsContainer) {
- GraphicsAlgorithm parentGa = ((ContainerShape)container).getGraphicsAlgorithm();
- newWidth = parentGa.getWidth();
- newHeight = parentGa.getHeight();
- Graphiti.getGaService().setLocationAndSize(ga, 5, 10, newWidth - 10, newHeight);
- return true;
- }
- }
- container = container.eContainer();
- }
- }
- return false;
- }
@Override
public boolean layout(ILayoutContext context) {
@@ -92,6 +63,7 @@ public class LayoutExpandableActivityFeature extends LayoutActivityFeature {
}
}
}
+
if (needResize) {
ResizeShapeContext resizeContext = new ResizeShapeContext(containerShape);
resizeContext.setX(parentGa.getX());
@@ -102,13 +74,13 @@ public class LayoutExpandableActivityFeature extends LayoutActivityFeature {
resizeFeature.resizeShape(resizeContext);
}
- FeatureSupport.setContainerChildrenVisible(containerShape, true);
+ FeatureSupport.setContainerChildrenVisible(getFeatureProvider(), containerShape, true);
}
else {
// SubProcess is collapsed
- FeatureSupport.setContainerChildrenVisible(containerShape, false);
+ FeatureSupport.setContainerChildrenVisible(getFeatureProvider(), containerShape, false);
}
} catch (Exception e) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/Messages.java
index 92a4cfb8..51468719 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PullupFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PullupFeature.java
index 37f9e61b..8096ad15 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PullupFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PullupFeature.java
@@ -23,12 +23,13 @@ import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.dd.di.DiagramElement;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
@@ -180,7 +181,7 @@ public class PullupFeature extends AbstractCustomFeature {
DIUtils.deleteDiagram(getDiagramBehavior(), oldBpmnDiagram);
// expand the sub process
- if (AbstractExpandableActivityFeatureContainer.isExpandableElement(container)) {
+ if (FeatureSupport.isExpandableElement(container)) {
bpmnShape.setIsExpanded(false);
ExpandFlowNodeFeature expandFeature = new ExpandFlowNodeFeature(getFeatureProvider());
expandFeature.execute(context);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PushdownFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PushdownFeature.java
index f7a01bb9..ad395df4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PushdownFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/PushdownFeature.java
@@ -26,12 +26,13 @@ import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.dd.di.DiagramElement;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
@@ -172,7 +173,7 @@ public class PushdownFeature extends AbstractCustomFeature {
newDiagram.getChildren().add((Shape)pe);
pictogramElement = pe;
}
- else if (Graphiti.getPeService().getPropertyValue(pe, GraphicsUtil.LABEL_PROPERTY) != null) {
+ else if (FeatureSupport.isLabelShape(pe)) {
newDiagram.getChildren().add((Shape)pe);
pictogramElement = pe;
}
@@ -221,7 +222,7 @@ public class PushdownFeature extends AbstractCustomFeature {
// oldDiagram.getStyles().removeAll(moved);
// collapse the sub process
- if (AbstractExpandableActivityFeatureContainer.isExpandableElement(container)) {
+ if (FeatureSupport.isExpandableElement(container)) {
bpmnShape.setIsExpanded(true);
CollapseFlowNodeFeature collapseFeature = new CollapseFlowNodeFeature(getFeatureProvider());
collapseFeature.execute(context);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ResizeExpandableActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ResizeExpandableActivityFeature.java
index c87ebb6e..7ee7fc36 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ResizeExpandableActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/ResizeExpandableActivityFeature.java
@@ -17,22 +17,26 @@ import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.services.Graphiti;
public class ResizeExpandableActivityFeature extends DefaultResizeBPMNShapeFeature {
public final static int MARGIN = 20;
+ protected Bpmn2Preferences preferences;
+
public ResizeExpandableActivityFeature(IFeatureProvider fp) {
super(fp);
+ preferences = Bpmn2Preferences.getInstance(getDiagram());
}
@Override
@@ -42,6 +46,8 @@ public class ResizeExpandableActivityFeature extends DefaultResizeBPMNShapeFeatu
ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
Activity activity = BusinessObjectUtil.getFirstElementOfType(containerShape, Activity.class);
+ ShapeStyle ss = preferences.getShapeStyle(activity);
+
try {
BPMNShape shape = DIUtils.findBPMNShape(activity);
@@ -138,13 +144,10 @@ public class ResizeExpandableActivityFeature extends DefaultResizeBPMNShapeFeatu
for (PictogramElement pe : FeatureSupport.getContainerDecorators(containerShape)) {
GraphicsAlgorithm childGa = pe.getGraphicsAlgorithm();
if (childGa!=null) {
- childGa.setWidth(GraphicsUtil.getActivitySize(getDiagram()).getWidth());
- childGa.setHeight(GraphicsUtil.getActivitySize(getDiagram()).getHeight());
+ childGa.setWidth(context.getWidth());
+ childGa.setHeight(context.getHeight());
}
}
-
- resizeShapeContext.setWidth(GraphicsUtil.getActivitySize(getDiagram()).getWidth());
- resizeShapeContext.setHeight(GraphicsUtil.getActivitySize(getDiagram()).getHeight());
}
} catch (Exception e) {
@@ -162,6 +165,7 @@ public class ResizeExpandableActivityFeature extends DefaultResizeBPMNShapeFeatu
int minWidth;
int minHeight;
ContainerShape containerShape;
+ ShapeStyle ss;
public SizeCalculator(ContainerShape containerShape) {
setShape(containerShape);
@@ -169,6 +173,8 @@ public class ResizeExpandableActivityFeature extends DefaultResizeBPMNShapeFeatu
public void setShape(ContainerShape containerShape) {
this.containerShape = containerShape;
+ Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(containerShape.eResource());
+ ss = preferences.getShapeStyle(BusinessObjectUtil.getFirstBaseElement(containerShape));
calculate();
}
@@ -205,9 +211,9 @@ public class ResizeExpandableActivityFeature extends DefaultResizeBPMNShapeFeatu
}
}
if (minWidth<=0)
- minWidth = GraphicsUtil.TASK_DEFAULT_WIDTH;
+ minWidth = ss.getDefaultWidth();
if (minHeight<=0)
- minHeight = GraphicsUtil.TASK_DEFAULT_HEIGHT;
+ minHeight = ss.getDefaultHeight();
}
public int getShiftX() {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java
new file mode 100644
index 00000000..e2487e2b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessFeatureContainer.java
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
+
+import org.eclipse.bpmn2.AdHocSubProcess;
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.CompensateEventDefinition;
+import org.eclipse.bpmn2.ConditionalEventDefinition;
+import org.eclipse.bpmn2.ErrorEventDefinition;
+import org.eclipse.bpmn2.EscalationEventDefinition;
+import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.FlowElement;
+import org.eclipse.bpmn2.MessageEventDefinition;
+import org.eclipse.bpmn2.SignalEventDefinition;
+import org.eclipse.bpmn2.StartEvent;
+import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.TimerEventDefinition;
+import org.eclipse.bpmn2.Transaction;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.activity.AbstractCreateExpandableFlowNodeFeature;
+import org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature;
+import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
+import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractUpdateEventDefinitionFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.bpmn2.modeler.ui.features.event.definitions.CompensateEventDefinitionContainer;
+import org.eclipse.bpmn2.modeler.ui.features.event.definitions.ConditionalEventDefinitionContainer;
+import org.eclipse.bpmn2.modeler.ui.features.event.definitions.ErrorEventDefinitionContainer;
+import org.eclipse.bpmn2.modeler.ui.features.event.definitions.EscalationEventDefinitionContainer;
+import org.eclipse.bpmn2.modeler.ui.features.event.definitions.MessageEventDefinitionContainer;
+import org.eclipse.bpmn2.modeler.ui.features.event.definitions.SignalEventDefinitionContainer;
+import org.eclipse.bpmn2.modeler.ui.features.event.definitions.TimerEventDefinitionContainer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+
+public class SubProcessFeatureContainer extends AbstractExpandableActivityFeatureContainer {
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof SubProcess &&
+ !(o instanceof AdHocSubProcess || o instanceof Transaction);
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateSubProcessFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddExpandableActivityFeature<SubProcess>(fp) {
+
+ @Override
+ public Class getBusinessObjectType() {
+ return SubProcess.class;
+ }
+
+ };
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = (MultiUpdateFeature) super.getUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateSubProcessDecoratorFeature(fp));
+ return multiUpdate;
+ }
+
+ public static class CreateSubProcessFeature extends AbstractCreateExpandableFlowNodeFeature<SubProcess> {
+
+ public CreateSubProcessFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected String getStencilImageId() {
+ return ImageProvider.IMG_16_SUB_PROCESS;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getSubProcess();
+ }
+ }
+
+ public static class UpdateSubProcessDecoratorFeature extends AbstractUpdateMarkerFeature<SubProcess> {
+
+ /**
+ * @param fp
+ */
+ public UpdateSubProcessDecoratorFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof ContainerShape) {
+ Object o = getBusinessObjectForPictogramElement(pe);
+ return o instanceof SubProcess;
+ }
+ return false;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof ContainerShape) {
+ boolean isVisible = false;
+
+ ContainerShape subProcessShape = (ContainerShape) pe;
+ SubProcess subProcess = (SubProcess) getBusinessObjectForPictogramElement(pe);
+ for (Shape s : subProcessShape.getChildren()) {
+ if (ShapeDecoratorUtil.isEventSubProcessDecorator(s)) {
+ isVisible = pe.isVisible();
+ }
+ }
+ EventDefinition eventDefinition = null;
+ for (FlowElement fe : subProcess.getFlowElements()) {
+ if (fe instanceof StartEvent) {
+ StartEvent startEvent = (StartEvent) fe;
+ if (startEvent.getEventDefinitions().size()>0) {
+ eventDefinition = startEvent.getEventDefinitions().get(0);
+ }
+ break;
+ }
+ }
+
+ if (subProcess.isTriggeredByEvent()) {
+ // check if we need to draw the image decorator if the
+ // SubProcess is collapsed
+ if (!FeatureSupport.isElementExpanded(subProcess)) {
+ if (super.updateNeeded(context).toBoolean()) {
+ return Reason.createTrueReason("SubProcess Decorator Changed");
+ }
+ if (!isVisible && eventDefinition!=null)
+ return Reason.createTrueReason("Show SubProcess Decorator");
+ }
+ }
+ else if (isVisible) {
+ return Reason.createTrueReason("Hide SubProcess Decorator");
+ }
+ }
+ return Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ return super.update(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#getPropertyKey()
+ */
+ @Override
+ protected String getPropertyKey() {
+ return GraphitiConstants.EVENT_SUBPROCESS_DECORATOR;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#isPropertyChanged(org.eclipse.bpmn2.FlowElement, java.lang.String)
+ */
+ @Override
+ protected boolean isPropertyChanged(SubProcess element, String propertyValue) {
+ return !convertPropertyToString(element).equals(propertyValue);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#doUpdate(org.eclipse.bpmn2.FlowElement, org.eclipse.graphiti.mm.pictograms.ContainerShape)
+ */
+ @Override
+ protected void doUpdate(SubProcess subProcess, ContainerShape subProcessShape) {
+ EventDefinition eventDefinition = null;
+ boolean isMultiple = false;
+ boolean isParallel = false;
+ StartEvent startEvent = null;
+ for (FlowElement fe : subProcess.getFlowElements()) {
+ if (fe instanceof StartEvent) {
+ startEvent = (StartEvent) fe;
+ if (startEvent.getEventDefinitions().size()>0) {
+ eventDefinition = startEvent.getEventDefinitions().get(0);
+ }
+ if (startEvent.getEventDefinitions().size()>1) {
+ isMultiple = true;
+ isParallel = startEvent.isParallelMultiple();
+ }
+ break;
+ }
+ }
+
+ for (Shape s : subProcessShape.getChildren()) {
+ if (ShapeDecoratorUtil.isEventSubProcessDecorator(s)) {
+ Graphiti.getPeService().deletePictogramElement(s);
+ break;
+ }
+ }
+
+ if (subProcess.isTriggeredByEvent() && !FeatureSupport.isElementExpanded(subProcessShape)) {
+ ContainerShape decoratorShape = null;
+ if (eventDefinition!=null) {
+ decoratorShape = ShapeDecoratorUtil.createEventSubProcessDecorator(
+ subProcessShape, startEvent.isIsInterrupting());
+ }
+
+ if (isMultiple) {
+ // TODO: Why does the Multiple figure require an additional
+ // ContainerShape to get the correct size ratios?
+ Shape s = Graphiti.getPeCreateService().createContainerShape(decoratorShape, false);
+ Rectangle r = Graphiti.getGaCreateService().createInvisibleRectangle(decoratorShape);
+ Graphiti.getGaService().setLocationAndSize(r, 1, 1, 20, 20);
+ if (isParallel)
+ AbstractUpdateEventDefinitionFeature.drawParallelMultiple(startEvent, s);
+ else
+ AbstractUpdateEventDefinitionFeature.drawMultiple(startEvent, s);
+ }
+ else if (eventDefinition instanceof MessageEventDefinition) {
+ MessageEventDefinitionContainer.draw(decoratorShape);
+ }
+ else if (eventDefinition instanceof TimerEventDefinition) {
+ TimerEventDefinitionContainer.draw(decoratorShape);
+ }
+ else if (eventDefinition instanceof CompensateEventDefinition) {
+ CompensateEventDefinitionContainer.draw(decoratorShape);
+ }
+ else if (eventDefinition instanceof ConditionalEventDefinition) {
+ ConditionalEventDefinitionContainer.draw(decoratorShape);
+ }
+ else if (eventDefinition instanceof ErrorEventDefinition) {
+ ErrorEventDefinitionContainer.draw(decoratorShape);
+ }
+ else if (eventDefinition instanceof EscalationEventDefinition) {
+ EscalationEventDefinitionContainer.draw(decoratorShape);
+ }
+ else if (eventDefinition instanceof SignalEventDefinition) {
+ SignalEventDefinitionContainer.draw(decoratorShape);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#convertPropertyToString(org.eclipse.bpmn2.FlowElement)
+ */
+ @Override
+ protected String convertPropertyToString(SubProcess element) {
+ for (FlowElement fe : element.getFlowElements()) {
+ if (fe instanceof StartEvent) {
+ return AbstractUpdateEventFeature.getEventDefinitionsValue((StartEvent)fe);
+ }
+ }
+ return "";
+ }
+
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java
index 44dd2366..44dd2366 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/SubProcessPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/TransactionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/TransactionFeatureContainer.java
index 6d8fa4bf..fcbcd8ff 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/TransactionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/TransactionFeatureContainer.java
@@ -12,12 +12,14 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.DataInput;
import org.eclipse.bpmn2.Transaction;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.AbstractCreateExpandableFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
@@ -27,8 +29,8 @@ import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.services.Graphiti;
@@ -68,21 +70,20 @@ public class TransactionFeatureContainer extends AbstractExpandableActivityFeatu
protected int getMarkerContainerOffset() {
return offset;
}
+
+ @Override
+ public Class getBusinessObjectType() {
+ return Transaction.class;
+ }
};
}
- @Override
- public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- IUpdateFeature updateFeature = super.getUpdateFeature(fp);
- MultiUpdateFeature multiUpdate;
- if (updateFeature instanceof MultiUpdateFeature)
- multiUpdate = (MultiUpdateFeature)updateFeature;
- else
- multiUpdate = new MultiUpdateFeature(fp);
- UpdateExpandableActivityFeature ueaf = new UpdateExpandableActivityFeature(fp);
- multiUpdate.addUpdateFeature(ueaf);
- return multiUpdate;
- }
+// @Override
+// public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+// MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+// multiUpdate.addFeature(super.getUpdateFeature(fp));
+// return multiUpdate;
+// }
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
@@ -104,7 +105,7 @@ public class TransactionFeatureContainer extends AbstractExpandableActivityFeatu
public static class CreateTransactionFeature extends AbstractCreateExpandableFlowNodeFeature<Transaction> {
public CreateTransactionFeature(IFeatureProvider fp) {
- super(fp, Messages.TransactionFeatureContainer_Name, Messages.TransactionFeatureContainer_Description); }
+ super(fp); }
@Override
protected String getStencilImageId() {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java
index c53e1237..ece547cc 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java
@@ -12,31 +12,28 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
-import static org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessFeatureContainer.IS_EXPANDED;
-import static org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessFeatureContainer.TRIGGERED_BY_EVENT;
-
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.emf.ecore.EObject;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.Property;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.osgi.util.NLS;
-public class UpdateExpandableActivityFeature extends AbstractUpdateFeature {
+public class UpdateExpandableActivityFeature extends AbstractUpdateBaseElementFeature<BaseElement> {
public UpdateExpandableActivityFeature(IFeatureProvider fp) {
super(fp);
@@ -44,26 +41,28 @@ public class UpdateExpandableActivityFeature extends AbstractUpdateFeature {
@Override
public boolean canUpdate(IUpdateContext context) {
- Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
- return AbstractExpandableActivityFeatureContainer.isExpandableElement(bo);
+ if (super.canUpdate(context)) {
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(context.getPictogramElement());
+ return FeatureSupport.isExpandableElement(be);
+ }
+ return false;
}
@Override
public IReason updateNeeded(IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
+ if (canUpdate(context)) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
PictogramElement pe = context.getPictogramElement();
- Property triggerProperty = Graphiti.getPeService().getProperty(pe,TRIGGERED_BY_EVENT);
- Property expandedProperty = Graphiti.getPeService().getProperty(pe,IS_EXPANDED);
+ Property triggerProperty = Graphiti.getPeService().getProperty(pe,GraphitiConstants.TRIGGERED_BY_EVENT);
+ boolean isExpanded = FeatureSupport.isElementExpanded(pe);
SubProcess subprocess = (SubProcess) getBusinessObjectForPictogramElement(pe);
try {
BPMNShape bpmnShape = DIUtils.findBPMNShape(subprocess);
- if (expandedProperty != null && Boolean.parseBoolean(expandedProperty.getValue()) != bpmnShape.isIsExpanded()) {
+ if (isExpanded != bpmnShape.isIsExpanded()) {
return Reason.createTrueReason(Messages.UpdateExpandableActivityFeature_Expand_Changed);
}
@@ -75,7 +74,7 @@ public class UpdateExpandableActivityFeature extends AbstractUpdateFeature {
if (triggerProperty != null && Boolean.parseBoolean(triggerProperty.getValue()) != subprocess.isTriggeredByEvent()) {
return Reason.createTrueReason(Messages.UpdateExpandableActivityFeature_Trigger_Changed);
}
-
+ }
return Reason.createFalseReason();
}
@@ -88,8 +87,8 @@ public class UpdateExpandableActivityFeature extends AbstractUpdateFeature {
BPMNShape bpmnShape = DIUtils.findBPMNShape(subprocess);
isExpanded = bpmnShape.isIsExpanded();
- Graphiti.getPeService().setPropertyValue(pe, TRIGGERED_BY_EVENT, Boolean.toString(subprocess.isTriggeredByEvent()));
- Graphiti.getPeService().setPropertyValue(pe, IS_EXPANDED, Boolean.toString(isExpanded));
+ Graphiti.getPeService().setPropertyValue(pe, GraphitiConstants.TRIGGERED_BY_EVENT, Boolean.toString(subprocess.isTriggeredByEvent()));
+ FeatureSupport.setElementExpanded(pe, isExpanded);
GraphicsAlgorithm rectangle = Graphiti.getPeService()
.getAllContainedPictogramElements(pe).iterator().next()
@@ -98,11 +97,11 @@ public class UpdateExpandableActivityFeature extends AbstractUpdateFeature {
rectangle.setLineStyle(lineStyle);
if(!isExpanded){
- FeatureSupport.setContainerChildrenVisible(container, false);
- GraphicsUtil.showActivityMarker(container, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
+ FeatureSupport.setContainerChildrenVisible(getFeatureProvider(), container, false);
+ ShapeDecoratorUtil.showActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
}else{
- FeatureSupport.setContainerChildrenVisible(container, true);
- GraphicsUtil.hideActivityMarker(container, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
+ FeatureSupport.setContainerChildrenVisible(getFeatureProvider(), container, true);
+ ShapeDecoratorUtil.hideActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
}
return true;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java.orig b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java.orig
new file mode 100644
index 00000000..9f0b2733
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java.orig
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java
+import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.emf.ecore.EObject;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.Property;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.osgi.util.NLS;
+
+public class UpdateExpandableActivityFeature extends AbstractUpdateBaseElementFeature<BaseElement> {
+
+ public UpdateExpandableActivityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ if (super.canUpdate(context)) {
+ BaseElement be = BusinessObjectUtil.getFirstBaseElement(context.getPictogramElement());
+ return FeatureSupport.isExpandableElement(be);
+ }
+ return false;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java
+ Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ if (value instanceof EObject) {
+ // if the UpdateContext has a "businessObject" property, then this update is needed
+ // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
+ return Reason.createTrueReason("Initial update");
+ }
+ PictogramElement pe = context.getPictogramElement();
+ Property triggerProperty = Graphiti.getPeService().getProperty(pe,TRIGGERED_BY_EVENT);
+ Property expandedProperty = Graphiti.getPeService().getProperty(pe,IS_EXPANDED);
+
+ SubProcess subprocess = (SubProcess) getBusinessObjectForPictogramElement(pe);
+ try {
+ BPMNShape bpmnShape = DIUtils.findBPMNShape(subprocess);
+ if (expandedProperty != null && Boolean.parseBoolean(expandedProperty.getValue()) != bpmnShape.isIsExpanded()) {
+ return Reason.createTrueReason(Messages.UpdateExpandableActivityFeature_Expand_Changed);
+ }
+
+ } catch (Exception e) {
+ throw new IllegalStateException(
+ NLS.bind(Messages.UpdateExpandableActivityFeature_No_DI_Element,subprocess));
+ }
+
+ if (triggerProperty != null && Boolean.parseBoolean(triggerProperty.getValue()) != subprocess.isTriggeredByEvent()) {
+ return Reason.createTrueReason(Messages.UpdateExpandableActivityFeature_Trigger_Changed);
+ }
+=======
+ if (canUpdate(context)) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ PictogramElement pe = context.getPictogramElement();
+ Property triggerProperty = Graphiti.getPeService().getProperty(pe,GraphitiConstants.TRIGGERED_BY_EVENT);
+ boolean isExpanded = FeatureSupport.isElementExpanded(pe);
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/UpdateExpandableActivityFeature.java
+
+ SubProcess subprocess = (SubProcess) getBusinessObjectForPictogramElement(pe);
+ try {
+ BPMNShape bpmnShape = DIUtils.findBPMNShape(subprocess);
+ if (isExpanded != bpmnShape.isIsExpanded()) {
+ return Reason.createTrueReason(Messages.UpdateExpandableActivityFeature_Expand_Changed);
+ }
+
+ } catch (Exception e) {
+ throw new IllegalStateException(
+ NLS.bind(Messages.UpdateExpandableActivityFeature_No_DI_Element,subprocess));
+ }
+
+ if (triggerProperty != null && Boolean.parseBoolean(triggerProperty.getValue()) != subprocess.isTriggeredByEvent()) {
+ return Reason.createTrueReason(Messages.UpdateExpandableActivityFeature_Trigger_Changed);
+ }
+ }
+ return Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ SubProcess subprocess = (SubProcess) getBusinessObjectForPictogramElement(pe);
+ ContainerShape container = (ContainerShape) pe;
+ boolean isExpanded = false;
+
+ BPMNShape bpmnShape = DIUtils.findBPMNShape(subprocess);
+ isExpanded = bpmnShape.isIsExpanded();
+ Graphiti.getPeService().setPropertyValue(pe, GraphitiConstants.TRIGGERED_BY_EVENT, Boolean.toString(subprocess.isTriggeredByEvent()));
+ FeatureSupport.setElementExpanded(pe, isExpanded);
+
+ GraphicsAlgorithm rectangle = Graphiti.getPeService()
+ .getAllContainedPictogramElements(pe).iterator().next()
+ .getGraphicsAlgorithm();
+ LineStyle lineStyle = subprocess.isTriggeredByEvent() ? LineStyle.DOT : LineStyle.SOLID;
+ rectangle.setLineStyle(lineStyle);
+
+ if(!isExpanded){
+ FeatureSupport.setContainerChildrenVisible(getFeatureProvider(), container, false);
+ ShapeDecoratorUtil.showActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ }else{
+ FeatureSupport.setContainerChildrenVisible(getFeatureProvider(), container, true);
+ ShapeDecoratorUtil.hideActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ }
+
+ return true;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/messages.properties
index f4c567fc..e890100f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
AdHocSubProcessFeatureContainer_Description=Create Ad-Hoc Sub-Process
AdHocSubProcessFeatureContainer_Name=Ad-Hoc Sub-Process
CallActivityFeatureContainer_Description=Create Call Activity
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractAddDecoratedTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractAddDecoratedTaskFeature.java
index 1ee6a702..90025d62 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractAddDecoratedTaskFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractAddDecoratedTaskFeature.java
@@ -11,17 +11,13 @@
package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.bpmn2.Task;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.AddTaskFeature;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractAddTaskFeature;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.Image;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-public abstract class AbstractAddDecoratedTaskFeature<T extends Task> extends AddTaskFeature<T> {
+public abstract class AbstractAddDecoratedTaskFeature<T extends Task> extends AbstractAddTaskFeature<T> {
public AbstractAddDecoratedTaskFeature(IFeatureProvider fp) {
super(fp);
@@ -30,11 +26,7 @@ public abstract class AbstractAddDecoratedTaskFeature<T extends Task> extends Ad
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, T businessObject) {
super.decorateShape(context, containerShape, businessObject);
-
- GraphicsAlgorithmContainer ga = getGraphicsAlgorithm(containerShape);
- IGaService service = Graphiti.getGaService();
- Image img = service.createImage(ga, getStencilImageId());
- service.setLocationAndSize(img, 2, 2, GraphicsUtil.TASK_IMAGE_SIZE, GraphicsUtil.TASK_IMAGE_SIZE);
+ ShapeDecoratorUtil.createActivityImage(containerShape, getStencilImageId());
}
protected abstract String getStencilImageId();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractTaskFeatureContainer.java
index 57315c59..3103a453 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/AbstractTaskFeatureContainer.java
@@ -15,7 +15,7 @@ package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.LayoutActivityFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.task.DirectEditTaskFeature;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.features.activity.AbstractActivityFeatureContainer;
import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
@@ -34,15 +34,6 @@ public abstract class AbstractTaskFeatureContainer extends AbstractActivityFeatu
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutActivityFeature(fp) {
- @Override
- protected boolean layoutHook(Shape shape, GraphicsAlgorithm ga, Object bo, int newWidth, int newHeight) {
- if (bo != null && bo instanceof Task && ga instanceof MultiText) {
- Graphiti.getGaService().setLocationAndSize(ga, 0, 0, newWidth, newHeight);
- return true;
- }
- return false;
- }
- };
+ return new LayoutActivityFeature(fp);
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/BusinessRuleTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/BusinessRuleTaskFeatureContainer.java
index 874e2557..d6025106 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/BusinessRuleTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/BusinessRuleTaskFeatureContainer.java
@@ -14,25 +14,12 @@ package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.BusinessRuleTask;
-import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.AddTaskFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.Image;
-import org.eclipse.graphiti.mm.algorithms.Polygon;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
public class BusinessRuleTaskFeatureContainer extends AbstractTaskFeatureContainer {
@@ -58,21 +45,23 @@ public class BusinessRuleTaskFeatureContainer extends AbstractTaskFeatureContain
}
@Override
- public int getWidth() {
- return GraphicsUtil.getActivitySize(getDiagram()).getWidth();
-// return GraphicsUtil.TASK_DEFAULT_WIDTH + 50;
+ protected String getStencilImageId() {
+ return ImageProvider.IMG_16_BUSINESS_RULE_TASK;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- protected String getStencilImageId() {
- return ImageProvider.IMG_16_BUSINESS_RULE_TASK;
+ public Class getBusinessObjectType() {
+ return BusinessRuleTask.class;
}
}
public static class CreateBusinessRuleTaskFeature extends AbstractCreateTaskFeature<BusinessRuleTask> {
public CreateBusinessRuleTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.BusinessRuleTaskFeatureContainer_Name, Messages.BusinessRuleTaskFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ManualTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ManualTaskFeatureContainer.java
index 4b379018..0ded2227 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ManualTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ManualTaskFeatureContainer.java
@@ -1,71 +1,87 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.task;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ManualTask;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
-import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.graphiti.features.IAddFeature;
-import org.eclipse.graphiti.features.ICreateFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-
-public class ManualTaskFeatureContainer extends AbstractTaskFeatureContainer {
-
- @Override
- public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof ManualTask;
- }
-
- @Override
- public ICreateFeature getCreateFeature(IFeatureProvider fp) {
- return new CreateManualTaskFeature(fp);
- }
-
- @Override
- public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddManualTaskFeature(fp);
- }
-
- public static class AddManualTaskFeature extends AbstractAddDecoratedTaskFeature<ManualTask> {
- public AddManualTaskFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- protected String getStencilImageId() {
- return ImageProvider.IMG_16_MANUAL_TASK;
- }
- }
-
- public static class CreateManualTaskFeature extends AbstractCreateTaskFeature<ManualTask> {
-
- public CreateManualTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.ManualTaskFeatureContainer_Name, Messages.ManualTaskFeatureContainer_Description);
- }
-
- @Override
- protected String getStencilImageId() {
- return ImageProvider.IMG_16_MANUAL_TASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
- */
- @Override
- public EClass getBusinessObjectClass() {
- return Bpmn2Package.eINSTANCE.getManualTask();
- }
- }
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.activity.task;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.ManualTask;
+import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+public class ManualTaskFeatureContainer extends AbstractTaskFeatureContainer {
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof ManualTask;
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateManualTaskFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddManualTaskFeature(fp);
+ }
+
+ public static class AddManualTaskFeature extends AbstractAddDecoratedTaskFeature<ManualTask> {
+
+ public AddManualTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected String getStencilImageId() {
+ return ImageProvider.IMG_16_MANUAL_TASK;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#
+ * getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ManualTask.class;
+ }
+ }
+
+ public static class CreateManualTaskFeature extends AbstractCreateTaskFeature<ManualTask> {
+
+ public CreateManualTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected String getStencilImageId() {
+ return ImageProvider.IMG_16_MANUAL_TASK;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature
+ * #getFlowElementClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getManualTask();
+ }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/Messages.java
index dfb513bc..5c5cbf1a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.osgi.util.NLS;
@@ -6,9 +16,6 @@ public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.features.activity.task.messages"; //$NON-NLS-1$
public static String BusinessRuleTaskFeatureContainer_Description;
public static String BusinessRuleTaskFeatureContainer_Name;
- public static String CustomConnectionFeatureContainer_Description;
- public static String CustomElementFeatureContainer_Description;
- public static String CustomShapeFeatureContainer_Description;
public static String ManualTaskFeatureContainer_Description;
public static String ManualTaskFeatureContainer_Name;
public static String ReceiveTaskFeatureContainer_Description;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ReceiveTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ReceiveTaskFeatureContainer.java
index 86d3bede..a0aa03f2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ReceiveTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ReceiveTaskFeatureContainer.java
@@ -13,26 +13,13 @@
package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ManualTask;
-import org.eclipse.bpmn2.ParallelGateway;
import org.eclipse.bpmn2.ReceiveTask;
-import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.AddTaskFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.Image;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
public class ReceiveTaskFeatureContainer extends AbstractTaskFeatureContainer {
@@ -61,12 +48,20 @@ public class ReceiveTaskFeatureContainer extends AbstractTaskFeatureContainer {
protected String getStencilImageId() {
return ImageProvider.IMG_16_RECEIVE_TASK;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ReceiveTask.class;
+ }
}
public static class CreateReceiveTaskFeature extends AbstractCreateTaskFeature<ReceiveTask> {
public CreateReceiveTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.ReceiveTaskFeatureContainer_Name, Messages.ReceiveTaskFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ScriptTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ScriptTaskFeatureContainer.java
index 91bdbebd..3c722beb 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ScriptTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ScriptTaskFeatureContainer.java
@@ -13,17 +13,13 @@
package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ReceiveTask;
import org.eclipse.bpmn2.ScriptTask;
-import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateContext;
public class ScriptTaskFeatureContainer extends AbstractTaskFeatureContainer {
@@ -52,12 +48,20 @@ public class ScriptTaskFeatureContainer extends AbstractTaskFeatureContainer {
protected String getStencilImageId() {
return ImageProvider.IMG_16_SCRIPT_TASK;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ScriptTask.class;
+ }
}
public static class CreateScriptTaskFeature extends AbstractCreateTaskFeature<ScriptTask> {
public CreateScriptTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.ScriptTaskFeatureContainer_Name, Messages.ScriptTaskFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/SendTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/SendTaskFeatureContainer.java
index 64b7a66f..7d54990b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/SendTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/SendTaskFeatureContainer.java
@@ -13,25 +13,13 @@
package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ScriptTask;
import org.eclipse.bpmn2.SendTask;
-import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.AddTaskFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.Image;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
public class SendTaskFeatureContainer extends AbstractTaskFeatureContainer {
@@ -60,12 +48,20 @@ public class SendTaskFeatureContainer extends AbstractTaskFeatureContainer {
protected String getStencilImageId() {
return ImageProvider.IMG_16_SEND_TASK;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return SendTask.class;
+ }
}
public static class CreateSendTaskFeature extends AbstractCreateTaskFeature<SendTask> {
public CreateSendTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.SendTaskFeatureContainer_Name, Messages.SendTaskFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ServiceTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ServiceTaskFeatureContainer.java
index deb80481..80fdeae5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ServiceTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/ServiceTaskFeatureContainer.java
@@ -15,23 +15,12 @@ package org.eclipse.bpmn2.modeler.ui.features.activity.task;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.SendTask;
import org.eclipse.bpmn2.ServiceTask;
-import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.AddTaskFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
-import org.eclipse.graphiti.mm.algorithms.Image;
-import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
public class ServiceTaskFeatureContainer extends AbstractTaskFeatureContainer {
@@ -50,7 +39,7 @@ public class ServiceTaskFeatureContainer extends AbstractTaskFeatureContainer {
return new AddServiceTaskFeature(fp);
}
- public static class AddServiceTaskFeature extends AbstractAddDecoratedTaskFeature<SendTask> {
+ public static class AddServiceTaskFeature extends AbstractAddDecoratedTaskFeature<ServiceTask> {
public AddServiceTaskFeature(IFeatureProvider fp) {
super(fp);
@@ -60,12 +49,20 @@ public class ServiceTaskFeatureContainer extends AbstractTaskFeatureContainer {
protected String getStencilImageId() {
return ImageProvider.IMG_16_SERVICE_TASK;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ServiceTask.class;
+ }
}
public static class CreateServiceTaskFeature extends AbstractCreateTaskFeature<ServiceTask> {
public CreateServiceTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.ServiceTaskFeatureContainer_Name, Messages.ServiceTaskFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/TaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/TaskFeatureContainer.java
index b7031b74..d1d7b380 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/TaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/TaskFeatureContainer.java
@@ -35,15 +35,15 @@ public class TaskFeatureContainer extends AbstractTaskFeatureContainer {
return new CreateTaskFeature(fp);
}
- @Override
+ @Override
public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddTaskFeature<Task>(fp);
+ return new AddTaskFeature(fp);
}
public static class CreateTaskFeature extends AbstractCreateTaskFeature<Task> {
public CreateTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.TaskFeatureContainer_Name, Messages.TaskFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/UserTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/UserTaskFeatureContainer.java
index 10c3ec3d..05f1f949 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/UserTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/UserTaskFeatureContainer.java
@@ -1,71 +1,87 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- * All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Innar Made
- ******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.task;
-
-import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.UserTask;
-import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
-import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.graphiti.features.IAddFeature;
-import org.eclipse.graphiti.features.ICreateFeature;
-import org.eclipse.graphiti.features.IFeatureProvider;
-
-public class UserTaskFeatureContainer extends AbstractTaskFeatureContainer {
-
- @Override
- public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof UserTask;
- }
-
- @Override
- public ICreateFeature getCreateFeature(IFeatureProvider fp) {
- return new CreateUserTaskFeature(fp);
- }
-
- @Override
- public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddUserTaskFeature(fp);
- }
-
- public static class AddUserTaskFeature extends AbstractAddDecoratedTaskFeature<UserTask> {
- public AddUserTaskFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- protected String getStencilImageId() {
- return ImageProvider.IMG_16_USER_TASK;
- }
- }
-
- public static class CreateUserTaskFeature extends AbstractCreateTaskFeature<UserTask> {
-
- public CreateUserTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.UserTaskFeatureContainer_Name, Messages.UserTaskFeatureContainer_Description);
- }
-
- @Override
- protected String getStencilImageId() {
- return ImageProvider.IMG_16_USER_TASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
- */
- @Override
- public EClass getBusinessObjectClass() {
- return Bpmn2Package.eINSTANCE.getUserTask();
- }
- }
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.activity.task;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.UserTask;
+import org.eclipse.bpmn2.modeler.core.features.activity.task.AbstractCreateTaskFeature;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+public class UserTaskFeatureContainer extends AbstractTaskFeatureContainer {
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof UserTask;
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateUserTaskFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddUserTaskFeature(fp);
+ }
+
+ public static class AddUserTaskFeature extends AbstractAddDecoratedTaskFeature<UserTask> {
+
+ public AddUserTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected String getStencilImageId() {
+ return ImageProvider.IMG_16_USER_TASK;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#
+ * getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return UserTask.class;
+ }
+ }
+
+ public static class CreateUserTaskFeature extends AbstractCreateTaskFeature<UserTask> {
+
+ public CreateUserTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected String getStencilImageId() {
+ return ImageProvider.IMG_16_USER_TASK;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature
+ * #getFlowElementClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getUserTask();
+ }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/messages.properties
index 6a1cf9c7..e8034db7 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/task/messages.properties
@@ -1,8 +1,15 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
BusinessRuleTaskFeatureContainer_Description=Create Business Rule Task
BusinessRuleTaskFeatureContainer_Name=Business Rule Task
-CustomConnectionFeatureContainer_Description=Custom Connection
-CustomElementFeatureContainer_Description=Custom Task
-CustomShapeFeatureContainer_Description=Custom Shape
ManualTaskFeatureContainer_Description=Create Manual Task
ManualTaskFeatureContainer_Name=Manual Task
ReceiveTaskFeatureContainer_Description=Create Receive Task
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/CreateTextAnnotationFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/CreateTextAnnotationFeature.java
index e6da42f5..7036cd8e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/CreateTextAnnotationFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/CreateTextAnnotationFeature.java
@@ -20,11 +20,12 @@ import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class CreateTextAnnotationFeature extends AbstractCreateArtifactFeature<TextAnnotation> {
public CreateTextAnnotationFeature(IFeatureProvider fp) {
- super(fp, Messages.CreateTextAnnotationFeature_Name, Messages.CreateTextAnnotationFeature_Description);
+ super(fp);
}
@Override
@@ -36,9 +37,9 @@ public class CreateTextAnnotationFeature extends AbstractCreateArtifactFeature<T
public Object[] create(ICreateContext context) {
TextAnnotation ta = createBusinessObject(context);
- addGraphicalRepresentation(context, ta);
+ PictogramElement pe = addGraphicalRepresentation(context, ta);
- return new Object[] { ta };
+ return new Object[] { ta, pe };
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/GroupFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/GroupFeatureContainer.java
index c2b2b44a..1ee27cd6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/GroupFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/GroupFeatureContainer.java
@@ -15,23 +15,27 @@ package org.eclipse.bpmn2.modeler.ui.features.artifact;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Group;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.artifact.AbstractCreateArtifactFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.graphiti.datatypes.IDimension;
import org.eclipse.graphiti.datatypes.ILocation;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
@@ -52,13 +56,9 @@ import org.eclipse.graphiti.features.context.impl.MoveShapeContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.algorithms.MultiText;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
-import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
import org.eclipse.graphiti.mm.algorithms.styles.Point;
-import org.eclipse.graphiti.mm.pictograms.Anchor;
-import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
@@ -66,7 +66,6 @@ import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
-import org.eclipse.graphiti.ui.services.GraphitiUi;
public class GroupFeatureContainer extends BaseElementFeatureContainer {
protected final IGaService gaService = Graphiti.getGaService();
@@ -94,7 +93,31 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return new UpdateGroupFeature(fp);
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateGroupFeature(fp));
+ UpdateLabelFeature updateLabelFeature = new UpdateLabelFeature(fp) {
+
+ @Override
+ protected boolean hasLabel(BaseElement element) {
+ return element instanceof Group;
+ }
+
+ @Override
+ protected String getLabelString(BaseElement element) {
+ String name = ""; //$NON-NLS-1$
+ Group group = (Group) element;
+ if (group.getCategoryValueRef()!=null)
+ name = ExtendedPropertiesProvider.getTextValue(group.getCategoryValueRef());
+ return name;
+ }
+
+ @Override
+ protected LabelPosition getLabelPosition(AbstractText text) {
+ return LabelPosition.TOP;
+ }
+ };
+ multiUpdate.addFeature(updateLabelFeature);
+ return multiUpdate;
}
@Override
@@ -122,7 +145,7 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
return new ResizeGroupFeature(fp);
}
- public class AddGroupFeature extends AbstractBpmn2AddElementFeature<Group> {
+ public class AddGroupFeature extends AbstractBpmn2AddFeature<Group> {
public AddGroupFeature(IFeatureProvider fp) {
super(fp);
}
@@ -132,6 +155,10 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
return true;
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public PictogramElement add(IAddContext context) {
IGaService gaService = Graphiti.getGaService();
@@ -166,7 +193,7 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
// AnchorUtil.addFixedPointAnchors(containerShape, rect);
int xy[] = new int[] {0, 0, width, 0, width, height, 0, height, 0, 0};
Polyline rect = gaService.createPolyline(containerShape, xy);
- rect.setLineWidth(2);
+ rect.setLineWidth(3);
rect.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
rect.setLineStyle(LineStyle.DASHDOT);
gaService.setLocationAndSize(rect, x, y, width, height);
@@ -174,7 +201,7 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
AnchorUtil.addFixedPointAnchors(containerShape, rect);
//
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
// hook for subclasses to inject extra code
@@ -182,40 +209,28 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
((AddContext)context).setHeight(height);
decorateShape(context, containerShape, businessObject);
-
return containerShape;
}
-
- @Override
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#decorateShape(org.eclipse.graphiti.features.context.IAddContext, org.eclipse.graphiti.mm.pictograms.ContainerShape, org.eclipse.bpmn2.BaseElement)
+ */
protected void decorateShape(IAddContext context, ContainerShape containerShape, Group businessObject) {
- Shape textShape = peService.createShape(containerShape, false);
- String name = "";
- if (businessObject.getCategoryValueRef()!=null)
- name = ModelUtil.getDisplayName(businessObject.getCategoryValueRef());
- MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, name);
- StyleUtil.applyStyle(text, businessObject);
- IDimension size = GraphitiUi.getUiLayoutService().calculateTextSize("My", text.getFont());
- gaService.setLocationAndSize(text, 0, 0, context.getWidth(), size.getHeight()+4);
- text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
- text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
- link(textShape, businessObject);
}
-
- @Override
- public int getHeight() {
- return 200;
- }
-
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public int getWidth() {
- return 200;
+ public Class getBusinessObjectType() {
+ return Group.class;
}
}
public static class CreateGroupFeature extends AbstractCreateArtifactFeature<Group> {
public CreateGroupFeature(IFeatureProvider fp) {
- super(fp, Messages.GroupFeatureContainer_Name, Messages.GroupFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -239,21 +254,12 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
}
@Override
- public boolean canUpdate(IUpdateContext context) {
- return true;
- }
-
- @Override
public boolean update(IUpdateContext context) {
- super.update(context);
-
ContainerShape groupShape = (ContainerShape)context.getPictogramElement();
List<ContainerShape> containedShapes = FeatureSupport.findGroupedShapes(groupShape);
FeatureSupport.updateCategoryValues(getFeatureProvider(), containedShapes);
-
return true;
}
-
}
public static class MoveGroupFeature extends DefaultMoveBPMNShapeFeature {
@@ -279,8 +285,8 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
int y = context.getY() + loc.getY();
((MoveShapeContext)context).setX(x);
((MoveShapeContext)context).setY(y);
- ((MoveShapeContext)context).setDeltaX(x - preShapeX);
- ((MoveShapeContext)context).setDeltaY(y - preShapeY);
+ ((MoveShapeContext)context).setDeltaX(x - preMoveLoc.getX());
+ ((MoveShapeContext)context).setDeltaY(y - preMoveLoc.getY());
((MoveShapeContext)context).setTargetContainer(getDiagram());
}
@@ -350,7 +356,8 @@ public class GroupFeatureContainer extends BaseElementFeatureContainer {
}
}
- DIUtils.updateDIShape(context.getPictogramElement());
+ DIUtils.updateDIShape(groupShape);
+ FeatureSupport.updateLabel(getFeatureProvider(), groupShape, null);
List<ContainerShape> containedShapesAfterResize = FeatureSupport.findGroupedShapes(groupShape);
FeatureSupport.updateCategoryValues(getFeatureProvider(), containedShapesBeforeResize);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/Messages.java
index 1d057173..c0ea8a70 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.artifact;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java
new file mode 100644
index 00000000..0f671e7e
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/TextAnnotationFeatureContainer.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.artifact;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.TextAnnotation;
+import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.ShowDocumentationFeature;
+import org.eclipse.bpmn2.modeler.core.features.ShowPropertiesFeature;
+import org.eclipse.bpmn2.modeler.core.features.artifact.AddTextAnnotationFeature;
+import org.eclipse.bpmn2.modeler.core.features.artifact.DirectEditTextAnnotationFeature;
+import org.eclipse.bpmn2.modeler.core.features.artifact.LayoutTextAnnotationFeature;
+import org.eclipse.bpmn2.modeler.core.features.artifact.UpdateTextAnnotationFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IDirectEditingFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.context.impl.MoveShapeContext;
+import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.algorithms.styles.Point;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+public class TextAnnotationFeatureContainer extends LabelFeatureContainer {
+
+ @Override
+ public Object getApplyObject(IContext context) {
+ return BusinessObjectUtil.getBusinessObject(context, TextAnnotation.class);
+ }
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof TextAnnotation;
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateTextAnnotationFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddTextAnnotationFeature(fp);
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateTextAnnotationFeature(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp) {
+
+ @Override
+ protected boolean hasLabel(BaseElement element) {
+ return element instanceof TextAnnotation;
+ }
+
+ @Override
+ protected String getLabelString(BaseElement element) {
+ if (element instanceof TextAnnotation)
+ return ((TextAnnotation)element).getText();
+ return "";
+ }
+ @Override
+ protected Rectangle getLabelBounds(PictogramElement pe, boolean isAddingLabel, Point offset) {
+ Rectangle bounds = super.getLabelBounds(pe, isAddingLabel, offset);
+ if (bounds!=null && !isAddingLabel)
+ bounds.setY( bounds.y - LabelFeatureContainer.LABEL_MARGIN/2);
+ return bounds;
+ }
+
+ @Override
+ protected int getLabelWidth(AbstractText text) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(text);
+ return pe.getGraphicsAlgorithm().getWidth() - 2*LabelFeatureContainer.LABEL_MARGIN;
+ }
+
+ @Override
+ protected int getLabelHeight(AbstractText text) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(text);
+ return pe.getGraphicsAlgorithm().getHeight() - LabelFeatureContainer.LABEL_MARGIN;
+ }
+
+ @Override
+ protected LabelPosition getLabelPosition(AbstractText text) {
+ return LabelPosition.TOP;
+ }
+ });
+ return multiUpdate;
+ }
+
+ @Override
+ public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
+ return new DirectEditTextAnnotationFeature(fp);
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return new LayoutTextAnnotationFeature(fp);
+ }
+
+ @Override
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new DefaultMoveBPMNShapeFeature(fp) {
+ @Override
+ public boolean canMoveShape(IMoveShapeContext context) {
+ return FeatureSupport.isValidArtifactTarget(context);
+ }
+
+ @Override
+ protected void internalMove(IMoveShapeContext context) {
+ if (FeatureSupport.isLabelShape(context.getPictogramElement())) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(context);
+ MoveShapeContext newContext = new MoveShapeContext((Shape)pe);
+ newContext.setDeltaX(context.getDeltaX());
+ newContext.setDeltaY(context.getDeltaY());
+ newContext.setX(context.getX());
+ newContext.setY(context.getY());
+ newContext.setSourceContainer(context.getSourceContainer());
+ newContext.setTargetContainer(context.getTargetContainer());
+ context = newContext;
+ }
+ super.internalMove(context);
+ }
+
+ };
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new DefaultResizeBPMNShapeFeature(fp) {
+ public void resizeShape(IResizeShapeContext context) {
+ if (FeatureSupport.isLabelShape(context.getPictogramElement())) {
+ PictogramElement pe = FeatureSupport.getLabelOwner(context);
+ ResizeShapeContext newContext = new ResizeShapeContext((Shape)pe);
+ newContext.setDirection(context.getDirection());
+ newContext.setHeight(context.getHeight());
+ newContext.setWidth(context.getWidth());
+ newContext.setX(context.getX());
+ newContext.setY(context.getY());
+ context = newContext;
+ }
+ super.resizeShape(context);
+ }
+ };
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new AbstractDefaultDeleteFeature(fp);
+ }
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+// return null;
+ return new ICustomFeature[] {
+ new ShowDocumentationFeature(fp),
+ new ShowPropertiesFeature(fp)
+ };
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties
new file mode 100644
index 00000000..8252c008
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/artifact/messages.properties
@@ -0,0 +1,14 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+CreateTextAnnotationFeature_Description=Create Annotation
+CreateTextAnnotationFeature_Name=Annotation
+GroupFeatureContainer_Description=Create Group
+GroupFeatureContainer_Name=Group
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCallGlobalTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCallGlobalTaskFeatureContainer.java
new file mode 100644
index 00000000..6cdaf54a
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCallGlobalTaskFeatureContainer.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.CallActivity;
+import org.eclipse.bpmn2.GlobalTask;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.AddExpandableActivityFeature;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.services.Graphiti;
+
+
+public abstract class AbstractCallGlobalTaskFeatureContainer<T extends GlobalTask> extends CallActivityFeatureContainer {
+
+ @Override
+ public abstract ICreateFeature getCreateFeature(IFeatureProvider fp);
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddCallGlobalTaskFeature(fp);
+ }
+
+ public static class AddCallGlobalTaskFeature extends AddExpandableActivityFeature<CallActivity> {
+
+ /**
+ * @param fp
+ */
+ public AddCallGlobalTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+ @Override
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, CallActivity businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
+ Graphiti.getPeService().setPropertyValue(containerShape, CALL_ACTIVITY_REF_PROPERTY,
+ getCallableElementStringValue(businessObject.getCalledElementRef()));
+ RoundedRectangle rect = (RoundedRectangle)getGraphicsAlgorithm(containerShape);
+ rect.setLineWidth(4);
+ }
+
+ @Override
+ protected int getMarkerContainerOffset() {
+ return MARKER_OFFSET;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return CallActivity.class;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCreateCallGlobalTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCreateCallGlobalTaskFeature.java
new file mode 100644
index 00000000..dc41a808
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/AbstractCreateCallGlobalTaskFeature.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.Bpmn2Factory;
+import org.eclipse.bpmn2.CallActivity;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.GlobalTask;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.CallActivityFeatureContainer.CreateCallActivityFeature;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateContext;
+
+public abstract class AbstractCreateCallGlobalTaskFeature<T extends GlobalTask> extends CreateCallActivityFeature {
+
+ /**
+ * @param fp
+ */
+ public AbstractCreateCallGlobalTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public CallActivity createBusinessObject(ICreateContext context) {
+ CallActivity callActivity = super.createBusinessObject(context);
+ Definitions definitions = ModelUtil.getDefinitions(callActivity );
+ T task = (T) Bpmn2Factory.eINSTANCE.create(getFeatureClass());
+ definitions.getRootElements().add(task);
+ ModelUtil.setID(task);
+ task.setName( ModelUtil.toCanonicalString(task.getId()));
+ callActivity.setCalledElementRef(task);
+ callActivity.setName("Call "+task.getName());
+
+ return callActivity;
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_CALL_ACTIVITY;
+ }
+
+ public abstract EClass getFeatureClass();
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java
new file mode 100644
index 00000000..88d4edf6
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.CallActivity;
+import org.eclipse.bpmn2.CallableElement;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.GlobalBusinessRuleTask;
+import org.eclipse.bpmn2.GlobalManualTask;
+import org.eclipse.bpmn2.GlobalScriptTask;
+import org.eclipse.bpmn2.GlobalTask;
+import org.eclipse.bpmn2.GlobalUserTask;
+import org.eclipse.bpmn2.Process;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.activity.AbstractCreateExpandableFlowNodeFeature;
+import org.eclipse.bpmn2.modeler.core.features.activity.task.DirectEditTaskFeature;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.bpmn2.modeler.ui.features.activity.AbstractActivityFeatureContainer;
+import org.eclipse.bpmn2.modeler.ui.features.activity.DeleteActivityFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.LayoutExpandableActivityFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.Messages;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.AbstractCallGlobalTaskFeatureContainer.AddCallGlobalTaskFeature;
+import org.eclipse.bpmn2.modeler.ui.features.choreography.ShowDiagramPageFeature;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IDirectEditingFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IDeleteContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.Image;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+
+public class CallActivityFeatureContainer extends AbstractActivityFeatureContainer {
+
+ protected static final int MARKER_OFFSET = 4;
+ protected static final String CALL_ACTIVITY_REF_PROPERTY = "call.activity.ref"; //$NON-NLS-1$
+ protected static final String GLOBAL_TASK_SHAPE_PROPERTY = "global.task.shape"; //$NON-NLS-1$
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && (o instanceof CallActivity || o instanceof GlobalTask);
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateCallActivityFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddCallGlobalTaskFeature(fp);
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new DeleteActivityFeature(fp) {
+ @Override
+ public void delete(final IDeleteContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(pe, CallActivity.class);
+ CallableElement calledActivity = callActivity.getCalledElementRef();
+ // if there are no other references to this called element, delete it from the model
+ boolean canDeleteCalledActivity = (calledActivity!=null);
+ if (canDeleteCalledActivity) {
+ Definitions definitions = ModelUtil.getDefinitions(callActivity);
+ TreeIterator<EObject> iter = definitions.eAllContents();
+ while (iter.hasNext() && canDeleteCalledActivity) {
+ EObject o = iter.next();
+ if (o!=callActivity && o instanceof BaseElement) {
+ for (EObject cr : o.eCrossReferences()) {
+ if (cr == calledActivity) {
+ canDeleteCalledActivity = false;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ super.delete(context);
+
+ if (canDeleteCalledActivity) {
+ // if the called activity is a Process, it may have its own
+ // diagram page which needs to be removed as well.
+ BPMNDiagram bpmnDiagram = DIUtils.findBPMNDiagram(calledActivity);
+ if (bpmnDiagram != null) {
+ DIUtils.deleteDiagram(getDiagramBehavior(), bpmnDiagram);
+ }
+ EcoreUtil.delete(calledActivity, true);
+ }
+ }
+ };
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return new LayoutExpandableActivityFeature(fp) {
+ protected int getMarkerContainerOffset() {
+ return MARKER_OFFSET;
+ }
+ };
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ IUpdateFeature updateFeature = super.getUpdateFeature(fp);
+ MultiUpdateFeature multiUpdate;
+ if (updateFeature instanceof MultiUpdateFeature)
+ multiUpdate = (MultiUpdateFeature)updateFeature;
+ else
+ multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateCallActivityFeature(fp));
+ return multiUpdate;
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new DefaultResizeBPMNShapeFeature(fp);
+ }
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+ ICustomFeature[] superFeatures = super.getCustomFeatures(fp);
+ ICustomFeature[] thisFeatures = new ICustomFeature[1 + superFeatures.length];
+ thisFeatures[0] = new ShowDiagramPageFeature(fp);
+ for (int superIndex=0, thisIndex=1; superIndex<superFeatures.length; ++superIndex) {
+ thisFeatures[thisIndex++] = superFeatures[superIndex];
+ }
+ return thisFeatures;
+ }
+
+ public static class CreateCallActivityFeature extends AbstractCreateExpandableFlowNodeFeature<CallActivity> {
+
+ // NOTE: Even though the Call Activity is an expandable figure, the contents for its "innards"
+ // are (usually) defined somewhere else, so it doesn't make much sense to be able to expand it in the
+ // same sense that a SubProcess would be expanded and rendered. When the "expand" button is clicked
+ // we will locate the process where this thing is defined (if possible) and open an
+ // editor to display its contents.
+
+ public CreateCallActivityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_CALL_ACTIVITY;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getCallActivity();
+ }
+ }
+
+ protected class UpdateCallActivityFeature extends AbstractUpdateBaseElementFeature<CallActivity> {
+
+ public UpdateCallActivityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ IPeService peService = Graphiti.getPeService();
+ PictogramElement element = context.getPictogramElement();
+ String property = peService.getPropertyValue(element, CALL_ACTIVITY_REF_PROPERTY);
+ if (property == null) {
+ return Reason.createFalseReason();
+ }
+ CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ CallActivity.class);
+ String value = getCallableElementStringValue(callActivity.getCalledElementRef());
+ boolean changed = !value.equals(property);
+ return changed ? Reason.createTrueReason("Called Activity") : Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ IPeService peService = Graphiti.getPeService();
+ IGaService gaService = Graphiti.getGaService();
+
+ ContainerShape container = (ContainerShape) context.getPictogramElement();
+ CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ CallActivity.class);
+
+ Shape globalTaskShape = ShapeDecoratorUtil.getContainedShape(container, GLOBAL_TASK_SHAPE_PROPERTY);
+
+ if (callActivity.getCalledElementRef() == null) {
+ ShapeDecoratorUtil.hideActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ if (globalTaskShape != null) {
+ peService.deletePictogramElement(globalTaskShape);
+ }
+ }
+
+ else if (callActivity.getCalledElementRef() instanceof GlobalTask) {
+ ShapeDecoratorUtil.hideActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ GlobalTask globalTask = (GlobalTask) callActivity.getCalledElementRef();
+ String imageId = getImageId(globalTask);
+ if (imageId != null) {
+ if (globalTaskShape == null) {
+ globalTaskShape = peService.createShape(container, false);
+ peService.setPropertyValue(globalTaskShape, GLOBAL_TASK_SHAPE_PROPERTY, Boolean.toString(true));
+ }
+ Image image = gaService.createImage(globalTaskShape, imageId);
+ gaService.setLocationAndSize(image, MARKER_OFFSET + 2, MARKER_OFFSET + 2, 16, 16);
+ }
+ else if (globalTaskShape != null) {
+ peService.deletePictogramElement(globalTaskShape);
+ }
+ }
+
+ else if (callActivity.getCalledElementRef() instanceof Process) {
+ if (globalTaskShape != null) {
+ peService.deletePictogramElement(globalTaskShape);
+ }
+ ShapeDecoratorUtil.showActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ }
+
+ peService.setPropertyValue(container, CALL_ACTIVITY_REF_PROPERTY,
+ getCallableElementStringValue(callActivity.getCalledElementRef()));
+ return true;
+ }
+ }
+
+ protected static String getCallableElementStringValue(CallableElement element) {
+ if (element == null) {
+ return "null"; //$NON-NLS-1$
+ }
+ return element.getClass().getSimpleName();
+ }
+
+ protected String getImageId(GlobalTask task) {
+ if (task instanceof GlobalBusinessRuleTask) {
+ return ImageProvider.IMG_16_BUSINESS_RULE_TASK;
+ } else if (task instanceof GlobalManualTask) {
+ return ImageProvider.IMG_16_MANUAL_TASK;
+ } else if (task instanceof GlobalScriptTask) {
+ return ImageProvider.IMG_16_SCRIPT_TASK;
+ } else if (task instanceof GlobalUserTask) {
+ return ImageProvider.IMG_16_USER_TASK;
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public IDirectEditingFeature getDirectEditingFeature(IFeatureProvider fp) {
+ return new DirectEditTaskFeature(fp);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CallActivityFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java.orig
index d2105cc3..53d2e94e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CallActivityFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java.orig
@@ -10,7 +10,7 @@
*
* @author Innar Made
******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.features.activity.subprocess;
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
@@ -25,17 +25,25 @@ import org.eclipse.bpmn2.GlobalUserTask;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CallActivityFeatureContainer.java
import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java
import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.AbstractCreateExpandableFlowNodeFeature;
import org.eclipse.bpmn2.modeler.core.features.activity.task.DirectEditTaskFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.bpmn2.modeler.ui.features.activity.AbstractActivityFeatureContainer;
import org.eclipse.bpmn2.modeler.ui.features.activity.DeleteActivityFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.LayoutExpandableActivityFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.Messages;
+import org.eclipse.bpmn2.modeler.ui.features.callactivity.AbstractCallGlobalTaskFeatureContainer.AddCallGlobalTaskFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.ShowDiagramPageFeature;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EClass;
@@ -50,16 +58,11 @@ import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IDeleteContext;
import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
-import org.eclipse.graphiti.mm.algorithms.AbstractText;
-import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.Image;
-import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
@@ -69,13 +72,13 @@ import org.eclipse.graphiti.services.IPeService;
public class CallActivityFeatureContainer extends AbstractActivityFeatureContainer {
- private static final int MARKER_OFFSET = 4;
- private static final String CALL_ACTIVITY_REF_PROPERTY = "call.activity.ref"; //$NON-NLS-1$
- private static final String GLOBAL_TASK_SHAPE_PROPERTY = "global.task.shape"; //$NON-NLS-1$
+ protected static final int MARKER_OFFSET = 4;
+ protected static final String CALL_ACTIVITY_REF_PROPERTY = "call.activity.ref"; //$NON-NLS-1$
+ protected static final String GLOBAL_TASK_SHAPE_PROPERTY = "global.task.shape"; //$NON-NLS-1$
@Override
public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof CallActivity;
+ return super.canApplyTo(o) && (o instanceof CallActivity || o instanceof GlobalTask);
}
@Override
@@ -85,33 +88,9 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
@Override
public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddExpandableActivityFeature<CallActivity>(fp) {
- @Override
- protected void decorateShape(IAddContext context, ContainerShape containerShape, CallActivity businessObject) {
- super.decorateShape(context, containerShape, businessObject);
- Graphiti.getPeService().setPropertyValue(containerShape, CALL_ACTIVITY_REF_PROPERTY,
- getCallableElementStringValue(businessObject.getCalledElementRef()));
- RoundedRectangle rect = (RoundedRectangle)getGraphicsAlgorithm(containerShape);
- rect.setLineWidth(4);
- }
-
- @Override
- protected int getMarkerContainerOffset() {
- return MARKER_OFFSET;
- }
-
- @Override
- public int getWidth() {
- return GraphicsUtil.getActivitySize(getDiagram()).getWidth();
- }
-
- @Override
- public int getHeight() {
- return GraphicsUtil.getActivitySize(getDiagram()).getHeight();
- }
- };
+ return new AddCallGlobalTaskFeature(fp);
}
-
+
@Override
public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
return new DeleteActivityFeature(fp) {
@@ -159,16 +138,6 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
protected int getMarkerContainerOffset() {
return MARKER_OFFSET;
}
-
- @Override
- protected boolean layoutHook(Shape shape, GraphicsAlgorithm ga, Object bo, int newWidth, int newHeight) {
- if (bo != null && ga instanceof AbstractText) {
- Graphiti.getGaService().setLocationAndSize(ga, 5, 5, newWidth - 10, newHeight);
- return true;
- }
- return false;
- }
-
};
}
@@ -180,7 +149,7 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
multiUpdate = (MultiUpdateFeature)updateFeature;
else
multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateCallActivityFeature(fp));
+ multiUpdate.addFeature(new UpdateCallActivityFeature(fp));
return multiUpdate;
}
@@ -205,11 +174,11 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
// NOTE: Even though the Call Activity is an expandable figure, the contents for its "innards"
// are (usually) defined somewhere else, so it doesn't make much sense to be able to expand it in the
// same sense that a SubProcess would be expanded and rendered. When the "expand" button is clicked
- // we should probably locate the process where this thing is defined (if possible) and open an
+ // we will locate the process where this thing is defined (if possible) and open an
// editor to display its contents.
public CreateCallActivityFeature(IFeatureProvider fp) {
- super(fp, Messages.CallActivityFeatureContainer_Name, Messages.CallActivityFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -226,26 +195,26 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
}
}
- private class UpdateCallActivityFeature extends AbstractUpdateFeature {
+ protected class UpdateCallActivityFeature extends AbstractUpdateBaseElementFeature<CallActivity> {
public UpdateCallActivityFeature(IFeatureProvider fp) {
super(fp);
}
@Override
- public boolean canUpdate(IUpdateContext context) {
- CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- CallActivity.class);
- return callActivity != null && context.getPictogramElement() instanceof ContainerShape;
- }
-
- @Override
public IReason updateNeeded(IUpdateContext context) {
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/activity/subprocess/CallActivityFeatureContainer.java
if (context.getProperty(ContextConstants.BUSINESS_OBJECT) instanceof EObject) {
// if the UpdateContext has a "businessObject" property, then this update is needed
// as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
return Reason.createTrueReason("Initial update");
}
+=======
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallActivityFeatureContainer.java
IPeService peService = Graphiti.getPeService();
PictogramElement element = context.getPictogramElement();
String property = peService.getPropertyValue(element, CALL_ACTIVITY_REF_PROPERTY);
@@ -256,7 +225,7 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
CallActivity.class);
String value = getCallableElementStringValue(callActivity.getCalledElementRef());
boolean changed = !value.equals(property);
- return changed ? Reason.createTrueReason() : Reason.createFalseReason();
+ return changed ? Reason.createTrueReason("Called Activity") : Reason.createFalseReason();
}
@Override
@@ -268,34 +237,37 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
CallActivity.class);
- Shape globalTaskShape = GraphicsUtil.getContainedShape(container, GLOBAL_TASK_SHAPE_PROPERTY);
+ Shape globalTaskShape = ShapeDecoratorUtil.getContainedShape(container, GLOBAL_TASK_SHAPE_PROPERTY);
if (callActivity.getCalledElementRef() == null) {
- GraphicsUtil.hideActivityMarker(container, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
+ ShapeDecoratorUtil.hideActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
if (globalTaskShape != null) {
peService.deletePictogramElement(globalTaskShape);
}
}
else if (callActivity.getCalledElementRef() instanceof GlobalTask) {
- GraphicsUtil.hideActivityMarker(container, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
- GlobalTask t = (GlobalTask) callActivity.getCalledElementRef();
- if (globalTaskShape == null) {
- globalTaskShape = peService.createShape(container, false);
- peService.setPropertyValue(globalTaskShape, GLOBAL_TASK_SHAPE_PROPERTY, Boolean.toString(true));
- }
- String imageId = getImageId(t);
+ ShapeDecoratorUtil.hideActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ GlobalTask globalTask = (GlobalTask) callActivity.getCalledElementRef();
+ String imageId = getImageId(globalTask);
if (imageId != null) {
+ if (globalTaskShape == null) {
+ globalTaskShape = peService.createShape(container, false);
+ peService.setPropertyValue(globalTaskShape, GLOBAL_TASK_SHAPE_PROPERTY, Boolean.toString(true));
+ }
Image image = gaService.createImage(globalTaskShape, imageId);
gaService.setLocationAndSize(image, MARKER_OFFSET + 2, MARKER_OFFSET + 2, 16, 16);
}
+ else if (globalTaskShape != null) {
+ peService.deletePictogramElement(globalTaskShape);
+ }
}
else if (callActivity.getCalledElementRef() instanceof Process) {
if (globalTaskShape != null) {
peService.deletePictogramElement(globalTaskShape);
}
- GraphicsUtil.showActivityMarker(container, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
+ ShapeDecoratorUtil.showActivityMarker(container, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
}
peService.setPropertyValue(container, CALL_ACTIVITY_REF_PROPERTY,
@@ -304,14 +276,14 @@ public class CallActivityFeatureContainer extends AbstractActivityFeatureContain
}
}
- private String getCallableElementStringValue(CallableElement element) {
+ protected static String getCallableElementStringValue(CallableElement element) {
if (element == null) {
return "null"; //$NON-NLS-1$
}
return element.getClass().getSimpleName();
}
- private String getImageId(GlobalTask task) {
+ protected String getImageId(GlobalTask task) {
if (task instanceof GlobalBusinessRuleTask) {
return ImageProvider.IMG_16_BUSINESS_RULE_TASK;
} else if (task instanceof GlobalManualTask) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalBusinessRuleTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalBusinessRuleTaskFeatureContainer.java
new file mode 100644
index 00000000..29e8969b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalBusinessRuleTaskFeatureContainer.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.GlobalBusinessRuleTask;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+
+public class CallGlobalBusinessRuleTaskFeatureContainer extends AbstractCallGlobalTaskFeatureContainer<GlobalBusinessRuleTask> {
+
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateCallGlobalBusinessRuleTaskFeature(fp);
+ }
+
+ public class CreateCallGlobalBusinessRuleTaskFeature extends AbstractCreateCallGlobalTaskFeature<GlobalBusinessRuleTask> {
+
+ /**
+ * @param fp
+ */
+ public CreateCallGlobalBusinessRuleTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_CALL_GLOBAL_BUSINESS_RULE_TASK;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getFeatureClass()
+ */
+ @Override
+ public EClass getFeatureClass() {
+ return Bpmn2Package.eINSTANCE.getGlobalBusinessRuleTask();
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalManualTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalManualTaskFeatureContainer.java
new file mode 100644
index 00000000..c828fbda
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalManualTaskFeatureContainer.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.GlobalManualTask;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+
+public class CallGlobalManualTaskFeatureContainer extends AbstractCallGlobalTaskFeatureContainer<GlobalManualTask> {
+
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateCallGlobalManualTaskFeature(fp);
+ }
+
+ public class CreateCallGlobalManualTaskFeature extends AbstractCreateCallGlobalTaskFeature<GlobalManualTask> {
+
+ /**
+ * @param fp
+ */
+ public CreateCallGlobalManualTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_CALL_GLOBAL_MANUAL_TASK;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getFeatureClass()
+ */
+ @Override
+ public EClass getFeatureClass() {
+ return Bpmn2Package.eINSTANCE.getGlobalManualTask();
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalScriptTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalScriptTaskFeatureContainer.java
new file mode 100644
index 00000000..d3d8ef22
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalScriptTaskFeatureContainer.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.GlobalBusinessRuleTask;
+import org.eclipse.bpmn2.GlobalScriptTask;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+
+public class CallGlobalScriptTaskFeatureContainer extends AbstractCallGlobalTaskFeatureContainer<GlobalScriptTask> {
+
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateCallGlobalScriptTaskFeature(fp);
+ }
+
+ public class CreateCallGlobalScriptTaskFeature extends AbstractCreateCallGlobalTaskFeature<GlobalScriptTask> {
+
+ /**
+ * @param fp
+ */
+ public CreateCallGlobalScriptTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_CALL_GLOBAL_SCRIPT_TASK;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getFeatureClass()
+ */
+ @Override
+ public EClass getFeatureClass() {
+ return Bpmn2Package.eINSTANCE.getGlobalScriptTask();
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalTaskFeatureContainer.java
new file mode 100644
index 00000000..7d7c12da
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalTaskFeatureContainer.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.GlobalTask;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+
+public class CallGlobalTaskFeatureContainer extends AbstractCallGlobalTaskFeatureContainer<GlobalTask> {
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateCallGlobalTaskFeature(fp);
+ }
+
+ public class CreateCallGlobalTaskFeature extends AbstractCreateCallGlobalTaskFeature<GlobalTask> {
+
+ /**
+ * @param fp
+ */
+ public CreateCallGlobalTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_CALL_GLOBAL_TASK;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getFeatureClass()
+ */
+ @Override
+ public EClass getFeatureClass() {
+ return Bpmn2Package.eINSTANCE.getGlobalTask();
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalUserTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalUserTaskFeatureContainer.java
new file mode 100644
index 00000000..2fd2cf01
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/callactivity/CallGlobalUserTaskFeatureContainer.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.callactivity;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.GlobalManualTask;
+import org.eclipse.bpmn2.GlobalUserTask;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+
+
+public class CallGlobalUserTaskFeatureContainer extends AbstractCallGlobalTaskFeatureContainer<GlobalUserTask> {
+
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateCallGlobalUserTaskFeature(fp);
+ }
+
+ public static class CreateCallGlobalUserTaskFeature extends AbstractCreateCallGlobalTaskFeature<GlobalUserTask> {
+
+ /**
+ * @param fp
+ */
+ public CreateCallGlobalUserTaskFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_CALL_GLOBAL_USER_TASK;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getFeatureClass()
+ */
+ @Override
+ public EClass getFeatureClass() {
+ return Bpmn2Package.eINSTANCE.getGlobalUserTask();
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java
new file mode 100644
index 00000000..94faad51
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractChoreographyFeatureContainer.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.LayoutChoreographyFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.UpdateChoreographyInitiatingParticipantFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.UpdateChoreographyLabelFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.UpdateChoreographyParticipantBandsFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.UpdateChoreographyParticipantRefsFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.context.IMoveContext;
+import org.eclipse.graphiti.features.context.IPictogramElementContext;
+import org.eclipse.graphiti.features.context.IResizeContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+public abstract class AbstractChoreographyFeatureContainer extends BaseElementFeatureContainer {
+
+ @Override
+ public Object getApplyObject(IContext context) {
+ Object o = super.getApplyObject(context);
+ if (
+ context instanceof IUpdateContext ||
+ context instanceof ILayoutContext ||
+ context instanceof IMoveContext ||
+ context instanceof IResizeContext
+ ) {
+ PictogramElement pe = ((IPictogramElementContext)context).getPictogramElement();
+ if (FeatureSupport.isLabelShape(pe))
+ pe = (PictogramElement) pe.eContainer();
+ if (FeatureSupport.isChoreographyParticipantBand(pe))
+ return o;
+ }
+ if (o instanceof ChoreographyActivity)
+ return o;
+ return null;
+ }
+
+ @Override
+ public MultiUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateChoreographyParticipantRefsFeature(fp));
+ multiUpdate.addFeature(new UpdateChoreographyInitiatingParticipantFeature(fp));
+ multiUpdate.addFeature(new UpdateChoreographyParticipantBandsFeature(fp));
+ multiUpdate.addFeature(new UpdateChoreographyMarkerFeature(fp));
+ // This UpdateLabelFeature is called for both the ChoreographyActivity label
+ // as well as the Participant Bands labels.
+ multiUpdate.addFeature(new UpdateChoreographyLabelFeature(fp));
+ return multiUpdate;
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return new LayoutChoreographyFeature(fp);
+ }
+
+ @Override
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new MoveChoreographyFeature(fp);
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new ResizeChoreographyFeature(fp);
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new AbstractDefaultDeleteFeature(fp);
+ }
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+ ICustomFeature[] superFeatures = super.getCustomFeatures(fp);
+ ICustomFeature[] thisFeatures = new ICustomFeature[1 + superFeatures.length];
+ int i;
+ for (i=0; i<superFeatures.length; ++i)
+ thisFeatures[i] = superFeatures[i];
+ thisFeatures[i++] = new AddChoreographyParticipantFeature(fp);
+ return thisFeatures;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractCreateChoreographyActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractCreateChoreographyActivityFeature.java
new file mode 100644
index 00000000..14aa5fe2
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AbstractCreateChoreographyActivityFeature.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+/**
+ *
+ */
+public abstract class AbstractCreateChoreographyActivityFeature<T extends ChoreographyActivity> extends AbstractCreateFlowElementFeature<T> {
+
+ /**
+ * @param fp
+ */
+ public AbstractCreateChoreographyActivityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canCreate(ICreateContext context) {
+ return context.getTargetContainer() instanceof Diagram;
+ }
+
+ @Override
+ public Object[] create(ICreateContext context) {
+ ChoreographyActivity element = createBusinessObject(context);
+ if (element!=null) {
+ changesDone = true;
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
+ BPMNDiagram bpmnDiagram = BusinessObjectUtil.getFirstElementOfType(context.getTargetContainer(), BPMNDiagram.class);
+ mh.addChoreographyActivity(bpmnDiagram, element);
+ PictogramElement pe = null;
+ pe = addGraphicalRepresentation(context, element);
+ return new Object[] { element, pe };
+ }
+ else
+ changesDone = false;
+ return new Object[] { null };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getStencilImageId()
+ */
+ @Override
+ public abstract String getStencilImageId();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
+ */
+ @Override
+ public abstract EClass getBusinessObjectClass();
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddCallChoreographyFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddCallChoreographyFeature.java
index 3969afef..caee6c53 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddCallChoreographyFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddCallChoreographyFeature.java
@@ -34,13 +34,17 @@ public class AddCallChoreographyFeature extends AddChoreographyActivityFeature<C
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, CallChoreography businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
RoundedRectangle rect = (RoundedRectangle)getGraphicsAlgorithm(containerShape);
- rect.setLineWidth(2);
+ rect.setLineWidth(4);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- protected boolean isShowNames() {
- return false;
+ public Class getBusinessObjectType() {
+ // TODO Auto-generated method stub
+ return CallChoreography.class;
}
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java
new file mode 100644
index 00000000..15c15294
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyActivityFeature.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.algorithms.RoundedRectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+
+public abstract class AddChoreographyActivityFeature<T extends ChoreographyActivity>
+ extends AbstractBpmn2AddFeature<T> {
+
+ protected final IGaService gaService = Graphiti.getGaService();
+ protected final IPeService peService = Graphiti.getPeService();
+
+ public AddChoreographyActivityFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return context.getTargetContainer().equals(getDiagram());
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ T businessObject = getBusinessObject(context);
+
+ int x = context.getX();
+ int y = context.getY();
+ int width = this.getWidth(context);
+ int height = this.getHeight(context);
+
+ ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
+ Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
+ gaService.setLocationAndSize(invisibleRect, x, y, width, height);
+
+ Shape rectShape = peService.createShape(containerShape, false);
+ RoundedRectangle rect = gaService.createRoundedRectangle(rectShape, 5, 5);
+ StyleUtil.applyStyle(rect, businessObject);
+ gaService.setLocationAndSize(rect, 0, 0, width, height);
+ link(rectShape, businessObject);
+
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ if (isImport) {
+ List<Participant> participants = businessObject.getParticipantRefs();
+ List<BPMNShape> allShapes = ModelUtil.getAllObjectsOfType(businessObject.eResource(), BPMNShape.class);
+ List<BPMNShape> participantBandShapes = new ArrayList<BPMNShape>();
+ BPMNShape choreoBpmnShape = null;
+
+ for (BPMNShape bpmnShape : allShapes) {
+ if (businessObject.equals(bpmnShape.getBpmnElement())) {
+ choreoBpmnShape = bpmnShape;
+ break;
+ }
+ }
+
+ for (BPMNShape bpmnShape : allShapes) {
+ if (participants.contains(bpmnShape.getBpmnElement())
+ && choreoBpmnShape.equals(bpmnShape.getChoreographyActivityShape())) {
+ participantBandShapes.add(bpmnShape);
+ }
+ }
+ }
+
+ ShapeDecoratorUtil.hideActivityMarker(containerShape, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+
+ if (businessObject instanceof ChoreographyTask) {
+ peService.setPropertyValue(containerShape, ChoreographyUtil.MESSAGE_REF_IDS,
+ ChoreographyUtil.getMessageRefIds((ChoreographyTask) businessObject));
+ }
+
+ peService.createChopboxAnchor(containerShape);
+ createDIShape(containerShape, businessObject, !isImport);
+
+ decorateShape(context, containerShape, businessObject);
+
+ AnchorUtil.addFixedPointAnchors(containerShape, rect);
+
+ return containerShape;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyMessageFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyMessageFeature.java
index 84c00967..9990e81f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyMessageFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyMessageFeature.java
@@ -13,7 +13,6 @@
package org.eclipse.bpmn2.modeler.ui.features.choreography;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -24,10 +23,11 @@ import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IContext;
@@ -148,68 +148,67 @@ public class AddChoreographyMessageFeature extends AbstractCustomFeature {
PictogramElement pe = pes[0];
Object bo = getBusinessObjectForPictogramElement(pe);
if (pe instanceof ContainerShape && bo instanceof Participant) {
- try {
- ModelHandler mh = ModelHandler.getInstance(getDiagram());
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
- ContainerShape containerShape = (ContainerShape)pe;
- Participant participant = (Participant)bo;
+ ContainerShape containerShape = (ContainerShape)pe;
+ Participant participant = (Participant)bo;
+
+ Object parent = getBusinessObjectForPictogramElement(containerShape.getContainer());
+ if (parent instanceof ChoreographyTask) {
+ ChoreographyTask ct=(ChoreographyTask)parent;
+
+ Message message = null;
+ List<Message> messageList = new ArrayList<Message>();
+ message = mh.create(Message.class);
+ message.setName(message.getId());
- Object parent = getBusinessObjectForPictogramElement(containerShape.getContainer());
- if (parent instanceof ChoreographyTask) {
- ChoreographyTask ct=(ChoreographyTask)parent;
-
- Message message = null;
- List<Message> messageList = new ArrayList<Message>();
- message = mh.create(Message.class);
- message.setName(message.getId());
-
- messageList.add(message);
- for (RootElement re : mh.getDefinitions().getRootElements()) {
- if (re instanceof Message) {
- messageList.add((Message)re);
- }
+ messageList.add(message);
+ for (RootElement re : mh.getDefinitions().getRootElements()) {
+ if (re instanceof Message) {
+ messageList.add((Message)re);
}
+ }
- Message result = message;
-
- if (messageList.size()>1) {
- PopupMenu popupMenu = new PopupMenu(messageList, labelProvider);
- changesDone = popupMenu.show(Display.getCurrent().getActiveShell());
- if (changesDone) {
- result = (Message) popupMenu.getResult();
- }
- }
+ Message result = message;
+
+ if (messageList.size()>1) {
+ PopupMenu popupMenu = new PopupMenu(messageList, labelProvider);
+ changesDone = popupMenu.show(Display.getCurrent().getActiveShell());
if (changesDone) {
- if (result==message) { // the new one
- message.setName( ModelUtil.getDisplayName(message)); // ModelUtil.toDisplayName(message.getId()) );
-
- mh.getDefinitions().getRootElements().add(result);
- }
+ result = (Message) popupMenu.getResult();
+ }
+ }
+ else
+ changesDone = true;
+
+ if (changesDone) {
+ if (result==message) { // the new one
+ message.setName( ExtendedPropertiesProvider.getTextValue(message)); // ModelUtil.toDisplayName(message.getId()) );
+
+ mh.getDefinitions().getRootElements().add(result);
+ }
+
+ java.util.List<Participant> parts=new java.util.ArrayList<Participant>(
+ ct.getParticipantRefs());
+ parts.remove(participant);
+
+ if (parts.size() == 1) {
+ MessageFlow mf=mh.createMessageFlow(participant, parts.get(0));
+ mf.setName(ModelUtil.toCanonicalString(mf.getId()));
- java.util.List<Participant> parts=new java.util.ArrayList<Participant>(
- ct.getParticipantRefs());
- parts.remove(participant);
+ Choreography choreography = (Choreography)ct.eContainer();
+ choreography.getMessageFlows().add(mf);
+
+ mf.setMessageRef(result);
+ ct.getMessageFlowRef().add(mf);
- if (parts.size() == 1) {
- MessageFlow mf=mh.createMessageFlow(participant, parts.get(0));
- mf.setName(ModelUtil.toDisplayName(mf.getId()));
-
- Choreography choreography = (Choreography)ct.eContainer();
- choreography.getMessageFlows().add(mf);
-
- mf.setMessageRef(result);
- ct.getMessageFlowRef().add(mf);
-
- BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(containerShape, BPMNShape.class);
- bpmnShape.setIsMessageVisible(true);
-
- } else {
- // TODO: REPORT ERROR??
- }
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(containerShape, BPMNShape.class);
+ bpmnShape.setIsMessageVisible(true);
+
+ } else {
+ // TODO: REPORT ERROR??
}
}
- } catch (IOException e) {
- Activator.logError(e);
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyParticipantFeature.java
index 86ad7c66..675f1895 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyParticipantFeature.java
@@ -17,19 +17,26 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.Choreography;
-import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICustomContext;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.internal.util.ui.PopupMenu;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -104,7 +111,7 @@ public class AddChoreographyParticipantFeature extends AbstractCustomFeature {
if (pes != null && pes.length == 1) {
PictogramElement pe = pes[0];
Object bo = getBusinessObjectForPictogramElement(pe);
- if (bo instanceof ChoreographyTask) {
+ if (bo instanceof ChoreographyActivity) {
return true;
}
}
@@ -119,22 +126,23 @@ public class AddChoreographyParticipantFeature extends AbstractCustomFeature {
PictogramElement[] pes = context.getPictogramElements();
if (pes != null && pes.length == 1) {
PictogramElement pe = pes[0];
+ ContainerShape choreographyActivityShape = null;
Object bo = getBusinessObjectForPictogramElement(pe);
- if (pe instanceof ContainerShape && bo instanceof ChoreographyTask) {
- ContainerShape containerShape = (ContainerShape)pe;
- ChoreographyTask task = (ChoreographyTask)bo;
+ if (pe instanceof ContainerShape && bo instanceof ChoreographyActivity) {
+ choreographyActivityShape = (ContainerShape)pe;
+ ChoreographyActivity choreographyActivity = (ChoreographyActivity)bo;
Participant participant = null;
List<Participant> participantList = new ArrayList<Participant>();
participant = Bpmn2ModelerFactory.create(Participant.class);
participant.setName(Messages.AddChoreographyParticipantFeature_New_Participant);
- ModelUtil.setID(participant, task.eResource());
+ ModelUtil.setID(participant, choreographyActivity.eResource());
participantList.add(participant);
- TreeIterator<EObject> iter = ModelUtil.getDefinitions(task).eAllContents();
+ TreeIterator<EObject> iter = ModelUtil.getDefinitions(choreographyActivity).eAllContents();
while (iter.hasNext()) {
EObject obj = iter.next();
- if (obj instanceof Participant && !task.getParticipantRefs().contains(obj))
+ if (obj instanceof Participant && !choreographyActivity.getParticipantRefs().contains(obj))
participantList.add((Participant)obj);
}
Participant result = participant;
@@ -146,10 +154,13 @@ public class AddChoreographyParticipantFeature extends AbstractCustomFeature {
result = (Participant) popupMenu.getResult();
}
}
+ else
+ changesDone = true;
+
if (changesDone) {
if (result==participant) { // the new one
- participant.setName( ModelUtil.toDisplayName(participant.getId()) );
- Choreography choreography = (Choreography)task.eContainer();
+ participant.setName( ModelUtil.toCanonicalString(participant.getId()) );
+ Choreography choreography = (Choreography)choreographyActivity.eContainer();
choreography.getParticipants().add(result);
/*
Finish this later after we figure out how to deal with multiple BPMNDiagrams and BPMNPlanes
@@ -162,11 +173,37 @@ public class AddChoreographyParticipantFeature extends AbstractCustomFeature {
*/
}
- if (task.getInitiatingParticipantRef() == null) {
- task.setInitiatingParticipantRef(result);
+ if (choreographyActivity.getInitiatingParticipantRef() == null) {
+ choreographyActivity.setInitiatingParticipantRef(result);
}
- task.getParticipantRefs().add(result);
+ int index = choreographyActivity.getParticipantRefs().size();
+ if (index>1)
+ --index;
+ choreographyActivity.getParticipantRefs().add(index, result);
+ // if the Choreography Activity is too short to fit all of the Participant Bands
+ // then we need to resize it first.
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape);
+ int bandHeight = 0;
+ for (ContainerShape s : bandShapes) {
+ bandHeight += Graphiti.getGaLayoutService().calculateSize(s.getGraphicsAlgorithm()).getHeight();
+ }
+ GraphicsAlgorithm choreographyActivityGA = choreographyActivityShape.getGraphicsAlgorithm();
+ int containerHeight = choreographyActivityGA.getHeight();
+ int w = choreographyActivityGA.getWidth();
+ int x = choreographyActivityGA.getX();
+ int y = choreographyActivityGA.getY();
+ if (bandHeight + 100 > containerHeight) {
+ ResizeShapeContext resizeContext = new ResizeShapeContext(choreographyActivityShape);
+ resizeContext.setSize(w, bandHeight + 100);
+ resizeContext.setLocation(x, y);
+ resizeContext.setDirection(IResizeShapeContext.DIRECTION_SOUTH);
+ IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(resizeContext);
+ resizeFeature.resizeShape(resizeContext);
+ }
+ else {
+ ChoreographyUtil.updateParticipantBands(getFeatureProvider(), choreographyActivityShape);
+ }
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyTaskFeature.java
index 41f608ef..f37a7977 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyTaskFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddChoreographyTaskFeature.java
@@ -30,4 +30,12 @@ public class AddChoreographyTaskFeature extends AddChoreographyActivityFeature<C
|| BusinessObjectUtil.containsElementOfType(context.getTargetContainer(), FlowElementsContainer.class);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ChoreographyTask.class;
+ }
+
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/UpdateTaskFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddSubChoreographyFeature.java
index c8fe00c1..f14309f2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/activity/task/UpdateTaskFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/AddSubChoreographyFeature.java
@@ -8,23 +8,24 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
*
- * @author Ivar Meikas
+ * @author Innar Made
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.activity.task;
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
-import org.eclipse.bpmn2.Task;
-import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.SubChoreography;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.IUpdateContext;
-public class UpdateTaskFeature extends AbstractUpdateBaseElementFeature {
+public class AddSubChoreographyFeature extends AddChoreographyActivityFeature<SubChoreography> {
- public UpdateTaskFeature(IFeatureProvider fp) {
+ public AddSubChoreographyFeature(IFeatureProvider fp) {
super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public boolean canUpdate(IUpdateContext context) {
- return getBusinessObjectForPictogramElement(context.getPictogramElement()) instanceof Task;
+ public Class getBusinessObjectType() {
+ return SubChoreography.class;
}
-}
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/BlackboxFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/BlackboxFeature.java
index efacdb34..36088529 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/BlackboxFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/BlackboxFeature.java
@@ -22,6 +22,7 @@ import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.util.EcoreUtil;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/CallChoreographyFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/CallChoreographyFeatureContainer.java
index 1471d7f0..c7afb6c5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/CallChoreographyFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/CallChoreographyFeatureContainer.java
@@ -14,24 +14,20 @@ package org.eclipse.bpmn2.modeler.ui.features.choreography;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.CallChoreography;
-import org.eclipse.bpmn2.ChoreographyLoopType;
-import org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
-import org.eclipse.bpmn2.modeler.core.features.choreography.UpdateChoreographyNameFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateContext;
public class CallChoreographyFeatureContainer extends AbstractChoreographyFeatureContainer {
@Override
public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof CallChoreography;
- }
+ return super.canApplyTo(o) &&
+ (o instanceof CallChoreography || o instanceof Participant);
+ }
@Override
public ICreateFeature getCreateFeature(IFeatureProvider fp) {
@@ -43,33 +39,24 @@ public class CallChoreographyFeatureContainer extends AbstractChoreographyFeatur
return new AddCallChoreographyFeature(fp);
}
- @Override
- public MultiUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateChoreographyNameFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateChoreographyParticipantRefsFeature(fp) {
- @Override
- protected boolean isShowNames() {
- return false;
- }
- });
- multiUpdate.addUpdateFeature(new UpdateChoreographyInitiatingParticipantFeature(fp));
- // multiUpdate.addUpdateFeature(new UpdateChoreographyMarkerFeature(fp)); use it when property editor supports
- // enums
- return multiUpdate;
- }
-
- public static class CreateCallChoreographyFeature extends AbstractCreateFlowElementFeature<CallChoreography> {
+ public static class CreateCallChoreographyFeature extends AbstractCreateChoreographyActivityFeature<CallChoreography> {
public CreateCallChoreographyFeature(IFeatureProvider fp) {
- super(fp, Messages.CallChoreographyFeatureContainer_Name, Messages.CallChoreographyFeatureContainer_Description);
+ super(fp);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getStencilImageId()
+ */
@Override
public String getStencilImageId() {
- return ImageProvider.IMG_16_CHOREOGRAPHY_TASK;
+ return ImageProvider.IMG_16_CALL_CHOREOGRAPHY;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.IBpmn2CreateFeature#getBusinessObjectClass()
+ */
+ @Override
public EClass getBusinessObjectClass() {
return Bpmn2Package.eINSTANCE.getCallChoreography();
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyMessageLinkFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyMessageLinkFeatureContainer.java
index b69a61b4..5f791860 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyMessageLinkFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyMessageLinkFeatureContainer.java
@@ -23,12 +23,13 @@ import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.DirectEditBaseElementFeature;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.PropertyBasedFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.BoundaryAnchor;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.Tuple;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IAddFeature;
@@ -38,14 +39,17 @@ import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveConnectionDecoratorFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IReconnectionFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IDeleteContext;
+import org.eclipse.graphiti.features.context.IMoveConnectionDecoratorContext;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.features.impl.AbstractMoveShapeFeature;
+import org.eclipse.graphiti.features.impl.DefaultMoveConnectionDecoratorFeature;
import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
import org.eclipse.graphiti.mm.PropertyContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
@@ -57,7 +61,7 @@ public class ChoreographyMessageLinkFeatureContainer extends PropertyBasedFeatur
@Override
protected String getPropertyKey() {
- return ChoreographyProperties.MESSAGE_LINK;
+ return ChoreographyUtil.MESSAGE_LINK;
}
@Override
@@ -93,8 +97,8 @@ public class ChoreographyMessageLinkFeatureContainer extends PropertyBasedFeatur
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateLabelFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateChoreographyMessageFlowFeature(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ multiUpdate.addFeature(new UpdateChoreographyMessageFlowFeature(fp));
return multiUpdate;
}
@@ -124,6 +128,22 @@ public class ChoreographyMessageLinkFeatureContainer extends PropertyBasedFeatur
}
@Override
+ public IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IFeatureProvider fp) {
+ return new DefaultMoveConnectionDecoratorFeature(fp) {
+
+ @Override
+ public boolean canMoveConnectionDecorator(IMoveConnectionDecoratorContext context) {
+ return false;
+ }
+
+ @Override
+ public void moveConnectionDecorator(IMoveConnectionDecoratorContext context) {
+ }
+
+ };
+ }
+
+ @Override
public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
return new DefaultResizeShapeFeature(fp) {
@Override
@@ -169,10 +189,10 @@ public class ChoreographyMessageLinkFeatureContainer extends PropertyBasedFeatur
}
MessageFlow mf = (MessageFlow)BusinessObjectUtil.getBusinessObjectForPictogramElement(connection);
- List<ContainerShape> bands = ChoreographyUtil
+ List<ContainerShape> bands = FeatureSupport
.getParticipantBandContainerShapes((ContainerShape) start);
- Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottomBands = ChoreographyUtil
+ Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottomBands = FeatureSupport
.getTopAndBottomBands(bands);
List<ContainerShape> affectedBands = anchor.locationType == AnchorLocation.BOTTOM ? topAndBottomBands
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographySelectionBehavior.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographySelectionBehavior.java
index 607ff3e9..000e8e02 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographySelectionBehavior.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographySelectionBehavior.java
@@ -15,7 +15,7 @@ package org.eclipse.bpmn2.modeler.ui.features.choreography;
import java.util.Collection;
import java.util.Iterator;
-import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.graphiti.mm.PropertyContainer;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
@@ -30,7 +30,7 @@ public class ChoreographySelectionBehavior {
return false;
}
- String property = Graphiti.getPeService().getPropertyValue(pe, ChoreographyProperties.MESSAGE_LINK);
+ String property = Graphiti.getPeService().getPropertyValue(pe, ChoreographyUtil.MESSAGE_LINK);
if (property == null) {
return false;
}
@@ -39,11 +39,9 @@ public class ChoreographySelectionBehavior {
}
public static GraphicsAlgorithm[] getClickArea(PictogramElement element) {
- Iterator<Shape> iterator = Graphiti.getPeService().getAllContainedShapes((ContainerShape) element).iterator();
- GraphicsAlgorithm[] algorithms = new GraphicsAlgorithm[2];
- algorithms[0] = iterator.next().getGraphicsAlgorithm();
- algorithms[1] = iterator.next().getGraphicsAlgorithm();
- return algorithms;
+ Collection<PictogramElement> children = Graphiti.getPeService().getPictogramElementChildren(element);
+ PictogramElement first = children.iterator().next();
+ return new GraphicsAlgorithm[] { first.getGraphicsAlgorithm() };
}
public static GraphicsAlgorithm getSelectionBorder(PictogramElement element) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyTaskFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyTaskFeatureContainer.java
index f3569bd5..3bbcdf80 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyTaskFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ChoreographyTaskFeatureContainer.java
@@ -17,22 +17,14 @@ import java.util.List;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ChoreographyLoopType;
import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.bpmn2.modeler.ui.features.activity.AppendActivityFeature;
-import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.CollapseFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.ExpandFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.ui.features.event.AppendEventFeature;
-import org.eclipse.bpmn2.modeler.ui.features.gateway.AppendGatewayFeature;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -40,11 +32,8 @@ import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.features.context.IDeleteContext;
-import org.eclipse.graphiti.features.context.IPictogramElementContext;
import org.eclipse.graphiti.features.context.impl.DeleteContext;
-import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
@@ -55,7 +44,8 @@ public class ChoreographyTaskFeatureContainer extends AbstractChoreographyFeatur
@Override
public boolean canApplyTo(Object o) {
- return super.canApplyTo(o) && o instanceof ChoreographyTask;
+ return super.canApplyTo(o) &&
+ (o instanceof ChoreographyTask || o instanceof Participant);
}
@Override
@@ -71,7 +61,8 @@ public class ChoreographyTaskFeatureContainer extends AbstractChoreographyFeatur
@Override
public MultiUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = super.getUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateChoreographyMessageFlowFeature(fp));
+ multiUpdate.addFeature(new UpdateChoreographyMessageFlowFeature(fp));
+ multiUpdate.addFeature(new UpdateChoreographyMessageLinkFeature(fp));
return multiUpdate;
}
@@ -122,31 +113,20 @@ public class ChoreographyTaskFeatureContainer extends AbstractChoreographyFeatur
BPMNShape bs = BusinessObjectUtil.getFirstElementOfType(cs, BPMNShape.class);
Graphiti.getPeService().deletePictogramElement(cs);
if (bs!=null)
- deleteBusinessObject(bs);
+ super.deleteBusinessObject(bs);
}
}
}
}
};
}
-
- @Override
- public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
- ICustomFeature[] superFeatures = super.getCustomFeatures(fp);
- ICustomFeature[] thisFeatures = new ICustomFeature[1 + superFeatures.length];
- int i;
- for (i=0; i<superFeatures.length; ++i)
- thisFeatures[i] = superFeatures[i];
- thisFeatures[i++] = new AddChoreographyParticipantFeature(fp);
- return thisFeatures;
- }
- public static class CreateChoreographyTaskFeature extends AbstractCreateFlowElementFeature<ChoreographyTask> {
+ public static class CreateChoreographyTaskFeature extends AbstractCreateChoreographyActivityFeature<ChoreographyTask> {
public CreateChoreographyTaskFeature(IFeatureProvider fp) {
- super(fp, Messages.ChoreographyTaskFeatureContainer_Name, Messages.ChoreographyTaskFeatureContainer_Description);
+ super(fp);
}
-
+
@Override
public String getStencilImageId() {
return ImageProvider.IMG_16_CHOREOGRAPHY_TASK;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/Messages.java
index ec2a7a27..7d96af3d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.choreography;
import org.eclipse.osgi.util.NLS;
@@ -15,7 +25,6 @@ public class Messages extends NLS {
public static String CallChoreographyFeatureContainer_Name;
public static String ChoreographyTaskFeatureContainer_Description;
public static String ChoreographyTaskFeatureContainer_Name;
- public static String ChoreographyUtil_Undefined_Message;
public static String RemoveChoreographyMessageFeature_Description;
public static String RemoveChoreographyMessageFeature_Name;
public static String ShowDiagramPageFeature_Description;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java
new file mode 100644
index 00000000..f7274c81
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/MoveChoreographyFeature.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.ui.editor.DiagramBehavior;
+
+public class MoveChoreographyFeature extends MoveFlowNodeFeature {
+
+ public MoveChoreographyFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected void postMoveShape(final IMoveShapeContext context) {
+ super.postMoveShape(context);
+ DiagramBehavior db = (DiagramBehavior) getDiagramBehavior();
+ db.getUpdateBehavior().setAdapterActive(false);
+
+ ChoreographyUtil.updateParticipantBands(getFeatureProvider(), context.getPictogramElement());
+// try {
+// Thread.sleep(2000);
+// } catch (InterruptedException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
+
+ // adjust Participant Band size and location
+ ChoreographyUtil.updateParticipantBands(getFeatureProvider(), context.getPictogramElement());
+// try {
+// Thread.sleep(2000);
+// } catch (InterruptedException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
+
+ // adjust Messages and MessageLinks
+ ChoreographyUtil.updateChoreographyMessageLinks(getFeatureProvider(), context.getPictogramElement());
+
+ db.getUpdateBehavior().setAdapterActive(true);
+ }
+
+ @Override
+ protected boolean checkConnectionAfterMove(Connection c) {
+ if (ChoreographyUtil.isChoreographyMessageLink(c))
+ return false;
+ return super.checkConnectionAfterMove(c);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyMessageFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyMessageFeature.java
index c6118af5..47daffda 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyMessageFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyMessageFeature.java
@@ -17,6 +17,7 @@ import org.eclipse.bpmn2.ChoreographyTask;
import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.util.EcoreUtil;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java
new file mode 100644
index 00000000..5e7917e5
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/RemoveChoreographyParticipantFeature.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.IRemoveContext;
+import org.eclipse.graphiti.features.impl.DefaultRemoveFeature;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class RemoveChoreographyParticipantFeature extends DefaultRemoveFeature {
+
+ /**
+ * @param fp
+ */
+ public RemoveChoreographyParticipantFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canRemove(IRemoveContext context) {
+ // participant bands in a ChoreographyActivity CAN be "removed" (from the modelObject's
+ // participantRef list) but not "deleted" (from the model)
+ if (ChoreographyUtil.isChoreographyParticipantBand(context.getPictogramElement())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void execute(IContext context) {
+ IRemoveContext dc = (IRemoveContext)context;
+ PictogramElement pe = dc.getPictogramElement();
+ ContainerShape choreographyActivityShape = null;
+ if (ChoreographyUtil.isChoreographyParticipantBand(pe)) {
+ PictogramElement labelShape = FeatureSupport.getLabelShape(pe);
+ if (labelShape!=null)
+ Graphiti.getPeService().deletePictogramElement(labelShape);
+ Participant participant = (Participant)getBusinessObjectForPictogramElement(pe);
+ choreographyActivityShape = (ContainerShape)pe.eContainer();
+ Object bo = getBusinessObjectForPictogramElement(choreographyActivityShape);
+ // update the Initiating Participant
+ if (bo instanceof ChoreographyActivity) {
+ ChoreographyActivity choreographyActivity = (ChoreographyActivity)bo;
+ choreographyActivity.getParticipantRefs().remove(participant);
+ if (choreographyActivity.getInitiatingParticipantRef() == participant) {
+ // select a new Initiating Participant
+ Participant initiatingParticipant = null;
+ if (choreographyActivity.getParticipantRefs().size()>0)
+ initiatingParticipant = choreographyActivity.getParticipantRefs().get(0);
+ choreographyActivity.setInitiatingParticipantRef(initiatingParticipant);
+ }
+ }
+ // update Choreography Task message flows
+ if (bo instanceof ChoreographyTask) {
+ ChoreographyTask choreographyTask = (ChoreographyTask)bo;
+ List<MessageFlow> messageFlows = new ArrayList<MessageFlow>();
+ messageFlows.addAll(choreographyTask.getMessageFlowRef());
+ for (MessageFlow mf : messageFlows) {
+ if (mf.getSourceRef() == participant) {
+ choreographyTask.getMessageFlowRef().remove(mf);
+ }
+ }
+ }
+ super.execute(context);
+
+ ChoreographyUtil.updateParticipantBands(getFeatureProvider(), choreographyActivityShape);
+ }
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ResizeChoreographyFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ResizeChoreographyFeature.java
index 554f629b..4850c15e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ResizeChoreographyFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ResizeChoreographyFeature.java
@@ -14,53 +14,53 @@ package org.eclipse.bpmn2.modeler.ui.features.choreography;
import java.util.List;
+import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.Activator;
import org.eclipse.bpmn2.modeler.core.features.DefaultResizeBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
-import org.eclipse.bpmn2.modeler.core.utils.Tuple;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class ResizeChoreographyFeature extends DefaultResizeBPMNShapeFeature {
+ final static int TEXT_H = 15;
+
public ResizeChoreographyFeature(IFeatureProvider fp) {
super(fp);
}
@Override
public boolean canResizeShape(IResizeShapeContext context) {
- try {
- List<BPMNShape> bands = ChoreographyUtil.getParicipantBandBpmnShapes((ContainerShape) context
- .getPictogramElement());
- int h = ChoreographyProperties.TEXT_H; // + ChoreographyProperties.MARKER_H;
-
- for (BPMNShape shape : bands) {
- h += shape.getBounds().getHeight();
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof ContainerShape) {
+ if (BusinessObjectUtil.getFirstBaseElement(pe) instanceof ChoreographyActivity) {
+ List<BPMNShape> bands = ChoreographyUtil.getParticipantBandBpmnShapes((ContainerShape)pe);
+ int h = TEXT_H;
+
+ for (BPMNShape shape : bands) {
+ h += shape.getBounds().getHeight();
+ }
+
+ boolean doit = context.getHeight() > 0 ? context.getHeight() > h : true;
+ if (doit && !super.canResizeShape(context))
+ doit = false;
+ return doit;
}
-
- return context.getHeight() > 0 ? context.getHeight() > h : true;
- } catch (Exception e) {
- Activator.logError(e);
- return true;
}
+ return false;
}
@Override
public void resizeShape(IResizeShapeContext context) {
- try {
- List<ContainerShape> bands = ChoreographyUtil.getParticipantBandContainerShapes((ContainerShape) context
- .getPictogramElement());
- Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottom = ChoreographyUtil
- .getTopAndBottomBands(bands);
- ChoreographyUtil.resizePartipantBandContainerShapes(context.getWidth(), context.getHeight(),
- topAndBottom.getFirst(), topAndBottom.getSecond(), getDiagram());
- } catch (Exception e) {
- Activator.logError(e);
- }
- ChoreographyUtil.updateChoreographyMessageLinks(context);
super.resizeShape(context);
+
+ // adjust Participant Band size and location
+ ChoreographyUtil.updateParticipantBands(getFeatureProvider(), context.getPictogramElement());
+ // adjust Messages and MessageLinks
+ ChoreographyUtil.updateChoreographyMessageLinks(getFeatureProvider(), context.getPictogramElement());
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ShowDiagramPageFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ShowDiagramPageFeature.java
index 007e08f1..5bcc190e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ShowDiagramPageFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/ShowDiagramPageFeature.java
@@ -19,10 +19,11 @@ import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.ui.IConstants;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditingDialog;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java
new file mode 100644
index 00000000..0b2ce4e3
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/SubChoreographyFeatureContainer.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.SubChoreography;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+
+public class SubChoreographyFeatureContainer extends AbstractChoreographyFeatureContainer {
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) &&
+ (o instanceof SubChoreography || o instanceof Participant);
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateSubChoreographyFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddSubChoreographyFeature(fp);
+ }
+
+ @Override
+ public MultiUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = super.getUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateChoreographyMarkerFeature(fp) {
+ @Override
+ protected void doUpdate(ChoreographyActivity element, ContainerShape markerContainer) {
+ super.doUpdate(element, markerContainer);
+ // SubChoreography always has an EXPAND marker
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ }
+ });
+
+ return multiUpdate;
+ }
+
+ public static class CreateSubChoreographyFeature extends AbstractCreateChoreographyActivityFeature<SubChoreography> {
+
+ public CreateSubChoreographyFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getStencilImageId()
+ */
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_SUB_CHOREOGRAPHY;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature#getFlowElementClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getSubChoreography();
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java
new file mode 100644
index 00000000..5fd987f4
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMarkerFeature.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+
+public class UpdateChoreographyMarkerFeature extends AbstractUpdateMarkerFeature<ChoreographyActivity> {
+
+ public UpdateChoreographyMarkerFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#getPropertyKey()
+ */
+ @Override
+ protected String getPropertyKey() {
+ return GraphitiConstants.IS_LOOP_OR_MULTI_INSTANCE;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#isPropertyChanged(org.eclipse.bpmn2.FlowElement, java.lang.String)
+ */
+ @Override
+ protected boolean isPropertyChanged(ChoreographyActivity element, String propertyValue) {
+ return !convertPropertyToString(element).equals(propertyValue);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#doUpdate(org.eclipse.bpmn2.FlowElement, org.eclipse.graphiti.mm.pictograms.ContainerShape)
+ */
+ @Override
+ protected void doUpdate(ChoreographyActivity element, ContainerShape markerContainer) {
+ switch (element.getLoopType()) {
+ case STANDARD:
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ break;
+ case MULTI_INSTANCE_PARALLEL:
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ break;
+ case MULTI_INSTANCE_SEQUENTIAL:
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.showActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ break;
+ default:
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_STANDARD);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_PARALLEL);
+ ShapeDecoratorUtil.hideActivityMarker(markerContainer, GraphitiConstants.ACTIVITY_MARKER_LC_MULTI_SEQUENTIAL);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#convertPropertyToString(org.eclipse.bpmn2.FlowElement)
+ */
+ @Override
+ protected String convertPropertyToString(ChoreographyActivity element) {
+ String type = element.getLoopType().getName();
+ if (type==null)
+ return "";
+ return type;
+ }
+
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java
index b2dde538..e000b607 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java
@@ -12,9 +12,6 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.choreography;
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.MESSAGE_REF_IDS;
-import static org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties.MESSAGE_VISIBLE;
-
import java.util.ArrayList;
import java.util.List;
@@ -25,18 +22,15 @@ import org.eclipse.bpmn2.Message;
import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
-import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.util.Bpmn2OppositeReferenceAdapter;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Diagram;
@@ -45,9 +39,10 @@ import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.ILinkService;
import org.eclipse.graphiti.services.IPeService;
-public class UpdateChoreographyMessageFlowFeature extends AbstractUpdateFeature {
+public class UpdateChoreographyMessageFlowFeature extends AbstractUpdateBaseElementFeature<ChoreographyTask> {
private final IPeService peService = Graphiti.getPeService();
+ private final ILinkService linkService = Graphiti.getLinkService();
public UpdateChoreographyMessageFlowFeature(IFeatureProvider fp) {
super(fp);
@@ -55,19 +50,23 @@ public class UpdateChoreographyMessageFlowFeature extends AbstractUpdateFeature
@Override
public boolean canUpdate(IUpdateContext context) {
- return BusinessObjectUtil.containsElementOfType(context.getPictogramElement(), ChoreographyTask.class);
+ boolean result = false;
+ if (super.canUpdate(context)) {
+ PictogramElement pe = context.getPictogramElement();
+ result = ChoreographyUtil.isChoreographyActivity(pe) || ChoreographyUtil.isChoreographyMessage(pe);
+ }
+ return result;
}
@Override
public IReason updateNeeded(IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean()) {
+ return reason;
}
+
PictogramElement pe = context.getPictogramElement();
- if (isLinkedMessage(pe)) {
+ if (ChoreographyUtil.isChoreographyMessage(pe)) {
Message message = BusinessObjectUtil.getFirstElementOfType(pe, Message.class);
TreeIterator<EObject> iter = message.eContainer().eAllContents();
while (iter.hasNext()) {
@@ -76,55 +75,52 @@ public class UpdateChoreographyMessageFlowFeature extends AbstractUpdateFeature
ChoreographyTask choreographyTask = (ChoreographyTask)eo;
for (MessageFlow mf : choreographyTask.getMessageFlowRef()) {
if (mf.getMessageRef()==message) {
- String oldLabel = peService.getPropertyValue(pe, ChoreographyProperties.MESSAGE_NAME);
+ String oldLabel = peService.getPropertyValue(pe, ChoreographyUtil.MESSAGE_NAME);
if (oldLabel==null || oldLabel.isEmpty())
oldLabel = ""; //$NON-NLS-1$
String newLabel = ChoreographyUtil.getMessageFlowName(mf);
if (newLabel==null || newLabel.isEmpty())
newLabel = ""; //$NON-NLS-1$
- if (!newLabel.equals(oldLabel))
- return Reason.createTrueReason();
+ if (!newLabel.equals(oldLabel)) {
+ reason = Reason.createTrueReason("Choreography Message");
+ break;
}
}
}
}
- return Reason.createFalseReason();
}
-
- if (!BusinessObjectUtil.containsElementOfType(pe, ChoreographyTask.class)) {
- return Reason.createFalseReason();
}
-
- ChoreographyTask choreography = BusinessObjectUtil.getFirstElementOfType(pe,
- ChoreographyTask.class);
-
- String ids = peService.getPropertyValue(pe, MESSAGE_REF_IDS);
- String choreoIds = ChoreographyUtil.getMessageRefIds(choreography);
-
- if (ids.equals(choreoIds)) {
- return Reason.createFalseReason();
+ else {
+ ContainerShape choreographyTaskShape = ChoreographyUtil.getChoreographyActivityShape(pe);
+ ChoreographyTask choreographyTask = BusinessObjectUtil.getFirstElementOfType(
+ choreographyTaskShape, ChoreographyTask.class);
+
+ String shapeIds = ChoreographyUtil.getMessageRefIds(choreographyTaskShape);
+ String taskIds = ChoreographyUtil.getMessageRefIds(choreographyTask);
+ if (!shapeIds.equals(taskIds))
+ reason = Reason.createTrueReason("Choreography Message Link");
+ else {
+ shapeIds = ChoreographyUtil.getParticipantRefIds(choreographyTaskShape);
+ taskIds = ChoreographyUtil.getParticipantRefIds(choreographyTask);
+ if (!shapeIds.equals(taskIds))
+ reason = Reason.createTrueReason("Participants");
}
-
- return Reason.createTrueReason();
}
- private boolean isLinkedMessage(PictogramElement pe) {
- BaseElement be = BusinessObjectUtil.getFirstElementOfType(pe, BaseElement.class);
- return be instanceof Message &&
- Boolean.parseBoolean(peService.getPropertyValue(pe, ChoreographyProperties.MESSAGE_LINK));
+ return reason;
}
@Override
public boolean update(IUpdateContext context) {
+ boolean result = false;
PictogramElement pe = context.getPictogramElement();
Diagram diagram = Graphiti.getPeService().getDiagramForPictogramElement(pe);
BaseElement be = BusinessObjectUtil.getFirstElementOfType(pe,BaseElement.class);
if (be instanceof ChoreographyTask) {
- return update((ContainerShape)pe, (ChoreographyTask)be);
+ result = update((ContainerShape)pe, (ChoreographyTask)be);
}
- else if (isLinkedMessage(pe)) {
- ILinkService linkService = Graphiti.getLinkService();
- int result = 0;
+ else if (ChoreographyUtil.isChoreographyMessage(pe)) {
+ int updates = 0;
TreeIterator<EObject> iter = be.eContainer().eAllContents();
while (iter.hasNext()) {
EObject eo = iter.next();
@@ -135,40 +131,40 @@ public class UpdateChoreographyMessageFlowFeature extends AbstractUpdateFeature
for (PictogramElement cs : linkService.getPictogramElements(diagram, choreographyTask)) {
if (cs instanceof ContainerShape) {
if (update((ContainerShape)cs, choreographyTask))
- ++result;
+ ++updates;
}
}
}
}
}
}
- return result>0;
+
+ result = updates>0;
}
- return false;
+
+ return result;
}
- public boolean update(ContainerShape choreographyContainer, ChoreographyTask choreographyTask) {
+ public boolean update(ContainerShape choreographyActivityShape, ChoreographyTask choreographyTask) {
List<InteractionNode> sources = new ArrayList<InteractionNode>();
for (MessageFlow message : choreographyTask.getMessageFlowRef()) {
sources.add(message.getSourceRef());
}
- for (ContainerShape band : ChoreographyUtil.getParticipantBandContainerShapes(choreographyContainer)) {
+ for (ContainerShape band : FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape)) {
Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
if (!sources.contains(participant) && bpmnShape.isIsMessageVisible()) {
bpmnShape.setIsMessageVisible(false);
- peService.setPropertyValue(choreographyContainer, MESSAGE_VISIBLE, Boolean.toString(false));
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.MESSAGE_VISIBLE, Boolean.toString(false));
} else if (sources.contains(participant) && !bpmnShape.isIsMessageVisible()) {
bpmnShape.setIsMessageVisible(true);
- peService.setPropertyValue(choreographyContainer, MESSAGE_VISIBLE, Boolean.toString(true));
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.MESSAGE_VISIBLE, Boolean.toString(true));
}
}
- ChoreographyUtil.drawMessageLinks(getFeatureProvider(),choreographyContainer);
-
String choreoIds = ChoreographyUtil.getMessageRefIds(choreographyTask);
- peService.setPropertyValue(choreographyContainer, MESSAGE_REF_IDS, choreoIds);
- return false;
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.MESSAGE_REF_IDS, choreoIds);
+ return true;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java.orig b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java.orig
new file mode 100644
index 00000000..515cfec0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java.orig
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.InteractionNode;
+import org.eclipse.bpmn2.Message;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNShape;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java
+import org.eclipse.bpmn2.modeler.core.adapters.AdapterUtil;
+import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyProperties;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.ILinkService;
+import org.eclipse.graphiti.services.IPeService;
+
+public class UpdateChoreographyMessageFlowFeature extends AbstractUpdateBaseElementFeature<ChoreographyTask> {
+
+ private final IPeService peService = Graphiti.getPeService();
+ private final ILinkService linkService = Graphiti.getLinkService();
+
+ public UpdateChoreographyMessageFlowFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ boolean result = false;
+ if (super.canUpdate(context)) {
+ PictogramElement pe = context.getPictogramElement();
+ result = ChoreographyUtil.isChoreographyActivity(pe) || ChoreographyUtil.isChoreographyMessage(pe);
+ }
+ return result;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java
+ Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ if (value instanceof EObject) {
+ // if the UpdateContext has a "businessObject" property, then this update is needed
+ // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
+ return Reason.createTrueReason("Initial update");
+ }
+=======
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean()) {
+ return reason;
+ }
+
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageFlowFeature.java
+ PictogramElement pe = context.getPictogramElement();
+ if (ChoreographyUtil.isChoreographyMessage(pe)) {
+ Message message = BusinessObjectUtil.getFirstElementOfType(pe, Message.class);
+ TreeIterator<EObject> iter = message.eContainer().eAllContents();
+ while (iter.hasNext()) {
+ EObject eo = iter.next();
+ if (eo instanceof ChoreographyTask) {
+ ChoreographyTask choreographyTask = (ChoreographyTask)eo;
+ for (MessageFlow mf : choreographyTask.getMessageFlowRef()) {
+ if (mf.getMessageRef()==message) {
+ String oldLabel = peService.getPropertyValue(pe, ChoreographyUtil.MESSAGE_NAME);
+ if (oldLabel==null || oldLabel.isEmpty())
+ oldLabel = ""; //$NON-NLS-1$
+ String newLabel = ChoreographyUtil.getMessageFlowName(mf);
+ if (newLabel==null || newLabel.isEmpty())
+ newLabel = ""; //$NON-NLS-1$
+ if (!newLabel.equals(oldLabel)) {
+ reason = Reason.createTrueReason("Choreography Message");
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ else {
+ ContainerShape choreographyTaskShape = ChoreographyUtil.getChoreographyActivityShape(pe);
+ ChoreographyTask choreographyTask = BusinessObjectUtil.getFirstElementOfType(
+ choreographyTaskShape, ChoreographyTask.class);
+
+ String shapeIds = ChoreographyUtil.getMessageRefIds(choreographyTaskShape);
+ String taskIds = ChoreographyUtil.getMessageRefIds(choreographyTask);
+ if (!shapeIds.equals(taskIds))
+ reason = Reason.createTrueReason("Choreography Message Link");
+ else {
+ shapeIds = ChoreographyUtil.getParticipantRefIds(choreographyTaskShape);
+ taskIds = ChoreographyUtil.getParticipantRefIds(choreographyTask);
+ if (!shapeIds.equals(taskIds))
+ reason = Reason.createTrueReason("Participants");
+ }
+ }
+
+ return reason;
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ boolean result = false;
+ PictogramElement pe = context.getPictogramElement();
+ Diagram diagram = Graphiti.getPeService().getDiagramForPictogramElement(pe);
+ BaseElement be = BusinessObjectUtil.getFirstElementOfType(pe,BaseElement.class);
+ if (be instanceof ChoreographyTask) {
+ result = update((ContainerShape)pe, (ChoreographyTask)be);
+ }
+ else if (ChoreographyUtil.isChoreographyMessage(pe)) {
+ int updates = 0;
+ TreeIterator<EObject> iter = be.eContainer().eAllContents();
+ while (iter.hasNext()) {
+ EObject eo = iter.next();
+ if (eo instanceof ChoreographyTask) {
+ ChoreographyTask choreographyTask = (ChoreographyTask)eo;
+ for (MessageFlow mf : choreographyTask.getMessageFlowRef()) {
+ if (mf.getMessageRef()==be) {
+ for (PictogramElement cs : linkService.getPictogramElements(diagram, choreographyTask)) {
+ if (cs instanceof ContainerShape) {
+ if (update((ContainerShape)cs, choreographyTask))
+ ++updates;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ result = updates>0;
+ }
+
+ return result;
+ }
+
+ public boolean update(ContainerShape choreographyActivityShape, ChoreographyTask choreographyTask) {
+ List<InteractionNode> sources = new ArrayList<InteractionNode>();
+ for (MessageFlow message : choreographyTask.getMessageFlowRef()) {
+ sources.add(message.getSourceRef());
+ }
+
+ for (ContainerShape band : FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape)) {
+ Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
+ if (!sources.contains(participant) && bpmnShape.isIsMessageVisible()) {
+ bpmnShape.setIsMessageVisible(false);
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.MESSAGE_VISIBLE, Boolean.toString(false));
+ } else if (sources.contains(participant) && !bpmnShape.isIsMessageVisible()) {
+ bpmnShape.setIsMessageVisible(true);
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.MESSAGE_VISIBLE, Boolean.toString(true));
+ }
+ }
+
+ String choreoIds = ChoreographyUtil.getMessageRefIds(choreographyTask);
+ peService.setPropertyValue(choreographyActivityShape, ChoreographyUtil.MESSAGE_REF_IDS, choreoIds);
+ return true;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java
new file mode 100644
index 00000000..b29a0429
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/UpdateChoreographyMessageLinkFeature.java
@@ -0,0 +1,397 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.choreography;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.ChoreographyTask;
+import org.eclipse.bpmn2.Message;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.Participant;
+import org.eclipse.bpmn2.di.BPMNShape;
+import org.eclipse.bpmn2.di.ParticipantBandKind;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.features.choreography.Messages;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.core.utils.Tuple;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.AnchorLocation;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil.BoundaryAnchor;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.Envelope;
+import org.eclipse.dd.dc.Bounds;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.datatypes.IDimension;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.PropertyContainer;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.algorithms.Text;
+import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+import org.eclipse.graphiti.ui.services.GraphitiUi;
+import org.eclipse.graphiti.util.IColorConstant;
+
+public class UpdateChoreographyMessageLinkFeature extends AbstractUpdateBaseElementFeature<BaseElement> {
+
+ private static IGaService gaService = Graphiti.getGaService();
+ private static IPeService peService = Graphiti.getPeService();
+
+ public UpdateChoreographyMessageLinkFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ boolean result = false;
+ if (super.canUpdate(context)) {
+ result = ChoreographyUtil.getChoreographyActivityShape(context.getPictogramElement()) != null;
+ }
+ return result;
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean()) {
+ return reason;
+ }
+
+ // check all of the Participant Bands to see if any MessageLinks need to be updated
+ ContainerShape choreographyActivityShape = ChoreographyUtil.getChoreographyActivityShape(context.getPictogramElement());
+ ChoreographyActivity choreographyActivity = BusinessObjectUtil.getFirstElementOfType(choreographyActivityShape, ChoreographyActivity.class);
+ String shapeIds = ChoreographyUtil.getParticipantRefIds(choreographyActivityShape);
+ String activityIds = ChoreographyUtil.getParticipantRefIds(choreographyActivity);
+ if (!shapeIds.equals(activityIds))
+ reason = Reason.createTrueReason("Participants");
+ else {
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(choreographyActivityShape);
+ for (ContainerShape bandShape : bandShapes) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(bandShape, BPMNShape.class);
+ boolean visible = new Boolean(Graphiti.getPeService().getPropertyValue(bandShape, ChoreographyUtil.MESSAGE_VISIBLE));
+ if (bpmnShape.isIsMessageVisible() != visible) {
+ reason = Reason.createTrueReason("Message Link Visible");
+ break;
+ }
+ }
+ }
+
+ return reason;
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+
+ if (!canUpdate(context))
+ return false;
+
+ ContainerShape choreographyTaskShape = ChoreographyUtil.getChoreographyActivityShape(context.getPictogramElement());
+
+ IFeatureProvider fp = getFeatureProvider();
+ List<MessageFlow> messageFlows = new ArrayList<MessageFlow>();
+ ChoreographyTask choreography = BusinessObjectUtil.getFirstElementOfType(choreographyTaskShape,
+ ChoreographyTask.class);
+ if (choreography != null) {
+ messageFlows.addAll(choreography.getMessageFlowRef());
+ }
+
+ List<ContainerShape> bandShapes = FeatureSupport.getParticipantBandContainerShapes(choreographyTaskShape);
+ Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottom = FeatureSupport.getTopAndBottomBands(bandShapes);
+ List<ContainerShape> shapesWithVisibleMessages = new ArrayList<ContainerShape>();
+
+ Map<AnchorLocation, BoundaryAnchor> boundaryAnchors = AnchorUtil.getBoundaryAnchors(choreographyTaskShape);
+ BoundaryAnchor topBoundaryAnchor = boundaryAnchors.get(AnchorLocation.TOP);
+ BoundaryAnchor bottomBoundaryAnchor = boundaryAnchors.get(AnchorLocation.BOTTOM);
+ int topConnectionIndex = 0;
+ int bottomConnectionIndex = 0;
+
+ boolean hasTopMessage = false;
+ EList<Connection> topConnections = topBoundaryAnchor.anchor.getOutgoingConnections();
+ for (int i = 0; i < topConnections.size(); i++) {
+ Connection connection = topConnections.get(i);
+ EObject container = connection.getEnd().eContainer();
+ if (container instanceof PropertyContainer) {
+ String property = peService.getPropertyValue((PropertyContainer) container, ChoreographyUtil.MESSAGE_LINK);
+ if (Boolean.parseBoolean(property)) {
+ topConnectionIndex = i;
+ hasTopMessage = true;
+ break;
+ }
+ }
+ }
+
+ boolean hasBottomMessage = false;
+ EList<Connection> bottomConnections = bottomBoundaryAnchor.anchor.getOutgoingConnections();
+ for (int i = 0; i < bottomConnections.size(); i++) {
+ Connection connection = bottomConnections.get(i);
+ EObject container = connection.getEnd().eContainer();
+ if (container instanceof PropertyContainer) {
+ String property = peService.getPropertyValue((PropertyContainer) container, ChoreographyUtil.MESSAGE_LINK);
+ if (Boolean.parseBoolean(property)) {
+ bottomConnectionIndex = i;
+ hasBottomMessage = true;
+ break;
+ }
+ }
+ }
+
+ for (ContainerShape bandShape : bandShapes) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(bandShape, BPMNShape.class);
+ if (bpmnShape.isIsMessageVisible()) {
+ shapesWithVisibleMessages.add(bandShape);
+ }
+ }
+
+ boolean shouldDrawTopMessage = !Collections.disjoint(topAndBottom.getFirst(), shapesWithVisibleMessages);
+ boolean shouldDrawBottomMessage = !Collections.disjoint(topAndBottom.getSecond(), shapesWithVisibleMessages);
+ ContainerShape envelope;
+
+ String topMessageName = null;
+ String bottomMessageName = null;
+ Message topMessage = null;
+ Message bottomMessage = null;
+
+ if (shouldDrawTopMessage) {
+ topMessage = getMessage(messageFlows, topAndBottom.getFirst(), false);
+ topMessageName = getMessageName(messageFlows, topAndBottom.getFirst());
+ }
+ if (topMessageName == null) {
+ topMessageName = new String();
+ }
+
+ if (shouldDrawBottomMessage) {
+ bottomMessage = getMessage(messageFlows, topAndBottom.getSecond(), false);
+ bottomMessageName = getMessageName(messageFlows, topAndBottom.getSecond());
+ }
+ if (bottomMessageName == null) {
+ bottomMessageName = new String();
+ }
+
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(choreographyTaskShape, BPMNShape.class);
+ Bounds bounds = bpmnShape.getBounds();
+ int x = (int) ((bounds.getX() + bounds.getWidth() / 2) - (ChoreographyUtil.ENV_W / 2));
+
+ MessageFlow flow = getMessageFlow(messageFlows, topAndBottom.getFirst());
+ envelope = null;
+ if (!hasTopMessage && shouldDrawTopMessage && flow!=null) {
+ int y = (int) (bounds.getY() - ChoreographyUtil.ENVELOPE_HEIGHT_MODIFIER - ChoreographyUtil.ENV_H);
+ envelope = drawMessageLink(topMessageName, topBoundaryAnchor, x, y, isFilled(topAndBottom.getFirst()));
+ if (topMessage!=null)
+ fp.link(envelope, topMessage);
+ peService.setPropertyValue(envelope, ChoreographyUtil.MESSAGE_NAME, topMessageName);
+ } else if (hasTopMessage && !shouldDrawTopMessage) {
+ envelope = (ContainerShape) topConnections.get(topConnectionIndex).getEnd().eContainer();
+ peService.deletePictogramElement(topConnections.get(topConnectionIndex));
+ peService.deletePictogramElement(envelope);
+ envelope = null;
+ } else if (hasTopMessage && shouldDrawTopMessage && flow!=null) {
+ envelope = (ContainerShape) topConnections.get(topConnectionIndex).getEnd().eContainer();
+ setMessageLabel(topMessageName, envelope);
+ }
+ if (envelope!=null) {
+ // link up the message flow
+ linkMessageFlow(fp, flow, envelope);
+ }
+
+ envelope = null;
+ flow = getMessageFlow(messageFlows, topAndBottom.getSecond());
+ if (!hasBottomMessage && shouldDrawBottomMessage && flow!=null) {
+ int y = (int) (bounds.getY() + bounds.getHeight() + ChoreographyUtil.ENVELOPE_HEIGHT_MODIFIER);
+ envelope = drawMessageLink(bottomMessageName, bottomBoundaryAnchor, x, y, isFilled(topAndBottom.getSecond()));
+ if (bottomMessage!=null)
+ fp.link(envelope, bottomMessage);
+ peService.setPropertyValue(envelope, ChoreographyUtil.MESSAGE_NAME, bottomMessageName);
+ } else if (hasBottomMessage && !shouldDrawBottomMessage) {
+ envelope = (ContainerShape) bottomConnections.get(bottomConnectionIndex).getEnd()
+ .eContainer();
+ peService.deletePictogramElement(bottomConnections.get(bottomConnectionIndex));
+ peService.deletePictogramElement(envelope);
+ envelope = null;
+ } else if (hasBottomMessage && shouldDrawBottomMessage && flow!=null) {
+ envelope = (ContainerShape) bottomConnections.get(bottomConnectionIndex).getEnd()
+ .eContainer();
+ setMessageLabel(bottomMessageName, envelope);
+ }
+ if (envelope!=null) {
+ // link up the message flow
+ linkMessageFlow(fp, flow, envelope);
+ }
+
+ for (ContainerShape bandShape : bandShapes) {
+ bpmnShape = BusinessObjectUtil.getFirstElementOfType(bandShape, BPMNShape.class);
+ Graphiti.getPeService().setPropertyValue(bandShape, ChoreographyUtil.MESSAGE_VISIBLE,
+ Boolean.toString(bpmnShape.isIsMessageVisible()));
+ }
+
+ return true;
+ }
+
+ private void linkMessageFlow(IFeatureProvider fp, MessageFlow flow,ContainerShape envelope) {
+ for (Anchor a : envelope.getAnchors()) {
+ for (Connection c : a.getIncomingConnections()) {
+ fp.link(c, flow);
+ }
+ for (Connection c : a.getOutgoingConnections()) {
+ fp.link(c, flow);
+ }
+ }
+ }
+
+ private boolean isFilled(List<ContainerShape> bands) {
+ boolean filled = true;
+ for (ContainerShape band : bands) {
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
+ if (!bpmnShape.isIsMessageVisible()) {
+ continue;
+ }
+ ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
+ if (bandKind == ParticipantBandKind.TOP_INITIATING || bandKind == ParticipantBandKind.BOTTOM_INITIATING
+ || bandKind == ParticipantBandKind.MIDDLE_INITIATING) {
+ filled = false;
+ break;
+ }
+ }
+ return filled;
+ }
+
+ private void setMessageLabel(String label, PictogramElement message) {
+ ContainerShape containerShape = (ContainerShape) message;
+ Iterator<Shape> iterator = peService.getAllContainedShapes(containerShape).iterator();
+ while (iterator.hasNext()) {
+ Shape shape = iterator.next();
+ if (shape.getGraphicsAlgorithm() instanceof Text) {
+ Text text = (Text) shape.getGraphicsAlgorithm();
+ text.setValue(label);
+ IDimension size = GraphitiUi.getUiLayoutService().calculateTextSize(label, text.getFont());
+ gaService.setSize(containerShape.getGraphicsAlgorithm(), ChoreographyUtil.ENV_W + size.getWidth() + 3, ChoreographyUtil.ENV_H);
+ gaService.setSize(text, size.getWidth(), size.getHeight());
+ peService.setPropertyValue(containerShape, ChoreographyUtil.MESSAGE_NAME, label);
+ break;
+ }
+ }
+ }
+
+ private String getMessageName(List<MessageFlow> messageFlows, List<ContainerShape> bands) {
+ for (ContainerShape band : bands) {
+ Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
+ if (bpmnShape.isIsMessageVisible()) {
+ for (MessageFlow flow : messageFlows) {
+ if (flow.getSourceRef().equals(participant)) {
+ return ChoreographyUtil.getMessageFlowName(flow);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ private MessageFlow getMessageFlow(List<MessageFlow> messageFlows, List<ContainerShape> bands) {
+ for (ContainerShape band : bands) {
+ Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
+ BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
+ if (bpmnShape.isIsMessageVisible()) {
+ for (MessageFlow flow : messageFlows) {
+ if (flow.getSourceRef().equals(participant)) {
+ return flow;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ private Message getMessage(List<MessageFlow> messageFlows, List<ContainerShape> bands, boolean create) {
+ MessageFlow flow = getMessageFlow(messageFlows, bands);
+ if (flow!=null) {
+ if (flow.getMessageRef()==null && create) {
+ Message msg = Bpmn2ModelerFactory.create(Message.class);
+ msg.setName(Messages.ChoreographyUtil_Undefined_Message);
+ ModelUtil.getDefinitions(flow).getRootElements().add(msg);
+ flow.setMessageRef(msg);
+ ModelUtil.setID(msg);
+ }
+ return flow.getMessageRef();
+ }
+ return null;
+ }
+
+ private ContainerShape drawMessageLink(String name, BoundaryAnchor boundaryAnchor, int x, int y, boolean filled) {
+ Diagram diagram = peService.getDiagramForAnchor(boundaryAnchor.anchor);
+
+ FreeFormConnection connection = peService.createFreeFormConnection(diagram);
+ Polyline connectionLine = gaService.createPolyline(connection);
+ connectionLine.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
+ connectionLine.setLineStyle(LineStyle.DOT);
+ connectionLine.setLineWidth(2);
+
+ ContainerShape envelope = peService.createContainerShape(diagram, true);
+ Rectangle invisibleRectangle = gaService.createInvisibleRectangle(envelope);
+ gaService.setLocation(invisibleRectangle, x, y);
+ gaService.setSize(invisibleRectangle, ChoreographyUtil.ENV_W + 50, ChoreographyUtil.ENV_H);
+
+ Shape envelopeShape = peService.createShape(envelope, false);
+ Envelope envelopeGa = ShapeDecoratorUtil.createEnvelope(envelopeShape, 0, 0, ChoreographyUtil.ENV_W, ChoreographyUtil.ENV_H);
+ IColorConstant color = filled ? IColorConstant.LIGHT_GRAY : IColorConstant.WHITE;
+ envelopeGa.rect.setFilled(true);
+ envelopeGa.rect.setBackground(gaService.manageColor(diagram, color));
+ envelopeGa.rect.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
+ envelopeGa.line.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
+ AnchorUtil.addFixedPointAnchors(envelope, envelopeGa.rect);
+
+ Shape textShape = peService.createShape(envelope, false);
+ Text text = gaService.createDefaultText(diagram, textShape);
+ IDimension size = GraphitiUi.getUiLayoutService().calculateTextSize(name, text.getFont());
+ gaService.setLocationAndSize(text, ChoreographyUtil.ENV_W + 3, 3, size.getWidth(), size.getHeight());
+ text.setValue(name);
+
+ gaService.setSize(invisibleRectangle, ChoreographyUtil.ENV_W + size.getWidth() + 3, ChoreographyUtil.ENV_H);
+
+ AnchorLocation envelopeAnchorLoc = null;
+ if (boundaryAnchor.locationType == AnchorLocation.TOP) {
+ envelopeAnchorLoc = AnchorLocation.BOTTOM;
+ } else {
+ envelopeAnchorLoc = AnchorLocation.TOP;
+ }
+
+ connection.setStart(boundaryAnchor.anchor);
+ connection.setEnd(AnchorUtil.getBoundaryAnchors(envelope).get(envelopeAnchorLoc).anchor);
+ peService.setPropertyValue(envelope, ChoreographyUtil.MESSAGE_LINK, Boolean.toString(true));
+ return envelope;
+ }
+
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/WhiteboxFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/WhiteboxFeature.java
index a483b326..0f962704 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/WhiteboxFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/WhiteboxFeature.java
@@ -25,7 +25,9 @@ import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BpmnDiFactory;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -72,7 +74,7 @@ public class WhiteboxFeature extends AbstractCustomFeature {
}
public String getText(Object element) {
- return ModelUtil.getDisplayName(element);
+ return ModelUtil.getTextValue(element);
}
public Image getImage(Object element) {
@@ -207,7 +209,7 @@ public class WhiteboxFeature extends AbstractCustomFeature {
if (changesDone) {
if (result==newDiagram) { // the new one
- String name = NLS.bind(Messages.WhiteboxFeature_Process_For, ModelUtil.getDisplayName(participant));
+ String name = NLS.bind(Messages.WhiteboxFeature_Process_For, ExtendedPropertiesProvider.getTextValue(participant));
process.setName(name);
newDiagram.setName(name);
definitions.getRootElements().add(process);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/messages.properties
index 4f8ad3ce..d2cd7275 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/choreography/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
AddChoreographyMessageFeature_Description=Add a Message definition to this Choreography Participant
AddChoreographyMessageFeature_Name=Add Message
AddChoreographyParticipantFeature_Description=Add a new Participant to this Choreography Task
@@ -9,7 +19,6 @@ CallChoreographyFeatureContainer_Description=Create Call Choreography
CallChoreographyFeatureContainer_Name=Call Choreography
ChoreographyTaskFeatureContainer_Description=Create Choreography Task
ChoreographyTaskFeatureContainer_Name=Choreography Task
-ChoreographyUtil_Undefined_Message=Undefined Message
RemoveChoreographyMessageFeature_Description=Remove the Message definition from this Choreography Participant
RemoveChoreographyMessageFeature_Name=Remove Message
ShowDiagramPageFeature_Description=Switch to the Diagram Page that contains the details of this activity
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/AbstractCreateConversationNodeFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/AbstractCreateConversationNodeFeature.java
new file mode 100644
index 00000000..4d1a5391
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/AbstractCreateConversationNodeFeature.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.conversation;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Collaboration;
+import org.eclipse.bpmn2.ConversationNode;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+
+public abstract class AbstractCreateConversationNodeFeature<T extends ConversationNode> extends AbstractBpmn2CreateFeature<ConversationNode> {
+
+ public AbstractCreateConversationNodeFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canCreate(ICreateContext context) {
+ if (context.getTargetContainer().equals(getDiagram())) {
+ // Only Participants are allowed in a Conversation
+ BPMNDiagram bpmnDiagram = BusinessObjectUtil.getFirstElementOfType(getDiagram(), BPMNDiagram.class);
+ BaseElement bpmnElement = bpmnDiagram.getPlane().getBpmnElement();
+ if (bpmnElement instanceof Collaboration) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Object[] create(ICreateContext context) {
+ T businessObject = createBusinessObject(context);
+ PictogramElement pe = addGraphicalRepresentation(context, businessObject);
+ return new Object[] { businessObject, pe };
+ }
+
+ @Override
+ public String getCreateImageId() {
+ return ImageProvider.IMG_16_CONVERSATION;
+ }
+
+ @Override
+ public String getCreateLargeImageId() {
+ return ImageProvider.IMG_16_CONVERSATION;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getBusinessObjectClass()
+ */
+ @Override
+ public abstract EClass getBusinessObjectClass();
+
+ @Override
+ public T createBusinessObject(ICreateContext context) {
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
+
+ T businessObject = (T) Bpmn2ModelerFactory.eINSTANCE.create(getBusinessObjectClass());
+ BPMNDiagram bpmnDiagram = BusinessObjectUtil.getFirstElementOfType(context.getTargetContainer(), BPMNDiagram.class);
+ mh.addConversationNode(bpmnDiagram,businessObject);
+ ModelUtil.setID(businessObject);
+ businessObject.setName(ModelUtil.toCanonicalString(businessObject.getId()));
+ putBusinessObject(context, businessObject);
+
+ return businessObject;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/conversation/AddConversationFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/AddConversationNodeFeature.java
index dbda3696..56b3cef1 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/features/conversation/AddConversationFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/AddConversationNodeFeature.java
@@ -10,13 +10,15 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.features.conversation;
+package org.eclipse.bpmn2.modeler.ui.features.conversation;
-import org.eclipse.bpmn2.Conversation;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.ConversationNode;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
@@ -24,16 +26,21 @@ import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.algorithms.Rectangle;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
-public class AddConversationFeature extends AbstractBpmn2AddElementFeature<Conversation> {
+public abstract class AddConversationNodeFeature<T extends ConversationNode> extends AbstractBpmn2AddFeature<T> {
- public AddConversationFeature(IFeatureProvider fp) {
+ public AddConversationNodeFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
return context.getTargetContainer().equals(getDiagram());
@@ -43,7 +50,7 @@ public class AddConversationFeature extends AbstractBpmn2AddElementFeature<Conve
public PictogramElement add(IAddContext context) {
IGaService gaService = Graphiti.getGaService();
IPeService peService = Graphiti.getPeService();
- Conversation businessObject = getBusinessObject(context);
+ T businessObject = getBusinessObject(context);
int width = this.getWidth(context);
int height = this.getHeight(context);
@@ -52,15 +59,14 @@ public class AddConversationFeature extends AbstractBpmn2AddElementFeature<Conve
Rectangle rect = gaService.createInvisibleRectangle(containerShape);
gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);
+ Shape hexShape = peService.createShape(containerShape, false);
int w_5th = width / 5;
int[] xy = { w_5th, 0, w_5th * 4, 0, width, height / 2, w_5th * 4, height, w_5th, height, 0, height / 2 };
- Polygon hexagon = gaService.createPolygon(rect, xy);
-
+ Polygon hexagon = gaService.createPolygon(hexShape, xy);
StyleUtil.applyStyle(hexagon, businessObject);
-
link(containerShape, businessObject);
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
@@ -74,14 +80,4 @@ public class AddConversationFeature extends AbstractBpmn2AddElementFeature<Conve
return containerShape;
}
-
- @Override
- public int getHeight() {
- return 30;
- }
-
- @Override
- public int getWidth() {
- return 30;
- }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CallConversationFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CallConversationFeatureContainer.java
new file mode 100644
index 00000000..440f36c3
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/CallConversationFeatureContainer.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.conversation;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.CallConversation;
+import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.AbstractExpandableActivityFeatureContainer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
+import org.eclipse.graphiti.mm.algorithms.AbstractText;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+
+public class CallConversationFeatureContainer extends AbstractExpandableActivityFeatureContainer {
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof CallConversation;
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new AbstractCreateConversationNodeFeature<CallConversation>(fp) {
+
+ @Override
+ public String getCreateImageId() {
+ return ImageProvider.IMG_16_CALL_CONVERSATION;
+ }
+
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getCallConversation();
+ }
+ };
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddConversationNodeFeature<CallConversation>(fp) {
+ @Override
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, CallConversation businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
+ Shape hexShape = containerShape.getChildren().get(0);
+ hexShape.getGraphicsAlgorithm().setLineWidth(4);
+ }
+
+ @Override
+ public Class getBusinessObjectType() {
+ return CallConversation.class;
+ }
+ };
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateLabelFeature(fp) {
+
+ @Override
+ protected LabelPosition getLabelPosition(AbstractText text) {
+ return LabelPosition.SOUTH;
+ }
+ });
+ return multiUpdate;
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return null;
+ }
+
+ @Override
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new DefaultMoveBPMNShapeFeature(fp);
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new DefaultResizeShapeFeature(fp) {
+ @Override
+ public boolean canResizeShape(IResizeShapeContext context) {
+ return false;
+ }
+ };
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new AbstractDefaultDeleteFeature(fp);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationFeatureContainer.java
index 1513e2b2..cb88e172 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationFeatureContainer.java
@@ -12,17 +12,18 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.conversation;
+import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Conversation;
+import org.eclipse.bpmn2.SubConversation;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNConnectionFeature;
import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.features.DirectEditBaseElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.conversation.AddConversationFeature;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
@@ -40,22 +41,36 @@ public class ConversationFeatureContainer extends BaseElementFeatureContainer {
@Override
public ICreateFeature getCreateFeature(IFeatureProvider fp) {
- return new CreateConversationFeature(fp);
+ return new AbstractCreateConversationNodeFeature<SubConversation>(fp) {
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getConversation();
+ }
+ };
}
@Override
public IAddFeature getAddFeature(IFeatureProvider fp) {
- return new AddConversationFeature(fp);
+ return new AddConversationNodeFeature<Conversation>(fp) {
+
+ @Override
+ public Class getBusinessObjectType() {
+ return Conversation.class;
+ }
+
+ };
}
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return null;
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
}
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new DefaultLayoutBPMNConnectionFeature(fp);
+ return null;
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationLinkFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationLinkFeatureContainer.java
index f15e05c1..9d7ccdd5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationLinkFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/ConversationLinkFeatureContainer.java
@@ -12,42 +12,29 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.conversation;
-import java.io.IOException;
-import java.util.List;
-
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.Conversation;
import org.eclipse.bpmn2.ConversationLink;
-import org.eclipse.bpmn2.EndEvent;
-import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.InteractionNode;
-import org.eclipse.bpmn2.MessageEventDefinition;
-import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.features.BaseElementConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractAddFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractCreateFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractReconnectFlowFeature;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateConnectionFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReconnectionFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IContext;
-import org.eclipse.graphiti.features.context.ICreateConnectionContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.algorithms.Polyline;
-import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.mm.pictograms.Connection;
public class ConversationLinkFeatureContainer extends BaseElementConnectionFeatureContainer {
@@ -73,6 +60,11 @@ public class ConversationLinkFeatureContainer extends BaseElementConnectionFeatu
}
@Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ return new UpdateLabelFeature(fp);
+ }
+
+ @Override
public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
return new DefaultDeleteBPMNShapeFeature(fp) {
@Override
@@ -107,15 +99,18 @@ public class ConversationLinkFeatureContainer extends BaseElementConnectionFeatu
return connectionLine;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- protected Class<? extends BaseElement> getBoClass() {
+ public Class getBusinessObjectType() {
return ConversationLink.class;
}
}
public static class CreateConversationLinkFeature extends AbstractCreateFlowFeature<ConversationLink, Participant, Conversation> {
public CreateConversationLinkFeature(IFeatureProvider fp) {
- super(fp, Messages.ConversationLinkFeatureContainer_Name, Messages.ConversationLinkFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java
new file mode 100644
index 00000000..84361ec5
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/Messages.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.conversation;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.features.conversation.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/SubConversationFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/SubConversationFeatureContainer.java
new file mode 100644
index 00000000..8244ef40
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/SubConversationFeatureContainer.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.conversation;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.SubConversation;
+import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNConnectionFeature;
+import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.AbstractExpandableActivityFeatureContainer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+
+public class SubConversationFeatureContainer extends AbstractExpandableActivityFeatureContainer {
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof SubConversation;
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new AbstractCreateConversationNodeFeature<SubConversation>(fp) {
+
+ @Override
+ public String getCreateImageId() {
+ return ImageProvider.IMG_16_SUB_CONVERSATION;
+ }
+
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getSubConversation();
+ }
+ };
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddConversationNodeFeature<SubConversation>(fp) {
+ @Override
+ protected void decorateShape(IAddContext context, ContainerShape containerShape, SubConversation businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
+ ShapeDecoratorUtil.showActivityMarker(containerShape, GraphitiConstants.ACTIVITY_MARKER_EXPAND);
+ }
+
+ @Override
+ public Class getBusinessObjectType() {
+ return SubConversation.class;
+ }
+ };
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return null;
+ }
+
+ @Override
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new DefaultMoveBPMNShapeFeature(fp);
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new DefaultResizeShapeFeature(fp) {
+ @Override
+ public boolean canResizeShape(IResizeShapeContext context) {
+ return false;
+ }
+ };
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new AbstractDefaultDeleteFeature(fp);
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties
new file mode 100644
index 00000000..46088efb
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/conversation/messages.properties
@@ -0,0 +1,10 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/AbstractDataFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/AbstractDataFeatureContainer.java
index 25fe439b..09c8f7da 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/AbstractDataFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/AbstractDataFeatureContainer.java
@@ -20,21 +20,16 @@ import org.eclipse.bpmn2.DataObjectReference;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.data.MoveDataFeature;
-import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.bpmn2.modeler.ui.features.LayoutBaseElementTextFeature;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
-import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IDeleteContext;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.features.context.impl.DeleteContext;
@@ -46,26 +41,15 @@ import org.eclipse.graphiti.services.Graphiti;
public abstract class AbstractDataFeatureContainer extends BaseElementFeatureContainer {
@Override
- public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return new UpdateLabelFeature(fp);
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new MoveDataFeature(fp);
}
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutBaseElementTextFeature(fp) {
-
- @Override
- public int getMinimumWidth() {
- return GraphicsUtil.DATA_WIDTH;
- }
- };
+ return null;
}
-
- @Override
- public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
- return new MoveDataFeature(fp);
- }
-
+
@Override
public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
return new DefaultResizeShapeFeature(fp) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataInputFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataInputFeatureContainer.java
index a0b2980c..acdd1eb0 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataInputFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataInputFeatureContainer.java
@@ -12,24 +12,21 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.data;
-import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataInput;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.data.AbstractCreateDataInputOutputFeature;
import org.eclipse.bpmn2.modeler.core.features.data.AddDataFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
@@ -50,20 +47,24 @@ public class DataInputFeatureContainer extends AbstractDataFeatureContainer {
return new AddDataInputFeature(fp);
}
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateItemAwareElementFeature<DataInput>(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
+ }
+
public class AddDataInputFeature extends AddDataFeature<DataInput> {
public AddDataInputFeature(IFeatureProvider fp) {
super(fp);
}
@Override
- protected boolean isSupportCollectionMarkers() {
- return false;
- }
-
- @Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, DataInput businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
Polygon p = (Polygon)getGraphicsAlgorithm(containerShape);
- Polygon arrow = GraphicsUtil.createDataArrow(p);
+ Polygon arrow = ShapeDecoratorUtil.createDataArrow(p);
arrow.setFilled(false);
arrow.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
}
@@ -72,12 +73,20 @@ public class DataInputFeatureContainer extends AbstractDataFeatureContainer {
public String getName(DataInput t) {
return t.getName();
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return DataInput.class;
+ }
}
public static class CreateDataInputFeature extends AbstractCreateDataInputOutputFeature<DataInput> {
public CreateDataInputFeature(IFeatureProvider fp) {
- super(fp, Messages.DataInputFeatureContainer_Name, Messages.DataInputFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectFeatureContainer.java
index 8155e1b6..1f8042e1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectFeatureContainer.java
@@ -12,25 +12,22 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.data;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.bpmn2.Bpmn2Factory;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataObject;
import org.eclipse.bpmn2.DataObjectReference;
+import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.FlowElement;
-import org.eclipse.bpmn2.impl.DataObjectImpl;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.data.AddDataFeature;
import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EClass;
@@ -41,6 +38,11 @@ import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.internal.util.ui.PopupMenu;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -68,8 +70,33 @@ public class DataObjectFeatureContainer extends AbstractDataFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateDataObjectFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateLabelFeature(fp));
+ multiUpdate.addFeature(new UpdateItemAwareElementFeature<DataObject>(fp) {
+ @Override
+ public boolean update(IUpdateContext context) {
+ if (super.update(context)) {
+
+ // Also update any DataObjectReferences
+ Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
+ Definitions definitions = ModelUtil.getDefinitions(bo);
+ TreeIterator<EObject> iter = definitions.eAllContents();
+ while (iter.hasNext()) {
+ EObject o = iter.next();
+ if (o instanceof DataObjectReference) {
+ for (PictogramElement pe : Graphiti.getLinkService().getPictogramElements(getDiagram(), o)) {
+ if (pe instanceof ContainerShape) {
+ UpdateContext newContext = new UpdateContext(pe);
+ IUpdateFeature f = this.getFeatureProvider().getUpdateFeature(newContext);
+ f.update(newContext);
+ }
+ }
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+ });
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
return multiUpdate;
}
@@ -82,6 +109,14 @@ public class DataObjectFeatureContainer extends AbstractDataFeatureContainer {
public String getName(DataObject t) {
return t.getName();
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return DataObject.class;
+ }
}
public static class CreateDataObjectFeature extends AbstractCreateFlowElementFeature<FlowElement> {
@@ -116,7 +151,7 @@ public class DataObjectFeatureContainer extends AbstractDataFeatureContainer {
};
public CreateDataObjectFeature(IFeatureProvider fp) {
- super(fp, Messages.DataObjectFeatureContainer_Name, Messages.DataObjectFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -140,21 +175,19 @@ public class DataObjectFeatureContainer extends AbstractDataFeatureContainer {
@Override
public FlowElement createBusinessObject(ICreateContext context) {
changesDone = true;
- FlowElement bo = null;
- try {
- DataObjectReference dataObjectReference = null;
- DataObject dataObject = null;
- ModelHandler mh = ModelHandler.getInstance(getDiagram());
- dataObjectReference = Bpmn2ModelerFactory.create(DataObjectReference.class);
- dataObject = Bpmn2ModelerFactory.create(DataObject.class);
- String oldName = dataObject.getName();
- dataObject.setName(Messages.DataObjectFeatureContainer_New);
- dataObject.setId(null);
- EObject targetBusinessObject = (EObject)getBusinessObjectForPictogramElement(context.getTargetContainer());
-
- // NOTE: this code removed. A DataObjectReference may reference DataObjects
- // from any other container (Process) in the BPMN file, not just those defined
- // within the same container as the target (context.getTargetContainer())
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
+
+ FlowElement flowElement = null;
+ DataObjectReference dataObjectReference = Bpmn2ModelerFactory.create(DataObjectReference.class);
+ DataObject dataObject = Bpmn2ModelerFactory.create(DataObject.class);
+ String oldName = dataObject.getName();
+ dataObject.setName(Messages.DataObjectFeatureContainer_New);
+ dataObject.setId(null);
+ EObject targetBusinessObject = (EObject)getBusinessObjectForPictogramElement(context.getTargetContainer());
+
+ // NOTE: this code removed. A DataObjectReference may reference DataObjects
+ // from any other container (Process) in the BPMN file, not just those defined
+ // within the same container as the target (context.getTargetContainer())
// Object containerBO = container;
// if (container instanceof BPMNDiagram) {
// containerBO = ((BPMNDiagram)container).getPlane().getBpmnElement();
@@ -165,54 +198,54 @@ public class DataObjectFeatureContainer extends AbstractDataFeatureContainer {
// containerBO = laneSet.eContainer();
// }
- List<DataObject> dataObjectList = new ArrayList<DataObject>();
- dataObjectList.add(dataObject);
- TreeIterator<EObject> iter = ModelUtil.getDefinitions(targetBusinessObject).eAllContents();
- while (iter.hasNext()) {
- EObject obj = iter.next();
- if (obj instanceof DataObject) // removed, see above: && obj.eContainer() == containerBO)
- dataObjectList.add((DataObject) obj);
- }
+ List<DataObject> dataObjectList = new ArrayList<DataObject>();
+ dataObjectList.add(dataObject);
+ TreeIterator<EObject> iter = ModelUtil.getDefinitions(targetBusinessObject).eAllContents();
+ while (iter.hasNext()) {
+ EObject obj = iter.next();
+ if (obj instanceof DataObject) // removed, see above: && obj.eContainer() == containerBO)
+ dataObjectList.add((DataObject) obj);
+ }
- DataObject result = dataObject;
- if (dataObjectList.size() > 1) {
- PopupMenu popupMenu = new PopupMenu(dataObjectList, labelProvider);
- changesDone = popupMenu.show(Display.getCurrent().getActiveShell());
- if (changesDone) {
- result = (DataObject) popupMenu.getResult();
- }
- else {
- EcoreUtil.delete(dataObject);
- EcoreUtil.delete(dataObjectReference);
- }
- }
+ DataObject result = dataObject;
+ if (dataObjectList.size() > 1) {
+ PopupMenu popupMenu = new PopupMenu(dataObjectList, labelProvider);
+ changesDone = popupMenu.show(Display.getCurrent().getActiveShell());
if (changesDone) {
- if (result == dataObject) { // the new one
- mh.addFlowElement(targetBusinessObject,dataObject);
- ModelUtil.setID(dataObject);
- dataObject.setIsCollection(false);
- dataObject.setName(oldName);
- bo = dataObject;
- } else {
- mh.addFlowElement(targetBusinessObject,dataObjectReference);
- ModelUtil.setID(dataObjectReference);
- dataObjectReference.setName(
- NLS.bind(
- Messages.DataObjectFeatureContainer_Default_Name,
- result.getName()
- )
- );
- dataObjectReference.setDataObjectRef(result);
- dataObject = result;
- bo = dataObjectReference;
- }
- putBusinessObject(context, bo);
+ result = (DataObject) popupMenu.getResult();
+ }
+ else {
+ EcoreUtil.delete(dataObject);
+ EcoreUtil.delete(dataObjectReference);
}
-
- } catch (IOException e) {
- Activator.showErrorWithLogging(e);
}
- return bo;
+ else
+ changesDone = true;
+
+ if (changesDone) {
+ if (result == dataObject) { // the new one
+ mh.addFlowElement(targetBusinessObject,dataObject);
+ ModelUtil.setID(dataObject);
+ dataObject.setIsCollection(false);
+ dataObject.setName(oldName);
+ flowElement = dataObject;
+ } else {
+ mh.addFlowElement(targetBusinessObject,dataObjectReference);
+ ModelUtil.setID(dataObjectReference);
+ dataObjectReference.setName(
+ NLS.bind(
+ Messages.DataObjectFeatureContainer_Default_Name,
+ result.getName()
+ )
+ );
+ dataObjectReference.setDataObjectRef(result);
+ dataObject = result;
+ flowElement = dataObjectReference;
+ }
+ putBusinessObject(context, flowElement);
+ }
+
+ return flowElement;
}
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectReferenceFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectReferenceFeatureContainer.java
index b98a2b7b..2a683763 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectReferenceFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataObjectReferenceFeatureContainer.java
@@ -24,6 +24,7 @@ import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class DataObjectReferenceFeatureContainer extends AbstractDataFeatureContainer {
@@ -45,8 +46,15 @@ public class DataObjectReferenceFeatureContainer extends AbstractDataFeatureCont
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateDataObjectFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateLabelFeature(fp));
+ multiUpdate.addFeature(new UpdateItemAwareElementFeature<DataObjectReference>(fp) {
+ @Override
+ protected Object getBusinessObjectForPictogramElement(PictogramElement pe) {
+ DataObjectReference object = (DataObjectReference)super.getBusinessObjectForPictogramElement(pe);
+ return object.getDataObjectRef();
+ }
+
+ });
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
return multiUpdate;
}
@@ -59,12 +67,20 @@ public class DataObjectReferenceFeatureContainer extends AbstractDataFeatureCont
public String getName(DataObjectReference t) {
return t.getName();
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return DataObjectReference.class;
+ }
}
public static class CreateDataObjectReferenceFeature extends AbstractCreateFlowElementFeature<DataObjectReference> {
public CreateDataObjectReferenceFeature(IFeatureProvider fp) {
- super(fp, Messages.DataObjectReferenceFeatureContainer_Name, Messages.DataObjectReferenceFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataOutputFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataOutputFeatureContainer.java
index 61413893..6e9e74a4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataOutputFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataOutputFeatureContainer.java
@@ -12,29 +12,21 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.data;
-import java.io.IOException;
-
-import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.DataInput;
import org.eclipse.bpmn2.DataOutput;
-import org.eclipse.bpmn2.ItemAwareElement;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.data.AbstractCreateDataInputOutputFeature;
import org.eclipse.bpmn2.modeler.core.features.data.AddDataFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
@@ -55,20 +47,24 @@ public class DataOutputFeatureContainer extends AbstractDataFeatureContainer {
return new AddDataOutputFeature(fp);
}
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateItemAwareElementFeature<DataOutput>(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
+ }
+
public class AddDataOutputFeature extends AddDataFeature<DataOutput> {
public AddDataOutputFeature(IFeatureProvider fp) {
super(fp);
}
@Override
- protected boolean isSupportCollectionMarkers() {
- return false;
- }
-
- @Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, DataOutput businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
Polygon p = (Polygon)getGraphicsAlgorithm(containerShape);
- Polygon arrow = GraphicsUtil.createDataArrow(p);
+ Polygon arrow = ShapeDecoratorUtil.createDataArrow(p);
arrow.setFilled(true);
arrow.setBackground(manageColor(StyleUtil.CLASS_FOREGROUND));
arrow.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
@@ -78,12 +74,20 @@ public class DataOutputFeatureContainer extends AbstractDataFeatureContainer {
public String getName(DataOutput t) {
return t.getName();
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return DataOutput.class;
+ }
}
public static class CreateDataOutputFeature extends AbstractCreateDataInputOutputFeature<DataOutput> {
public CreateDataOutputFeature(IFeatureProvider fp) {
- super(fp, Messages.DataOutputFeatureContainer_Name, Messages.DataOutputFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java
index c61579ea..983ca8f7 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java
@@ -12,30 +12,26 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.data;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataStore;
import org.eclipse.bpmn2.DataStoreReference;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
import org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.data.MoveDataFeature;
-import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.bpmn2.modeler.ui.features.LayoutBaseElementTextFeature;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -43,7 +39,6 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
@@ -52,16 +47,14 @@ import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.context.ITargetContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.Rectangle;
-import org.eclipse.graphiti.mm.algorithms.Text;
-import org.eclipse.graphiti.mm.algorithms.styles.Orientation;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
@@ -80,6 +73,11 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
}
@Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return null;
+ }
+
+ @Override
public ICreateFeature getCreateFeature(IFeatureProvider fp) {
return new CreateDataStoreReferenceFeature(fp);
}
@@ -91,18 +89,10 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return new UpdateLabelFeature(fp);
- }
-
- @Override
- public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutBaseElementTextFeature(fp) {
-
- @Override
- public int getMinimumWidth() {
- return 50;
- }
- };
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateItemAwareElementFeature<DataStoreReference>(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
}
@Override
@@ -120,11 +110,15 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
};
}
- public class AddDataStoreReferenceFeature extends AbstractBpmn2AddElementFeature<DataStoreReference> {
+ public class AddDataStoreReferenceFeature extends AbstractBpmn2AddFeature<DataStoreReference> {
public AddDataStoreReferenceFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
return true;
@@ -132,12 +126,10 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
@Override
public PictogramElement add(IAddContext context) {
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
DataStoreReference businessObject = getBusinessObject(context);
- int width = this.getWidth();
- int height = this.getHeight();
+ int width = getWidth(context);
+ int height = getHeight(context);
ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
@@ -165,7 +157,7 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
xy = new int[] { 0, 11, whalf, 0, width, 11 };
Polyline lineTop = gaService.createPolyline(invisibleRect, xy, bend);
lineTop.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
// hook for subclasses to inject extra code
@@ -176,24 +168,19 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
peService.createChopboxAnchor(containerShape);
AnchorUtil.addFixedPointAnchors(containerShape, invisibleRect);
- layoutPictogramElement(containerShape);
-
- // change the AddContext and prepare it to add a label below the figure
- prepareAddContext(context, containerShape, width, height);
- IFeatureContainer fc = new LabelFeatureContainer();
- fc.getAddFeature(getFeatureProvider()).add(context);
-
return containerShape;
}
- @Override
- public int getHeight() {
- return 50;
+ protected boolean isHorizontal(ITargetContext context) {
+ return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public int getWidth() {
- return 50;
+ public Class getBusinessObjectType() {
+ return DataStoreReference.class;
}
}
@@ -229,7 +216,7 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
};
public CreateDataStoreReferenceFeature(IFeatureProvider fp) {
- super(fp, Messages.DataStoreReferenceFeatureContainer_Name, Messages.DataStoreReferenceFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -259,11 +246,9 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
// which is the target of the ICreateContext. In addition, if the new DataStoreReference refers
// to a new DataStore, one is created and added to Definitions.
changesDone = true;
- DataStoreReference bo = null;
- try {
ModelHandler mh = ModelHandler.getInstance(getDiagram());
- bo = Bpmn2ModelerFactory.create(DataStoreReference.class);
+ DataStoreReference dataStoreRef = Bpmn2ModelerFactory.create(DataStoreReference.class);
DataStore dataStore = Bpmn2ModelerFactory.create(DataStore.class);
String oldName = dataStore.getName();
dataStore.setName(Messages.DataStoreReferenceFeatureContainer_New);
@@ -287,33 +272,33 @@ public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContai
}
else {
EcoreUtil.delete(dataStore);
- EcoreUtil.delete(bo);
- bo = null;
+ EcoreUtil.delete(dataStoreRef);
+ dataStoreRef = null;
}
}
+ else
+ changesDone = true;
+
if (changesDone) {
if (result == dataStore) { // the new one
mh.addRootElement(dataStore);
ModelUtil.setID(dataStore);
dataStore.setName(oldName);
- bo.setName(dataStore.getName());
+ dataStoreRef.setName(dataStore.getName());
} else
- bo.setName(
+ dataStoreRef.setName(
NLS.bind(
Messages.DataStoreReferenceFeatureContainer_Default_Name,
result.getName()
)
);
- bo.setDataStoreRef(result);
- ModelUtil.setID(bo, mh.getResource());
- putBusinessObject(context, bo);
+ dataStoreRef.setDataStoreRef(result);
+ ModelUtil.setID(dataStoreRef, mh.getResource());
+ putBusinessObject(context, dataStoreRef);
}
- } catch (IOException e) {
- Activator.showErrorWithLogging(e);
- }
- return bo;
+ return dataStoreRef;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java.orig b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java.orig
new file mode 100644
index 00000000..60474b4e
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java.orig
@@ -0,0 +1,326 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.DataStore;
+import org.eclipse.bpmn2.DataStoreReference;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java
+import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.data.MoveDataFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+=======
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.data.MoveDataFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.context.ITargetContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
+import org.eclipse.graphiti.mm.algorithms.Polygon;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+import org.eclipse.graphiti.ui.internal.util.ui.PopupMenu;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+public class DataStoreReferenceFeatureContainer extends BaseElementFeatureContainer {
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof DataStoreReference;
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return null;
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateDataStoreReferenceFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddDataStoreReferenceFeature(fp);
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateItemAwareElementFeature<DataStoreReference>(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
+ }
+
+ @Override
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new MoveDataFeature(fp);
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new DefaultResizeShapeFeature(fp) {
+ @Override
+ public boolean canResizeShape(IResizeShapeContext context) {
+ return false;
+ }
+ };
+ }
+
+ public class AddDataStoreReferenceFeature extends AbstractBpmn2AddFeature<DataStoreReference> {
+ public AddDataStoreReferenceFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return true;
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ DataStoreReference businessObject = getBusinessObject(context);
+
+ int width = getWidth(context);
+ int height = getHeight(context);
+
+ ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
+ Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
+ gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height);
+
+ int whalf = width / 2;
+
+ int[] xy = { 0, 10, whalf, 20, width, 10, width, height - 10, whalf, height, 0, height - 10 };
+ int[] bend = { 0, 0, whalf, whalf, 0, 0, 0, 0, whalf, whalf, 0, 0 };
+ Polygon polygon = gaService.createPolygon(invisibleRect, xy, bend);
+ polygon.setFilled(true);
+ // polygon.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+
+ StyleUtil.applyStyle(polygon, businessObject);
+
+ xy = new int[] { 0, 14, whalf, 24, width, 14 };
+ bend = new int[] { 0, 0, whalf, whalf, 0, 0 };
+ Polyline line1 = gaService.createPolyline(invisibleRect, xy, bend);
+ line1.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+
+ xy = new int[] { 0, 18, whalf, 28, width, 18 };
+ Polyline line2 = gaService.createPolyline(invisibleRect, xy, bend);
+ line2.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+
+ xy = new int[] { 0, 11, whalf, 0, width, 11 };
+ Polyline lineTop = gaService.createPolyline(invisibleRect, xy, bend);
+ lineTop.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ createDIShape(containerShape, businessObject, !isImport);
+
+ // hook for subclasses to inject extra code
+ ((AddContext)context).setWidth(width);
+ ((AddContext)context).setHeight(height);
+ decorateShape(context, containerShape, businessObject);
+
+ peService.createChopboxAnchor(containerShape);
+ AnchorUtil.addFixedPointAnchors(containerShape, invisibleRect);
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java
+
+ layoutPictogramElement(containerShape);
+
+ // change the AddContext and prepare it to add a label below the figure
+ prepareAddContext(context, containerShape, width, height);
+ IFeatureContainer fc = new LabelFeatureContainer();
+ fc.getAddFeature(getFeatureProvider()).add(context);
+=======
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/DataStoreReferenceFeatureContainer.java
+
+ return containerShape;
+ }
+
+ protected boolean isHorizontal(ITargetContext context) {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return DataStoreReference.class;
+ }
+ }
+
+ public static class CreateDataStoreReferenceFeature extends AbstractCreateFlowElementFeature<DataStoreReference> {
+
+ private static ILabelProvider labelProvider = new ILabelProvider() {
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void dispose() {
+
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+
+ }
+
+ public String getText(Object element) {
+ if (((DataStore) element).getId() == null)
+ return ((DataStore) element).getName();
+ return NLS.bind(Messages.DataStoreReferenceFeatureContainer_Ref, ((DataStore) element).getName());
+ }
+
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ };
+
+ public CreateDataStoreReferenceFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_DATA_STORE;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.core.features.AbstractCreateFlowElementFeature
+ * #getFlowElementClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getDataStoreReference();
+ }
+
+ @Override
+ public DataStoreReference createBusinessObject(ICreateContext context) {
+ // NOTE: this is slightly different from DataObject/DataObjectReference:
+ // Both DataObject and DataObjectReference instances are contained in some FlowElementContainer
+ // (e.g. a Process) whereas DataStore instances are contained in the root element "Definitions".
+ // This means that whenever the user creates a "Data Store" (using DND from the tool palette),
+ // it necessarily means that a DataStoreReference is created and added to the FlowElementContainer
+ // which is the target of the ICreateContext. In addition, if the new DataStoreReference refers
+ // to a new DataStore, one is created and added to Definitions.
+ changesDone = true;
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
+
+ DataStoreReference dataStoreRef = Bpmn2ModelerFactory.create(DataStoreReference.class);
+ DataStore dataStore = Bpmn2ModelerFactory.create(DataStore.class);
+ String oldName = dataStore.getName();
+ dataStore.setName(Messages.DataStoreReferenceFeatureContainer_New);
+ dataStore.setId(null);
+
+ List<DataStore> dataStoreList = new ArrayList<DataStore>();
+ dataStoreList.add(dataStore);
+ TreeIterator<EObject> iter = mh.getDefinitions().eAllContents();
+ while (iter.hasNext()) {
+ EObject obj = iter.next();
+ if (obj instanceof DataStore)
+ dataStoreList.add((DataStore) obj);
+ }
+
+ DataStore result = dataStore;
+ if (dataStoreList.size() > 1) {
+ PopupMenu popupMenu = new PopupMenu(dataStoreList, labelProvider);
+ changesDone = popupMenu.show(Display.getCurrent().getActiveShell());
+ if (changesDone) {
+ result = (DataStore) popupMenu.getResult();
+ }
+ else {
+ EcoreUtil.delete(dataStore);
+ EcoreUtil.delete(dataStoreRef);
+ dataStoreRef = null;
+ }
+ }
+ else
+ changesDone = true;
+
+ if (changesDone) {
+ if (result == dataStore) { // the new one
+ mh.addRootElement(dataStore);
+ ModelUtil.setID(dataStore);
+ dataStore.setName(oldName);
+ dataStoreRef.setName(dataStore.getName());
+ } else
+ dataStoreRef.setName(
+ NLS.bind(
+ Messages.DataStoreReferenceFeatureContainer_Default_Name,
+ result.getName()
+ )
+ );
+
+ dataStoreRef.setDataStoreRef(result);
+ ModelUtil.setID(dataStoreRef, mh.getResource());
+ putBusinessObject(context, dataStoreRef);
+ }
+
+ return dataStoreRef;
+ }
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider context) {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java
index a12539d5..c12f8a70 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java
@@ -19,26 +19,24 @@ import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.Message;
import org.eclipse.bpmn2.MessageFlow;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
-import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.features.data.AbstractCreateRootElementFeature;
-import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Envelope;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.Envelope;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.bpmn2.modeler.ui.features.LayoutBaseElementTextFeature;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.ui.features.flow.MessageFlowFeatureContainer;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -46,7 +44,6 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
@@ -124,6 +121,11 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
}
@Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return null;
+ }
+
+ @Override
public ICreateFeature getCreateFeature(IFeatureProvider fp) {
return new CreateMessageFeature(fp);
}
@@ -144,16 +146,6 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
}
@Override
- public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutBaseElementTextFeature(fp) {
- @Override
- public int getMinimumWidth() {
- return 30;
- }
- };
- }
-
- @Override
public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
return new MoveMessageFeature(fp);
}
@@ -168,11 +160,15 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
};
}
- public class AddMessageFeature extends AbstractBpmn2AddElementFeature<Message> {
+ public class AddMessageFeature extends AbstractBpmn2AddFeature<Message> {
public AddMessageFeature(IFeatureProvider fp) {
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
return true;
@@ -180,8 +176,6 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
@Override
public PictogramElement add(IAddContext context) {
- IGaService gaService = Graphiti.getGaService();
- IPeService peService = Graphiti.getPeService();
Message businessObject = getBusinessObject(context);
// if the Message is being dropped onto a MessageFlow, associate it with that flow
@@ -190,20 +184,20 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
if (containerShape!=null)
return containerShape;
- int width = this.getWidth();
- int height = this.getHeight();
+ int width = getWidth(context);
+ int height = getHeight(context);
containerShape = peService.createContainerShape(context.getTargetContainer(), true);
Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height);
- Envelope envelope = GraphicsUtil.createEnvelope(invisibleRect, 0, 0, width, height);
+ Envelope envelope = ShapeDecoratorUtil.createEnvelope(invisibleRect, 0, 0, width, height);
envelope.rect.setFilled(true);
StyleUtil.applyStyle(envelope.rect, businessObject);
envelope.line.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
if (context.getProperty(IS_REFERENCE)==null) {
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
createDIShape(containerShape, businessObject, !isImport);
}
else {
@@ -218,13 +212,6 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
peService.createChopboxAnchor(containerShape);
AnchorUtil.addFixedPointAnchors(containerShape, invisibleRect);
- layoutPictogramElement(containerShape);
-
- // change the AddContext and prepare it to add a label below the figure
- prepareAddContext(context, containerShape, width, height);
- IFeatureContainer fc = new LabelFeatureContainer();
- fc.getAddFeature(getFeatureProvider()).add(context);
-
return containerShape;
}
@@ -254,14 +241,12 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public int getHeight() {
- return ENVELOPE_HEIGHT;
- }
-
- @Override
- public int getWidth() {
- return ENVELOPE_WIDTH;
+ public Class getBusinessObjectType() {
+ return Message.class;
}
}
@@ -298,7 +283,7 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
};
public CreateMessageFeature(IFeatureProvider fp) {
- super(fp, Messages.MessageFeatureContainer_Name, Messages.MessageFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -342,6 +327,9 @@ public class MessageFeatureContainer extends BaseElementFeatureContainer {
message = null;
}
}
+ else
+ changesDone = true;
+
if (changesDone) {
if (result == message) {
// the new one
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java.orig b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java.orig
new file mode 100644
index 00000000..3680fce8
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java.orig
@@ -0,0 +1,415 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.Message;
+import org.eclipse.bpmn2.MessageFlow;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java
+import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.data.AbstractCreateRootElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+=======
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.features.data.AbstractCreateRootElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.Envelope;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.ui.ImageProvider;
+import org.eclipse.bpmn2.modeler.ui.features.flow.MessageFlowFeatureContainer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.ICreateFeature;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ICreateContext;
+import org.eclipse.graphiti.features.context.IMoveShapeContext;
+import org.eclipse.graphiti.features.context.IPictogramElementContext;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.context.ITargetConnectionContext;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
+import org.eclipse.graphiti.mm.algorithms.Rectangle;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+import org.eclipse.graphiti.ui.internal.util.ui.PopupMenu;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+public class MessageFeatureContainer extends BaseElementFeatureContainer {
+
+ public static final int ENVELOPE_WIDTH = 30;
+ public static final int ENVELOPE_HEIGHT = 20;
+ public static final String IS_REFERENCE = "is.reference"; //$NON-NLS-1$
+
+ @Override
+ public Object getApplyObject(IContext context) {
+ Object object = super.getApplyObject(context);
+ if (object instanceof Message &&
+ !isChoreographyMessage(context) &&
+ !isMessageFlowMessage(context)) {
+ return object;
+ }
+ return null;
+ }
+
+ @Override
+ public boolean canApplyTo(Object o) {
+ return super.canApplyTo(o) && o instanceof Message;
+ }
+
+ public static boolean isMessageFlowMessage(IContext context) {
+ // This Feature Container DOES NOT handle Messages attached
+ // to Message Flows.
+ // See MessageFlowFeatureContainer instead.
+ if (context instanceof IPictogramElementContext) {
+ PictogramElement pe = ((IPictogramElementContext)context).getPictogramElement();
+ MessageFlow mf = MessageFlowFeatureContainer.getMessageFlow(pe);
+ return mf != null;
+ }
+ return false;
+ }
+
+ public static boolean isChoreographyMessage(IContext context) {
+ // This Feature Container DOES NOT handle Messages attached
+ // to Choreography Participant Bands.
+ // See ChoreographyMessageLinkFeatureContainer instead.
+ if (context instanceof IPictogramElementContext) {
+ PictogramElement pe = ((IPictogramElementContext)context).getPictogramElement();
+ if (ChoreographyUtil.isChoreographyMessage(pe))
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return null;
+ }
+
+ @Override
+ public ICreateFeature getCreateFeature(IFeatureProvider fp) {
+ return new CreateMessageFeature(fp);
+ }
+
+ @Override
+ public IAddFeature getAddFeature(IFeatureProvider fp) {
+ return new AddMessageFeature(fp);
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new DeleteMessageFeature(fp);
+ }
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ return new UpdateLabelFeature(fp);
+ }
+
+ @Override
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new MoveMessageFeature(fp);
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new DefaultResizeShapeFeature(fp) {
+ @Override
+ public boolean canResizeShape(IResizeShapeContext context) {
+ return false;
+ }
+ };
+ }
+
+ public class AddMessageFeature extends AbstractBpmn2AddFeature<Message> {
+ public AddMessageFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ return true;
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ Message businessObject = getBusinessObject(context);
+
+ // if the Message is being dropped onto a MessageFlow, associate it with that flow
+ // instead of adding a new Message shape to the Diagram
+ ContainerShape containerShape = addMessageFlowMessage(context);
+ if (containerShape!=null)
+ return containerShape;
+
+ int width = getWidth(context);
+ int height = getHeight(context);
+
+ containerShape = peService.createContainerShape(context.getTargetContainer(), true);
+ Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
+ gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height);
+
+ Envelope envelope = ShapeDecoratorUtil.createEnvelope(invisibleRect, 0, 0, width, height);
+ envelope.rect.setFilled(true);
+ StyleUtil.applyStyle(envelope.rect, businessObject);
+ envelope.line.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
+
+ if (context.getProperty(IS_REFERENCE)==null) {
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ createDIShape(containerShape, businessObject, !isImport);
+ }
+ else {
+ link(containerShape, businessObject);
+ }
+
+ // hook for subclasses to inject extra code
+ ((AddContext)context).setWidth(width);
+ ((AddContext)context).setHeight(height);
+ decorateShape(context, containerShape, businessObject);
+
+ peService.createChopboxAnchor(containerShape);
+ AnchorUtil.addFixedPointAnchors(containerShape, invisibleRect);
+
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java
+ layoutPictogramElement(containerShape);
+
+ // change the AddContext and prepare it to add a label below the figure
+ prepareAddContext(context, containerShape, width, height);
+ IFeatureContainer fc = new LabelFeatureContainer();
+ fc.getAddFeature(getFeatureProvider()).add(context);
+
+=======
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/MessageFeatureContainer.java
+ return containerShape;
+ }
+
+ private ContainerShape addMessageFlowMessage(ITargetConnectionContext context) {
+
+ Shape messageShape = null;
+ Message message = null;
+ if (context instanceof IPictogramElementContext) {
+ messageShape = (Shape) ((IPictogramElementContext)context).getPictogramElement();
+ message = BusinessObjectUtil.getFirstElementOfType(messageShape, Message.class);
+ }
+ else if (context instanceof IAddContext) {
+ message = (Message) ((IAddContext)context).getNewObject();
+ }
+ Connection connection = context.getTargetConnection();
+ MessageFlow messageFlow = BusinessObjectUtil.getFirstElementOfType(connection, MessageFlow.class);
+ if (messageFlow!=null && messageFlow.getMessageRef()!=message) {
+ messageFlow.setMessageRef(message);
+ UpdateContext uc = new UpdateContext(connection);
+ // set the Message shape into the update context;
+ // this will cause the MessageFlow update feature to reuse the shape.
+ uc.putProperty(MessageFlowFeatureContainer.MESSAGE_REF, messageShape);
+ IUpdateFeature uf = getFeatureProvider().getUpdateFeature(uc);
+ uf.update(uc);
+ return MessageFlowFeatureContainer.findMessageShape(connection);
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return Message.class;
+ }
+ }
+
+ public static class CreateMessageFeature extends AbstractCreateRootElementFeature<Message> {
+
+ private static ILabelProvider labelProvider = new ILabelProvider() {
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void dispose() {
+
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+
+ }
+
+ public String getText(Object element) {
+ if (((Message) element).getId() == null)
+ return ((Message) element).getName();
+ return NLS.bind(
+ Messages.MessageFeatureContainer_Default_Name, ((Message) element).getName());
+ }
+
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ };
+
+ public CreateMessageFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public String getStencilImageId() {
+ return ImageProvider.IMG_16_MESSAGE;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature#getBusinessObjectClass()
+ */
+ @Override
+ public EClass getBusinessObjectClass() {
+ return Bpmn2Package.eINSTANCE.getMessage();
+ }
+
+ @Override
+ public Message createBusinessObject(ICreateContext context) {
+ changesDone = true;
+
+ Message message = null;
+ message = Bpmn2ModelerFactory.create(Message.class);
+ String oldName = message.getName();
+ message.setName(Messages.MessageFeatureContainer_New);
+ message.setId(null);
+ EObject targetBusinessObject = (EObject)getBusinessObjectForPictogramElement(context.getTargetContainer());
+ Definitions definitions = ModelUtil.getDefinitions(targetBusinessObject);
+
+ List<Message> messageList = new ArrayList<Message>();
+ messageList.add(message);
+ messageList.addAll( ModelUtil.getAllRootElements(definitions, Message.class) );
+
+ Message result = message;
+ if (messageList.size() > 1) {
+ PopupMenu popupMenu = new PopupMenu(messageList, labelProvider);
+ changesDone = popupMenu.show(Display.getCurrent().getActiveShell());
+ if (changesDone) {
+ result = (Message) popupMenu.getResult();
+ }
+ else {
+ EcoreUtil.delete(message);
+ message = null;
+ }
+ }
+ else
+ changesDone = true;
+
+ if (changesDone) {
+ if (result == message) {
+ // the new one
+ definitions.getRootElements().add(message);
+ message.setId(null);
+ ModelUtil.setID(message);
+ message.setName(oldName);
+ } else {
+ // and existing one
+ message = result;
+ }
+ putBusinessObject(context, message);
+ }
+
+ return message;
+ }
+ }
+
+ public static class MoveMessageFeature extends DefaultMoveBPMNShapeFeature {
+
+ public MoveMessageFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected void postMoveShape(IMoveShapeContext context) {
+ super.postMoveShape(context);
+
+ // if the Message shape was moved onto a MessageFlow, associate the flow with
+ // this Message and force an update.
+ Shape messageShape = context.getShape();
+ Message message = BusinessObjectUtil.getFirstElementOfType(messageShape, Message.class);
+ Connection messageFlowConnection = context.getTargetConnection();
+ MessageFlow messageFlow = BusinessObjectUtil.getFirstElementOfType(messageFlowConnection, MessageFlow.class);
+ if (messageFlow!=null && messageFlow.getMessageRef()!=message) {
+ messageFlow.setMessageRef(message);
+ UpdateContext uc = new UpdateContext(messageFlowConnection);
+ // set the Message shape into the update context;
+ // this will cause the MessageFlow update feature to reuse the shape.
+ uc.putProperty(MessageFlowFeatureContainer.MESSAGE_REF, messageShape);
+ IUpdateFeature uf = getFeatureProvider().getUpdateFeature(uc);
+ uf.update(uc);
+ }
+ }
+ }
+
+ public static class DeleteMessageFeature extends DefaultDeleteBPMNShapeFeature {
+
+ public DeleteMessageFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ protected void deleteBusinessObject(Object bo) {
+
+ if (bo instanceof Message) {
+ // This Message can be deleted from model if there are no more references to it
+ Message message = (Message)bo;
+ List<EObject> list = FeatureSupport.findMessageReferences(getDiagram(), message);
+ if (list.size()>0)
+ return;
+ }
+
+ super.deleteBusinessObject(bo);
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/Messages.java
index 4a8e4dc4..4acbad14 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.data;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateItemAwareElementFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateItemAwareElementFeature.java
new file mode 100644
index 00000000..86edd828
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/UpdateItemAwareElementFeature.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.features.data;
+
+import java.util.Iterator;
+
+import org.eclipse.bpmn2.DataState;
+import org.eclipse.bpmn2.ItemAwareElement;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.Polyline;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IPeService;
+
+public class UpdateItemAwareElementFeature<T extends ItemAwareElement> extends AbstractUpdateBaseElementFeature<ItemAwareElement> {
+
+ public UpdateItemAwareElementFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ IPeService peService = Graphiti.getPeService();
+ ContainerShape container = (ContainerShape) context.getPictogramElement();
+ ItemAwareElement element = (ItemAwareElement) getBusinessObjectForPictogramElement(container);
+
+ EStructuralFeature isCollection = element.eClass().getEStructuralFeature("isCollection"); //$NON-NLS-1$
+ if (isCollection!=null) {
+ boolean newIsCollection = (Boolean) element.eGet(isCollection);
+ boolean oldIsCollection = Boolean.parseBoolean(peService.getPropertyValue(container, GraphitiConstants.COLLECTION_PROPERTY));
+ if (newIsCollection != oldIsCollection)
+ return Reason.createTrueReason("Cardinality Changed"); //$NON-NLS-1$
+ }
+
+ String newDataState = getDataStateAsString(element);
+ Object oldDataState = peService.getPropertyValue(container,GraphitiConstants.DATASTATE_PROPERTY);
+
+ if (!newDataState.equals(oldDataState))
+ return Reason.createTrueReason("Data State Changed"); //$NON-NLS-1$
+
+ return Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ IPeService peService = Graphiti.getPeService();
+ ContainerShape container = (ContainerShape) context.getPictogramElement();
+ ItemAwareElement element = (ItemAwareElement) getBusinessObjectForPictogramElement(container);
+
+ // Update the "is collection" feature if the ItemAwareElement has one
+ EStructuralFeature isCollection = element.eClass().getEStructuralFeature("isCollection"); //$NON-NLS-1$
+ if (isCollection!=null) {
+ boolean newIsCollection = (Boolean) element.eGet(isCollection);
+
+ // Find the shape that represents the "is collection" marker
+ Iterator<Shape> iterator = peService.getAllContainedShapes(container).iterator();
+ while (iterator.hasNext()) {
+ Shape shape = iterator.next();
+ String prop = peService.getPropertyValue(shape, GraphitiConstants.HIDEABLE_PROPERTY);
+ if (prop != null && new Boolean(prop)) {
+ Polyline line = (Polyline) shape.getGraphicsAlgorithm();
+ line.setLineVisible(newIsCollection);
+ }
+ }
+
+ peService.setPropertyValue(container, GraphitiConstants.COLLECTION_PROPERTY, Boolean.toString(newIsCollection));
+ }
+
+ // Update the Data State
+ String newDataState = getDataStateAsString(element);
+ peService.setPropertyValue(container, GraphitiConstants.DATASTATE_PROPERTY, newDataState);
+
+ return true;
+ }
+
+ private String getDataStateAsString(ItemAwareElement element) {
+ DataState dataState = element.getDataState();
+ if (dataState==null)
+ return ""; //$NON-NLS-1$
+ String name = dataState.getName();
+ if (name==null || name.isEmpty())
+ name = "no_name"; //$NON-NLS-1$
+ String id = dataState.getId();
+ if (id==null || id.isEmpty())
+ id = "no_id"; //$NON-NLS-1$
+ return name + " - " + id; //$NON-NLS-1$
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/messages.properties
index cfadef0e..093a84e4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/data/messages.properties
@@ -1,9 +1,19 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
DataInputFeatureContainer_Description=Create Data Input
DataInputFeatureContainer_Name=Data Input
DataObjectFeatureContainer_Description=Data Object
DataObjectFeatureContainer_Name=Data Object
DataObjectFeatureContainer_New=Create a new Data Object
-DataObjectFeatureContainer_Default_Name=Reference to {0}
+DataObjectFeatureContainer_Default_Name={0}
DataObjectFeatureContainer_Ref=Reference existing {0}
DataObjectReferenceFeatureContainer_Description=Create Data Object Reference
DataObjectReferenceFeatureContainer_Name=Data Object Reference
@@ -12,7 +22,7 @@ DataOutputFeatureContainer_Name=Data Output
DataStoreReferenceFeatureContainer_Description=Create Data Store
DataStoreReferenceFeatureContainer_Name=Data Store
DataStoreReferenceFeatureContainer_New=Create a new Data Store
-DataStoreReferenceFeatureContainer_Default_Name=Reference to {0}
+DataStoreReferenceFeatureContainer_Default_Name={0}
DataStoreReferenceFeatureContainer_Ref=Reference existing {0}
MessageFeatureContainer_Description=Create
MessageFeatureContainer_Name=Message
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AbstractEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AbstractEventFeatureContainer.java
index 51b110d9..e6ff8319 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AbstractEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AbstractEventFeatureContainer.java
@@ -13,23 +13,17 @@
package org.eclipse.bpmn2.modeler.ui.features.event;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
-import org.eclipse.bpmn2.modeler.core.features.DirectEditBaseElementFeature;
import org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature;
import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.bpmn2.modeler.ui.features.LayoutBaseElementTextFeature;
import org.eclipse.bpmn2.modeler.ui.features.activity.AppendActivityFeature;
import org.eclipse.bpmn2.modeler.ui.features.gateway.AppendGatewayFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
-import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.IResizeShapeContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
@@ -43,15 +37,9 @@ public abstract class AbstractEventFeatureContainer extends BaseElementFeatureCo
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutBaseElementTextFeature(fp) {
-
- @Override
- public int getMinimumWidth() {
- return GraphicsUtil.EVENT_SIZE;
- }
- };
+ return null;
}
-
+
@Override
public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
return new MoveFlowNodeFeature(fp);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java
index 6896dcc5..eed0476f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java
@@ -16,18 +16,20 @@ import static org.eclipse.bpmn2.modeler.ui.features.event.BoundaryEventFeatureCo
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.BoundaryEvent;
-import org.eclipse.bpmn2.modeler.core.di.DIImport;
-import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper.PositionOnLine;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.graphiti.datatypes.ILocation;
+import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
@@ -39,7 +41,7 @@ import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IGaService;
import org.eclipse.graphiti.services.IPeService;
-public class AddBoundaryEventFeature extends AbstractBpmn2AddElementFeature<BoundaryEvent> {
+public class AddBoundaryEventFeature extends AbstractBpmn2AddFeature<BoundaryEvent> {
public static final String BOUNDARY_EVENT_RELATIVE_Y = "boundary.event.relative.y"; //$NON-NLS-1$
@@ -50,13 +52,17 @@ public class AddBoundaryEventFeature extends AbstractBpmn2AddElementFeature<Boun
super(fp);
}
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
@Override
public boolean canAdd(IAddContext context) {
if (!(getBusinessObject(context) instanceof BoundaryEvent)) {
return false;
}
- Object prop = context.getProperty(DIImport.IMPORT_PROPERTY);
+ Object prop = context.getProperty(GraphitiConstants.IMPORT_PROPERTY);
if (prop != null && (Boolean) prop) {
return true;
}
@@ -69,7 +75,7 @@ public class AddBoundaryEventFeature extends AbstractBpmn2AddElementFeature<Boun
public PictogramElement add(IAddContext context) {
BoundaryEvent businessObject = getBusinessObject(context);
- boolean isImport = context.getProperty(DIImport.IMPORT_PROPERTY) != null;
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
// FIXME: what's going on here?
ContainerShape target = isImport ? context.getTargetContainer() : (ContainerShape) context
.getTargetContainer().eContainer();
@@ -92,7 +98,7 @@ public class AddBoundaryEventFeature extends AbstractBpmn2AddElementFeature<Boun
gaService.setLocationAndSize(ellipse, x, y, height, height);
}
- Ellipse circle = GraphicsUtil.createIntermediateEventCircle(ellipse);
+ Ellipse circle = ShapeDecoratorUtil.createIntermediateEventCircle(ellipse);
circle.setStyle(StyleUtil.getStyleForClass(getDiagram()));
createDIShape(containerShape, businessObject, !isImport);
@@ -106,7 +112,7 @@ public class AddBoundaryEventFeature extends AbstractBpmn2AddElementFeature<Boun
}
peService.setPropertyValue(containerShape, BOUNDARY_EVENT_CANCEL, Boolean.toString(businessObject.isCancelActivity()));
- peService.setPropertyValue(containerShape, GraphicsUtil.EVENT_MARKER_CONTAINER, Boolean.toString(true));
+ peService.setPropertyValue(containerShape, GraphitiConstants.EVENT_MARKER_CONTAINER, Boolean.toString(true));
peService.setPropertyValue(containerShape,
UpdateBoundaryEventFeature.BOUNDARY_EVENT_MARKER,
AbstractUpdateEventFeature.getEventDefinitionsValue(businessObject));
@@ -118,24 +124,14 @@ public class AddBoundaryEventFeature extends AbstractBpmn2AddElementFeature<Boun
anchor.setReferencedGraphicsAlgorithm(ellipse);
AnchorUtil.addFixedPointAnchors(containerShape, ellipse);
- // prepare the AddContext to create a Label
- prepareAddContext(context, containerShape, width, height);
-// IFeatureContainer fc = new LabelFeatureContainer();
-// fc.getAddFeature(getFeatureProvider()).add(context);
-
- updatePictogramElement(context, containerShape);
- layoutPictogramElement(context, containerShape);
-
return containerShape;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- public int getHeight() {
- return GraphicsUtil.getEventSize(getDiagram()).getHeight();
- }
-
- @Override
- public int getWidth() {
- return GraphicsUtil.getEventSize(getDiagram()).getWidth();
+ public Class getBusinessObjectType() {
+ return BoundaryEvent.class;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java.orig b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java.orig
new file mode 100644
index 00000000..d51f479d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java.orig
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.event;
+
+import static org.eclipse.bpmn2.modeler.ui.features.event.BoundaryEventFeatureContainer.BOUNDARY_EVENT_CANCEL;
+
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.BoundaryEvent;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java
+import org.eclipse.bpmn2.modeler.core.di.DIImport;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddElementFeature;
+import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.features.IFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.AddShapeLabelFeature;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java
+import org.eclipse.bpmn2.modeler.core.features.label.LabelFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper;
+import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper.PositionOnLine;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.graphiti.datatypes.ILocation;
+import org.eclipse.graphiti.features.IAddFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.IAddContext;
+import org.eclipse.graphiti.mm.algorithms.Ellipse;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ChopboxAnchor;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IGaService;
+import org.eclipse.graphiti.services.IPeService;
+
+public class AddBoundaryEventFeature extends AbstractBpmn2AddFeature<BoundaryEvent> {
+
+ public static final String BOUNDARY_EVENT_RELATIVE_Y = "boundary.event.relative.y"; //$NON-NLS-1$
+
+ private final IPeService peService = Graphiti.getPeService();
+ private final IGaService gaService = Graphiti.getGaService();
+
+ public AddBoundaryEventFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ public IAddFeature getAddLabelFeature(IFeatureProvider fp) {
+ return new AddShapeLabelFeature(fp);
+ }
+
+ @Override
+ public boolean canAdd(IAddContext context) {
+ if (!(getBusinessObject(context) instanceof BoundaryEvent)) {
+ return false;
+ }
+
+ Object prop = context.getProperty(GraphitiConstants.IMPORT_PROPERTY);
+ if (prop != null && (Boolean) prop) {
+ return true;
+ }
+
+ Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
+ return bo != null && bo instanceof Activity;
+ }
+
+ @Override
+ public PictogramElement add(IAddContext context) {
+ BoundaryEvent businessObject = getBusinessObject(context);
+
+ boolean isImport = context.getProperty(GraphitiConstants.IMPORT_PROPERTY) != null;
+ // FIXME: what's going on here?
+ ContainerShape target = isImport ? context.getTargetContainer() : (ContainerShape) context
+ .getTargetContainer().eContainer();
+ if (target==null)
+ target = context.getTargetContainer();
+ ContainerShape containerShape = peService.createContainerShape(target, true);
+ Ellipse ellipse = gaService.createEllipse(containerShape);
+ StyleUtil.applyStyle(ellipse, businessObject);
+
+ int width = this.getWidth(context);
+ int height = this.getHeight(context);
+
+
+ if (isImport) { // if loading from DI then place according to context
+ gaService.setLocationAndSize(ellipse, context.getX(), context.getY(), width, height);
+ } else { // otherwise place it in the center of shape for user to adjust it
+ GraphicsAlgorithm ga = context.getTargetContainer().getGraphicsAlgorithm();
+ int x = ga.getX() + context.getX() - (width / 2);
+ int y = ga.getY() + context.getY() - (height / 2);
+ gaService.setLocationAndSize(ellipse, x, y, height, height);
+ }
+
+ Ellipse circle = ShapeDecoratorUtil.createIntermediateEventCircle(ellipse);
+ circle.setStyle(StyleUtil.getStyleForClass(getDiagram()));
+ createDIShape(containerShape, businessObject, !isImport);
+
+ Activity activity = businessObject.getAttachedToRef();
+ PictogramElement foundElem = BusinessObjectUtil.getFirstBaseElementFromDiagram(getDiagram(), activity);
+ if (foundElem != null && foundElem instanceof ContainerShape) {
+ ContainerShape activityContainer = (ContainerShape) foundElem;
+ PositionOnLine pos = BoundaryEventPositionHelper.getPositionOnLineUsingBPMNShape(containerShape,
+ activityContainer);
+ BoundaryEventPositionHelper.assignPositionOnLineProperty(containerShape, pos);
+ }
+
+ peService.setPropertyValue(containerShape, BOUNDARY_EVENT_CANCEL, Boolean.toString(businessObject.isCancelActivity()));
+ peService.setPropertyValue(containerShape, GraphitiConstants.EVENT_MARKER_CONTAINER, Boolean.toString(true));
+ peService.setPropertyValue(containerShape,
+ UpdateBoundaryEventFeature.BOUNDARY_EVENT_MARKER,
+ AbstractUpdateEventFeature.getEventDefinitionsValue(businessObject));
+
+ // hook for subclasses to inject extra code
+ decorateShape(context, containerShape, businessObject);
+
+ ChopboxAnchor anchor = peService.createChopboxAnchor(containerShape);
+ anchor.setReferencedGraphicsAlgorithm(ellipse);
+ AnchorUtil.addFixedPointAnchors(containerShape, ellipse);
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java
+
+ // prepare the AddContext to create a Label
+ prepareAddContext(context, containerShape, width, height);
+// IFeatureContainer fc = new LabelFeatureContainer();
+// fc.getAddFeature(getFeatureProvider()).add(context);
+
+ updatePictogramElement(context, containerShape);
+ layoutPictogramElement(context, containerShape);
+=======
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AddBoundaryEventFeature.java
+
+ return containerShape;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return BoundaryEvent.class;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AppendEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AppendEventFeature.java
index 083d84a6..083d84a6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AppendEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/AppendEventFeature.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/BoundaryEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/BoundaryEventFeatureContainer.java
index a8e16d72..26e50bdd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/BoundaryEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/BoundaryEventFeatureContainer.java
@@ -14,11 +14,12 @@ package org.eclipse.bpmn2.modeler.ui.features.event;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
-import org.eclipse.graphiti.features.IDirectEditingFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
import org.eclipse.graphiti.features.IMoveShapeFeature;
@@ -49,7 +50,10 @@ public class BoundaryEventFeatureContainer extends BaseElementFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return new UpdateBoundaryEventFeature(fp);
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateBoundaryEventFeature(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/CreateBoundaryEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/CreateBoundaryEventFeature.java
index 3b5b5748..05b8a3d5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/CreateBoundaryEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/CreateBoundaryEventFeature.java
@@ -12,17 +12,13 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.event;
-import java.io.IOException;
-
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -35,7 +31,7 @@ import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class CreateBoundaryEventFeature extends AbstractBpmn2CreateFeature<BoundaryEvent> {
public CreateBoundaryEventFeature(IFeatureProvider fp) {
- super(fp, Messages.CreateBoundaryEventFeature_0, Messages.CreateBoundaryEventFeature_1+Messages.CreateBoundaryEventFeature_2);
+ super(fp);
}
@Override
@@ -58,30 +54,26 @@ public class CreateBoundaryEventFeature extends AbstractBpmn2CreateFeature<Bound
@Override
public BoundaryEvent createBusinessObject(ICreateContext context) {
- BoundaryEvent event = null;
- try {
- Activity activity = (Activity) getBusinessObjectForPictogramElement(context.getTargetContainer());
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- event = super.createBusinessObject(context);
- event.setAttachedToRef(activity);
- event.setName(""); //$NON-NLS-1$
- event.setCancelActivity(true); // by default is interrupting
- Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
-
- if (bo instanceof FlowNode && !((FlowNode)bo).getLanes().isEmpty()) {
- ((FlowNode)bo).getLanes().get(0).getFlowNodeRefs().add(event);
- }
-
- if (bo instanceof SubProcess) {
- bo = getBusinessObjectForPictogramElement((PictogramElement) context.getTargetContainer().eContainer());
- }
-
- handler.addFlowElement(bo, event);
- ModelUtil.setID(event);
+ Activity activity = (Activity) getBusinessObjectForPictogramElement(context.getTargetContainer());
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
+
+ BoundaryEvent event = super.createBusinessObject(context);
+ event.setAttachedToRef(activity);
+ event.setName(""); //$NON-NLS-1$
+ event.setCancelActivity(true); // by default is interrupting
+ Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
+
+ if (bo instanceof FlowNode && !((FlowNode)bo).getLanes().isEmpty()) {
+ ((FlowNode)bo).getLanes().get(0).getFlowNodeRefs().add(event);
+ }
- } catch (IOException e) {
- Activator.logError(e);
+ if (bo instanceof SubProcess) {
+ bo = getBusinessObjectForPictogramElement((PictogramElement) context.getTargetContainer().eContainer());
}
+
+ mh.addFlowElement(bo, event);
+ ModelUtil.setID(event);
+
return event;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/EndEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/EndEventFeatureContainer.java
index 49fd2c6d..77d9a087 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/EndEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/EndEventFeatureContainer.java
@@ -17,14 +17,10 @@ import java.util.List;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.EndEvent;
-import org.eclipse.bpmn2.Event;
-import org.eclipse.bpmn2.TextAnnotation;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractCreateEventFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AddEventFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.bpmn2.modeler.ui.features.AbstractAppendNodeFeature;
import org.eclipse.emf.ecore.EClass;
@@ -33,9 +29,7 @@ import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
-import org.eclipse.graphiti.mm.GraphicsAlgorithmContainer;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.services.Graphiti;
@@ -61,8 +55,8 @@ public class EndEventFeatureContainer extends AbstractEventFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature updateFeature = new MultiUpdateFeature(fp);
- updateFeature.addUpdateFeature(super.getUpdateFeature(fp));
- updateFeature.addUpdateFeature(new UpdateEndEventFeature(fp));
+ updateFeature.addFeature(super.getUpdateFeature(fp));
+ updateFeature.addFeature(new UpdateEndEventFeature(fp));
return updateFeature;
}
@@ -73,6 +67,7 @@ public class EndEventFeatureContainer extends AbstractEventFeatureContainer {
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, EndEvent businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
Ellipse e = (Ellipse)getGraphicsAlgorithm(containerShape);
e.setLineWidth(3);
IPeService peService = Graphiti.getPeService();
@@ -80,12 +75,20 @@ public class EndEventFeatureContainer extends AbstractEventFeatureContainer {
UpdateEndEventFeature.END_EVENT_MARKER,
AbstractUpdateEventFeature.getEventDefinitionsValue((EndEvent)businessObject));
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return EndEvent.class;
+ }
}
public static class CreateEndEventFeature extends AbstractCreateEventFeature<EndEvent> {
public CreateEndEventFeature(IFeatureProvider fp) {
- super(fp, Messages.EndEventFeatureContainer_0, Messages.EndEventFeatureContainer_1+Messages.EndEventFeatureContainer_2);
+ super(fp);
}
@Override
@@ -102,7 +105,7 @@ public class EndEventFeatureContainer extends AbstractEventFeatureContainer {
}
}
- protected static class UpdateEndEventFeature extends AbstractUpdateEventFeature {
+ protected static class UpdateEndEventFeature extends AbstractUpdateEventFeature<EndEvent> {
public static String END_EVENT_MARKER = "marker.end.event"; //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateCatchEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateCatchEventFeatureContainer.java
index 467fa6ea..3a20e384 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateCatchEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateCatchEventFeatureContainer.java
@@ -13,16 +13,13 @@
package org.eclipse.bpmn2.modeler.ui.features.event;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.EndEvent;
-import org.eclipse.bpmn2.InclusiveGateway;
+import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.IntermediateCatchEvent;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractCreateEventFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AddEventFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
@@ -31,7 +28,6 @@ import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.services.Graphiti;
@@ -52,8 +48,8 @@ public class IntermediateCatchEventFeatureContainer extends AbstractEventFeature
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(super.getUpdateFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateIntermediateCatchEventFeature(fp));
+ multiUpdate.addFeature(super.getUpdateFeature(fp));
+ multiUpdate.addFeature(new UpdateIntermediateCatchEventFeature(fp));
return multiUpdate;
}
@@ -69,20 +65,29 @@ public class IntermediateCatchEventFeatureContainer extends AbstractEventFeature
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, IntermediateCatchEvent businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
Ellipse e = (Ellipse)getGraphicsAlgorithm(containerShape);
- Ellipse circle = GraphicsUtil.createIntermediateEventCircle(e);
+ Ellipse circle = ShapeDecoratorUtil.createIntermediateEventCircle(e);
circle.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
IPeService peService = Graphiti.getPeService();
peService.setPropertyValue(containerShape,
UpdateIntermediateCatchEventFeature.INTERMEDIATE_CATCH_EVENT_MARKER,
AbstractUpdateEventFeature.getEventDefinitionsValue((IntermediateCatchEvent)businessObject));
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return IntermediateCatchEvent.class;
+ }
}
public static class CreateIntermediateCatchEventFeature extends AbstractCreateEventFeature<IntermediateCatchEvent> {
public CreateIntermediateCatchEventFeature(IFeatureProvider fp) {
- super(fp, Messages.IntermediateCatchEventFeatureContainer_0, Messages.IntermediateCatchEventFeatureContainer_1+Messages.IntermediateCatchEventFeatureContainer_2);
+ super(fp);
}
@Override
@@ -99,7 +104,7 @@ public class IntermediateCatchEventFeatureContainer extends AbstractEventFeature
}
}
- public static class UpdateIntermediateCatchEventFeature extends AbstractUpdateEventFeature {
+ public static class UpdateIntermediateCatchEventFeature extends AbstractUpdateEventFeature<IntermediateCatchEvent> {
public static String INTERMEDIATE_CATCH_EVENT_MARKER = "marker.intermediate.catch.event"; //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateThrowEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateThrowEventFeatureContainer.java
index 4d6053d0..517a1220 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateThrowEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/IntermediateThrowEventFeatureContainer.java
@@ -13,16 +13,12 @@
package org.eclipse.bpmn2.modeler.ui.features.event;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.EndEvent;
-import org.eclipse.bpmn2.IntermediateCatchEvent;
import org.eclipse.bpmn2.IntermediateThrowEvent;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractCreateEventFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AddEventFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
@@ -31,7 +27,6 @@ import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.services.Graphiti;
@@ -52,8 +47,8 @@ public class IntermediateThrowEventFeatureContainer extends AbstractEventFeature
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(super.getUpdateFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateIntermediateThrowEventFeature(fp));
+ multiUpdate.addFeature(super.getUpdateFeature(fp));
+ multiUpdate.addFeature(new UpdateIntermediateThrowEventFeature(fp));
return multiUpdate;
}
@@ -69,20 +64,29 @@ public class IntermediateThrowEventFeatureContainer extends AbstractEventFeature
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, IntermediateThrowEvent businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
Ellipse e = (Ellipse)getGraphicsAlgorithm(containerShape);
- Ellipse circle = GraphicsUtil.createIntermediateEventCircle(e);
+ Ellipse circle = ShapeDecoratorUtil.createIntermediateEventCircle(e);
circle.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
IPeService peService = Graphiti.getPeService();
peService.setPropertyValue(containerShape,
UpdateIntermediateThrowEventFeature.INTERMEDIATE_THROW_EVENT_MARKER,
AbstractUpdateEventFeature.getEventDefinitionsValue((IntermediateThrowEvent)businessObject));
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return IntermediateThrowEvent.class;
+ }
}
public static class CreateIntermediateThrowEventFeature extends AbstractCreateEventFeature<IntermediateThrowEvent> {
public CreateIntermediateThrowEventFeature(IFeatureProvider fp) {
- super(fp, Messages.IntermediateThrowEventFeatureContainer_0, Messages.IntermediateThrowEventFeatureContainer_1+Messages.IntermediateThrowEventFeatureContainer_2);
+ super(fp);
}
@Override
@@ -99,7 +103,7 @@ public class IntermediateThrowEventFeatureContainer extends AbstractEventFeature
}
}
- public static class UpdateIntermediateThrowEventFeature extends AbstractUpdateEventFeature {
+ public static class UpdateIntermediateThrowEventFeature extends AbstractUpdateEventFeature<IntermediateThrowEvent> {
public static String INTERMEDIATE_THROW_EVENT_MARKER = "marker.intermediate.throw.event"; //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/LayoutBoundaryEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/LayoutBoundaryEventFeature.java
index f9ebd657..29b3cd3a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/LayoutBoundaryEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/LayoutBoundaryEventFeature.java
@@ -16,7 +16,7 @@ import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper.PositionOnLine;
-import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper.PositionOnLine.*;
+import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper.PositionOnLine.LocationType;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ILayoutContext;
@@ -42,7 +42,7 @@ public class LayoutBoundaryEventFeature extends AbstractLayoutFeature {
public boolean layout(ILayoutContext context) {
boolean layout = false;
- PictogramElement element = context.getPictogramElement();
+ final PictogramElement element = context.getPictogramElement();
GraphicsAlgorithm eventGa = element.getGraphicsAlgorithm();
BoundaryEvent event = BusinessObjectUtil.getFirstElementOfType(element, BoundaryEvent.class);
@@ -85,6 +85,21 @@ public class LayoutBoundaryEventFeature extends AbstractLayoutFeature {
(Shape) element, (Shape) activityContainer);
BoundaryEventPositionHelper.assignPositionOnLineProperty(element, newPos);
}
+
+ // There's some weird stuff going on here that I can't explain...See bug 433417
+ // When a Boundary Event is DND'ed onto an Activity that is contained in the Diagram,
+ // the Boundary Event is always drawn BELOW the Activity.
+ // I've tried forcing a refresh by changing the Z-order of the Boundary Event
+ // (which should be the top-most Figure anyway) but that didn't work. I've tried
+ // changing the Z-order of the Activity so it's at the bottom and that worked but,
+ // an undo-redo of the add action draws the Boundary Event BELOW the Activity again!
+ // The only thing that appears to work (without causing additional problems) is
+ // to use an EList.move() on the Diagram's children which, apparently, does not get
+ // recorded by the ChangeRecorder adapter and undo-redo works as expected.
+ if (activityContainer.eContainer()==getDiagram()) {
+ getDiagram().getChildren().move(0, (Shape)activityContainer);
+ }
+
return layout;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/Messages.java
index f9bca64d..9dc7a648 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.event;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/MoveBoundaryEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/MoveBoundaryEventFeature.java
index 9f739437..c98f3e49 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/MoveBoundaryEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/MoveBoundaryEventFeature.java
@@ -16,9 +16,8 @@ import java.util.List;
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.BoundaryEvent;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
import org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature;
-import org.eclipse.bpmn2.modeler.core.features.activity.MoveActivityFeature;
-import org.eclipse.bpmn2.modeler.core.features.event.AbstractBoundaryEventOperation;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper;
import org.eclipse.bpmn2.modeler.core.utils.BoundaryEventPositionHelper.PositionOnLine;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
@@ -45,9 +44,11 @@ public class MoveBoundaryEventFeature extends MoveFlowNodeFeature {
@Override
protected void preMoveShape(IMoveShapeContext context) {
+ super.preMoveShape(context);
+
ContainerShape targetContainer = context.getTargetContainer();
Activity activity = BusinessObjectUtil.getFirstElementOfType(targetContainer, Activity.class);
- Object property = context.getProperty(MoveActivityFeature.ACTIVITY_MOVE_PROPERTY);
+ Object property = context.getProperty(GraphitiConstants.ACTIVITY_MOVE_PROPERTY);
if (activity != null && property == null) {
ContainerShape taskContainer = context.getTargetContainer();
@@ -73,7 +74,7 @@ public class MoveBoundaryEventFeature extends MoveFlowNodeFeature {
@Override
public boolean canMoveShape(IMoveShapeContext context) {
- Object property = context.getProperty(MoveActivityFeature.ACTIVITY_MOVE_PROPERTY);
+ Object property = context.getProperty(GraphitiConstants.ACTIVITY_MOVE_PROPERTY);
PictogramElement[] selection = getDiagramEditor().getSelectedPictogramElements();
boolean singleSelection = selection != null && selection.length == 1;
@@ -83,11 +84,11 @@ public class MoveBoundaryEventFeature extends MoveFlowNodeFeature {
for (PictogramElement activityElement : activityPictogramElements) {
if (ModelUtil.isElementSelected(getDiagramBehavior().getDiagramContainer(), activityElement)){
if (!ModelUtil.isElementSelected(getDiagramBehavior().getDiagramContainer(), context.getPictogramElement())) {
- context.putProperty(MoveActivityFeature.SELECTION_MOVE_PROPERTY, false);
- context.putProperty(MoveActivityFeature.ACTIVITY_MOVE_PROPERTY, true);
+ context.putProperty(GraphitiConstants.SELECTION_MOVE_PROPERTY, false);
+ context.putProperty(GraphitiConstants.ACTIVITY_MOVE_PROPERTY, true);
} else {
- context.putProperty(MoveActivityFeature.SELECTION_MOVE_PROPERTY, true);
- context.putProperty(MoveActivityFeature.ACTIVITY_MOVE_PROPERTY, false);
+ context.putProperty(GraphitiConstants.SELECTION_MOVE_PROPERTY, true);
+ context.putProperty(GraphitiConstants.ACTIVITY_MOVE_PROPERTY, false);
}
return true;
}
@@ -110,8 +111,8 @@ public class MoveBoundaryEventFeature extends MoveFlowNodeFeature {
protected void postMoveShape(IMoveShapeContext context) {
ContainerShape containerShape = (ContainerShape) context.getPictogramElement();
- Object property = context.getProperty(MoveActivityFeature.ACTIVITY_MOVE_PROPERTY);
- Object selectionFlag = context.getProperty(MoveActivityFeature.SELECTION_MOVE_PROPERTY);
+ Object property = context.getProperty(GraphitiConstants.ACTIVITY_MOVE_PROPERTY);
+ Object selectionFlag = context.getProperty(GraphitiConstants.SELECTION_MOVE_PROPERTY);
if (property != null && (Boolean) property) {
IGaService gaService = Graphiti.getGaService();
GraphicsAlgorithm ga = containerShape.getGraphicsAlgorithm();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/StartEventFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/StartEventFeatureContainer.java
index 01fef82a..95124d6f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/StartEventFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/StartEventFeatureContainer.java
@@ -14,6 +14,7 @@ package org.eclipse.bpmn2.modeler.ui.features.event;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.StartEvent;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractCreateEventFeature;
import org.eclipse.bpmn2.modeler.core.features.event.AbstractUpdateEventFeature;
@@ -27,7 +28,6 @@ import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
@@ -59,9 +59,9 @@ public class StartEventFeatureContainer extends AbstractEventFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature updateFeature = new MultiUpdateFeature(fp);
- updateFeature.addUpdateFeature(super.getUpdateFeature(fp));
- updateFeature.addUpdateFeature(new UpdateSubProcessEventFeature(fp));
- updateFeature.addUpdateFeature(new UpdateStartEventFeature(fp));
+ updateFeature.addFeature(super.getUpdateFeature(fp));
+ updateFeature.addFeature(new UpdateEventSubProcessFeature(fp));
+ updateFeature.addFeature(new UpdateStartEventFeature(fp));
return updateFeature;
}
@@ -72,6 +72,7 @@ public class StartEventFeatureContainer extends AbstractEventFeatureContainer {
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, StartEvent businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
Ellipse e = (Ellipse)getGraphicsAlgorithm(containerShape);
Graphiti.getPeService().setPropertyValue(containerShape, INTERRUPTING, Boolean.toString(true));
IPeService peService = Graphiti.getPeService();
@@ -79,12 +80,20 @@ public class StartEventFeatureContainer extends AbstractEventFeatureContainer {
UpdateStartEventFeature.START_EVENT_MARKER,
AbstractUpdateEventFeature.getEventDefinitionsValue((StartEvent)businessObject));
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return StartEvent.class;
+ }
}
public static class CreateStartEventFeature extends AbstractCreateEventFeature<StartEvent> {
public CreateStartEventFeature(IFeatureProvider fp) {
- super(fp, Messages.StartEventFeatureContainer_1, Messages.StartEventFeatureContainer_2+Messages.StartEventFeatureContainer_3);
+ super(fp);
}
@Override
@@ -101,7 +110,7 @@ public class StartEventFeatureContainer extends AbstractEventFeatureContainer {
}
}
- protected static class UpdateStartEventFeature extends AbstractUpdateEventFeature {
+ protected static class UpdateStartEventFeature extends AbstractUpdateEventFeature<StartEvent> {
public static String START_EVENT_MARKER = "marker.start.event"; //$NON-NLS-1$
@@ -121,9 +130,9 @@ public class StartEventFeatureContainer extends AbstractEventFeatureContainer {
}
}
- private class UpdateSubProcessEventFeature extends AbstractUpdateFeature {
+ private class UpdateEventSubProcessFeature extends AbstractBpmn2UpdateFeature {
- public UpdateSubProcessEventFeature(IFeatureProvider fp) {
+ public UpdateEventSubProcessFeature(IFeatureProvider fp) {
super(fp);
}
@@ -146,7 +155,7 @@ public class StartEventFeatureContainer extends AbstractEventFeatureContainer {
StartEvent event = (StartEvent) getBusinessObjectForPictogramElement(element);
boolean interrupting = Boolean.parseBoolean(prop);
IReason reason = event.isIsInterrupting() == interrupting ? Reason.createFalseReason() : Reason
- .createTrueReason();
+ .createTrueReason("Is Interrupting");
return reason;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/UpdateBoundaryEventFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/UpdateBoundaryEventFeature.java
index 172bde8f..702e0b15 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/UpdateBoundaryEventFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/UpdateBoundaryEventFeature.java
@@ -24,7 +24,7 @@ import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.services.Graphiti;
-public class UpdateBoundaryEventFeature extends AbstractUpdateEventFeature {
+public class UpdateBoundaryEventFeature extends AbstractUpdateEventFeature<BoundaryEvent> {
public static String BOUNDARY_EVENT_MARKER = "marker.boundary.event"; //$NON-NLS-1$
@@ -34,14 +34,14 @@ public class UpdateBoundaryEventFeature extends AbstractUpdateEventFeature {
@Override
public IReason updateNeeded(IUpdateContext context) {
- if (super.updateNeeded(context).toBoolean())
- return Reason.createTrueReason();
-
- String cancelProperty = Graphiti.getPeService().getPropertyValue(context.getPictogramElement(),
- BOUNDARY_EVENT_CANCEL);
- BoundaryEvent event = (BoundaryEvent) getBusinessObjectForPictogramElement(context.getPictogramElement());
- boolean changed = Boolean.parseBoolean(cancelProperty) != event.isCancelActivity();
- IReason reason = changed ? Reason.createTrueReason(Messages.UpdateBoundaryEventFeature_Description_Changed) : Reason.createFalseReason();
+ IReason reason = super.updateNeeded(context);
+ if (!reason.toBoolean()) {
+ String cancelProperty = Graphiti.getPeService().getPropertyValue(context.getPictogramElement(),
+ BOUNDARY_EVENT_CANCEL);
+ BoundaryEvent event = (BoundaryEvent) getBusinessObjectForPictogramElement(context.getPictogramElement());
+ boolean changed = Boolean.parseBoolean(cancelProperty) != event.isCancelActivity();
+ reason = changed ? Reason.createTrueReason(Messages.UpdateBoundaryEventFeature_Description_Changed) : Reason.createFalseReason();
+ }
return reason;
}
@@ -64,11 +64,6 @@ public class UpdateBoundaryEventFeature extends AbstractUpdateEventFeature {
return true;
}
- @Override
- public boolean canUpdate(IUpdateContext context) {
- return getBusinessObjectForPictogramElement(context.getPictogramElement()) instanceof BoundaryEvent;
- }
-
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.core.features.activity.AbstractUpdateMarkerFeature#getPropertyKey()
*/
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CancelEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CancelEventDefinitionContainer.java
index 6bd9c925..e7a4b4e8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CancelEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CancelEventDefinitionContainer.java
@@ -25,7 +25,7 @@ import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateE
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
@@ -58,7 +58,7 @@ public class CancelEventDefinitionContainer extends AbstractEventDefinitionFeatu
@Override
protected Shape drawForEnd(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
@@ -73,22 +73,22 @@ public class CancelEventDefinitionContainer extends AbstractEventDefinitionFeatu
@Override
protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
- private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape cancelShape = Graphiti.getPeService().createShape(shape, false);
- Polygon link = GraphicsUtil.createEventCancel(cancelShape);
+ Polygon link = ShapeDecoratorUtil.createEventCancel(cancelShape);
StyleUtil.setFillStyle(link, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(link, be);
return cancelShape;
}
- private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape drawFilled(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape cancelShape = Graphiti.getPeService().createShape(shape, false);
- Polygon link = GraphicsUtil.createEventCancel(cancelShape);
+ Polygon link = ShapeDecoratorUtil.createEventCancel(cancelShape);
StyleUtil.setFillStyle(link, FillStyle.FILL_STYLE_FOREGROUND);
StyleUtil.applyStyle(link, be);
return cancelShape;
@@ -97,7 +97,7 @@ public class CancelEventDefinitionContainer extends AbstractEventDefinitionFeatu
public static class CreateCancelEventDefinition extends AbstractCreateEventDefinitionFeature<CancelEventDefinition> {
public CreateCancelEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.CancelEventDefinitionContainer_Name, Messages.CancelEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CompensateEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CompensateEventDefinitionContainer.java
index 8b38be2a..e4222587 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CompensateEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/CompensateEventDefinitionContainer.java
@@ -26,8 +26,8 @@ import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateE
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Compensation;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.Compensation;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -54,17 +54,17 @@ public class CompensateEventDefinitionContainer extends AbstractEventDefinitionF
@Override
protected Shape drawForStart(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
@Override
protected Shape drawForEnd(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
protected Shape drawForThrow(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
@@ -74,13 +74,13 @@ public class CompensateEventDefinitionContainer extends AbstractEventDefinitionF
@Override
protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
- private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape compensateShape = Graphiti.getPeService().createShape(shape, false);
- Compensation compensation = GraphicsUtil.createEventCompensation(compensateShape);
+ Compensation compensation = ShapeDecoratorUtil.createEventCompensation(compensateShape);
StyleUtil.setFillStyle(compensation.arrow1, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(compensation.arrow1, be);
StyleUtil.setFillStyle(compensation.arrow2, FillStyle.FILL_STYLE_BACKGROUND);
@@ -88,10 +88,10 @@ public class CompensateEventDefinitionContainer extends AbstractEventDefinitionF
return compensateShape;
}
- private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape drawFilled(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape compensateShape = Graphiti.getPeService().createShape(shape, false);
- Compensation compensation = GraphicsUtil.createEventCompensation(compensateShape);
+ Compensation compensation = ShapeDecoratorUtil.createEventCompensation(compensateShape);
StyleUtil.setFillStyle(compensation.arrow1, FillStyle.FILL_STYLE_FOREGROUND);
StyleUtil.applyStyle(compensation.arrow1, be);
StyleUtil.setFillStyle(compensation.arrow2, FillStyle.FILL_STYLE_FOREGROUND);
@@ -102,7 +102,7 @@ public class CompensateEventDefinitionContainer extends AbstractEventDefinitionF
public static class CreateCompensateEventDefinition extends AbstractCreateEventDefinitionFeature<CompensateEventDefinition> {
public CreateCompensateEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.CompensateEventDefinitionContainer_Name, Messages.CompensateEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ConditionalEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ConditionalEventDefinitionContainer.java
index 50b5690c..09d0031a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ConditionalEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ConditionalEventDefinitionContainer.java
@@ -19,7 +19,7 @@ import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateEventDefinitionFeature;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.ICreateFeature;
@@ -66,16 +66,16 @@ public class ConditionalEventDefinitionContainer extends AbstractEventDefinition
return draw(shape);
}
- private Shape draw(ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
Shape conditionShape = Graphiti.getPeService().createShape(shape, false);
- GraphicsUtil.createEventImage(conditionShape, ImageProvider.IMG_20_CONDITION);
+ ShapeDecoratorUtil.createEventImage(conditionShape, ImageProvider.IMG_20_CONDITION);
return conditionShape;
}
public static class CreateConditionalEventDefinition extends AbstractCreateEventDefinitionFeature<ConditionalEventDefinition> {
public CreateConditionalEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.ConditionalEventDefinitionContainer_Name, Messages.ConditionalEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ErrorEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ErrorEventDefinitionContainer.java
index 78f8073d..2a33415d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ErrorEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/ErrorEventDefinitionContainer.java
@@ -13,30 +13,19 @@
package org.eclipse.bpmn2.modeler.ui.features.event.definitions;
import org.eclipse.bpmn2.BaseElement;
-import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.ErrorEventDefinition;
-import org.eclipse.bpmn2.Event;
-import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.IntermediateThrowEvent;
-import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.SubProcess;
-import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateEventDefinitionFeature;
+import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.Shape;
@@ -56,12 +45,12 @@ public class ErrorEventDefinitionContainer extends AbstractEventDefinitionFeatur
@Override
protected Shape drawForStart(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
@Override
protected Shape drawForEnd(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
@@ -76,22 +65,22 @@ public class ErrorEventDefinitionContainer extends AbstractEventDefinitionFeatur
@Override
protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
- private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape errorShape = Graphiti.getPeService().createShape(shape, false);
- Polygon error = GraphicsUtil.createEventError(errorShape);
+ Polygon error = ShapeDecoratorUtil.createEventError(errorShape);
StyleUtil.setFillStyle(error, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(error, be);
return errorShape;
}
- private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape drawFilled(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape errorShape = Graphiti.getPeService().createShape(shape, false);
- Polygon error = GraphicsUtil.createEventError(errorShape);
+ Polygon error = ShapeDecoratorUtil.createEventError(errorShape);
StyleUtil.setFillStyle(error, FillStyle.FILL_STYLE_FOREGROUND);
StyleUtil.applyStyle(error, be);
return errorShape;
@@ -100,7 +89,7 @@ public class ErrorEventDefinitionContainer extends AbstractEventDefinitionFeatur
public static class CreateErrorEventDefinition extends AbstractCreateEventDefinitionFeature<ErrorEventDefinition> {
public CreateErrorEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.ErrorEventDefinitionContainer_Name, Messages.ErrorEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/EscalationEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/EscalationEventDefinitionContainer.java
index f7dfd8ff..c3a7901a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/EscalationEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/EscalationEventDefinitionContainer.java
@@ -26,7 +26,7 @@ import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateE
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -54,17 +54,17 @@ public class EscalationEventDefinitionContainer extends AbstractEventDefinitionF
@Override
protected Shape drawForStart(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
@Override
protected Shape drawForEnd(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
protected Shape drawForThrow(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
@@ -74,22 +74,22 @@ public class EscalationEventDefinitionContainer extends AbstractEventDefinitionF
@Override
protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
- private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstBaseElement(shape);
Shape escalationShape = Graphiti.getPeService().createShape(shape, false);
- Polygon escalation = GraphicsUtil.createEventEscalation(escalationShape);
+ Polygon escalation = ShapeDecoratorUtil.createEventEscalation(escalationShape);
StyleUtil.setFillStyle(escalation, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(escalation, be);
return escalationShape;
}
- private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape drawFilled(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstBaseElement(shape);
Shape escalationShape = Graphiti.getPeService().createShape(shape, false);
- Polygon escalation = GraphicsUtil.createEventEscalation(escalationShape);
+ Polygon escalation = ShapeDecoratorUtil.createEventEscalation(escalationShape);
StyleUtil.setFillStyle(escalation, FillStyle.FILL_STYLE_FOREGROUND);
StyleUtil.applyStyle(escalation, be);
return escalationShape;
@@ -98,7 +98,7 @@ public class EscalationEventDefinitionContainer extends AbstractEventDefinitionF
public static class CreateEscalationEventDefinition extends AbstractCreateEventDefinitionFeature<EscalationEventDefinition> {
public CreateEscalationEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.EscalationEventDefinitionContainer_Name, Messages.EscalationEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/LinkEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/LinkEventDefinitionContainer.java
index 8e6f58f0..3a367928 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/LinkEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/LinkEventDefinitionContainer.java
@@ -25,7 +25,7 @@ import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateE
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -62,12 +62,12 @@ public class LinkEventDefinitionContainer extends AbstractEventDefinitionFeature
@Override
protected Shape drawForThrow(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
protected Shape drawForCatch(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
@Override
@@ -76,19 +76,19 @@ public class LinkEventDefinitionContainer extends AbstractEventDefinitionFeature
return null;
}
- private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape linkShape = Graphiti.getPeService().createShape(shape, false);
- Polygon link = GraphicsUtil.createEventLink(linkShape);
+ Polygon link = ShapeDecoratorUtil.createEventLink(linkShape);
StyleUtil.setFillStyle(link, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(link, be);
return linkShape;
}
- private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape drawFilled(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape linkShape = Graphiti.getPeService().createShape(shape, false);
- Polygon link = GraphicsUtil.createEventLink(linkShape);
+ Polygon link = ShapeDecoratorUtil.createEventLink(linkShape);
StyleUtil.setFillStyle(link, FillStyle.FILL_STYLE_FOREGROUND);
StyleUtil.applyStyle(link, be);
return linkShape;
@@ -97,7 +97,7 @@ public class LinkEventDefinitionContainer extends AbstractEventDefinitionFeature
public static class CreateLinkEventDefinition extends AbstractCreateEventDefinitionFeature<LinkEventDefinition> {
public CreateLinkEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.LinkEventDefinitionContainer_Name, Messages.LinkEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/MessageEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/MessageEventDefinitionContainer.java
index 5742f8b9..6163a23e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/MessageEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/MessageEventDefinitionContainer.java
@@ -19,8 +19,8 @@ import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDe
import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateEventDefinitionFeature;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Envelope;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil.Envelope;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -45,33 +45,33 @@ public class MessageEventDefinitionContainer extends AbstractEventDefinitionFeat
@Override
protected Shape drawForStart(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawEnvleope(algorithm, shape);
+ return draw(shape);
}
@Override
protected Shape drawForEnd(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilledEnvelope(algorithm, shape);
+ return drawFilled(shape);
}
@Override
protected Shape drawForThrow(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilledEnvelope(algorithm, shape);
+ return drawFilled(shape);
}
@Override
protected Shape drawForCatch(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawEnvleope(algorithm, shape);
+ return draw(shape);
}
@Override
protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawEnvleope(algorithm, shape);
+ return draw(shape);
}
- private Shape drawEnvleope(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape envelopeShape = Graphiti.getPeService().createShape(shape, false);
- Envelope env = GraphicsUtil.createEventEnvelope(envelopeShape);
+ Envelope env = ShapeDecoratorUtil.createEventEnvelope(envelopeShape);
StyleUtil.setFillStyle(env.rect, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(env.rect, be);
StyleUtil.setFillStyle(env.line, FillStyle.FILL_STYLE_BACKGROUND);
@@ -79,10 +79,10 @@ public class MessageEventDefinitionContainer extends AbstractEventDefinitionFeat
return envelopeShape;
}
- private Shape drawFilledEnvelope(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape drawFilled(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape envelopeShape = Graphiti.getPeService().createShape(shape, false);
- Envelope env = GraphicsUtil.createEventEnvelope(envelopeShape);
+ Envelope env = ShapeDecoratorUtil.createEventEnvelope(envelopeShape);
StyleUtil.setFillStyle(env.rect, FillStyle.FILL_STYLE_INVERT);
StyleUtil.applyStyle(env.rect, be);
StyleUtil.setFillStyle(env.line, FillStyle.FILL_STYLE_INVERT);
@@ -93,7 +93,7 @@ public class MessageEventDefinitionContainer extends AbstractEventDefinitionFeat
public static class CreateMessageEventDefinition extends AbstractCreateEventDefinitionFeature<MessageEventDefinition> {
public CreateMessageEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.MessageEventDefinitionContainer_Name, Messages.MessageEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/Messages.java
index 32e2e067..39fbd76e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.event.definitions;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/SignalEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/SignalEventDefinitionContainer.java
index 3f4516cf..106843fd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/SignalEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/SignalEventDefinitionContainer.java
@@ -22,7 +22,7 @@ import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateE
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -49,42 +49,42 @@ public class SignalEventDefinitionContainer extends AbstractEventDefinitionFeatu
@Override
protected Shape drawForStart(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
@Override
protected Shape drawForEnd(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
protected Shape drawForThrow(DecorationAlgorithm algorithm, ContainerShape shape) {
- return drawFilled(algorithm, shape);
+ return drawFilled(shape);
}
@Override
protected Shape drawForCatch(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
@Override
protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
- return draw(algorithm, shape);
+ return draw(shape);
}
- private Shape draw(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape signalShape = Graphiti.getPeService().createShape(shape, false);
- Polygon signal = GraphicsUtil.createEventSignal(signalShape);
+ Polygon signal = ShapeDecoratorUtil.createEventSignal(signalShape);
StyleUtil.setFillStyle(signal, FillStyle.FILL_STYLE_BACKGROUND);
StyleUtil.applyStyle(signal, be);
return signalShape;
}
- private Shape drawFilled(DecorationAlgorithm algorithm, ContainerShape shape) {
+ public static Shape drawFilled(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape signalShape = Graphiti.getPeService().createShape(shape, false);
- Polygon signal = GraphicsUtil.createEventSignal(signalShape);
+ Polygon signal = ShapeDecoratorUtil.createEventSignal(signalShape);
StyleUtil.setFillStyle(signal, FillStyle.FILL_STYLE_FOREGROUND);
StyleUtil.applyStyle(signal, be);
return signalShape;
@@ -93,7 +93,7 @@ public class SignalEventDefinitionContainer extends AbstractEventDefinitionFeatu
public static class CreateSignalEventDefinition extends AbstractCreateEventDefinitionFeature<SignalEventDefinition> {
public CreateSignalEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.SignalEventDefinitionContainer_Name, Messages.SignalEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TerminateEventDefinitionFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TerminateEventDefinitionFeatureContainer.java
index a778bc50..b18f8d38 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TerminateEventDefinitionFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TerminateEventDefinitionFeatureContainer.java
@@ -24,7 +24,7 @@ import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateE
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -56,12 +56,7 @@ public class TerminateEventDefinitionFeatureContainer extends AbstractEventDefin
@Override
protected Shape drawForEnd(DecorationAlgorithm algorithm, ContainerShape shape) {
- BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
- Shape terminateShape = Graphiti.getPeService().createShape(shape, false);
- Ellipse ellispe = GraphicsUtil.createEventTerminate(terminateShape);
- StyleUtil.setFillStyle(ellispe, FillStyle.FILL_STYLE_FOREGROUND);
- StyleUtil.applyStyle(ellispe, be);
- return terminateShape;
+ return draw(shape);
}
@Override
@@ -78,11 +73,20 @@ public class TerminateEventDefinitionFeatureContainer extends AbstractEventDefin
protected Shape drawForBoundary(DecorationAlgorithm algorithm, ContainerShape shape) {
return null; // NOT ALLOWED ACCORDING TO SPEC
}
+
+ public static Shape draw(ContainerShape shape) {
+ BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
+ Shape terminateShape = Graphiti.getPeService().createShape(shape, false);
+ Ellipse ellispe = ShapeDecoratorUtil.createEventTerminate(terminateShape);
+ StyleUtil.setFillStyle(ellispe, FillStyle.FILL_STYLE_FOREGROUND);
+ StyleUtil.applyStyle(ellispe, be);
+ return terminateShape;
+ }
public static class CreateTerminateEventDefinition extends AbstractCreateEventDefinitionFeature<TerminateEventDefinition> {
public CreateTerminateEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.TerminateEventDefinitionFeatureContainer_Name, Messages.TerminateEventDefinitionFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TimerEventDefinitionContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TimerEventDefinitionContainer.java
index b1eb7855..c728169b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TimerEventDefinitionContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/TimerEventDefinitionContainer.java
@@ -14,31 +14,20 @@ package org.eclipse.bpmn2.modeler.ui.features.event.definitions;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.Event;
-import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.TerminateEventDefinition;
-import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.TimerEventDefinition;
-import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractCreateEventDefinitionFeature;
+import org.eclipse.bpmn2.modeler.core.features.event.definitions.AbstractEventDefinitionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.event.definitions.DecorationAlgorithm;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil.FillStyle;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.algorithms.Image;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
-import org.eclipse.graphiti.services.IGaService;
-import org.eclipse.graphiti.util.IColorConstant;
public class TimerEventDefinitionContainer extends AbstractEventDefinitionFeatureContainer {
@@ -77,10 +66,10 @@ public class TimerEventDefinitionContainer extends AbstractEventDefinitionFeatur
return draw(shape);
}
- private Shape draw(ContainerShape shape) {
+ public static Shape draw(ContainerShape shape) {
BaseElement be = BusinessObjectUtil.getFirstElementOfType(shape, BaseElement.class, true);
Shape timerShape = Graphiti.getPeService().createShape(shape, false);
- Image image = GraphicsUtil.createEventImage(timerShape, ImageProvider.IMG_20_TIMER);
+ Image image = ShapeDecoratorUtil.createEventImage(timerShape, ImageProvider.IMG_20_TIMER);
// TODO: can't change foreground color of an Image?
// Diagram diagram = StyleUtil.findDiagram(image);
@@ -94,7 +83,7 @@ public class TimerEventDefinitionContainer extends AbstractEventDefinitionFeatur
public static class CreateTimerEventDefinition extends AbstractCreateEventDefinitionFeature<TimerEventDefinition> {
public CreateTimerEventDefinition(IFeatureProvider fp) {
- super(fp, Messages.TimerEventDefinitionContainer_Name, Messages.TimerEventDefinitionContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/messages.properties
index 16087d61..09099ac5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/definitions/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
CancelEventDefinitionContainer_Description=Create Cancel Event Definition
CancelEventDefinitionContainer_Name=Cancel Event Definition
CompensateEventDefinitionContainer_Description=Create Compensate Event Definition
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/messages.properties
index 1526440f..0074bd38 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/event/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
AppendEventFeature_Description=Create a new Event and connect it to this item
AppendEventFeature_Name=Append Event
CreateBoundaryEventFeature_0=Boundary Event
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java
index d4a8d438..bc5ee527 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/AssociationFeatureContainer.java
@@ -12,10 +12,6 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.flow;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
import org.eclipse.bpmn2.Activity;
import org.eclipse.bpmn2.Artifact;
import org.eclipse.bpmn2.Association;
@@ -23,14 +19,9 @@ import org.eclipse.bpmn2.AssociationDirection;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.EndEvent;
-import org.eclipse.bpmn2.EventDefinition;
-import org.eclipse.bpmn2.FlowNode;
-import org.eclipse.bpmn2.MessageEventDefinition;
-import org.eclipse.bpmn2.SequenceFlow;
-import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.BaseElementConnectionFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractAddFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractCreateFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractReconnectFlowFeature;
@@ -38,7 +29,6 @@ import org.eclipse.bpmn2.modeler.core.utils.AnchorUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IAddFeature;
@@ -52,17 +42,16 @@ import org.eclipse.graphiti.features.context.IAddConnectionContext;
import org.eclipse.graphiti.features.context.IAddContext;
import org.eclipse.graphiti.features.context.IContext;
import org.eclipse.graphiti.features.context.ICreateConnectionContext;
+import org.eclipse.graphiti.features.context.IDeleteContext;
import org.eclipse.graphiti.features.context.IReconnectionContext;
import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
import org.eclipse.graphiti.features.context.impl.CreateConnectionContext;
import org.eclipse.graphiti.features.context.impl.ReconnectionContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
import org.eclipse.graphiti.mm.pictograms.Anchor;
-import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
@@ -104,9 +93,27 @@ public class AssociationFeatureContainer extends BaseElementConnectionFeatureCon
@Override
public IReconnectionFeature getReconnectionFeature(IFeatureProvider fp) {
- // TODO Auto-generated method stub
return new ReconnectAssociationFeature(fp);
}
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new DefaultDeleteBPMNShapeFeature(fp) {
+
+ @Override
+ public void delete(IDeleteContext context) {
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof Connection) {
+ Connection c = (Connection) pe;
+ if (c.getStart()!=null)
+ AnchorUtil.deleteConnectionPoint(c.getStart().getParent());
+ if (c.getEnd()!=null)
+ AnchorUtil.deleteConnectionPoint(c.getEnd().getParent());
+ }
+ super.delete(context);
+ }
+ };
+ }
public class AddAssociationFeature extends AbstractAddFlowFeature<Association> {
public AddAssociationFeature(IFeatureProvider fp) {
@@ -179,27 +186,20 @@ public class AssociationFeatureContainer extends BaseElementConnectionFeatureCon
setAssociationDirection(connection, businessObject);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- protected Class<? extends BaseElement> getBoClass() {
+ public Class getBusinessObjectType() {
return Association.class;
}
-
- @Override
- public int getHeight() {
- return 0;
- }
-
- @Override
- public int getWidth() {
- return 0;
- }
}
public class CreateAssociationFeature extends AbstractCreateFlowFeature<Association, BaseElement, BaseElement> {
public CreateAssociationFeature(IFeatureProvider fp) {
- super(fp, Messages.AssociationFeatureContainer_Name, Messages.AssociationFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -280,29 +280,37 @@ public class AssociationFeatureContainer extends BaseElementConnectionFeatureCon
@Override
protected BaseElement getSourceBo(ICreateConnectionContext context) {
- Anchor anchor = context.getSourceAnchor();
+ Anchor anchor = getSourceAnchor(context);
if (anchor != null && anchor.getParent() instanceof Shape) {
Shape shape = (Shape) anchor.getParent();
- Connection conn = AnchorUtil.getConnectionPointOwner(shape);
- if (conn!=null) {
- return BusinessObjectUtil.getFirstElementOfType(conn, getTargetClass());
+ Connection connection = AnchorUtil.getConnectionPointOwner(shape);
+ if (connection!=null) {
+ return BusinessObjectUtil.getFirstElementOfType(connection, getTargetClass());
}
return BusinessObjectUtil.getFirstElementOfType(shape, getTargetClass());
}
+ else if (context.getSourcePictogramElement() instanceof Connection) {
+ Connection connection = (Connection) context.getSourcePictogramElement();
+ return BusinessObjectUtil.getFirstBaseElement(connection);
+ }
return null;
}
@Override
protected BaseElement getTargetBo(ICreateConnectionContext context) {
- Anchor anchor = context.getTargetAnchor();
+ Anchor anchor = getTargetAnchor(context);
if (anchor != null && anchor.getParent() instanceof Shape) {
Shape shape = (Shape) anchor.getParent();
- Connection conn = AnchorUtil.getConnectionPointOwner(shape);
- if (conn!=null) {
- return BusinessObjectUtil.getFirstElementOfType(conn, getTargetClass());
+ Connection connection = AnchorUtil.getConnectionPointOwner(shape);
+ if (connection!=null) {
+ return BusinessObjectUtil.getFirstElementOfType(connection, getTargetClass());
}
return BusinessObjectUtil.getFirstElementOfType(shape, getTargetClass());
}
+ else if (context.getTargetPictogramElement() instanceof Connection) {
+ Connection connection = (Connection) context.getTargetPictogramElement();
+ return BusinessObjectUtil.getFirstBaseElement(connection);
+ }
return null;
}
@@ -380,7 +388,7 @@ public class AssociationFeatureContainer extends BaseElementConnectionFeatureCon
}
- public static class UpdateAssociationFeature extends AbstractUpdateFeature {
+ public static class UpdateAssociationFeature extends AbstractBpmn2UpdateFeature {
public UpdateAssociationFeature(IFeatureProvider fp) {
super(fp);
@@ -397,19 +405,20 @@ public class AssociationFeatureContainer extends BaseElementConnectionFeatureCon
@Override
public IReason updateNeeded(IUpdateContext context) {
- IPeService peService = Graphiti.getPeService();
- Connection connection = (Connection) context.getPictogramElement();
- Association businessObject = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- Association.class);
- String newDirection = businessObject.getAssociationDirection().toString();
- if (newDirection==null || newDirection.isEmpty())
- newDirection = AssociationDirection.NONE.toString();
- String oldDirection = peService.getPropertyValue(connection, ASSOCIATION_DIRECTION);
- if (oldDirection==null || oldDirection.isEmpty())
- oldDirection = AssociationDirection.NONE.toString();
-
- if (!oldDirection.equals(newDirection)) {
- return Reason.createTrueReason();
+ if (canUpdate(context)) {
+ Connection connection = (Connection) context.getPictogramElement();
+ Association businessObject = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ Association.class);
+ String newDirection = businessObject.getAssociationDirection().toString();
+ if (newDirection==null || newDirection.isEmpty())
+ newDirection = AssociationDirection.NONE.toString();
+ String oldDirection = Graphiti.getPeService().getPropertyValue(connection, ASSOCIATION_DIRECTION);
+ if (oldDirection==null || oldDirection.isEmpty())
+ oldDirection = AssociationDirection.NONE.toString();
+
+ if (!oldDirection.equals(newDirection)) {
+ return Reason.createTrueReason("Association Direction");
+ }
}
return Reason.createFalseReason();
}
@@ -455,26 +464,24 @@ public class AssociationFeatureContainer extends BaseElementConnectionFeatureCon
@Override
public void preReconnect(IReconnectionContext context) {
PictogramElement targetPictogramElement = context.getTargetPictogramElement();
- if (targetPictogramElement instanceof FreeFormConnection) {
+ if (targetPictogramElement instanceof Connection) {
Shape connectionPointShape = AnchorUtil.createConnectionPoint(
getFeatureProvider(),
- (FreeFormConnection)targetPictogramElement,
+ (Connection)targetPictogramElement,
context.getTargetLocation());
- if (context instanceof ReconnectionContext) {
- ReconnectionContext rc = (ReconnectionContext) context;
- rc.setNewAnchor(AnchorUtil.getConnectionPointAnchor(connectionPointShape));
- rc.setTargetPictogramElement(connectionPointShape);
- }
+ ReconnectionContext rc = (ReconnectionContext) context;
+ rc.setNewAnchor(AnchorUtil.getConnectionPointAnchor(connectionPointShape));
+ rc.setTargetPictogramElement(connectionPointShape);
}
super.preReconnect(context);
}
@Override
public void postReconnect(IReconnectionContext context) {
- Anchor oldAnchor = context.getOldAnchor();
- AnchorContainer oldAnchorContainer = oldAnchor.getParent();
- AnchorUtil.deleteConnectionPointIfPossible(getFeatureProvider(), (Shape) oldAnchorContainer);
+ if (AnchorUtil.isConnectionPoint(context.getOldAnchor().getParent())) {
+ AnchorUtil.deleteConnectionPoint(context.getOldAnchor().getParent());
+ }
super.postReconnect(context);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java
index 01349efb..91f3fe01 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/DataAssociationFeatureContainer.java
@@ -32,7 +32,9 @@ import org.eclipse.bpmn2.OutputSet;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.BaseElementConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractAddFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractCreateFlowFeature;
@@ -236,7 +238,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
dataInput.setName(
NLS.bind(
Messages.DataAssociationFeatureContainer_New_Input_For,
- ModelUtil.getDisplayName(target)
+ ExtendedPropertiesProvider.getTextValue(target)
)
);
DataInput result = dataInput;
@@ -304,7 +306,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
dataOutput.setName(
NLS.bind(
Messages.DataAssociationFeatureContainer_New_Output_For,
- ModelUtil.getDisplayName(source)
+ ExtendedPropertiesProvider.getTextValue(source)
)
);
DataOutput result = dataOutput;
@@ -373,10 +375,10 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
public String getText(Object object) {
ItemAwareElement element = (ItemAwareElement) object;
if (element.getId()==null)
- return ModelUtil.getDisplayName(object);
+ return ModelUtil.getTextValue(object);
String text = NLS.bind(
Messages.DataAssociationFeatureContainer_Reference_To,
- ModelUtil.getDisplayName(object)
+ ModelUtil.getTextValue(object)
);
String mapping = Messages.DataAssociationFeatureContainer_Unmapped;
if (element instanceof DataOutput) {
@@ -394,7 +396,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
if (d.getSourceRef().contains(element)) {
if (d.getTargetRef()!=null) {
mapping = NLS.bind(
- Messages.DataAssociationFeatureContainer_Mapped_To, ModelUtil.getDisplayName(d.getTargetRef())
+ Messages.DataAssociationFeatureContainer_Mapped_To, ExtendedPropertiesProvider.getTextValue(d.getTargetRef())
);
}
break;
@@ -417,7 +419,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
if (d.getSourceRef().size()>0) {
mapping = NLS.bind(
Messages.DataAssociationFeatureContainer_Mapped_To,
- ModelUtil.getDisplayName(d.getSourceRef().get(0))
+ ExtendedPropertiesProvider.getTextValue(d.getSourceRef().get(0))
);
}
break;
@@ -436,7 +438,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
public class CreateDataAssociationFeature extends AbstractCreateFlowFeature<DataAssociation, BaseElement, BaseElement> {
public CreateDataAssociationFeature(IFeatureProvider fp) {
- super(fp, Messages.DataAssociationFeatureContainer_Name, Messages.DataAssociationFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -484,7 +486,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
@Override
protected BaseElement getSourceBo(ICreateConnectionContext context) {
- Anchor anchor = context.getSourceAnchor();
+ Anchor anchor = getSourceAnchor(context);
if (anchor != null && anchor.getParent() instanceof Shape) {
Shape shape = (Shape) anchor.getParent();
Connection conn = AnchorUtil.getConnectionPointOwner(shape);
@@ -498,7 +500,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
@Override
protected BaseElement getTargetBo(ICreateConnectionContext context) {
- Anchor anchor = context.getTargetAnchor();
+ Anchor anchor = getTargetAnchor(context);
if (anchor != null && anchor.getParent() instanceof Shape) {
Shape shape = (Shape) anchor.getParent();
Connection conn = AnchorUtil.getConnectionPointOwner(shape);
@@ -648,20 +650,13 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
setAssociationDirection(connection, businessObject);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- protected Class<? extends BaseElement> getBoClass() {
+ public Class getBusinessObjectType() {
return DataAssociation.class;
}
-
- @Override
- public int getHeight() {
- return 0;
- }
-
- @Override
- public int getWidth() {
- return 0;
- }
}
@@ -709,7 +704,7 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
}
- public static class UpdateDataAssociationFeature extends AbstractUpdateFeature {
+ public static class UpdateDataAssociationFeature extends AbstractBpmn2UpdateFeature {
public UpdateDataAssociationFeature(IFeatureProvider fp) {
super(fp);
@@ -726,27 +721,30 @@ public class DataAssociationFeatureContainer extends BaseElementConnectionFeatur
@Override
public IReason updateNeeded(IUpdateContext context) {
- IPeService peService = Graphiti.getPeService();
- Connection connection = (Connection) context.getPictogramElement();
- DataAssociation businessObject = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- DataAssociation.class);
- String newDirection = getDirection(businessObject);
- String oldDirection = peService.getPropertyValue(connection, ASSOCIATION_DIRECTION);
- if (oldDirection==null || oldDirection.isEmpty())
- oldDirection = ""; //$NON-NLS-1$
-
- if (!oldDirection.equals(newDirection)) {
- return Reason.createTrueReason();
+ if (canUpdate(context)) {
+ Connection connection = (Connection) context.getPictogramElement();
+ DataAssociation businessObject = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ DataAssociation.class);
+ String newDirection = getDirection(businessObject);
+ String oldDirection = Graphiti.getPeService().getPropertyValue(connection, ASSOCIATION_DIRECTION);
+ if (oldDirection==null || oldDirection.isEmpty())
+ oldDirection = ""; //$NON-NLS-1$
+
+ if (!oldDirection.equals(newDirection)) {
+ return Reason.createTrueReason();
+ }
}
return Reason.createFalseReason();
}
@Override
public boolean update(IUpdateContext context) {
- Connection connection = (Connection) context.getPictogramElement();
- DataAssociation businessObject = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
- DataAssociation.class);
- setAssociationDirection(connection, businessObject);
+ if (canUpdate(context)) {
+ Connection connection = (Connection) context.getPictogramElement();
+ DataAssociation businessObject = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
+ DataAssociation.class);
+ setAssociationDirection(connection, businessObject);
+ }
return true;
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java
index 6f8d3c29..0db0b92a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/MessageFlowFeatureContainer.java
@@ -12,7 +12,6 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.flow;
-import java.io.IOException;
import java.util.List;
import org.eclipse.bpmn2.BaseElement;
@@ -25,20 +24,20 @@ import org.eclipse.bpmn2.MessageEventDefinition;
import org.eclipse.bpmn2.MessageFlow;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.StartEvent;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.features.BaseElementConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractAddFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractCreateFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.flow.AbstractReconnectFlowFeature;
import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.ui.features.data.MessageFeatureContainer;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -119,7 +118,10 @@ public class MessageFlowFeatureContainer extends BaseElementConnectionFeatureCon
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return new UpdateMessageFlowFeature(fp);
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateMessageFlowFeature(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
+ return multiUpdate;
}
@Override
@@ -348,8 +350,11 @@ public class MessageFlowFeatureContainer extends BaseElementConnectionFeatureCon
return connectionLine;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
@Override
- protected Class<? extends BaseElement> getBoClass() {
+ public Class getBusinessObjectType() {
return MessageFlow.class;
}
}
@@ -357,7 +362,7 @@ public class MessageFlowFeatureContainer extends BaseElementConnectionFeatureCon
public static class CreateMessageFlowFeature extends AbstractCreateFlowFeature<MessageFlow, InteractionNode, InteractionNode> {
public CreateMessageFlowFeature(IFeatureProvider fp) {
- super(fp, Messages.MessageFlowFeatureContainer_Name, Messages.MessageFlowFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -427,19 +432,16 @@ public class MessageFlowFeatureContainer extends BaseElementConnectionFeatureCon
return true;
}
boolean different = false;
- try {
- ModelHandler handler = ModelHandler.getInstance(getDiagram());
- Participant sourceParticipant = handler.getParticipant(source);
- Participant targetParticipant = handler.getParticipant(target);
- if (sourceParticipant==null) {
- if (targetParticipant==null)
- return true;
- return false;
- }
- different = !sourceParticipant.equals(targetParticipant);
- } catch (IOException e) {
- Activator.logError(e);
+ ModelHandler mh = ModelHandler.getInstance(getDiagram());
+ Participant sourceParticipant = mh.getParticipant(source);
+ Participant targetParticipant = mh.getParticipant(target);
+ if (sourceParticipant==null) {
+ if (targetParticipant==null)
+ return true;
+ return false;
}
+ different = !sourceParticipant.equals(targetParticipant);
+
return different;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/Messages.java
index c3b10fc9..20b46ebb 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.flow;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/SequenceFlowFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/SequenceFlowFeatureContainer.java
index db6f1f3f..139ce5c6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/SequenceFlowFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/SequenceFlowFeatureContainer.java
@@ -24,8 +24,10 @@ import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.InclusiveGateway;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.BaseElementConnectionFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.DefaultLayoutBPMNConnectionFeature;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
@@ -53,13 +55,11 @@ import org.eclipse.graphiti.features.context.ICreateConnectionContext;
import org.eclipse.graphiti.features.context.IReconnectionContext;
import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.context.impl.ReconnectionContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
import org.eclipse.graphiti.mm.algorithms.Polyline;
import org.eclipse.graphiti.mm.algorithms.styles.Color;
import org.eclipse.graphiti.mm.algorithms.styles.LineStyle;
-import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.Diagram;
@@ -99,9 +99,9 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateDefaultSequenceFlowFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateConditionalSequenceFlowFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateLabelFeature(fp));
+ multiUpdate.addFeature(new UpdateDefaultSequenceFlowFeature(fp));
+ multiUpdate.addFeature(new UpdateConditionalSequenceFlowFeature(fp));
+ multiUpdate.addFeature(new UpdateLabelFeature(fp));
return multiUpdate;
}
@@ -121,11 +121,6 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
}
@Override
- protected Class<? extends BaseElement> getBoClass() {
- return SequenceFlow.class;
- }
-
- @Override
protected Polyline createConnectionLine(Connection connection) {
IPeService peService = Graphiti.getPeService();
IGaService gaService = Graphiti.getGaService();
@@ -152,12 +147,20 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
setDefaultSequenceFlow(connection);
setConditionalSequenceFlow(connection);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return SequenceFlow.class;
+ }
}
public static class CreateSequenceFlowFeature extends AbstractCreateFlowFeature<SequenceFlow, FlowNode, FlowNode> {
public CreateSequenceFlowFeature(IFeatureProvider fp) {
- super(fp, Messages.SequenceFlowFeatureContainer_Name, Messages.SequenceFlowFeatureContainer_Description);
+ super(fp);
}
@Override
@@ -187,7 +190,7 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
if (source==target)
return true;
- if (target instanceof CatchEvent)
+ if (target instanceof StartEvent)
return false;
EObject sourceContainer = source.eContainer();
@@ -262,7 +265,7 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
}
- public static class UpdateDefaultSequenceFlowFeature extends AbstractUpdateFeature {
+ public static class UpdateDefaultSequenceFlowFeature extends AbstractBpmn2UpdateFeature {
public UpdateDefaultSequenceFlowFeature(IFeatureProvider fp) {
super(fp);
@@ -288,7 +291,7 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
SequenceFlow defaultFlow = getDefaultFlow(flow.getSourceRef());
boolean isDefault = defaultFlow == null ? false : defaultFlow.equals(flow);
boolean changed = isDefault != new Boolean(property);
- return changed ? Reason.createTrueReason() : Reason.createFalseReason();
+ return changed ? Reason.createTrueReason("Default Flow") : Reason.createFalseReason();
}
@Override
@@ -321,7 +324,7 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
Boolean.toString(flow.getConditionExpression() != null));
}
- public static class UpdateConditionalSequenceFlowFeature extends AbstractUpdateFeature {
+ public static class UpdateConditionalSequenceFlowFeature extends AbstractBpmn2UpdateFeature {
public UpdateConditionalSequenceFlowFeature(IFeatureProvider fp) {
super(fp);
@@ -351,7 +354,7 @@ public class SequenceFlowFeatureContainer extends BaseElementConnectionFeatureCo
return Reason.createFalseReason();
}
boolean changed = flow.getConditionExpression() != null != new Boolean(property);
- return changed ? Reason.createTrueReason() : Reason.createFalseReason();
+ return changed ? Reason.createTrueReason("Conditional Flow") : Reason.createFalseReason();
}
return Reason.createFalseReason();
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/messages.properties
index a45c71ca..4d7bd568 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/flow/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
AssociationFeatureContainer_Description=Create Association
AssociationFeatureContainer_Name=Association
DataAssociationFeatureContainer_Description=Create Data Association
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java
index a5dada35..87370488 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java
@@ -13,15 +13,11 @@
package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
import org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature;
import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.bpmn2.modeler.ui.features.LayoutBaseElementTextFeature;
import org.eclipse.bpmn2.modeler.ui.features.activity.AppendActivityFeature;
import org.eclipse.bpmn2.modeler.ui.features.event.AppendEventFeature;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.ILayoutFeature;
@@ -34,11 +30,9 @@ import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
-import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-import org.eclipse.graphiti.mm.pictograms.Shape;
public abstract class AbstractGatewayFeatureContainer extends BaseElementFeatureContainer {
@@ -49,13 +43,7 @@ public abstract class AbstractGatewayFeatureContainer extends BaseElementFeature
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutBaseElementTextFeature(fp) {
-
- @Override
- public int getMinimumWidth() {
- return 2 * GraphicsUtil.GATEWAY_RADIUS;
- }
- };
+ return null;
}
@Override
@@ -96,14 +84,14 @@ public abstract class AbstractGatewayFeatureContainer extends BaseElementFeature
public UpdateAbstractGatewayFeature(IFeatureProvider fp) {
super(fp);
- // TODO Auto-generated constructor stub
}
@Override
public boolean canUpdate(IUpdateContext context) {
- IFeatureProvider featureProvider = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();
+ IFeatureProvider featureProvider = getFeatureProvider();
- Shape gatewayShape = (Shape) context.getPictogramElement();
+ if (context.getPictogramElement() instanceof ContainerShape) {
+ ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
for (Anchor anchor : gatewayShape.getAnchors()) {
for (Connection connection : anchor.getIncomingConnections() ) {
IUpdateContext updateCtx = new UpdateContext(connection);
@@ -124,21 +112,20 @@ public abstract class AbstractGatewayFeatureContainer extends BaseElementFeature
}
}
}
-
+ }
return super.canUpdate(context);
}
@Override
public IReason updateNeeded(IUpdateContext context) {
- Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
- if (value instanceof EObject) {
- // if the UpdateContext has a "businessObject" property, then this update is needed
- // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
- return Reason.createTrueReason("Initial update");
- }
- IFeatureProvider featureProvider = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ IFeatureProvider featureProvider = getFeatureProvider();
- Shape gatewayShape = (Shape) context.getPictogramElement();
+ if (context.getPictogramElement() instanceof ContainerShape) {
+ ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
for (Anchor anchor : gatewayShape.getAnchors()) {
for (Connection connection : anchor.getIncomingConnections() ) {
IUpdateContext updateCtx = new UpdateContext(connection);
@@ -159,14 +146,15 @@ public abstract class AbstractGatewayFeatureContainer extends BaseElementFeature
}
}
}
-
+ }
return super.updateNeeded(context);
}
@Override
public boolean update(IUpdateContext context) {
- IFeatureProvider featureProvider = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();
+ IFeatureProvider featureProvider = getFeatureProvider();
+ if (context.getPictogramElement() instanceof ContainerShape) {
ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
for (Anchor anchor : gatewayShape.getAnchors()) {
for (Connection connection : anchor.getIncomingConnections() ) {
@@ -181,6 +169,7 @@ public abstract class AbstractGatewayFeatureContainer extends BaseElementFeature
IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
if (updateFeature != null) {
updateFeature.update(updateCtx);
+ }
}
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java.orig b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java.orig
new file mode 100644
index 00000000..d03ff26e
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java.orig
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.gateway;
+
+import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
+import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
+import org.eclipse.bpmn2.modeler.core.features.MoveFlowNodeFeature;
+import org.eclipse.bpmn2.modeler.core.features.label.UpdateLabelFeature;
+import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
+import org.eclipse.bpmn2.modeler.ui.features.activity.AppendActivityFeature;
+import org.eclipse.bpmn2.modeler.ui.features.event.AppendEventFeature;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.graphiti.features.IDeleteFeature;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.ILayoutFeature;
+import org.eclipse.graphiti.features.IMoveShapeFeature;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IResizeShapeContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.context.impl.UpdateContext;
+import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.features.impl.DefaultResizeShapeFeature;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.pictograms.Anchor;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+
+public abstract class AbstractGatewayFeatureContainer extends BaseElementFeatureContainer {
+
+ @Override
+ public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
+ return new UpdateAbstractGatewayFeature(fp);
+ }
+
+ @Override
+ public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
+ return null;
+ }
+
+ @Override
+ public IMoveShapeFeature getMoveFeature(IFeatureProvider fp) {
+ return new MoveFlowNodeFeature(fp);
+ }
+
+ @Override
+ public IResizeShapeFeature getResizeFeature(IFeatureProvider fp) {
+ return new DefaultResizeShapeFeature(fp) {
+ @Override
+ public boolean canResizeShape(IResizeShapeContext context) {
+ return false;
+ }
+ };
+ }
+
+ @Override
+ public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
+ return new AbstractDefaultDeleteFeature(fp);
+ }
+
+ @Override
+ public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
+ ICustomFeature[] superFeatures = super.getCustomFeatures(fp);
+ ICustomFeature[] thisFeatures = new ICustomFeature[4 + superFeatures.length];
+ int i;
+ for (i=0; i<superFeatures.length; ++i)
+ thisFeatures[i] = superFeatures[i];
+ thisFeatures[i++] = new AppendActivityFeature(fp);
+ thisFeatures[i++] = new AppendGatewayFeature(fp);
+ thisFeatures[i++] = new AppendEventFeature(fp);
+ thisFeatures[i++] = new MorphGatewayFeature(fp);
+ return thisFeatures;
+ }
+
+ private class UpdateAbstractGatewayFeature extends UpdateLabelFeature {
+
+ public UpdateAbstractGatewayFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public boolean canUpdate(IUpdateContext context) {
+ IFeatureProvider featureProvider = getFeatureProvider();
+
+ if (context.getPictogramElement() instanceof ContainerShape) {
+ ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
+ for (Anchor anchor : gatewayShape.getAnchors()) {
+ for (Connection connection : anchor.getIncomingConnections() ) {
+ IUpdateContext updateCtx = new UpdateContext(connection);
+ IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
+ if (updateFeature != null) {
+ boolean ret = updateFeature.canUpdate(updateCtx);
+ if (ret)
+ return ret;
+ }
+ }
+ for (Connection connection : anchor.getOutgoingConnections() ) {
+ IUpdateContext updateCtx = new UpdateContext(connection);
+ IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
+ if (updateFeature != null) {
+ boolean ret = updateFeature.canUpdate(updateCtx);
+ if (ret)
+ return ret;
+ }
+ }
+ }
+ }
+ return super.canUpdate(context);
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java
+ Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
+ if (value instanceof EObject) {
+ // if the UpdateContext has a "businessObject" property, then this update is needed
+ // as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
+ return Reason.createTrueReason("Initial update");
+ }
+ IFeatureProvider featureProvider = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();
+
+ Shape gatewayShape = (Shape) context.getPictogramElement();
+ for (Anchor anchor : gatewayShape.getAnchors()) {
+ for (Connection connection : anchor.getIncomingConnections() ) {
+ IUpdateContext updateCtx = new UpdateContext(connection);
+ IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
+ if (updateFeature != null) {
+ IReason ret = updateFeature.updateNeeded(updateCtx);
+ if (ret.toBoolean())
+ return ret;
+=======
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ IFeatureProvider featureProvider = getFeatureProvider();
+
+ if (context.getPictogramElement() instanceof ContainerShape) {
+ ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
+ for (Anchor anchor : gatewayShape.getAnchors()) {
+ for (Connection connection : anchor.getIncomingConnections() ) {
+ IUpdateContext updateCtx = new UpdateContext(connection);
+ IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
+ if (updateFeature != null) {
+ IReason ret = updateFeature.updateNeeded(updateCtx);
+ if (ret.toBoolean())
+ return ret;
+ }
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AbstractGatewayFeatureContainer.java
+ }
+ for (Connection connection : anchor.getOutgoingConnections() ) {
+ IUpdateContext updateCtx = new UpdateContext(connection);
+ IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
+ if (updateFeature != null) {
+ IReason ret = updateFeature.updateNeeded(updateCtx);
+ if (ret.toBoolean())
+ return ret;
+ }
+ }
+ }
+ }
+ return super.updateNeeded(context);
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ IFeatureProvider featureProvider = getFeatureProvider();
+
+ if (context.getPictogramElement() instanceof ContainerShape) {
+ ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
+ for (Anchor anchor : gatewayShape.getAnchors()) {
+ for (Connection connection : anchor.getIncomingConnections() ) {
+ IUpdateContext updateCtx = new UpdateContext(connection);
+ IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
+ if (updateFeature != null) {
+ updateFeature.update(updateCtx);
+ }
+ }
+ for (Connection connection : anchor.getOutgoingConnections() ) {
+ IUpdateContext updateCtx = new UpdateContext(connection);
+ IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
+ if (updateFeature != null) {
+ updateFeature.update(updateCtx);
+ }
+ }
+ }
+ }
+ return super.update(context);
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AppendGatewayFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AppendGatewayFeature.java
index 5e49b60a..5e49b60a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AppendGatewayFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/AppendGatewayFeature.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ComplexGatewayFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ComplexGatewayFeatureContainer.java
index c1d2e828..33c1ac77 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ComplexGatewayFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ComplexGatewayFeatureContainer.java
@@ -14,20 +14,15 @@ package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.ComplexGateway;
-import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.features.gateway.AbstractCreateGatewayFeature;
import org.eclipse.bpmn2.modeler.core.features.gateway.AddGatewayFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Asterisk;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
public class ComplexGatewayFeatureContainer extends AbstractGatewayFeatureContainer {
@@ -54,14 +49,23 @@ public class ComplexGatewayFeatureContainer extends AbstractGatewayFeatureContai
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, ComplexGateway businessObject) {
- GraphicsUtil.createGatewayAsterisk(containerShape);
+ super.decorateShape(context, containerShape, businessObject);
+ ShapeDecoratorUtil.createGatewayAsterisk(containerShape);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ComplexGateway.class;
}
}
public class CreateComplexGatewayFeature extends AbstractCreateGatewayFeature<ComplexGateway> {
public CreateComplexGatewayFeature(IFeatureProvider fp) {
- super(fp, Messages.ComplexGatewayFeatureContainer_Name, Messages.ComplexGatewayFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/EventBasedGatewayFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/EventBasedGatewayFeatureContainer.java
index 4cd8e3fa..fa5ef844 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/EventBasedGatewayFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/EventBasedGatewayFeatureContainer.java
@@ -15,14 +15,10 @@ package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.EventBasedGatewayType;
-import org.eclipse.bpmn2.Gateway;
-import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
import org.eclipse.bpmn2.modeler.core.features.gateway.AbstractCreateGatewayFeature;
import org.eclipse.bpmn2.modeler.core.features.gateway.AddGatewayFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
@@ -30,7 +26,6 @@ import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.algorithms.Polygon;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
@@ -61,8 +56,8 @@ public class EventBasedGatewayFeatureContainer extends AbstractGatewayFeatureCon
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(super.getUpdateFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateEventBasedGatewayFeature(fp));
+ multiUpdate.addFeature(super.getUpdateFeature(fp));
+ multiUpdate.addFeature(new UpdateEventBasedGatewayFeature(fp));
return multiUpdate;
}
@@ -73,9 +68,10 @@ public class EventBasedGatewayFeatureContainer extends AbstractGatewayFeatureCon
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, EventBasedGateway businessObject) {
- Ellipse outer = GraphicsUtil.createGatewayOuterCircle(containerShape);
- Ellipse inner = GraphicsUtil.createGatewayInnerCircle(outer);
- Polygon pentagon = GraphicsUtil.createGatewayPentagon(containerShape);
+ super.decorateShape(context, containerShape, businessObject);
+ Ellipse outer = ShapeDecoratorUtil.createGatewayOuterCircle(containerShape);
+ Ellipse inner = ShapeDecoratorUtil.createGatewayInnerCircle(outer);
+ Polygon pentagon = ShapeDecoratorUtil.createGatewayPentagon(containerShape);
pentagon.setFilled(false);
}
@@ -89,12 +85,20 @@ public class EventBasedGatewayFeatureContainer extends AbstractGatewayFeatureCon
EventBasedGatewayType.EXCLUSIVE.getName());
return element;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return EventBasedGateway.class;
+ }
}
public static class CreateEventBasedGatewayFeature extends AbstractCreateGatewayFeature<EventBasedGateway> {
public CreateEventBasedGatewayFeature(IFeatureProvider fp) {
- super(fp, Messages.EventBasedGatewayFeatureContainer_Name, Messages.EventBasedGatewayFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ExclusiveGatewayFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ExclusiveGatewayFeatureContainer.java
index f913c018..6157af2a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ExclusiveGatewayFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ExclusiveGatewayFeatureContainer.java
@@ -13,12 +13,13 @@
package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.ExclusiveGateway;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.features.gateway.AbstractCreateGatewayFeature;
import org.eclipse.bpmn2.modeler.core.features.gateway.AddGatewayFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
@@ -51,19 +52,28 @@ public class ExclusiveGatewayFeatureContainer extends AbstractGatewayFeatureCont
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, ExclusiveGateway businessObject) {
+ super.decorateShape(context, containerShape, businessObject);
// TODO: handle showExclusiveGatewayMarker property change event in BPMN2Editor
// and override the default gateway UpdateFeature to show/hide the "X" marker.
BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(containerShape, BPMNShape.class);
if (bpmnShape.isIsMarkerVisible()) {
- GraphicsUtil.createGatewayDiagonalCross(containerShape);
+ ShapeDecoratorUtil.createGatewayDiagonalCross(containerShape);
}
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ExclusiveGateway.class;
+ }
}
public static class CreateExclusiveGatewayFeature extends AbstractCreateGatewayFeature<ExclusiveGateway> {
public CreateExclusiveGatewayFeature(IFeatureProvider fp) {
- super(fp, Messages.ExclusiveGatewayFeatureContainer_Name, Messages.ExclusiveGatewayFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/InclusiveGatewayFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/InclusiveGatewayFeatureContainer.java
index 97754d27..44784b0b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/InclusiveGatewayFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/InclusiveGatewayFeatureContainer.java
@@ -13,22 +13,17 @@
package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.ExclusiveGateway;
-import org.eclipse.bpmn2.Gateway;
+import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.InclusiveGateway;
-import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.features.gateway.AbstractCreateGatewayFeature;
import org.eclipse.bpmn2.modeler.core.features.gateway.AddGatewayFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
@@ -56,15 +51,24 @@ public class InclusiveGatewayFeatureContainer extends AbstractGatewayFeatureCont
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, InclusiveGateway businessObject) {
- Ellipse ellipse = GraphicsUtil.createGatewayOuterCircle(containerShape);
+ super.decorateShape(context, containerShape, businessObject);
+ Ellipse ellipse = ShapeDecoratorUtil.createGatewayOuterCircle(containerShape);
ellipse.setLineWidth(3);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return InclusiveGateway.class;
+ }
}
public static class CreateInclusiveGatewayFeature extends AbstractCreateGatewayFeature<InclusiveGateway> {
public CreateInclusiveGatewayFeature(IFeatureProvider fp) {
- super(fp, Messages.InclusiveGatewayFeatureContainer_Name, Messages.InclusiveGatewayFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/Messages.java
index b20759cf..28f37aea 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/MorphGatewayFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/MorphGatewayFeature.java
index 1da8c166..1da8c166 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/MorphGatewayFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/MorphGatewayFeature.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ParallelGatewayFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ParallelGatewayFeatureContainer.java
index 4d7f40bc..cda9b6e3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ParallelGatewayFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/ParallelGatewayFeatureContainer.java
@@ -13,23 +13,16 @@
package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.Gateway;
-import org.eclipse.bpmn2.ManualTask;
import org.eclipse.bpmn2.ParallelGateway;
-import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.modeler.core.features.gateway.AbstractCreateGatewayFeature;
import org.eclipse.bpmn2.modeler.core.features.gateway.AddGatewayFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
-import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil.Cross;
-import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IAddContext;
-import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
public class ParallelGatewayFeatureContainer extends AbstractGatewayFeatureContainer {
@@ -56,14 +49,23 @@ public class ParallelGatewayFeatureContainer extends AbstractGatewayFeatureConta
@Override
protected void decorateShape(IAddContext context, ContainerShape containerShape, ParallelGateway businessObject) {
- GraphicsUtil.createGatewayCross(containerShape);
+ super.decorateShape(context, containerShape, businessObject);
+ ShapeDecoratorUtil.createGatewayCross(containerShape);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2AddFeature#getBusinessObjectType()
+ */
+ @Override
+ public Class getBusinessObjectType() {
+ return ParallelGateway.class;
}
}
public static class CreateParallelGatewayFeature extends AbstractCreateGatewayFeature<ParallelGateway> {
public CreateParallelGatewayFeature(IFeatureProvider fp) {
- super(fp, Messages.ParallelGatewayFeatureContainer_Name, Messages.ParallelGatewayFeatureContainer_Description);
+ super(fp);
}
@Override
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java
new file mode 100644
index 00000000..3a48711a
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Innar Made
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.features.gateway;
+
+import org.eclipse.bpmn2.EventBasedGateway;
+import org.eclipse.bpmn2.EventBasedGatewayType;
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IReason;
+import org.eclipse.graphiti.features.context.IUpdateContext;
+import org.eclipse.graphiti.features.impl.Reason;
+import org.eclipse.graphiti.mm.algorithms.Ellipse;
+import org.eclipse.graphiti.mm.algorithms.Polygon;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+import org.eclipse.graphiti.services.IPeService;
+
+public class UpdateEventBasedGatewayFeature extends AbstractUpdateBaseElementFeature<EventBasedGateway> {
+
+ public UpdateEventBasedGatewayFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public IReason updateNeeded(IUpdateContext context) {
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+ IPeService service = Graphiti.getPeService();
+
+ boolean instantiate = Boolean.parseBoolean(service.getPropertyValue(context.getPictogramElement(),
+ EventBasedGatewayFeatureContainer.INSTANTIATE_PROPERTY));
+ EventBasedGatewayType gatewayType = EventBasedGatewayType.getByName(service.getPropertyValue(
+ context.getPictogramElement(), EventBasedGatewayFeatureContainer.EVENT_GATEWAY_TYPE_PROPERTY));
+
+ EventBasedGateway gateway = (EventBasedGateway) getBusinessObjectForPictogramElement(context
+ .getPictogramElement());
+
+ boolean changed = instantiate != gateway.isInstantiate() || gatewayType != gateway.getEventGatewayType();
+ return changed ? Reason.createTrueReason("Is Instantiate") : Reason.createFalseReason();
+ }
+
+ @Override
+ public boolean update(IUpdateContext context) {
+ IPeService service = Graphiti.getPeService();
+
+ EventBasedGateway gateway = (EventBasedGateway) getBusinessObjectForPictogramElement(context
+ .getPictogramElement());
+
+ clearGateway(context.getPictogramElement());
+
+ if (gateway.isInstantiate()) {
+ if (gateway.getEventGatewayType() == EventBasedGatewayType.PARALLEL) {
+ drawParallelMultipleEventBased((ContainerShape) context.getPictogramElement());
+ } else {
+ drawExclusiveEventBased((ContainerShape) context.getPictogramElement());
+ }
+ } else {
+ drawEventBased((ContainerShape) context.getPictogramElement());
+ }
+
+ service.setPropertyValue(context.getPictogramElement(), EventBasedGatewayFeatureContainer.INSTANTIATE_PROPERTY,
+ Boolean.toString(gateway.isInstantiate()));
+ service.setPropertyValue(context.getPictogramElement(),
+ EventBasedGatewayFeatureContainer.EVENT_GATEWAY_TYPE_PROPERTY, gateway.getEventGatewayType().getName());
+ return true;
+ }
+
+ private void clearGateway(PictogramElement element) {
+ ShapeDecoratorUtil.clearGateway(element);
+ }
+
+ private void drawEventBased(ContainerShape container) {
+ if (FeatureSupport.isLabelShape(container)) {
+ // don't draw decorators on Labels
+ return;
+ }
+ Ellipse outer = ShapeDecoratorUtil.createGatewayOuterCircle(container);
+ Ellipse inner = ShapeDecoratorUtil.createGatewayInnerCircle(outer);
+ Polygon pentagon = ShapeDecoratorUtil.createGatewayPentagon(container);
+ pentagon.setFilled(false);
+ }
+
+ private void drawExclusiveEventBased(ContainerShape container) {
+ if (FeatureSupport.isLabelShape(container)) {
+ // don't draw decorators on Labels
+ return;
+ }
+ Ellipse ellipse = ShapeDecoratorUtil.createGatewayOuterCircle(container);
+ Polygon pentagon = ShapeDecoratorUtil.createGatewayPentagon(container);
+ pentagon.setFilled(false);
+ }
+
+ private void drawParallelMultipleEventBased(ContainerShape container) {
+ if (FeatureSupport.isLabelShape(container)) {
+ // don't draw decorators on Labels
+ return;
+ }
+ Ellipse ellipse = ShapeDecoratorUtil.createGatewayOuterCircle(container);
+ Polygon cross = ShapeDecoratorUtil.createEventGatewayParallelCross(container);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java.orig
index 3b50e94b..72fbdcb1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java.orig
@@ -14,15 +14,21 @@ package org.eclipse.bpmn2.modeler.ui.features.gateway;
import org.eclipse.bpmn2.EventBasedGateway;
import org.eclipse.bpmn2.EventBasedGatewayType;
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java
import org.eclipse.bpmn2.modeler.core.features.ContextConstants;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.GraphicsUtil;
import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
import org.eclipse.emf.ecore.EObject;
+=======
+import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2UpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.AbstractUpdateBaseElementFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.ShapeDecoratorUtil;
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.context.IUpdateContext;
-import org.eclipse.graphiti.features.impl.AbstractUpdateFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.algorithms.Ellipse;
import org.eclipse.graphiti.mm.algorithms.Polygon;
@@ -31,26 +37,27 @@ import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.services.IPeService;
-public class UpdateEventBasedGatewayFeature extends AbstractUpdateFeature {
+public class UpdateEventBasedGatewayFeature extends AbstractUpdateBaseElementFeature<EventBasedGateway> {
public UpdateEventBasedGatewayFeature(IFeatureProvider fp) {
super(fp);
}
@Override
- public boolean canUpdate(IUpdateContext context) {
- Object o = getBusinessObjectForPictogramElement(context.getPictogramElement());
- return o != null && o instanceof EventBasedGateway;
- }
-
- @Override
public IReason updateNeeded(IUpdateContext context) {
+<<<<<<< HEAD:org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java
Object value = context.getProperty(ContextConstants.BUSINESS_OBJECT);
if (value instanceof EObject) {
// if the UpdateContext has a "businessObject" property, then this update is needed
// as part of the the CreateFeature ("businessObject" is only set in the CreateFeature)
return Reason.createTrueReason("Initial update");
}
+=======
+ IReason reason = super.updateNeeded(context);
+ if (reason.toBoolean())
+ return reason;
+
+>>>>>>> API-Refactoring:plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/UpdateEventBasedGatewayFeature.java
IPeService service = Graphiti.getPeService();
boolean instantiate = Boolean.parseBoolean(service.getPropertyValue(context.getPictogramElement(),
@@ -62,7 +69,7 @@ public class UpdateEventBasedGatewayFeature extends AbstractUpdateFeature {
.getPictogramElement());
boolean changed = instantiate != gateway.isInstantiate() || gatewayType != gateway.getEventGatewayType();
- return changed ? Reason.createTrueReason() : Reason.createFalseReason();
+ return changed ? Reason.createTrueReason("Is Instantiate") : Reason.createFalseReason();
}
@Override
@@ -92,7 +99,7 @@ public class UpdateEventBasedGatewayFeature extends AbstractUpdateFeature {
}
private void clearGateway(PictogramElement element) {
- GraphicsUtil.clearGateway(element);
+ ShapeDecoratorUtil.clearGateway(element);
}
private void drawEventBased(ContainerShape container) {
@@ -100,9 +107,9 @@ public class UpdateEventBasedGatewayFeature extends AbstractUpdateFeature {
// don't draw decorators on Labels
return;
}
- Ellipse outer = GraphicsUtil.createGatewayOuterCircle(container);
- Ellipse inner = GraphicsUtil.createGatewayInnerCircle(outer);
- Polygon pentagon = GraphicsUtil.createGatewayPentagon(container);
+ Ellipse outer = ShapeDecoratorUtil.createGatewayOuterCircle(container);
+ Ellipse inner = ShapeDecoratorUtil.createGatewayInnerCircle(outer);
+ Polygon pentagon = ShapeDecoratorUtil.createGatewayPentagon(container);
pentagon.setFilled(false);
}
@@ -111,8 +118,8 @@ public class UpdateEventBasedGatewayFeature extends AbstractUpdateFeature {
// don't draw decorators on Labels
return;
}
- Ellipse ellipse = GraphicsUtil.createGatewayOuterCircle(container);
- Polygon pentagon = GraphicsUtil.createGatewayPentagon(container);
+ Ellipse ellipse = ShapeDecoratorUtil.createGatewayOuterCircle(container);
+ Polygon pentagon = ShapeDecoratorUtil.createGatewayPentagon(container);
pentagon.setFilled(false);
}
@@ -121,7 +128,7 @@ public class UpdateEventBasedGatewayFeature extends AbstractUpdateFeature {
// don't draw decorators on Labels
return;
}
- Ellipse ellipse = GraphicsUtil.createGatewayOuterCircle(container);
- Polygon cross = GraphicsUtil.createEventGatewayParallelCross(container);
+ Ellipse ellipse = ShapeDecoratorUtil.createGatewayOuterCircle(container);
+ Polygon cross = ShapeDecoratorUtil.createEventGatewayParallelCross(container);
}
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/messages.properties
index 2b5695ce..08efa742 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/gateway/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
AppendGatewayFeature_Description=Create a new Gateway and connect it to this item
AppendGatewayFeature_Name=Append Gateway
ComplexGatewayFeatureContainer_Description=Create Complex Gateway
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/CreateLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/CreateLaneFeature.java
index 38e8bc76..d7955b7e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/CreateLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/CreateLaneFeature.java
@@ -12,14 +12,11 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.lane;
-import java.io.IOException;
-
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Lane;
-import org.eclipse.bpmn2.modeler.core.Activator;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
@@ -27,17 +24,19 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class CreateLaneFeature extends AbstractBpmn2CreateFeature<Lane> {
- private static int index = 1;
-
public CreateLaneFeature(IFeatureProvider fp) {
- super(fp, Messages.CreateLaneFeature_Name, Messages.CreateLaneFeature_Description);
+ super(fp);
}
@Override
public boolean canCreate(ICreateContext context) {
+ if (!super.canCreate(context))
+ return false;
+
// NOTE: This is slightly different from FeatureSupport.isValidFlowElementTarget()
// because a Lane can be added to a Lane that is not a top-level Lane. This is not
// the case for Activities, Events and Gateways.
@@ -53,8 +52,8 @@ public class CreateLaneFeature extends AbstractBpmn2CreateFeature<Lane> {
public Object[] create(ICreateContext context) {
Lane lane = createBusinessObject(context);
lane.setName(Messages.CreateLaneFeature_Default_Name+ModelUtil.getIDNumber(lane.getId()));
- addGraphicalRepresentation(context, lane);
- return new Object[] { lane };
+ PictogramElement pe = addGraphicalRepresentation(context, lane);
+ return new Object[] { lane, pe };
}
@Override
@@ -77,21 +76,18 @@ public class CreateLaneFeature extends AbstractBpmn2CreateFeature<Lane> {
@Override
public Lane createBusinessObject(ICreateContext context) {
- Lane bo = null;
- try {
- ModelHandler mh = ModelHandlerLocator.getModelHandler(getDiagram().eResource());
- Object o = getBusinessObjectForPictogramElement(context.getTargetContainer());
- if (FeatureSupport.isTargetLane(context)) {
- Lane targetLane = (Lane) o;
- bo = ModelHandler.createLane(targetLane);
- } else {
- bo = mh.createLane(o);
- }
- putBusinessObject(context, bo);
+ ModelHandler mh = ModelHandlerLocator.getModelHandler(getDiagram().eResource());
- } catch (IOException e) {
- Activator.logError(e);
+ Object bo = getBusinessObjectForPictogramElement(context.getTargetContainer());
+ Lane lane = null;
+ if (FeatureSupport.isTargetLane(context)) {
+ Lane targetLane = (Lane) bo;
+ lane = ModelHandler.createLane(targetLane);
+ } else {
+ lane = mh.createLane(bo);
}
- return bo;
+ putBusinessObject(context, lane);
+
+ return lane;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java
new file mode 100644
index 00000000..57764c57
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/DeleteLaneFeature.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.features.lane;
+
+import org.eclipse.bpmn2.Lane;
+import org.eclipse.bpmn2.LaneSet;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.IResizeShapeFeature;
+import org.eclipse.graphiti.features.context.IDeleteContext;
+import org.eclipse.graphiti.features.context.impl.ResizeShapeContext;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class DeleteLaneFeature extends AbstractDefaultDeleteFeature {
+
+ /**
+ * @param fp
+ */
+ public DeleteLaneFeature(IFeatureProvider fp) {
+ super(fp);
+ }
+
+ @Override
+ public void delete(IDeleteContext context) {
+ ContainerShape laneContainerShape = (ContainerShape) context.getPictogramElement();
+ ContainerShape parentContainerShape = laneContainerShape.getContainer();
+ Lane lane = (Lane)getBusinessObjectForPictogramElement(laneContainerShape);
+ if (lane==null) {
+ // this can happen if the lane was already deleted by its parent Lane or Pool
+ return;
+ }
+ LaneSet laneSet = (LaneSet)lane.eContainer();
+
+ if (parentContainerShape != null) {
+ boolean before = false;
+ ContainerShape neighborContainerShape = getLaneAfter(laneContainerShape);
+ if (neighborContainerShape == null) {
+ neighborContainerShape = getLaneBefore(laneContainerShape);
+ if (neighborContainerShape == null) {
+ super.delete(context);
+ if (laneSet.getLanes().size()==0) {
+ EcoreUtil.delete(laneSet);
+ }
+ return;
+ } else {
+ before = true;
+ }
+ }
+ boolean isHorizontal = FeatureSupport.isHorizontal(laneContainerShape);
+ GraphicsAlgorithm ga = laneContainerShape.getGraphicsAlgorithm();
+ GraphicsAlgorithm neighborGA = neighborContainerShape.getGraphicsAlgorithm();
+ ResizeShapeContext newContext = new ResizeShapeContext(neighborContainerShape);
+ if (!before) {
+ Graphiti.getGaService().setLocation(neighborGA, ga.getX(), ga.getY());
+ }
+ newContext.setLocation(neighborGA.getX(), neighborGA.getY());
+ if (isHorizontal) {
+ newContext.setHeight(neighborGA.getHeight() + ga.getHeight());
+ newContext.setWidth(neighborGA.getWidth());
+ } else {
+ newContext.setHeight(neighborGA.getHeight());
+ newContext.setWidth(neighborGA.getWidth() + ga.getWidth());
+ }
+
+ IResizeShapeFeature resizeFeature = getFeatureProvider().getResizeShapeFeature(newContext);
+ if (resizeFeature.canResizeShape(newContext)) {
+ super.delete(context);
+ resizeFeature.resizeShape(newContext);
+ return;
+ }
+ }
+ super.delete(context);
+ }
+
+ private ContainerShape getLaneBefore(ContainerShape container) {
+ if (!BusinessObjectUtil.containsElementOfType(container, Lane.class)) {
+ return null;
+ }
+
+ ContainerShape parentContainerShape = container.getContainer();
+ if (parentContainerShape == null) {
+ return null;
+ }
+
+ GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
+ int x = ga.getX();
+ int y = ga.getY();
+ boolean isHorizontal = FeatureSupport.isHorizontal(container);
+
+ ContainerShape result = null;
+ for (PictogramElement picElem : BusinessObjectUtil.getChildElementsOfType(parentContainerShape, Lane.class)) {
+ if (picElem instanceof ContainerShape && !picElem.equals(container)) {
+ ContainerShape currentContainerShape = (ContainerShape) picElem;
+ GraphicsAlgorithm currentGA = currentContainerShape.getGraphicsAlgorithm();
+ if (isHorizontal) {
+ if (currentGA.getY() < y) {
+ if (result != null) {
+ GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
+ if (resultGA.getY() < currentGA.getY()) {
+ result = currentContainerShape;
+ }
+ } else {
+ result = currentContainerShape;
+ }
+ }
+ } else {
+ if (currentGA.getX() < x) {
+ if (result != null) {
+ GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
+ if (resultGA.getX() < currentGA.getX()) {
+ result = currentContainerShape;
+ }
+ } else {
+ result = currentContainerShape;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private ContainerShape getLaneAfter(ContainerShape container) {
+ if (!BusinessObjectUtil.containsElementOfType(container, Lane.class)) {
+ return null;
+ }
+
+ ContainerShape parentContainerShape = container.getContainer();
+ if (parentContainerShape == null) {
+ return null;
+ }
+
+ GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
+ int x = ga.getX();
+ int y = ga.getY();
+ boolean isHorizontal = FeatureSupport.isHorizontal(container);
+
+ ContainerShape result = null;
+ for (PictogramElement picElem : BusinessObjectUtil.getChildElementsOfType(parentContainerShape, Lane.class)) {
+ if (picElem instanceof ContainerShape && !picElem.equals(container)) {
+ ContainerShape currentContainerShape = (ContainerShape) picElem;
+ GraphicsAlgorithm currentGA = currentContainerShape.getGraphicsAlgorithm();
+ if (isHorizontal) {
+ if (currentGA.getY() > y) {
+ if (result != null) {
+ GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
+ if (resultGA.getY() > currentGA.getY()) {
+ result = currentContainerShape;
+ }
+ } else {
+ result = currentContainerShape;
+ }
+ }
+ } else {
+ if (currentGA.getX() > x) {
+ if (result != null) {
+ GraphicsAlgorithm resultGA = result.getGraphicsAlgorithm();
+ if (resultGA.getX() > currentGA.getX()) {
+ result = currentContainerShape;
+ }
+ } else {
+ result = currentContainerShape;
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/LaneFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/LaneFeatureContainer.java
index 3c7de113..f3f4bc18 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/LaneFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/LaneFeatureContainer.java
@@ -14,16 +14,14 @@ package org.eclipse.bpmn2.modeler.ui.features.lane;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
-import org.eclipse.bpmn2.modeler.core.features.lane.AddLaneFeature;
-import org.eclipse.bpmn2.modeler.core.features.lane.DirectEditLaneFeature;
-import org.eclipse.bpmn2.modeler.core.features.lane.LayoutLaneFeature;
-import org.eclipse.bpmn2.modeler.core.features.lane.MoveLaneFeature;
-import org.eclipse.bpmn2.modeler.core.features.lane.ResizeLaneFeature;
-import org.eclipse.bpmn2.modeler.core.features.lane.UpdateLaneFeature;
-import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.bpmn2.modeler.ui.features.activity.AppendActivityFeature;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.AddChoreographyMessageFeature;
-import org.eclipse.bpmn2.modeler.ui.features.participant.RotatePoolFeature;
+import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.LayoutContainerFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.UpdateContainerLabelFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.lane.AddLaneFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.lane.DirectEditLaneFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.lane.MoveLaneFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.lane.ResizeLaneFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.lane.UpdateLaneFeature;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
@@ -54,7 +52,10 @@ public class LaneFeatureContainer extends BaseElementFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
- return new UpdateLaneFeature(fp);
+ MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
+ multiUpdate.addFeature(new UpdateLaneFeature(fp));
+ multiUpdate.addFeature(new UpdateContainerLabelFeature(fp));
+ return multiUpdate;
}
@Override
@@ -64,7 +65,7 @@ public class LaneFeatureContainer extends BaseElementFeatureContainer {
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutLaneFeature(fp);
+ return new LayoutContainerFeature(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/Messages.java
index 88405eee..20a69359 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.lane;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/RotateLaneFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/RotateLaneFeature.java
index 3c280a50..3c280a50 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/RotateLaneFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/RotateLaneFeature.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties
new file mode 100644
index 00000000..4a08f886
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/lane/messages.properties
@@ -0,0 +1,15 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+CreateLaneFeature_Default_Name=Lane
+CreateLaneFeature_Description=Create Lane
+CreateLaneFeature_Name=Lane
+RotateLaneFeature_Description=Switch the orientation of this Lane between horizontal and vertical
+RotateLaneFeature_Name=Change Lane Orientation
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/CreateParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/CreateParticipantFeature.java
index bda9c5c9..125a8701 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/CreateParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/CreateParticipantFeature.java
@@ -13,22 +13,20 @@
package org.eclipse.bpmn2.modeler.ui.features.participant;
import org.eclipse.bpmn2.Bpmn2Package;
-import org.eclipse.bpmn2.Collaboration;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.modeler.core.features.AbstractBpmn2CreateFeature;
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.ImageProvider;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class CreateParticipantFeature extends AbstractBpmn2CreateFeature<Participant> {
public CreateParticipantFeature(IFeatureProvider fp) {
- super(fp, Messages.CreateParticipantFeature_Name, Messages.CreateParticipantFeature_Description);
+ super(fp);
}
@Override
@@ -40,17 +38,8 @@ public class CreateParticipantFeature extends AbstractBpmn2CreateFeature<Partici
public Object[] create(ICreateContext context) {
Participant participant = createBusinessObject(context);
participant.setName(Messages.CreateParticipantFeature_Default_Pool_Name + ModelUtil.getIDNumber(participant.getId()));
-
- Process process = Bpmn2ModelerFactory.create(participant.eResource(), Process.class);
- participant.setProcessRef(process);
-
- process.setName(participant.getName() + Messages.CreateParticipantFeature_Default_Process_Name);
- if (participant.eContainer() instanceof Collaboration) {
- process.setDefinitionalCollaborationRef((Collaboration)participant.eContainer());
- }
-
- addGraphicalRepresentation(context, participant);
- return new Object[] { participant };
+ PictogramElement pe = addGraphicalRepresentation(context, participant);
+ return new Object[] { participant, pe };
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/DeleteParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/DeleteParticipantFeature.java
index 88c6f737..45196eda 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/DeleteParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/DeleteParticipantFeature.java
@@ -12,58 +12,39 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.participant;
+import java.util.ArrayList;
import java.util.List;
-import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.Participant;
-import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.di.BPMNPlane;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
import org.eclipse.bpmn2.modeler.core.di.DIUtils;
-import org.eclipse.bpmn2.modeler.core.features.DefaultDeleteBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.editor.DesignEditor;
import org.eclipse.bpmn2.modeler.ui.features.AbstractDefaultDeleteFeature;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.dd.di.DiagramElement;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.graphiti.features.IDeleteFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IDeleteContext;
+import org.eclipse.graphiti.features.context.impl.DeleteContext;
+import org.eclipse.graphiti.mm.pictograms.Connection;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-public class DeleteParticipantFeature extends DefaultDeleteBPMNShapeFeature {
+public class DeleteParticipantFeature extends AbstractDefaultDeleteFeature {
public DeleteParticipantFeature(IFeatureProvider fp) {
super(fp);
}
@Override
- public void delete(IDeleteContext context) {
- // Delete the pool's process and the BPMNDiagram page (if any).
- PictogramElement pe = context.getPictogramElement();
- Object bo = getBusinessObjectForPictogramElement(pe);
- if (bo instanceof Participant) {
- bo = ((Participant)bo).getProcessRef();
- }
- if (bo instanceof FlowElementsContainer) {
- BPMNDiagram bpmnDiagram = DIUtils.findBPMNDiagram((BaseElement)bo);
- if (bpmnDiagram != null) {
- DIUtils.deleteDiagram(getDiagramBehavior(), bpmnDiagram);
- }
- EcoreUtil.delete((EObject) bo, true);
- }
-
- super.delete(context);
- }
-
- @Override
public boolean canDelete(IDeleteContext context) {
// Participant bands in a ChoreographyTask only be "deleted" (from the model)
// if there are no other references to the participant; but they can be "removed"
@@ -99,4 +80,40 @@ public class DeleteParticipantFeature extends DefaultDeleteBPMNShapeFeature {
return true;
}
+ @Override
+ public void delete(IDeleteContext context) {
+ // Delete the pool's process and the BPMNDiagram page (if any).
+ PictogramElement pe = context.getPictogramElement();
+ if (pe instanceof ContainerShape) {
+ ContainerShape poolShape = (ContainerShape) pe;
+ Object bo = getBusinessObjectForPictogramElement(pe);
+ if (bo instanceof Participant) {
+ Participant pool = (Participant) bo;
+ // also delete any contained Lanes and their children
+ List<PictogramElement> children = new ArrayList<PictogramElement>();
+ FeatureSupport.collectChildren(poolShape, children, true);
+ for (PictogramElement child : children) {
+ if (child instanceof Connection) {
+ // don't bother with Connections, these will
+ // be deleted by their source/target shapes
+ continue;
+ }
+ IDeleteContext dc = new DeleteContext(child);
+ IDeleteFeature df = getFeatureProvider().getDeleteFeature(dc);
+ if (df.canDelete(dc)) {
+ df.delete(dc);
+ }
+ }
+ bo = pool.getProcessRef();
+ if (bo instanceof FlowElementsContainer) {
+ BPMNDiagram bpmnDiagram = DIUtils.findBPMNDiagram((FlowElementsContainer)bo);
+ if (bpmnDiagram != null) {
+ DIUtils.deleteDiagram(getDiagramBehavior(), bpmnDiagram);
+ }
+ EcoreUtil.delete((FlowElementsContainer)bo, true);
+ }
+ }
+ }
+ super.delete(context);
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/Messages.java
index 7bec2da9..871dae9a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.features.participant;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/MoveParticipantFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/MoveParticipantFeature.java
index 12c9fc16..67c9d9b9 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/MoveParticipantFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/MoveParticipantFeature.java
@@ -16,15 +16,16 @@ import java.util.List;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.ParticipantBandKind;
-import org.eclipse.bpmn2.modeler.core.features.DefaultMoveBPMNShapeFeature;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.features.containers.MoveContainerFeature;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.core.utils.Tuple;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyUtil;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.IMoveShapeContext;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
-public class MoveParticipantFeature extends DefaultMoveBPMNShapeFeature {
+public class MoveParticipantFeature extends MoveContainerFeature {
public MoveParticipantFeature(IFeatureProvider fp) {
super(fp);
@@ -35,6 +36,8 @@ public class MoveParticipantFeature extends DefaultMoveBPMNShapeFeature {
// if (ChoreographyUtil.isChoreographyParticipantBand(context.getShape())) {
// return false;
// }
+ if (context.getSourceContainer() != context.getTargetContainer())
+ return false;
return super.canMoveShape(context);
}
@@ -46,8 +49,8 @@ public class MoveParticipantFeature extends DefaultMoveBPMNShapeFeature {
ContainerShape container = context.getTargetContainer();
ContainerShape shape = (ContainerShape)context.getShape();
// collect all participant bands into top, middle and bottom
- List<ContainerShape> bands = ChoreographyUtil.getParticipantBandContainerShapes(container);
- Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottom = ChoreographyUtil.getTopAndBottomBands(bands);
+ List<ContainerShape> bands = FeatureSupport.getParticipantBandContainerShapes(container);
+ Tuple<List<ContainerShape>, List<ContainerShape>> topAndBottom = FeatureSupport.getTopAndBottomBands(bands);
List<ContainerShape> top = topAndBottom.getFirst();
List<ContainerShape> bottom = topAndBottom.getSecond();
BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(shape, BPMNShape.class);
@@ -75,7 +78,7 @@ public class MoveParticipantFeature extends DefaultMoveBPMNShapeFeature {
bottom.add(0,shape);
}
- // reassign TOP/MIDDLE/BOTTOM bandKinds
+ // reassign ABOVE/MIDDLE/BELOW bandKinds
for (int i=0; i<bottom.size(); ++i) {
bpmnShape = BusinessObjectUtil.getFirstElementOfType(bottom.get(i), BPMNShape.class);
ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
@@ -113,8 +116,8 @@ public class MoveParticipantFeature extends DefaultMoveBPMNShapeFeature {
bpmnShape.setParticipantBandKind(bandKind);
}
- ChoreographyUtil.resizePartipantBandContainerShapes(width, height,
- top, bottom, getDiagram());
+ // adjust Participant Band size and location
+ ChoreographyUtil.updateParticipantBands(getFeatureProvider(), context.getPictogramElement());
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/ParticipantFeatureContainer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/ParticipantFeatureContainer.java
index c43c3a3a..e596353d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/ParticipantFeatureContainer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/ParticipantFeatureContainer.java
@@ -15,25 +15,23 @@ package org.eclipse.bpmn2.modeler.ui.features.participant;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.modeler.core.features.BaseElementFeatureContainer;
import org.eclipse.bpmn2.modeler.core.features.MultiUpdateFeature;
-import org.eclipse.bpmn2.modeler.core.features.participant.AddParticipantFeature;
-import org.eclipse.bpmn2.modeler.core.features.participant.DirectEditParticipantFeature;
-import org.eclipse.bpmn2.modeler.core.features.participant.LayoutParticipantFeature;
-import org.eclipse.bpmn2.modeler.core.features.participant.ResizeParticipantFeature;
-import org.eclipse.bpmn2.modeler.core.features.participant.UpdateParticipantFeature;
-import org.eclipse.bpmn2.modeler.core.features.participant.UpdateParticipantMultiplicityFeature;
-import org.eclipse.bpmn2.modeler.ui.features.activity.AppendActivityFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.LayoutContainerFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.UpdateContainerLabelFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.participant.AddParticipantFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.participant.DirectEditParticipantFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.participant.ResizeParticipantFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.participant.UpdateParticipantFeature;
+import org.eclipse.bpmn2.modeler.core.features.containers.participant.UpdateParticipantMultiplicityFeature;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.PullupFeature;
import org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.PushdownFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.AddChoreographyMessageFeature;
-import org.eclipse.bpmn2.modeler.ui.features.choreography.AddChoreographyParticipantFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.BlackboxFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.RemoveChoreographyMessageFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.RemoveChoreographyParticipantFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.ShowDiagramPageFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.UpdateChoreographyMessageLinkFeature;
import org.eclipse.bpmn2.modeler.ui.features.choreography.WhiteboxFeature;
-import org.eclipse.bpmn2.modeler.ui.features.event.AppendEventFeature;
-import org.eclipse.bpmn2.modeler.ui.features.gateway.AppendGatewayFeature;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.ICreateFeature;
import org.eclipse.graphiti.features.IDeleteFeature;
@@ -44,11 +42,37 @@ import org.eclipse.graphiti.features.IMoveShapeFeature;
import org.eclipse.graphiti.features.IRemoveFeature;
import org.eclipse.graphiti.features.IResizeShapeFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
+import org.eclipse.graphiti.features.context.IContext;
+import org.eclipse.graphiti.features.context.ILayoutContext;
+import org.eclipse.graphiti.features.context.IMoveContext;
+import org.eclipse.graphiti.features.context.IPictogramElementContext;
+import org.eclipse.graphiti.features.context.IResizeContext;
+import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.custom.ICustomFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
public class ParticipantFeatureContainer extends BaseElementFeatureContainer {
@Override
+ public Object getApplyObject(IContext context) {
+ if (
+ context instanceof IUpdateContext ||
+ context instanceof ILayoutContext ||
+ context instanceof IMoveContext ||
+ context instanceof IResizeContext
+ ) {
+ PictogramElement pe = ((IPictogramElementContext)context).getPictogramElement();
+ if (FeatureSupport.isLabelShape(pe))
+ pe = (PictogramElement) pe.eContainer();
+ if (FeatureSupport.isChoreographyParticipantBand(pe))
+ return null;
+ }
+ Object o = super.getApplyObject(context);
+
+ return o;
+ }
+
+ @Override
public boolean canApplyTo(Object o) {
return super.canApplyTo(o) && o instanceof Participant;
}
@@ -66,9 +90,10 @@ public class ParticipantFeatureContainer extends BaseElementFeatureContainer {
@Override
public IUpdateFeature getUpdateFeature(IFeatureProvider fp) {
MultiUpdateFeature multiUpdate = new MultiUpdateFeature(fp);
- multiUpdate.addUpdateFeature(new UpdateParticipantFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateParticipantMultiplicityFeature(fp));
- multiUpdate.addUpdateFeature(new UpdateChoreographyMessageLinkFeature(fp));
+ multiUpdate.addFeature(new UpdateParticipantFeature(fp));
+ multiUpdate.addFeature(new UpdateParticipantMultiplicityFeature(fp));
+// multiUpdate.addFeature(new UpdateChoreographyMessageLinkFeature(fp));
+ multiUpdate.addFeature(new UpdateContainerLabelFeature(fp));
return multiUpdate;
}
@@ -79,7 +104,7 @@ public class ParticipantFeatureContainer extends BaseElementFeatureContainer {
@Override
public ILayoutFeature getLayoutFeature(IFeatureProvider fp) {
- return new LayoutParticipantFeature(fp);
+ return new LayoutContainerFeature(fp);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/RotatePoolFeature.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/RotatePoolFeature.java
index 76eac269..76eac269 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/RotatePoolFeature.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/RotatePoolFeature.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties
new file mode 100644
index 00000000..eacdf346
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/features/participant/messages.properties
@@ -0,0 +1,16 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+CreateParticipantFeature_Default_Pool_Name=Pool
+CreateParticipantFeature_Default_Process_Name=\ Process
+CreateParticipantFeature_Description=Create Pool
+CreateParticipantFeature_Name=Pool
+RotatePoolFeature_Description=Switch the orientation of this Pool between horizontal and vertical
+RotatePoolFeature_Name=Change Pool Orientation
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties
index 1ff12b49..ba4af487 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/messages.properties
@@ -73,24 +73,28 @@ SchemaImportDialog_Select_Java_Message=Please select a Java Type
ModelTreeLabelProvider_s1_s2={0} \: {1}
-
CommonLabels_Data_Type=Data Type
-Bpmn2EditorAppearancePreferencePage_Colors_Group=Colors, Fonts and Line Styles
-Bpmn2EditorAppearancePreferencePage_GraphicalElements_Group=Graphical Elements
-Bpmn2EditorPreferencePage_Activities=Activities
+
+Bpmn2EditorPreferencePage_Colors_Group=Colors and Line Styles
+Bpmn2EditorPreferencePage_GraphicalElements_Group=Graphical Elements
+
+Bpmn2EditorPreferencePage_GridHeight=Grid Height
+Bpmn2EditorPreferencePage_GridWidth=Grid Width
+Bpmn2EditorPreferencePage_SnapToGrid=Snap to Grid
+
+Bpmn2EditorPreferencePage_DefaultHeight=Default Height
+Bpmn2EditorPreferencePage_DefaultWidth=Default Width
+Bpmn2EditorPreferencePage_UseDefaultSize=Use defaults instead of size defined in BPMN2 files
+
Bpmn2EditorPreferencePage_Change_Button=Change
-Bpmn2EditorPreferencePage_Connections=Connections
-Bpmn2EditorPreferencePage_Containers=Containers and Artifacts
-Bpmn2EditorPreferencePage_Data_Elements=Data Elements
-Bpmn2EditorPreferencePage_Events=Events
-Bpmn2EditorPreferencePage_Fill_Color_Label=&Fill Color:
+Bpmn2EditorPreferencePage_Fill_Color_Label=&Background Color:
Bpmn2EditorPreferencePage_Foreground_Color_Label=&Foreground Color:
-Bpmn2EditorPreferencePage_Gateways=Gateways
Bpmn2EditorPreferencePage_Label_Color_Label=&Label Color:
Bpmn2EditorPreferencePage_Label_Font_Label=Label &Font:
Bpmn2EditorPreferencePage_MultiSelected_Color_Label=&Multi-Selected Color:
Bpmn2EditorPreferencePage_Override_Size_Label=Override shape size with default values
Bpmn2EditorPreferencePage_Routing_Style_Label=Routing Style:
+Bpmn2EditorPreferencePage_Label_Location_Label=Location relative to Figure:
Bpmn2EditorPreferencePage_Selected_Color_Label=&Selected Color:
Bpmn2HomePreferencePage_Default_DI_Values_Title=Default values for BPMN Diagram Interchange (DI) optional attributes
Bpmn2PreferencePage_HomePage_Description=General settings for the BPMN2 Modeler
@@ -98,23 +102,23 @@ Bpmn2PropertyPage_HomePage_Description=Project specific settings for the BPMN2 M
#
# Long descriptions of BPMN2 elements
-UI_UnknownDiagram_long_description = The Diagram Type has not yet been defined.
-UI_Process_long_description = A Process Diagram describes a sequence or flow of Activities in an organization with the objective of carrying out work. \
+UI_UnknownDiagram_description = The Diagram Type has not yet been defined.
+UI_Process_description = A Process describes a sequence or flow of Activities in an organization with the objective of carrying out work. \
A Process is depicted as a graph of Flow Elements, which are a set of Activities, Events, Gateways, and \
Sequence Flows that define finite execution semantics. Processes can be defined at any level from \
enterprise-wide Processes to Processes performed by a single person. Low-level Processes can be grouped \
together to achieve a common business goal.
-UI_Choreography_long_description = A Choreography Diagram formalizes the way business \
+UI_Choreography_description = A Choreography formalizes the way business \
Participants coordinate their interactions. The focus is not on orchestrations of the work performed within these \
Participants, but rather on the exchange of information (Messages) between these Participants.
-UI_Collaboration_long_description = A Collaboration usually contains two or more Pools, representing the Participants in the Collaboration. \
+UI_Collaboration_description = A Collaboration usually contains two or more Pools, representing the Participants in the Collaboration. \
The Message exchange between the Participants is shown by a Message Flow that connects two Pools (or the objects \
within the Pools). The Messages associated with the Message Flows MAY also be shown. \
A Pool MAY be empty, a "black box", or MAY show a Process within ("white box"). Choreographies MAY be shown in \
between the Pools as they bisect the Message Flows between the Pools. All combinations of Pools, Processes, \
and a Choreography are allowed in a Collaboration.
-UI_SequenceFlow_long_description = A Sequence Flow is used to show the order that \
+UI_SequenceFlow_description = A Sequence Flow is used to show the order that \
Activities will be performed in a Process or a Choreography. \
A Sequence Flow can optionally define a condition Expression, indicating that control will be passed down the \
Sequence Flow only if the Expression evaluates to true. This Expression is typically used when the source of \
@@ -123,137 +127,183 @@ UI_SequenceFlow_long_description = A Sequence Flow is used to show the order tha
defined as "default". Such a Sequence Flow will have a marker to show that it is a default flow. The default \
Sequence Flow is taken only if all the other outgoing Sequence Flows from the Activity or \
Gateway are not valid (i.e., their condition Expressions are false).
-UI_MessageFlow_long_description = A Message Flow is used to show the flow of Messages between two Participants that are \
+UI_MessageFlow_description = A Message Flow is used to show the flow of Messages between two Participants that are \
prepared to send and receive them. In BPMN, two separate Pools in a Collaboration Diagram will represent the two \
Participants (e.g., PartnerEntities and/or PartnerRoles).
-UI_Association_long_description = An Association is used to link information and Artifacts with BPMN graphical elements. \
+UI_Association_description = An Association is used to link information and Artifacts with BPMN graphical elements. \
Text Annotations and other Artifacts can be Associated with the graphical elements. An arrowhead on the Association indicates \
a direction of flow (e.g., data), when appropriate.
-UI_Annotation_long_description = Text Annotations are a mechanism for providing additional information to the reader of a BPMN Diagram. \
+UI_Annotation_description = Text Annotations are a mechanism for providing additional information to the reader of a BPMN Diagram. \
The Text Annotation object can be connected to a specific object on the Diagram with an Association, but does not \
affect the flow of the Process.
-UI_Task_long_description = A Task is an atomic Activity that is included within a Process. \
+UI_Task_description = A Task is an atomic Activity that is included within a Process. \
A Task is used when the work in the Process is not broken down to a finer level of Process detail.
-UI_ManualTask_long_description = A Manual Task is a Task that is not managed by any business process engine. It can be considered as an unmanaged \
+UI_Task_tooltip = Simple Task
+UI_ManualTask_description = A Manual Task is a Task that is not managed by any business process engine. It can be considered as an unmanaged \
Task, unmanaged in the sense of that the business process engine does not track the start and completion of such a Task. \
An example of this could be a paper based instruction for a telephone technician to install a telephone at a customer location.
-UI_UserTask_long_description = A User Task is a typical workflow Task where a human performer performs the Task with the assistance of a \
+UI_ManualTask_tooltip = Manual Task
+UI_UserTask_description = A User Task is a typical workflow Task where a human performer performs the Task with the assistance of a \
software application. The lifecycle of the Task is managed by a software component (called task manager) and is \
typically executed in the context of a Process. \
The User Task can be implemented using different technologies, specified by the implementation attribute. Besides \
the Web service technology, any technology can be used. A User Task for instance can be implemented using WSHumanTask \
by setting the implementation attribute to http://docs.oasis-open.org/ns/bpel4people/ws-humantask/protocol/200803.
-UI_BusinessRuleTask_long_description = A Business Rule Task provides a mechanism for the Process to provide input to a Business Rules Engine and to get \
+UI_UserTask_tooltip = User Task
+UI_BusinessRuleTask_description = A Business Rule Task provides a mechanism for the Process to provide input to a Business Rules Engine and to get \
the output of calculations that the Business Rules Engine might provide.
-UI_ServiceTask_long_description = A Service Task is a Task that uses some sort of service, which could be a Web service or an automated application.
-UI_SendTask_long_description = A Send Task is a simple Task that is designed to send a Message to an external Participant (relative to the \
+UI_BusinessRuleTask_tooltip = Business Rule Task
+UI_ServiceTask_description = A Service Task is a Task that uses some sort of service, which could be a Web service or an automated application.
+UI_ServiceTask_tooltip = Service Task
+UI_SendTask_description = A Send Task is a simple Task that is designed to send a Message to an external Participant (relative to the \
Process). Once the Message has been sent, the Task is completed.
-UI_ReceiveTask_long_description = A Receive Task is a simple Task that is designed to wait for a Message to arrive from an external Participant \
+UI_SendTask_tooltip = Send Task
+UI_ReceiveTask_description = A Receive Task is a simple Task that is designed to wait for a Message to arrive from an external Participant \
(relative to the Process). Once the Message has been received, the Task is completed.
-UI_ChoreographyTask_long_description = A Choreography Task is an atomic Activity in a Choreography Process. It represents an Interaction, which is one \
+UI_ReceiveTask_tooltip = Receive Task
+UI_ChoreographyTask_description = A Choreography Task is an atomic Activity in a Choreography Process. It represents an Interaction, which is one \
or two Message exchanges between two Participants.
-UI_ScriptTask_long_description = A Script Task is executed by a business process engine.\
+UI_ScriptTask_description = A Script Task is executed by a business process engine.\
The modeler or implementer defines a script in a language that the engine can interpret.\
When the Task is ready to start, the engine will execute the script.\
When the script is completed, the Task will also be completed.
-UI_StartEvent_long_description = As the name implies, the Start Event indicates where a particular Process will start. In terms of Sequence Flows, the\
+UI_StartEvent_description = As the name implies, the Start Event indicates where a particular Process will start. In terms of Sequence Flows, the\
Start Event starts the flow of the Process, and thus, will not have any incoming Sequence Flows and no Sequence\
Flow can connect to a Start Event. \
A Start Event may have one or more event triggers (Event Definitions) which cause the Process to be initiated.
-UI_EndEvent_long_description = As the name implies, the End Event indicates where a Process will end. In terms of Sequence Flows, the End \
+UI_EndEvent_description = As the name implies, the End Event indicates where a Process will end. In terms of Sequence Flows, the End \
Event ends the flow of the Process, and thus, will not have any outgoing Sequence Flows and no Sequence Flow can \
connect from an End Event. \
An End Event may have one or more triggers (Event Definitions), which are passed back to an invoking or containing Process (if any).
-UI_IntermediateThrowEvent_long_description = The Intermediate Throw Event is used to report some kind of condition (Event Definition) to \
+UI_IntermediateThrowEvent_description = The Intermediate Throw Event is used to report some kind of condition (Event Definition) to \
an invoking or containing Process. The receiving Process should be designed so that it is prepared to handle the event with either a \
Start Event, Intermediate Catch Event or a Boundary Event.
-UI_IntermediateCatchEvent_long_description = The Intermediate Catch Event is used to handle some kind of condition (Event Definition) \
+UI_IntermediateCatchEvent_description = The Intermediate Catch Event is used to handle some kind of condition (Event Definition) \
that has occurred within the process or in an external process.
-UI_BoundaryEvent_long_description = Boundary Events are attached to the borders of an Activity and are used to handle conditions (Event Definitions) \
+UI_BoundaryEvent_description = Boundary Events are attached to the borders of an Activity and are used to handle conditions (Event Definitions) \
that may have resulted during execution of the Activity.
-UI_DataStore_long_description = A DataStore provides a mechanism for Activities to retrieve or update stored information that will persist beyond the scope of the Process. \
+UI_DataStore_description = A DataStore provides a mechanism for Activities to retrieve or update stored information that will persist beyond the scope of the Process. \
+ The same DataStore can be visualized, through a Data Store Reference, in one or more places in the Process.
+UI_DataStoreReference_description = A DataStore provides a mechanism for Activities to retrieve or update stored information that will persist beyond the scope of the Process. \
The same DataStore can be visualized, through a Data Store Reference, in one or more places in the Process.
-UI_DataInput_long_description = Activities and Processes often required data in order to execute. In addition they may produce data during or as a result of execution. \
+UI_DataInput_description = Activities and Processes often required data in order to execute. In addition they may produce data during or as a result of execution. \
Data requirements are captured as Data Inputs and Input Sets.
-UI_DataOutput_long_description = Activities and Processes often required data in order to execute. In addition they may produce data during or as a result of execution. \
+UI_DataOutput_description = Activities and Processes often required data in order to execute. In addition they may produce data during or as a result of execution. \
Data that is produced is captured using Data Outputs and Output Sets.
-UI_Message_long_description = A Message represents the content of a communication between two Participants.
+UI_ItemDefinition_description = Specifies the nature and structure of data objects that can be manipulated, transferred, transformed and stored in a Process. \
+ Data Objects can be either physical in nature, such as the mechanical part of a vehicle, or informational, such as a catalog of the mechanical parts of a vehicle. \
+ Informational items are typically represented as data structures, which are defined by the Type Language of the Process or in an Import file.
+UI_Message_description = A Message represents the content of a communication between two Participants.
+
+UI_Error_description = An Error represents the content of an Error Event or the Fault of a failed Operation. An ItemDefinition is \
+used to specify the structure of the Error. An Error is generated when there is a critical problem in the processing of \
+an Activity or when the execution of an Operation failed.
+UI_Signal_description = A Signal defines a more general, non-error condition for \
+ interrupting Activities such as the successful completion of another Activity. \
+ An ItemDefinition is used to specify the structure of the Signal.
+UI_Escalation_description = An Escalation identifies a business situation that a Process might need to react to. An ItemDefinition is used \
+to specify the structure of the Escalation.
+UI_EndPoint_description = The EndPoint is an extension element that may be used by a particular implementation to define Service types and addressing, etc.
+UI_Category_description = Categories, which have user-defined semantics, can be used for documentation or analysis purposes. \
+ For example, activities can be categorized as being customer oriented vs. support oriented.
+UI_Interface_description = An Interface defines a set of operations that are implemented by Services.
+UI_Operation_description = An Operation defines Messages that are consumed and, optionally, produced by an Interface when the Operation is called. \
+ It can also define zero or more errors that are returned when operation fails.
+UI_CancelEventDefinition_description = Cancel Events are only used in the context of modeling Transaction Sub-Processes. \
+ Cancel Events are sent when a Transaction is canceled.
+UI_CompensateEventDefinition_description = Compensation Events are used in the context of triggering or handling compensation of \
+ a failed Activity by undoing steps that were already successfully completed, because their results and \
+ possibly side effects are no longer desired and need to be reversed.
+UI_ConditionalEventDefinition_description =
+UI_ErrorEventDefinition_description =
+UI_EscalationEventDefinition_description =
+UI_LingEventDefinition_description =
+UI_MessageEventDefinition_description =
+UI_SignalEventDefinition_description =
+UI_TerminateEventDefinition_description =
+UI_TimerEventDefinition_description =
-UI_ExclusiveGateway_long_description = A diverging Exclusive Gateway (Decision) is used to create alternative paths within a Process flow. This is basically \
+UI_DataObject_description = Data Objects are the primary construct for modeling data within the Process flow.\
+ A Data Object has a well-defined lifecycle and structure. A Data Object can appear multiple times in a Process diagram,\
+ each of which references the same Data Object instance. These references are used to simplify diagram connections.
+UI_DataObjectReference_description = Data Objects are the primary construct for modeling data within the Process flow.\
+ A Data Object has a well-defined lifecycle and structure. A Data Object can appear multiple times in a Process diagram,\
+ each of which references the same Data Object instance. These references are used to simplify diagram connections.
+UI_ExclusiveGateway_description = A diverging Exclusive Gateway (Decision) is used to create alternative paths within a Process flow. This is basically \
the "diversion point in the road" for a Process. For a given instance of the Process, only one of the paths can be taken. \
A Decision can be thought of as a question that is asked at a particular point in the Process. The question has a defined \
set of alternative answers. Each answer is associated with a condition Expression that is associated with a Gateway's \
outgoing Sequence Flows.
-UI_InclusiveGateway_long_description = A diverging Inclusive Gateway (Inclusive Decision) can be used to create alternative but also parallel paths within a \
+UI_InclusiveGateway_description = A diverging Inclusive Gateway (Inclusive Decision) can be used to create alternative but also parallel paths within a \
Process flow. Unlike the Exclusive Gateway, all condition Expressions are evaluated. The true evaluation of one \
condition Expression does not exclude the evaluation of other condition Expressions. All Sequence Flows with \
a true evaluation will be traversed by a token. Since each path is considered to be independent, all combinations of the \
paths MAY be taken, from zero to all. However, it should be designed so that at least one path is taken.
-UI_ParallelGateway_long_description = A Parallel Gateway is used to synchronize (combine) parallel flows and to create parallel flows. \
+UI_ParallelGateway_description = A Parallel Gateway is used to synchronize (combine) parallel flows and to create parallel flows. \
A Parallel Gateway creates parallel paths without checking any conditions; each outgoing Sequence Flow is passed control upon execution of this Gateway. \
For incoming flows, the Parallel Gateway will wait for all incoming flows before triggering the flow through its outgoing Sequence Flows.
-UI_EventBasedGateway_long_description = The Event-Based Gateway represents a branching point in the Process where the alternative paths that follow the \
+UI_EventBasedGateway_description = The Event-Based Gateway represents a branching point in the Process where the alternative paths that follow the \
Gateway are based on Events that occur, rather than the evaluation of Expressions using Process data (as with an \
Exclusive or Inclusive Gateway). A specific Event, usually the receipt of a Message, determines the path that will \
be taken. Basically, the decision is made by another Participant, based on data that is not visible to Process, thus, \
requiring the use of the Event-Based Gateway.
-UI_ComplexGateway_long_description = The Complex Gateway can be used to model complex synchronization behavior. An Expression \
+UI_ComplexGateway_description = The Complex Gateway can be used to model complex synchronization behavior. An Expression \
is used to describe the precise behavior. For example, this Expression could specify that \
three out of five incoming Sequence Flows are needed to activate the Gateway. The outgoing paths that are taken \
by the Gateway is determined by conditions on the outgoing Sequence Flows as in the split behavior of the Inclusive Gateway.
-UI_CallActivity_long_description = A Call Activity identifies a point in the Process where a global Process or a Global Task is used.\
+UI_CallActivity_description = A Call Activity identifies a point in the Process where a global Process or a Global Task is used.\
The Call Activity acts as a "wrapper" for the invocation of a global Process or Global Task within the execution.\
The activation of a call Activity results in the transfer of control to the called global Process or Global Task.
-UI_Participant_long_description = A Pool is the graphical representation of a Participant in a Collaboration or Choreography and can be a \
+UI_Participant_description = A Pool is the graphical representation of a Participant in a Collaboration or Choreography and can be a \
specific PartnerEntity (e.g., a company) or can be a more general PartnerRole (e.g., a buyer, seller, or \
manufacturer). A Pool MAY or MAY NOT reference a Process. A Pool is NOT REQUIRED to contain a Process, \
i.e., it can be a black box.
-UI_ParticipantBand_long_description = A Participant Band in a Choreography Task represents one of the partners in a business transaction. \
+UI_ParticipantBand_description = A Participant Band in a Choreography Task represents one of the partners in a business transaction. \
Only one of the Participants may the initiator (the light colored band) of the business transaction. \
The non-initiating Participants are shown as dark colored bands.
-UI_Lane_long_description = A Lane is a sub-partition within a Process (often within a Pool) used to organize and categorize Activities within a Pool. \
+UI_Lane_description = A Lane is a sub-partition within a Process (often within a Pool) used to organize and categorize Activities within a Pool. \
Lanes are often used for such things as internal roles (e.g., Manager, \
Associate), systems (e.g., an enterprise application), an internal department (e.g., shipping, finance), etc. In addition, \
Lanes can be nested or defined in a matrix. For example, there could be an outer set of Lanes for \
company departments and then an inner set of Lanes for roles within each department.
-UI_SubProcess_long_description = A Sub-Process is an Activity whose internal details have been modeled using Activities, Gateways, Events, and \
+UI_SubProcess_description = A Sub-Process is an Activity whose internal details have been modeled using Activities, Gateways, Events, and \
Sequence Flows. Sub-Processes define a contextual scope that can be used for attribute visibility, transactional \
scope, for the handling of exceptions, of Events, or for compensation. A Sub-Process can be in a collapsed view that hides its details \
or in an expanded view that shows its details within the view of the Process in which it is contained.
-UI_Transaction_long_description = A Transaction is a specialized Sub-Process that is executed atomically, that is, all of its contained activities \
+UI_Transaction_description = A Transaction is a specialized Sub-Process that is executed atomically, that is, all of its contained activities \
either execute successfully to completion, or their combined effects (primarily on data) are rolled back.
-UI_SubChoreography_long_description = A Sub-Choreography is a compound Activity in that it has detail that is defined as a flow of other Activities, in this \
+UI_SubChoreography_description = A Sub-Choreography is a compound Activity in that it has detail that is defined as a flow of other Activities, in this \
case, a Choreography. Each Sub-Choreography involves two or more Participants. The name of the Sub-Choreography and each of the Participants are all displayed \
in the different bands that make up the graphical notation. There are two or more Participant Bands and one Sub-Process Name Band.
-UI_CallActivity_long_description = A Call Activity identifies a point in the Process where a global Process or a Global Task is used. The Call \
+UI_CallActivity_description = A Call Activity identifies a point in the Process where a global Process or a Global Task is used. The Call \
Activity acts as a wrapper for the invocation of a global Process or Global Task within the execution. The \
activation of a call Activity results in the transfer of control to the called global Process or Global Task.
-UI_Conversation_long_description = A Conversation is an atomic element for a Conversation (Collaboration) diagram. It represents a set of Message \
+UI_Conversation_description = A Conversation is an atomic element for a Conversation (Collaboration) diagram. It represents a set of Message \
Flows grouped together based on a concept and/or a CorrelationKey. A Conversation will involve two or more Participants.
-UI_ConversationLink_long_description = Conversation Links are used to connect Conversations to and from Participants (Pools.)
-UI_CallConversation_long_description = A Call Conversation identifies a place in the Conversation (Collaboration) where a global Conversation or a \
+UI_ConversationLink_description = Conversation Links are used to connect Conversations to and from Participants (Pools.)
+UI_CallConversation_description = A Call Conversation identifies a place in the Conversation (Collaboration) where a global Conversation or a \
GlobalConversation is used.
-UI_SubConversation_long_description = A Sub-Conversation is a ConversationNode that is a hierarchical division within the parent Collaboration. \
+UI_SubConversation_description = A Sub-Conversation is a ConversationNode that is a hierarchical division within the parent Collaboration. \
A Sub-Conversation is a graphical object within a Collaboration, but it also can be expanded to show the lower level \
details of the Conversation, which consist of Message Flows, Conversations, and/or other Sub-Conversations. \
The Sub-Conversation shares the Participants of its parent Conversation.
-UI_CallChoreography_long_description = A Call Choreography identifies a point in the Process where a global Choreography or a Global Choreography Task is used. \
+UI_CallChoreography_description = A Call Choreography identifies a point in the Process where a global Choreography or a Global Choreography Task is used. \
The Call Choreography acts as a place holder for the inclusion of the Choreography element it is calling.
-UI_AdHocSubProcess_long_description = An Ad-Hoc Sub-Process contains any number of embedded inner Activities \
+UI_AdHocSubProcess_description = An Ad-Hoc Sub-Process contains any number of embedded inner Activities \
and is intended to be executed with a more flexible ordering compared to the typical routing of Processes. \
The contained Activities are executed sequentially or in parallel, they can be executed multiple times in an \
order that is only constrained through the specified Sequence Flows, Gateways, and data connections.
-UI_Group_long_description = The Group object is an Artifact that provides a visual mechanism to group elements of a diagram informally. \
+UI_Group_description = The Group object is an Artifact that provides a visual mechanism to group elements of a diagram informally. \
A Group is not an Activity or any Flow Object, and, therefore, cannot connect to Sequence \
Flows or Message Flows. In addition, Groups are not constrained by restrictions of Pools and Lanes. This means \
that a Group can stretch across the boundaries of a Pool to surround Diagram elements, often to \
identify Activities that exist within a distributed business-to-business transaction. \
Groups are often used to highlight certain sections of a Diagram and do not affect the flow of the Process.
-UI_TextAnnotation_long_description = Text Annotations provide additional information to the reader about a BPMN diagram.
+UI_TextAnnotation_description = Text Annotations provide additional information to the reader about a BPMN diagram.
UI_Any_name_description = Descriptive name
UI_Documentation_text_description = Comments or other documentation about this activity.\n\
@@ -292,13 +342,18 @@ UI_Any_itemSubjectRef_description = \
defines the data structure, cardinality, data state and nature of the item.
UI_Any_itemKind_description = \
Defines the nature of the data item:\n\
- Physical = some kind of real object, such as an Invoice or and Order\n\
- Information = a data structure that explicitly defines the ordering\n\
- and data types of the individual elements, such as an XML Schema or a Java type.
+ Physical - some kind of real object, such as an Invoice or an Order, which\n\
+ MAY eventually be represented as a data structure in an executable Process.\n\
+ Physical items should only be used for documentation purposes, or as place\n\
+ holders for data structures to be defined later in the Process development.\n\
+ Information - a data structure that explicitly defines the ordering\n\
+ and data types of the individual elements, such as an XML Schema or a Java type.
UI_Any_isCollection_description = \
- If checked, data item is a collection of elements rather than a single instance.
+ If checked, the data item is a collection of elements rather than a single instance.
UI_Any_structureRef_description = \
- Defines the data structure of this item, for example an XML Schema or Java type.
+ If the Item Kind is \"Physical\" this is a free-form description of the physical item and can not be directly\n\
+ manipulated by an executable Process.\n\
+ If Item Kind is \"Information\" this defines the item's data structure, for example an XML Schema or Java type.
UI_Any_dataState_description = \
Defines the state of the data, for example an Order may be "Submitted", "Rejected", "Fulfilled" etc.
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultCombo.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultCombo.java
index b5b9a4cb..b5b9a4cb 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultCombo.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultCombo.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultComboFieldEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultComboFieldEditor.java
index b83d353a..b83d353a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultComboFieldEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/BPMNDIAttributeDefaultComboFieldEditor.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java
new file mode 100644
index 00000000..339c5afa
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorAppearancePreferencePage.java
@@ -0,0 +1,1204 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.preferences;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.bpmn2.modeler.core.Activator;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.LabelPosition;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.Category;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle.RoutingStyle;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.ui.Messages;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2FeatureMap;
+import org.eclipse.graphiti.mm.algorithms.styles.Font;
+import org.eclipse.graphiti.util.IColorConstant;
+import org.eclipse.jface.preference.ColorSelector;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FontDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.osgi.service.prefs.BackingStoreException;
+
+
+@SuppressWarnings({"nls", "rawtypes"})
+public class Bpmn2EditorAppearancePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ @SuppressWarnings("serial")
+ class ShapeStyleCategoryList extends LinkedHashMap<String, Object> {
+ public Category key;
+
+ public ShapeStyleCategoryList(Category key) {
+ this.key = key;
+ }
+ }
+ @SuppressWarnings("serial")
+ class ShapeStyleList extends LinkedHashMap<Class, ShapeStyle> {
+ public Category key;
+
+ public ShapeStyleList(Category key) {
+ this.key = key;
+ }
+ }
+
+ Bpmn2Preferences preferences;
+ TreeViewer elementsTreeViewer;
+ List<Class> allElements;
+ Group colorGroup;
+ Group labelGroup;
+ Composite colorEditors;
+ Composite container;
+ Hashtable<Object, ShapeStyle> allShapeStyles;
+ ShapeStyleCategoryList categories;
+ ShapeStyleCategoryList shapesList = new ShapeStyleCategoryList(Category.SHAPES);
+ ShapeStyleList connectionShapeStyles = new ShapeStyleList(Category.CONNECTIONS);
+ ShapeStyleList eventShapeStyles = new ShapeStyleList(Category.EVENTS);
+ ShapeStyleList gatewayShapeStyles = new ShapeStyleList(Category.GATEWAYS);
+ ShapeStyleList taskShapeStyles = new ShapeStyleList(Category.TASKS);
+ ShapeStyleList globalTaskShapeStyles = new ShapeStyleList(Category.GLOBAL_TASKS);
+ ShapeStyleList subProcessShapeStyles = new ShapeStyleList(Category.SUBPROCESS);
+ ShapeStyleList choreographyShapeStyles = new ShapeStyleList(Category.CHOREOGRAPHY);
+ ShapeStyleList conversationShapeStyles = new ShapeStyleList(Category.CONVERSATION);
+ ShapeStyleList swimLanesShapeStyles = new ShapeStyleList(Category.SWIMLANES);
+ ShapeStyleList dataShapeStyles = new ShapeStyleList(Category.DATA);
+ ShapeStyleList artifactShapeStyles = new ShapeStyleList(Category.ARTIFACTS);
+ Object currentSelection;
+ ColorShapeStyleEditor shapeBackground;
+ ColorShapeStyleEditor shapePrimarySelectedColor;
+ ColorShapeStyleEditor shapeSecondarySelectedColor;
+ ColorShapeStyleEditor shapeForeground;
+ CheckboxShapeStyleEditor useDefaultSize;
+ Button applyToAllChildren;
+ IntegerShapeStyleEditor defaultWidth;
+ IntegerShapeStyleEditor defaultHeight;
+ FontShapeStyleEditor labelFont;
+ ColorShapeStyleEditor labelForeground;
+ RoutingStyleShapeStyleEditor routingStyleViewer;
+ LabelLocationShapeStyleEditor labelLocationViewer;
+ BEListLabelProvider labelProvider;
+
+ public Bpmn2EditorAppearancePreferencePage() {
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ preferences = Bpmn2Preferences.getInstance();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ allElements = new ArrayList<Class>();
+ allElements.addAll(Bpmn2FeatureMap.CONNECTIONS);
+ allElements.addAll(Bpmn2FeatureMap.EVENTS);
+ allElements.addAll(Bpmn2FeatureMap.GATEWAYS);
+ allElements.addAll(Bpmn2FeatureMap.TASKS);
+ allElements.addAll(Bpmn2FeatureMap.GLOBAL_TASKS);
+ allElements.addAll(Bpmn2FeatureMap.SUBPROCESS);
+ allElements.addAll(Bpmn2FeatureMap.CHOREOGRAPHY);
+ allElements.addAll(Bpmn2FeatureMap.CONVERSATION);
+ allElements.addAll(Bpmn2FeatureMap.SWIMLANES);
+ allElements.addAll(Bpmn2FeatureMap.ALL_DATA);
+ allElements.addAll(Bpmn2FeatureMap.ARTIFACTS);
+ Collections.sort(allElements, new Comparator<Class>() {
+
+ @Override
+ public int compare(Class arg0, Class arg1) {
+ return arg0.getSimpleName().compareTo(arg1.getSimpleName());
+ }
+
+ });
+ }
+
+ @Override
+ protected Control createContents(Composite parent) {
+
+ GridLayout layout = (GridLayout)parent.getLayout();
+ GridData gd;
+
+ container = new Composite(parent, SWT.NONE);
+ container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ container.setLayout(new GridLayout(2, true));
+
+ final Group elementsGroup = new Group(container, SWT.NONE);
+ elementsGroup.setText(Messages.Bpmn2EditorPreferencePage_GraphicalElements_Group);
+ gd = new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
+ elementsGroup.setLayoutData(gd);
+ elementsGroup.setLayout(new GridLayout(1,false));
+
+ elementsTreeViewer = new TreeViewer(elementsGroup, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ final Tree elementsTree = elementsTreeViewer.getTree();
+ gd = new GridData(SWT.FILL,SWT.TOP,true,true,1,1);
+ elementsTree.setLayoutData(gd);
+
+ elementsTreeViewer.setContentProvider(new BEListContentProvider());
+ labelProvider = new BEListLabelProvider();
+ elementsTreeViewer.setLabelProvider(labelProvider);
+ parent.addControlListener(new ControlAdapter() {
+ @Override
+ public void controlResized(ControlEvent e) {
+ GridData gd = (GridData) elementsGroup.getLayoutData();
+ gd.heightHint = 500;
+ gd = (GridData) elementsTreeViewer.getTree().getLayoutData();
+ gd.heightHint = 500;
+ container.layout();
+ }
+ });
+
+ Composite colorAndLabelComposite = new Composite(container, SWT.NONE);
+ colorAndLabelComposite.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false,1,1));
+ colorAndLabelComposite.setLayout(new GridLayout(1,false));
+
+ colorGroup = new Group(colorAndLabelComposite, SWT.NONE);
+ colorGroup.setText(Messages.Bpmn2EditorPreferencePage_Colors_Group);
+ colorGroup.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false,1,1));
+ colorGroup.setLayout(new GridLayout(1,false));
+
+ colorEditors = new Composite(colorGroup, SWT.NONE);
+ colorEditors.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false,1,1));
+ layout = new GridLayout(1,false);
+ layout.verticalSpacing = 0;
+ colorEditors.setLayout(layout);
+ colorEditors.setFont(parent.getFont());
+// colorEditors.setVisible(false);
+
+ shapeBackground = new ColorShapeStyleEditor(colorEditors, ShapeStyle.SS_SHAPE_BACKGROUND,
+ Messages.Bpmn2EditorPreferencePage_Fill_Color_Label);
+ shapeBackground.addSelectionListener( new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IColorConstant c = shapeBackground.getValue();
+ ShapeStyle ss = allShapeStyles.get(currentSelection);
+ if (currentSelection instanceof Class) {
+ // update secondary colors
+ ss.setDefaultColors(c);
+ shapePrimarySelectedColor.setValue(ss.getShapePrimarySelectedColor());
+ shapeSecondarySelectedColor.setValue(ss.getShapeSecondarySelectedColor());
+ shapeForeground.setValue(ss.getShapeForeground());
+ labelForeground.setValue(ss.getLabelForeground());
+ }
+ }
+ });
+
+ shapeForeground = new ColorShapeStyleEditor(colorEditors, ShapeStyle.SS_SHAPE_FOREGROUND,
+ Messages.Bpmn2EditorPreferencePage_Foreground_Color_Label);
+
+ shapePrimarySelectedColor = new ColorShapeStyleEditor(colorEditors, ShapeStyle.SS_SHAPE_PRIMARY_SELECTION,
+ Messages.Bpmn2EditorPreferencePage_Selected_Color_Label);
+
+ shapeSecondarySelectedColor = new ColorShapeStyleEditor(colorEditors, ShapeStyle.SS_SHAPE_SECONDARY_SELECTION,
+ Messages.Bpmn2EditorPreferencePage_MultiSelected_Color_Label);
+
+
+ defaultWidth = new IntegerShapeStyleEditor(colorEditors, ShapeStyle.SS_DEFAULT_WIDTH,"");
+ gd = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
+ gd.horizontalIndent = 5;
+ gd.verticalIndent = 10;
+ defaultWidth.setLayoutData(gd);
+
+ defaultHeight = new IntegerShapeStyleEditor(colorEditors, ShapeStyle.SS_DEFAULT_HEIGHT,"");
+ gd = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
+ gd.horizontalIndent = 5;
+ gd.verticalIndent = 10;
+ defaultHeight.setLayoutData(gd);
+
+ useDefaultSize = new CheckboxShapeStyleEditor(colorEditors, ShapeStyle.SS_USE_DEFAULT_SIZE, "");
+ gd = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
+ gd.horizontalIndent = 5;
+ gd.verticalIndent = 10;
+ useDefaultSize.setLayoutData(gd);
+
+ Composite routingStyleComposite = new Composite(colorEditors, SWT.NONE);
+ routingStyleComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,1,1));
+ layout = new GridLayout(2,false);
+ routingStyleComposite.setLayout(layout);
+
+ routingStyleViewer = new RoutingStyleShapeStyleEditor(colorEditors,
+ Messages.Bpmn2EditorPreferencePage_Routing_Style_Label);
+ routingStyleViewer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
+
+ labelGroup = new Group(colorAndLabelComposite, SWT.NONE);
+ labelGroup.setText("Labels");
+ labelGroup.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false,1,1));
+ labelGroup.setLayout(new GridLayout(1,false));
+ labelForeground = new ColorShapeStyleEditor(labelGroup, ShapeStyle.SS_LABEL_FOREGROUND,
+ Messages.Bpmn2EditorPreferencePage_Label_Color_Label);
+ showControl(labelForeground, false);
+ labelFont = new FontShapeStyleEditor(labelGroup, ShapeStyle.SS_LABEL_FONT,
+ Messages.Bpmn2EditorPreferencePage_Label_Font_Label);
+ showControl(labelFont, false);
+
+ labelLocationViewer = new LabelLocationShapeStyleEditor(labelGroup,
+ Messages.Bpmn2EditorPreferencePage_Label_Location_Label);
+ labelLocationViewer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
+
+ applyToAllChildren = new Button(colorAndLabelComposite, SWT.CHECK);
+ applyToAllChildren.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false,1,1));
+ applyToAllChildren.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ configureAll();
+ }
+ });
+ showControl(applyToAllChildren, false);
+
+ loadStyleEditors();
+
+ configureForShapes(null);
+ configureAll();
+
+ elementsTreeViewer.addSelectionChangedListener(new BEListSelectionChangedListener());
+
+ return container;
+ }
+
+ private void applyToAll(ShapeStyle theShapeStyle) {
+ if (applyToAllChildren!=null && applyToAllChildren.getSelection()
+ && currentSelection instanceof Category) {
+ List<ShapeStyle> ssl = new ArrayList<ShapeStyle>();
+ switch ((Category)currentSelection) {
+ case CONNECTIONS:
+ ssl.addAll(connectionShapeStyles.values());
+ break;
+ case SHAPES:
+ ssl.addAll(eventShapeStyles.values());
+ ssl.addAll(gatewayShapeStyles.values());
+ ssl.addAll(taskShapeStyles.values());
+ ssl.addAll(globalTaskShapeStyles.values());
+ ssl.addAll(subProcessShapeStyles.values());
+ ssl.addAll(choreographyShapeStyles.values());
+ ssl.addAll(conversationShapeStyles.values());
+ ssl.addAll(swimLanesShapeStyles.values());
+ ssl.addAll(dataShapeStyles.values());
+ ssl.addAll(artifactShapeStyles.values());
+
+ ssl.add(allShapeStyles.get(Category.EVENTS));
+ ssl.add(allShapeStyles.get(Category.GATEWAYS));
+ ssl.add(allShapeStyles.get(Category.TASKS));
+ ssl.add(allShapeStyles.get(Category.GLOBAL_TASKS));
+ ssl.add(allShapeStyles.get(Category.SUBPROCESS));
+ ssl.add(allShapeStyles.get(Category.CHOREOGRAPHY));
+ ssl.add(allShapeStyles.get(Category.CONVERSATION));
+ ssl.add(allShapeStyles.get(Category.SWIMLANES));
+ ssl.add(allShapeStyles.get(Category.DATA));
+ ssl.add(allShapeStyles.get(Category.ARTIFACTS));
+ break;
+ case CANVAS:
+ break;
+ case DATA:
+ ssl.addAll(dataShapeStyles.values());
+ break;
+ case EVENTS:
+ ssl.addAll(eventShapeStyles.values());
+ break;
+ case GATEWAYS:
+ ssl.addAll(gatewayShapeStyles.values());
+ break;
+ case GRID:
+ break;
+ case ARTIFACTS:
+ ssl.addAll(artifactShapeStyles.values());
+ break;
+ case TASKS:
+ ssl.addAll(taskShapeStyles.values());
+ break;
+ case GLOBAL_TASKS:
+ ssl.addAll(globalTaskShapeStyles.values());
+ break;
+ case SUBPROCESS:
+ ssl.addAll(subProcessShapeStyles.values());
+ break;
+ case CHOREOGRAPHY:
+ ssl.addAll(choreographyShapeStyles.values());
+ break;
+ case CONVERSATION:
+ ssl.addAll(conversationShapeStyles.values());
+ break;
+ case SWIMLANES:
+ ssl.addAll(swimLanesShapeStyles.values());
+ break;
+ case NONE:
+ break;
+ }
+
+ for (ShapeStyle ss : ssl) {
+ ss.applyChanges(theShapeStyle);
+ }
+ }
+ }
+
+ private void loadStyleEditors() {
+ if (allShapeStyles == null) {
+ allShapeStyles = new Hashtable<Object, ShapeStyle>();
+
+ shapesList.put(Category.EVENTS.toString(), eventShapeStyles);
+ shapesList.put(Category.GATEWAYS.toString(), gatewayShapeStyles);
+ shapesList.put(Category.TASKS.toString(), taskShapeStyles);
+ shapesList.put(Category.GLOBAL_TASKS.toString(), globalTaskShapeStyles);
+ shapesList.put(Category.SUBPROCESS.toString(), subProcessShapeStyles);
+ shapesList.put(Category.CHOREOGRAPHY.toString(), choreographyShapeStyles);
+ shapesList.put(Category.CONVERSATION.toString(), conversationShapeStyles);
+ shapesList.put(Category.SWIMLANES.toString(), swimLanesShapeStyles);
+ shapesList.put(Category.DATA.toString(), dataShapeStyles);
+ shapesList.put(Category.ARTIFACTS.toString(), artifactShapeStyles);
+
+ categories = new ShapeStyleCategoryList(Category.NONE);
+ categories.put(Category.CONNECTIONS.toString(), connectionShapeStyles);
+ categories.put(Category.SHAPES.toString(), shapesList);
+
+ ShapeStyle ss;
+ for (Class c : allElements) {
+ ss = new ShapeStyle( preferences.getShapeStyle(c) );
+ allShapeStyles.put(c, ss);
+
+ if (Bpmn2FeatureMap.CONNECTIONS.contains(c))
+ connectionShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.EVENTS.contains(c))
+ eventShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.GATEWAYS.contains(c))
+ gatewayShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.TASKS.contains(c))
+ taskShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.GLOBAL_TASKS.contains(c))
+ globalTaskShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.SUBPROCESS.contains(c))
+ subProcessShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.CHOREOGRAPHY.contains(c))
+ choreographyShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.CONVERSATION.contains(c))
+ conversationShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.SWIMLANES.contains(c))
+ swimLanesShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.ALL_DATA.contains(c))
+ dataShapeStyles.put(c, ss);
+ if (Bpmn2FeatureMap.ARTIFACTS.contains(c))
+ artifactShapeStyles.put(c, ss);
+
+ if (Activator.getDefault().isDebugging()) {
+ System.out.println("\t\t<"+ShapeStyle.STYLE_OBJECT + " object=\"" + c.getSimpleName() + "\" "
+ + ShapeStyle.STYLE_SHAPE_FOREGROUND+"=\"" + ShapeStyle.colorToString(ss.getShapeForeground()) + "\" "
+ + ShapeStyle.STYLE_SHAPE_BACKGROUND+"=\"" + ShapeStyle.colorToString(ss.getShapeBackground()) + "\" "
+ + ShapeStyle.STYLE_LABEL_FONT+"=\"" + ShapeStyle.fontToString(ss.getLabelFont()) + "\" "
+ + ShapeStyle.STYLE_LABEL_FOREGROUND+"=\"" + ShapeStyle.colorToString(ss.getLabelForeground()) + "\" "
+ + ShapeStyle.STYLE_LABEL_BACKGROUND+"=\"" + ShapeStyle.colorToString(ss.getLabelBackground()) + "\" "
+ + ShapeStyle.STYLE_LABEL_POSITION+"=\"" + ss.getLabelPosition().name() + "\" "
+ + ShapeStyle.STYLE_ROUTING_STYLE+"=\"" + ss.getRoutingStyle().name() + "\" "
+ + ShapeStyle.STYLE_USE_DEFAULT_SIZE+"=\"" + ss.getUseDefaultSize() + "\" "
+ + ShapeStyle.STYLE_DEFAULT_HEIGHT+"=\"" + ss.getDefaultHeight() + "\" "
+ + ShapeStyle.STYLE_DEFAULT_WIDTH+"=\"" + ss.getDefaultWidth() + "\" "
+ + "/>"); //$NON-NLS-1$
+ }
+ }
+ for (Category key : Category.values()) {
+ ss = new ShapeStyle( preferences.getShapeStyle(key) );
+ allShapeStyles.put(key, ss);
+ }
+
+ ss = new ShapeStyle( preferences.getShapeStyle(Category.CANVAS) );
+ categories.put(Category.CANVAS.toString(), Category.CANVAS);
+
+ ss = new ShapeStyle( preferences.getShapeStyle(Category.GRID) );
+ categories.put(Category.GRID.toString(), Category.GRID);
+
+ currentSelection = null;
+ elementsTreeViewer.setInput(categories);
+ elementsTreeViewer.setSelection(null);
+ }
+
+ Object key = null;
+ ShapeStyle ss = null;
+ if (currentSelection instanceof Class) {
+ key = currentSelection;
+ ss = allShapeStyles.get((Class)key);
+ }
+ else if (currentSelection instanceof Category) {
+ key = currentSelection;
+ ss = allShapeStyles.get((Category)key);
+ }
+
+ if (ss!=null) {
+ shapeForeground.setValue(ss.getShapeForeground());
+ shapeBackground.setValue(ss.getShapeBackground());
+ shapePrimarySelectedColor.setValue(ss.getShapePrimarySelectedColor());
+ shapeSecondarySelectedColor.setValue(ss.getShapeSecondarySelectedColor());
+ useDefaultSize.setValue(ss.getUseDefaultSize());
+ defaultWidth.setValue(ss.getDefaultWidth());
+ defaultHeight.setValue(ss.getDefaultHeight());
+ labelFont.setValue(ss.getLabelFont());
+ labelForeground.setValue(ss.getLabelForeground());
+ labelLocationViewer.setValue(ss.getLabelPosition());
+
+ if (Bpmn2FeatureMap.CONNECTIONS.contains(key) || key == Category.CONNECTIONS) {
+ configureForConnections(ss);
+ }
+ else if (key == Category.CANVAS) {
+ configureForCanvas(ss);
+ }
+ else if (key == Category.GRID) {
+ configureForGrid(ss);
+ }
+ else {
+ configureForShapes(ss);
+ }
+ container.layout();
+ }
+ else {
+ showControl(labelFont,false);
+ showControl(labelForeground,false);
+ }
+ }
+
+ private void configureAll() {
+ boolean enabled = (currentSelection != null);
+ if ( currentSelection instanceof Category &&
+ currentSelection!=Category.CANVAS &&
+ currentSelection!=Category.GRID) {
+ showControl(applyToAllChildren, true);
+ applyToAllChildren.setText("Apply changes to all "+((Category)currentSelection).toString());
+ enabled = applyToAllChildren.getSelection();
+ }
+ else
+ showControl(applyToAllChildren, false);
+
+ enableComposite(colorGroup, enabled);
+ enableComposite(labelGroup, enabled);
+ showControl(labelLocationViewer, hasLabel());
+ }
+
+ private boolean hasLabel() {
+ if (currentSelection instanceof Class) {
+ Class c = (Class) currentSelection;
+ if (
+ Bpmn2FeatureMap.TASKS.contains(c) ||
+ Bpmn2FeatureMap.GLOBAL_TASKS.contains(c) ||
+ Bpmn2FeatureMap.SUBPROCESS.contains(c) ||
+ Bpmn2FeatureMap.CHOREOGRAPHY.contains(c) ||
+ Bpmn2FeatureMap.SWIMLANES.contains(c) ||
+ Bpmn2FeatureMap.ARTIFACTS.contains(c))
+ return false;
+ }
+ else if (currentSelection instanceof Category) {
+ Category k = (Category) currentSelection;
+ if ( k==Category.TASKS ||
+ k==Category.GLOBAL_TASKS ||
+ k==Category.SUBPROCESS ||
+ k==Category.CHOREOGRAPHY ||
+ k==Category.SWIMLANES ||
+ k==Category.CANVAS ||
+ k==Category.GRID)
+ return false;
+ }
+
+ return true;
+ }
+
+ private void configureForConnections(ShapeStyle ss) {
+ showControl(shapeForeground,true);
+ showControl(shapeBackground,false);
+ showControl(shapePrimarySelectedColor,false);
+ showControl(shapeSecondarySelectedColor,false);
+ showControl(routingStyleViewer,true);
+ routingStyleViewer.setValue(ss.getRoutingStyle());
+ showControl(labelGroup,true);
+ showControl(labelFont,true);
+ showControl(labelForeground,true);
+
+ // NOTE: BPMN2 does not define a width for connections
+ showControl(useDefaultSize,false);
+ showControl(defaultWidth,true);
+ showControl(defaultHeight,false);
+
+ configureAll();
+ }
+
+ private void configureForShapes(ShapeStyle ss) {
+ showControl(shapeForeground,true);
+ showControl(shapeBackground,true);
+ showControl(shapePrimarySelectedColor,true);
+ showControl(shapeSecondarySelectedColor,true);
+ showControl(routingStyleViewer,false);
+ showControl(labelGroup,true);
+ showControl(labelFont,true);
+ showControl(labelForeground,true);
+
+ useDefaultSize.setText(Messages.Bpmn2EditorPreferencePage_UseDefaultSize);
+ showControl(useDefaultSize,true);
+ defaultWidth.setText(Messages.Bpmn2EditorPreferencePage_DefaultWidth);
+ showControl(defaultWidth,true);
+ defaultHeight.setText(Messages.Bpmn2EditorPreferencePage_DefaultHeight);
+ showControl(defaultHeight,true);
+
+ configureAll();
+ }
+
+ private void configureForCanvas(ShapeStyle ss) {
+ showControl(shapeForeground,false);
+ showControl(shapeBackground,true);
+ showControl(shapePrimarySelectedColor,false);
+ showControl(shapeSecondarySelectedColor,false);
+ showControl(routingStyleViewer,false);
+ showControl(labelGroup,false);
+ showControl(labelFont,false);
+ showControl(labelForeground,false);
+
+ showControl(useDefaultSize,false);
+ showControl(defaultWidth,false);
+ showControl(defaultHeight,false);
+
+ configureAll();
+ }
+
+ private void configureForGrid(ShapeStyle ss) {
+ showControl(shapeForeground,true);
+ showControl(shapeBackground,false);
+ showControl(shapePrimarySelectedColor,false);
+ showControl(shapeSecondarySelectedColor,false);
+ showControl(routingStyleViewer,false);
+ showControl(labelGroup,false);
+ showControl(labelFont,false);
+ showControl(labelForeground,false);
+
+ useDefaultSize.setText(Messages.Bpmn2EditorPreferencePage_SnapToGrid);
+ showControl(useDefaultSize,true);
+ defaultWidth.setText(Messages.Bpmn2EditorPreferencePage_GridWidth);
+ showControl(defaultWidth,true);
+ defaultHeight.setText(Messages.Bpmn2EditorPreferencePage_GridHeight);
+ showControl(defaultHeight,true);
+
+ configureAll();
+ }
+
+ private void showControl(Control control, boolean visible) {
+ if (control!=null && !control.isDisposed()) {
+ control.setVisible(visible);
+ ((GridData)control.getLayoutData()).exclude = !visible;
+ }
+ }
+
+ private void enableComposite(Composite composite, boolean enabled) {
+ if (composite!=null && !composite.isDisposed()) {
+ for (Control c : composite.getChildren()) {
+ c.setEnabled(enabled);
+ if (c instanceof Composite) {
+ enableComposite((Composite)c, enabled);
+ }
+ }
+ }
+ }
+
+ @Override
+ protected void performDefaults() {
+ try {
+ preferences.setToDefault(Bpmn2Preferences.PREF_SHAPE_STYLE);
+ allShapeStyles = null;
+ loadStyleEditors();
+ preferences.flush();
+ }
+ catch(Exception e) {
+ }
+ super.performDefaults();
+ }
+
+ @Override
+ public boolean performOk() {
+ for (Entry<Object, ShapeStyle> entry : allShapeStyles.entrySet()) {
+ Object key = entry.getKey();
+ if (key instanceof Class)
+ key = ((Class)key).getSimpleName();
+ preferences.setShapeStyle(key.toString(), entry.getValue());
+ }
+ try {
+ preferences.flush();
+ } catch (BackingStoreException e) {
+ e.printStackTrace();
+ }
+ return super.performOk();
+ }
+
+ private class BEListContentProvider implements ITreeContentProvider {
+
+ ShapeStyleCategoryList categories;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (newInput instanceof ShapeStyleCategoryList) {
+ categories = (ShapeStyleCategoryList) newInput;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof Entry) {
+ Entry entry = (Entry)inputElement;
+ if (entry.getKey() instanceof Category) {
+
+ }
+ }
+ if (inputElement instanceof ShapeStyleCategoryList) {
+ ShapeStyleCategoryList categories = (ShapeStyleCategoryList)inputElement;
+ return categories.entrySet().toArray();
+ }
+ if (inputElement instanceof ShapeStyleList) {
+ ShapeStyleList shapeStyles = (ShapeStyleList)inputElement;
+ return shapeStyles.keySet().toArray();
+ }
+ return null;
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof Entry) {
+ Entry entry = (Entry) parentElement;
+ Object value = entry.getValue();
+ if (value instanceof ShapeStyleCategoryList) {
+ return ((ShapeStyleCategoryList)value).entrySet().toArray();
+ }
+ else if (value instanceof ShapeStyleList) {
+ return ((ShapeStyleList)value).entrySet().toArray();
+ }
+ }
+ else if (parentElement instanceof ShapeStyleCategoryList) {
+ return ((ShapeStyleCategoryList)parentElement).entrySet().toArray();
+ }
+ return null;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element) != null;
+ }
+
+ }
+
+ private class BEListLabelProvider extends LabelProvider {
+
+ private Hashtable<Object,String> classNameMap = new Hashtable<Object,String>();
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof Entry) {
+ Entry entry = (Entry)element;
+ if (entry.getKey() instanceof String)
+ return (String) entry.getKey();
+ if (entry.getKey() instanceof Class) {
+ String text = classNameMap.get((Class)entry.getKey());
+ if (text!=null)
+ return text;
+ return ModelUtil.toCanonicalString( ((Class)entry.getKey()).getSimpleName() );
+ }
+ }
+ return element.toString();
+ }
+
+ public void setText(Object c, String t) {
+ classNameMap.put(c, t);
+ }
+ }
+
+ private class BEListSelectionChangedListener implements ISelectionChangedListener {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection sel = (IStructuredSelection) elementsTreeViewer.getSelection();
+ if (sel != null) {
+ Object element = sel.getFirstElement();
+ if (element != null) {
+ if (element instanceof Entry) {
+ Entry entry = (Entry) element;
+ Object key = entry.getKey();
+ Object value = entry.getValue();
+ if (value instanceof ShapeStyleCategoryList) {
+ colorEditors.setVisible(true);
+ currentSelection = ((ShapeStyleCategoryList)value).key;
+ }
+ else if (value instanceof ShapeStyleList) {
+ colorEditors.setVisible(true);
+ currentSelection = ((ShapeStyleList)value).key;
+ }
+ else if (value instanceof Category) {
+ colorEditors.setVisible(true);
+ currentSelection = (Category)value;
+ }
+ else if (key instanceof Class) {
+ colorEditors.setVisible(true);
+ currentSelection = key;
+ }
+ else {
+ colorEditors.setVisible(false);
+ currentSelection = null;
+ }
+ }
+ }
+ else {
+// colorEditors.setVisible(true);
+ configureAll();
+ }
+
+ loadStyleEditors();
+ }
+ }
+
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // ShapeStyle Editors
+ ////////////////////////////////////////////////////////////////////////////////
+
+ private abstract class ShapeStyleEditor extends Composite {
+
+ public ShapeStyleEditor(Composite parent, int style, final int ssMask) {
+ super(parent, style);
+
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ addSelectionListener( new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ if (currentSelection!=null) {
+ Object value = getValue();
+ ShapeStyle ss = allShapeStyles.get(currentSelection);
+ ss.setValue(ssMask, value);
+ if (currentSelection instanceof Category) {
+ applyToAll(ss);
+ }
+ }
+ }
+ });
+ }
+ });
+ }
+
+ public abstract void addSelectionListener (SelectionListener listener);
+ public abstract Object getValue();
+ }
+
+ private class ColorShapeStyleEditor extends ShapeStyleEditor {
+ private ColorSelector colorSelector;
+ private Label selectorLabel;
+ private List<SelectionListener> listeners;
+
+ public ColorShapeStyleEditor(Composite parent, int ssMask, String labelText) {
+ super(parent, SWT.NONE, ssMask);
+ this.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
+ this.setLayout(new GridLayout(2, false));
+
+ selectorLabel = new Label(this, SWT.LEFT);
+ selectorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
+ selectorLabel.setFont(parent.getFont());
+ selectorLabel.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ selectorLabel = null;
+ }
+ });
+ selectorLabel.setText(labelText);
+
+ colorSelector = new ColorSelector(this);
+ colorSelector.getButton().setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
+ }
+
+ @Override
+ public void addSelectionListener(final SelectionListener listener) {
+ colorSelector.addListener(new IPropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent e) {
+ Event event = new Event();
+ event.widget = colorSelector.getButton();
+ SelectionEvent se = new SelectionEvent(event);
+ se.data = getValue();
+ listener.widgetSelected(se);
+ }
+ });
+// colorSelector.getButton().addSelectionListener(listener);
+ }
+
+ @Override
+ public IColorConstant getValue() {
+ return ShapeStyle.RGBToColor(colorSelector.getColorValue());
+ }
+
+ public void setValue(IColorConstant c) {
+ RGB rgb = ShapeStyle.colorToRGB(c);
+ colorSelector.setColorValue(rgb);
+ }
+ }
+
+ private class FontShapeStyleEditor extends ShapeStyleEditor {
+
+ /**
+ * The change font button, or <code>null</code> if none
+ * (before creation and after disposal).
+ */
+ private Button changeFontButton = null;
+
+ /**
+ * Font data for the chosen font button, or <code>null</code> if none.
+ */
+ private FontData[] selectedFont;
+
+ /**
+ * The label that displays the selected font, or <code>null</code> if none.
+ */
+ private Label previewLabel;
+ private Label selectorLabel;
+
+ public FontShapeStyleEditor(Composite parent, int ssMask, String labelText) {
+ super(parent, SWT.NONE, ssMask);
+ this.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
+ this.setLayout(new GridLayout(3, false));
+
+ selectorLabel = new Label(this, SWT.LEFT);
+ selectorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
+ selectorLabel.setFont(parent.getFont());
+ selectorLabel.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ selectorLabel = null;
+ }
+ });
+ selectorLabel.setText(labelText);
+
+ previewLabel = new Label(this, SWT.LEFT);
+ previewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ previewLabel.setFont(parent.getFont());
+ previewLabel.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ previewLabel = null;
+ }
+ });
+
+ changeFontButton = new Button(this, SWT.PUSH);
+ changeFontButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
+ changeFontButton.setText(Messages.Bpmn2EditorPreferencePage_Change_Button);
+ changeFontButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent event) {
+ FontDialog fontDialog = new FontDialog(changeFontButton
+ .getShell());
+ if (selectedFont != null) {
+ fontDialog.setFontList(selectedFont);
+ }
+ FontData font = fontDialog.open();
+ if (font != null) {
+ FontData[] oldFont = selectedFont;
+ if (oldFont == null) {
+ oldFont = JFaceResources.getDefaultFont().getFontData();
+ }
+ setSelectedFont(font);
+// fireValueChanged(VALUE, oldFont[0], font);
+ }
+
+ }
+ });
+ changeFontButton.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ changeFontButton = null;
+ }
+ });
+ changeFontButton.setFont(parent.getFont());
+
+ }
+
+ @Override
+ public void addSelectionListener(SelectionListener listener) {
+ changeFontButton.addSelectionListener(listener);
+ }
+
+ @Override
+ public Font getValue() {
+ if (selectedFont!=null && selectedFont.length>0)
+ return ShapeStyle.fontDataToFont(selectedFont[0]);
+ return null;
+ }
+
+ public void setValue(Font f) {
+ setSelectedFont(ShapeStyle.fontToFontData(f));
+ }
+
+ private void setSelectedFont(FontData fd) {
+
+ FontData[] bestFont = JFaceResources.getFontRegistry().filterData(
+ new FontData[]{fd}, previewLabel.getDisplay());
+
+ //if we have nothing valid do as best we can
+ if (bestFont == null) {
+ bestFont = getDefaultFontData();
+ }
+
+ //Now cache this value in the receiver
+ this.selectedFont = bestFont;
+
+ if (previewLabel != null) {
+ previewLabel.setText(StringConverter.asString(selectedFont[0]));
+ }
+ }
+
+ /**
+ * Get the system default font data.
+ * @return FontData[]
+ */
+ private FontData[] getDefaultFontData() {
+ return previewLabel.getDisplay().getSystemFont().getFontData();
+ }
+ }
+
+ private class IntegerShapeStyleEditor extends ShapeStyleEditor {
+ private Label label;
+ private Text text;
+
+ public IntegerShapeStyleEditor(Composite parent, final int ssMask, String labelText) {
+ super(parent, SWT.NONE, ssMask);
+ this.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
+ this.setLayout(new GridLayout(2, true));
+
+ label = new Label(this, SWT.LEFT);
+ label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ label.setFont(parent.getFont());
+ label.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ label = null;
+ }
+ });
+ label.setText(labelText);
+
+ text = new Text(this, SWT.BORDER);
+ text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ text.addVerifyListener(new VerifyListener() {
+ @Override
+ public void verifyText(VerifyEvent e) {
+ String string = e.text;
+ char[] chars = new char[string.length()];
+ string.getChars(0, chars.length, chars, 0);
+ for (int i = 0; i < chars.length; i++) {
+ if (!('0' <= chars[i] && chars[i] <= '9')) {
+ e.doit = false;
+ return;
+ }
+ }
+ }
+ });
+ }
+
+ public void setText(String labelText) {
+ label.setText(labelText);
+ }
+
+ @Override
+ public void addSelectionListener(final SelectionListener listener) {
+ text.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ Event event = new Event();
+ event.widget = text;
+ SelectionEvent se = new SelectionEvent(event);
+ se.data = getValue();
+ listener.widgetSelected(se);
+ }
+ });
+ }
+
+ @Override
+ public Integer getValue() {
+ if (text!=null) {
+ return Integer.parseInt(text.getText());
+ }
+ return -1;
+ }
+
+ public void setValue(int value) {
+ if (text!=null) {
+ text.setText(Integer.toString(value, 10));
+ }
+ }
+ }
+
+ private class CheckboxShapeStyleEditor extends ShapeStyleEditor {
+ private Button checkbox;
+
+ public CheckboxShapeStyleEditor(Composite parent, final int ssMask, String labelText) {
+ super(parent, SWT.NONE, ssMask);
+ this.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
+ this.setLayout(new GridLayout(1, true));
+
+ checkbox = new Button(this, SWT.CHECK);
+ checkbox.setText(labelText);
+ checkbox.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ }
+
+ public void setText(String labelText) {
+ if (checkbox!=null)
+ checkbox.setText(labelText);
+ }
+
+ @Override
+ public void addSelectionListener(final SelectionListener listener) {
+ checkbox.addSelectionListener(listener);
+ }
+
+ @Override
+ public Boolean getValue() {
+ if (checkbox!=null) {
+ return new Boolean(checkbox.getSelection());
+ }
+ return false;
+ }
+
+ public void setValue(boolean value) {
+ if (checkbox!=null) {
+ checkbox.setSelection(value);
+ }
+ }
+ }
+
+ private class LabeledComboShapeStyleEditor extends ShapeStyleEditor {
+ protected Label label;
+ protected Combo combo;
+
+ public LabeledComboShapeStyleEditor (Composite parent, int ssMask, String text) {
+ super(parent, SWT.NONE, ssMask);
+ setLayout(new GridLayout(2,false));
+
+ label = new Label(this, SWT.LEFT);
+ label.setText(text);
+ label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
+
+ combo = new Combo(this, SWT.READ_ONLY);
+ combo.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
+ }
+
+ public void add(String text, Object value) {
+ combo.add(text);
+ combo.setData(text, value);
+ }
+
+ @Override
+ public void addSelectionListener(SelectionListener listener) {
+ combo.addSelectionListener(listener);
+ }
+
+ @Override
+ public Object getValue() {
+ int index = combo.getSelectionIndex();
+ if ( index>=0) {
+ return combo.getData(combo.getItem(index));
+ }
+ return null;
+ }
+
+ public void setValue(Object value) {
+ int index = 0;
+ for (String s : combo.getItems()) {
+ Object data = combo.getData(s);
+ if (data.equals(value)) {
+ combo.select(index);
+ break;
+ }
+ ++index;
+ }
+
+ }
+ }
+
+ private class LabelLocationShapeStyleEditor extends LabeledComboShapeStyleEditor {
+
+ public LabelLocationShapeStyleEditor(Composite parent, String text) {
+ super(parent, ShapeStyle.SS_LABEL_POSITION, text);
+ for (LabelPosition p : LabelPosition.values())
+ add(p.toString(), p);
+ }
+
+ public LabelPosition getValue() {
+ LabelPosition value = (LabelPosition) super.getValue();
+ if (value==null)
+ value = LabelPosition.SOUTH;
+ return value;
+ }
+ }
+
+ private class RoutingStyleShapeStyleEditor extends LabeledComboShapeStyleEditor {
+
+ public RoutingStyleShapeStyleEditor(Composite parent, String text) {
+ super(parent, ShapeStyle.SS_ROUTING_STYLE, text);
+ for (RoutingStyle p : RoutingStyle.values())
+ add(p.toString(), p);
+ }
+
+ public RoutingStyle getValue() {
+ RoutingStyle value = (RoutingStyle) super.getValue();
+ if (value==null)
+ value = RoutingStyle.Manhattan;
+ return value;
+ }
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorBehaviorPreferencePage.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorBehaviorPreferencePage.java
index 8ba74192..8ba74192 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorBehaviorPreferencePage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorBehaviorPreferencePage.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorPreferencePage.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorPreferencePage.java
index 72eb46b8..72eb46b8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorPreferencePage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2EditorPreferencePage.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2HomePreferencePage.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2HomePreferencePage.java
index f9fafc9e..08c7cb25 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2HomePreferencePage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2HomePreferencePage.java
@@ -33,6 +33,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
@@ -108,6 +109,12 @@ public class Bpmn2HomePreferencePage
group);
addField(isMarkerVisible);
+ BooleanFieldEditor saveBPMNLabels = new BooleanFieldEditor(
+ Bpmn2Preferences.PREF_SAVE_BPMNLABELS,
+ Bpmn2Preferences.PREF_SAVE_BPMNLABELS_LABEL,
+ getFieldEditorParent());
+ addField(saveBPMNLabels);
+
IntegerFieldEditor connectionTimeout = new IntegerFieldEditor(
Bpmn2Preferences.PREF_CONNECTION_TIMEOUT,
Bpmn2Preferences.PREF_CONNECTION_TIMEOUT_LABEL,
@@ -128,6 +135,7 @@ public class Bpmn2HomePreferencePage
preferences.setToDefault(Bpmn2Preferences.PREF_IS_MESSAGE_VISIBLE);
preferences.setToDefault(Bpmn2Preferences.PREF_IS_MARKER_VISIBLE);
preferences.setToDefault(Bpmn2Preferences.PREF_CONNECTION_TIMEOUT);
+ preferences.setToDefault(Bpmn2Preferences.PREF_SAVE_BPMNLABELS);
super.performDefaults();
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2PropertyPage.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2PropertyPage.java
index 53a88874..c0a75a2b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2PropertyPage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Bpmn2PropertyPage.java
@@ -87,7 +87,7 @@ public class Bpmn2PropertyPage extends PropertyPage {
TargetRuntime rt = preferences.getRuntime();
int i = 0;
- for (TargetRuntime r : TargetRuntime.getAllRuntimes()) {
+ for (TargetRuntime r : TargetRuntime.createTargetRuntimes()) {
cboRuntimes.add(r.getName());
cboRuntimes.setData(r.getName(), r);
if (r == rt)
@@ -115,7 +115,7 @@ public class Bpmn2PropertyPage extends PropertyPage {
private void updateData() throws BackingStoreException {
int i = cboRuntimes.getSelectionIndex();
- TargetRuntime rt = TargetRuntime.getAllRuntimes()[i];
+ TargetRuntime rt = TargetRuntime.createTargetRuntimes().get(i);
preferences.setRuntime(rt);
preferences.setCheckProjectNature(btnCheckProjectNature.getSelection());
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Messages.java
index df560a16..5bc587af 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.preferences;
import org.eclipse.osgi.util.NLS;
@@ -13,11 +23,9 @@ public class Messages extends NLS {
public static String ToolProfilePreferencePage_Unnamed;
public static String ToolProfilesPreferencePage_AddDrawer_Button;
public static String ToolProfilesPreferencePage_AddTool_Button;
- public static String ToolProfilesPreferencePage_Connectors_Category;
public static String ToolProfilesPreferencePage_CopyProfile_Button;
public static String ToolProfilesPreferencePage_CreateProfile_Message;
public static String ToolProfilesPreferencePage_CreateProfile_Title;
- public static String ToolProfilesPreferencePage_DataItems_Category;
public static String ToolProfilesPreferencePage_DeleteDrawer_Button;
public static String ToolProfilesPreferencePage_DeleteProfile_Button;
public static String ToolProfilesPreferencePage_DeleteProfile_Message;
@@ -26,19 +34,18 @@ public class Messages extends NLS {
public static String ToolProfilesPreferencePage_DiagramType_Label;
public static String ToolProfilesPreferencePage_EditTool_Button;
public static String ToolProfilesPreferencePage_EnabledElements_Tab;
- public static String ToolProfilesPreferencePage_EventDefinitions_Category;
- public static String ToolProfilesPreferencePage_Events_Category;
- public static String ToolProfilesPreferencePage_Gateways_Category;
public static String ToolProfilesPreferencePage_NewProfile_Button;
- public static String ToolProfilesPreferencePage_Other_Category;
public static String ToolProfilesPreferencePage_Profile_Duplicate;
public static String ToolProfilesPreferencePage_Profile_Empty;
public static String ToolProfilesPreferencePage_SetDefaultProfile_Button;
public static String ToolProfilesPreferencePage_ShowID_Button;
public static String ToolProfilesPreferencePage_TargetRuntime_Label;
- public static String ToolProfilesPreferencePage_Tasks_Category;
public static String ToolProfilesPreferencePage_ToolPalette_Tab;
public static String ToolProfilesPreferencePage_ToolProfile_Label;
+
+ public static String ToolEnablementPreferences_BPMN_Extensions;
+ public static String ToolEnablementPreferences_Target_Extensions;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablementTreeEntry.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeEntry.java
index f865c795..69491eb5 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ModelEnablementTreeEntry.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeEntry.java
@@ -10,11 +10,11 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.preferences;
+package org.eclipse.bpmn2.modeler.ui.preferences;
import java.util.ArrayList;
-import org.eclipse.bpmn2.modeler.core.AbstractPropertyChangeListenerProvider;
+import org.eclipse.bpmn2.modeler.core.preferences.AbstractPropertyChangeListenerProvider;
import org.eclipse.emf.ecore.ENamedElement;
public class ModelEnablementTreeEntry extends AbstractPropertyChangeListenerProvider {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeViewer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeViewer.java
index 1b9ad2ba..01e120b3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeViewer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ModelEnablementTreeViewer.java
@@ -1,8 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.preferences;
import java.util.List;
-import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablementTreeEntry;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
@@ -303,4 +312,4 @@ public class ModelEnablementTreeViewer extends Composite {
getParent().layout();
}
}
-} \ No newline at end of file
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/SelectableComboFieldEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/SelectableComboFieldEditor.java
index f08cbfff..f08cbfff 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/SelectableComboFieldEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/SelectableComboFieldEditor.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencePage.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencePage.java
index 63e7f32f..b679e5f2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencePage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencePage.java
@@ -18,9 +18,7 @@ import java.util.List;
import java.util.Map.Entry;
import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
-import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablementTreeEntry;
import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
-import org.eclipse.bpmn2.modeler.core.preferences.ToolProfilesPreferencesHelper;
import org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor;
@@ -28,11 +26,10 @@ import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor.CategoryDesc
import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor.ToolDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ToolPaletteDescriptor.ToolPart;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
+import org.eclipse.bpmn2.modeler.core.utils.Tuple;
import org.eclipse.bpmn2.modeler.ui.Activator;
-import org.eclipse.bpmn2.modeler.ui.FeatureMap;
import org.eclipse.bpmn2.modeler.ui.IConstants;
-import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2ToolBehaviorProvider;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -47,6 +44,8 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
@@ -62,6 +61,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
@@ -75,13 +75,11 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
private Bpmn2Preferences preferences;
private TargetRuntime currentRuntime;
- private Bpmn2DiagramType currentDiagramType;
- private String currentProfile;
+ private String currentProfileId;
private final List<ModelEnablementTreeEntry> bpmnEntries = new ArrayList<ModelEnablementTreeEntry>();
private final List<ModelEnablementTreeEntry> extensionEntries = new ArrayList<ModelEnablementTreeEntry>();
private Combo cboRuntimes;
- private Combo cboDiagramTypes;
private Combo cboProfiles;
private Button btnUseAsDefaultProfile;
private Button btnCreateProfile;
@@ -101,18 +99,23 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
private Button btnEditTool;
private static ToolPaletteDescriptor defaultToolPalette = null;
-
-
- // a list of ToolProfilesPreferencesHelpers, one for each permutation of Target Runtime, Diagram Type
- // and Tool Profiles defined in the Preferences. Helpers contain the Model Enablement list and are used
- // as factories for Model Enablement Tree Entries.
- private Hashtable<TargetRuntime,
- Hashtable<Bpmn2DiagramType,
- Hashtable<String, ToolProfilesPreferencesHelper>>> helpers =
- new Hashtable<TargetRuntime,
- Hashtable<Bpmn2DiagramType,
- Hashtable<String,ToolProfilesPreferencesHelper>>>();
+ /**
+ * A map of ToolProfilesPreferencesHelpers, one for each permutation of
+ * Target Runtime and Tool Profile defined in the Preferences. Helpers
+ * contain the Model Enablement list and are used as factories for Model
+ * Enablement Tree Entries. The lookup key for this map is a concatenation
+ * of the Target Runtime ID and profile name string.
+ **/
+ private static class ToolProfilesHelperMap extends Hashtable<String, ToolProfilesPreferencesHelper> {
+ public ToolProfilesPreferencesHelper get(TargetRuntime rt, String profileId) {
+ return get(rt.getId() + "\n" + profileId);
+ }
+ public ToolProfilesPreferencesHelper put(TargetRuntime rt, String profileId, ToolProfilesPreferencesHelper helper) {
+ return put(rt.getId() + "\n" + profileId, helper);
+ }
+ }
+ private ToolProfilesHelperMap helpers = new ToolProfilesHelperMap();
/**
* Create the property page.
@@ -127,32 +130,20 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
ToolProfilesPreferencesHelper.setEnableIdAttribute(preferences.getShowIdAttribute());
}
- private ToolProfilesPreferencesHelper getHelper(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
- Hashtable<Bpmn2DiagramType, Hashtable<String,ToolProfilesPreferencesHelper>> map1 = helpers.get(rt);
-
- if (map1==null) {
- map1 = new Hashtable<Bpmn2DiagramType, Hashtable<String,ToolProfilesPreferencesHelper>>();
- helpers.put(rt, map1);
- }
+ private ToolProfilesPreferencesHelper getHelper(TargetRuntime rt, String profileId) {
+ ToolProfilesPreferencesHelper helper = helpers.get(rt, profileId);
- Hashtable<String,ToolProfilesPreferencesHelper> map2 = map1.get(diagramType);
- if (map2==null) {
- map2 = new Hashtable<String,ToolProfilesPreferencesHelper>();
- map1.put(diagramType, map2);
- }
-
- ToolProfilesPreferencesHelper helper = map2.get(profile);
if (helper==null) {
- helper = new ToolProfilesPreferencesHelper(rt, diagramType, profile);
- ModelEnablements me = preferences.getModelEnablements(rt, diagramType, profile);
+ helper = new ToolProfilesPreferencesHelper(rt, profileId);
+ ModelEnablements me = preferences.getModelEnablements(rt, profileId);
helper.setModelEnablements(me);
- map2.put(profile, helper);
+ helpers.put(rt, profileId, helper);
}
else {
ToolProfilesPreferencesHelper.setEnableIdAttribute(btnShowIds.getSelection());
ModelEnablements me = helper.getModelEnablements();
if (me==null) {
- me = preferences.getModelEnablements(rt, diagramType, profile);
+ me = preferences.getModelEnablements(rt, profileId);
}
helper.setModelEnablements(me);
}
@@ -160,27 +151,8 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
return helper;
}
- private boolean hasHelper(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
- Hashtable<Bpmn2DiagramType, Hashtable<String,ToolProfilesPreferencesHelper>> map1 = helpers.get(rt);
-
- if (map1==null) {
- map1 = new Hashtable<Bpmn2DiagramType, Hashtable<String,ToolProfilesPreferencesHelper>>();
- helpers.put(rt, map1);
- }
-
- Hashtable<String,ToolProfilesPreferencesHelper> map2 = map1.get(diagramType);
- if (map2==null) {
- map2 = new Hashtable<String,ToolProfilesPreferencesHelper>();
- map1.put(diagramType, map2);
- }
-
- ToolProfilesPreferencesHelper helper = map2.get(profile);
- if (helper==null) {
- return false;
- }
-
-
- return true;
+ private boolean hasHelper(TargetRuntime rt, String profileId) {
+ return helpers.get(rt, profileId) != null;
}
/**
@@ -196,11 +168,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
container.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false, 1, 1));
currentRuntime = TargetRuntime.getCurrentRuntime();
- if (BPMN2Editor.getActiveEditor()!=null)
- currentDiagramType = ModelUtil.getDiagramType(BPMN2Editor.getActiveEditor().getBpmnDiagram());
- else
- currentDiagramType = Bpmn2DiagramType.PROCESS;
- currentProfile = ""; //$NON-NLS-1$
+ currentProfileId = ""; //$NON-NLS-1$
final Label lblRuntime = new Label(container, SWT.NONE);
lblRuntime.setText(Messages.ToolProfilesPreferencePage_TargetRuntime_Label);
@@ -220,24 +188,6 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
});
fillRuntimesCombo();
- final Label lblDiagramType = new Label(container, SWT.NONE);
- lblDiagramType.setText(Messages.ToolProfilesPreferencePage_DiagramType_Label);
- lblDiagramType.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1));
-
- cboDiagramTypes = new Combo(container, SWT.READ_ONLY);
- cboDiagramTypes.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- cboDiagramTypes.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- String s = cboDiagramTypes.getText();
- currentDiagramType = (Bpmn2DiagramType) cboDiagramTypes.getData(s);
- fillProfilesCombo();
- fillModelEnablementTrees();
- fillPaletteTree();
- }
- });
- fillDiagramTypesCombo();
-
final Label lblProfile = new Label(container, SWT.NONE);
lblProfile.setText(Messages.ToolProfilesPreferencePage_ToolProfile_Label);
lblProfile.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 3, 1));
@@ -247,7 +197,9 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
cboProfiles.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- currentProfile = cboProfiles.getText();
+ String text = cboProfiles.getText();
+ ModelEnablementDescriptor med = (ModelEnablementDescriptor)cboProfiles.getData(text);
+ currentProfileId = med.getId();
fillModelEnablementTrees();
fillPaletteTree();
}
@@ -274,27 +226,24 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
public void widgetSelected(SelectionEvent e) {
CreateProfileDialog dlg = new CreateProfileDialog(parent.getShell());
if (dlg.open() == Window.OK) {
- currentProfile = dlg.getValue();
- preferences.createToolProfile(currentRuntime, currentDiagramType, currentProfile);
- preferences.setDefaultToolProfile(currentRuntime, currentDiagramType, currentProfile);
+ String profileName = dlg.getValue();
+ String description = dlg.getDescription();
+ currentProfileId = "profile." + profileName.replaceAll(" ", ".");
+ preferences.createToolProfile(currentRuntime, currentProfileId, profileName, description);
+ preferences.setDefaultToolProfile(currentRuntime, currentProfileId);
if (dlg.getCopyProfile()!=null) {
// make a copy of an existing Tool Profile: get the Model Enablements to be copied
- Bpmn2DiagramType saveDiagramType = currentDiagramType;
- currentDiagramType = dlg.getCopyDiagramType();
- currentProfile = dlg.getCopyProfile();
- ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentDiagramType, currentProfile);
+ ModelEnablementDescriptor med = dlg.getCopyProfile();
+ ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, med.getId());
ModelEnablements copyMe = helper.getModelEnablements();
// create a helper for the new Tool Profile
- currentProfile = dlg.getValue();
- currentDiagramType = saveDiagramType;
- helper = getHelper(currentRuntime, currentDiagramType, currentProfile);
+ helper = getHelper(currentRuntime, currentProfileId);
// and copy the ModelEnablements into it
helper.copyModelEnablements(copyMe);
- preferences.setModelEnablements(currentRuntime, currentDiagramType, currentProfile, helper.getModelEnablements());
+ preferences.setModelEnablements(currentRuntime, currentProfileId, helper.getModelEnablements());
}
- currentProfile = dlg.getValue();
fillProfilesCombo();
fillModelEnablementTrees();
fillPaletteTree();
@@ -312,7 +261,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
Messages.ToolProfilesPreferencePage_DeleteProfile_Title,
Messages.ToolProfilesPreferencePage_DeleteProfile_Message)) {
- preferences.deleteToolProfile(currentRuntime, currentDiagramType, currentProfile);
+ preferences.deleteToolProfile(currentRuntime, currentProfileId);
fillProfilesCombo();
fillModelEnablementTrees();
fillPaletteTree();
@@ -358,7 +307,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
@Override
public void widgetSelected(SelectionEvent e) {
ToolProfilesPreferencesHelper.setEnableIdAttribute(btnShowIds.getSelection());
- getHelper(currentRuntime, currentDiagramType, currentProfile);
+ getHelper(currentRuntime, currentProfileId);
fillModelEnablementTrees();
fillPaletteTree();
}
@@ -374,7 +323,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
Object element = event.getElement();
if (element instanceof ModelEnablementTreeEntry) {
ModelEnablementTreeEntry entry = (ModelEnablementTreeEntry)element;
- ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentDiagramType, currentProfile);
+ ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentProfileId);
helper.setEnabled(entry, checked);
}
}
@@ -451,7 +400,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
try {
bpmnEntries.clear();
extensionEntries.clear();
- getHelper(currentRuntime, currentDiagramType, currentProfile).importProfile(path);
+ getHelper(currentRuntime, currentProfileId).importProfile(path);
fillModelEnablementTrees();
fillPaletteTree();
} catch (Exception e1) {
@@ -470,7 +419,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
String path = dialog.open();
if (path != null) {
try {
- getHelper(currentRuntime, currentDiagramType, currentProfile).exportProfile(path);
+ getHelper(currentRuntime, currentProfileId).exportProfile(path);
} catch (Exception e1) {
Activator.showErrorWithLogging(e1);
}
@@ -490,7 +439,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
private void fillRuntimesCombo() {
int i = 0;
- for (TargetRuntime r : TargetRuntime.getAllRuntimes()) {
+ for (TargetRuntime r : TargetRuntime.createTargetRuntimes()) {
cboRuntimes.add(r.getName());
cboRuntimes.setData(r.getName(), r);
if (r == currentRuntime)
@@ -499,30 +448,21 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
}
}
- private void fillDiagramTypesCombo() {
- int i = 0;
- for (Bpmn2DiagramType t : Bpmn2DiagramType.values()) {
- cboDiagramTypes.add(t.toString());
- cboDiagramTypes.setData(t.toString(), t);
- if (t==currentDiagramType)
- cboDiagramTypes.select(i);
- ++i;
- }
- }
-
private void fillProfilesCombo() {
if (cboProfiles!=null) {
int i = 0;
int iSelected = -1;
- currentProfile = preferences.getDefaultToolProfile(currentRuntime, currentDiagramType);
+ currentProfileId = preferences.getDefaultToolProfile(currentRuntime);
cboProfiles.removeAll();
- for (String profile : preferences.getAllToolProfiles(currentRuntime, currentDiagramType)) {
- String text = profile;
+ for (String profileId : preferences.getAllToolProfiles(currentRuntime)) {
+ ModelEnablementDescriptor med = currentRuntime.getModelEnablements(profileId);
+ String text = med.getProfileName();
if (text==null || text.isEmpty())
text = Messages.ToolProfilePreferencePage_Unnamed + (i+1);
cboProfiles.add(text);
- if (iSelected<0 && (currentProfile!=null && currentProfile.equals(profile)))
+ cboProfiles.setData(text, med);
+ if (iSelected<0 && (currentProfileId!=null && currentProfileId.equals(profileId)))
cboProfiles.select(iSelected = i);
++i;
}
@@ -546,7 +486,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
}
private boolean isEnabled(ToolDescriptor td) {
- ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentDiagramType, currentProfile);
+ ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentProfileId);
for (ToolPart tp : td.getToolParts()) {
if (!isEnabled(helper, tp))
return false;
@@ -555,7 +495,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
}
private boolean isEnabled(ToolPart tp) {
- ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentDiagramType, currentProfile);
+ ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentProfileId);
return isEnabled(helper,tp);
}
@@ -577,7 +517,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
return;
loadPalette();
- ToolPaletteDescriptor toolPaletteDescriptor = currentRuntime.getToolPalette(currentDiagramType, currentProfile);
+ ToolPaletteDescriptor toolPaletteDescriptor = currentRuntime.getToolPalette(currentProfileId);
if (toolPaletteDescriptor==null)
toolPaletteDescriptor = defaultToolPalette;
@@ -628,8 +568,8 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
kids.addAll(defaultToolPalette.getCategories());
}
else if (cd.getFromPalette()!=null) {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
- for (ToolPaletteDescriptor td : rt.getToolPalettes()) {
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
+ for (ToolPaletteDescriptor td : rt.getToolPaletteDescriptors()) {
if (cd.getFromPalette().equals(td.getId())) {
for (CategoryDescriptor cd2 : td.getCategories()) {
if (cd.getId().equals(cd2.getId())) {
@@ -722,7 +662,7 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
@Override
public String getText(Object element) {
if (element instanceof ToolPaletteDescriptor) {
- return ((ToolPaletteDescriptor) element).getProfiles().get(0);
+ return ((ToolPaletteDescriptor) element).getProfileIds().get(0);
}
else if (element instanceof CategoryDescriptor) {
CategoryDescriptor cd = (CategoryDescriptor) element;
@@ -756,23 +696,23 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
@Override
protected void performDefaults() {
super.performDefaults();
- String path = Bpmn2Preferences.getToolProfilePath(currentRuntime, currentDiagramType);
+ String path = Bpmn2Preferences.getToolProfilePath(currentRuntime);
preferences.setToDefault(path);
- path = Bpmn2Preferences.getModelEnablementsPath(currentRuntime, currentDiagramType, currentProfile);
+ path = Bpmn2Preferences.getModelEnablementsPath(currentRuntime, currentProfileId);
preferences.setToDefault(path);
fillProfilesCombo();
// force the helper's Model Enablements to be reloaded from default preferences
- ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentDiagramType, currentProfile);
+ ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentProfileId);
helper.setModelEnablements(null);
fillModelEnablementTrees();
fillPaletteTree();
}
private void loadModelEnablements() {
- ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentDiagramType, currentProfile);
+ ToolProfilesPreferencesHelper helper = getHelper(currentRuntime, currentProfileId);
loadModelEnablements(helper, bpmnEntries, null, null);
- ModelEnablementDescriptor med = currentRuntime.getModelEnablements(currentDiagramType, currentProfile);
+ ModelEnablementDescriptor med = currentRuntime.getModelEnablements(currentProfileId);
if (med!=null)
loadModelEnablements(helper, extensionEntries, bpmnEntries, med);
}
@@ -799,52 +739,25 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
return enabled.toArray();
}
+ @SuppressWarnings("rawtypes")
private void loadPalette() {
if (defaultToolPalette == null) {
defaultToolPalette = new ToolPaletteDescriptor();
CategoryDescriptor cd;
-
- cd = new CategoryDescriptor(defaultToolPalette,null,Messages.ToolProfilesPreferencePage_Connectors_Category,null,null);
- defaultToolPalette.getCategories().add(cd);
- for (Class c : FeatureMap.CONNECTORS) {
- loadCategory(cd,c);
- }
- cd = new CategoryDescriptor(defaultToolPalette,null,Messages.ToolProfilesPreferencePage_Tasks_Category,null,null);
- defaultToolPalette.getCategories().add(cd);
- for (Class c : FeatureMap.TASKS) {
- loadCategory(cd,c);
- }
- cd = new CategoryDescriptor(defaultToolPalette,null,Messages.ToolProfilesPreferencePage_Gateways_Category,null,null);
- defaultToolPalette.getCategories().add(cd);
- for (Class c : FeatureMap.GATEWAYS) {
- loadCategory(cd,c);
- }
- cd = new CategoryDescriptor(defaultToolPalette,null,Messages.ToolProfilesPreferencePage_Events_Category,null,null);
- defaultToolPalette.getCategories().add(cd);
- for (Class c : FeatureMap.EVENTS) {
- loadCategory(cd,c);
- }
- cd = new CategoryDescriptor(defaultToolPalette,null,Messages.ToolProfilesPreferencePage_EventDefinitions_Category,null,null);
- defaultToolPalette.getCategories().add(cd);
- for (Class c : FeatureMap.EVENT_DEFINITIONS) {
- loadCategory(cd,c);
- }
- cd = new CategoryDescriptor(defaultToolPalette,null,Messages.ToolProfilesPreferencePage_DataItems_Category,null,null);
- defaultToolPalette.getCategories().add(cd);
- for (Class c : FeatureMap.DATA) {
- loadCategory(cd,c);
- }
- cd = new CategoryDescriptor(defaultToolPalette,null,Messages.ToolProfilesPreferencePage_Other_Category,null,null);
- defaultToolPalette.getCategories().add(cd);
- for (Class c : FeatureMap.OTHER) {
- loadCategory(cd,c);
+ List<Tuple<String, List<Class>>> drawers = Bpmn2ToolBehaviorProvider.getDefaultPaletteDrawers();
+ for (Tuple<String, List<Class>> entry : drawers) {
+ cd = new CategoryDescriptor(defaultToolPalette,null,entry.getFirst(),null,null);
+ defaultToolPalette.getCategories().add(cd);
+ for (Class c : entry.getSecond()) {
+ loadCategory(cd,c);
+ }
}
}
}
private void loadCategory(CategoryDescriptor cd, Class c) {
- ToolDescriptor td = new ToolDescriptor(cd, null, ModelUtil.toDisplayName(c.getSimpleName()),null,null);
+ ToolDescriptor td = new ToolDescriptor(cd, null, ModelUtil.toCanonicalString(c.getSimpleName()),null,null);
cd.getTools().add(td);
ToolPart tp = new ToolPart(td,c.getSimpleName());
td.getToolParts().add(tp);
@@ -854,20 +767,18 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
public boolean performOk() {
setErrorMessage(null);
try {
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
- for (Bpmn2DiagramType diagramType : Bpmn2DiagramType.values()) {
- for (String profile : preferences.getAllToolProfiles(rt, diagramType)) {
- if (hasHelper(rt, diagramType, profile)) {
- ToolProfilesPreferencesHelper helper = getHelper(rt, diagramType, profile);
- preferences.setModelEnablements(rt, diagramType, profile, helper.getModelEnablements());
- }
+ for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
+ for (String profileId : preferences.getAllToolProfiles(rt)) {
+ if (hasHelper(rt, profileId)) {
+ ToolProfilesPreferencesHelper helper = getHelper(rt, profileId);
+ preferences.setModelEnablements(rt, profileId, helper.getModelEnablements());
}
}
}
preferences.setShowIdAttribute(btnShowIds.getSelection());
if (btnUseAsDefaultProfile.getSelection())
- preferences.setDefaultToolProfile(currentRuntime, currentDiagramType, currentProfile);
+ preferences.setDefaultToolProfile(currentRuntime, currentProfileId);
preferences.flush();
} catch (BackingStoreException e) {
@@ -878,7 +789,8 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
private class CreateProfileDialog extends InputDialog {
- private String copySelection = null;
+ private ModelEnablementDescriptor copySelection = null;
+ private String description;
public CreateProfileDialog(Shell parentShell) {
super(parentShell,
@@ -901,21 +813,8 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
});
}
- public String getCopyProfile() {
- if (copySelection!=null && copySelection.contains("/")) { //$NON-NLS-1$
- int i = copySelection.indexOf("/"); //$NON-NLS-1$
- return copySelection.substring(i+1);
- }
- return null;
- }
-
- public Bpmn2DiagramType getCopyDiagramType() {
- if (copySelection!=null && copySelection.contains("/")) { //$NON-NLS-1$
- int i = copySelection.indexOf("/"); //$NON-NLS-1$
- String s = copySelection.substring(0,i);
- return Bpmn2DiagramType.fromString(s);
- }
- return null;
+ public ModelEnablementDescriptor getCopyProfile() {
+ return copySelection;
}
@Override
@@ -926,6 +825,21 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
container.setLayout(new GridLayout(2, false));
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ Label lblDescription = new Label(container, SWT.NONE);
+ lblDescription.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
+ lblDescription.setText("Enter an optional description for the Tool Palette");
+ final Text txtDescription = new Text(container, SWT.BORDER);
+ txtDescription.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1));
+ txtDescription.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ description = txtDescription.getText();
+ }
+ });
+
+ Label lblfiller = new Label(container, SWT.NONE);
+ lblfiller.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
+
final Button btnCopy = new Button(container, SWT.CHECK);
btnCopy.setText(Messages.ToolProfilesPreferencePage_CopyProfile_Button);
btnCopy.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1));
@@ -935,15 +849,19 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
cboCopy.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- copySelection = cboCopy.getText();
+ String text = cboCopy.getText();
+ copySelection = (ModelEnablementDescriptor) cboCopy.getData(text);
}
});
- for (Bpmn2DiagramType diagramType : Bpmn2DiagramType.values()) {
- for (String profile : preferences.getAllToolProfiles(currentRuntime, diagramType)) {
- String key = diagramType + "/" + profile; //$NON-NLS-1$
- cboCopy.add(key);
- }
+ int i=1;
+ for (String profileId : preferences.getAllToolProfiles(currentRuntime)) {
+ ModelEnablementDescriptor med = currentRuntime.getModelEnablements(profileId);
+ String text = med.getProfileName();
+ if (text==null || text.isEmpty())
+ text = Messages.ToolProfilePreferencePage_Unnamed + i++;
+ cboCopy.add(text);
+ cboCopy.setData(text, med);
}
cboCopy.setEnabled(false);
@@ -959,6 +877,10 @@ public class ToolProfilesPreferencePage extends PreferencePage implements IWorkb
return composite;
}
+
+ public String getDescription() {
+ return description;
+ }
}
/**
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ToolProfilesPreferencesHelper.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencesHelper.java
index d2452758..4182767a 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/preferences/ToolProfilesPreferencesHelper.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/ToolProfilesPreferencesHelper.java
@@ -10,15 +10,13 @@
*
* @author Ivar Meikas
******************************************************************************/
-package org.eclipse.bpmn2.modeler.core.preferences;
+package org.eclipse.bpmn2.modeler.ui.preferences;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
@@ -26,12 +24,12 @@ import java.util.List;
import java.util.Properties;
import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.modeler.core.preferences.ModelEnablements;
import org.eclipse.bpmn2.modeler.core.runtime.ModelEnablementDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2FeatureMap;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
@@ -45,17 +43,15 @@ public class ToolProfilesPreferencesHelper {
private ModelEnablements modelEnablements;
private static HashSet<EClass> elementSet = null;
private TargetRuntime targetRuntime;
- private Bpmn2DiagramType diagramType;
- private String profile;
+ private String profileId;
private static boolean enableIdAttribute = false;
private ToolProfilesPreferencesHelper() {
}
- public ToolProfilesPreferencesHelper(TargetRuntime rt, Bpmn2DiagramType diagramType, String profile) {
+ public ToolProfilesPreferencesHelper(TargetRuntime rt, String profileId) {
this.targetRuntime = rt;
- this.diagramType = diagramType;
- this.profile = profile;
+ this.profileId = profileId;
createElementSet();
}
@@ -68,40 +64,43 @@ public class ToolProfilesPreferencesHelper {
if (elementSet==null) {
elementSet = new HashSet<EClass>();
Bpmn2Package pkg = Bpmn2Package.eINSTANCE;
- EList<EClassifier> allClassifiers = pkg.getEClassifiers();
- final List<EClass> elements = new ArrayList<EClass>();
- for (EClassifier candidate : allClassifiers) {
- if (candidate instanceof EClass && candidate!=pkg.getDocumentRoot()) {
- boolean add = true;
- for (EClassifier ec : allClassifiers) {
- if (ec!=candidate && ec instanceof EClass) {
- for (EClass superType : ((EClass)ec).getESuperTypes()) {
- if (superType == candidate) {
- add = false;
- break;
- }
- }
- }
- }
- if (add)
- elements.add((EClass)candidate);
- }
+// EList<EClassifier> allClassifiers = pkg.getEClassifiers();
+// final List<EClass> elements = new ArrayList<EClass>();
+// for (EClassifier candidate : allClassifiers) {
+// if (candidate instanceof EClass && candidate!=pkg.getDocumentRoot()) {
+// boolean add = true;
+// for (EClassifier ec : allClassifiers) {
+// if (ec!=candidate && ec instanceof EClass) {
+// for (EClass superType : ((EClass)ec).getESuperTypes()) {
+// if (superType == candidate) {
+// add = false;
+// break;
+// }
+// }
+// }
+// }
+// if (add)
+// elements.add((EClass)candidate);
+// }
+// }
+// elementSet.addAll(elements);
+ for (Class c : Bpmn2FeatureMap.ALL_SHAPES) {
+ elementSet.add((EClass)Bpmn2Package.eINSTANCE.getEClassifier(c.getSimpleName()));
}
- elementSet.addAll(elements);
- for (TargetRuntime rt : TargetRuntime.getAllRuntimes()) {
- for (ModelEnablementDescriptor med : rt.getModelEnablements()) {
- for (String name : med.getAllEnabled()) {
- int i = name.indexOf("."); //$NON-NLS-1$
- if (i>0)
- name = name.substring(i);
- EClassifier ec = pkg.getEClassifier(name);
- if (ec instanceof EClass && !elementSet.contains(ec)) {
- elementSet.add((EClass)ec);
- }
- }
- }
- }
+// for (TargetRuntime rt : TargetRuntime.createTargetRuntimes()) {
+// for (ModelEnablementDescriptor med : rt.getModelEnablementDescriptors()) {
+// for (String name : med.getAllEnabled()) {
+// int i = name.indexOf("."); //$NON-NLS-1$
+// if (i>0)
+// name = name.substring(i);
+// EClassifier ec = pkg.getEClassifier(name);
+// if (ec instanceof EClass && !elementSet.contains(ec)) {
+// elementSet.add((EClass)ec);
+// }
+// }
+// }
+// }
}
}
@@ -125,7 +124,7 @@ public class ToolProfilesPreferencesHelper {
public void copyModelEnablements(ModelEnablements copyMe) {
if (modelEnablements==null) {
- modelEnablements = new ModelEnablements(targetRuntime, diagramType, profile);
+ modelEnablements = new ModelEnablements(targetRuntime, profileId);
}
modelEnablements.setEnabledAll(false);
for (String name : copyMe.getAllEnabled()) {
@@ -167,14 +166,16 @@ public class ToolProfilesPreferencesHelper {
possibleFeatures.add(a);
}
- for (EStructuralFeature feature : possibleFeatures) {
- ModelEnablementTreeEntry child = new ModelEnablementTreeEntry(feature, entry);
- enable = isEnabled(eClass, feature);
- child.setEnabled(enable);
- children.add(child);
+ if (enable) {
+ for (EStructuralFeature feature : possibleFeatures) {
+ ModelEnablementTreeEntry child = new ModelEnablementTreeEntry(feature, entry);
+ enable = isEnabled(eClass, feature);
+ child.setEnabled(enable);
+ children.add(child);
+ }
+ sortElements(children);
+ entry.setChildren(children);
}
- sortElements(children);
- entry.setChildren(children);
}
sortElements(ret);
return ret;
@@ -226,7 +227,7 @@ public class ToolProfilesPreferencesHelper {
bpmnModelExtensionsRoot.setName(Messages.ToolEnablementPreferences_BPMN_Extensions);
TargetRuntime rt = me.getRuntime();
- for (ModelExtensionDescriptor med : rt.getModelExtensions()) {
+ for (ModelExtensionDescriptor med : rt.getAllModelExtensionDescriptors()) {
if (med.getProperties().size()>0) {
// this <modelExtension> has at least one <property>
// that can be enabled or disabled:
@@ -248,7 +249,7 @@ public class ToolProfilesPreferencesHelper {
// so far contains only EClass entries; the <property>
// elements will become their children.
for (ModelEnablementTreeEntry entry : bpmnModelExtensions) {
- for (ModelExtensionDescriptor med2 : rt.getModelExtensions()) {
+ for (ModelExtensionDescriptor med2 : rt.getAllModelExtensionDescriptors()) {
if (entry.getName().equals(med2.getType())) {
ArrayList<ModelEnablementTreeEntry> children = new ArrayList<ModelEnablementTreeEntry>();
for (Property p : med2.getProperties()) {
@@ -378,7 +379,7 @@ public class ToolProfilesPreferencesHelper {
Properties p = new Properties();
p.load(new FileInputStream(path));
- ModelEnablements me = new ModelEnablements(targetRuntime, diagramType, profile);
+ ModelEnablements me = new ModelEnablements(targetRuntime, profileId);
for (Object key : p.keySet()) {
Object value = p.get(key);
@@ -396,12 +397,15 @@ public class ToolProfilesPreferencesHelper {
List<String> keys = modelEnablements.getAllEnabled();
Collections.sort(keys);
+ ModelEnablementDescriptor med = targetRuntime.getModelEnablements(profileId);
+ String profileName = med.getProfileName();
+ String description = med.getDescription();
if (writeXml) {
fw.write("\t\t<modelEnablement"); //$NON-NLS-1$
fw.write(" runtimeId=\"" + targetRuntime.getId() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
- fw.write(" type=\"" + profile + "\""); //$NON-NLS-1$ //$NON-NLS-2$
- if (profile!=null)
- fw.write(" profile=\"" + profile + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ fw.write(" id=\"" + profileId + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ fw.write(" profile=\"" + profileName + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ fw.write(" description=\"" + description + "\""); //$NON-NLS-1$ //$NON-NLS-2$
fw.write(">\r\n"); //$NON-NLS-1$
fw.write("\t\t\t<disable object=\"all\"/>\r\n"); //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/messages.properties
index 554c8e9f..c2b27b34 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/preferences/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
Bpmn2EditorPreferencePage_Description=Expand the tree to edit preferences for Editor.
ToolProfilePreferencePage_Default_Profile_Label=Default Profile:
ToolProfilePreferencePage_Export=Export Profile ...
@@ -7,11 +17,9 @@ ToolProfilePreferencePage_Standard_Elements_Label=Standard BPMN Elements
ToolProfilePreferencePage_Unnamed=Unnamed
ToolProfilesPreferencePage_AddDrawer_Button=Add Drawer
ToolProfilesPreferencePage_AddTool_Button=Add Tool
-ToolProfilesPreferencePage_Connectors_Category=Connectors
ToolProfilesPreferencePage_CopyProfile_Button=Copy settings from this profile:
ToolProfilesPreferencePage_CreateProfile_Message=Enter the name of the new Profile to create in Target Runtime "{0}"
ToolProfilesPreferencePage_CreateProfile_Title=Create New Profile
-ToolProfilesPreferencePage_DataItems_Category=Data Items
ToolProfilesPreferencePage_DeleteDrawer_Button=Delete Drawer
ToolProfilesPreferencePage_DeleteProfile_Button=Delete Profile
ToolProfilesPreferencePage_DeleteProfile_Message=This operation can not be undone.\nAre you sure you want to delete this Tool Profile?
@@ -20,16 +28,14 @@ ToolProfilesPreferencePage_DeleteTool_Button=Delete Tool
ToolProfilesPreferencePage_DiagramType_Label=Diagram Type
ToolProfilesPreferencePage_EditTool_Button=Edit Tool
ToolProfilesPreferencePage_EnabledElements_Tab=Enabled Model Elements and Attributes
-ToolProfilesPreferencePage_EventDefinitions_Category=Event Definitions
-ToolProfilesPreferencePage_Events_Category=Events
-ToolProfilesPreferencePage_Gateways_Category=Gateways
ToolProfilesPreferencePage_NewProfile_Button=Create Profile
-ToolProfilesPreferencePage_Other_Category=Other
ToolProfilesPreferencePage_Profile_Duplicate=Profile {0} is already defined
ToolProfilesPreferencePage_Profile_Empty=Profile name can not be empty
ToolProfilesPreferencePage_SetDefaultProfile_Button=Use as default profile
ToolProfilesPreferencePage_ShowID_Button=Show ID attributes (Editor Behavior)
ToolProfilesPreferencePage_TargetRuntime_Label=Target Runtime
-ToolProfilesPreferencePage_Tasks_Category=Tasks
ToolProfilesPreferencePage_ToolPalette_Tab=Tool Palette
ToolProfilesPreferencePage_ToolProfile_Label=Tool Profile
+
+ToolEnablementPreferences_BPMN_Extensions=BPMN Model Element Extensions
+ToolEnablementPreferences_Target_Extensions=Target Runtime Model Extensions
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedDetailComposite.java
index 54c0e67b..f23946f6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedDetailComposite.java
@@ -22,6 +22,7 @@ import java.util.List;
import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.modeler.core.adapters.AdapterRegistry;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
@@ -233,7 +234,7 @@ public class AdvancedDetailComposite extends AbstractDetailComposite {
detailsDetailComposite.setBusinessObject(obj);
- String name = ModelUtil.getDisplayName(obj);
+ String name = ExtendedPropertiesProvider.getTextValue(obj);
detailsSection.setText(name+Messages.AdvancedDetailComposite_Details_Title);
detailsSection.setVisible(true);
@@ -270,7 +271,7 @@ public class AdvancedDetailComposite extends AbstractDetailComposite {
treeViewer.setInput(be);
hookPropertySheetPageMenu();
- treeSection.setText(ModelUtil.getDisplayName(be));
+ treeSection.setText(ExtendedPropertiesProvider.getTextValue(be));
detailsSection.setVisible(true);
}
@@ -410,7 +411,6 @@ public class AdvancedDetailComposite extends AbstractDetailComposite {
if (value instanceof BaseElement) {
BaseElement e = ((BaseElement) value);
if (e.getId() == null) {
-// e.setId(EcoreUtil.generateUUID());
ModelUtil.setID(e,baseElement.eResource());
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java
index eba85d65..fa9a6cac 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/AdvancedPropertySection.java
@@ -12,13 +12,10 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property;
-import java.io.IOException;
-
import org.eclipse.bpmn2.di.impl.BPMNDiagramImpl;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
-import org.eclipse.bpmn2.modeler.ui.Activator;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
@@ -27,8 +24,6 @@ import org.eclipse.ui.IWorkbenchPart;
public class AdvancedPropertySection extends DefaultPropertySection {
- private AdvancedDetailComposite composite;
-
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertySection#createSectionRoot()
*/
@@ -42,18 +37,10 @@ public class AdvancedPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
-// if (be==null) {
-// // maybe it's the Diagram (editor canvas)?
-// be = BusinessObjectUtil.getFirstElementOfType(pe, BPMNDiagram.class);
-// }
if (be instanceof BPMNDiagramImpl) {
- try {
- be = ModelHandlerLocator.getModelHandler(be.eResource()).getDefinitions();
- } catch (IOException e) {
- Activator.showErrorWithLogging(e);
- }
+ be = ModelUtil.getDefinitions(be);
}
return be;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java
new file mode 100644
index 00000000..3029f2dc
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/DescriptionPropertySection.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.property;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.Group;
+import org.eclipse.bpmn2.TextAnnotation;
+import org.eclipse.bpmn2.di.BPMNDiagram;
+import org.eclipse.bpmn2.modeler.core.ToolTipProvider;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesAdapter;
+import org.eclipse.bpmn2.modeler.core.features.choreography.ChoreographyUtil;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.FeatureListObjectEditor;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.ui.diagram.Bpmn2FeatureMap;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class DescriptionPropertySection extends DefaultPropertySection implements ITabbedPropertyConstants {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertySection#createSectionRoot()
+ */
+ @Override
+ protected AbstractDetailComposite createSectionRoot() {
+ return new DescriptionDetailComposite(this);
+ }
+
+ @Override
+ public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
+ return new DescriptionDetailComposite(parent, style);
+ }
+
+ public class DescriptionDetailComposite extends DefaultDetailComposite {
+
+ /**
+ * @param section
+ */
+ public DescriptionDetailComposite(AbstractBpmn2PropertySection section) {
+ super(section);
+ }
+
+ public DescriptionDetailComposite(Composite parent, int style) {
+ super(parent,style);
+ }
+
+ @Override
+ protected void cleanBindings() {
+ super.cleanBindings();
+ descriptionText = null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2DetailComposite
+ * #createBindings(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public void createBindings(EObject object) {
+
+ bindDescription(object);
+ bindAttribute(object,"id"); //$NON-NLS-1$
+ bindAttribute(object,"name"); //$NON-NLS-1$
+ bindList(object, "documentation"); //$NON-NLS-1$
+ bindAppearance(object);
+
+ if (!(object instanceof Group)) {
+ EStructuralFeature reference = object.eClass().getEStructuralFeature("categoryValueRef"); //$NON-NLS-1$
+ if (reference!=null) {
+ if (isModelObjectEnabled(object.eClass(), reference)) {
+ String displayName = getBusinessObjectDelegate().getLabel(object, reference);
+
+ ObjectEditor editor = new FeatureListObjectEditor(this,object,reference) {
+ @Override
+ protected boolean canEdit() {
+ return !Bpmn2Preferences.getInstance(object).getPropagateGroupCategories();
+ }
+ };
+ editor.createControl(getAttributesParent(),displayName);
+ }
+ }
+ }
+ }
+
+ protected boolean isModelObjectEnabled(String className, String featureName) {
+ if (featureName!=null && "name".equals(featureName)) //$NON-NLS-1$
+ return true;
+ return super.isModelObjectEnabled(className,featureName);
+ }
+
+ protected void bindDescription(EObject be) {
+ // don't display the description text if disabled in preferences,
+ // or if this is a popup configuration dialog.
+ if (Bpmn2Preferences.getInstance(be).getShowDescriptions()) {
+ String description = getDescription(be);
+
+ if (description != null) {
+ descriptionText = createDescription(this, description);
+ }
+ }
+ }
+
+ public String getDescription(EObject object) {
+ String description = null;
+
+ if (object instanceof BPMNDiagram
+ && ((BPMNDiagram)object).getPlane()!=null
+ && ((BPMNDiagram)object).getPlane().getBpmnElement()!=null) {
+ object = ((BPMNDiagram)object).getPlane().getBpmnElement();
+ }
+ ExtendedPropertiesAdapter adapter = ExtendedPropertiesAdapter.adapt(object);
+ if (adapter!=null) {
+ description = (String) adapter.getProperty(ExtendedPropertiesAdapter.LONG_DESCRIPTION);
+ }
+ if (description==null) {
+ description = ToolTipProvider.INSTANCE.getLongDescription(getDiagramEditor(), object);
+ }
+ if (!isModelObjectEnabled(object.eClass())) {
+ if (description==null)
+ description = "";
+ description = "*** The " + ModelUtil.toCanonicalString(object.eClass().getName()) +
+ " element is not enabled in this Tool Profile. ***\n" + description;
+ }
+ return description;
+ }
+
+ protected void bindAppearance(EObject be) {
+ if (Bpmn2FeatureMap.ALL_SHAPES.contains(be.eClass().getInstanceClass())) {
+ // don't show appearance section for Participant Bands
+ PictogramElement pes[] = getDiagramEditor().getSelectedPictogramElements();
+ if (pes.length==1 && ChoreographyUtil.isChoreographyParticipantBand(pes[0])) {
+ return;
+ }
+
+ final BaseElement element = (BaseElement) be;
+ EObject style = ShapeStyle.getStyleObject(element);
+ if (style==null)
+ style = ShapeStyle.createStyleObject(element);
+ final EObject styleObject = style;
+
+ Composite container = createSectionComposite(this, Messages.DescriptionPropertySection_Appearance_Label);
+
+ if (Bpmn2FeatureMap.CONNECTIONS.contains(be.eClass().getInstanceClass())) {
+ bindAttribute(container, style, ShapeStyle.STYLE_SHAPE_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FONT);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_POSITION);
+ bindAttribute(container, style, ShapeStyle.STYLE_ROUTING_STYLE);
+ }
+ else if (be instanceof TextAnnotation) {
+ bindAttribute(container, style, ShapeStyle.STYLE_SHAPE_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FONT);
+ }
+ else if (Bpmn2FeatureMap.EVENTS.contains(be.eClass().getInstanceClass()) ||
+ Bpmn2FeatureMap.GATEWAYS.contains(be.eClass().getInstanceClass()) ||
+ Bpmn2FeatureMap.DATA.contains(be.eClass().getInstanceClass())) {
+ bindAttribute(container, style, ShapeStyle.STYLE_SHAPE_BACKGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_SHAPE_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FONT);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_POSITION);
+ }
+ else {
+ // Tasks
+ bindAttribute(container, style, ShapeStyle.STYLE_SHAPE_BACKGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_SHAPE_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FOREGROUND);
+ bindAttribute(container, style, ShapeStyle.STYLE_LABEL_FONT);
+ }
+ Button reset = new Button(container, SWT.PUSH);
+ reset.setText("Restore Defaults");
+ reset.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(element);
+ final ShapeStyle ss = preferences.getShapeStyle(element); // this makes a copy of the value in Preference Store
+ TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
+ domain.getCommandStack().execute(new RecordingCommand(domain) {
+ @Override
+ protected void doExecute() {
+ ShapeStyle.setShapeStyle(element, styleObject, ss);
+ }
+ });
+ }
+ });
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EColorConversionDelegate.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EColorConversionDelegate.java
new file mode 100644
index 00000000..a9f3e1c0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EColorConversionDelegate.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property;
+
+import org.eclipse.bpmn2.modeler.core.DefaultConversionDelegate;
+import org.eclipse.jface.preference.ColorSelector;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * EDataType ConversionDelegate for RGB (color value) objects.
+ *
+ * The class is registered with our EDataTypeConversionFactory with the name of a data type;
+ * in this case the data type name is "EColor" in keeping with the EMF naming convention
+ * for primitive data types (e.g. "EString", "EBoolean", etc.)
+ */
+public class EColorConversionDelegate extends DefaultConversionDelegate {
+
+ private enum RGBComponent { RED, GREEN, BLUE };
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#convertToString(java.lang.Object)
+ */
+ @Override
+ public String convertToString(Object value) {
+ if (value instanceof RGB) {
+ RGB c = (RGB) value;
+ return "#" +
+ toHex(c.red) +
+ toHex(c.green) +
+ toHex(c.blue);
+ }
+ if (value==null)
+ return "";
+ return value.toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#createFromString(java.lang.String)
+ *
+ * This method MUST accept an empty String and construct a "default" object. This is required so that
+ * clients can determine the java type (class) of objects handled by this ConversionDelegate.
+ */
+ @Override
+ public Object createFromString(String literal) {
+ if (literal.startsWith("#"))
+ literal = literal.substring(1);
+ if (literal.length()==6) {
+ RGB c = new RGB(
+ fromHex(literal, RGBComponent.RED),
+ fromHex(literal, RGBComponent.GREEN),
+ fromHex(literal, RGBComponent.BLUE)
+ );
+ return c;
+ }
+ return new RGB(0,0,0);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.EditControlProvider#createControl(org.eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ public EditControl createControl(Composite parent, int style) {
+ return new ColorControl(parent, style);
+ }
+
+ private String toHex(int i) {
+ String s = Integer.toHexString(i);
+ int l = s.length();
+ if (l==1)
+ s = "0" + s;
+ else if (l>2)
+ s = s.substring(l-2, l-1);
+ return s;
+ }
+
+ private int fromHex(String s, EColorConversionDelegate.RGBComponent cc) {
+ switch (cc) {
+ case RED:
+ s = s.substring(0,2);
+ break;
+ case GREEN:
+ s = s.substring(2,4);
+ break;
+ case BLUE:
+ s = s.substring(4,6);
+ break;
+ }
+ return Integer.parseInt(s, 16);
+ }
+
+
+ /**
+ * This is an EditControl that wraps a ColorSelector widget for editing RGB values.
+ */
+ public class ColorControl extends EditControl {
+ private ColorSelector colorSelector;
+
+ public ColorControl(Composite parent, int style) {
+ super(parent, style);
+ this.setLayout(new RowLayout());
+
+ colorSelector = new ColorSelector(this);
+ colorSelector.getButton().addSelectionListener(this);
+ }
+
+ @Override
+ public Object getValue() {
+ return colorSelector.getColorValue();
+ }
+
+ @Override
+ public boolean setValue(Object value) {
+ if (value instanceof RGB) {
+ colorSelector.setColorValue((RGB)value);
+ return true;
+ }
+ return false;
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EFontConversionDelegate.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EFontConversionDelegate.java
new file mode 100644
index 00000000..82eaed08
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/EFontConversionDelegate.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property;
+
+import org.eclipse.bpmn2.modeler.core.DefaultConversionDelegate;
+import org.eclipse.bpmn2.modeler.ui.Activator;
+import org.eclipse.bpmn2.modeler.ui.Messages;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FontDialog;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ * EDataType ConversionDelegate for Font objects.
+ *
+ * The class is registered with our EDataTypeConversionFactory with the name of a data type;
+ * in this case the data type name is "EFont" in keeping with the EMF naming convention
+ * for primitive data types (e.g. "EString", "EBoolean", etc.)
+ */
+public class EFontConversionDelegate extends DefaultConversionDelegate {
+
+ private static FontData systemFontData;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#convertToString(java.lang.Object)
+ */
+ @Override
+ public String convertToString(Object value) {
+ if (value instanceof FontData) {
+ FontData fd = (FontData) value;
+ int style = fd.getStyle();
+ boolean isItalic = (style & SWT.ITALIC) != 0;
+ boolean isBold = (style & SWT.BOLD) != 0;
+ return new String(
+ fd.getName() + "," + //$NON-NLS-1$
+ fd.height + "," + //$NON-NLS-1$
+ (isItalic ? "I" : "-") + "," + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ (isBold ? "B" : "-") //$NON-NLS-1$ //$NON-NLS-2$
+ );
+ }
+ return Display.getDefault().getSystemFont().getFontData()[0].toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.EDataType.Internal.ConversionDelegate#createFromString(java.lang.String)
+ *
+ * This method MUST accept an empty String and construct a "default" object. This is required so that
+ * clients can determine the java type (class) of objects handled by this ConversionDelegate.
+ */
+ @Override
+ public Object createFromString(String literal) {
+ try {
+ String a[] = literal.split(",");
+ if (a.length==4) {
+ String name = a[0];
+ int height = (int)Math.round(Double.parseDouble(a[1]));
+ int style = 0;
+ if ("I".equals(a[2]))
+ style |= SWT.ITALIC;
+ if ("B".equals(a[3]))
+ style |= SWT.BOLD;
+ return new FontData(name, height, style);
+ }
+ }
+ catch (Exception e) {
+ Activator.logError(e);
+ }
+ return getSystemFontData();
+ }
+
+ private static FontData getSystemFontData() {
+ if (systemFontData==null) {
+ try {
+ systemFontData = Display.getDefault().getSystemFont().getFontData()[0];
+ }
+ catch (Exception e) {}
+ }
+ return systemFontData;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.EditControlProvider#createControl(org.eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ public EditControl createControl(Composite parent, int style) {
+ return new FontControl(parent, style);
+ }
+
+
+ /**
+ * This is an EditControl that wraps a FontDialog widget for editing Fonts.
+ */
+ public class FontControl extends EditControl {
+ private Button changeFontButton = null;
+
+ /**
+ * Font data for the chosen font button, or <code>null</code> if none.
+ */
+ private FontData[] selectedFont;
+ private Font previewLabelFont;
+
+ /**
+ * The label that displays the selected font, or <code>null</code> if none.
+ */
+ private Label previewLabel;
+
+ public FontControl(Composite parent, int style) {
+ super(parent, style);
+ this.setLayout(new GridLayout(2, false));
+
+ previewLabel = new Label(this, SWT.LEFT);
+ previewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1));
+ previewLabel.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ previewLabel = null;
+ if (previewLabelFont!=null) {
+ previewLabelFont.dispose();
+ previewLabelFont = null;
+ }
+ }
+ });
+
+ changeFontButton = new Button(this, SWT.PUSH);
+ changeFontButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1));
+ changeFontButton.setText(Messages.Bpmn2EditorPreferencePage_Change_Button);
+ changeFontButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent event) {
+ FontDialog fontDialog = new FontDialog(changeFontButton.getShell());
+ if (selectedFont != null) {
+ fontDialog.setFontList(selectedFont);
+ }
+ FontData font = fontDialog.open();
+ if (font != null) {
+ FontData[] oldFont = selectedFont;
+ if (oldFont == null) {
+ oldFont = JFaceResources.getDefaultFont().getFontData();
+ }
+ setSelectedFont(font);
+ }
+
+ }
+ });
+ changeFontButton.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ changeFontButton = null;
+ }
+ });
+
+ changeFontButton.addSelectionListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.EditControlProvider.EditControl#getValue()
+ */
+ @Override
+ public Object getValue() {
+ if (selectedFont!=null && selectedFont.length>0) {
+ return selectedFont[0];
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.EditControlProvider.EditControl#setValue(java.lang.Object)
+ */
+ @Override
+ public boolean setValue(Object value) {
+ if (value instanceof FontData) {
+ setSelectedFont((FontData)value);
+ }
+ else
+ setSelectedFont(getDefaultFontData()[0]);
+ return true;
+ }
+
+ private void setSelectedFont(FontData fd) {
+
+ FontData[] bestFont = JFaceResources.getFontRegistry().filterData(
+ new FontData[]{fd}, previewLabel.getDisplay());
+
+ //if we have nothing valid do as best we can
+ if (bestFont == null) {
+ bestFont = getDefaultFontData();
+ }
+
+ //Now cache this value in the receiver
+ this.selectedFont = bestFont;
+
+ if (previewLabel != null) {
+ if (previewLabelFont!=null)
+ previewLabelFont.dispose();
+ previewLabelFont = new Font(Display.getDefault(), selectedFont[0]);
+ previewLabel.setFont(previewLabelFont);
+ previewLabel.setText(StringConverter.asString(selectedFont[0]));
+ layout();
+ }
+ }
+
+ /**
+ * Get the system default font data.
+ * @return FontData[]
+ */
+ private FontData[] getDefaultFontData() {
+ return previewLabel.getDisplay().getSystemFont().getFontData();
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/ExtensionValueListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/ExtensionValueListComposite.java
index 40b48af6..ae2b2658 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/ExtensionValueListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/ExtensionValueListComposite.java
@@ -21,7 +21,7 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeContentProvider;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -65,7 +65,7 @@ public abstract class ExtensionValueListComposite extends DefaultListComposite {
@SuppressWarnings("unchecked")
protected void addExtensionValue(EObject value) {
- ModelUtil.addExtensionAttributeValue(businessObject, extensionValueFeature, value);
+ ModelDecorator.addExtensionAttributeValue(businessObject, extensionValueFeature, value);
}
protected Object getListItem(EObject object, EStructuralFeature feature, int index) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/Messages.java
index 189a97dc..d55bca40 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property;
import org.eclipse.osgi.util.NLS;
@@ -9,6 +19,7 @@ public class Messages extends NLS {
public static String AdvancedDetailComposite_Details_Title;
public static String AdvancedDetailComposite_Properties_Title;
public static String AdvancedDetailComposite_Remove_Action;
+ public static String DescriptionPropertySection_Appearance_Label;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyLabelProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyLabelProvider.java
index 8b7cefbc..31754555 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyLabelProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyLabelProvider.java
@@ -13,6 +13,7 @@
package org.eclipse.bpmn2.modeler.ui.property;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.runtime.CustomTaskDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
@@ -47,7 +48,7 @@ public class PropertyLabelProvider extends LabelProvider {
public String getText(Object element) {
EObject object = getBusinessObject(element);
if (object!=null) {
- String text = ModelUtil.getDisplayName(object);
+ String text = ExtendedPropertiesProvider.getTextValue(object);
// check if this is a CustomTask
CustomTaskDescriptor ctd = getCustomTaskDescriptor(object);
if (ctd!=null) {
@@ -80,10 +81,10 @@ public class PropertyLabelProvider extends LabelProvider {
private CustomTaskDescriptor getCustomTaskDescriptor(EObject object) {
TargetRuntime rt = getTargetRuntime(object);
if (rt!=null) {
- for (CustomTaskDescriptor ctd : rt.getCustomTasks()) {
+ for (CustomTaskDescriptor ctd : rt.getCustomTaskDescriptors()) {
if (ctd.getFeatureContainer()!=null) {
String id = ctd.getFeatureContainer().getId(object);
- if (id!=null) {
+ if (ctd.getId().equals(id)) {
return ctd;
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTabDescriptorProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTabDescriptorProvider.java
index 51af5e25..36153979 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTabDescriptorProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTabDescriptorProvider.java
@@ -16,11 +16,11 @@ import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
import org.eclipse.bpmn2.modeler.core.runtime.Bpmn2SectionDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.Bpmn2TabDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.PropertyTabDescriptor;
import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
-import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
@@ -35,7 +35,7 @@ public class PropertyTabDescriptorProvider implements ITabDescriptorProvider {
// cached in this map. It is the BPMN2 Editor's responsibility to remove these items from the map
// when it is disposed().
// @see PropertyTabDescriptorProvider#disposeTabDescriptors(Resource)
- Hashtable <EObject, TabDescriptorList> tabDescriptorListMap = new Hashtable <EObject, TabDescriptorList>();
+ static Hashtable <EObject, TabDescriptorList> tabDescriptorListMap = new Hashtable <EObject, TabDescriptorList>();
public PropertyTabDescriptorProvider() {
super();
@@ -45,36 +45,32 @@ public class PropertyTabDescriptorProvider implements ITabDescriptorProvider {
@Override
public ITabDescriptor[] getTabDescriptors(IWorkbenchPart part, ISelection selection) {
- // is the Tab Descriptor List already in our cache?
- TabDescriptorList tabDescriptorList = null;
EObject businessObject = BusinessObjectUtil.getBusinessObjectForSelection(selection);
- if (businessObject!=null) {
- tabDescriptorList = tabDescriptorListMap.get(businessObject);
- if (tabDescriptorList!=null) {
- // Yes! return it.
- return tabDescriptorList.toArray();
- }
+ if (businessObject==null || businessObject.eResource()==null) {
+ return new ITabDescriptor[] {};
}
- // No, we need build the list: get the Target Runtime <propertyTab> contributions
- // and merge with the Default Runtime Tab Descriptors
- TargetRuntime rt = TargetRuntime.getDefaultRuntime();
- Object bpmn2Editor = part.getAdapter(BPMN2Editor.class);
- if (bpmn2Editor instanceof BPMN2Editor) {
- rt = ((BPMN2Editor)bpmn2Editor).getTargetRuntime(this);
+ // is the Tab Descriptor List already in our cache?
+ TabDescriptorList tabDescriptorList = tabDescriptorListMap.get(businessObject);
+ if (tabDescriptorList!=null) {
+ // Yes! return it.
+ return tabDescriptorList.toArray();
}
- List<Bpmn2TabDescriptor> desc = null;
+ // No, we need build the list: get the Target Runtime <propertyTab> contributions
+ // and merge with the Default Runtime Tab Descriptors
+ List<PropertyTabDescriptor> desc = null;
+ TargetRuntime rt = Bpmn2Preferences.getInstance(businessObject.eResource()).getRuntime();
if (rt!=TargetRuntime.getDefaultRuntime()) {
- desc = TargetRuntime.getDefaultRuntime().getTabDescriptors();
- desc.addAll(rt.getTabDescriptors());
+ desc = TargetRuntime.getDefaultRuntime().buildPropertyTabDescriptors();
+ desc.addAll(rt.buildPropertyTabDescriptors());
}
else
- desc = rt.getTabDescriptors();
+ desc = rt.buildPropertyTabDescriptors();
// do tab replacement
- ArrayList<Bpmn2TabDescriptor> replaced = new ArrayList<Bpmn2TabDescriptor>();
- for (Bpmn2TabDescriptor d : desc) {
+ ArrayList<PropertyTabDescriptor> replaced = new ArrayList<PropertyTabDescriptor>();
+ for (PropertyTabDescriptor d : desc) {
String replacedId = d.getReplaceTab();
if (replacedId!=null) {
String[] replacements = replacedId.split(" "); //$NON-NLS-1$
@@ -87,7 +83,7 @@ public class PropertyTabDescriptorProvider implements ITabDescriptorProvider {
// ask the section if it wants to replace this tab
if (s.doReplaceTab(id, part, selection)) {
// replace the tab whose ID is specified as "replaceTab" in this tab.
- Bpmn2TabDescriptor replacedTab = TargetRuntime.findTabDescriptor(id);
+ PropertyTabDescriptor replacedTab = TargetRuntime.findPropertyTabDescriptor(id);
if (replacedTab!=null) {
replaced.add(replacedTab);
int i = desc.indexOf(replacedTab);
@@ -105,7 +101,7 @@ public class PropertyTabDescriptorProvider implements ITabDescriptorProvider {
desc.removeAll(replaced);
for (int i=desc.size()-1; i>=0; --i) {
- Bpmn2TabDescriptor d = desc.get(i);
+ PropertyTabDescriptor d = desc.get(i);
for (int j=i-1; j>=0; --j) {
if (desc.get(j)==d) {
desc.remove(i);
@@ -116,9 +112,9 @@ public class PropertyTabDescriptorProvider implements ITabDescriptorProvider {
// remove empty tabs
// also move the advanced tab to end of list
- ArrayList<Bpmn2TabDescriptor> emptyTabs = new ArrayList<Bpmn2TabDescriptor>();
- Bpmn2TabDescriptor advancedPropertyTab = null;
- for (Bpmn2TabDescriptor d : desc) {
+ ArrayList<PropertyTabDescriptor> emptyTabs = new ArrayList<PropertyTabDescriptor>();
+ PropertyTabDescriptor advancedPropertyTab = null;
+ for (PropertyTabDescriptor d : desc) {
boolean empty = true;
for (Bpmn2SectionDescriptor s : (List<Bpmn2SectionDescriptor>) d.getSectionDescriptors()) {
if (s.appliesTo(part, selection)) {
@@ -143,11 +139,20 @@ public class PropertyTabDescriptorProvider implements ITabDescriptorProvider {
// make copies of all tab descriptors to prevent cross-talk between editors
replaced.clear(); // we'll just reuse an ArrayList from before...
- for (Bpmn2TabDescriptor td : desc) {
+ for (PropertyTabDescriptor td : desc) {
// Note that the copy() makes the Tab Descriptor IDs and Section IDs unique.
// This is important because the TabbedPropertySheetPage uses these IDs to
// look up the Sections.
- replaced.add(td.copy());
+ String rtid = td.getRuntimeId();
+ if (rtid==null || rtid.equals(TargetRuntime.DEFAULT_RUNTIME_ID) || rt.getId().equals(rtid)) {
+ if (td.getConfigFile()!=null && !rt.getId().equals(rtid))
+ // don't include Default Runtime tabs that were defined in a config file
+ // if this isn't the Default Runtime.
+ continue;
+ // what's left is just the Tab Descriptors defined by the current Target Runtime
+ // and the ones from the Default ("None") runtime.
+ replaced.add(td.copy());
+ }
}
// save this in the cache.
@@ -176,5 +181,14 @@ public class PropertyTabDescriptorProvider implements ITabDescriptorProvider {
tabDescriptorListMap.remove(object);
}
}
+ // clean up any dangling EObjects (ones that are not contained in a Resource)
+ List<EObject> removed = new ArrayList<EObject>();
+ for (EObject o : tabDescriptorListMap.keySet()) {
+ if (o.eResource()==null) {
+ removed.add(o);
+ }
+ }
+ for (EObject o : removed)
+ tabDescriptorListMap.remove(o);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTreeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTreeContentProvider.java
index 3119d07c..3119d07c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTreeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/PropertyTreeContentProvider.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/StyleChangeAdapter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/StyleChangeAdapter.java
new file mode 100644
index 00000000..bb91dcca
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/StyleChangeAdapter.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.property;
+
+import org.eclipse.bpmn2.BaseElement;
+import org.eclipse.bpmn2.ChoreographyActivity;
+import org.eclipse.bpmn2.ExtensionAttributeValue;
+import org.eclipse.bpmn2.modeler.core.adapters.IExtensionValueAdapter;
+import org.eclipse.bpmn2.modeler.core.features.GraphitiConstants;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.preferences.ShapeStyle;
+import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.bpmn2.modeler.core.utils.StyleUtil;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.FeatureMap.Entry;
+import org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.mm.pictograms.Shape;
+import org.eclipse.graphiti.services.Graphiti;
+
+/**
+ *
+ */
+public class StyleChangeAdapter extends AdapterImpl implements IExtensionValueAdapter {
+
+ private BaseElement businessObject;
+ private PictogramElement pictogramElement;
+
+ public static void adapt(PictogramElement pe) {
+ EObject be = BusinessObjectUtil.getBusinessObjectForPictogramElement(pe);
+ if (be instanceof BaseElement && ShapeStyle.hasStyle((BaseElement)be)) {
+ for (Adapter a : be.eAdapters()) {
+ if (a instanceof StyleChangeAdapter)
+ return;
+ }
+ StyleChangeAdapter adapter = new StyleChangeAdapter(pe, (BaseElement)be);
+ be.eAdapters().add(adapter);
+ adapter.updateStyle(null);
+ }
+ }
+
+ private StyleChangeAdapter(PictogramElement pe, BaseElement be) {
+ this.businessObject = be;
+ this.pictogramElement = pe;
+ for (ExtensionAttributeValue x : be.getExtensionValues()) {
+ for (Entry v : x.getValue()) {
+ if (v.getEStructuralFeature().getName().equals("style")) {
+ EObject style = (EObject) v.getValue();
+ style.eAdapters().add(this);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void notifyChanged(Notification msg) {
+ Object newValue = msg.getNewValue();
+ if (msg.getEventType()==Notification.ADD && newValue instanceof ExtensionAttributeValue) {
+ // an <extensionValue> was added, hook this adapter into its notification chain
+ ((EObject)newValue).eAdapters().add(this);
+ EObject style = ShapeStyle.getStyleObject(businessObject);
+ if (style!=null) {
+ style.eAdapters().add(this);
+ updateStyle(newValue);
+ }
+ }
+ else if (msg.getEventType()==Notification.ADD && ShapeStyle.isStyleObject(newValue)) {
+ // a "style" element was added, hook this adapter into that notification chain
+ ((EObject)newValue).eAdapters().add(this);
+ }
+ else if (ShapeStyle.isStyleObject(msg.getNotifier())) {
+ updateStyle(newValue);
+ }
+ }
+
+ private void updateStyle(Object newValue) {
+ if (businessObject.eResource()==null || pictogramElement.eResource()==null)
+ return;
+
+ ShapeStyle ss = ShapeStyle.getShapeStyle(businessObject);
+ GraphicsAlgorithm ga = null;
+ if (businessObject instanceof ChoreographyActivity) {
+ ga = pictogramElement.getGraphicsAlgorithm();
+ }
+ else if (pictogramElement instanceof ContainerShape && ((ContainerShape)pictogramElement).getChildren().size()>0) {
+ Shape shape = ((ContainerShape)pictogramElement).getChildren().get(0);
+ ga = shape.getGraphicsAlgorithm();
+ }
+ else
+ ga = pictogramElement.getGraphicsAlgorithm();
+
+ if (ga!=null) {
+ // only certain components, such as color and size apply to the appearance
+ // of the figure. Other components (of type enum) apply to the Label Position
+ // or line Routing Style which will be handled by the appropriate Update Features.
+ if (!(newValue instanceof EEnumLiteral))
+ StyleUtil.applyStyle(ga, businessObject, ss);
+
+ // also apply the style to Label
+ Shape labelShape = FeatureSupport.getLabelShape(pictogramElement);
+ if (labelShape!=null) {
+ ga = labelShape.getGraphicsAlgorithm();
+ Graphiti.getPeService().setPropertyValue(labelShape, GraphitiConstants.LABEL_CHANGED, "true");
+ StyleUtil.applyStyle(ga, businessObject, ss);
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.IExtensionValueAdapter#shouldSaveElement()
+ */
+ @Override
+ public boolean shouldSaveElement(EObject o) {
+ if (ShapeStyle.isStyleObject(o)) {
+ // this is the "style" object
+ return ShapeStyle.isDirty(businessObject);
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.bpmn2.modeler.core.adapters.IExtensionValueAdapter#shouldSaveFeature(org.eclipse.emf.ecore.EStructuralFeature)
+ */
+ @Override
+ public boolean shouldSaveFeature(EObject o, EStructuralFeature f) {
+ if (ShapeStyle.isStyleObject(o)) {
+ String feature = f.getName();
+ Bpmn2Preferences preferences = Bpmn2Preferences.getInstance(businessObject);
+ ShapeStyle ss = preferences.getShapeStyle(businessObject);
+ Object v = ShapeStyle.getStyleValue(o, feature);
+ if (v!=null) {
+ return !v.equals(ss.getStyleValue(businessObject, feature));
+ }
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java
new file mode 100644
index 00000000..68a88979
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/TabDescriptorList.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property;
+
+import java.util.ArrayList;
+
+import org.eclipse.bpmn2.modeler.core.runtime.PropertyTabDescriptor;
+
+public class TabDescriptorList extends ArrayList<PropertyTabDescriptor> {
+ private static final long serialVersionUID = -296768469891312674L;
+
+ @Override
+ public PropertyTabDescriptor[] toArray() {
+ return this.toArray(new PropertyTabDescriptor[this.size()]);
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/CategoryDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/CategoryDetailComposite.java
index b8e11866..b8e11866 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/CategoryDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/CategoryDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationDetailComposite.java
index 9759d125..9759d125 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationPropertySection.java
index eb571a14..caa6ebaa 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/artifact/TextAnnotationPropertySection.java
@@ -35,7 +35,7 @@ public class TextAnnotationPropertySection extends DefaultPropertySection implem
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof TextAnnotation)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowDetailComposite.java
index 85b4f7bc..85b4f7bc 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowPropertySection.java
index 7ed58b30..fa465fbd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/MessageFlowPropertySection.java
@@ -35,7 +35,7 @@ public class MessageFlowPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof MessageFlow) {
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/Messages.java
index f64b3290..9c3349e7 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.connectors;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowDetailComposite.java
index 558d812f..a589a0f3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowDetailComposite.java
@@ -16,11 +16,11 @@ import org.eclipse.bpmn2.Expression;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.PropertiesCompositeFactory;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.transaction.RecordingCommand;
@@ -123,7 +123,7 @@ public class SequenceFlowDetailComposite extends AbstractDetailComposite {
String objectName = flowNode.getName();
if (objectName!=null && objectName.isEmpty())
objectName = null;
- String typeName = ModelUtil.getLabel(flowNode);
+ String typeName = ExtendedPropertiesProvider.getLabel(flowNode);
if (allowDefault(sequenceFlow)) {
setDefaultFlowCheckbox = getToolkit().createButton(this, "", SWT.CHECK); //$NON-NLS-1$
data = new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowPropertySection.java
index 71469240..8e259749 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/SequenceFlowPropertySection.java
@@ -35,7 +35,7 @@ public class SequenceFlowPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof SequenceFlow)
return be;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties
new file mode 100644
index 00000000..d3ea647b
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/connectors/messages.properties
@@ -0,0 +1,14 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+SequenceFlowDetailComposite_Add_Button=Add Condition
+SequenceFlowDetailComposite_Condition_Expression_Title=Condition Expression
+SequenceFlowDetailComposite_Default_Flow_Label=Default Flow for {0} {1}
+SequenceFlowDetailComposite_Remove_Button=Remove Condition
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataAssignmentDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataAssignmentDetailComposite.java
index 3f46c513..3f46c513 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataAssignmentDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataAssignmentDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataInputPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataInputPropertySection.java
index ff358cac..97ce8630 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataInputPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataInputPropertySection.java
@@ -35,7 +35,7 @@ public class DataInputPropertySection extends DefaultPropertySection implements
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof DataInput)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectPropertySection.java
index 33d4dc29..0a73ca54 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectPropertySection.java
@@ -52,7 +52,7 @@ public class DataObjectPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
if (bo instanceof DataObject) {
return bo;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectReferencePropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectReferencePropertySection.java
index 1ba1a82a..8bd24d6e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectReferencePropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataObjectReferencePropertySection.java
@@ -44,7 +44,7 @@ public class DataObjectReferencePropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
if (bo instanceof DataObjectReference) {
return bo;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataOutputPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataOutputPropertySection.java
index aa67d79b..c4c71b13 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataOutputPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataOutputPropertySection.java
@@ -35,7 +35,7 @@ public class DataOutputPropertySection extends DefaultPropertySection implements
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof DataOutput)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStorePropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStorePropertySection.java
index 3428c687..cb8f9b60 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStorePropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStorePropertySection.java
@@ -45,7 +45,7 @@ public class DataStorePropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
if (bo instanceof DataStoreReference) {
return ((DataStoreReference) bo).getDataStoreRef();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStoreReferencePropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStoreReferencePropertySection.java
index dde5ed15..33582088 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStoreReferencePropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/DataStoreReferencePropertySection.java
@@ -45,7 +45,7 @@ public class DataStoreReferencePropertySection extends DefaultPropertySection {
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
if (bo instanceof DataStoreReference) {
return bo;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ExpressionDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ExpressionDetailComposite.java
index 8c8c10d6..e93bdada 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ExpressionDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ExpressionDetailComposite.java
@@ -63,7 +63,7 @@ public class ExpressionDetailComposite extends DefaultDetailComposite {
parent = getAttributesParent();
if (label==null)
- label = getPropertiesProvider().getLabel(object, attribute);
+ label = getBusinessObjectDelegate().getLabel(object, attribute);
ObjectEditor editor = new ComboObjectEditor(this,object,attribute) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfaceDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfaceDetailComposite.java
index a7c8e5ea..8979b9c1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfaceDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfaceDetailComposite.java
@@ -14,10 +14,10 @@
package org.eclipse.bpmn2.modeler.ui.property.data;
import org.eclipse.bpmn2.Interface;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.property.editors.SchemaObjectEditor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
@@ -72,7 +72,7 @@ public class InterfaceDetailComposite extends DefaultDetailComposite {
parent = getAttributesParent();
final Interface iface = (Interface)object;
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
SchemaObjectEditor editor = new SchemaObjectEditor(this,object,reference);
editor.createControl(parent,displayName);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java
index b869c63b..6192da39 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/InterfacePropertySection.java
@@ -71,7 +71,7 @@ public class InterfacePropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
if (bo instanceof BPMNDiagram) {
BaseElement be = ((BPMNDiagram)bo).getPlane().getBpmnElement();
@@ -124,6 +124,7 @@ public class InterfacePropertySection extends DefaultPropertySection {
else {
definedInterfacesTable = new DefinedInterfaceListComposite(this);
definedInterfacesTable.bindList(be);
+ definedInterfacesTable.setTitle(Messages.InterfacePropertySection_Interfaces_Title);
if (be instanceof Participant) {
providedInterfacesTable = new ProvidedInterfaceListComposite(this);
@@ -141,11 +142,10 @@ public class InterfacePropertySection extends DefaultPropertySection {
public class DefinedInterfaceListComposite extends DefaultListComposite {
/**
- * @param section
- * @param style
+ * @param parent
*/
public DefinedInterfaceListComposite(Composite parent) {
- super(parent, DELETE_STYLE);
+ super(parent, DEFAULT_STYLE);
}
@Override
@@ -176,7 +176,7 @@ public class InterfacePropertySection extends DefaultPropertySection {
tc.setEditable(false);
tc = new TableColumn(object,Bpmn2Package.eINSTANCE.getInterface_ImplementationRef());
- columnProvider.add(tc).setHeaderText("Implementation"); //$NON-NLS-1$
+ columnProvider.add(tc).setHeaderText(Messages.InterfacePropertySection_Implementation_Header);
tc.setEditable(false);
}
return columnProvider;
@@ -186,8 +186,7 @@ public class InterfacePropertySection extends DefaultPropertySection {
public static class ProvidedInterfaceListComposite extends DefaultListComposite {
/**
- * @param section
- * @param style
+ * @param parent
*/
public ProvidedInterfaceListComposite(Composite parent) {
// only allow details editing in DefinedInterfacesTable
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ItemAwareElementDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ItemAwareElementDetailComposite.java
index 2eb3de1c..2eb3de1c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ItemAwareElementDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ItemAwareElementDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageDetailComposite.java
index 57e4a10f..57e4a10f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageListComposite.java
index 6b39b8e6..6b39b8e6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/MessageListComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/Messages.java
index 48147e53..5746ca3a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.data;
import org.eclipse.osgi.util.NLS;
@@ -8,6 +18,7 @@ public class Messages extends NLS {
public static String DataAssignmentDetailComposite_To_Title;
public static String InterfacePropertySection_Interfaces_Message;
public static String InterfacePropertySection_Interfaces_Title;
+ public static String InterfacePropertySection_Implementation_Header;
public static String InterfacePropertySection_No_Interfaces_Error_Message;
public static String InterfacePropertySection_No_Interfaces_Error_Title;
public static String InterfacePropertySection_Participant_Title;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/OperationDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/OperationDetailComposite.java
index 454bcc9a..1f8f44e4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/OperationDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/OperationDetailComposite.java
@@ -14,10 +14,10 @@
package org.eclipse.bpmn2.modeler.ui.property.data;
import org.eclipse.bpmn2.Operation;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.property.editors.SchemaObjectEditor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
@@ -73,7 +73,7 @@ public class OperationDetailComposite extends DefaultDetailComposite {
if (parent==null)
parent = getAttributesParent();
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
SchemaObjectEditor editor = new SchemaObjectEditor(this,object,reference);
editor.createControl(parent,displayName);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceAssignmentExpressionDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceAssignmentExpressionDetailComposite.java
index f15d8637..f15d8637 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceAssignmentExpressionDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceAssignmentExpressionDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceParameterBindingDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceParameterBindingDetailComposite.java
index 7f04b73d..7f04b73d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceParameterBindingDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceParameterBindingDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceRoleDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceRoleDetailComposite.java
index e891ebcf..e891ebcf 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceRoleDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/ResourceRoleDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/messages.properties
index 889b815a..f8612b98 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/data/messages.properties
@@ -1,7 +1,18 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
DataAssignmentDetailComposite_From_Title=To Expression
DataAssignmentDetailComposite_To_Title=From Expression
InterfacePropertySection_Interfaces_Message=Select the Interface provided by this Process
InterfacePropertySection_Interfaces_Title=Interfaces
+InterfacePropertySection_Implementation_Header=Implementation
InterfacePropertySection_No_Interfaces_Error_Message=There are no new Interfaces to add.\nPlease create a new Interface in the \"Defined Interfaces\" first.
InterfacePropertySection_No_Interfaces_Error_Title=No Defined Interfaces
InterfacePropertySection_Participant_Title=Interfaces Provided by Participant
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CorrelationPropertyREListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CorrelationPropertyREListComposite.java
new file mode 100644
index 00000000..01989aea
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/CorrelationPropertyREListComposite.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property.diagrams;
+
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultListComposite;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeColumnProvider;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.swt.widgets.Composite;
+
+public class CorrelationPropertyREListComposite extends DefaultListComposite {
+
+ public CorrelationPropertyREListComposite(AbstractBpmn2PropertySection section, int style) {
+ super(section, style);
+ }
+
+ public CorrelationPropertyREListComposite(AbstractBpmn2PropertySection section) {
+ super(section);
+ }
+
+ public CorrelationPropertyREListComposite(Composite parent, int style) {
+ super(parent, style);
+ }
+
+ public ListCompositeColumnProvider getColumnProvider(EObject object, EStructuralFeature feature) {
+ if (columnProvider==null) {
+ columnProvider = new ListCompositeColumnProvider(this);
+
+ columnProvider.add(object,PACKAGE.getCorrelationPropertyRetrievalExpression_MessageRef());
+ columnProvider.add(object,PACKAGE.getCorrelationPropertyRetrievalExpression_MessagePath());
+ }
+ return columnProvider;
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsDetailComposite.java
index a700a35b..a700a35b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java
index 77a84564..667edd5f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DataItemsPropertySection.java
@@ -38,9 +38,9 @@ public class DataItemsPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
- if (be instanceof Process || ModelUtil.getDiagramType(be)==Bpmn2DiagramType.PROCESS)
+ if (be instanceof Process)
return ModelUtil.getDefinitions(be);
return null;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertyComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertyComposite.java
index 14bda82f..25d9bdd1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertyComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertyComposite.java
@@ -16,9 +16,9 @@ import java.util.Map;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DocumentRoot;
-import org.eclipse.bpmn2.EndPoint;
import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.impl.DefinitionsImpl;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
@@ -27,16 +27,11 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeColumnProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeContentProvider;
-import org.eclipse.bpmn2.modeler.core.merrimac.clad.PropertiesCompositeFactory;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.TableColumn;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextAndButtonObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor;
-import org.eclipse.bpmn2.modeler.core.runtime.ModelExtensionDescriptor.Property;
-import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
import org.eclipse.bpmn2.modeler.core.utils.ImportUtil;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
import org.eclipse.bpmn2.modeler.ui.property.dialogs.NamespacesEditingDialog;
import org.eclipse.bpmn2.modeler.ui.property.dialogs.SchemaImportDialog;
@@ -51,6 +46,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -88,7 +84,7 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
"relationships", //$NON-NLS-1$
"rootElements#PartnerEntity", //$NON-NLS-1$
"rootElements#PartnerRole", //$NON-NLS-1$
-// "rootElements#EndPoint", //$NON-NLS-1$
+ "rootElements#EndPoint", //$NON-NLS-1$
"rootElements#Resource", //$NON-NLS-1$
"rootElements#DataStore", //$NON-NLS-1$
"rootElements#Message", //$NON-NLS-1$
@@ -116,8 +112,8 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
@Override
protected Composite bindProperty(EObject be, String property) {
- if ("namespaces".equals(property)) {
- namespacesTable = new NamespaceListComposite(getPropertySection());
+ if ("namespaces".equals(property)) { //$NON-NLS-1$
+ namespacesTable = new NamespaceListComposite(this);
DefinitionsImpl definitions = (DefinitionsImpl)getBusinessObject();
DocumentRoot root = (DocumentRoot) definitions.eContainer();
namespacesTable.bindList(root, Bpmn2Package.eINSTANCE.getDocumentRoot_XMLNSPrefixMap());
@@ -130,18 +126,13 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
@Override
protected AbstractListComposite bindList(EObject object, EStructuralFeature feature, EClass listItemClass) {
if ("imports".equals(feature.getName())) { //$NON-NLS-1$
- ImportListComposite importsTable = new ImportListComposite(getPropertySection());
+ ImportListComposite importsTable = new ImportListComposite(this);
EStructuralFeature importsFeature = object.eClass().getEStructuralFeature("imports"); //$NON-NLS-1$
importsTable.bindList(object, importsFeature);
return importsTable;
}
else if ("relationships".equals(feature.getName())) { //$NON-NLS-1$
- DefaultListComposite table = new DefaultListComposite(getPropertySection());
- table.bindList(getBusinessObject(), feature);
- return table;
- }
- else if (listItemClass!=null && listItemClass.getName().equals("EndPoint")) {
- EndPointListComposite table = new EndPointListComposite(getPropertySection());
+ DefaultListComposite table = new DefaultListComposite(this,AbstractListComposite.DEFAULT_STYLE);
table.bindList(getBusinessObject(), feature);
return table;
}
@@ -151,12 +142,11 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
}
public class NamespaceListComposite extends DefaultListComposite {
-
- public NamespaceListComposite(AbstractBpmn2PropertySection section) {
- super(section, ADD_BUTTON | REMOVE_BUTTON | EDIT_BUTTON);
+
+ public NamespaceListComposite(Composite parent) {
+ super(parent, ADD_BUTTON | REMOVE_BUTTON | EDIT_BUTTON);
}
-
@Override
protected EObject addListItem(EObject object, EStructuralFeature feature) {
DocumentRoot root = (DocumentRoot)object;
@@ -181,7 +171,20 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
}
return null;
}
-
+
+ protected EObject editListItem(EObject object, EStructuralFeature feature) {
+ IStructuredSelection sel = (IStructuredSelection)tableViewer.getSelection();
+ Map.Entry<String, String> entry = (Map.Entry<String, String>)sel.getFirstElement();
+ DocumentRoot root = (DocumentRoot)object;
+ Map<String,String> map = root.getXMLNSPrefixMap();
+ NamespacesEditingDialog dialog = new NamespacesEditingDialog(getShell(),
+ Messages.DefinitionsPropertyComposite_Change_Namespace_Title, map, entry.getKey(), entry.getValue());
+ if (dialog.open() == Window.OK) {
+ map.put(dialog.getPrefix(), dialog.getNamespace());
+ }
+ return null;
+ }
+
@Override
public AbstractDetailComposite createDetailComposite(Class eClass, final Composite parent, int style) {
detailSection.setText(Messages.DefinitionsPropertyComposite_Namespace_Details_Title);
@@ -222,7 +225,7 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
});
return true;
}
- text.setText(ModelUtil.getDisplayName(object, feature));
+ text.setText(ExtendedPropertiesProvider.getTextValue(object, feature));
return false;
}
};
@@ -312,8 +315,8 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
* @param parent
* @param style
*/
- public ImportListComposite(AbstractBpmn2PropertySection section) {
- super(section);
+ public ImportListComposite(Composite parent) {
+ super(parent, DEFAULT_STYLE);
}
@Override
@@ -453,19 +456,19 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
editor.createControl(composite,label);
feature = Bpmn2Package.eINSTANCE.getImport_Namespace();
- label = ModelUtil.getLabel(be, feature);
+ label = ExtendedPropertiesProvider.getLabel(be, feature);
editor = new TextObjectEditor(this,be, feature);
editor.createControl(composite,label);
editor.setEditable(false);
feature = Bpmn2Package.eINSTANCE.getImport_Location();
- label = ModelUtil.getLabel(be, feature);
+ label = ExtendedPropertiesProvider.getLabel(be, feature);
editor = new TextObjectEditor(this,be, feature);
editor.createControl(composite,label);
editor.setEditable(false);
feature = Bpmn2Package.eINSTANCE.getImport_ImportType();
- label = ModelUtil.getLabel(be, feature);
+ label = ExtendedPropertiesProvider.getLabel(be, feature);
editor = new TextObjectEditor(this,be, feature);
editor.createControl(composite,label);
editor.setEditable(false);
@@ -480,111 +483,4 @@ public class DefinitionsPropertyComposite extends DefaultDetailComposite {
}
}
- public class EndPointListComposite extends DefaultListComposite {
-
- public EndPointListComposite(AbstractBpmn2PropertySection section) {
- super(section);
- }
-
- @Override
- public EClass getListItemClass(EObject object, EStructuralFeature feature) {
- return Bpmn2Package.eINSTANCE.getEndPoint();
- }
-
-// protected int createColumnProvider(EObject object, EStructuralFeature feature) {
-// if (columnProvider==null) {
-// columnProvider = new ListCompositeColumnProvider(this);
-//
-// TargetRuntime rt = getTargetRuntime();
-// for (ModelExtensionDescriptor md : rt.getModelExtensions()) {
-// if ("EndPoint".equals(md.getType())) {
-//
-// for (Property p : md.getProperties()) {
-// final String name = p.name;
-// TableColumn tableColumn = new TableColumn(object,(EStructuralFeature)null) {
-// @Override
-// public String getHeaderText() {
-// return ModelUtil.toDisplayName(name);
-// }
-//
-// @Override
-// public String getText(Object element) {
-// if (element instanceof EndPoint) {
-// EndPoint ep = (EndPoint) element;
-// EStructuralFeature feature = ModelUtil.getAnyAttribute(ep, name);
-// Object v = ep.eGet(feature);
-// if (v!=null)
-// return v.toString();
-// }
-// return ""; //$NON-NLS-1$
-// }
-//
-// @Override
-// public CellEditor createCellEditor (Composite parent) {
-// CellEditor ce = null;
-// return ce;
-// }
-// };
-// columnProvider.add(tableColumn);
-// }
-// }
-// }
-// }
-// return columnProvider.getColumns().size();
-// }
-//
-// @Override
-// public AbstractDetailComposite createDetailComposite(Class eClass, Composite parent, int style) {
-// AbstractDetailComposite composite = new DefaultDetailComposite(parent, style) {
-//
-// protected boolean isModelObjectEnabled(EClass eclass, EStructuralFeature feature) {
-// return true;
-// }
-//
-// @Override
-// public AbstractPropertiesProvider getPropertiesProvider(EObject object) {
-// if (propertiesProvider==null) {
-// propertiesProvider = new AbstractPropertiesProvider(object) {
-// String[] properties = null;
-//
-// @Override
-// public String[] getProperties() {
-// if (properties==null) {
-// TargetRuntime rt = getTargetRuntime();
-// for (ModelExtensionDescriptor md : rt.getModelExtensions()) {
-// if ("EndPoint".equals(md.getType())) {
-// properties = new String[md.getProperties().size()];
-// int i=0;
-// for (Property p : md.getProperties()) {
-// properties[i++] = p.name;
-// }
-// }
-// }
-// }
-//
-// return properties;
-// }
-// };
-// }
-// return propertiesProvider;
-// }
-//
-// };
-//
-// return composite;
-// }
-
- @Override
- protected EObject addListItem(EObject object, EStructuralFeature feature) {
- EObject ep = super.addListItem(object, feature);
-// TargetRuntime rt = getTargetRuntime();
-// for (ModelExtensionDescriptor md : rt.getModelExtensions()) {
-// if ("EndPoint".equals(md.getType())) {
-// md.populateObject(ep, true);
-// }
-// }
-
- return ep;
- }
- }
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java
index 0506c98e..cf5671d7 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/DefinitionsPropertySection.java
@@ -33,7 +33,7 @@ public class DefinitionsPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
return ModelUtil.getDefinitions(be);
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionDetailComposite.java
index 03cc42ba..e7612b60 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionDetailComposite.java
@@ -10,8 +10,11 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.diagrams;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.Import;
import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.ItemKind;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
@@ -19,10 +22,12 @@ import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ComboObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.property.editors.SchemaObjectEditor;
+import org.eclipse.bpmn2.modeler.core.utils.NamespaceUtil;
+import org.eclipse.bpmn2.modeler.ui.property.editors.ItemDefinitionStructureEditor;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
@@ -47,6 +52,7 @@ public class ItemDefinitionDetailComposite extends DefaultDetailComposite {
"itemKind", //$NON-NLS-1$
"isCollection", //$NON-NLS-1$
"structureRef", //$NON-NLS-1$
+ "documentation", //$NON-NLS-1$
// this thing is transient so it won't be serialized; no point in allowing user to set it
// "import"
};
@@ -59,9 +65,8 @@ public class ItemDefinitionDetailComposite extends DefaultDetailComposite {
}
return propertiesProvider;
}
-
- protected void bindAttribute(Composite parent, EObject object, EAttribute attribute, String label) {
+ protected void bindAttribute(Composite parent, EObject object, EAttribute attribute, String label) {
if ("itemKind".equals(attribute.getName())) { //$NON-NLS-1$
if (isModelObjectEnabled(object.eClass(), attribute)) {
@@ -69,7 +74,7 @@ public class ItemDefinitionDetailComposite extends DefaultDetailComposite {
parent = getAttributesParent();
if (label==null)
- label = ModelUtil.getLabel(object, attribute);
+ label = ExtendedPropertiesProvider.getLabel(object, attribute);
ObjectEditor editor = new ComboObjectEditor(this,object,attribute) {
protected boolean setValue(final Object result) {
@@ -99,14 +104,16 @@ public class ItemDefinitionDetailComposite extends DefaultDetailComposite {
if (parent==null)
parent = getAttributesParent();
- final ItemDefinition def = (ItemDefinition)object;
- String displayName = ModelUtil.getLabel(object, reference);
+ final ItemDefinition itemDefinition = (ItemDefinition)object;
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
- if (def.getItemKind().equals(ItemKind.INFORMATION)) {
- SchemaObjectEditor editor = new SchemaObjectEditor(this,object,reference);
+ if (itemDefinition.getItemKind().equals(ItemKind.INFORMATION)) {
+ // This is an Information item: enforce constraints on this thing
+ ItemDefinitionStructureEditor editor = new ItemDefinitionStructureEditor(this,itemDefinition);
editor.createControl(parent,displayName);
}
else {
+ // This is a Physical item: anything goes
ObjectEditor editor = new TextObjectEditor(this,object,reference) {
@Override
protected boolean setValue(Object result) {
@@ -115,6 +122,35 @@ public class ItemDefinitionDetailComposite extends DefaultDetailComposite {
};
editor.createControl(parent,displayName);
}
+
+ // create a Twistie Section for read-only information about this ItemDefinition
+ Composite container = createSectionComposite(this, Messages.ItemDefinitionDetailComposite_DefinedIn_Title);
+ Object structureRef = itemDefinition.getStructureRef();
+ Import imp = itemDefinition.getImport();
+ if (imp!=null) {
+ // the thing is defined in an Import: display Import location, type and namespace
+ createText(container, Messages.ItemDefinitionDetailComposite_Import_Label, imp.getLocation());
+ createText(container, Messages.ItemDefinitionDetailComposite_Type_Label, imp.getImportType());
+ createText(container, Messages.ItemDefinitionDetailComposite_Namespace_Label, imp.getNamespace());
+ }
+ else if (ModelUtil.isStringWrapper(structureRef)) {
+ // the thing is defined within the namespace of the type language,
+ // or some other namespace defined within the document: display
+ // the namespace information
+ String string = ModelUtil.getStringWrapperTextValue(structureRef);
+ String prefix = ""; //$NON-NLS-1$
+ int index = string.indexOf(":"); //$NON-NLS-1$
+ if (index>0)
+ prefix = string.substring(0,index);
+ Resource resource = ModelUtil.getResource(object);
+ String namespace = NamespaceUtil.getNamespaceForPrefix(resource, prefix);
+ if (namespace!=null)
+ createText(container, Messages.ItemDefinitionDetailComposite_Namespace_Label, namespace);
+ else {
+ Definitions definitions = ModelUtil.getDefinitions(resource);
+ createText(container, Messages.ItemDefinitionDetailComposite_TypeLanguage_Label, definitions.getTypeLanguage());
+ }
+ }
}
else
super.bindReference(parent, object, reference);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionListComposite.java
index 05ae6c09..ce7a91b4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ItemDefinitionListComposite.java
@@ -17,8 +17,6 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.TableColumn;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
import org.eclipse.swt.widgets.Composite;
public class ItemDefinitionListComposite extends DefaultListComposite {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java
new file mode 100644
index 00000000..631e0897
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/Messages.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property.diagrams;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.property.diagrams.messages"; //$NON-NLS-1$
+ public static String DefinitionsPropertyComposite_Change_Namespace_Title;
+ public static String DefinitionsPropertyComposite_Create_Namespace_Title;
+ public static String DefinitionsPropertyComposite_Invalid_Duplicate;
+ public static String DefinitionsPropertyComposite_Namespace_Details_Title;
+ public static String DefinitionsPropertyComposite_Namespace_Label;
+ public static String DefinitionsPropertyComposite_Prefix_Label;
+ public static String DefinitionsPropertyComposite_Prefix_Message;
+ public static String ItemDefinitionDetailComposite_DefinedIn_Title;
+ public static String ItemDefinitionDetailComposite_Import_Label;
+ public static String ItemDefinitionDetailComposite_Namespace_Label;
+ public static String ItemDefinitionDetailComposite_Type_Label;
+ public static String ItemDefinitionDetailComposite_TypeLanguage_Label;
+ public static String ParticipantDetailComposite_Maximum_Label;
+ public static String ParticipantDetailComposite_Mimimum_Label;
+ public static String ParticipantDetailComposite_MinMax_Error;
+ public static String ParticipantDetailComposite_Multiplicity_Label;
+ public static String ResourceRoleListComposite_Roles_Label;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantDetailComposite.java
index e27f228d..ba1aa33b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantDetailComposite.java
@@ -23,11 +23,15 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.IntObjectEditor;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ReadonlyTextObjectEditor;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextObjectEditor;
import org.eclipse.bpmn2.modeler.core.utils.ErrorUtils;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.ui.property.data.InterfacePropertySection.ProvidedInterfaceListComposite;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -60,7 +64,7 @@ public class ParticipantDetailComposite extends DefaultDetailComposite {
"processRef", //$NON-NLS-1$
"participantMultiplicity", //$NON-NLS-1$
"interfaceRefs", //$NON-NLS-1$
-// "endPointRefs", //$NON-NLS-1$
+ "endPointRefs", //$NON-NLS-1$
};
@Override
@@ -84,11 +88,27 @@ public class ParticipantDetailComposite extends DefaultDetailComposite {
parent = getAttributesParent();
Participant participant = (Participant) object;
- if ("participantMultiplicity".equals(reference.getName())) {
+ // do not allow the processRef to be changed if this is a Pool
+ if ("processRef".equals(reference.getName())) { //$NON-NLS-1$
+ PictogramElement pes[] = getDiagramEditor().getSelectedPictogramElements();
+ if (pes.length==1) {
+ if (FeatureSupport.isChoreographyParticipantBand(pes[0])) {
+ super.bindReference(parent, object, reference);
+ }
+ else {
+ // display a read-only text field containing the referenced Process name
+ TextObjectEditor editor = new TextObjectEditor(this, object, reference);
+ String label = getBusinessObjectDelegate().getLabel(object, reference);
+ editor.createControl(parent, label);
+ editor.setEditable(false);
+ }
+ }
+ }
+ else if ("participantMultiplicity".equals(reference.getName())) { //$NON-NLS-1$
Composite composite = getToolkit().createComposite(parent);
composite.setLayout(new GridLayout(7,true));
composite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1));
- createLabel(composite,"Multiplicity");
+ createLabel(composite,Messages.ParticipantDetailComposite_Multiplicity_Label);
ParticipantMultiplicity pm =
participant.getParticipantMultiplicity() != null ?
@@ -98,14 +118,14 @@ public class ParticipantDetailComposite extends DefaultDetailComposite {
InsertionAdapter.add(object, Bpmn2Package.eINSTANCE.getParticipant_ParticipantMultiplicity(), pm);
MyIntObjectEditor minEditor = new MyIntObjectEditor(this, pm, Bpmn2Package.eINSTANCE.getParticipantMultiplicity_Minimum());
- minEditor.createControl(composite, "Minimum");
+ minEditor.createControl(composite, Messages.ParticipantDetailComposite_Mimimum_Label);
MyIntObjectEditor maxEditor = new MyIntObjectEditor(this, pm, Bpmn2Package.eINSTANCE.getParticipantMultiplicity_Maximum());
- maxEditor.createControl(composite, "Maximum");
+ maxEditor.createControl(composite, Messages.ParticipantDetailComposite_Maximum_Label);
minEditor.updateText();
}
- else if ("interfaceRefs".equals(reference.getName())) {
+ else if ("interfaceRefs".equals(reference.getName())) { //$NON-NLS-1$
providedInterfacesTable = new ProvidedInterfaceListComposite(this);
providedInterfacesTable.bindList(object, getFeature(object, "interfaceRefs")); //$NON-NLS-1$
}
@@ -126,7 +146,7 @@ public class ParticipantDetailComposite extends DefaultDetailComposite {
super.updateText();
ParticipantMultiplicity pm = (ParticipantMultiplicity) object;
if (pm.getMinimum() >= pm.getMaximum()) {
- ErrorUtils.showErrorMessage("Minimum must be less than Maximum");
+ ErrorUtils.showErrorMessage(Messages.ParticipantDetailComposite_MinMax_Error);
}
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java
index b7767e80..6e76897a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ParticipantPropertySection.java
@@ -27,7 +27,7 @@ public class ParticipantPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
return be;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramDetailComposite.java
index 3c5d4e3e..3c5d4e3e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java
index b1288da6..23266aa2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ProcessDiagramPropertySection.java
@@ -39,7 +39,7 @@ public class ProcessDiagramPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject bo = super.getBusinessObjectForSelection(selection);
if (bo instanceof BPMNDiagram) {
BaseElement be = ((BPMNDiagram)bo).getPlane().getBpmnElement();
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/PropertyListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/PropertyListComposite.java
index e2119baa..756769d8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/PropertyListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/PropertyListComposite.java
@@ -35,7 +35,6 @@ public class PropertyListComposite extends DefaultListComposite {
@Override
public void bindList(EObject theobject, EStructuralFeature thefeature) {
super.bindList(theobject, thefeature);
-// ModelUtil.setLabel(theobject, thefeature, "Variables");
}
public ListCompositeColumnProvider getColumnProvider(EObject object, EStructuralFeature feature) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ResourceRoleListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ResourceRoleListComposite.java
index 6a2ea4ea..1fdbd7ef 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ResourceRoleListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/ResourceRoleListComposite.java
@@ -11,11 +11,11 @@
package org.eclipse.bpmn2.modeler.ui.property.diagrams;
import org.eclipse.bpmn2.ResourceRole;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeColumnProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.TableColumn;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -38,7 +38,7 @@ public class ResourceRoleListComposite extends DefaultListComposite {
@Override
public void bindList(EObject theobject, EStructuralFeature thefeature) {
super.bindList(theobject, thefeature);
- ModelUtil.setLabel(theobject, thefeature, Messages.ResourceRoleListComposite_Roles_Label);
+ ExtendedPropertiesProvider.setLabel(theobject, thefeature, Messages.ResourceRoleListComposite_Roles_Label);
}
public ListCompositeColumnProvider getColumnProvider(EObject object, EStructuralFeature feature) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties
new file mode 100644
index 00000000..e539cfb0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/diagrams/messages.properties
@@ -0,0 +1,27 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+DefinitionsPropertyComposite_Change_Namespace_Title=Change Namespace Prefix
+DefinitionsPropertyComposite_Create_Namespace_Title=Create New Namespace
+DefinitionsPropertyComposite_Invalid_Duplicate=Prefix {0} is already used for namespace\n{1}
+DefinitionsPropertyComposite_Namespace_Details_Title=Namespace Details
+DefinitionsPropertyComposite_Namespace_Label=Namespace
+DefinitionsPropertyComposite_Prefix_Label=Prefix
+DefinitionsPropertyComposite_Prefix_Message=Enter a namespace prefix
+ItemDefinitionDetailComposite_DefinedIn_Title=Defined In
+ItemDefinitionDetailComposite_Import_Label=Import
+ItemDefinitionDetailComposite_Namespace_Label=Namespace
+ItemDefinitionDetailComposite_Type_Label=Type
+ItemDefinitionDetailComposite_TypeLanguage_Label=Type Language
+ParticipantDetailComposite_Maximum_Label=Maximum
+ParticipantDetailComposite_Mimimum_Label=Minimum
+ParticipantDetailComposite_MinMax_Error=Minimum must be less than Maximum
+ParticipantDetailComposite_Multiplicity_Label=Multiplicity
+ResourceRoleListComposite_Roles_Label=Roles
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/DefaultSchemaImportDialog.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/DefaultSchemaImportDialog.java
index a6f70569..a6f70569 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/DefaultSchemaImportDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/DefaultSchemaImportDialog.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/FileSelectionGroup.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/FileSelectionGroup.java
index 239bc3dd..239bc3dd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/FileSelectionGroup.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/FileSelectionGroup.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/Messages.java
index 39b20f25..b9bc0159 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.dialogs;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/NamespacesEditingDialog.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/NamespacesEditingDialog.java
index a0895a74..a0895a74 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/NamespacesEditingDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/NamespacesEditingDialog.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaImportDialog.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaImportDialog.java
index aaaa6797..aaaa6797 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaImportDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaImportDialog.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaSelectionDialog.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaSelectionDialog.java
index 322fc420..8cbac95c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaSelectionDialog.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/SchemaSelectionDialog.java
@@ -218,7 +218,10 @@ public class SchemaSelectionDialog extends SelectionStatusDialog {
Object data = sel.getData();
if (data instanceof TreeNode) {
TreeNode tn = (TreeNode)data;
- path += "/" + tn.getLabel(); //$NON-NLS-1$
+ if (path.isEmpty())
+ path = tn.getLabel();
+ else
+ path += "/" + tn.getLabel(); //$NON-NLS-1$
}
}
else
@@ -234,17 +237,27 @@ public class SchemaSelectionDialog extends SelectionStatusDialog {
*/
@Override
protected void computeResult() {
+ // get the selection from the Data Structure tree widget
+ // which should be a single selection
TreeItem[] sel = tree.getSelection();
if (sel.length==1) {
Object data = sel[0].getData();
if (data instanceof TreeNode) {
+ // this is the selected node
TreeNode tn = (TreeNode)data;
- Object[] result = new Object[] {tn.getModelObject()};
+ // also get the selected BPMN2 Import element from the Imports list
+ int index = importList.getSelectionIndex();
+ Import imp = (Import)importList.getData(""+index); //$NON-NLS-1$
+ // this dialog's results will be two items:
+ // the data structure selection and a reference to the
+ // BPMN2 Import object where the data structure is defined
+ Object[] result = new Object[] {tn.getModelObject(), imp};
setSelectionResult(result);
setSelectionPath(sel[0]);
updateOK(true);
}
else {
+ // nothing was selected.
Object[] result = new Object[] {};
setSelectionResult(result);
updateOK(false);
@@ -288,16 +301,17 @@ public class SchemaSelectionDialog extends SelectionStatusDialog {
if (uri == null) {
return ;
}
- if (uri.isRelative())
- uri = URI.createFileURI( path );
- if (uri == null) {
- return ;
- }
- if (uri.isRelative()) {
- // construct absolute path
- String basePath = bpmn2Editor.getModelFile().getLocation().removeLastSegments(1).toString();
- uri = URI.createFileURI( basePath + "/" + path ); //$NON-NLS-1$
- }
+ // All of this is already being handled by the ResourceSet loader
+// if (uri.isRelative())
+// uri = URI.createFileURI( path );
+// if (uri == null) {
+// return ;
+// }
+// if (uri.isRelative()) {
+// // construct absolute path
+// String basePath = bpmn2Editor.getModelFile().getLocation().removeLastSegments(1).toString();
+// uri = URI.createFileURI( basePath + "/" + path ); //$NON-NLS-1$
+// }
final URI loadUri = uri;
loaderJob = new Job("") { //$NON-NLS-1$
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/ViewerFileFilter.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/ViewerFileFilter.java
index e32ae512..e32ae512 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/ViewerFileFilter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/ViewerFileFilter.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/messages.properties
index 683e3e4d..30fe2fe8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/dialogs/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
NamespacesEditingDialog_Invalid_Duplicate_Prefix=The prefix {0} is already defined.
NamespacesEditingDialog_Invalid_Empty_Namespace=Namespace can not be empty
NamespacesEditingDialog_Invalid_Empty_Prefix=Prefix can not be empty
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ItemDefinitionStructureEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ItemDefinitionStructureEditor.java
new file mode 100644
index 00000000..f73e8287
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ItemDefinitionStructureEditor.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui.property.editors;
+
+import org.eclipse.bpmn2.Bpmn2Package;
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.Import;
+import org.eclipse.bpmn2.ItemDefinition;
+import org.eclipse.bpmn2.ItemKind;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextAndButtonObjectEditor;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.validation.SyntaxCheckerUtils;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
+
+/**
+ * This class implements a Data Structure editor for ItemDefinitions.
+ * <p>
+ * The ItemDefinition which is the object of this
+ * {@link org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditor} will be
+ * populated with the structureRef.
+ */
+public class ItemDefinitionStructureEditor extends TextAndButtonObjectEditor {
+
+ Definitions definitions = null;
+ ItemDefinition itemDefinition;
+ String prefix = null;
+
+ /**
+ * @param parent
+ * @param object
+ */
+ public ItemDefinitionStructureEditor(AbstractDetailComposite parent, ItemDefinition itemDefinition) {
+ super(parent, itemDefinition, Bpmn2Package.eINSTANCE.getItemDefinition_StructureRef());
+ this.itemDefinition = itemDefinition;
+ definitions = ModelUtil.getDefinitions(itemDefinition);
+ }
+
+ @Override
+ protected void buttonClicked(int buttonId) {
+ // Default button was clicked: open a text editor and allow editing of just the
+ // data structure name part (the localpart) if the original structureRef contained
+ // a namespace prefix.
+ String text = getText();
+ int index = text.indexOf(":"); //$NON-NLS-1$
+ prefix = null;
+ if (index>0) {
+ prefix = text.substring(0,index);
+ if (SyntaxCheckerUtils.isNCName(prefix)) {
+ // this is a valid namespace prefix
+ text = text.substring(index+1);
+ }
+ else
+ prefix = null;
+ }
+ final ItemKind thisItemKind = itemDefinition.getItemKind();
+ final boolean thisIsCollection = itemDefinition.isIsCollection();
+ final Import thisImport = itemDefinition.getImport();
+
+ IInputValidator validator = new IInputValidator() {
+ @Override
+ public String isValid(String newText) {
+ if (newText==null || newText.isEmpty())
+ return Messages.ItemDefinitionStructureEditor_DataStructureEmpty_Error;
+ if (newText.contains(":") && prefix!=null) { //$NON-NLS-1$
+ return Messages.ItemDefinitionStructureEditor_DataStructureInvalid_Error;
+ }
+ String thisText = (prefix!=null) ?
+ prefix + ":" + newText : //$NON-NLS-1$
+ newText;
+ for (ItemDefinition that : ModelUtil.getAllRootElements(definitions, ItemDefinition.class)) {
+ String thatText = ModelUtil.getStringWrapperTextValue(that.getStructureRef());
+ if (
+ thisText.equals(thatText) &&
+ that.getItemKind() == thisItemKind &&
+ that.isIsCollection() == thisIsCollection &&
+ that.getImport() == thisImport
+ ) {
+ return Messages.ItemDefinitionStructureEditor_DuplicateItemDefinition_Error;
+ }
+ }
+ return null;
+ }
+ };
+
+ InputDialog dialog = new InputDialog(
+ parent.getShell(),
+ Messages.ItemDefinitionStructureEditor_EditDataStructure_Title,
+ Messages.ItemDefinitionStructureEditor_EditDataStructure_Prompt,
+ text,
+ validator);
+
+ if (dialog.open()==Window.OK){
+ text = dialog.getValue();
+ if (prefix!=null)
+ text = prefix + ":" + text; //$NON-NLS-1$
+ if (!text.equals( getText() )) {
+ setValue(text);
+ }
+ }
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/Messages.java
index 8b49f876..57aae8f5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/Messages.java
@@ -1,9 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.editors;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.property.editors.messages"; //$NON-NLS-1$
+ public static String ItemDefinitionStructureEditor_DataStructureEmpty_Error;
+ public static String ItemDefinitionStructureEditor_DataStructureInvalid_Error;
+ public static String ItemDefinitionStructureEditor_DuplicateItemDefinition_Error;
+ public static String ItemDefinitionStructureEditor_EditDataStructure_Prompt;
+ public static String ItemDefinitionStructureEditor_EditDataStructure_Title;
public static String SchemaObjectEditor_0;
public static String SchemaObjectEditor_Browse_Button;
public static String SchemaObjectEditor_Invalid_Selection_Message;
@@ -19,12 +34,10 @@ public class Messages extends NLS {
public static String ServiceImplementationObjectEditor_Create_New_Title;
public static String ServiceImplementationObjectEditor_Dialog_Cancelled;
public static String ServiceImplementationObjectEditor_Edit_Title;
- public static String ServiceImplementationObjectEditor_Implementation_Title;
+ public static String ServiceImplementationObjectEditor_Implementation_URI_Label;
+ public static String ServiceImplementationObjectEditor_Implementation_Name_Label;
public static String ServiceImplementationObjectEditor_Invalid_Duplicate;
public static String ServiceImplementationObjectEditor_Invalid_Empty;
- public static String ServiceImplementationObjectEditor_Invalid_URI;
- public static String ServiceImplementationObjectEditor_Unspecified_Label;
- public static String ServiceImplementationObjectEditor_Web_Service_Label;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/SchemaObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/SchemaObjectEditor.java
index b1a7e803..e8e47eab 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/SchemaObjectEditor.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/SchemaObjectEditor.java
@@ -16,6 +16,7 @@ package org.eclipse.bpmn2.modeler.ui.property.editors;
import javax.xml.namespace.QName;
import org.eclipse.bpmn2.Import;
+import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextAndButtonObjectEditor;
@@ -45,15 +46,18 @@ import org.eclipse.xsd.XSDSchema;
import org.eclipse.xsd.XSDTypeDefinition;
/**
- * @author Bob Brodt
- *
+ * This class implements a Schema Browser editor which consists of an editable
+ * Text field and a "Browse" button. The button allows for selection of a BPMN2
+ * Import and schema element defined in the Import. The button uses the
+ * {@link SchemaSelectionDialog} which can be used to either select an existing
+ * Import or add a new Import to the BPMN2 file.
+ * <p>
+ * The ItemDefinition which is the object of this {@link ObjectEditor} will be
+ * populated with the structureRef (the selected schema element) and the
+ * import selected in the {@link SchemaSelectionDialog}
*/
public class SchemaObjectEditor extends TextAndButtonObjectEditor {
- protected Resource resource;
- protected Import imp;
- protected Button editButton;
-
/**
* @param parent
* @param object
@@ -61,7 +65,6 @@ public class SchemaObjectEditor extends TextAndButtonObjectEditor {
*/
public SchemaObjectEditor(AbstractDetailComposite parent, EObject object, EStructuralFeature feature) {
super(parent, object, feature);
- resource = BPMN2Editor.getActiveEditor().getModelHandler().getResource();
}
/*
@@ -87,17 +90,31 @@ public class SchemaObjectEditor extends TextAndButtonObjectEditor {
*/
@Override
protected void buttonClicked(int buttonId) {
+ Object[] result = showSchemaSelectionDialog(parent, object);
+ if (result.length==2) {
+ setValue((String)result[0]);
+ if (object instanceof ItemDefinition) {
+ ((ItemDefinition)object).setImport((Import)result[1]);
+ }
+ }
+ }
+
+ public static Object[] showSchemaSelectionDialog(Composite parent, EObject object) {
+ // "Browse" button was clicked: open a {@link SchemaSelectionDialog} and
+ // get the selected schema element and Import reference.
SchemaSelectionDialog dialog = new SchemaSelectionDialog(parent.getShell(), object);
if (dialog.open() == Window.OK) {
- Object result = dialog.getResult()[0];
+ Resource resource = object.eResource();
+ Object element = dialog.getResult()[0];
+ Import importRef = (Import)dialog.getResult()[1];
String selectionPath = dialog.getSelectionPath();
String value = ""; //$NON-NLS-1$
String selectionType = ""; //$NON-NLS-1$
- // TODO: do we need these?
- if (result instanceof PortType) {
- PortType portType = (PortType)result;
+ if (element instanceof PortType) {
+ // the element is a WSDL PortType
+ PortType portType = (PortType)element;
QName qname = portType.getQName();
String prefix = NamespaceUtil.getPrefixForNamespace(resource, qname.getNamespaceURI());
if (prefix==null)
@@ -107,31 +124,37 @@ public class SchemaObjectEditor extends TextAndButtonObjectEditor {
value += qname.getLocalPart();
selectionType = Messages.SchemaObjectEditor_WSDL_Port;
}
- if (result instanceof Operation) {
+ if (element instanceof Operation) {
+ // the element is a WSDL Operation
selectionType = Messages.SchemaObjectEditor_WSDL_Operation;
}
- if (result instanceof Input) {
- Input input = (Input)result;
- result = input.getMessage();
+ if (element instanceof Input) {
+ // the element is a WSDL Input
+ Input input = (Input)element;
+ element = input.getMessage();
selectionType = Messages.SchemaObjectEditor_WSDL_Input;
}
- if (result instanceof Output) {
- Output output = (Output)result;
- result = output.getMessage();
+ if (element instanceof Output) {
+ // the element is a WSDL Output
+ Output output = (Output)element;
+ element = output.getMessage();
selectionType = Messages.SchemaObjectEditor_WSDL_Output;
}
- if (result instanceof Fault) {
- Fault fault = (Fault)result;
- result = fault.getMessage();
+ if (element instanceof Fault) {
+ // the element is a WSDL Fault
+ Fault fault = (Fault)element;
+ element = fault.getMessage();
selectionType = Messages.SchemaObjectEditor_WSDL_Fault;
}
- if (result instanceof Part) {
- Part part = (Part)result;
- result = part.getElementDeclaration();
+ if (element instanceof Part) {
+ // the element is a WSDL Message Part
+ Part part = (Part)element;
+ element = part.getElementDeclaration();
selectionType = Messages.SchemaObjectEditor_WSDL_Message_Part;
}
- if (result instanceof Message) {
- Message message = (Message)result;
+ if (element instanceof Message) {
+ // the element is a WSDL Message
+ Message message = (Message)element;
QName qname = message.getQName();
String prefix = NamespaceUtil.getPrefixForNamespace(resource, qname.getNamespaceURI());
if (prefix==null)
@@ -141,12 +164,14 @@ public class SchemaObjectEditor extends TextAndButtonObjectEditor {
value += qname.getLocalPart();
selectionType = Messages.SchemaObjectEditor_WSDL_Message;
}
- if (result instanceof XSDAttributeDeclaration) {
+ if (element instanceof XSDAttributeDeclaration) {
+ // the element is a XSD attribute
selectionType = Messages.SchemaObjectEditor_XML_Attribute;
}
- if (result instanceof XSDElementDeclaration) {
- XSDElementDeclaration decl = (XSDElementDeclaration)result;
+ if (element instanceof XSDElementDeclaration) {
+ // the element is a XSD element
+ XSDElementDeclaration decl = (XSDElementDeclaration)element;
XSDSchema schema = getContainingSchema(decl);
String ns = schema.getTargetNamespace();
if (ns==null) {
@@ -160,8 +185,9 @@ public class SchemaObjectEditor extends TextAndButtonObjectEditor {
value = prefix + ":"; //$NON-NLS-1$
value += selectionPath;
}
- if (result instanceof XSDTypeDefinition) {
- XSDTypeDefinition type = (XSDTypeDefinition)result;
+ if (element instanceof XSDTypeDefinition) {
+ // the element is a XSD type
+ XSDTypeDefinition type = (XSDTypeDefinition)element;
XSDSchema schema = getContainingSchema(type);
String ns = schema.getTargetNamespace();
String prefix = NamespaceUtil.getPrefixForNamespace(resource, ns);
@@ -169,19 +195,22 @@ public class SchemaObjectEditor extends TextAndButtonObjectEditor {
value = prefix + ":"; //$NON-NLS-1$
value += selectionPath;
}
- if (result instanceof XSDSchema) {
- XSDSchema schema = (XSDSchema)result;
+ if (element instanceof XSDSchema) {
+ // the element is a XSD schema
+ XSDSchema schema = (XSDSchema)element;
String prefix = NamespaceUtil.getPrefixForNamespace(resource, schema.getTargetNamespace());
if (prefix!=null)
value = prefix + ":"; //$NON-NLS-1$
value += "schema"; //$NON-NLS-1$
}
- if (result instanceof Process) {
- Process process = (Process)result;
+ if (element instanceof Process) {
+ // the element is a BPMN2 Process
+ Process process = (Process)element;
process.getSupportedInterfaceRefs();
}
- if (result instanceof IType) {
- value = ((IType)result).getFullyQualifiedName('.');
+ if (element instanceof IType) {
+ // the element is a Java type
+ value = ((IType)element).getFullyQualifiedName('.');
}
if (value.isEmpty()) {
MessageDialog.openWarning(parent.getShell(),
@@ -189,12 +218,14 @@ public class SchemaObjectEditor extends TextAndButtonObjectEditor {
NLS.bind(Messages.SchemaObjectEditor_Invalid_Selection_Message,selectionType)
);
}
- else
- setValue(value);
+ else {
+ return new Object[] {value, importRef};
+ }
}
+ return new Object[] {};
}
- private XSDSchema getContainingSchema(EObject object) {
+ private static XSDSchema getContainingSchema(EObject object) {
EObject container = object.eContainer();
if (container instanceof XSDSchema)
return (XSDSchema) container;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java
new file mode 100644
index 00000000..324b4116
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/ServiceImplementationObjectEditor.java
@@ -0,0 +1,267 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.property.editors;
+
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.bpmn2.Definitions;
+import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ComboObjectEditor;
+import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
+import org.eclipse.bpmn2.modeler.core.runtime.ServiceImplementationDescriptor;
+import org.eclipse.bpmn2.modeler.core.runtime.TargetRuntime;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.ui.adapters.properties.ServiceTaskPropertiesAdapter;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class ServiceImplementationObjectEditor extends ComboObjectEditor {
+
+ public static String UNSPECIFIED_VALUE = "##unspecified"; //$NON-NLS-1$
+ public static String WEBSERVICE_VALUE = "##WebService"; //$NON-NLS-1$
+
+ public ServiceImplementationObjectEditor(AbstractDetailComposite parent, EObject object, EStructuralFeature feature) {
+ super(parent, object, feature);
+ }
+
+ public ServiceImplementationObjectEditor(AbstractDetailComposite parent, EObject object, EStructuralFeature feature,
+ EClass featureEType) {
+ super(parent, object, feature, featureEType);
+ }
+
+ protected boolean canEdit() {
+ if (editButton==null)
+ return true;
+ Object value = object.eGet(feature);
+ if (value instanceof String) {
+ TargetRuntime rt = TargetRuntime.getCurrentRuntime();
+ for (ServiceImplementationDescriptor eld : rt.getServiceImplementationDescriptors()) {
+ if (value.equals(eld.getName()))
+ return false;
+ }
+ }
+ return true;
+ }
+
+ protected boolean canCreateNew() {
+ return true;
+ }
+
+ @Override
+ public boolean setValue(Object result) {
+ if (ModelUtil.isStringWrapper(result)) {
+ result = ModelUtil.getStringWrapperValue(result);
+ }
+ return super.setValue(result);
+ }
+
+ public Object getValue() {
+ Object value = object.eGet(feature);
+ if (value==null)
+ return "";
+ Hashtable<String,Object> choices = getChoiceOfValues(object, feature);
+ for (Entry<String, Object> entry : choices.entrySet()) {
+ if (entry.getValue().equals(value))
+ return entry.getKey();
+ }
+ return value.toString();
+ }
+
+ protected EObject createObject() throws Exception {
+ Hashtable<String,Object> choices = getChoiceOfValues(object, feature);
+ ImplementationEditingDialog dialog = new ImplementationEditingDialog(
+ getDiagramEditor().getEditorSite().getShell(),
+ Messages.ServiceImplementationObjectEditor_Create_New_Title,
+ choices, null, null);
+ if ( dialog.open() == Window.OK) {
+ Bpmn2Preferences prefs = (Bpmn2Preferences) getDiagramEditor().getAdapter(Bpmn2Preferences.class);
+ String newURI = dialog.getURI();
+ String newName = dialog.getName();
+ prefs.addServiceImplementation(newName, newURI);
+ return ModelUtil.createStringWrapper( newURI );
+ }
+ throw new OperationCanceledException(Messages.ServiceImplementationObjectEditor_Dialog_Cancelled);
+ }
+
+ protected EObject editObject(EObject value) throws Exception {
+ Hashtable<String,Object> choices = getChoiceOfValues(object, feature);
+ final String oldURI = ModelUtil.getStringWrapperTextValue(value);
+ final String oldName = (String)getValue();
+ ImplementationEditingDialog dialog = new ImplementationEditingDialog(
+ getDiagramEditor().getEditorSite().getShell(),
+ Messages.ServiceImplementationObjectEditor_Edit_Title,
+ choices, oldName, oldURI);
+ if ( dialog.open() == Window.OK) {
+ final String newURI = dialog.getURI();
+ final String newName = dialog.getName();
+ if (!newURI.equals(value)) {
+ final Definitions definitions = ModelUtil.getDefinitions(object);
+ if (definitions!=null) {
+ TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
+ domain.getCommandStack().execute(new RecordingCommand(domain) {
+ @Override
+ protected void doExecute() {
+ TreeIterator<EObject> iter = definitions.eAllContents();
+ while (iter.hasNext()) {
+ EObject o = iter.next();
+ EStructuralFeature f = o.eClass().getEStructuralFeature("implementation"); //$NON-NLS-1$
+ if (f!=null) {
+ String implementation = (String)o.eGet(f);
+ if (oldURI.equals(implementation)) {
+ o.eSet(f, newURI);
+ }
+ }
+ }
+ }
+ });
+ }
+
+ Bpmn2Preferences prefs = (Bpmn2Preferences) getDiagramEditor().getAdapter(Bpmn2Preferences.class);
+ prefs.removeServiceImplementation(oldName);
+ prefs.addServiceImplementation(newName, newURI);
+ return ModelUtil.createStringWrapper(newURI);
+ }
+ }
+ throw new OperationCanceledException(Messages.ServiceImplementationObjectEditor_Dialog_Cancelled);
+ }
+
+ protected Hashtable<String,Object> getChoiceOfValues(EObject object, EStructuralFeature feature) {
+ return ServiceTaskPropertiesAdapter.getChoiceOfValues(object);
+ }
+
+ public class ImplementationEditingDialog extends InputDialog {
+
+ private String nameString;
+ private Text nameText;
+
+ public ImplementationEditingDialog(Shell shell, String title, final Map<String,Object> choices, final String nameString, final String uriString) {
+ super(
+ shell,
+ title,
+ Messages.ServiceImplementationObjectEditor_Implementation_URI_Label,
+ uriString,
+ new IInputValidator() {
+
+ @Override
+ public String isValid(String newText) {
+ if (newText==null || newText.isEmpty())
+ return Messages.ServiceImplementationObjectEditor_Invalid_Empty;
+ if (newText.equals(uriString))
+ return null;
+ if (choices.containsKey(newText) || choices.containsValue(newText))
+ return NLS.bind(Messages.ServiceImplementationObjectEditor_Invalid_Duplicate,newText);
+ return null;
+ }
+ }
+ );
+ this.nameString = nameString;
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) createMyComposite(parent);
+ // create prompt
+ Label label = new Label(composite, SWT.WRAP);
+ label.setText(Messages.ServiceImplementationObjectEditor_Implementation_Name_Label);
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ label.setLayoutData(data);
+ label.setFont(parent.getFont());
+
+ // create the Implementation Name input nameText
+ nameText = new Text(composite, getInputTextStyle());
+ nameText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL));
+ nameText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ validateInput();
+ }
+ });
+ return super.createDialogArea(parent);
+ }
+
+ private Composite createMyComposite(Composite parent) {
+ // create a composite with standard margins and spacing
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+ applyDialogFont(composite);
+ return composite;
+ }
+
+ @Override
+ protected void validateInput() {
+ String errorMessage = getValidator().isValid(nameText.getText());
+ if (errorMessage==null)
+ super.validateInput();
+ else
+ setErrorMessage(errorMessage);
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ super.createButtonsForButtonBar(parent);
+ nameText.setFocus();
+ if (nameString != null) {
+ nameText.setText(nameString);
+ nameText.selectAll();
+ }
+ validateInput();
+ }
+
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ nameString = nameText.getText();
+ } else {
+ nameString = null;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ public String getName() {
+ return nameString;
+ }
+
+ public String getURI() {
+ return super.getValue();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties
new file mode 100644
index 00000000..ab844a95
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/editors/messages.properties
@@ -0,0 +1,34 @@
+ItemDefinitionStructureEditor_DataStructureInvalid_Error=Data structure name may not contain ':'
+ItemDefinitionStructureEditor_DuplicateItemDefinition_Error=An Item Definition with this data structure name already exists
+ItemDefinitionStructureEditor_EditDataStructure_Prompt=Enter data structure name:
+ItemDefinitionStructureEditor_EditDataStructure_Title=Edit Structure
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+ItemDefinitionStructureEditor_DataStructureEmpty_Error=Data structure may not be empty
+SchemaObjectEditor_0=\ is not a valid type definition.
+SchemaObjectEditor_Browse_Button=Browse...
+SchemaObjectEditor_Invalid_Selection_Message=The selection {0} is not a valid type definition.
+SchemaObjectEditor_Invalid_Selection_Title=Invalid Selection
+SchemaObjectEditor_WSDL_Fault=WSDL Fault
+SchemaObjectEditor_WSDL_Input=WSDL Input
+SchemaObjectEditor_WSDL_Message=WSDL Message
+SchemaObjectEditor_WSDL_Message_Part=WSDL Message Part
+SchemaObjectEditor_WSDL_Operation=WSDL Operation
+SchemaObjectEditor_WSDL_Output=WSDL Output
+SchemaObjectEditor_WSDL_Port=WSDL Port Type
+SchemaObjectEditor_XML_Attribute=XML Attribute
+ServiceImplementationObjectEditor_Create_New_Title=Create New Service Implementation
+ServiceImplementationObjectEditor_Dialog_Cancelled=Dialog Cancelled
+ServiceImplementationObjectEditor_Edit_Title=Edit Service Implementation
+ServiceImplementationObjectEditor_Implementation_Name_Label=Name
+ServiceImplementationObjectEditor_Implementation_URI_Label=URI
+ServiceImplementationObjectEditor_Invalid_Duplicate=The Implementation {0} is already defined.
+ServiceImplementationObjectEditor_Invalid_Empty=Implementation Name and URI can not be empty
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventDetailComposite.java
index 65ad7da8..65ad7da8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventPropertySection.java
index 0004c683..4c0759fe 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/BoundaryEventPropertySection.java
@@ -35,7 +35,7 @@ public class BoundaryEventPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof BoundaryEvent)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CatchEventDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CatchEventDetailComposite.java
index 53b84b08..53b84b08 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CatchEventDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CatchEventDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventDetailComposite.java
index 58cf64df..1c5e23d4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventDetailComposite.java
@@ -19,10 +19,16 @@ import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.CompensateEventDefinition;
+import org.eclipse.bpmn2.ConditionalEventDefinition;
import org.eclipse.bpmn2.ErrorEventDefinition;
+import org.eclipse.bpmn2.EscalationEventDefinition;
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.EventDefinition;
+import org.eclipse.bpmn2.MessageEventDefinition;
+import org.eclipse.bpmn2.StartEvent;
+import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
@@ -92,7 +98,7 @@ public class CommonEventDetailComposite extends DefaultDetailComposite {
final BoundaryEvent be = (BoundaryEvent) object;
if (label==null)
- label = getPropertiesProvider().getLabel(be, attribute);
+ label = getBusinessObjectDelegate().getLabel(be, attribute);
final ObjectEditor editor = new BooleanObjectEditor(this,be,attribute) {
protected boolean setValue(final Object result) {
@@ -133,6 +139,37 @@ public class CommonEventDetailComposite extends DefaultDetailComposite {
editor.createControl(getAttributesParent(),label);
}
+ else if (object instanceof StartEvent) {
+ /*
+ * OK, this is nuts! According to the BPMN2 spec, a collapsed
+ * Event SubProcess (i.e. one whose isTriggeredByEvent attribute
+ * is set) must display an image decorator at the top-left
+ * corner (similar to decorated Task figures) that illustrates
+ * the event type of the one-and-only StartEvent contained in
+ * the SubProcess. This means the StartEvent's isInterrupting
+ * attribute must be settable, so we need to make sure we don't
+ * hide these attributes.
+ */
+ boolean hide = true;
+ if (object.eContainer() instanceof SubProcess) {
+ SubProcess subProcess = (SubProcess) object.eContainer();
+ if (subProcess.isTriggeredByEvent()) {
+ hide = false;
+ }
+ }
+ if (hide) {
+ for (EventDefinition ed : ((StartEvent)object).getEventDefinitions()) {
+ if (ed instanceof MessageEventDefinition ||
+ ed instanceof TimerEventDefinition ||
+ ed instanceof EscalationEventDefinition ||
+ ed instanceof ConditionalEventDefinition ||
+ ed instanceof ErrorEventDefinition) {
+ return;
+ }
+ }
+ }
+ super.bindAttribute(parent, object, attribute, label);
+ }
else
super.bindAttribute(parent, object, attribute, label);
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java
index c9a63de8..b7a685d3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/CommonEventPropertySection.java
@@ -39,7 +39,7 @@ public class CommonEventPropertySection extends DefaultPropertySection implement
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof Event)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionDetailComposite.java
index 05d0b9b8..24afabf2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionDetailComposite.java
@@ -17,7 +17,6 @@ import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
import org.eclipse.bpmn2.modeler.ui.property.data.ExpressionDetailComposite;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.widgets.Composite;
@@ -38,6 +37,9 @@ public class ConditionalEventDefinitionDetailComposite extends ExpressionDetailC
@Override
public void setBusinessObject(EObject object) {
if (object instanceof ConditionalEventDefinition) {
+ getDiagramEditor();
+ addDomainListener();
+
ConditionalEventDefinition ced = (ConditionalEventDefinition)object;
if (ced.getCondition()==null) {
object = createModelObject(FormalExpression.class);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java
index 7145600e..bd9e689a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ConditionalEventDefinitionPropertySection.java
@@ -36,7 +36,7 @@ public class ConditionalEventDefinitionPropertySection extends DefaultPropertySe
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof EventDefinition)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataInputsListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataInputsListComposite.java
index d9b01da0..d9b01da0 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataInputsListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataInputsListComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataOutputsListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataOutputsListComposite.java
index 4c328c92..4c328c92 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataOutputsListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/DataOutputsListComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EndEventDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EndEventDetailComposite.java
index 04e44a41..04e44a41 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EndEventDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EndEventDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java
index fb2142fd..dbbbdbea 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/EventDefinitionsListComposite.java
@@ -42,6 +42,7 @@ import org.eclipse.bpmn2.SignalEventDefinition;
import org.eclipse.bpmn2.TerminateEventDefinition;
import org.eclipse.bpmn2.ThrowEvent;
import org.eclipse.bpmn2.TimerEventDefinition;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultListComposite;
@@ -60,11 +61,18 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.graphiti.features.IFeatureProvider;
+import org.eclipse.graphiti.features.context.impl.AddContext;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
public class EventDefinitionsListComposite extends DefaultListComposite {
@@ -83,7 +91,7 @@ public class EventDefinitionsListComposite extends DefaultListComposite {
}
@Override
- protected EObject addListItem(EObject object, EStructuralFeature feature) {
+ protected EObject addListItem(final EObject object, EStructuralFeature feature) {
EObject newItem = super.addListItem(object, feature);
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=417207
// the Cancel Activity checkbox should always be TRUE
@@ -106,11 +114,29 @@ public class EventDefinitionsListComposite extends DefaultListComposite {
param.getFirst().setId(null);
ModelUtil.setID(param.getFirst(), object.eResource());
}
+
+// Diagram diagram = getDiagramEditor().getDiagramTypeProvider().getDiagram();
+// IFeatureProvider fp = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();
+// PictogramElement pe = Graphiti.getLinkService().getPictogramElements(diagram, object).get(0);
+// AddContext context = new AddContext();
+// context.setTargetContainer((ContainerShape) pe);
+// context.setNewObject(newItem);
+// fp.addIfPossible(context);
+
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (getPropertySection()!=null)
+ getPropertySection().getSectionRoot().setBusinessObject(object);
+ }
+
+ });
return newItem;
}
@Override
- protected Object removeListItem(EObject object, EStructuralFeature feature, int index) {
+ protected Object removeListItem(final EObject object, EStructuralFeature feature, int index) {
Object oldItem = getListItem(object,feature,index);
if (hasItemDefinition((EventDefinition)oldItem)) {
// remove this DataInput or DataOutput
@@ -130,6 +156,15 @@ public class EventDefinitionsListComposite extends DefaultListComposite {
((AbstractDetailComposite)getParent()).refresh();
}
}
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (getPropertySection()!=null)
+ getPropertySection().getSectionRoot().setBusinessObject(object);
+ }
+
+ });
return newItem;
}
@@ -219,7 +254,7 @@ public class EventDefinitionsListComposite extends DefaultListComposite {
}
if (element instanceof ConditionalEventDefinition) {
if (((ConditionalEventDefinition)element).getCondition()!=null)
- return ModelUtil.getDisplayName(((ConditionalEventDefinition)element).getCondition());
+ return ExtendedPropertiesProvider.getTextValue(((ConditionalEventDefinition)element).getCondition());
}
if (element instanceof ErrorEventDefinition) {
if (((ErrorEventDefinition)element).getErrorRef()!=null)
@@ -268,7 +303,7 @@ public class EventDefinitionsListComposite extends DefaultListComposite {
@Override
protected void filterList(List<EClass> items) {
List<EClass> filteredItems = new ArrayList<EClass>();
- List<EClass> allowedItems = FeatureSupport.getAllowedEventDefinitions(event);
+ List<EClass> allowedItems = FeatureSupport.getAllowedEventDefinitions(event, null);
for (EClass eclass : items) {
if (allowedItems.contains(eclass))
filteredItems.add(eclass);
@@ -431,6 +466,12 @@ public class EventDefinitionsListComposite extends DefaultListComposite {
}
public AbstractDetailComposite createDetailComposite(Class eClass, Composite parent, int style) {
+ if (eClass==TimerEventDefinition.class) {
+ return new TimerEventDefinitionDetailComposite(parent, style);
+ }
+ if (eClass==ConditionalEventDefinition.class){
+ return new ConditionalEventDefinitionDetailComposite(parent, style);
+ }
return new EventDefinitionsDetailComposite(parent, (Event)getBusinessObject());
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/Messages.java
index 461360fb..0f6a480b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.events;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/StartEventDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/StartEventDetailComposite.java
index 238f0e85..238f0e85 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/StartEventDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/StartEventDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ThrowEventDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ThrowEventDetailComposite.java
index 846abc60..846abc60 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ThrowEventDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/ThrowEventDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionDetailComposite.java
index 547ee105..547ee105 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java
index dcbd3535..a218a586 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/TimerEventDefinitionPropertySection.java
@@ -34,9 +34,9 @@ public class TimerEventDefinitionPropertySection extends DefaultPropertySection
public AbstractDetailComposite createSectionRoot(Composite parent, int style) {
return new TimerEventDefinitionDetailComposite(parent,style);
}
-
+
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof EventDefinition)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/messages.properties
index 55b0b5ef..935d7e9c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/events/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
CommonEventDetailComposite_Attached_To_Label=Attached To
CommonEventDetailComposite_Event_Definition_Title=Event Definitions
CommonEventDetailComposite_Input_Parameters_Title=Input Parameters
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayDetailComposite.java
index 4a022b9c..382eee91 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayDetailComposite.java
@@ -20,6 +20,7 @@ import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.Gateway;
import org.eclipse.bpmn2.ParallelGateway;
import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractPropertiesProvider;
@@ -28,7 +29,6 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultListComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeColumnProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.ListCompositeContentProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.TableColumn;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
@@ -248,13 +248,13 @@ public class GatewayDetailComposite extends DefaultDetailComposite {
case 1:
text = flow.getName();
if (text==null || text.isEmpty()) {
- text = ModelUtil.getDisplayName(flow.getSourceRef());
+ text = ExtendedPropertiesProvider.getTextValue(flow.getSourceRef());
text += " -> "; //$NON-NLS-1$
- text += ModelUtil.getDisplayName(flow.getTargetRef());
+ text += ExtendedPropertiesProvider.getTextValue(flow.getTargetRef());
}
break;
case 2:
- text = ModelUtil.getDisplayName(flow.getConditionExpression());
+ text = ExtendedPropertiesProvider.getTextValue(flow.getConditionExpression());
if (text==null)
text = ""; //$NON-NLS-1$
break;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayPropertySection.java
index 426a5c06..13901d59 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/GatewayPropertySection.java
@@ -36,7 +36,7 @@ public class GatewayPropertySection extends DefaultPropertySection implements IT
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof Gateway)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/Messages.java
index a9b7f2e9..ad85fc35 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.gateways;
import org.eclipse.osgi.util.NLS;
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties
new file mode 100644
index 00000000..4b114f58
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/gateways/messages.properties
@@ -0,0 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+GatewayDetailComposite_Condition_Header=Condition
+GatewayDetailComposite_Is_Default_Header=Is Default
+GatewayDetailComposite_Sequence_Flow_Header=Sequence Flow
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties
new file mode 100644
index 00000000..43f55fe9
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/messages.properties
@@ -0,0 +1,16 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+AdvancedDetailComposite_Add_Action=Add
+AdvancedDetailComposite_Advanced_Button=Show advanced details
+AdvancedDetailComposite_Details_Title=\ Details
+AdvancedDetailComposite_Properties_Title=Properties
+AdvancedDetailComposite_Remove_Action=Remove
+DescriptionPropertySection_Appearance_Label=Appearance
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/AbstractContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/AbstractContentProvider.java
index cb1b5a8f..cb1b5a8f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/AbstractContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/AbstractContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2DefinitionsTreeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2DefinitionsTreeContentProvider.java
index 8b5cb529..8b5cb529 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2DefinitionsTreeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2DefinitionsTreeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ErrorTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ErrorTreeNode.java
index 8ac99330..a0c81fff 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ErrorTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ErrorTreeNode.java
@@ -12,9 +12,9 @@ package org.eclipse.bpmn2.modeler.ui.property.providers;
import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.Error;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.IConstants;
+import org.eclipse.bpmn2.modeler.ui.adapters.properties.ItemDefinitionPropertiesAdapter;
import org.eclipse.swt.graphics.Image;
@@ -35,7 +35,7 @@ public class BPMN2ErrorTreeNode extends TreeNode {
ItemDefinition itemDef = error.getStructureRef();
if (itemDef==null || itemDef.getStructureRef()==null)
return null;
- return ModelUtil.getStringWrapperValue(itemDef.getStructureRef());
+ return ItemDefinitionPropertiesAdapter.getDisplayName(itemDef);
}
@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceContentProvider.java
index 87bbaf52..87bbaf52 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceTreeNode.java
index 0bad9441..0bad9441 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2InterfaceTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2MessageTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2MessageTreeNode.java
index cef76935..cef76935 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2MessageTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2MessageTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2OperationTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2OperationTreeNode.java
index e073eddd..e073eddd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2OperationTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2OperationTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessContentProvider.java
index 03bb7124..03bb7124 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessTreeNode.java
index 250fd793..250fd793 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/BPMN2ProcessTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CachedTreeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CachedTreeContentProvider.java
index b282b15b..b282b15b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CachedTreeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CachedTreeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CompositeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CompositeContentProvider.java
index 4f2c647c..4f2c647c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CompositeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/CompositeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ITreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ITreeNode.java
index 84446c21..84446c21 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ITreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ITreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberContentProvider.java
index 648725e9..648725e9 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberTreeNode.java
index e897525b..e897525b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaMemberTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTreeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTreeContentProvider.java
index be5c6a60..f26abd3d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTreeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTreeContentProvider.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.providers;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import org.eclipse.bpmn2.modeler.ui.util.ListMap;
@@ -56,6 +59,24 @@ public class JavaTreeContentProvider extends ModelTreeContentProvider {
return (r == null ? ListMap.IGNORE : r );
}
};
+ Arrays.sort(elements, new Comparator<Object>() {
+
+ @Override
+ public int compare(Object arg0, Object arg1) {
+ if (arg0 instanceof IType) {
+ IType t0 = (IType)arg0;
+ IType t1 = (IType)arg1;
+ return t0.getElementName().compareTo(t1.getElementName());
+ }
+ else if (arg0 instanceof IMember) {
+ IMember m0 = (IMember)arg0;
+ IMember m1 = (IMember)arg1;
+ return m0.getElementName().compareTo(m1.getElementName());
+ }
+ return 0;
+ }
+
+ });
return (Object[]) ListMap.Map(elements, visitor, EMPTY_ARRAY);
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeContentProvider.java
index c4a208bf..fb4a8795 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeContentProvider.java
@@ -16,6 +16,7 @@ package org.eclipse.bpmn2.modeler.ui.property.providers;
import java.util.List;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
/**
* @author Bob Brodt
@@ -28,7 +29,6 @@ public class JavaTypeContentProvider extends AbstractContentProvider {
public void collectElements(Object input, List list) {
if (input instanceof IType) {
list.add(input);
- return;
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeTreeNode.java
index 8372946b..2f61f215 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/JavaTypeTreeNode.java
@@ -22,6 +22,7 @@ import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.swt.graphics.Image;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/MessageTypeTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/MessageTypeTreeNode.java
index d9183e1f..d9183e1f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/MessageTypeTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/MessageTypeTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/Messages.java
index 25dc14fc..d8c199f4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.providers;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelLabelProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelLabelProvider.java
index 8645d8bb..8645d8bb 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelLabelProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelLabelProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeContentProvider.java
index ec3c2381..ec3c2381 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeLabelProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeLabelProvider.java
index 813f43f4..813f43f4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeLabelProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ModelTreeLabelProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/OperationTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/OperationTreeNode.java
index adcd96d2..adcd96d2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/OperationTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/OperationTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PartTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PartTreeNode.java
index 62c774e4..62c774e4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PartTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PartTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortContentProvider.java
index 92ecd28a..92ecd28a 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeContentProvider.java
index 9194c852..9194c852 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeTreeNode.java
index 27185516..27185516 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/PortTypeTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceContentProvider.java
index aabbe3f2..aabbe3f2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceTreeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceTreeContentProvider.java
index 9afec3a3..9afec3a3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceTreeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/ServiceTreeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/TreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/TreeNode.java
index da40055c..da40055c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/TreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/TreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/VariableTypeTreeContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/VariableTypeTreeContentProvider.java
index cdafca47..cdafca47 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/VariableTypeTreeContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/VariableTypeTreeContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDAttributeDeclarationTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDAttributeDeclarationTreeNode.java
index fcbaf3bb..fcbaf3bb 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDAttributeDeclarationTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDAttributeDeclarationTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDElementDeclarationTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDElementDeclarationTreeNode.java
index 328e8cb4..328e8cb4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDElementDeclarationTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDElementDeclarationTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDSchemaTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDSchemaTreeNode.java
index 23742571..23742571 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDSchemaTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDSchemaTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTreeNode.java
index 03510909..03510909 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTreeNode.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTypeDefinitionTreeNode.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTypeDefinitionTreeNode.java
index e58c3a3b..e58c3a3b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTypeDefinitionTreeNode.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/XSDTypeDefinitionTreeNode.java
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties
new file mode 100644
index 00000000..a2b53f4c
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/providers/messages.properties
@@ -0,0 +1,16 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+BPMN2ErrorTreeNode_Unnamed=Unnamed Error
+BPMN2InterfaceTreeNode_Unnamed=Unnamed Interface
+BPMN2MessageTreeNode_Unnamed=Unnamed Message
+BPMN2OperationTreeNode_Unnamed=Unnamed Operation
+BPMN2ProcessTreeNode_Unnamed=Unnamed Process
+ModelLabelProvider_Unknown=Unknown
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java
index 285aee32..cfac7157 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java
@@ -240,7 +240,7 @@ public class ActivityDetailComposite extends DefaultDetailComposite {
else if ("calledElementRef".equals(reference.getName())) { //$NON-NLS-1$
// Handle CallActivity.calledElementRef
//
- String displayName = getPropertiesProvider().getLabel(object, reference);
+ String displayName = getBusinessObjectDelegate().getLabel(object, reference);
ObjectEditor editor = new ComboObjectEditor(this,object,reference) {
// handle creation of new target elements here:
protected EObject createObject() throws Exception {
@@ -262,7 +262,7 @@ public class ActivityDetailComposite extends DefaultDetailComposite {
// but a CallChoreography is a ChoreographyActivity, not a subclass of Activity.
// See the "static" initializers section of BPMN2Editor.
// For now, this will have to do...
- String displayName = getPropertiesProvider().getLabel(object, reference);
+ String displayName = getBusinessObjectDelegate().getLabel(object, reference);
ObjectEditor editor = new ComboObjectEditor(this,object,reference) {
// handle creation of new target elements here:
protected EObject createObject() throws Exception {
@@ -282,7 +282,7 @@ public class ActivityDetailComposite extends DefaultDetailComposite {
// but a CallConversation is a ChoreographyNode, not a subclass of Activity.
// See the "static" initializers section of BPMN2Editor.
// For now, this will have to do...
- String displayName = getPropertiesProvider().getLabel(object, reference);
+ String displayName = getBusinessObjectDelegate().getLabel(object, reference);
ObjectEditor editor = new ComboObjectEditor(this,object,reference) {
// handle creation of new target elements here:
protected EObject createObject() throws Exception {
@@ -301,6 +301,9 @@ public class ActivityDetailComposite extends DefaultDetailComposite {
else if ("messageRef".equals(reference.getName())) { //$NON-NLS-1$
return; // already done
}
+ else if ("completionCondition".equals(reference.getName())) { //$NON-NLS-1$
+ super.bindReference(parent, object, reference);
+ }
else
super.bindReference(parent, object, reference);
@@ -308,7 +311,7 @@ public class ActivityDetailComposite extends DefaultDetailComposite {
}
private void bindOperationMessageRef(final Composite container, final Activity activity, final EReference operationRef, final EReference messageRef) {
- final String operationLabel = getPropertiesProvider().getLabel(activity, operationRef);
+ final String operationLabel = getBusinessObjectDelegate().getLabel(activity, operationRef);
final ObjectEditor operationEditor = new ComboObjectEditor(this,activity,operationRef) {
@Override
protected boolean setValue(final Object result) {
@@ -353,7 +356,7 @@ public class ActivityDetailComposite extends DefaultDetailComposite {
operationEditor.createControl(container,operationLabel);
if (messageRef!=null) {
- final String messageLabel = getPropertiesProvider().getLabel(activity, messageRef);
+ final String messageLabel = getBusinessObjectDelegate().getLabel(activity, messageRef);
final ObjectEditor messageEditor = new ComboObjectEditor(this,activity,messageRef) {
@Override
protected boolean setValue(final Object result) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityInputDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityInputDetailComposite.java
index 1dd5a080..1dd5a080 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityInputDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityInputDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityOutputDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityOutputDetailComposite.java
index cfe585b4..cfe585b4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityOutputDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityOutputDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityPropertySection.java
index 60f89654..60f89654 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityPropertySection.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java
index 50db6d59..591394a4 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java
@@ -29,6 +29,7 @@ import org.eclipse.bpmn2.InputOutputSpecification;
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
@@ -705,7 +706,7 @@ public class DataAssociationDetailComposite extends ItemAwareElementDetailCompos
@Override
protected void bindReference(Composite parent, EObject object, EReference reference) {
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
ObjectEditor editor = new ComboObjectEditor(this,object,reference);
editor.createControl(parent,displayName);
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterMappingColumn.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterMappingColumn.java
index ab390861..8c002b9b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterMappingColumn.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterMappingColumn.java
@@ -24,8 +24,8 @@ import org.eclipse.bpmn2.DataOutputAssociation;
import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.ThrowEvent;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.TableColumn;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.jface.viewers.CellEditor;
@@ -46,7 +46,7 @@ public class IoParameterMappingColumn extends TableColumn {
if (headerText!=null)
return headerText;
- return ModelUtil.getLabel(
+ return ExtendedPropertiesProvider.getLabel(
Bpmn2Package.eINSTANCE.getDataAssociation(),
feature.getName().startsWith("dataInput") ? //$NON-NLS-1$
Bpmn2Package.eINSTANCE.getDataAssociation_SourceRef() :
@@ -62,16 +62,16 @@ public class IoParameterMappingColumn extends TableColumn {
if (da!=null) {
ItemAwareElement target = getTargetElement(da);
if (target!=null)
- text = ModelUtil.getDisplayName(target);
+ text = ExtendedPropertiesProvider.getTextValue(target);
else {
if (da.getTransformation()!=null) {
- text = Messages.IoParameterMappingColumn_Transform_Prefix + ModelUtil.getDisplayName(da.getTransformation());
+ text = Messages.IoParameterMappingColumn_Transform_Prefix + ExtendedPropertiesProvider.getTextValue(da.getTransformation());
}
if (!da.getAssignment().isEmpty()) {
String text2 = null;
for ( Assignment assign : da.getAssignment()) {
FormalExpression expr = getTargetExpression(da, assign);
- String body = ModelUtil.getDisplayName(expr);
+ String body = ExtendedPropertiesProvider.getTextValue(expr);
if (text2==null)
text2 = "\"" + body + "\""; //$NON-NLS-1$ //$NON-NLS-2$
else
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterNameColumn.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterNameColumn.java
index ab9e68d2..ab9e68d2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterNameColumn.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParameterNameColumn.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersDetailComposite.java
index 4e7def58..4e7def58 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersListComposite.java
index b2b804bd..b2b804bd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersListComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java
index 0a9eb9ec..f22e5fce 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoParametersPropertySection.java
@@ -12,6 +12,7 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.tasks;
+import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.SubProcess;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
@@ -38,6 +39,9 @@ public class IoParametersPropertySection extends DefaultPropertySection {
@Override
public boolean appliesTo(IWorkbenchPart part, ISelection selection) {
+ if (!isModelObjectEnabled(Bpmn2Package.eINSTANCE.getInputOutputSpecification()))
+ return false;
+
if (super.appliesTo(part, selection)) {
EObject object = getBusinessObjectForSelection(selection);
// if (object instanceof ServiceTask) {
@@ -50,7 +54,7 @@ public class IoParametersPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof SubProcess) {
// Section 10, P211 of the BPMN 2.0 spec:
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetNameColumn.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetNameColumn.java
index 0a4680a8..0a4680a8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetNameColumn.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetNameColumn.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetsListComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetsListComposite.java
index c01aa20c..9a6c70e1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetsListComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/IoSetsListComposite.java
@@ -25,6 +25,7 @@ import org.eclipse.bpmn2.InputSet;
import org.eclipse.bpmn2.OutputSet;
import org.eclipse.bpmn2.ReceiveTask;
import org.eclipse.bpmn2.SendTask;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultDetailComposite;
@@ -34,7 +35,6 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.PropertiesCompositeFactory;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.TableColumn;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.RefListEditingDialog;
import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.TextAndButtonObjectEditor;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
@@ -208,7 +208,7 @@ public class IoSetsListComposite extends DefaultListComposite {
public void create(String featureName) {
this.feature = object.eClass().getEStructuralFeature(featureName);
- String label = ModelUtil.getLabel(object,feature);
+ String label = ExtendedPropertiesProvider.getLabel(object,feature);
label = label.replace(" Ref", ""); //$NON-NLS-1$ //$NON-NLS-2$
super.createControl(parent, label, style | SWT.MULTI);
}
@@ -237,7 +237,7 @@ public class IoSetsListComposite extends DefaultListComposite {
String text = null;
List<EObject> list = (List<EObject>)object.eGet(feature);
for (EObject item : list) {
- String name = ModelUtil.getDisplayName(item);
+ String name = ExtendedPropertiesProvider.getTextValue(item);
if (text==null)
text = name;
else
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskDetailComposite.java
index 7daf3937..7daf3937 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskPropertySection.java
index e261df68..370dc12b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ManualTaskPropertySection.java
@@ -36,7 +36,7 @@ public class ManualTaskPropertySection extends DefaultPropertySection implements
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof ManualTask)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/Messages.java
index 4291eb51..6f809af7 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.property.tasks;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java
index 279bdbdd..cd5fa620 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/MultiInstanceLoopCharacteristicsDetailComposite.java
@@ -16,6 +16,7 @@ import org.eclipse.bpmn2.FormalExpression;
import org.eclipse.bpmn2.ItemAwareElement;
import org.eclipse.bpmn2.MultiInstanceBehavior;
import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractDetailComposite;
@@ -159,12 +160,13 @@ public class MultiInstanceLoopCharacteristicsDetailComposite extends DefaultDeta
isSequentialEditor = new BooleanObjectEditor(this, getBO(), PACKAGE.getMultiInstanceLoopCharacteristics_IsSequential()) {
protected boolean setValue(final Object result) {
- if (!object.eGet(feature).equals(result)) {
+ Object oldValue = getBusinessObjectDelegate().getValue(object, feature);
+ if (oldValue!=result && !oldValue.equals(result)) {
TransactionalEditingDomain editingDomain = getDiagramEditor().getEditingDomain();
editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
@Override
protected void doExecute() {
- object.eSet(feature, button.getSelection());
+ getBusinessObjectDelegate().setValue(object, feature, button.getSelection());
// This little bit of java jimnastics is needed to update the multi-instance marker on the activity.
// Because Graphiti's Resource change listener will only invoke an Update Feature on Pictogram Elements
// that are linked to business model objects; a change to the "is sequential" boolean attribute in the
@@ -684,7 +686,7 @@ public class MultiInstanceLoopCharacteristicsDetailComposite extends DefaultDeta
}
else if (reference == PACKAGE.getMultiInstanceLoopCharacteristics_NoneBehaviorEventRef()) {
if (isModelObjectEnabled(lc.eClass(), reference)) {
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
noneBehaviorEventEditor = new ComboObjectEditor(this,object,reference);
noneBehaviorEventEditor.setStyle(SWT.READ_ONLY);
noneBehaviorEventEditor.createControl(parent,displayName);
@@ -693,7 +695,7 @@ public class MultiInstanceLoopCharacteristicsDetailComposite extends DefaultDeta
}
else if (reference == PACKAGE.getMultiInstanceLoopCharacteristics_OneBehaviorEventRef()) {
if (isModelObjectEnabled(lc.eClass(), reference)) {
- String displayName = ModelUtil.getLabel(object, reference);
+ String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
oneBehaviorEventEditor = new ComboObjectEditor(this,object,reference);
oneBehaviorEventEditor.setStyle(SWT.READ_ONLY);
oneBehaviorEventEditor.createControl(parent,displayName);
@@ -782,7 +784,7 @@ public class MultiInstanceLoopCharacteristicsDetailComposite extends DefaultDeta
String newText = ""; //$NON-NLS-1$
if (item!=null) {
String name = ModelUtil.getName(item);
- String type = ModelUtil.getDisplayName(item.getItemSubjectRef());
+ String type = ExtendedPropertiesProvider.getTextValue(item.getItemSubjectRef());
if (name!=null)
newText = name;
if (type!=null)
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskDetailComposite.java
index de3ba3bf..de3ba3bf 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskPropertySection.java
index 497921de..90b16cfa 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ScriptTaskPropertySection.java
@@ -36,7 +36,7 @@ public class ScriptTaskPropertySection extends DefaultPropertySection implements
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
if (be instanceof ScriptTask)
return be;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/StandardLoopCharacteristicsDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/StandardLoopCharacteristicsDetailComposite.java
index 0255899d..0255899d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/StandardLoopCharacteristicsDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/StandardLoopCharacteristicsDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskDetailComposite.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskDetailComposite.java
index 56d91282..56d91282 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskDetailComposite.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskDetailComposite.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskPropertySection.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskPropertySection.java
index 6dd5eaba..78a92c6b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskPropertySection.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/TaskPropertySection.java
@@ -18,13 +18,14 @@ import org.eclipse.bpmn2.modeler.core.merrimac.clad.DefaultPropertySection;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
public class TaskPropertySection extends DefaultPropertySection {
public TaskPropertySection() {
super();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertySection#createSectionRoot()
*/
@@ -39,9 +40,16 @@ public class TaskPropertySection extends DefaultPropertySection {
}
@Override
- protected EObject getBusinessObjectForSelection(ISelection selection) {
+ public boolean appliesTo(EObject eObj) {
+ if (super.appliesTo(eObj))
+ return eObj!=null && eObj.eClass().getName().equals("Task");
+ return false;
+ }
+
+ @Override
+ public EObject getBusinessObjectForSelection(ISelection selection) {
EObject be = super.getBusinessObjectForSelection(selection);
- if (be instanceof Task)
+ if (be!=null && be.eClass().getName().equals("Task"))
return be;
return null;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/messages.properties
index ba19b4d8..7dbc7871 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
ActivityDetailComposite_Loop_Characteristics_Label=Loop Characteristics:
ActivityDetailComposite_Map_Incoming_Message=Map Incoming Message Data To:
ActivityDetailComposite_Map_Outgoing_Message=Map Outgoing Message Data From:
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/ListMap.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/ListMap.java
index e28b7bda..e28b7bda 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/ListMap.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/ListMap.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/PropertyUtil.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/PropertyUtil.java
index d0ea044b..d0ea044b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/PropertyUtil.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/PropertyUtil.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/XSDUtils.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/XSDUtils.java
index 93642cd8..93642cd8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/XSDUtils.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/util/XSDUtils.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BPMN2ModelView.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BPMN2ModelView.java
index b7f356a8..b7f356a8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BPMN2ModelView.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BPMN2ModelView.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BpmnModelViewerSelectionListener.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BpmnModelViewerSelectionListener.java
index 1163ab69..4069b5b3 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BpmnModelViewerSelectionListener.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/BpmnModelViewerSelectionListener.java
@@ -12,11 +12,7 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.views;
-import java.io.IOException;
-
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
-import org.eclipse.bpmn2.modeler.core.ModelHandlerLocator;
-import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
+import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
@@ -25,7 +21,6 @@ import org.eclipse.ui.IWorkbenchPart;
class BpmnModelViewerSelectionListener implements ISelectionListener {
private final ViewContentProvider contentProvider;
- private BPMN2Editor editor;
private final TreeViewer viewer;
public BpmnModelViewerSelectionListener(TreeViewer viewer) {
@@ -36,17 +31,10 @@ class BpmnModelViewerSelectionListener implements ISelectionListener {
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- Object bpmn2Editor = part.getAdapter(BPMN2Editor.class);
- if (bpmn2Editor instanceof BPMN2Editor) {
- editor = (BPMN2Editor)bpmn2Editor;
- try {
- ModelHandler modelHandler = ModelHandlerLocator.getModelHandler(editor.getDiagramTypeProvider()
- .getDiagram().eResource());
- contentProvider.updateModel(modelHandler);
- viewer.refresh(true);
- } catch (IOException e) {
- e.printStackTrace();
- }
+ DiagramEditor editor = (DiagramEditor)part.getAdapter(DiagramEditor.class);
+ if (editor!=null) {
+ contentProvider.updateModel(editor);
+ viewer.refresh(true);
}
Object[] selected = contentProvider.getSelected(selection);
if (selected != null) {
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java
new file mode 100644
index 00000000..020c6493
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/Messages.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.views;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.ui.views.messages"; //$NON-NLS-1$
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeObject.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeObject.java
index 8171cd11..8171cd11 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeObject.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeObject.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeParent.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeParent.java
index dd0c8631..dd0c8631 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeParent.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/TreeParent.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewContentProvider.java
index 2cd14ffc..b49e5d39 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewContentProvider.java
@@ -23,10 +23,12 @@ import org.eclipse.bpmn2.LaneSet;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.SequenceFlow;
-import org.eclipse.bpmn2.modeler.core.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.model.ModelHandler;
+import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.mm.pictograms.PictogramLink;
+import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -89,13 +91,9 @@ class ViewContentProvider implements IStructuredContentProvider, ITreeContentPro
invisibleRoot = new TreeParent(""); //$NON-NLS-1$
}
- void updateModel(ModelHandler mh) {
+ void updateModel(DiagramEditor editor) {
invisibleRoot.removeChildren();
- if (mh == null) {
- return;
- }
-
- Definitions definitions = mh.getDefinitions();
+ Definitions definitions = ModelUtil.getDefinitions(editor);
List<RootElement> rootElements = definitions.getRootElements();
for (RootElement element : rootElements) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewLabelProvider.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewLabelProvider.java
index d53f12af..d53f12af 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewLabelProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/ViewLabelProvider.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/messages.properties
index e69de29b..e69de29b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/messages.properties
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/AbstractGraphicsTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/AbstractGraphicsTreeEditPart.java
index ce53525c..78c9680c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/AbstractGraphicsTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/AbstractGraphicsTreeEditPart.java
@@ -13,7 +13,7 @@ package org.eclipse.bpmn2.modeler.ui.views.outline;
import java.util.List;
import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.ui.property.PropertyLabelProvider;
import org.eclipse.bpmn2.modeler.ui.util.PropertyUtil;
import org.eclipse.emf.ecore.EObject;
@@ -125,7 +125,7 @@ public class AbstractGraphicsTreeEditPart extends AbstractTreeEditPart {
if (o!=null) {
text = labelProvider.getText(o);
if (text==null) {
- text = ModelUtil.getDisplayName(o);
+ text = ExtendedPropertiesProvider.getTextValue(o);
if (text==null || text.isEmpty()) {
EStructuralFeature f = o.eClass().getEStructuralFeature("id"); //$NON-NLS-1$
if (f!=null)
@@ -135,4 +135,22 @@ public class AbstractGraphicsTreeEditPart extends AbstractTreeEditPart {
}
return text;
}
+
+ @Override
+ public void refresh() {
+ try {
+ super.refresh();
+ }
+ catch (Exception e) {
+ /*
+ * This handles cases where the BPMN2 file is corrupt. Some of the
+ * blueprint examples from here:
+ * http://www.omg.org/spec/BPMN/20100602/2010-06-03/ are invalid,
+ * for example in CorrelationExampleSeller.bpmn the
+ * "Seller Service Interface" defines an Operation which references
+ * a Message in its errorRef reference list instead of an Error.
+ */
+ e.printStackTrace();
+ }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlinePage.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlinePage.java
index 916c9816..f915a314 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlinePage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlinePage.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.views.outline;
+import org.eclipse.bpmn2.modeler.core.merrimac.dialogs.ObjectEditingDialog;
import org.eclipse.bpmn2.modeler.help.IHelpContexts;
import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.IConstants;
@@ -18,6 +19,10 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.Viewport;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
import org.eclipse.gef.ContextMenuProvider;
import org.eclipse.gef.EditDomain;
import org.eclipse.gef.EditPart;
@@ -35,16 +40,26 @@ import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.graphiti.ui.internal.fixed.FixedScrollableThumbnail;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.about.AboutAction;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.PageBook;
@@ -123,7 +138,7 @@ public class BPMN2EditorOutlinePage extends ContentOutlinePage implements IPrope
// ========================= standard behavior ===========================
/**
- * Is used to register several global action handlers (UNDO, REDO, COPY,
+ * Is used to register several global action handlers (COMMAND_UNDO, COMMAND_REDO, COPY,
* PASTE, ...) on initialization of this outline page. This activates for
* example the undo-action in the central Eclipse-Menu.
*
@@ -136,7 +151,7 @@ public class BPMN2EditorOutlinePage extends ContentOutlinePage implements IPrope
public void init(IPageSite pageSite) {
super.init(pageSite);
// TODO: implement editing actions in Outline
- IActionBars actionBars = pageSite.getActionBars();
+// IActionBars actionBars = pageSite.getActionBars();
// registerGlobalActionHandler(actionBars, ActionFactory.UNDO.getId());
// registerGlobalActionHandler(actionBars, ActionFactory.REDO.getId());
// registerGlobalActionHandler(actionBars, ActionFactory.COPY.getId());
@@ -168,9 +183,55 @@ public class BPMN2EditorOutlinePage extends ContentOutlinePage implements IPrope
selectionSynchronizer.addViewer(getViewer());
diagramEditor.addPropertyListener(this);
+ addContextMenu(getViewer());
+
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContexts.Outline_View);
}
+ private void addContextMenu(final EditPartViewer viewer) {
+ // add a double-click listener to show the Property Dialog for the selected item
+ viewer.getControl().addMouseListener(new MouseListener() {
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ for (Object p : viewer.getSelectedEditParts()) {
+ if (p instanceof AbstractGraphicsTreeEditPart) {
+ Object model = ((AbstractGraphicsTreeEditPart)p).getModel();
+ if (model instanceof EObject) {
+ EObject businessObject = (EObject) model;
+ ObjectEditingDialog dialog = new ObjectEditingDialog(diagramEditor, businessObject);
+ dialog.open();
+ }
+ }
+ }
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ }
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ }
+ });
+
+ // Add a context menu for editing actions
+ final MenuManager contextMenu = new MenuManager("#PopUp");
+ contextMenu.add(new Separator("additions"));
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(new IMenuListener() {
+
+ @Override
+ public void menuAboutToShow(IMenuManager manager) {
+ System.out.println(viewer.getSelection());
+ contextMenu.add(new AboutAction(diagramEditor.getSite().getWorkbenchWindow()));
+ }
+ });
+
+ Menu menu = contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(Activator.PLUGIN_ID+".outline", contextMenu, viewer);
+ }
+
private void removeKeyListeners(Tree tree) {
for (Listener l : tree.getListeners(SWT.KeyUp)) {
tree.removeListener(SWT.KeyUp, l);
@@ -217,9 +278,10 @@ public class BPMN2EditorOutlinePage extends ContentOutlinePage implements IPrope
}
public Object getAdapter(Class key) {
- if (key==BPMN2Editor.class) {
+ if (key==BPMN2Editor.class)
return diagramEditor;
- }
+ else if (diagramEditor!=null)
+ return diagramEditor.getAdapter(key);
return null;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlineTreeViewer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlineTreeViewer.java
index fe6e1bfd..e841e55f 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlineTreeViewer.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorOutlineTreeViewer.java
@@ -10,9 +10,10 @@
******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.views.outline;
-import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.BaseElement;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.modeler.core.utils.BusinessObjectUtil;
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.util.Adaptable;
@@ -26,8 +27,6 @@ import org.eclipse.graphiti.ui.editor.DiagramEditor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import static org.eclipse.bpmn2.modeler.ui.features.activity.subprocess.SubProcessFeatureContainer.IS_EXPANDED;
-
public class BPMN2EditorOutlineTreeViewer extends TreeViewer implements Adaptable {
protected DiagramEditor diagramEditor;
@@ -64,20 +63,20 @@ public class BPMN2EditorOutlineTreeViewer extends TreeViewer implements Adaptabl
StructuredSelection ss = (StructuredSelection) newSelection;
if (ss.getFirstElement() instanceof AbstractGraphicsTreeEditPart) {
AbstractGraphicsTreeEditPart editPart = (AbstractGraphicsTreeEditPart) ss.getFirstElement();
- Diagram diagram = diagramEditor.getDiagramTypeProvider().getDiagram();
- EditPart editPartParent = editPart.getParent();
- while (editPartParent!=null) {
- Object model = editPartParent.getModel();
- if (model instanceof EObject) {
+ Object model = editPart.getModel();
+ if (model instanceof BaseElement && FeatureSupport.isExpandableElement((BaseElement)model)) {
+ Diagram diagram = diagramEditor.getDiagramTypeProvider().getDiagram();
+ EditPart editPartParent = editPart.getParent();
+ while (editPartParent!=null) {
+ model = editPartParent.getModel();
for (PictogramElement pe : Graphiti.getLinkService().getPictogramElements(diagram, (EObject)model)) {
- String value = Graphiti.getPeService().getPropertyValue(pe, IS_EXPANDED);
- if (value!=null && Boolean.parseBoolean(value)==false) {
+ if (!FeatureSupport.isElementExpanded(pe)) {
super.setSelection(new StructuredSelection(editPartParent));
return;
}
}
+ editPartParent = editPartParent.getParent();
}
- editPartParent = editPartParent.getParent();
}
}
}
@@ -86,9 +85,10 @@ public class BPMN2EditorOutlineTreeViewer extends TreeViewer implements Adaptabl
@Override
public Object getAdapter(Class adapterType) {
- if (adapterType==BPMN2Editor.class) {
+ if (adapterType==BPMN2Editor.class)
return diagramEditor;
- }
+ else if (diagramEditor!=null)
+ return diagramEditor.getAdapter(adapterType);
return null;
}
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java
new file mode 100644
index 00000000..294881a0
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMN2EditorSelectionSynchronizer.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.views.outline;
+
+import org.eclipse.bpmn2.modeler.core.utils.FeatureSupport;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer;
+import org.eclipse.gef.ui.parts.SelectionSynchronizer;
+import org.eclipse.graphiti.mm.pictograms.ContainerShape;
+import org.eclipse.graphiti.mm.pictograms.PictogramElement;
+import org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+public class BPMN2EditorSelectionSynchronizer extends SelectionSynchronizer {
+
+ protected EditPart convert(EditPartViewer viewer, EditPart part) {
+ if (viewer instanceof BPMN2EditorOutlineTreeViewer) {
+ BPMN2EditorOutlineTreeViewer ov = (BPMN2EditorOutlineTreeViewer)viewer;
+ return ov.convert(part);
+ }
+ else if (viewer instanceof GraphicalViewer && part instanceof AbstractGraphicsTreeEditPart) {
+ return BPMN2EditorOutlineTreeViewer.convert((GraphicalViewer)viewer, (AbstractGraphicsTreeEditPart)part);
+ }
+ return super.convert(viewer,part);
+ }
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ Object elem = sel.getFirstElement();
+ if (elem instanceof ContainerShapeEditPart) {
+ Object model = ((ContainerShapeEditPart)elem).getModel();
+ if (model instanceof ContainerShape && FeatureSupport.isLabelShape((ContainerShape)model)) {
+ ScrollingGraphicalViewer viewer = (ScrollingGraphicalViewer)event.getSource();
+ PictogramElement labelOwner = FeatureSupport.getLabelOwner((ContainerShape)model);
+ elem = viewer.getEditPartRegistry().get(labelOwner);
+ if (elem!=null) {
+ sel = new StructuredSelection(elem);
+ event = new SelectionChangedEvent(viewer, sel);
+ }
+ }
+ }
+ super.selectionChanged(event);
+ }
+
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPart.java
index 8567b069..8567b069 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPartFactory.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPartFactory.java
index 88ef6777..afc005a8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPartFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNDiagramTreeEditPartFactory.java
@@ -20,8 +20,9 @@ import org.eclipse.bpmn2.Operation;
import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.RootElement;
import org.eclipse.bpmn2.di.BPMNDiagram;
-import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNLabel;
+import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
import org.eclipse.graphiti.mm.pictograms.Diagram;
@@ -85,6 +86,8 @@ public class BPMNDiagramTreeEditPartFactory implements EditPartFactory {
ret = new BPMNShapeTreeEditPart(dep, (BPMNShape) model);
} else if (model instanceof BPMNEdge) {
ret = new BPMNEdgeTreeEditPart(dep, (BPMNEdge) model);
+ } else if (model instanceof BPMNLabel) {
+ ret = new BPMNLabelTreeEditPart(dep, (BPMNLabel) model);
}
}
return ret;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNEdgeTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNEdgeTreeEditPart.java
index c103e849..9345ef53 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNEdgeTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNEdgeTreeEditPart.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.bpmn2.di.BPMNEdge;
+import org.eclipse.bpmn2.di.BPMNLabel;
import org.eclipse.bpmn2.di.BPMNShape;
public class BPMNEdgeTreeEditPart extends AbstractGraphicsTreeEditPart {
@@ -40,7 +41,9 @@ public class BPMNEdgeTreeEditPart extends AbstractGraphicsTreeEditPart {
protected List<Object> getModelChildren() {
List<Object> retList = new ArrayList<Object>();
BPMNEdge bpmnEdge = getBPMNEdge();
- // TODO
+ BPMNLabel bpmnLabel = bpmnEdge.getLabel();
+ if (bpmnLabel!=null)
+ retList.add(bpmnLabel);
return retList;
}
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNLabelTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNLabelTreeEditPart.java
new file mode 100644
index 00000000..0fbfdb7d
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNLabelTreeEditPart.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.bpmn2.modeler.ui.views.outline;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.bpmn2.di.BPMNLabel;
+import org.eclipse.dd.dc.Bounds;
+
+public class BPMNLabelTreeEditPart extends AbstractGraphicsTreeEditPart {
+
+ public BPMNLabelTreeEditPart(DiagramTreeEditPart dep, BPMNLabel BPMNLabel) {
+ super(dep, BPMNLabel);
+ }
+
+ public BPMNLabel getBPMNLabel() {
+ return (BPMNLabel) getModel();
+ }
+
+ // ======================= overwriteable behaviour ========================
+
+ /**
+ * Creates the EditPolicies of this EditPart. Subclasses often overwrite
+ * this method to change the behaviour of the editpart.
+ */
+ @Override
+ protected void createEditPolicies() {
+ }
+
+ @Override
+ protected List<Object> getModelChildren() {
+ List<Object> retList = new ArrayList<Object>();
+ BPMNLabel bpmnLabel = getBPMNLabel();
+ // TODO
+ return retList;
+ }
+
+ @Override
+ protected String getText() {
+ BPMNLabel bpmnLabel = getBPMNLabel();
+ if (bpmnLabel.getBounds()!=null) {
+ Bounds b = bpmnLabel.getBounds();
+ return "Label: x="+b.getX()+", y="+b.getY()+" w="+b.getWidth()+" h="+b.getHeight();
+ }
+ return "Label";
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNShapeTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNShapeTreeEditPart.java
index 98931bc6..d3839a93 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNShapeTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BPMNShapeTreeEditPart.java
@@ -13,10 +13,8 @@ package org.eclipse.bpmn2.modeler.ui.views.outline;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.bpmn2.di.BPMNLabel;
import org.eclipse.bpmn2.di.BPMNShape;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
public class BPMNShapeTreeEditPart extends AbstractGraphicsTreeEditPart {
@@ -42,7 +40,9 @@ public class BPMNShapeTreeEditPart extends AbstractGraphicsTreeEditPart {
protected List<Object> getModelChildren() {
List<Object> retList = new ArrayList<Object>();
BPMNShape bpmnShape = getBPMNShape();
- // TODO
+ BPMNLabel bpmnLabel = bpmnShape.getLabel();
+ if (bpmnLabel!=null)
+ retList.add(bpmnLabel);
return retList;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BaseElementTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BaseElementTreeEditPart.java
index f061936f..630f004e 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BaseElementTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/BaseElementTreeEditPart.java
@@ -15,7 +15,7 @@ import org.eclipse.bpmn2.DataInput;
import org.eclipse.bpmn2.DataInputAssociation;
import org.eclipse.bpmn2.DataOutput;
import org.eclipse.bpmn2.DataOutputAssociation;
-import org.eclipse.bpmn2.modeler.core.utils.ModelUtil;
+import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
public class BaseElementTreeEditPart extends AbstractGraphicsTreeEditPart {
@@ -45,14 +45,14 @@ public class BaseElementTreeEditPart extends AbstractGraphicsTreeEditPart {
DataOutputAssociation doa = (DataOutputAssociation) getModel();
if (doa.getSourceRef().size()>0 && doa.getSourceRef().get(0) instanceof DataOutput) {
DataOutput d = (DataOutput) doa.getSourceRef().get(0);
- return ModelUtil.getDisplayName(d);
+ return ExtendedPropertiesProvider.getTextValue(d);
}
}
if (getModel() instanceof DataInputAssociation) {
DataInputAssociation doa = (DataInputAssociation) getModel();
if (doa.getTargetRef() instanceof DataInput) {
DataInput d = (DataInput) doa.getTargetRef();
- return ModelUtil.getDisplayName(d);
+ return ExtendedPropertiesProvider.getTextValue(d);
}
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/DiagramTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/DiagramTreeEditPart.java
index 4fffbabc..4fffbabc 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/DiagramTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/DiagramTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/FlowElementTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/FlowElementTreeEditPart.java
index 2d4ebaef..6f078bb7 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/FlowElementTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/FlowElementTreeEditPart.java
@@ -18,6 +18,7 @@ import org.eclipse.bpmn2.BoundaryEvent;
import org.eclipse.bpmn2.CallActivity;
import org.eclipse.bpmn2.CallableElement;
import org.eclipse.bpmn2.CatchEvent;
+import org.eclipse.bpmn2.Choreography;
import org.eclipse.bpmn2.ChoreographyActivity;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.FlowElement;
@@ -25,6 +26,7 @@ import org.eclipse.bpmn2.FlowElementsContainer;
import org.eclipse.bpmn2.FlowNode;
import org.eclipse.bpmn2.Lane;
import org.eclipse.bpmn2.LaneSet;
+import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.SequenceFlow;
import org.eclipse.bpmn2.SubChoreography;
@@ -168,6 +170,23 @@ public class FlowElementTreeEditPart extends AbstractGraphicsTreeEditPart {
if (container instanceof SubChoreography) {
retList.addAll(((SubChoreography)container).getArtifacts());
}
+ if (container instanceof Choreography) {
+ // Add Pools as children if the Pool has a Process associated with it,
+ // or if the Participant is NOT referenced by a Choreography Activity.
+ for (Participant p : ((Choreography)container).getParticipants()) {
+ if (p.getProcessRef()!=null)
+ retList.add(p);
+ else {
+ for (FlowElement fe : flowElements) {
+ if (fe instanceof ChoreographyActivity) {
+ if (!((ChoreographyActivity)fe).getParticipantRefs().contains(p)) {
+ retList.add(p);
+ }
+ }
+ }
+ }
+ }
+ }
return retList;
}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/GroupTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/GroupTreeEditPart.java
index ad20d810..ad20d810 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/GroupTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/GroupTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/InterfaceTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/InterfaceTreeEditPart.java
index 6bf25316..6bf25316 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/InterfaceTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/InterfaceTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/LaneTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/LaneTreeEditPart.java
index 665b72c6..665b72c6 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/LaneTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/LaneTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/MessageTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/MessageTreeEditPart.java
index b3b02ca1..b3b02ca1 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/MessageTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/MessageTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/Messages.java
index 9015dc0c..4d612f28 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.views.outline;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/OperationTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/OperationTreeEditPart.java
index 31ba74c2..31ba74c2 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/OperationTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/OperationTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/PoolTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/PoolTreeEditPart.java
index 91117806..91117806 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/PoolTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/PoolTreeEditPart.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/RootElementTreeEditPart.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/RootElementTreeEditPart.java
index 24f41a4f..56b26ecd 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/RootElementTreeEditPart.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/RootElementTreeEditPart.java
@@ -57,7 +57,8 @@ public class RootElementTreeEditPart extends AbstractGraphicsTreeEditPart {
List<Object> retList = new ArrayList<Object>();
RootElement elem = getRootElement();
if (elem != null && elem.eResource() != null) {
- if (getParent() instanceof DiagramTreeEditPart) {
+// if (getParent() instanceof DiagramTreeEditPart)
+ {
if (elem instanceof FlowElementsContainer) {
FlowElementsContainer container = (FlowElementsContainer)elem;
return FlowElementTreeEditPart.getFlowElementsContainerChildren(container);
diff --git a/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties
new file mode 100644
index 00000000..df89aa2f
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/views/outline/messages.properties
@@ -0,0 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+BPMN2EditorOutlinePage_Business_Model_Title=Business Model
+BPMN2EditorOutlinePage_DI_Model_Title=Diagram Interchange Model
+BPMN2EditorOutlinePage_Thumbnail_Title=Thumbnail
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java
index 3df2fc2c..507eef4d 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java
@@ -14,30 +14,22 @@ package org.eclipse.bpmn2.modeler.ui.wizards;
import java.io.File;
+import org.eclipse.bpmn2.modeler.core.di.DIUtils;
import org.eclipse.bpmn2.modeler.core.utils.ErrorUtils;
import org.eclipse.bpmn2.modeler.core.utils.ModelUtil.Bpmn2DiagramType;
import org.eclipse.bpmn2.modeler.ui.Activator;
import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInput;
import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
-import org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.emf.common.util.URI;
import org.eclipse.graphiti.mm.pictograms.Diagram;
-import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.editor.DiagramEditorInput;
import org.eclipse.graphiti.ui.services.GraphitiUi;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
@@ -58,9 +50,7 @@ public class BPMN2DiagramCreator {
String modelName = modelUri.trimFragment().trimFileExtension().lastSegment();
// We still need to create a Diagram object for this editor
- final Diagram diagram = Graphiti.getPeCreateService().createDiagram("BPMN2", modelName, true); //$NON-NLS-1$
-// diagram.setVerticalGridUnit(0);
-// diagram.setGridUnit(0);
+ final Diagram diagram = DIUtils.createDiagram(modelName); //$NON-NLS-1$
if (otherEditor!=null) {
// reuse the temp Diagram File from other editor
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizard.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizard.java
index a4f7e013..a4f7e013 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizard.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizard.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage1.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage1.java
index 16076ec8..16076ec8 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage1.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage1.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage2.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage2.java
index 20293b75..20293b75 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage2.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramWizardPage2.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java
index 9883221b..9883221b 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/Messages.java b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/Messages.java
index 568374ce..142bb5db 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/Messages.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+ * All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.eclipse.bpmn2.modeler.ui.wizards;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/messages.properties b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/messages.properties
index 8a67dd17..3599f3b5 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/messages.properties
@@ -1,3 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013, 2014 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
BPMN2DiagramCreator_Create_Error=Error while opening diagram editor
BPMN2DiagramWizard_Error=Error
BPMN2DiagramWizardPage1_Choreography_Diagram_Description=A Choreography formalizes the way business Participants coordinate their interactions. The focus is not on orchestrations of the work performed within these Participants, but rather on the exchange of information (Messages) between these Participants.
diff --git a/plugins/org.eclipse.bpmn2.modeler.wsil/.classpath b/plugins/org.eclipse.bpmn2.modeler.wsil/.classpath
new file mode 100644
index 00000000..098194ca
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/.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/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.bpmn2.modeler.wsil/.project b/plugins/org.eclipse.bpmn2.modeler.wsil/.project
index 6dd3e0e9..6dd3e0e9 100644
--- a/org.eclipse.bpmn2.modeler.wsil/.project
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/.project
diff --git a/org.eclipse.bpmn2.modeler.wsil/META-INF/MANIFEST.MF b/plugins/org.eclipse.bpmn2.modeler.wsil/META-INF/MANIFEST.MF
index b2a0adc7..c499ddec 100644
--- a/org.eclipse.bpmn2.modeler.wsil/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.bpmn2.modeler.wsil;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.bpmn2.modeler.wsil.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.bpmn2.modeler.wsil/about.html b/plugins/org.eclipse.bpmn2.modeler.wsil/about.html
new file mode 100644
index 00000000..3408ea2e
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/about.html
@@ -0,0 +1,26 @@
+<!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, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" 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 ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.wsil/build.properties b/plugins/org.eclipse.bpmn2.modeler.wsil/build.properties
index 0dc34f78..c6b231a3 100644
--- a/org.eclipse.bpmn2.modeler.wsil/build.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/build.properties
@@ -3,4 +3,7 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
+ license.html,\
+ epl-v10.html,\
+ about.html,\
plugin.properties
diff --git a/plugins/org.eclipse.bpmn2.modeler.wsil/epl-v10.html b/plugins/org.eclipse.bpmn2.modeler.wsil/epl-v10.html
new file mode 100644
index 00000000..91531ed4
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/epl-v10.html
@@ -0,0 +1,271 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2011, 2012, 2013 Red Hat, Inc.
+# All rights reserved.
+# This program is made available under the terms of the
+# Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#-------------------------------------------------------------------------------
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+ body {
+ size: 8.5in 11.0in;
+ margin: 0.25in 0.5in 0.25in 0.5in;
+ tab-interval: 0.5in;
+ }
+ p {
+ margin-left: auto;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+ </style>
+
+</head>
+
+<body lang="EN-US">
+
+<p align=center><b>Eclipse Public License - v 1.0</b></p>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>&quot;Contribution&quot; means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>&quot;Contributor&quot; means any person or entity that distributes
+the Program.</p>
+
+<p>&quot;Licensed Patents&quot; mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>&quot;Program&quot; means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>&quot;Recipient&quot; means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+(&quot;Commercial Contributor&quot;) hereby agrees to defend and
+indemnify every other Contributor (&quot;Indemnified Contributor&quot;)
+against any losses, damages and costs (collectively &quot;Losses&quot;)
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body>
+
+</html>
diff --git a/org.eclipse.bpmn2.modeler.wsil/icons/obj16/service.gif b/plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/service.gif
index 9f074e8a..9f074e8a 100644
--- a/org.eclipse.bpmn2.modeler.wsil/icons/obj16/service.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/service.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil.gif b/plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil.gif
index 789d6892..789d6892 100644
--- a/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil.gif
Binary files differ
diff --git a/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil_link.gif b/plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil_link.gif
index 8fb844f5..8fb844f5 100644
--- a/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil_link.gif
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/icons/obj16/wsil_link.gif
Binary files differ
diff --git a/plugins/org.eclipse.bpmn2.modeler.wsil/license.html b/plugins/org.eclipse.bpmn2.modeler.wsil/license.html
new file mode 100644
index 00000000..6e579a58
--- /dev/null
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/license.html
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also
+ 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, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation
+source code
+ repository ("Repository") in software modules ("Modules") and made
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+Fragments and associated material. Each Feature may be packaged as a
+sub-directory in a directory named "features". Within a Feature, files
+named "feature.xml" may contain a list of the names and version numbers
+of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+Features"). Within a Feature, files named "feature.xml" may contain a
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+ SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software,
+examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager ("Provisioning Technology") for the purpose of
+allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning
+Technology
+ in accordance with the Specification. By using Provisioning
+Technology in such a manner and making it available in accordance with
+the
+ Specification, you further acknowledge your agreement to, and the
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur ("Provisioning Process") in
+which a user may execute the Provisioning Technology
+ on a machine ("Target Machine") with the intent of installing,
+extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such Installable
+Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+Software Agreement must inform the user of the terms and conditions that
+ govern
+ the Installable Software and must solicit acceptance by the end
+user in the manner prescribed in such Installable Software Agreement.
+Upon such
+ indication of agreement by the user, the provisioning Technology
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use,
+and/or re-export to
+ another country, of encryption software. BEFORE using any encryption
+software, please check the country's laws, regulations and policies
+concerning the import,
+ possession, or use, and re-export of encryption software, to see if
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.wsil/plugin.properties b/plugins/org.eclipse.bpmn2.modeler.wsil/plugin.properties
index ca45bbf5..9dab9f0f 100644
--- a/org.eclipse.bpmn2.modeler.wsil/plugin.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/plugin.properties
@@ -9,6 +9,6 @@
# Red Hat, Inc. - initial API and implementation
###############################################################################
pluginName = BPMN2 Modeler WSIL Support
-providerName = Eclipse.org
+providerName = Eclipse SOA
# Preference Page titles
PREFERENCE_PAGE_WSIL=WSIL Browser
diff --git a/org.eclipse.bpmn2.modeler.wsil/plugin.xml b/plugins/org.eclipse.bpmn2.modeler.wsil/plugin.xml
index e3a0f096..e3a0f096 100644
--- a/org.eclipse.bpmn2.modeler.wsil/plugin.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/plugin.xml
diff --git a/org.eclipse.bpmn2.modeler.wsil/pom.xml b/plugins/org.eclipse.bpmn2.modeler.wsil/pom.xml
index ce96e653..82e7ca7f 100644
--- a/org.eclipse.bpmn2.modeler.wsil/pom.xml
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/pom.xml
@@ -12,15 +12,16 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.plugins.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.eclipse.bpmn2.modeler</groupId>
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
<artifactId>org.eclipse.bpmn2.modeler.wsil</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
- <name>WSIL Support</name>
+ <name>BPMN2 Modeler Plugins: WSIL Support</name>
<description>Support for using WSIL registries in BPMN2 Modeler</description>
</project>
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Activator.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Activator.java
index 29acf010..29acf010 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Activator.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Activator.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/IConstants.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/IConstants.java
index 77690c7b..77690c7b 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/IConstants.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/IConstants.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Messages.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Messages.java
index 674a9121..674a9121 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/Messages.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/messages.properties b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/messages.properties
index c8c47375..c8c47375 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/messages.properties
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/Bpmn2WSILAdapterFactory.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/Bpmn2WSILAdapterFactory.java
index a5c84d02..a5c84d02 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/Bpmn2WSILAdapterFactory.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/Bpmn2WSILAdapterFactory.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILInspectionAdapter.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILInspectionAdapter.java
index 3baa83dd..3baa83dd 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILInspectionAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILInspectionAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILLinkAdapter.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILLinkAdapter.java
index 9e4fd579..9e4fd579 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILLinkAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILLinkAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILServiceAdapter.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILServiceAdapter.java
index 4c64e47d..4c64e47d 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILServiceAdapter.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/adapter/WSILServiceAdapter.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/dialogs/SchemaImportDialogWithWSIL.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/dialogs/SchemaImportDialogWithWSIL.java
index 410586dd..410586dd 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/dialogs/SchemaImportDialogWithWSIL.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/dialogs/SchemaImportDialogWithWSIL.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/preferences/WSILPreferencePage.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/preferences/WSILPreferencePage.java
index 1e8690b4..1e8690b4 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/preferences/WSILPreferencePage.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/preferences/WSILPreferencePage.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/Messages.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/Messages.java
index fe51b7dd..fe51b7dd 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/Messages.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/Messages.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/WSILContentProvider.java b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/WSILContentProvider.java
index c70e27ae..c70e27ae 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/WSILContentProvider.java
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/WSILContentProvider.java
diff --git a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/messages.properties b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/messages.properties
index 3b0842e8..3b0842e8 100644
--- a/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/messages.properties
+++ b/plugins/org.eclipse.bpmn2.modeler.wsil/src/org/eclipse/bpmn2/modeler/wsil/ui/providers/messages.properties
diff --git a/plugins/pom.xml b/plugins/pom.xml
new file mode 100644
index 00000000..4cfa255c
--- /dev/null
+++ b/plugins/pom.xml
@@ -0,0 +1,29 @@
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.bpmn2.modeler</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.bpmn2.modeler.plugins</groupId>
+ <artifactId>org.eclipse.bpmn2.modeler.plugins.parent</artifactId>
+ <name>BPMN2 Modeler: Plugins Parent</name>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>org.eclipse.bpmn2.modeler.core</module>
+ <module>org.eclipse.bpmn2.modeler.ui</module>
+ <module>org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5</module>
+ <module>org.eclipse.bpmn2.modeler.wsil</module>
+ <module>org.eclipse.bpmn2.modeler.help</module>
+ </modules>
+
+</project>
+
diff --git a/pom.xml b/pom.xml
index fa8bb8dc..0e17d701 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,414 +1,17 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
-
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
-
- <groupId>org.eclipse.bpmn2.modeler</groupId>
- <artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <groupId>org.eclipse</groupId>
+ <artifactId>org-eclipse-bpmn2-modeler</artifactId>
+ <name>BPMN2 Modeler</name>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
-
- <name>BPMN2 Modeler Parent</name>
- <description>Parent POM for the Eclipse BPMN2 Modeler Project</description>
-
- <licenses>
- <license>
- <name>Eclipse Public License v1.0</name>
- <comments>
- All rights reserved.
-
- This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.htm
- </comments>
- </license>
- </licenses>
-
- <properties>
- <tycho-version>0.16.0</tycho-version>
- <tycho-extras-version>${tycho-version}</tycho-extras-version>
- </properties>
-
- <profiles>
- <profile>
- <id>platform-helios</id>
- <activation>
- <property>
- <name>platform-version-name</name>
- <value>helios</value>
- </property>
- </activation>
- <properties>
- <eclipse-site>http://download.eclipse.org/releases/helios</eclipse-site>
- <platform-version>[3.6,3.7)</platform-version>
- <platform-version-name>helios</platform-version-name>
- </properties>
- </profile>
- <profile>
- <id>platform-indigo</id>
- <activation>
- <property>
- <name>platform-version-name</name>
- <value>indigo</value>
- </property>
- </activation>
- <properties>
- <eclipse-site>http://download.eclipse.org/releases/indigo</eclipse-site>
- <platform-version>[3.7,3.8)</platform-version>
- <platform-version-name>indigo</platform-version-name>
- </properties>
- </profile>
- <profile>
- <id>platform-juno</id>
- <activation>
- <property>
- <name>platform-version-name</name>
- <value>juno</value>
- </property>
- </activation>
- <properties>
- <eclipse-site>http://download.eclipse.org/releases/juno</eclipse-site>
- <platform-version>[4.2,4.3)</platform-version>
- <platform-version-name>juno</platform-version-name>
- </properties>
- </profile>
- <profile>
- <id>platform-kepler</id>
- <activation>
- <property>
- <name>platform-version-name</name>
- <value>kepler</value>
- </property>
- </activation>
- <properties>
- <eclipse-site>http://download.eclipse.org/releases/kepler</eclipse-site>
- <platform-version>[4.3,4.4)</platform-version>
- <platform-version-name>kepler</platform-version-name>
- </properties>
- </profile>
- <profile>
- <id>platform-luna</id>
- <activation>
- <property>
- <name>platform-version-name</name>
- <value>luna</value>
- </property>
- </activation>
- <properties>
- <eclipse-site>http://download.eclipse.org/releases/luna</eclipse-site>
- <platform-version>[4.4,4.5)</platform-version>
- <platform-version-name>luna</platform-version-name>
- </properties>
- </profile>
- </profiles>
-
<modules>
- <module>org.eclipse.bpmn2.modeler.core</module>
- <module>org.eclipse.bpmn2.modeler.help</module>
- <module>org.eclipse.bpmn2.modeler.ui</module>
- <module>org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5</module>
- <module>org.eclipse.bpmn2.modeler.runtime.example</module>
- <module>org.eclipse.bpmn2.modeler.feature</module>
- <module>org.eclipse.bpmn2.modeler.jboss.runtime.feature</module>
- <module>org.eclipse.bpmn2.modeler.examples.feature</module>
- <module>org.eclipse.bpmn2.modeler.wsil</module>
- <module>org.eclipse.bpmn2.modeler.wsil.feature</module>
- <module>org.eclipse.bpmn2.modeler.updatesite.feature</module>
- </modules>
-
- <repositories>
- <repository>
- <id>eclipse-platform</id>
- <layout>p2</layout>
- <url>${eclipse-site}</url>
- </repository>
-
- <repository>
- <id>eclipse-bpmn2</id>
- <url>http://download.eclipse.org/modeling/mdt/bpmn2/updates/milestones/S20130822/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>eclipse-bpel</id>
- <url>http://download.eclipse.org/bpel/site/1.0.2</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>eclipse-graphiti-helios</id>
- <url>http://archive.eclipse.org/graphiti/updates/0.8.2</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>eclipse-graphiti-indigo</id>
- <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>eclipse-graphiti-juno</id>
- <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>eclipse-graphiti-kepler</id>
- <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
+ <!-- must build parent BEFORE building the rest of this project
+ <module>parent</module> -->
- <repository>
- <id>eclipse-graphiti-luna</id>
- <url>http://download.eclipse.org/graphiti/updates/milestones/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>eclipse-emf</id>
- <url>http://download.eclipse.org/modeling/emf/updates/releases/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- <repository>
- <id>eclipse-gef</id>
- <url>http://download.eclipse.org/tools/gef/updates/releases/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
-
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <!-- need maven-findbugs-2.3.2-SNAPSHOT, see http://jira.codehaus.org/browse/MFINDBUGS-122
- remove this when this version is released -->
- <id>codehaus.snapshots</id>
- <url>http://snapshots.repository.codehaus.org/</url>
- </pluginRepository>
-
- <pluginRepository>
- <id>m2e-cbi</id>
- <url>http://download.eclipse.org/technology/m2e/maven/</url>
- </pluginRepository>
- </pluginRepositories>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
-
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <resolver>p2</resolver>
- <includePackedArtifacts>true</includePackedArtifacts>
- </configuration>
- </plugin>
-
-
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200a-plugin</artifactId>
- <version>${tycho-extras-version}</version>
- <executions>
- <execution>
- <id>pack200-normalize</id>
- <goals>
- <goal>normalize</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.eclipse.cbi.maven.plugins</groupId>
- <artifactId>eclipse-jarsigner-plugin</artifactId>
- <version>1.0.1</version>
- <executions>
- <execution>
- <id>sign</id>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200b-plugin</artifactId>
- <version>${tycho-extras-version}</version>
- <executions>
- <execution>
- <id>pack200-pack</id>
- <goals>
- <goal>pack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>p2-metadata</id>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- <phase>package</phase>
- </execution>
- </executions>
- <configuration>
- <defaultP2Metadata>false</defaultP2Metadata>
- </configuration>
- </plugin>
- </plugins>
-
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>maven-osgi-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <!-- TODO remove workaround when https://issues.sonatype.org/browse/TYCHO-473
- is fixed -->
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>maven-osgi-source-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-source</id>
- <phase>process-classes</phase>
- <goals>
- <goal>plugin-source</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.1</version>
- <configuration>
- <encoding>ISO-8859-1</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>2.3.2-SNAPSHOT</version>
- <configuration>
- <findbugsXmlOutput>true</findbugsXmlOutput>
- <failOnError>false</failOnError>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.5</version>
- <configuration>
- <sourceEncoding>utf-8</sourceEncoding>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.5</targetJdk>
- <format>xml</format>
- <failOnViolation>false</failOnViolation>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>cpd-check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
-
-
-</project>
+ <module>plugins</module>
+ <module>features</module>
+ <module>examples</module>
+ </modules>
+</project> \ No newline at end of file
diff --git a/upversion.sh b/upversion.sh
index ffdf99c8..78a1414e 100644
--- a/upversion.sh
+++ b/upversion.sh
@@ -1 +1 @@
-mvn -Dtycho.mode=maven org.sonatype.tycho:tycho-versions-plugin:set-version -DnewVersion=1.0.2-SNAPSHOT
+mvn -Dtycho.mode=maven org.sonatype.tycho:tycho-versions-plugin:set-version -DnewVersion=1.1.0-SNAPSHOT

Back to the top