Status: | Merged |
---|---|
Merge reported by: | Dražen Lučanin |
Merged at revision: | not available |
Proposed branch: | lp:~xjax/vide/ifdev |
Merge into: | lp:vide |
Diff against target: |
10382 lines (+6477/-2626) (has conflicts) 107 files modified
net.launchpad.vide.acceleo.example/.classpath (+0/-6) net.launchpad.vide.acceleo.example/.project (+0/-23) net.launchpad.vide.acceleo.example/.pydevproject (+0/-7) net.launchpad.vide.acceleo.example/.settings/org.eclipse.core.resources.prefs (+0/-8) net.launchpad.vide.acceleo.example/.settings/org.eclipse.jdt.core.prefs (+0/-12) net.launchpad.vide.acceleo.example/model/Euclid.flowchart (+0/-94) net.launchpad.vide.acceleo.example/model/default.algorithm (+0/-7) net.launchpad.vide.acceleo.example/model/default.flowchart (+0/-49) net.launchpad.vide.acceleo.example/model/euclid.algorithm (+0/-11) net.launchpad.vide.acceleo.example/model/example.flowchart (+0/-5) net.launchpad.vide.acceleo.example/model/simple.flowchart (+0/-56) net.launchpad.vide.acceleo.example/src/default.py (+0/-5) net.launchpad.vide.algorithm2code/.classpath (+0/-7) net.launchpad.vide.algorithm2code/.project (+0/-34) net.launchpad.vide.algorithm2code/.settings/org.eclipse.jdt.core.prefs (+0/-6) net.launchpad.vide.algorithm2code/META-INF/MANIFEST.MF (+0/-18) net.launchpad.vide.algorithm2code/build.acceleo (+0/-28) net.launchpad.vide.algorithm2code/build.properties (+0/-5) net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/Activator.java (+0/-64) net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/Generate.java (+0/-270) net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/generate.mtl (+0/-16) net.launchpad.vide.diagram/META-INF/MANIFEST.MF (+4/-1) net.launchpad.vide.diagram/messages.properties (+14/-12) net.launchpad.vide.diagram/plugin.properties (+3/-3) net.launchpad.vide.diagram/plugin.xml (+58/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BlockEditPart.java (+2/-2) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchEditPart.java (+0/-2) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchFalseEditPart.java (+0/-1) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchTrueEditPart.java (+0/-1) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/policies/AlgorithmBaseItemSemanticEditPolicy.java (+92/-18) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmAbstractExpression.java (+158/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmOCLFactory.java (+172/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorContentProvider.java (+62/-62) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorLabelProvider.java (+63/-63) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramActionBarContributor.java (+10/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramEditorPlugin.java (+21/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramUpdater.java (+28/-28) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmPaletteFactory.java (+68/-16) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmVisualIDRegistry.java (+1/-1) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/Messages.java (+66/-56) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/ValidateAction.java (+298/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmElementTypes.java (+4/-4) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmMarkerNavigationProvider.java (+96/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationDecoratorProvider.java (+450/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationProvider.java (+127/-0) net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmViewProvider.java (+59/-60) net.launchpad.vide.edit/plugin.properties (+19/-0) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java (+123/-0) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java (+181/-0) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/InstructionItemProvider.java (+0/-2) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java (+109/-0) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java (+181/-0) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java (+186/-0) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java (+149/-0) net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java (+149/-0) net.launchpad.vide.flowchart/model/algorithm.genmodel (+22/-0) net.launchpad.vide.flowchart/model/flowchart.gmfgen (+61/-2) net.launchpad.vide.flowchart/model/flowchart.gmfgraph (+16/-6) net.launchpad.vide.flowchart/model/flowchart.gmfmap (+36/-3) net.launchpad.vide.flowchart/model/flowchart.gmftool (+9/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/Algorithm.java (+11/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/AlgorithmPackage.java (+854/-292) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/BooleanExpression.java (+22/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/If.java (+107/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/SingleInstruction.java (+21/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/While.java (+107/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageAlgorithm.java (+46/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageBlock.java (+46/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageInstruction.java (+54/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/AlgorithmImpl.java (+14/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/AlgorithmPackageImpl.java (+383/-179) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/BooleanExpressionImpl.java (+45/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/IfImpl.java (+281/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/SingleInstructionImpl.java (+43/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileImpl.java (+281/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageAlgorithmImpl.java (+156/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageBlockImpl.java (+138/-0) net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageInstructionImpl.java (+160/-0) net.launchpad.vide.launcher.ui/.classpath (+0/-7) net.launchpad.vide.launcher.ui/.project (+0/-28) net.launchpad.vide.launcher.ui/.settings/org.eclipse.jdt.core.prefs (+0/-8) net.launchpad.vide.launcher.ui/META-INF/MANIFEST.MF (+0/-14) net.launchpad.vide.launcher.ui/build.properties (+0/-5) net.launchpad.vide.launcher.ui/plugin.xml (+0/-47) net.launchpad.vide.launcher.ui/src/net/launchpad/vide/launcher/ui/Activator.java (+0/-50) net.launchpad.vide.launcher.ui/src/net/launchpad/vide/launcher/ui/FlowchartLaunchConfigurationTabGroup.java (+0/-25) net.launchpad.vide.launcher.ui/src/net/launchpad/vide/launcher/ui/FlowchartLaunchShortcut.java (+0/-105) net.launchpad.vide.launcher.ui/src/net/launchpad/vide/launcher/ui/FlowchartTab.java (+0/-335) net.launchpad.vide.launcher.ui/src/net/launchpad/vide/launcher/ui/WorkspaceFileDialog.java (+0/-90) net.launchpad.vide.launcher/.classpath (+0/-7) net.launchpad.vide.launcher/.project (+0/-28) net.launchpad.vide.launcher/.settings/org.eclipse.jdt.core.prefs (+0/-8) net.launchpad.vide.launcher/META-INF/MANIFEST.MF (+0/-12) net.launchpad.vide.launcher/build.properties (+0/-5) net.launchpad.vide.launcher/plugin.xml (+0/-14) net.launchpad.vide.launcher/src/net/launchpad/vide/debugger/FlowchartDebugTarget.java (+0/-165) net.launchpad.vide.launcher/src/net/launchpad/vide/launcher/Activator.java (+0/-50) net.launchpad.vide.launcher/src/net/launchpad/vide/launcher/FlowchartLaunchConfigurationDelegate.java (+0/-60) net.launchpad.vide.launcher/src/net/launchpad/vide/launcher/IFlowchartConstants.java (+0/-18) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/AlgorithmTest.java (+17/-0) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/BooleanExpressionTest.java (+93/-0) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/IfTest.java (+74/-0) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/SingleInstructionTest.java (+74/-0) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageAlgorithmTest.java (+93/-0) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageBlockTest.java (+93/-0) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageInstructionTest.java (+93/-0) net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileTest.java (+74/-0) Conflict adding file net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_If.gif. Moved existing file to net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_If.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_SingleInstruction.gif. Moved existing file to net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_SingleInstruction.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_While.gif. Moved existing file to net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_While.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_WhileLanguageInstruction.gif. Moved existing file to net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_WhileLanguageInstruction.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/obj16/BooleanExpression.gif. Moved existing file to net.launchpad.vide.edit/icons/full/obj16/BooleanExpression.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/obj16/If.gif. Moved existing file to net.launchpad.vide.edit/icons/full/obj16/If.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/obj16/SingleInstruction.gif. Moved existing file to net.launchpad.vide.edit/icons/full/obj16/SingleInstruction.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/obj16/While.gif. Moved existing file to net.launchpad.vide.edit/icons/full/obj16/While.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/obj16/WhileLanguageAlgorithm.gif. Moved existing file to net.launchpad.vide.edit/icons/full/obj16/WhileLanguageAlgorithm.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/obj16/WhileLanguageBlock.gif. Moved existing file to net.launchpad.vide.edit/icons/full/obj16/WhileLanguageBlock.gif.moved. Conflict adding file net.launchpad.vide.edit/icons/full/obj16/WhileLanguageInstruction.gif. Moved existing file to net.launchpad.vide.edit/icons/full/obj16/WhileLanguageInstruction.gif.moved. Text conflict in net.launchpad.vide.edit/plugin.properties Conflict adding file net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java. Moved existing file to net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java.moved. Conflict adding file net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java. Moved existing file to net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java.moved. Conflict adding file net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java. Moved existing file to net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java.moved. Conflict adding file net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java. Moved existing file to net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java.moved. Conflict adding file net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java. Moved existing file to net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java.moved. Conflict adding file net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java. Moved existing file to net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java.moved. Conflict adding file net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java. Moved existing file to net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java.moved. Text conflict in net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/Algorithm.java Text conflict in net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/AlgorithmPackage.java Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/BooleanExpression.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/BooleanExpression.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/If.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/If.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/SingleInstruction.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/SingleInstruction.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/While.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/While.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageAlgorithm.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageAlgorithm.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageBlock.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageBlock.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageInstruction.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/WhileLanguageInstruction.java.moved. Text conflict in net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/AlgorithmImpl.java Text conflict in net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/AlgorithmPackageImpl.java Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/BooleanExpressionImpl.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/BooleanExpressionImpl.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/IfImpl.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/IfImpl.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/SingleInstructionImpl.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/SingleInstructionImpl.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileImpl.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileImpl.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageAlgorithmImpl.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageAlgorithmImpl.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageBlockImpl.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageBlockImpl.java.moved. Conflict adding file net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageInstructionImpl.java. Moved existing file to net.launchpad.vide.flowchart/src/net/launchpad/vide/algorithm/impl/WhileLanguageInstructionImpl.java.moved. Text conflict in net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/AlgorithmTest.java Conflict adding file net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/BooleanExpressionTest.java. Moved existing file to net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/BooleanExpressionTest.java.moved. Conflict adding file net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/IfTest.java. Moved existing file to net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/IfTest.java.moved. Conflict adding file net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/SingleInstructionTest.java. Moved existing file to net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/SingleInstructionTest.java.moved. Conflict adding file net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageAlgorithmTest.java. Moved existing file to net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageAlgorithmTest.java.moved. Conflict adding file net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageBlockTest.java. Moved existing file to net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageBlockTest.java.moved. Conflict adding file net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageInstructionTest.java. Moved existing file to net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileLanguageInstructionTest.java.moved. Conflict adding file net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileTest.java. Moved existing file to net.launchpad.vide.tests/src/net/launchpad/vide/algorithm/tests/WhileTest.java.moved. |
To merge this branch: | bzr merge lp:~xjax/vide/ifdev |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dražen Lučanin | Pending | ||
Review via email:
|
Commit message
Description of the change
Ivan's changes. Dražen, review this.
To post a comment you must log in.
lp:~xjax/vide/ifdev
updated
- 24. By Ivan Fabek
-
Added "batch" validation on blocks' commands. Every block mustn't have empty commands.
(test on gmf/emf options on constrains) - 25. By Ivan Fabek
-
Removed bin folders, ready for merge.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed directory 'net.launchpad.vide.acceleo.example' |
2 | === removed file 'net.launchpad.vide.acceleo.example/.classpath' |
3 | --- net.launchpad.vide.acceleo.example/.classpath 2011-01-09 14:46:59 +0000 |
4 | +++ net.launchpad.vide.acceleo.example/.classpath 1970-01-01 00:00:00 +0000 |
5 | @@ -1,6 +0,0 @@ |
6 | -<?xml version="1.0" encoding="UTF-8"?> |
7 | -<classpath> |
8 | - <classpathentry kind="src" path="src"/> |
9 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> |
10 | - <classpathentry kind="output" path="bin"/> |
11 | -</classpath> |
12 | |
13 | === removed file 'net.launchpad.vide.acceleo.example/.project' |
14 | --- net.launchpad.vide.acceleo.example/.project 2011-01-09 14:46:59 +0000 |
15 | +++ net.launchpad.vide.acceleo.example/.project 1970-01-01 00:00:00 +0000 |
16 | @@ -1,23 +0,0 @@ |
17 | -<?xml version="1.0" encoding="UTF-8"?> |
18 | -<projectDescription> |
19 | - <name>net.launchpad.vide.acceleo.example</name> |
20 | - <comment></comment> |
21 | - <projects> |
22 | - </projects> |
23 | - <buildSpec> |
24 | - <buildCommand> |
25 | - <name>org.python.pydev.PyDevBuilder</name> |
26 | - <arguments> |
27 | - </arguments> |
28 | - </buildCommand> |
29 | - <buildCommand> |
30 | - <name>org.eclipse.jdt.core.javabuilder</name> |
31 | - <arguments> |
32 | - </arguments> |
33 | - </buildCommand> |
34 | - </buildSpec> |
35 | - <natures> |
36 | - <nature>org.eclipse.jdt.core.javanature</nature> |
37 | - <nature>org.python.pydev.pythonNature</nature> |
38 | - </natures> |
39 | -</projectDescription> |
40 | |
41 | === removed file 'net.launchpad.vide.acceleo.example/.pydevproject' |
42 | --- net.launchpad.vide.acceleo.example/.pydevproject 2011-01-09 14:46:59 +0000 |
43 | +++ net.launchpad.vide.acceleo.example/.pydevproject 1970-01-01 00:00:00 +0000 |
44 | @@ -1,7 +0,0 @@ |
45 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
46 | -<?eclipse-pydev version="1.0"?> |
47 | - |
48 | -<pydev_project> |
49 | -<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> |
50 | -<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property> |
51 | -</pydev_project> |
52 | |
53 | === removed directory 'net.launchpad.vide.acceleo.example/.settings' |
54 | === removed file 'net.launchpad.vide.acceleo.example/.settings/org.eclipse.core.resources.prefs' |
55 | --- net.launchpad.vide.acceleo.example/.settings/org.eclipse.core.resources.prefs 2011-02-06 00:10:56 +0000 |
56 | +++ net.launchpad.vide.acceleo.example/.settings/org.eclipse.core.resources.prefs 1970-01-01 00:00:00 +0000 |
57 | @@ -1,8 +0,0 @@ |
58 | -#Mon Jan 10 13:56:44 CET 2011 |
59 | -eclipse.preferences.version=1 |
60 | -encoding//model/Euclid.flowchart=UTF-8 |
61 | -encoding//model/default.algorithm=UTF-8 |
62 | -encoding//model/default.flowchart=UTF-8 |
63 | -encoding//model/euclid.algorithm=UTF-8 |
64 | -encoding//model/example.flowchart=UTF-8 |
65 | -encoding//model/simple.flowchart=UTF-8 |
66 | |
67 | === removed file 'net.launchpad.vide.acceleo.example/.settings/org.eclipse.jdt.core.prefs' |
68 | --- net.launchpad.vide.acceleo.example/.settings/org.eclipse.jdt.core.prefs 2011-01-09 14:46:59 +0000 |
69 | +++ net.launchpad.vide.acceleo.example/.settings/org.eclipse.jdt.core.prefs 1970-01-01 00:00:00 +0000 |
70 | @@ -1,12 +0,0 @@ |
71 | -#Sun Jan 09 03:01:15 CET 2011 |
72 | -eclipse.preferences.version=1 |
73 | -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
74 | -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 |
75 | -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve |
76 | -org.eclipse.jdt.core.compiler.compliance=1.6 |
77 | -org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
78 | -org.eclipse.jdt.core.compiler.debug.localVariable=generate |
79 | -org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
80 | -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
81 | -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
82 | -org.eclipse.jdt.core.compiler.source=1.6 |
83 | |
84 | === removed directory 'net.launchpad.vide.acceleo.example/model' |
85 | === removed file 'net.launchpad.vide.acceleo.example/model/Euclid.flowchart' |
86 | --- net.launchpad.vide.acceleo.example/model/Euclid.flowchart 2011-02-06 00:10:56 +0000 |
87 | +++ net.launchpad.vide.acceleo.example/model/Euclid.flowchart 1970-01-01 00:00:00 +0000 |
88 | @@ -1,94 +0,0 @@ |
89 | -<?xml version="1.0" encoding="UTF-8"?> |
90 | -<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:algorithm="http://algorithm/1.0" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_j7M-AByyEeCQQYbceWEqDQ" type="Algorithm" name="Euclid.flowchart" measurementUnit="Pixel"> |
91 | - <children xmi:type="notation:Shape" xmi:id="_kbm8YByyEeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
92 | - <children xmi:type="notation:DecorationNode" xmi:id="_kboKgByyEeCQQYbceWEqDQ" type="5002"/> |
93 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.0"/> |
94 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kbm8YRyyEeCQQYbceWEqDQ" x="185" y="100"/> |
95 | - </children> |
96 | - <children xmi:type="notation:Shape" xmi:id="_mFr4kByyEeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
97 | - <children xmi:type="notation:DecorationNode" xmi:id="_mFsfoByyEeCQQYbceWEqDQ" type="5002"/> |
98 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.1"/> |
99 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mFr4kRyyEeCQQYbceWEqDQ" x="205" y="185"/> |
100 | - </children> |
101 | - <children xmi:type="notation:Shape" xmi:id="_nqeFEByyEeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
102 | - <children xmi:type="notation:DecorationNode" xmi:id="_nqfTMByyEeCQQYbceWEqDQ" type="5002"/> |
103 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.2"/> |
104 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nqeFERyyEeCQQYbceWEqDQ" x="230" y="280"/> |
105 | - </children> |
106 | - <children xmi:type="notation:Shape" xmi:id="_rycAAByyEeCQQYbceWEqDQ" type="2003" fontName="Ubuntu"> |
107 | - <children xmi:type="notation:DecorationNode" xmi:id="_rydOIByyEeCQQYbceWEqDQ" type="5003"/> |
108 | - <element xmi:type="algorithm:Branch" href="default.algorithm#//@instructions.3"/> |
109 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rycAARyyEeCQQYbceWEqDQ" x="239" y="378"/> |
110 | - </children> |
111 | - <children xmi:type="notation:Shape" xmi:id="_tptqsByyEeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
112 | - <children xmi:type="notation:DecorationNode" xmi:id="_tpu40ByyEeCQQYbceWEqDQ" type="5002"/> |
113 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.4"/> |
114 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tptqsRyyEeCQQYbceWEqDQ" x="160" y="456"/> |
115 | - </children> |
116 | - <children xmi:type="notation:Shape" xmi:id="_zfekMByyEeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
117 | - <children xmi:type="notation:DecorationNode" xmi:id="_zffyUByyEeCQQYbceWEqDQ" type="5002"/> |
118 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.5"/> |
119 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zffLQByyEeCQQYbceWEqDQ" x="350" y="555"/> |
120 | - </children> |
121 | - <children xmi:type="notation:Shape" xmi:id="_6Q_UQByyEeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
122 | - <children xmi:type="notation:DecorationNode" xmi:id="_6Q_7UByyEeCQQYbceWEqDQ" type="5002"/> |
123 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.6"/> |
124 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6Q_UQRyyEeCQQYbceWEqDQ" x="350" y="470"/> |
125 | - </children> |
126 | - <children xmi:type="notation:Shape" xmi:id="_7Vlk0ByyEeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
127 | - <children xmi:type="notation:DecorationNode" xmi:id="_7Vmy8ByyEeCQQYbceWEqDQ" type="5002"/> |
128 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.7"/> |
129 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7Vlk0RyyEeCQQYbceWEqDQ" x="345" y="405"/> |
130 | - </children> |
131 | - <styles xmi:type="notation:DiagramStyle" xmi:id="_j7M-ARyyEeCQQYbceWEqDQ"/> |
132 | - <element xmi:type="algorithm:Algorithm" href="default.algorithm#/"/> |
133 | - <edges xmi:type="notation:Connector" xmi:id="_pI4j0ByyEeCQQYbceWEqDQ" type="4004" source="_kbm8YByyEeCQQYbceWEqDQ" target="_mFr4kByyEeCQQYbceWEqDQ"> |
134 | - <styles xmi:type="notation:FontStyle" xmi:id="_pI4j0RyyEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
135 | - <element xsi:nil="true"/> |
136 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pI4j0hyyEeCQQYbceWEqDQ" points="[0, 0, 11, -58]$[16, 38, 27, -20]"/> |
137 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pI-DYByyEeCQQYbceWEqDQ" id="(0.7701149425287356,1.0)"/> |
138 | - </edges> |
139 | - <edges xmi:type="notation:Connector" xmi:id="_p01q4ByyEeCQQYbceWEqDQ" type="4004" source="_mFr4kByyEeCQQYbceWEqDQ" target="_nqeFEByyEeCQQYbceWEqDQ"> |
140 | - <styles xmi:type="notation:FontStyle" xmi:id="_p01q4RyyEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
141 | - <element xsi:nil="true"/> |
142 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_p01q4hyyEeCQQYbceWEqDQ" points="[-1, 0, 13, -76]$[-41, 90, -27, 14]"/> |
143 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_p07xgByyEeCQQYbceWEqDQ" id="(0.53125,1.0)"/> |
144 | - </edges> |
145 | - <edges xmi:type="notation:Connector" xmi:id="_vJ5EAByyEeCQQYbceWEqDQ" type="4004" source="_nqeFEByyEeCQQYbceWEqDQ" target="_rycAAByyEeCQQYbceWEqDQ"> |
146 | - <styles xmi:type="notation:FontStyle" xmi:id="_vJ5EARyyEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
147 | - <element xsi:nil="true"/> |
148 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vJ5EAhyyEeCQQYbceWEqDQ" points="[0, 0, -10, -76]$[26, 56, 16, -20]"/> |
149 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vJ8uYByyEeCQQYbceWEqDQ" id="(0.6296296296296297,1.0)"/> |
150 | - </edges> |
151 | - <edges xmi:type="notation:Connector" xmi:id="_vrTH8ByyEeCQQYbceWEqDQ" type="4002" source="_rycAAByyEeCQQYbceWEqDQ" target="_tptqsByyEeCQQYbceWEqDQ"> |
152 | - <styles xmi:type="notation:FontStyle" xmi:id="_vrTH8RyyEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
153 | - <element xsi:nil="true"/> |
154 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vrTH8hyyEeCQQYbceWEqDQ" points="[-4, 0, 51, -68]$[-55, 0, 0, -68]$[-55, 48, 0, -20]"/> |
155 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vrXZYByyEeCQQYbceWEqDQ" id="(0.08888888888888889,0.75)"/> |
156 | - </edges> |
157 | - <edges xmi:type="notation:Connector" xmi:id="_-xm_wByyEeCQQYbceWEqDQ" type="4003" source="_rycAAByyEeCQQYbceWEqDQ" target="_7Vlk0ByyEeCQQYbceWEqDQ"> |
158 | - <styles xmi:type="notation:FontStyle" xmi:id="_-xm_wRyyEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
159 | - <element xsi:nil="true"/> |
160 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-xm_whyyEeCQQYbceWEqDQ" points="[11, 2, -78, -22]$[86, 16, -3, -8]"/> |
161 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-xrRMByyEeCQQYbceWEqDQ" id="(0.7555555555555555,0.275)"/> |
162 | - <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-xrRMRyyEeCQQYbceWEqDQ" id="(0.3953488372093023,0.2)"/> |
163 | - </edges> |
164 | - <edges xmi:type="notation:Connector" xmi:id="__owqMByyEeCQQYbceWEqDQ" type="4004" source="_7Vlk0ByyEeCQQYbceWEqDQ" target="_6Q_UQByyEeCQQYbceWEqDQ"> |
165 | - <styles xmi:type="notation:FontStyle" xmi:id="__oxRQByyEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
166 | - <element xsi:nil="true"/> |
167 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="__oxRQRyyEeCQQYbceWEqDQ" points="[0, 0, 1, -45]$[6, 65, 7, 20]"/> |
168 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="__o0UkByyEeCQQYbceWEqDQ" id="(0.6046511627906976,1.0)"/> |
169 | - </edges> |
170 | - <edges xmi:type="notation:Connector" xmi:id="_AMzycByzEeCQQYbceWEqDQ" type="4004" source="_6Q_UQByyEeCQQYbceWEqDQ" target="_zfekMByyEeCQQYbceWEqDQ"> |
171 | - <styles xmi:type="notation:FontStyle" xmi:id="_AM0ZgByzEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
172 | - <element xsi:nil="true"/> |
173 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_AM0ZgRyzEeCQQYbceWEqDQ" points="[0, 0, 12, -65]$[-11, 45, 1, -20]"/> |
174 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_AM4q8ByzEeCQQYbceWEqDQ" id="(0.65,0.975)"/> |
175 | - </edges> |
176 | - <edges xmi:type="notation:Connector" xmi:id="_CC2HAByzEeCQQYbceWEqDQ" type="4004" source="_zfekMByyEeCQQYbceWEqDQ" target="_nqeFEByyEeCQQYbceWEqDQ"> |
177 | - <styles xmi:type="notation:FontStyle" xmi:id="_CC2HARyzEeCQQYbceWEqDQ" fontName="Ubuntu"/> |
178 | - <element xsi:nil="true"/> |
179 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CC2HAhyzEeCQQYbceWEqDQ" points="[0, 0, 135, 291]$[73, -11, 208, 280]$[73, -291, 208, 0]$[-108, -291, 27, 0]"/> |
180 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CC8NoByzEeCQQYbceWEqDQ" id="(1.0,0.9)"/> |
181 | - </edges> |
182 | -</notation:Diagram> |
183 | |
184 | === removed file 'net.launchpad.vide.acceleo.example/model/default.algorithm' |
185 | --- net.launchpad.vide.acceleo.example/model/default.algorithm 2011-02-06 00:10:56 +0000 |
186 | +++ net.launchpad.vide.acceleo.example/model/default.algorithm 1970-01-01 00:00:00 +0000 |
187 | @@ -1,7 +0,0 @@ |
188 | -<?xml version="1.0" encoding="UTF-8"?> |
189 | -<algorithm:Algorithm xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:algorithm="http://algorithm/1.0"> |
190 | - <instructions xsi:type="algorithm:Block" commands="a = raw_input()" next="//@instructions.1"/> |
191 | - <instructions xsi:type="algorithm:Block" commands="a=a+2" next="//@instructions.2"/> |
192 | - <instructions xsi:type="algorithm:Branch" condtion="a>0" true="//@instructions.3"/> |
193 | - <instructions xsi:type="algorithm:Block" commands="print a" next="//@instructions.1"/> |
194 | -</algorithm:Algorithm> |
195 | |
196 | === removed file 'net.launchpad.vide.acceleo.example/model/default.flowchart' |
197 | --- net.launchpad.vide.acceleo.example/model/default.flowchart 2011-02-06 00:10:56 +0000 |
198 | +++ net.launchpad.vide.acceleo.example/model/default.flowchart 1970-01-01 00:00:00 +0000 |
199 | @@ -1,49 +0,0 @@ |
200 | -<?xml version="1.0" encoding="UTF-8"?> |
201 | -<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:algorithm="http://algorithm/1.0" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_E25UQBy5EeCQQYbceWEqDQ" type="Algorithm" name="default.flowchart" measurementUnit="Pixel"> |
202 | - <children xmi:type="notation:Shape" xmi:id="_FRu2IBy5EeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
203 | - <children xmi:type="notation:DecorationNode" xmi:id="_FRwEQBy5EeCQQYbceWEqDQ" type="5002"/> |
204 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.0"/> |
205 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FRu2IRy5EeCQQYbceWEqDQ" x="186" y="91"/> |
206 | - </children> |
207 | - <children xmi:type="notation:Shape" xmi:id="_GrkW4By5EeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
208 | - <children xmi:type="notation:DecorationNode" xmi:id="_Grk98By5EeCQQYbceWEqDQ" type="5002"/> |
209 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.1"/> |
210 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GrkW4Ry5EeCQQYbceWEqDQ" x="212" y="210"/> |
211 | - </children> |
212 | - <children xmi:type="notation:Shape" xmi:id="_Nrn5QBy5EeCQQYbceWEqDQ" type="2003" fontName="Ubuntu"> |
213 | - <children xmi:type="notation:DecorationNode" xmi:id="_NrogUBy5EeCQQYbceWEqDQ" type="5003"/> |
214 | - <element xmi:type="algorithm:Branch" href="default.algorithm#//@instructions.2"/> |
215 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nrn5QRy5EeCQQYbceWEqDQ" x="225" y="310"/> |
216 | - </children> |
217 | - <children xmi:type="notation:Shape" xmi:id="_Pr6WABy5EeCQQYbceWEqDQ" type="2002" fontName="Ubuntu"> |
218 | - <children xmi:type="notation:DecorationNode" xmi:id="_Pr7kIBy5EeCQQYbceWEqDQ" type="5002"/> |
219 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.3"/> |
220 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Pr6WARy5EeCQQYbceWEqDQ" x="340" y="375"/> |
221 | - </children> |
222 | - <styles xmi:type="notation:DiagramStyle" xmi:id="_E25UQRy5EeCQQYbceWEqDQ"/> |
223 | - <element xmi:type="algorithm:Algorithm" href="default.algorithm#/"/> |
224 | - <edges xmi:type="notation:Connector" xmi:id="_H8UNEBy5EeCQQYbceWEqDQ" type="4004" source="_FRu2IBy5EeCQQYbceWEqDQ" target="_GrkW4By5EeCQQYbceWEqDQ"> |
225 | - <styles xmi:type="notation:FontStyle" xmi:id="_H8UNERy5EeCQQYbceWEqDQ" fontName="Ubuntu"/> |
226 | - <element xsi:nil="true"/> |
227 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_H8UNEhy5EeCQQYbceWEqDQ" points="[0, 0, 18, -99]$[8, 86, 26, -13]"/> |
228 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_H8ZFkBy5EeCQQYbceWEqDQ" id="(0.4752475247524752,1.0)"/> |
229 | - </edges> |
230 | - <edges xmi:type="notation:Connector" xmi:id="_O2fw8By5EeCQQYbceWEqDQ" type="4004" source="_GrkW4By5EeCQQYbceWEqDQ" target="_Nrn5QBy5EeCQQYbceWEqDQ"> |
231 | - <styles xmi:type="notation:FontStyle" xmi:id="_O2fw8Ry5EeCQQYbceWEqDQ" fontName="Ubuntu"/> |
232 | - <element xsi:nil="true"/> |
233 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_O2fw8hy5EeCQQYbceWEqDQ" points="[0, 0, -11, -84]$[31, 85, 20, 1]"/> |
234 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_O2jbUBy5EeCQQYbceWEqDQ" id="(0.6538461538461539,1.0)"/> |
235 | - </edges> |
236 | - <edges xmi:type="notation:Connector" xmi:id="_TGdKQBy5EeCQQYbceWEqDQ" type="4002" source="_Nrn5QBy5EeCQQYbceWEqDQ" target="_Pr6WABy5EeCQQYbceWEqDQ"> |
237 | - <styles xmi:type="notation:FontStyle" xmi:id="_TGdKQRy5EeCQQYbceWEqDQ" fontName="Ubuntu"/> |
238 | - <element xsi:nil="true"/> |
239 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_TGdKQhy5EeCQQYbceWEqDQ" points="[20, 0, -102, -65]$[122, 0, 0, -65]$[122, 45, 0, -20]"/> |
240 | - </edges> |
241 | - <edges xmi:type="notation:Connector" xmi:id="_U2dvUBy5EeCQQYbceWEqDQ" type="4004" source="_Pr6WABy5EeCQQYbceWEqDQ" target="_GrkW4By5EeCQQYbceWEqDQ"> |
242 | - <styles xmi:type="notation:FontStyle" xmi:id="_U2dvURy5EeCQQYbceWEqDQ" fontName="Ubuntu"/> |
243 | - <element xsi:nil="true"/> |
244 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_U2dvUhy5EeCQQYbceWEqDQ" points="[0, 0, 143, 170]$[65, 0, 208, 170]$[65, -161, 208, 9]$[-131, -170, 12, 0]"/> |
245 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_U2j18By5EeCQQYbceWEqDQ" id="(1.0,0.525)"/> |
246 | - <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_U2j18Ry5EeCQQYbceWEqDQ" id="(0.7692307692307693,0.4)"/> |
247 | - </edges> |
248 | -</notation:Diagram> |
249 | |
250 | === removed file 'net.launchpad.vide.acceleo.example/model/euclid.algorithm' |
251 | --- net.launchpad.vide.acceleo.example/model/euclid.algorithm 2011-02-06 00:10:56 +0000 |
252 | +++ net.launchpad.vide.acceleo.example/model/euclid.algorithm 1970-01-01 00:00:00 +0000 |
253 | @@ -1,11 +0,0 @@ |
254 | -<?xml version="1.0" encoding="UTF-8"?> |
255 | -<algorithm:Algorithm xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:algorithm="http://algorithm/1.0"> |
256 | - <instructions xsi:type="algorithm:Block" commands="a=raw_input" next="//@instructions.1"/> |
257 | - <instructions xsi:type="algorithm:Block" commands="b=raw_input()" next="//@instructions.2"/> |
258 | - <instructions xsi:type="algorithm:Block" commands="r=a%b" next="//@instructions.3"/> |
259 | - <instructions xsi:type="algorithm:Branch" condtion="r==0" false="//@instructions.7" true="//@instructions.4"/> |
260 | - <instructions xsi:type="algorithm:Block" commands="print b"/> |
261 | - <instructions xsi:type="algorithm:Block" commands="a=m" next="//@instructions.2"/> |
262 | - <instructions xsi:type="algorithm:Block" commands="b=r" next="//@instructions.5"/> |
263 | - <instructions xsi:type="algorithm:Block" commands="m=b" next="//@instructions.6"/> |
264 | -</algorithm:Algorithm> |
265 | |
266 | === removed file 'net.launchpad.vide.acceleo.example/model/example.flowchart' |
267 | --- net.launchpad.vide.acceleo.example/model/example.flowchart 2011-02-06 00:10:56 +0000 |
268 | +++ net.launchpad.vide.acceleo.example/model/example.flowchart 1970-01-01 00:00:00 +0000 |
269 | @@ -1,5 +0,0 @@ |
270 | -<?xml version="1.0" encoding="UTF-8"?> |
271 | -<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:algorithm="http://algorithm/1.0" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_GkCsMByxEeCJuNEx5cTwyQ" type="Algorithm" name="default.flowchart" measurementUnit="Pixel"> |
272 | - <styles xmi:type="notation:DiagramStyle" xmi:id="_GkCsMRyxEeCJuNEx5cTwyQ"/> |
273 | - <element xmi:type="algorithm:Algorithm" href="default2.algorithm#/"/> |
274 | -</notation:Diagram> |
275 | |
276 | === removed file 'net.launchpad.vide.acceleo.example/model/simple.flowchart' |
277 | --- net.launchpad.vide.acceleo.example/model/simple.flowchart 2011-01-09 14:46:59 +0000 |
278 | +++ net.launchpad.vide.acceleo.example/model/simple.flowchart 1970-01-01 00:00:00 +0000 |
279 | @@ -1,56 +0,0 @@ |
280 | -<?xml version="1.0" encoding="UTF-8"?> |
281 | -<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:algorithm="http://algorithm/1.0" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_G8Pm8RuXEeC54OY28Qgd5Q" type="Algorithm" name="simple.flowchart" measurementUnit="Pixel"> |
282 | - <children xmi:type="notation:Shape" xmi:id="_Hx8f4BuXEeC54OY28Qgd5Q" type="2002" fontName="Ubuntu"> |
283 | - <children xmi:type="notation:DecorationNode" xmi:id="_Hx_jMBuXEeC54OY28Qgd5Q" type="5002"/> |
284 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.0"/> |
285 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Hx8f4RuXEeC54OY28Qgd5Q" x="500" y="125"/> |
286 | - </children> |
287 | - <children xmi:type="notation:Shape" xmi:id="_J_QsABuXEeC54OY28Qgd5Q" type="2002" fontName="Ubuntu"> |
288 | - <children xmi:type="notation:DecorationNode" xmi:id="_J_RTEBuXEeC54OY28Qgd5Q" type="5002"/> |
289 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.1"/> |
290 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_J_QsARuXEeC54OY28Qgd5Q" x="495" y="270"/> |
291 | - </children> |
292 | - <children xmi:type="notation:Shape" xmi:id="_OKt_0BuXEeC54OY28Qgd5Q" type="2002" fontName="Ubuntu"> |
293 | - <children xmi:type="notation:DecorationNode" xmi:id="_OKvN8BuXEeC54OY28Qgd5Q" type="5002"/> |
294 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.2"/> |
295 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OKt_0RuXEeC54OY28Qgd5Q" x="490" y="340"/> |
296 | - </children> |
297 | - <children xmi:type="notation:Shape" xmi:id="_EIROABuYEeC54OY28Qgd5Q" type="2002" fontName="Ubuntu"> |
298 | - <children xmi:type="notation:DecorationNode" xmi:id="_EIR1EBuYEeC54OY28Qgd5Q" type="5002"/> |
299 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.3"/> |
300 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EIROARuYEeC54OY28Qgd5Q" x="514" y="33"/> |
301 | - </children> |
302 | - <children xmi:type="notation:Shape" xmi:id="_LFDZ8BuYEeC54OY28Qgd5Q" type="2002" fontName="Ubuntu"> |
303 | - <children xmi:type="notation:DecorationNode" xmi:id="_LFEoEBuYEeC54OY28Qgd5Q" type="5002"/> |
304 | - <element xmi:type="algorithm:Block" href="default.algorithm#//@instructions.4"/> |
305 | - <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LFDZ8RuYEeC54OY28Qgd5Q" x="490" y="195"/> |
306 | - </children> |
307 | - <styles xmi:type="notation:DiagramStyle" xmi:id="_G8Pm8huXEeC54OY28Qgd5Q"/> |
308 | - <element xmi:type="algorithm:Algorithm" href="default.algorithm#/"/> |
309 | - <edges xmi:type="notation:Connector" xmi:id="_Nh33IBuXEeC54OY28Qgd5Q" type="4004" source="_Hx8f4BuXEeC54OY28Qgd5Q" target="_LFDZ8BuYEeC54OY28Qgd5Q"> |
310 | - <styles xmi:type="notation:FontStyle" xmi:id="_Nh33IRuXEeC54OY28Qgd5Q" fontName="Ubuntu"/> |
311 | - <element xsi:nil="true"/> |
312 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Nh33IhuXEeC54OY28Qgd5Q" points="[0, 0, -4, -82]$[4, 80, 0, -2]"/> |
313 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NibQwBuXEeC54OY28Qgd5Q" id="(0.5052631578947369,1.0)"/> |
314 | - <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Nib30BuXEeC54OY28Qgd5Q" id="(0.5737704918032787,0.15)"/> |
315 | - </edges> |
316 | - <edges xmi:type="notation:Connector" xmi:id="_RdoiEBuXEeC54OY28Qgd5Q" type="4004" source="_J_QsABuXEeC54OY28Qgd5Q" target="_OKt_0BuXEeC54OY28Qgd5Q"> |
317 | - <styles xmi:type="notation:FontStyle" xmi:id="_RdoiERuXEeC54OY28Qgd5Q" fontName="Ubuntu"/> |
318 | - <element xsi:nil="true"/> |
319 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_RdoiEhuXEeC54OY28Qgd5Q" points="[0, 0, -3, -86]$[5, 117, 2, 31]"/> |
320 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Rdwd4BuXEeC54OY28Qgd5Q" id="(0.7058823529411765,1.0)"/> |
321 | - <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Rdwd4RuXEeC54OY28Qgd5Q" id="(0.48214285714285715,0.225)"/> |
322 | - </edges> |
323 | - <edges xmi:type="notation:Connector" xmi:id="_KoCGwBuYEeC54OY28Qgd5Q" type="4004" source="_EIROABuYEeC54OY28Qgd5Q" target="_Hx8f4BuXEeC54OY28Qgd5Q"> |
324 | - <styles xmi:type="notation:FontStyle" xmi:id="_KoCGwRuYEeC54OY28Qgd5Q" fontName="Ubuntu"/> |
325 | - <element xsi:nil="true"/> |
326 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KoCGwhuYEeC54OY28Qgd5Q" points="[0, 0, 257, -22]$[-257, 2, 0, -20]"/> |
327 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KoINYBuYEeC54OY28Qgd5Q" id="(0.5136986301369864,1.0)"/> |
328 | - </edges> |
329 | - <edges xmi:type="notation:Connector" xmi:id="_OEaHABuYEeC54OY28Qgd5Q" type="4004" source="_LFDZ8BuYEeC54OY28Qgd5Q" target="_J_QsABuXEeC54OY28Qgd5Q"> |
330 | - <styles xmi:type="notation:FontStyle" xmi:id="_OEauEBuYEeC54OY28Qgd5Q" fontName="Ubuntu"/> |
331 | - <element xsi:nil="true"/> |
332 | - <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OEauERuYEeC54OY28Qgd5Q" points="[-35, -4, 165, 21]$[-225, -37, -25, -12]"/> |
333 | - <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OEhbwBuYEeC54OY28Qgd5Q" id="(0.5737704918032787,1.0)"/> |
334 | - </edges> |
335 | -</notation:Diagram> |
336 | |
337 | === removed directory 'net.launchpad.vide.acceleo.example/src' |
338 | === removed file 'net.launchpad.vide.acceleo.example/src/default.py' |
339 | --- net.launchpad.vide.acceleo.example/src/default.py 2011-01-09 14:46:59 +0000 |
340 | +++ net.launchpad.vide.acceleo.example/src/default.py 1970-01-01 00:00:00 +0000 |
341 | @@ -1,5 +0,0 @@ |
342 | -print "write a number:" |
343 | -a=raw_input() |
344 | -a=int(a) |
345 | -b=a*a |
346 | -print b |
347 | |
348 | === removed directory 'net.launchpad.vide.algorithm2code' |
349 | === removed file 'net.launchpad.vide.algorithm2code/.classpath' |
350 | --- net.launchpad.vide.algorithm2code/.classpath 2011-01-09 14:46:59 +0000 |
351 | +++ net.launchpad.vide.algorithm2code/.classpath 1970-01-01 00:00:00 +0000 |
352 | @@ -1,7 +0,0 @@ |
353 | -<?xml version="1.0" encoding="UTF-8"?> |
354 | -<classpath> |
355 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> |
356 | - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
357 | - <classpathentry kind="src" path="src"/> |
358 | - <classpathentry kind="output" path="bin"/> |
359 | -</classpath> |
360 | |
361 | === removed file 'net.launchpad.vide.algorithm2code/.project' |
362 | --- net.launchpad.vide.algorithm2code/.project 2011-01-09 14:46:59 +0000 |
363 | +++ net.launchpad.vide.algorithm2code/.project 1970-01-01 00:00:00 +0000 |
364 | @@ -1,34 +0,0 @@ |
365 | -<?xml version="1.0" encoding="UTF-8"?> |
366 | -<projectDescription> |
367 | - <name>net.launchpad.vide.algorithm2code</name> |
368 | - <comment></comment> |
369 | - <projects> |
370 | - </projects> |
371 | - <buildSpec> |
372 | - <buildCommand> |
373 | - <name>org.eclipse.jdt.core.javabuilder</name> |
374 | - <arguments> |
375 | - </arguments> |
376 | - </buildCommand> |
377 | - <buildCommand> |
378 | - <name>org.eclipse.pde.ManifestBuilder</name> |
379 | - <arguments> |
380 | - </arguments> |
381 | - </buildCommand> |
382 | - <buildCommand> |
383 | - <name>org.eclipse.pde.SchemaBuilder</name> |
384 | - <arguments> |
385 | - </arguments> |
386 | - </buildCommand> |
387 | - <buildCommand> |
388 | - <name>org.eclipse.acceleo.ide.ui.acceleoBuilder</name> |
389 | - <arguments> |
390 | - </arguments> |
391 | - </buildCommand> |
392 | - </buildSpec> |
393 | - <natures> |
394 | - <nature>org.eclipse.acceleo.ide.ui.acceleoNature</nature> |
395 | - <nature>org.eclipse.pde.PluginNature</nature> |
396 | - <nature>org.eclipse.jdt.core.javanature</nature> |
397 | - </natures> |
398 | -</projectDescription> |
399 | |
400 | === removed directory 'net.launchpad.vide.algorithm2code/.settings' |
401 | === removed file 'net.launchpad.vide.algorithm2code/.settings/org.eclipse.jdt.core.prefs' |
402 | --- net.launchpad.vide.algorithm2code/.settings/org.eclipse.jdt.core.prefs 2011-01-09 14:46:59 +0000 |
403 | +++ net.launchpad.vide.algorithm2code/.settings/org.eclipse.jdt.core.prefs 1970-01-01 00:00:00 +0000 |
404 | @@ -1,6 +0,0 @@ |
405 | -eclipse.preferences.version=1 |
406 | -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 |
407 | -org.eclipse.jdt.core.compiler.compliance=1.5 |
408 | -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
409 | -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
410 | -org.eclipse.jdt.core.compiler.source=1.5 |
411 | |
412 | === removed directory 'net.launchpad.vide.algorithm2code/META-INF' |
413 | === removed file 'net.launchpad.vide.algorithm2code/META-INF/MANIFEST.MF' |
414 | --- net.launchpad.vide.algorithm2code/META-INF/MANIFEST.MF 2011-01-09 14:46:59 +0000 |
415 | +++ net.launchpad.vide.algorithm2code/META-INF/MANIFEST.MF 1970-01-01 00:00:00 +0000 |
416 | @@ -1,18 +0,0 @@ |
417 | -Manifest-Version: 1.0 |
418 | -Bundle-ManifestVersion: 2 |
419 | -Bundle-Name: Acceleo Algorithm2code Module Runtime Plug-in |
420 | -Bundle-SymbolicName: net.launchpad.vide.algorithm2code |
421 | -Bundle-Version: 1.0.0.qualifier |
422 | -Bundle-Activator: net.launchpad.vide.algorithm2code.Activator |
423 | -Bundle-Vendor: Eclipse Modeling Project |
424 | -Require-Bundle: org.eclipse.core.runtime, |
425 | - org.eclipse.emf.ecore, |
426 | - org.eclipse.emf.ecore.xmi, |
427 | - org.eclipse.ocl, |
428 | - org.eclipse.ocl.ecore, |
429 | - org.eclipse.acceleo.model, |
430 | - org.eclipse.acceleo.engine |
431 | -Bundle-RequiredExecutionEnvironment: J2SE-1.5 |
432 | -Bundle-ActivationPolicy: lazy |
433 | -Eclipse-LazyStart: true |
434 | -Export-Package: net.launchpad.vide.algorithm2code.files |
435 | |
436 | === removed file 'net.launchpad.vide.algorithm2code/build.acceleo' |
437 | --- net.launchpad.vide.algorithm2code/build.acceleo 2011-01-09 14:46:59 +0000 |
438 | +++ net.launchpad.vide.algorithm2code/build.acceleo 1970-01-01 00:00:00 +0000 |
439 | @@ -1,28 +0,0 @@ |
440 | -<!-- ===================================================================== --> |
441 | -<!-- Custom targets. --> |
442 | -<!-- Set customBuildCallbacks = build.acceleo in your build.properties. --> |
443 | -<!-- ===================================================================== --> |
444 | -<project name="Build Acceleo Module" default="noDefault"> |
445 | - |
446 | - <!-- ================================================================= --> |
447 | - <!-- Default target --> |
448 | - <!-- ================================================================= --> |
449 | - <target name="noDefault"> |
450 | - <echo message="This file must be called with explicit targets" /> |
451 | - </target> |
452 | - |
453 | - <!-- ================================================================= --> |
454 | - <!-- Steps to do after the target gather.bin.parts --> |
455 | - <!-- Available parameters : --> |
456 | - <!-- build.result.folder - folder containing the build results --> |
457 | - <!-- target.folder - destination folder --> |
458 | - <!-- ================================================================= --> |
459 | - |
460 | - <target name="post.gather.bin.parts"> |
461 | - <acceleoCompiler |
462 | - sourceFolders="${target.folder}" |
463 | - dependencies=""> |
464 | - </acceleoCompiler> |
465 | - </target> |
466 | - |
467 | -</project> |
468 | |
469 | === removed file 'net.launchpad.vide.algorithm2code/build.properties' |
470 | --- net.launchpad.vide.algorithm2code/build.properties 2011-01-09 14:46:59 +0000 |
471 | +++ net.launchpad.vide.algorithm2code/build.properties 1970-01-01 00:00:00 +0000 |
472 | @@ -1,5 +0,0 @@ |
473 | -source.. = src/ |
474 | -output.. = bin/ |
475 | -bin.includes = META-INF/,\ |
476 | - . |
477 | -customBuildCallbacks = build.acceleo |
478 | |
479 | === removed directory 'net.launchpad.vide.algorithm2code/src' |
480 | === removed directory 'net.launchpad.vide.algorithm2code/src/net' |
481 | === removed directory 'net.launchpad.vide.algorithm2code/src/net/launchpad' |
482 | === removed directory 'net.launchpad.vide.algorithm2code/src/net/launchpad/vide' |
483 | === removed directory 'net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code' |
484 | === removed file 'net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/Activator.java' |
485 | --- net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/Activator.java 2011-01-09 14:46:59 +0000 |
486 | +++ net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/Activator.java 1970-01-01 00:00:00 +0000 |
487 | @@ -1,64 +0,0 @@ |
488 | -/******************************************************************************* |
489 | - * Copyright (c) 2008, 2010 Obeo. |
490 | - * All rights reserved. This program and the accompanying materials |
491 | - * are made available under the terms of the Eclipse Public License v1.0 |
492 | - * which accompanies this distribution, and is available at |
493 | - * http://www.eclipse.org/legal/epl-v10.html |
494 | - * |
495 | - * Contributors: |
496 | - * Obeo - initial API and implementation |
497 | - *******************************************************************************/ |
498 | -package net.launchpad.vide.algorithm2code; |
499 | - |
500 | -import org.eclipse.core.runtime.Plugin; |
501 | -import org.osgi.framework.BundleContext; |
502 | - |
503 | -/** |
504 | - * The activator class controls the plug-in life cycle. |
505 | - */ |
506 | -public class Activator extends Plugin { |
507 | - |
508 | - /** |
509 | - * The plug-in ID. |
510 | - */ |
511 | - public static final String PLUGIN_ID = "net.launchpad.vide.algorithm2code"; |
512 | - |
513 | - /** |
514 | - * The shared instance. |
515 | - */ |
516 | - private static Activator plugin; |
517 | - |
518 | - /** |
519 | - * The constructor. |
520 | - */ |
521 | - public Activator() { |
522 | - } |
523 | - |
524 | - /**{@inheritDoc} |
525 | - * |
526 | - * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) |
527 | - */ |
528 | - public void start(BundleContext context) throws Exception { |
529 | - super.start(context); |
530 | - plugin = this; |
531 | - } |
532 | - |
533 | - /**{@inheritDoc} |
534 | - * |
535 | - * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) |
536 | - */ |
537 | - public void stop(BundleContext context) throws Exception { |
538 | - plugin = null; |
539 | - super.stop(context); |
540 | - } |
541 | - |
542 | - /** |
543 | - * Returns the shared instance. |
544 | - * |
545 | - * @return the shared instance |
546 | - */ |
547 | - public static Activator getDefault() { |
548 | - return plugin; |
549 | - } |
550 | - |
551 | -} |
552 | |
553 | === removed directory 'net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files' |
554 | === removed file 'net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/Generate.java' |
555 | --- net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/Generate.java 2011-01-09 14:46:59 +0000 |
556 | +++ net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/Generate.java 1970-01-01 00:00:00 +0000 |
557 | @@ -1,270 +0,0 @@ |
558 | -/******************************************************************************* |
559 | - * Copyright (c) 2008, 2010 Obeo. |
560 | - * All rights reserved. This program and the accompanying materials |
561 | - * are made available under the terms of the Eclipse Public License v1.0 |
562 | - * which accompanies this distribution, and is available at |
563 | - * http://www.eclipse.org/legal/epl-v10.html |
564 | - * |
565 | - * Contributors: |
566 | - * Obeo - initial API and implementation |
567 | - *******************************************************************************/ |
568 | -package net.launchpad.vide.algorithm2code.files; |
569 | - |
570 | -import java.io.File; |
571 | -import java.io.IOException; |
572 | -import java.util.ArrayList; |
573 | -import java.util.List; |
574 | - |
575 | -import org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener; |
576 | -import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; |
577 | -import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; |
578 | -import org.eclipse.emf.common.util.BasicMonitor; |
579 | -import org.eclipse.emf.common.util.Monitor; |
580 | -import org.eclipse.emf.common.util.URI; |
581 | -import org.eclipse.emf.ecore.EObject; |
582 | -import org.eclipse.emf.ecore.resource.ResourceSet; |
583 | - |
584 | -/** |
585 | - * Entry point of the 'Generate' generation module. |
586 | - * |
587 | - * @generated |
588 | - */ |
589 | -public class Generate extends AbstractAcceleoGenerator { |
590 | - /** |
591 | - * The name of the module. |
592 | - * |
593 | - * @generated |
594 | - */ |
595 | - public static final String MODULE_FILE_NAME = "generate"; |
596 | - |
597 | - /** |
598 | - * The name of the templates that are to be generated. |
599 | - * |
600 | - * @generated |
601 | - */ |
602 | - public static final String[] TEMPLATE_NAMES = { "generate", }; |
603 | - |
604 | - /** |
605 | - * Allows the public constructor to be used. Note that a generator created |
606 | - * this way cannot be used to launch generations before one of |
607 | - * {@link #initialize(EObject, File, List)} or |
608 | - * {@link #initialize(URI, File, List)} is called. |
609 | - * <p> |
610 | - * The main reason for this constructor is to allow clients of this |
611 | - * generation to call it from another Java file, as it allows for the |
612 | - * retrieval of {@link #getProperties()} and |
613 | - * {@link #getGenerationListeners()}. |
614 | - * </p> |
615 | - * |
616 | - * @generated |
617 | - */ |
618 | - public Generate() { |
619 | - // Empty implementation |
620 | - } |
621 | - |
622 | - /** |
623 | - * This allows clients to instantiates a generator with all required information. |
624 | - * |
625 | - * @param modelURI |
626 | - * URI where the model on which this generator will be used is located. |
627 | - * @param targetFolder |
628 | - * This will be used as the output folder for this generation : it will be the base path |
629 | - * against which all file block URLs will be resolved. |
630 | - * @param arguments |
631 | - * If the template which will be called requires more than one argument taken from the model, |
632 | - * pass them here. |
633 | - * @throws IOException |
634 | - * This can be thrown in three scenarios : the module cannot be found, it cannot be loaded, or |
635 | - * the model cannot be loaded. |
636 | - * @generated |
637 | - */ |
638 | - public Generate(URI modelURI, File targetFolder, |
639 | - List<? extends Object> arguments) throws IOException { |
640 | - initialize(modelURI, targetFolder, arguments); |
641 | - } |
642 | - |
643 | - /** |
644 | - * This allows clients to instantiates a generator with all required information. |
645 | - * |
646 | - * @param model |
647 | - * We'll iterate over the content of this element to find Objects matching the first parameter |
648 | - * of the template we need to call. |
649 | - * @param targetFolder |
650 | - * This will be used as the output folder for this generation : it will be the base path |
651 | - * against which all file block URLs will be resolved. |
652 | - * @param arguments |
653 | - * If the template which will be called requires more than one argument taken from the model, |
654 | - * pass them here. |
655 | - * @throws IOException |
656 | - * This can be thrown in two scenarios : the module cannot be found, or it cannot be loaded. |
657 | - * @generated |
658 | - */ |
659 | - public Generate(EObject model, File targetFolder, |
660 | - List<? extends Object> arguments) throws IOException { |
661 | - initialize(model, targetFolder, arguments); |
662 | - } |
663 | - |
664 | - /** |
665 | - * This can be used to launch the generation from a standalone application. |
666 | - * |
667 | - * @param args |
668 | - * Arguments of the generation. |
669 | - * @generated |
670 | - */ |
671 | - public static void main(String[] args) { |
672 | - try { |
673 | - if (args.length < 2) { |
674 | - System.out.println("Arguments not valid : {model, folder}."); |
675 | - } else { |
676 | - URI modelURI = URI.createFileURI(args[0]); |
677 | - File folder = new File(args[1]); |
678 | - List<String> arguments = new ArrayList<String>(); |
679 | - for (int i = 2; i < args.length; i++) { |
680 | - arguments.add(args[i]); |
681 | - } |
682 | - Generate generator = new Generate(modelURI, folder, arguments); |
683 | - generator.doGenerate(new BasicMonitor()); |
684 | - } |
685 | - } catch (IOException e) { |
686 | - e.printStackTrace(); |
687 | - } |
688 | - } |
689 | - |
690 | - /** |
691 | - * Launches the generation described by this instance. |
692 | - * |
693 | - * @param monitor |
694 | - * This will be used to display progress information to the user. |
695 | - * @throws IOException |
696 | - * This will be thrown if any of the output files cannot be saved to disk. |
697 | - * @generated |
698 | - */ |
699 | - @Override |
700 | - public void doGenerate(Monitor monitor) throws IOException { |
701 | - /* |
702 | - * TODO if you wish to change the generation as a whole, override this. |
703 | - * The default behavior should be sufficient in most cases. |
704 | - */ |
705 | - super.doGenerate(monitor); |
706 | - } |
707 | - |
708 | - /** |
709 | - * If this generator needs to listen to text generation events, listeners can be returned from here. |
710 | - * |
711 | - * @return List of listeners that are to be notified when text is generated through this launch. |
712 | - * @generated |
713 | - */ |
714 | - @Override |
715 | - public List<IAcceleoTextGenerationListener> getGenerationListeners() { |
716 | - List<IAcceleoTextGenerationListener> listeners = super.getGenerationListeners(); |
717 | - // TODO if you need to listen to generation event, add listeners to the list here |
718 | - return listeners; |
719 | - } |
720 | - |
721 | - /** |
722 | - * If you need to change the way files are generated, this is your entry point. |
723 | - * <p> |
724 | - * The default is {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy}; it generates |
725 | - * files on the fly. If you only need to preview the results, return a new |
726 | - * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}. Both of these aren't aware of |
727 | - * the running Eclipse and can be used standalone. |
728 | - * </p> |
729 | - * <p> |
730 | - * If you need the file generation to be aware of the workspace (A typical example is when you wanna |
731 | - * override files that are under clear case or any other VCS that could forbid the overriding), then |
732 | - * return a new {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}. |
733 | - * <b>Note</b>, however, that this <b>cannot</b> be used standalone. |
734 | - * </p> |
735 | - * <p> |
736 | - * All three of these default strategies support merging through JMerge. |
737 | - * </p> |
738 | - * |
739 | - * @return The generation strategy that is to be used for generations launched through this launcher. |
740 | - * @generated |
741 | - */ |
742 | - public IAcceleoGenerationStrategy getGenerationStrategy() { |
743 | - return super.getGenerationStrategy(); |
744 | - } |
745 | - |
746 | - /** |
747 | - * This will be called in order to find and load the module that will be launched through this launcher. |
748 | - * We expect this name not to contain file extension, and the module to be located beside the launcher. |
749 | - * |
750 | - * @return The name of the module that is to be launched. |
751 | - * @generated |
752 | - */ |
753 | - @Override |
754 | - public String getModuleName() { |
755 | - return MODULE_FILE_NAME; |
756 | - } |
757 | - |
758 | - /** |
759 | - * If the module(s) called by this launcher require properties files, return their qualified path from |
760 | - * here.Take note that the first added properties files will take precedence over subsequent ones if they |
761 | - * contain conflicting keys. |
762 | - * <p> |
763 | - * Properties need to be in source folders, the path that we expect to get as a result of this call are of |
764 | - * the form <package>.<properties file name without extension>. For example, if you have a file |
765 | - * named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by |
766 | - * a call to {@link #getProperties()} is "org.eclipse.acceleo.sample.messages". |
767 | - * </p> |
768 | - * |
769 | - * @return The list of properties file we need to add to the generation context. |
770 | - * @see java.util.ResourceBundle#getBundle(String) |
771 | - * @generated |
772 | - */ |
773 | - @Override |
774 | - public List<String> getProperties() { |
775 | - List<String> propertiesFiles = super.getProperties(); |
776 | - /* |
777 | - * TODO if your generation module requires access to properties files, |
778 | - * add their qualified path to the list here. Properties files are |
779 | - * expected to be in source folders, and the path here to be the |
780 | - * qualified path as if referring to a Java class. For example, if you |
781 | - * have a file named "messages.properties" in package |
782 | - * "org.eclipse.acceleo.sample", the path that needs be added to this |
783 | - * list is "org.eclipse.acceleo.sample.messages". |
784 | - */ |
785 | - return propertiesFiles; |
786 | - } |
787 | - |
788 | - /** |
789 | - * This will be used to get the list of templates that are to be launched by this launcher. |
790 | - * |
791 | - * @return The list of templates to call on the module {@link #getModuleName()}. |
792 | - * @generated |
793 | - */ |
794 | - @Override |
795 | - public String[] getTemplateNames() { |
796 | - return TEMPLATE_NAMES; |
797 | - } |
798 | - |
799 | - /** |
800 | - * This can be used to update the resource set's package registry with all needed EPackages. |
801 | - * |
802 | - * @param resourceSet |
803 | - * The resource set which registry has to be updated. |
804 | - * @generated |
805 | - */ |
806 | - @Override |
807 | - public void registerPackages(ResourceSet resourceSet) { |
808 | - super.registerPackages(resourceSet); |
809 | - // TODO If you need additional package registrations, do them here. The following line is an example for UML. |
810 | - // resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); |
811 | - } |
812 | - |
813 | - /** |
814 | - * This can be used to update the resource set's resource factory registry with all needed factories. |
815 | - * |
816 | - * @param resourceSet |
817 | - * The resource set which registry has to be updated. |
818 | - * @generated |
819 | - */ |
820 | - @Override |
821 | - public void registerResourceFactories(ResourceSet resourceSet) { |
822 | - super.registerResourceFactories(resourceSet); |
823 | - // TODO If you need additional resource factories registrations, do them here. The following line is an example for UML. |
824 | - // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE); |
825 | - } |
826 | - |
827 | -} |
828 | |
829 | === removed file 'net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/generate.mtl' |
830 | --- net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/generate.mtl 2011-02-06 00:10:56 +0000 |
831 | +++ net.launchpad.vide.algorithm2code/src/net/launchpad/vide/algorithm2code/files/generate.mtl 1970-01-01 00:00:00 +0000 |
832 | @@ -1,16 +0,0 @@ |
833 | -[comment encoding = UTF-8 /] |
834 | -[module generate('platform:/resource/net.launchpad.vide/model/algorithm.ecore')/] |
835 | - |
836 | -[template public generate(a : Algorithm)] |
837 | - |
838 | - [comment @main /] |
839 | - [file ('generated.py', false, 'UTF-8')] |
840 | - [comment file (v.name.concat('.py'), false, 'UTF-8')/] |
841 | - [for (instruction : Instruction | a.instructions)] |
842 | - [if instruction.oclIsTypeOf(Block)] |
843 | - [instruction.oclAsType(Block).commands.trim() /] |
844 | - [/if] |
845 | - [/for] |
846 | - [/file] |
847 | - |
848 | -[/template] |
849 | |
850 | === modified file 'net.launchpad.vide.diagram/META-INF/MANIFEST.MF' |
851 | --- net.launchpad.vide.diagram/META-INF/MANIFEST.MF 2011-02-12 23:09:25 +0000 |
852 | +++ net.launchpad.vide.diagram/META-INF/MANIFEST.MF 2011-03-16 20:54:30 +0000 |
853 | @@ -7,7 +7,7 @@ |
854 | Bundle-Activator: net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorPlugin |
855 | Bundle-Vendor: %providerName |
856 | Bundle-Localization: plugin |
857 | -Export-Package: net.launchpad.vide.algorithm.diagram.edit.parts, |
858 | +Export-Package: net.launchpad.vide.algorithm.diagram.edit.parts, |
859 | net.launchpad.vide.algorithm.diagram.part, |
860 | net.launchpad.vide.algorithm.diagram.providers |
861 | Require-Bundle: org.eclipse.core.runtime, |
862 | @@ -35,6 +35,9 @@ |
863 | org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport, |
864 | net.launchpad.vide;visibility:=reexport, |
865 | net.launchpad.vide.edit;visibility:=reexport, |
866 | + org.eclipse.ocl.ecore;visibility:=reexport, |
867 | + org.eclipse.emf.validation;visibility:=reexport, |
868 | + org.eclipse.emf.validation.ocl;resolution:=optional;visibility:=reexport, |
869 | org.eclipse.gef;visibility:=reexport |
870 | Bundle-ActivationPolicy: lazy |
871 | Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
872 | |
873 | === modified file 'net.launchpad.vide.diagram/messages.properties' |
874 | --- net.launchpad.vide.diagram/messages.properties 2010-12-16 11:36:05 +0000 |
875 | +++ net.launchpad.vide.diagram/messages.properties 2011-03-16 20:54:30 +0000 |
876 | @@ -45,29 +45,31 @@ |
877 | ModelElementSelectionPageMessage=Select model element: |
878 | ValidateActionMessage=Validate |
879 | Algorithm1Group_title=algorithm |
880 | +Branch2Group_title=branch |
881 | Block1CreationTool_title=Block |
882 | Block1CreationTool_desc=Create new Block |
883 | BlockNext2CreationTool_title=BlockNext |
884 | BlockNext2CreationTool_desc=Connect next Block |
885 | -Branch3CreationTool_title=Branch |
886 | -Branch3CreationTool_desc=Create new Branch Instruction |
887 | -BranchFalse4CreationTool_title=BranchFalse |
888 | -BranchFalse4CreationTool_desc=Create new Branch False |
889 | -BranchTrue5CreationTool_title=BranchTrue |
890 | -BranchTrue5CreationTool_desc=Create new Branch True |
891 | +Branch1CreationTool_title=Branch |
892 | +Branch1CreationTool_desc=Create new Branch Instruction |
893 | +BranchFalse2CreationTool_title=BranchFalse |
894 | +BranchFalse2CreationTool_desc=Create new Branch False |
895 | +BranchTrue3CreationTool_title=BranchTrue |
896 | +BranchTrue3CreationTool_desc=Create new Branch True |
897 | +Tool_title= |
898 | |
899 | CommandName_OpenDiagram=Open Diagram |
900 | +NavigatorGroupName_BranchFalse_4003_target=target |
901 | +NavigatorGroupName_BranchFalse_4003_source=source |
902 | +NavigatorGroupName_BlockNext_4004_target=target |
903 | +NavigatorGroupName_BlockNext_4004_source=source |
904 | +NavigatorGroupName_BranchTrue_4002_target=target |
905 | +NavigatorGroupName_BranchTrue_4002_source=source |
906 | NavigatorGroupName_Algorithm_1000_links=links |
907 | NavigatorGroupName_Branch_2003_incominglinks=incoming links |
908 | NavigatorGroupName_Branch_2003_outgoinglinks=outgoing links |
909 | -NavigatorGroupName_BranchFalse_4003_target=target |
910 | -NavigatorGroupName_BranchFalse_4003_source=source |
911 | NavigatorGroupName_Block_2002_incominglinks=incoming links |
912 | NavigatorGroupName_Block_2002_outgoinglinks=outgoing links |
913 | -NavigatorGroupName_BranchTrue_4002_target=target |
914 | -NavigatorGroupName_BranchTrue_4002_source=source |
915 | -NavigatorGroupName_BlockNext_4004_target=target |
916 | -NavigatorGroupName_BlockNext_4004_source=source |
917 | NavigatorActionProvider_OpenDiagramActionName=Open Diagram |
918 | AbstractParser_UnexpectedValueType=Value of type {0} is expected |
919 | AbstractParser_WrongStringConversion=String value does not convert to {0} value |
920 | |
921 | === modified file 'net.launchpad.vide.diagram/plugin.properties' |
922 | --- net.launchpad.vide.diagram/plugin.properties 2010-12-16 11:36:05 +0000 |
923 | +++ net.launchpad.vide.diagram/plugin.properties 2011-03-16 20:54:30 +0000 |
924 | @@ -33,9 +33,9 @@ |
925 | metatype.name.Algorithm_1000=Undefined |
926 | metatype.name.Branch_2003=Branch |
927 | metatype.name.Block_2002=Block |
928 | -metatype.name.BranchFalse_4003=Undefined |
929 | -metatype.name.BlockNext_4004=Undefined |
930 | -metatype.name.BranchTrue_4002=Undefined |
931 | +metatype.name.BlockNext_4004=Next |
932 | +metatype.name.BranchTrue_4002=True |
933 | +metatype.name.BranchFalse_4003=False |
934 | |
935 | # Commands and menu actions |
936 | cmdcategory.name=Algorithm Editor Commands |
937 | |
938 | === modified file 'net.launchpad.vide.diagram/plugin.xml' |
939 | --- net.launchpad.vide.diagram/plugin.xml 2011-02-12 23:09:25 +0000 |
940 | +++ net.launchpad.vide.diagram/plugin.xml 2011-03-16 20:54:30 +0000 |
941 | @@ -107,6 +107,30 @@ |
942 | </extension> |
943 | |
944 | |
945 | + <extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation"> |
946 | + <?gmfgen generated="true"?> |
947 | + <MarkerNavigationProvider class="net.launchpad.vide.algorithm.diagram.providers.AlgorithmMarkerNavigationProvider"> |
948 | + <MarkerType name="net.launchpad.vide.diagram.diagnostic"/> |
949 | + <Priority name="Lowest"/> |
950 | + </MarkerNavigationProvider> |
951 | + </extension> |
952 | + |
953 | + <extension id="diagnostic" name="Algorithm Plugin problems" point="org.eclipse.core.resources.markers"> |
954 | + <?gmfgen generated="true"?> |
955 | + <super type="org.eclipse.core.resources.problemmarker"/> |
956 | + <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/> |
957 | + <persistent value="true"/> |
958 | + </extension> |
959 | + |
960 | + <extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders"> |
961 | + <?gmfgen generated="true"?> |
962 | + <decoratorProvider class="net.launchpad.vide.algorithm.diagram.providers.AlgorithmValidationDecoratorProvider"> |
963 | + <Priority name="Medium"/> |
964 | + <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/> |
965 | + <context decoratorTargets="PRIMARY_VIEW"/> |
966 | + </decoratorProvider> |
967 | + </extension> |
968 | + |
969 | <extension point="org.eclipse.core.runtime.preferences" id="prefs"> |
970 | <?gmfgen generated="true"?> |
971 | <initializer class="net.launchpad.vide.algorithm.diagram.preferences.DiagramPreferenceInitializer"/> |
972 | @@ -459,6 +483,40 @@ |
973 | </selectionEnablement> |
974 | </linkHelper> |
975 | </extension> |
976 | + <extension point="org.eclipse.emf.validation.constraintProviders"> |
977 | + <?gmfgen generated="true"?> |
978 | + <category id="01" mandatory="false" name="Block"> |
979 | + <![CDATA[Block warnings]]> |
980 | + </category> |
981 | + <constraintProvider cache="true"> |
982 | + <package namespaceUri="http://algorithm/1.0"/> |
983 | + <constraints categories="01"> |
984 | + <constraint id="333" |
985 | + lang="Java" class="net.launchpad.vide.algorithm.diagram.providers.AlgorithmValidationProvider$Adapter1" |
986 | + name="No instruction" |
987 | + mode="Live" |
988 | + severity="WARNING" statusCode="200"> |
989 | + |
990 | + <description><![CDATA[No instruction warning]]></description> |
991 | + <message><![CDATA[Blok mora imati barem jednu naredbu]]></message> |
992 | + <target class="algorithm.Block"/> |
993 | + </constraint> |
994 | + </constraints> |
995 | + </constraintProvider> |
996 | + </extension> |
997 | + |
998 | + <extension point="org.eclipse.emf.validation.constraintBindings"> |
999 | + <?gmfgen generated="true"?> |
1000 | + <clientContext default="false" id="net.launchpad.vide.diagramDefaultCtx"> |
1001 | + <selector class="net.launchpad.vide.algorithm.diagram.providers.AlgorithmValidationProvider$DefaultCtx"/> |
1002 | + </clientContext> |
1003 | + <binding context="net.launchpad.vide.diagramDefaultCtx"> |
1004 | + <constraint ref="net.launchpad.vide.diagram.333"/> |
1005 | + </binding> |
1006 | + |
1007 | + </extension> |
1008 | + |
1009 | + |
1010 | <extension point="org.eclipse.ui.commands" id="update-cmd"> |
1011 | <?gmfgen generated="true"?> |
1012 | <command |
1013 | |
1014 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BlockEditPart.java' |
1015 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BlockEditPart.java 2011-02-18 16:41:37 +0000 |
1016 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BlockEditPart.java 2011-03-16 20:54:30 +0000 |
1017 | @@ -330,9 +330,9 @@ |
1018 | |
1019 | FlowLayout layoutThis = new FlowLayout(); |
1020 | layoutThis.setStretchMinorAxis(false); |
1021 | - layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP); |
1022 | + layoutThis.setMinorAlignment(FlowLayout.ALIGN_CENTER); |
1023 | |
1024 | - layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP); |
1025 | + layoutThis.setMajorAlignment(FlowLayout.ALIGN_CENTER); |
1026 | layoutThis.setMajorSpacing(5); |
1027 | layoutThis.setMinorSpacing(5); |
1028 | layoutThis.setHorizontal(true); |
1029 | |
1030 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchEditPart.java' |
1031 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchEditPart.java 2011-02-18 16:41:37 +0000 |
1032 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchEditPart.java 2011-03-16 20:54:30 +0000 |
1033 | @@ -9,10 +9,8 @@ |
1034 | import net.launchpad.vide.algorithm.diagram.providers.AlgorithmElementTypes; |
1035 | |
1036 | import org.eclipse.draw2d.ColorConstants; |
1037 | -import org.eclipse.draw2d.Ellipse; |
1038 | import org.eclipse.draw2d.FlowLayout; |
1039 | import org.eclipse.draw2d.IFigure; |
1040 | -import org.eclipse.draw2d.RectangleFigure; |
1041 | import org.eclipse.draw2d.RoundedRectangle; |
1042 | import org.eclipse.draw2d.Shape; |
1043 | import org.eclipse.draw2d.StackLayout; |
1044 | |
1045 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchFalseEditPart.java' |
1046 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchFalseEditPart.java 2011-02-12 23:09:25 +0000 |
1047 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchFalseEditPart.java 2011-03-16 20:54:30 +0000 |
1048 | @@ -9,7 +9,6 @@ |
1049 | import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart; |
1050 | import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; |
1051 | import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx; |
1052 | -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; |
1053 | import org.eclipse.gmf.runtime.notation.View; |
1054 | |
1055 | /** |
1056 | |
1057 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchTrueEditPart.java' |
1058 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchTrueEditPart.java 2011-02-12 23:09:25 +0000 |
1059 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/parts/BranchTrueEditPart.java 2011-03-16 20:54:30 +0000 |
1060 | @@ -9,7 +9,6 @@ |
1061 | import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart; |
1062 | import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; |
1063 | import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx; |
1064 | -import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; |
1065 | import org.eclipse.gmf.runtime.notation.View; |
1066 | |
1067 | /** |
1068 | |
1069 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/policies/AlgorithmBaseItemSemanticEditPolicy.java' |
1070 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/policies/AlgorithmBaseItemSemanticEditPolicy.java 2010-12-16 11:36:05 +0000 |
1071 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/edit/policies/AlgorithmBaseItemSemanticEditPolicy.java 2011-03-16 20:54:30 +0000 |
1072 | @@ -1,15 +1,20 @@ |
1073 | package net.launchpad.vide.algorithm.diagram.edit.policies; |
1074 | |
1075 | +import java.util.Collections; |
1076 | import java.util.Iterator; |
1077 | +import java.util.Map; |
1078 | |
1079 | +import net.launchpad.vide.algorithm.AlgorithmPackage; |
1080 | import net.launchpad.vide.algorithm.Block; |
1081 | import net.launchpad.vide.algorithm.Branch; |
1082 | import net.launchpad.vide.algorithm.Instruction; |
1083 | import net.launchpad.vide.algorithm.diagram.edit.helpers.AlgorithmBaseEditHelper; |
1084 | +import net.launchpad.vide.algorithm.diagram.expressions.AlgorithmOCLFactory; |
1085 | import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorPlugin; |
1086 | import net.launchpad.vide.algorithm.diagram.part.AlgorithmVisualIDRegistry; |
1087 | import net.launchpad.vide.algorithm.diagram.providers.AlgorithmElementTypes; |
1088 | |
1089 | +import org.eclipse.emf.ecore.EClassifier; |
1090 | import org.eclipse.emf.transaction.TransactionalEditingDomain; |
1091 | import org.eclipse.gef.Request; |
1092 | import org.eclipse.gef.commands.Command; |
1093 | @@ -325,20 +330,6 @@ |
1094 | /** |
1095 | * @generated |
1096 | */ |
1097 | - public boolean canCreateBranchFalse_4003(Branch source, |
1098 | - Instruction target) { |
1099 | - if (source != null) { |
1100 | - if (source.getFalse() != null) { |
1101 | - return false; |
1102 | - } |
1103 | - } |
1104 | - |
1105 | - return canExistBranchFalse_4003(source, target); |
1106 | - } |
1107 | - |
1108 | - /** |
1109 | - * @generated |
1110 | - */ |
1111 | public boolean canCreateBlockNext_4004(Block source, Instruction target) { |
1112 | if (source != null) { |
1113 | if (source.getNext() != null) { |
1114 | @@ -366,23 +357,106 @@ |
1115 | /** |
1116 | * @generated |
1117 | */ |
1118 | - public boolean canExistBranchFalse_4003(Branch source, |
1119 | + public boolean canCreateBranchFalse_4003(Branch source, |
1120 | Instruction target) { |
1121 | - return true; |
1122 | + if (source != null) { |
1123 | + if (source.getFalse() != null) { |
1124 | + return false; |
1125 | + } |
1126 | + } |
1127 | + |
1128 | + return canExistBranchFalse_4003(source, target); |
1129 | } |
1130 | |
1131 | /** |
1132 | * @generated |
1133 | */ |
1134 | public boolean canExistBlockNext_4004(Block source, Instruction target) { |
1135 | - return true; |
1136 | + try { |
1137 | + if (target == null) { |
1138 | + return true; |
1139 | + } else { |
1140 | + Map<String, EClassifier> env = Collections |
1141 | + .<String, EClassifier> singletonMap( |
1142 | + "oppositeEnd", AlgorithmPackage.eINSTANCE.getBlock()); //$NON-NLS-1$ |
1143 | + Object targetVal = AlgorithmOCLFactory.getExpression(0, |
1144 | + AlgorithmPackage.eINSTANCE.getInstruction(), env) |
1145 | + .evaluate( |
1146 | + target, |
1147 | + Collections.singletonMap( |
1148 | + "oppositeEnd", source)); //$NON-NLS-1$ |
1149 | + if (false == targetVal instanceof Boolean |
1150 | + || !((Boolean) targetVal).booleanValue()) { |
1151 | + return false; |
1152 | + } // else fall-through |
1153 | + } |
1154 | + return true; |
1155 | + } catch (Exception e) { |
1156 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
1157 | + "Link constraint evaluation error", e); //$NON-NLS-1$ |
1158 | + return false; |
1159 | + } |
1160 | } |
1161 | |
1162 | /** |
1163 | * @generated |
1164 | */ |
1165 | public boolean canExistBranchTrue_4002(Branch source, Instruction target) { |
1166 | - return true; |
1167 | + try { |
1168 | + if (target == null) { |
1169 | + return true; |
1170 | + } else { |
1171 | + Map<String, EClassifier> env = Collections |
1172 | + .<String, EClassifier> singletonMap( |
1173 | + "oppositeEnd", AlgorithmPackage.eINSTANCE.getBranch()); //$NON-NLS-1$ |
1174 | + Object targetVal = AlgorithmOCLFactory.getExpression(1, |
1175 | + AlgorithmPackage.eINSTANCE.getInstruction(), env) |
1176 | + .evaluate( |
1177 | + target, |
1178 | + Collections.singletonMap( |
1179 | + "oppositeEnd", source)); //$NON-NLS-1$ |
1180 | + if (false == targetVal instanceof Boolean |
1181 | + || !((Boolean) targetVal).booleanValue()) { |
1182 | + return false; |
1183 | + } // else fall-through |
1184 | + } |
1185 | + return true; |
1186 | + } catch (Exception e) { |
1187 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
1188 | + "Link constraint evaluation error", e); //$NON-NLS-1$ |
1189 | + return false; |
1190 | + } |
1191 | + } |
1192 | + |
1193 | + /** |
1194 | + * @generated |
1195 | + */ |
1196 | + public boolean canExistBranchFalse_4003(Branch source, |
1197 | + Instruction target) { |
1198 | + try { |
1199 | + if (target == null) { |
1200 | + return true; |
1201 | + } else { |
1202 | + Map<String, EClassifier> env = Collections |
1203 | + .<String, EClassifier> singletonMap( |
1204 | + "oppositeEnd", AlgorithmPackage.eINSTANCE.getBranch()); //$NON-NLS-1$ |
1205 | + Object targetVal = AlgorithmOCLFactory.getExpression(2, |
1206 | + AlgorithmPackage.eINSTANCE.getInstruction(), env) |
1207 | + .evaluate( |
1208 | + target, |
1209 | + Collections.singletonMap( |
1210 | + "oppositeEnd", source)); //$NON-NLS-1$ |
1211 | + if (false == targetVal instanceof Boolean |
1212 | + || !((Boolean) targetVal).booleanValue()) { |
1213 | + return false; |
1214 | + } // else fall-through |
1215 | + } |
1216 | + return true; |
1217 | + } catch (Exception e) { |
1218 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
1219 | + "Link constraint evaluation error", e); //$NON-NLS-1$ |
1220 | + return false; |
1221 | + } |
1222 | } |
1223 | } |
1224 | |
1225 | |
1226 | === added directory 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions' |
1227 | === added file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmAbstractExpression.java' |
1228 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmAbstractExpression.java 1970-01-01 00:00:00 +0000 |
1229 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmAbstractExpression.java 2011-03-16 20:54:30 +0000 |
1230 | @@ -0,0 +1,158 @@ |
1231 | +package net.launchpad.vide.algorithm.diagram.expressions; |
1232 | + |
1233 | +import java.math.BigDecimal; |
1234 | +import java.math.BigInteger; |
1235 | +import java.util.Collections; |
1236 | +import java.util.Map; |
1237 | + |
1238 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorPlugin; |
1239 | + |
1240 | +import org.eclipse.core.runtime.IStatus; |
1241 | +import org.eclipse.core.runtime.Status; |
1242 | +import org.eclipse.emf.ecore.EClassifier; |
1243 | +import org.eclipse.emf.ecore.EDataType; |
1244 | +import org.eclipse.emf.ecore.EEnum; |
1245 | +import org.eclipse.emf.ecore.EEnumLiteral; |
1246 | +import org.eclipse.emf.ecore.util.EcoreUtil; |
1247 | + |
1248 | +/** |
1249 | + * @generated |
1250 | + */ |
1251 | +public abstract class AlgorithmAbstractExpression { |
1252 | + |
1253 | + /** |
1254 | + * @generated |
1255 | + */ |
1256 | + private IStatus status = Status.OK_STATUS; |
1257 | + |
1258 | + /** |
1259 | + * @generated |
1260 | + */ |
1261 | + protected void setStatus(int severity, String message, Throwable throwable) { |
1262 | + String pluginID = AlgorithmDiagramEditorPlugin.ID; |
1263 | + this.status = new Status(severity, pluginID, -1, |
1264 | + (message != null) ? message : "", throwable); //$NON-NLS-1$ |
1265 | + if (!this.status.isOK()) { |
1266 | + AlgorithmDiagramEditorPlugin |
1267 | + .getInstance() |
1268 | + .logError( |
1269 | + "Expression problem:" + message + "body:" + body(), throwable); //$NON-NLS-1$ //$NON-NLS-2$ |
1270 | + } |
1271 | + } |
1272 | + |
1273 | + /** |
1274 | + * @generated |
1275 | + */ |
1276 | + public IStatus getStatus() { |
1277 | + return status; |
1278 | + } |
1279 | + |
1280 | + /** |
1281 | + * @generated |
1282 | + */ |
1283 | + private final String myBody; |
1284 | + |
1285 | + /** |
1286 | + * @generated |
1287 | + */ |
1288 | + public String body() { |
1289 | + return myBody; |
1290 | + } |
1291 | + |
1292 | + /** |
1293 | + * @generated |
1294 | + */ |
1295 | + private final EClassifier myContext; |
1296 | + |
1297 | + /** |
1298 | + * @generated |
1299 | + */ |
1300 | + public EClassifier context() { |
1301 | + return myContext; |
1302 | + } |
1303 | + |
1304 | + /** |
1305 | + * @generated |
1306 | + */ |
1307 | + protected AlgorithmAbstractExpression(String body, EClassifier context) { |
1308 | + myBody = body; |
1309 | + myContext = context; |
1310 | + } |
1311 | + |
1312 | + /** |
1313 | + * @generated |
1314 | + */ |
1315 | + @SuppressWarnings("rawtypes") |
1316 | + protected abstract Object doEvaluate(Object context, Map env); |
1317 | + |
1318 | + /** |
1319 | + * @generated |
1320 | + */ |
1321 | + public Object evaluate(Object context) { |
1322 | + return evaluate(context, Collections.EMPTY_MAP); |
1323 | + } |
1324 | + |
1325 | + /** |
1326 | + * @generated |
1327 | + */ |
1328 | + @SuppressWarnings("rawtypes") |
1329 | + public Object evaluate(Object context, Map env) { |
1330 | + if (context().isInstance(context)) { |
1331 | + try { |
1332 | + return doEvaluate(context, env); |
1333 | + } catch (Exception e) { |
1334 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
1335 | + "Expression evaluation failure: " + body(), e); //$NON-NLS-1$ |
1336 | + } |
1337 | + } |
1338 | + return null; |
1339 | + } |
1340 | + |
1341 | + /** |
1342 | + * Expression may return number value which is not directly compatible with feature type (e.g. Double when Integer is expected), or EEnumLiteral meta-object when literal instance is expected |
1343 | + * @generated |
1344 | + */ |
1345 | + public static Object performCast(Object value, EDataType targetType) { |
1346 | + if (targetType instanceof EEnum) { |
1347 | + if (value instanceof EEnumLiteral) { |
1348 | + EEnumLiteral literal = (EEnumLiteral) value; |
1349 | + return (literal.getInstance() != null) ? literal.getInstance() |
1350 | + : literal; |
1351 | + } |
1352 | + } |
1353 | + if (false == value instanceof Number || targetType == null |
1354 | + || targetType.getInstanceClass() == null) { |
1355 | + return value; |
1356 | + } |
1357 | + Class<?> targetClass = targetType.getInstanceClass(); |
1358 | + Number num = (Number) value; |
1359 | + Class<?> valClass = value.getClass(); |
1360 | + Class<?> targetWrapperClass = targetClass; |
1361 | + if (targetClass.isPrimitive()) { |
1362 | + targetWrapperClass = EcoreUtil.wrapperClassFor(targetClass); |
1363 | + } |
1364 | + if (valClass.equals(targetWrapperClass)) { |
1365 | + return value; |
1366 | + } |
1367 | + if (Number.class.isAssignableFrom(targetWrapperClass)) { |
1368 | + if (targetWrapperClass.equals(Byte.class)) |
1369 | + return new Byte(num.byteValue()); |
1370 | + if (targetWrapperClass.equals(Integer.class)) |
1371 | + return new Integer(num.intValue()); |
1372 | + if (targetWrapperClass.equals(Short.class)) |
1373 | + return new Short(num.shortValue()); |
1374 | + if (targetWrapperClass.equals(Long.class)) |
1375 | + return new Long(num.longValue()); |
1376 | + if (targetWrapperClass.equals(BigInteger.class)) |
1377 | + return BigInteger.valueOf(num.longValue()); |
1378 | + if (targetWrapperClass.equals(Float.class)) |
1379 | + return new Float(num.floatValue()); |
1380 | + if (targetWrapperClass.equals(Double.class)) |
1381 | + return new Double(num.doubleValue()); |
1382 | + if (targetWrapperClass.equals(BigDecimal.class)) |
1383 | + return new BigDecimal(num.doubleValue()); |
1384 | + } |
1385 | + return value; |
1386 | + } |
1387 | + |
1388 | +} |
1389 | |
1390 | === added file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmOCLFactory.java' |
1391 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmOCLFactory.java 1970-01-01 00:00:00 +0000 |
1392 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/expressions/AlgorithmOCLFactory.java 2011-03-16 20:54:30 +0000 |
1393 | @@ -0,0 +1,172 @@ |
1394 | +package net.launchpad.vide.algorithm.diagram.expressions; |
1395 | + |
1396 | +import java.util.Collections; |
1397 | +import java.util.Map; |
1398 | + |
1399 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorPlugin; |
1400 | + |
1401 | +import org.eclipse.core.runtime.IStatus; |
1402 | +import org.eclipse.emf.ecore.EClassifier; |
1403 | +import org.eclipse.emf.ecore.EParameter; |
1404 | +import org.eclipse.emf.ecore.EcorePackage; |
1405 | +import org.eclipse.ocl.Environment; |
1406 | +import org.eclipse.ocl.EvaluationEnvironment; |
1407 | +import org.eclipse.ocl.ParserException; |
1408 | +import org.eclipse.ocl.ecore.EcoreFactory; |
1409 | +import org.eclipse.ocl.ecore.OCLExpression; |
1410 | +import org.eclipse.ocl.ecore.Variable; |
1411 | +import org.eclipse.ocl.ecore.OCL.Helper; |
1412 | +import org.eclipse.ocl.options.ParsingOptions; |
1413 | + |
1414 | +/** |
1415 | + * @generated |
1416 | + */ |
1417 | +public class AlgorithmOCLFactory { |
1418 | + |
1419 | + /** |
1420 | + * @generated |
1421 | + */ |
1422 | + private final AlgorithmAbstractExpression[] expressions; |
1423 | + |
1424 | + /** |
1425 | + * @generated |
1426 | + */ |
1427 | + protected AlgorithmOCLFactory() { |
1428 | + this.expressions = new AlgorithmAbstractExpression[4]; |
1429 | + } |
1430 | + |
1431 | + /** |
1432 | + * @generated |
1433 | + */ |
1434 | + public static AlgorithmAbstractExpression getExpression(int index, |
1435 | + EClassifier context, Map<String, EClassifier> environment) { |
1436 | + AlgorithmOCLFactory cached = AlgorithmDiagramEditorPlugin.getInstance() |
1437 | + .getAlgorithmOCLFactory(); |
1438 | + if (cached == null) { |
1439 | + AlgorithmDiagramEditorPlugin.getInstance().setAlgorithmOCLFactory( |
1440 | + cached = new AlgorithmOCLFactory()); |
1441 | + } |
1442 | + if (index < 0 || index >= cached.expressions.length) { |
1443 | + throw new IllegalArgumentException(); |
1444 | + } |
1445 | + if (cached.expressions[index] == null) { |
1446 | + final String[] exprBodies = new String[] { "self<>oppositeEnd", //$NON-NLS-1$ |
1447 | + "self<>oppositeEnd", //$NON-NLS-1$ |
1448 | + "self<>oppositeEnd", //$NON-NLS-1$ |
1449 | + "self <> \'\'", //$NON-NLS-1$ |
1450 | + }; |
1451 | + cached.expressions[index] = getExpression( |
1452 | + exprBodies[index], |
1453 | + context, |
1454 | + environment == null ? Collections |
1455 | + .<String, EClassifier> emptyMap() : environment); |
1456 | + } |
1457 | + return cached.expressions[index]; |
1458 | + } |
1459 | + |
1460 | + /** |
1461 | + * This is factory method, callers are responsible to keep reference to the return value if they want to reuse parsed expression |
1462 | + * @generated |
1463 | + */ |
1464 | + public static AlgorithmAbstractExpression getExpression(String body, |
1465 | + EClassifier context, Map<String, EClassifier> environment) { |
1466 | + return new Expression(body, context, environment); |
1467 | + } |
1468 | + |
1469 | + /** |
1470 | + * This method will become private in the next release |
1471 | + * @generated |
1472 | + */ |
1473 | + public static AlgorithmAbstractExpression getExpression(String body, |
1474 | + EClassifier context) { |
1475 | + return getExpression(body, context, |
1476 | + Collections.<String, EClassifier> emptyMap()); |
1477 | + } |
1478 | + |
1479 | + /** |
1480 | + * @generated |
1481 | + */ |
1482 | + private static class Expression extends AlgorithmAbstractExpression { |
1483 | + |
1484 | + /** |
1485 | + * @generated |
1486 | + */ |
1487 | + private final org.eclipse.ocl.ecore.OCL oclInstance; |
1488 | + |
1489 | + /** |
1490 | + * @generated |
1491 | + */ |
1492 | + private OCLExpression oclExpression; |
1493 | + |
1494 | + /** |
1495 | + * @generated |
1496 | + */ |
1497 | + public Expression(String body, EClassifier context, |
1498 | + Map<String, EClassifier> environment) { |
1499 | + super(body, context); |
1500 | + oclInstance = org.eclipse.ocl.ecore.OCL.newInstance(); |
1501 | + initCustomEnv(oclInstance.getEnvironment(), environment); |
1502 | + Helper oclHelper = oclInstance.createOCLHelper(); |
1503 | + oclHelper.setContext(context()); |
1504 | + try { |
1505 | + oclExpression = oclHelper.createQuery(body()); |
1506 | + setStatus(IStatus.OK, null, null); |
1507 | + } catch (ParserException e) { |
1508 | + setStatus(IStatus.ERROR, e.getMessage(), e); |
1509 | + } |
1510 | + } |
1511 | + |
1512 | + /** |
1513 | + * @generated |
1514 | + */ |
1515 | + @SuppressWarnings("rawtypes") |
1516 | + protected Object doEvaluate(Object context, Map env) { |
1517 | + if (oclExpression == null) { |
1518 | + return null; |
1519 | + } |
1520 | + // on the first call, both evalEnvironment and extentMap are clear, for later we have finally, below. |
1521 | + EvaluationEnvironment<?, ?, ?, ?, ?> evalEnv = oclInstance |
1522 | + .getEvaluationEnvironment(); |
1523 | + // initialize environment |
1524 | + for (Object nextKey : env.keySet()) { |
1525 | + evalEnv.replace((String) nextKey, env.get(nextKey)); |
1526 | + } |
1527 | + try { |
1528 | + Object result = oclInstance.evaluate(context, oclExpression); |
1529 | + return oclInstance.isInvalid(result) ? null : result; |
1530 | + } finally { |
1531 | + evalEnv.clear(); |
1532 | + oclInstance.setExtentMap(null); // clear allInstances cache, and get the oclInstance ready for the next call |
1533 | + } |
1534 | + } |
1535 | + |
1536 | + /** |
1537 | + * @generated |
1538 | + */ |
1539 | + private static void initCustomEnv( |
1540 | + Environment<?, EClassifier, ?, ?, ?, EParameter, ?, ?, ?, ?, ?, ?> ecoreEnv, |
1541 | + Map<String, EClassifier> environment) { |
1542 | + // Use EObject as implicit root class for any object, to allow eContainer() and other EObject operations from OCL expressions |
1543 | + ParsingOptions.setOption(ecoreEnv, |
1544 | + ParsingOptions.implicitRootClass(ecoreEnv), |
1545 | + EcorePackage.eINSTANCE.getEObject()); |
1546 | + for (String varName : environment.keySet()) { |
1547 | + EClassifier varType = environment.get(varName); |
1548 | + ecoreEnv.addElement(varName, |
1549 | + createVar(ecoreEnv, varName, varType), false); |
1550 | + } |
1551 | + } |
1552 | + |
1553 | + /** |
1554 | + * @generated |
1555 | + */ |
1556 | + private static Variable createVar( |
1557 | + Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?> ecoreEnv, |
1558 | + String name, EClassifier type) { |
1559 | + Variable var = EcoreFactory.eINSTANCE.createVariable(); |
1560 | + var.setName(name); |
1561 | + var.setType(ecoreEnv.getUMLReflection().getOCLType(type)); |
1562 | + return var; |
1563 | + } |
1564 | + } |
1565 | +} |
1566 | |
1567 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorContentProvider.java' |
1568 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorContentProvider.java 2011-02-18 16:41:37 +0000 |
1569 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorContentProvider.java 2011-03-16 20:54:30 +0000 |
1570 | @@ -223,6 +223,68 @@ |
1571 | private Object[] getViewChildren(View view, Object parentElement) { |
1572 | switch (AlgorithmVisualIDRegistry.getVisualID(view)) { |
1573 | |
1574 | + case BranchFalseEditPart.VISUAL_ID: { |
1575 | + LinkedList<AlgorithmAbstractNavigatorItem> result = new LinkedList<AlgorithmAbstractNavigatorItem>(); |
1576 | + Edge sv = (Edge) view; |
1577 | + AlgorithmNavigatorGroup target = new AlgorithmNavigatorGroup( |
1578 | + Messages.NavigatorGroupName_BranchFalse_4003_target, |
1579 | + "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1580 | + AlgorithmNavigatorGroup source = new AlgorithmNavigatorGroup( |
1581 | + Messages.NavigatorGroupName_BranchFalse_4003_source, |
1582 | + "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1583 | + Collection<View> connectedViews; |
1584 | + connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1585 | + AlgorithmVisualIDRegistry.getType(BranchEditPart.VISUAL_ID)); |
1586 | + target.addChildren(createNavigatorItems(connectedViews, target, |
1587 | + true)); |
1588 | + connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1589 | + AlgorithmVisualIDRegistry.getType(BlockEditPart.VISUAL_ID)); |
1590 | + target.addChildren(createNavigatorItems(connectedViews, target, |
1591 | + true)); |
1592 | + connectedViews = getLinksSourceByType(Collections.singleton(sv), |
1593 | + AlgorithmVisualIDRegistry.getType(BranchEditPart.VISUAL_ID)); |
1594 | + source.addChildren(createNavigatorItems(connectedViews, source, |
1595 | + true)); |
1596 | + if (!target.isEmpty()) { |
1597 | + result.add(target); |
1598 | + } |
1599 | + if (!source.isEmpty()) { |
1600 | + result.add(source); |
1601 | + } |
1602 | + return result.toArray(); |
1603 | + } |
1604 | + |
1605 | + case BlockNextEditPart.VISUAL_ID: { |
1606 | + LinkedList<AlgorithmAbstractNavigatorItem> result = new LinkedList<AlgorithmAbstractNavigatorItem>(); |
1607 | + Edge sv = (Edge) view; |
1608 | + AlgorithmNavigatorGroup target = new AlgorithmNavigatorGroup( |
1609 | + Messages.NavigatorGroupName_BlockNext_4004_target, |
1610 | + "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1611 | + AlgorithmNavigatorGroup source = new AlgorithmNavigatorGroup( |
1612 | + Messages.NavigatorGroupName_BlockNext_4004_source, |
1613 | + "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1614 | + Collection<View> connectedViews; |
1615 | + connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1616 | + AlgorithmVisualIDRegistry.getType(BranchEditPart.VISUAL_ID)); |
1617 | + target.addChildren(createNavigatorItems(connectedViews, target, |
1618 | + true)); |
1619 | + connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1620 | + AlgorithmVisualIDRegistry.getType(BlockEditPart.VISUAL_ID)); |
1621 | + target.addChildren(createNavigatorItems(connectedViews, target, |
1622 | + true)); |
1623 | + connectedViews = getLinksSourceByType(Collections.singleton(sv), |
1624 | + AlgorithmVisualIDRegistry.getType(BlockEditPart.VISUAL_ID)); |
1625 | + source.addChildren(createNavigatorItems(connectedViews, source, |
1626 | + true)); |
1627 | + if (!target.isEmpty()) { |
1628 | + result.add(target); |
1629 | + } |
1630 | + if (!source.isEmpty()) { |
1631 | + result.add(source); |
1632 | + } |
1633 | + return result.toArray(); |
1634 | + } |
1635 | + |
1636 | case BranchTrueEditPart.VISUAL_ID: { |
1637 | LinkedList<AlgorithmAbstractNavigatorItem> result = new LinkedList<AlgorithmAbstractNavigatorItem>(); |
1638 | Edge sv = (Edge) view; |
1639 | @@ -287,68 +349,6 @@ |
1640 | return result.toArray(); |
1641 | } |
1642 | |
1643 | - case BlockNextEditPart.VISUAL_ID: { |
1644 | - LinkedList<AlgorithmAbstractNavigatorItem> result = new LinkedList<AlgorithmAbstractNavigatorItem>(); |
1645 | - Edge sv = (Edge) view; |
1646 | - AlgorithmNavigatorGroup target = new AlgorithmNavigatorGroup( |
1647 | - Messages.NavigatorGroupName_BlockNext_4004_target, |
1648 | - "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1649 | - AlgorithmNavigatorGroup source = new AlgorithmNavigatorGroup( |
1650 | - Messages.NavigatorGroupName_BlockNext_4004_source, |
1651 | - "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1652 | - Collection<View> connectedViews; |
1653 | - connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1654 | - AlgorithmVisualIDRegistry.getType(BranchEditPart.VISUAL_ID)); |
1655 | - target.addChildren(createNavigatorItems(connectedViews, target, |
1656 | - true)); |
1657 | - connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1658 | - AlgorithmVisualIDRegistry.getType(BlockEditPart.VISUAL_ID)); |
1659 | - target.addChildren(createNavigatorItems(connectedViews, target, |
1660 | - true)); |
1661 | - connectedViews = getLinksSourceByType(Collections.singleton(sv), |
1662 | - AlgorithmVisualIDRegistry.getType(BlockEditPart.VISUAL_ID)); |
1663 | - source.addChildren(createNavigatorItems(connectedViews, source, |
1664 | - true)); |
1665 | - if (!target.isEmpty()) { |
1666 | - result.add(target); |
1667 | - } |
1668 | - if (!source.isEmpty()) { |
1669 | - result.add(source); |
1670 | - } |
1671 | - return result.toArray(); |
1672 | - } |
1673 | - |
1674 | - case BranchFalseEditPart.VISUAL_ID: { |
1675 | - LinkedList<AlgorithmAbstractNavigatorItem> result = new LinkedList<AlgorithmAbstractNavigatorItem>(); |
1676 | - Edge sv = (Edge) view; |
1677 | - AlgorithmNavigatorGroup target = new AlgorithmNavigatorGroup( |
1678 | - Messages.NavigatorGroupName_BranchFalse_4003_target, |
1679 | - "icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1680 | - AlgorithmNavigatorGroup source = new AlgorithmNavigatorGroup( |
1681 | - Messages.NavigatorGroupName_BranchFalse_4003_source, |
1682 | - "icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$ |
1683 | - Collection<View> connectedViews; |
1684 | - connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1685 | - AlgorithmVisualIDRegistry.getType(BranchEditPart.VISUAL_ID)); |
1686 | - target.addChildren(createNavigatorItems(connectedViews, target, |
1687 | - true)); |
1688 | - connectedViews = getLinksTargetByType(Collections.singleton(sv), |
1689 | - AlgorithmVisualIDRegistry.getType(BlockEditPart.VISUAL_ID)); |
1690 | - target.addChildren(createNavigatorItems(connectedViews, target, |
1691 | - true)); |
1692 | - connectedViews = getLinksSourceByType(Collections.singleton(sv), |
1693 | - AlgorithmVisualIDRegistry.getType(BranchEditPart.VISUAL_ID)); |
1694 | - source.addChildren(createNavigatorItems(connectedViews, source, |
1695 | - true)); |
1696 | - if (!target.isEmpty()) { |
1697 | - result.add(target); |
1698 | - } |
1699 | - if (!source.isEmpty()) { |
1700 | - result.add(source); |
1701 | - } |
1702 | - return result.toArray(); |
1703 | - } |
1704 | - |
1705 | case BranchEditPart.VISUAL_ID: { |
1706 | LinkedList<AlgorithmAbstractNavigatorItem> result = new LinkedList<AlgorithmAbstractNavigatorItem>(); |
1707 | Node sv = (Node) view; |
1708 | |
1709 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorLabelProvider.java' |
1710 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorLabelProvider.java 2011-02-18 16:41:37 +0000 |
1711 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/navigator/AlgorithmNavigatorLabelProvider.java 2011-03-16 20:54:30 +0000 |
1712 | @@ -90,18 +90,18 @@ |
1713 | */ |
1714 | public Image getImage(View view) { |
1715 | switch (AlgorithmVisualIDRegistry.getVisualID(view)) { |
1716 | + case BranchFalseEditPart.VISUAL_ID: |
1717 | + return getImage( |
1718 | + "Navigator?Link?http://algorithm/1.0?Branch?false", AlgorithmElementTypes.BranchFalse_4003); //$NON-NLS-1$ |
1719 | + case BlockNextEditPart.VISUAL_ID: |
1720 | + return getImage( |
1721 | + "Navigator?Link?http://algorithm/1.0?Block?next", AlgorithmElementTypes.BlockNext_4004); //$NON-NLS-1$ |
1722 | case BranchTrueEditPart.VISUAL_ID: |
1723 | return getImage( |
1724 | "Navigator?Link?http://algorithm/1.0?Branch?true", AlgorithmElementTypes.BranchTrue_4002); //$NON-NLS-1$ |
1725 | case AlgorithmEditPart.VISUAL_ID: |
1726 | return getImage( |
1727 | "Navigator?Diagram?http://algorithm/1.0?Algorithm", AlgorithmElementTypes.Algorithm_1000); //$NON-NLS-1$ |
1728 | - case BlockNextEditPart.VISUAL_ID: |
1729 | - return getImage( |
1730 | - "Navigator?Link?http://algorithm/1.0?Block?next", AlgorithmElementTypes.BlockNext_4004); //$NON-NLS-1$ |
1731 | - case BranchFalseEditPart.VISUAL_ID: |
1732 | - return getImage( |
1733 | - "Navigator?Link?http://algorithm/1.0?Branch?false", AlgorithmElementTypes.BranchFalse_4003); //$NON-NLS-1$ |
1734 | case BranchEditPart.VISUAL_ID: |
1735 | return getImage( |
1736 | "Navigator?TopLevelNode?http://algorithm/1.0?Branch", AlgorithmElementTypes.Branch_2003); //$NON-NLS-1$ |
1737 | @@ -160,14 +160,14 @@ |
1738 | return getUnresolvedDomainElementProxyText(view); |
1739 | } |
1740 | switch (AlgorithmVisualIDRegistry.getVisualID(view)) { |
1741 | + case BranchFalseEditPart.VISUAL_ID: |
1742 | + return getBranchFalse_4003Text(view); |
1743 | + case BlockNextEditPart.VISUAL_ID: |
1744 | + return getBlockNext_4004Text(view); |
1745 | case BranchTrueEditPart.VISUAL_ID: |
1746 | return getBranchTrue_4002Text(view); |
1747 | case AlgorithmEditPart.VISUAL_ID: |
1748 | return getAlgorithm_1000Text(view); |
1749 | - case BlockNextEditPart.VISUAL_ID: |
1750 | - return getBlockNext_4004Text(view); |
1751 | - case BranchFalseEditPart.VISUAL_ID: |
1752 | - return getBranchFalse_4003Text(view); |
1753 | case BranchEditPart.VISUAL_ID: |
1754 | return getBranch_2003Text(view); |
1755 | case BlockEditPart.VISUAL_ID: |
1756 | @@ -179,33 +179,6 @@ |
1757 | /** |
1758 | * @generated |
1759 | */ |
1760 | - private String getAlgorithm_1000Text(View view) { |
1761 | - return ""; //$NON-NLS-1$ |
1762 | - } |
1763 | - |
1764 | - /** |
1765 | - * @generated |
1766 | - */ |
1767 | - private String getBranch_2003Text(View view) { |
1768 | - IParser parser = AlgorithmParserProvider.getParser( |
1769 | - AlgorithmElementTypes.Branch_2003, |
1770 | - view.getElement() != null ? view.getElement() : view, |
1771 | - AlgorithmVisualIDRegistry |
1772 | - .getType(BranchCondtionEditPart.VISUAL_ID)); |
1773 | - if (parser != null) { |
1774 | - return parser.getPrintString(new EObjectAdapter( |
1775 | - view.getElement() != null ? view.getElement() : view), |
1776 | - ParserOptions.NONE.intValue()); |
1777 | - } else { |
1778 | - AlgorithmDiagramEditorPlugin.getInstance().logError( |
1779 | - "Parser was not found for label " + 5003); //$NON-NLS-1$ |
1780 | - return ""; //$NON-NLS-1$ |
1781 | - } |
1782 | - } |
1783 | - |
1784 | - /** |
1785 | - * @generated |
1786 | - */ |
1787 | private String getBranchFalse_4003Text(View view) { |
1788 | IParser parser = AlgorithmParserProvider |
1789 | .getParser(AlgorithmElementTypes.BranchFalse_4003, view |
1790 | @@ -226,6 +199,59 @@ |
1791 | /** |
1792 | * @generated |
1793 | */ |
1794 | + private String getBlockNext_4004Text(View view) { |
1795 | + return ""; //$NON-NLS-1$ |
1796 | + } |
1797 | + |
1798 | + /** |
1799 | + * @generated |
1800 | + */ |
1801 | + private String getBranchTrue_4002Text(View view) { |
1802 | + IParser parser = AlgorithmParserProvider.getParser( |
1803 | + AlgorithmElementTypes.BranchTrue_4002, |
1804 | + view.getElement() != null ? view.getElement() : view, |
1805 | + AlgorithmVisualIDRegistry.getType(TrueLabelEditPart.VISUAL_ID)); |
1806 | + if (parser != null) { |
1807 | + return parser.getPrintString(new EObjectAdapter( |
1808 | + view.getElement() != null ? view.getElement() : view), |
1809 | + ParserOptions.NONE.intValue()); |
1810 | + } else { |
1811 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
1812 | + "Parser was not found for label " + 6001); //$NON-NLS-1$ |
1813 | + return ""; //$NON-NLS-1$ |
1814 | + } |
1815 | + } |
1816 | + |
1817 | + /** |
1818 | + * @generated |
1819 | + */ |
1820 | + private String getAlgorithm_1000Text(View view) { |
1821 | + return ""; //$NON-NLS-1$ |
1822 | + } |
1823 | + |
1824 | + /** |
1825 | + * @generated |
1826 | + */ |
1827 | + private String getBranch_2003Text(View view) { |
1828 | + IParser parser = AlgorithmParserProvider.getParser( |
1829 | + AlgorithmElementTypes.Branch_2003, |
1830 | + view.getElement() != null ? view.getElement() : view, |
1831 | + AlgorithmVisualIDRegistry |
1832 | + .getType(BranchCondtionEditPart.VISUAL_ID)); |
1833 | + if (parser != null) { |
1834 | + return parser.getPrintString(new EObjectAdapter( |
1835 | + view.getElement() != null ? view.getElement() : view), |
1836 | + ParserOptions.NONE.intValue()); |
1837 | + } else { |
1838 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
1839 | + "Parser was not found for label " + 5003); //$NON-NLS-1$ |
1840 | + return ""; //$NON-NLS-1$ |
1841 | + } |
1842 | + } |
1843 | + |
1844 | + /** |
1845 | + * @generated |
1846 | + */ |
1847 | private String getBlock_2002Text(View view) { |
1848 | IParser parser = AlgorithmParserProvider.getParser( |
1849 | AlgorithmElementTypes.Block_2002, |
1850 | @@ -246,32 +272,6 @@ |
1851 | /** |
1852 | * @generated |
1853 | */ |
1854 | - private String getBranchTrue_4002Text(View view) { |
1855 | - IParser parser = AlgorithmParserProvider.getParser( |
1856 | - AlgorithmElementTypes.BranchTrue_4002, |
1857 | - view.getElement() != null ? view.getElement() : view, |
1858 | - AlgorithmVisualIDRegistry.getType(TrueLabelEditPart.VISUAL_ID)); |
1859 | - if (parser != null) { |
1860 | - return parser.getPrintString(new EObjectAdapter( |
1861 | - view.getElement() != null ? view.getElement() : view), |
1862 | - ParserOptions.NONE.intValue()); |
1863 | - } else { |
1864 | - AlgorithmDiagramEditorPlugin.getInstance().logError( |
1865 | - "Parser was not found for label " + 6001); //$NON-NLS-1$ |
1866 | - return ""; //$NON-NLS-1$ |
1867 | - } |
1868 | - } |
1869 | - |
1870 | - /** |
1871 | - * @generated |
1872 | - */ |
1873 | - private String getBlockNext_4004Text(View view) { |
1874 | - return ""; //$NON-NLS-1$ |
1875 | - } |
1876 | - |
1877 | - /** |
1878 | - * @generated |
1879 | - */ |
1880 | private String getUnknownElementText(View view) { |
1881 | return "<UnknownElement Visual_ID = " + view.getType() + ">"; //$NON-NLS-1$ //$NON-NLS-2$ |
1882 | } |
1883 | |
1884 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramActionBarContributor.java' |
1885 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramActionBarContributor.java 2010-12-16 01:59:28 +0000 |
1886 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramActionBarContributor.java 2011-03-16 20:54:30 +0000 |
1887 | @@ -1,6 +1,8 @@ |
1888 | package net.launchpad.vide.algorithm.diagram.part; |
1889 | |
1890 | import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramActionBarContributor; |
1891 | +import org.eclipse.jface.action.GroupMarker; |
1892 | +import org.eclipse.jface.action.IAction; |
1893 | import org.eclipse.jface.action.IMenuManager; |
1894 | import org.eclipse.ui.IActionBars; |
1895 | import org.eclipse.ui.IWorkbenchActionConstants; |
1896 | @@ -36,5 +38,13 @@ |
1897 | IWorkbenchActionConstants.M_FILE); |
1898 | assert fileMenu != null; |
1899 | fileMenu.remove("pageSetupAction"); //$NON-NLS-1$ |
1900 | + IMenuManager editMenu = bars.getMenuManager().findMenuUsingPath( |
1901 | + IWorkbenchActionConstants.M_EDIT); |
1902 | + assert editMenu != null; |
1903 | + if (editMenu.find("validationGroup") == null) { //$NON-NLS-1$ |
1904 | + editMenu.add(new GroupMarker("validationGroup")); //$NON-NLS-1$ |
1905 | + } |
1906 | + IAction validateAction = new ValidateAction(page); |
1907 | + editMenu.appendToGroup("validationGroup", validateAction); //$NON-NLS-1$ |
1908 | } |
1909 | } |
1910 | |
1911 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramEditorPlugin.java' |
1912 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramEditorPlugin.java 2010-12-16 01:59:28 +0000 |
1913 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramEditorPlugin.java 2011-03-16 20:54:30 +0000 |
1914 | @@ -4,6 +4,7 @@ |
1915 | import java.util.List; |
1916 | |
1917 | import net.launchpad.vide.algorithm.diagram.edit.policies.AlgorithmBaseItemSemanticEditPolicy; |
1918 | +import net.launchpad.vide.algorithm.diagram.expressions.AlgorithmOCLFactory; |
1919 | import net.launchpad.vide.algorithm.diagram.providers.ElementInitializers; |
1920 | import net.launchpad.vide.algorithm.provider.AlgorithmItemProviderAdapterFactory; |
1921 | |
1922 | @@ -68,6 +69,11 @@ |
1923 | /** |
1924 | * @generated |
1925 | */ |
1926 | + private AlgorithmOCLFactory oclFactory; |
1927 | + |
1928 | + /** |
1929 | + * @generated |
1930 | + */ |
1931 | public AlgorithmDiagramEditorPlugin() { |
1932 | } |
1933 | |
1934 | @@ -90,6 +96,7 @@ |
1935 | adapterFactory = null; |
1936 | linkConstraints = null; |
1937 | initializers = null; |
1938 | + oclFactory = null; |
1939 | instance = null; |
1940 | super.stop(context); |
1941 | } |
1942 | @@ -238,6 +245,20 @@ |
1943 | /** |
1944 | * @generated |
1945 | */ |
1946 | + public AlgorithmOCLFactory getAlgorithmOCLFactory() { |
1947 | + return oclFactory; |
1948 | + } |
1949 | + |
1950 | + /** |
1951 | + * @generated |
1952 | + */ |
1953 | + public void setAlgorithmOCLFactory(AlgorithmOCLFactory f) { |
1954 | + this.oclFactory = f; |
1955 | + } |
1956 | + |
1957 | + /** |
1958 | + * @generated |
1959 | + */ |
1960 | public void logError(String error) { |
1961 | logError(error, null); |
1962 | } |
1963 | |
1964 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramUpdater.java' |
1965 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramUpdater.java 2011-02-12 23:09:25 +0000 |
1966 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmDiagramUpdater.java 2011-03-16 20:54:30 +0000 |
1967 | @@ -202,26 +202,6 @@ |
1968 | /** |
1969 | * @generated |
1970 | */ |
1971 | - private static Collection<AlgorithmLinkDescriptor> getIncomingFeatureModelFacetLinks_Branch_False_4003( |
1972 | - Instruction target, |
1973 | - Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) { |
1974 | - LinkedList<AlgorithmLinkDescriptor> result = new LinkedList<AlgorithmLinkDescriptor>(); |
1975 | - Collection<EStructuralFeature.Setting> settings = crossReferences |
1976 | - .get(target); |
1977 | - for (EStructuralFeature.Setting setting : settings) { |
1978 | - if (setting.getEStructuralFeature() == AlgorithmPackage.eINSTANCE |
1979 | - .getBranch_False()) { |
1980 | - result.add(new AlgorithmLinkDescriptor(setting.getEObject(), |
1981 | - target, AlgorithmElementTypes.BranchFalse_4003, |
1982 | - BranchFalseEditPart.VISUAL_ID)); |
1983 | - } |
1984 | - } |
1985 | - return result; |
1986 | - } |
1987 | - |
1988 | - /** |
1989 | - * @generated |
1990 | - */ |
1991 | private static Collection<AlgorithmLinkDescriptor> getIncomingFeatureModelFacetLinks_Block_Next_4004( |
1992 | Instruction target, |
1993 | Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) { |
1994 | @@ -262,16 +242,20 @@ |
1995 | /** |
1996 | * @generated |
1997 | */ |
1998 | - private static Collection<AlgorithmLinkDescriptor> getOutgoingFeatureModelFacetLinks_Branch_False_4003( |
1999 | - Branch source) { |
2000 | + private static Collection<AlgorithmLinkDescriptor> getIncomingFeatureModelFacetLinks_Branch_False_4003( |
2001 | + Instruction target, |
2002 | + Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) { |
2003 | LinkedList<AlgorithmLinkDescriptor> result = new LinkedList<AlgorithmLinkDescriptor>(); |
2004 | - Instruction destination = source.getFalse(); |
2005 | - if (destination == null) { |
2006 | - return result; |
2007 | + Collection<EStructuralFeature.Setting> settings = crossReferences |
2008 | + .get(target); |
2009 | + for (EStructuralFeature.Setting setting : settings) { |
2010 | + if (setting.getEStructuralFeature() == AlgorithmPackage.eINSTANCE |
2011 | + .getBranch_False()) { |
2012 | + result.add(new AlgorithmLinkDescriptor(setting.getEObject(), |
2013 | + target, AlgorithmElementTypes.BranchFalse_4003, |
2014 | + BranchFalseEditPart.VISUAL_ID)); |
2015 | + } |
2016 | } |
2017 | - result.add(new AlgorithmLinkDescriptor(source, destination, |
2018 | - AlgorithmElementTypes.BranchFalse_4003, |
2019 | - BranchFalseEditPart.VISUAL_ID)); |
2020 | return result; |
2021 | } |
2022 | |
2023 | @@ -307,4 +291,20 @@ |
2024 | return result; |
2025 | } |
2026 | |
2027 | + /** |
2028 | + * @generated |
2029 | + */ |
2030 | + private static Collection<AlgorithmLinkDescriptor> getOutgoingFeatureModelFacetLinks_Branch_False_4003( |
2031 | + Branch source) { |
2032 | + LinkedList<AlgorithmLinkDescriptor> result = new LinkedList<AlgorithmLinkDescriptor>(); |
2033 | + Instruction destination = source.getFalse(); |
2034 | + if (destination == null) { |
2035 | + return result; |
2036 | + } |
2037 | + result.add(new AlgorithmLinkDescriptor(source, destination, |
2038 | + AlgorithmElementTypes.BranchFalse_4003, |
2039 | + BranchFalseEditPart.VISUAL_ID)); |
2040 | + return result; |
2041 | + } |
2042 | + |
2043 | } |
2044 | |
2045 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmPaletteFactory.java' |
2046 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmPaletteFactory.java 2011-02-12 23:09:25 +0000 |
2047 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmPaletteFactory.java 2011-03-16 20:54:30 +0000 |
2048 | @@ -1,15 +1,17 @@ |
2049 | package net.launchpad.vide.algorithm.diagram.part; |
2050 | |
2051 | -import java.util.ArrayList; |
2052 | import java.util.Collections; |
2053 | +import java.util.Iterator; |
2054 | import java.util.List; |
2055 | |
2056 | import net.launchpad.vide.algorithm.diagram.providers.AlgorithmElementTypes; |
2057 | |
2058 | import org.eclipse.gef.Tool; |
2059 | import org.eclipse.gef.palette.PaletteContainer; |
2060 | +import org.eclipse.gef.palette.PaletteEntry; |
2061 | import org.eclipse.gef.palette.PaletteGroup; |
2062 | import org.eclipse.gef.palette.PaletteRoot; |
2063 | +import org.eclipse.gef.palette.PanningSelectionToolEntry; |
2064 | import org.eclipse.gef.palette.ToolEntry; |
2065 | import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool; |
2066 | import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool; |
2067 | @@ -24,7 +26,36 @@ |
2068 | * @generated |
2069 | */ |
2070 | public void fillPalette(PaletteRoot paletteRoot) { |
2071 | + cleanStandardTools(paletteRoot); |
2072 | paletteRoot.add(createAlgorithm1Group()); |
2073 | + paletteRoot.add(createBranch2Group()); |
2074 | + } |
2075 | + |
2076 | + /** |
2077 | + * Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=159289 |
2078 | + * @generated |
2079 | + */ |
2080 | + private void cleanStandardTools(PaletteRoot paletteRoot) { |
2081 | + for (Iterator it = paletteRoot.getChildren().iterator(); it.hasNext();) { |
2082 | + PaletteEntry entry = (PaletteEntry) it.next(); |
2083 | + if (!"standardGroup".equals(entry.getId())) { //$NON-NLS-1$ |
2084 | + continue; |
2085 | + } |
2086 | + for (Iterator it2 = ((PaletteContainer) entry).getChildren() |
2087 | + .iterator(); it2.hasNext();) { |
2088 | + PaletteEntry entry2 = (PaletteEntry) it2.next(); |
2089 | + if ("zoomTool".equals(entry2.getId())) { //$NON-NLS-1$ |
2090 | + it2.remove(); |
2091 | + } else if ("noteStack".equals(entry2.getId())) { //$NON-NLS-1$ |
2092 | + it2.remove(); |
2093 | + } else if ("selectionTool".equals(entry2.getId())) { //$NON-NLS-1$ |
2094 | + it2.remove(); |
2095 | + } |
2096 | + if (paletteRoot.getDefaultEntry() == entry2) { |
2097 | + paletteRoot.setDefaultEntry(null); |
2098 | + } |
2099 | + } |
2100 | + } |
2101 | } |
2102 | |
2103 | /** |
2104 | @@ -37,9 +68,21 @@ |
2105 | paletteContainer.setId("createAlgorithm1Group"); //$NON-NLS-1$ |
2106 | paletteContainer.add(createBlock1CreationTool()); |
2107 | paletteContainer.add(createBlockNext2CreationTool()); |
2108 | - paletteContainer.add(createBranch3CreationTool()); |
2109 | - paletteContainer.add(createBranchFalse4CreationTool()); |
2110 | - paletteContainer.add(createBranchTrue5CreationTool()); |
2111 | + return paletteContainer; |
2112 | + } |
2113 | + |
2114 | + /** |
2115 | + * Creates "branch" palette tool group |
2116 | + * @generated |
2117 | + */ |
2118 | + private PaletteContainer createBranch2Group() { |
2119 | + PaletteGroup paletteContainer = new PaletteGroup( |
2120 | + Messages.Branch2Group_title); |
2121 | + paletteContainer.setId("createBranch2Group"); //$NON-NLS-1$ |
2122 | + paletteContainer.add(createBranch1CreationTool()); |
2123 | + paletteContainer.add(createBranchFalse2CreationTool()); |
2124 | + paletteContainer.add(createBranchTrue3CreationTool()); |
2125 | + paletteContainer.add(createTool()); |
2126 | return paletteContainer; |
2127 | } |
2128 | |
2129 | @@ -76,12 +119,12 @@ |
2130 | /** |
2131 | * @generated |
2132 | */ |
2133 | - private ToolEntry createBranch3CreationTool() { |
2134 | + private ToolEntry createBranch1CreationTool() { |
2135 | NodeToolEntry entry = new NodeToolEntry( |
2136 | - Messages.Branch3CreationTool_title, |
2137 | - Messages.Branch3CreationTool_desc, |
2138 | + Messages.Branch1CreationTool_title, |
2139 | + Messages.Branch1CreationTool_desc, |
2140 | Collections.singletonList(AlgorithmElementTypes.Branch_2003)); |
2141 | - entry.setId("createBranch3CreationTool"); //$NON-NLS-1$ |
2142 | + entry.setId("createBranch1CreationTool"); //$NON-NLS-1$ |
2143 | entry.setSmallIcon(AlgorithmElementTypes |
2144 | .getImageDescriptor(AlgorithmElementTypes.Branch_2003)); |
2145 | entry.setLargeIcon(entry.getSmallIcon()); |
2146 | @@ -91,13 +134,13 @@ |
2147 | /** |
2148 | * @generated |
2149 | */ |
2150 | - private ToolEntry createBranchFalse4CreationTool() { |
2151 | + private ToolEntry createBranchFalse2CreationTool() { |
2152 | LinkToolEntry entry = new LinkToolEntry( |
2153 | - Messages.BranchFalse4CreationTool_title, |
2154 | - Messages.BranchFalse4CreationTool_desc, |
2155 | + Messages.BranchFalse2CreationTool_title, |
2156 | + Messages.BranchFalse2CreationTool_desc, |
2157 | Collections |
2158 | .singletonList(AlgorithmElementTypes.BranchFalse_4003)); |
2159 | - entry.setId("createBranchFalse4CreationTool"); //$NON-NLS-1$ |
2160 | + entry.setId("createBranchFalse2CreationTool"); //$NON-NLS-1$ |
2161 | entry.setSmallIcon(AlgorithmElementTypes |
2162 | .getImageDescriptor(AlgorithmElementTypes.BranchFalse_4003)); |
2163 | entry.setLargeIcon(entry.getSmallIcon()); |
2164 | @@ -107,13 +150,13 @@ |
2165 | /** |
2166 | * @generated |
2167 | */ |
2168 | - private ToolEntry createBranchTrue5CreationTool() { |
2169 | + private ToolEntry createBranchTrue3CreationTool() { |
2170 | LinkToolEntry entry = new LinkToolEntry( |
2171 | - Messages.BranchTrue5CreationTool_title, |
2172 | - Messages.BranchTrue5CreationTool_desc, |
2173 | + Messages.BranchTrue3CreationTool_title, |
2174 | + Messages.BranchTrue3CreationTool_desc, |
2175 | Collections |
2176 | .singletonList(AlgorithmElementTypes.BranchTrue_4002)); |
2177 | - entry.setId("createBranchTrue5CreationTool"); //$NON-NLS-1$ |
2178 | + entry.setId("createBranchTrue3CreationTool"); //$NON-NLS-1$ |
2179 | entry.setSmallIcon(AlgorithmElementTypes |
2180 | .getImageDescriptor(AlgorithmElementTypes.BranchTrue_4002)); |
2181 | entry.setLargeIcon(entry.getSmallIcon()); |
2182 | @@ -123,6 +166,15 @@ |
2183 | /** |
2184 | * @generated |
2185 | */ |
2186 | + private ToolEntry createTool() { |
2187 | + PanningSelectionToolEntry entry = new PanningSelectionToolEntry(); |
2188 | + entry.setId("createTool"); //$NON-NLS-1$ |
2189 | + return entry; |
2190 | + } |
2191 | + |
2192 | + /** |
2193 | + * @generated |
2194 | + */ |
2195 | private static class NodeToolEntry extends ToolEntry { |
2196 | |
2197 | /** |
2198 | |
2199 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmVisualIDRegistry.java' |
2200 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmVisualIDRegistry.java 2011-02-12 23:09:25 +0000 |
2201 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/AlgorithmVisualIDRegistry.java 2011-03-16 20:54:30 +0000 |
2202 | @@ -7,11 +7,11 @@ |
2203 | import net.launchpad.vide.algorithm.diagram.edit.parts.BlockEditPart; |
2204 | import net.launchpad.vide.algorithm.diagram.edit.parts.BranchCondtionEditPart; |
2205 | import net.launchpad.vide.algorithm.diagram.edit.parts.BranchEditPart; |
2206 | - |
2207 | import net.launchpad.vide.algorithm.diagram.edit.parts.BranchFalseEditPart; |
2208 | import net.launchpad.vide.algorithm.diagram.edit.parts.BranchTrueEditPart; |
2209 | import net.launchpad.vide.algorithm.diagram.edit.parts.FalseLabelEditPart; |
2210 | import net.launchpad.vide.algorithm.diagram.edit.parts.TrueLabelEditPart; |
2211 | + |
2212 | import org.eclipse.core.runtime.Platform; |
2213 | import org.eclipse.emf.ecore.EAnnotation; |
2214 | import org.eclipse.emf.ecore.EObject; |
2215 | |
2216 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/Messages.java' |
2217 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/Messages.java 2010-12-16 11:36:05 +0000 |
2218 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/Messages.java 2011-03-16 20:54:30 +0000 |
2219 | @@ -248,6 +248,11 @@ |
2220 | /** |
2221 | * @generated |
2222 | */ |
2223 | + public static String Branch2Group_title; |
2224 | + |
2225 | + /** |
2226 | + * @generated |
2227 | + */ |
2228 | public static String Block1CreationTool_title; |
2229 | |
2230 | /** |
2231 | @@ -268,32 +273,37 @@ |
2232 | /** |
2233 | * @generated |
2234 | */ |
2235 | - public static String Branch3CreationTool_title; |
2236 | - |
2237 | - /** |
2238 | - * @generated |
2239 | - */ |
2240 | - public static String Branch3CreationTool_desc; |
2241 | - |
2242 | - /** |
2243 | - * @generated |
2244 | - */ |
2245 | - public static String BranchFalse4CreationTool_title; |
2246 | - |
2247 | - /** |
2248 | - * @generated |
2249 | - */ |
2250 | - public static String BranchFalse4CreationTool_desc; |
2251 | - |
2252 | - /** |
2253 | - * @generated |
2254 | - */ |
2255 | - public static String BranchTrue5CreationTool_title; |
2256 | - |
2257 | - /** |
2258 | - * @generated |
2259 | - */ |
2260 | - public static String BranchTrue5CreationTool_desc; |
2261 | + public static String Branch1CreationTool_title; |
2262 | + |
2263 | + /** |
2264 | + * @generated |
2265 | + */ |
2266 | + public static String Branch1CreationTool_desc; |
2267 | + |
2268 | + /** |
2269 | + * @generated |
2270 | + */ |
2271 | + public static String BranchFalse2CreationTool_title; |
2272 | + |
2273 | + /** |
2274 | + * @generated |
2275 | + */ |
2276 | + public static String BranchFalse2CreationTool_desc; |
2277 | + |
2278 | + /** |
2279 | + * @generated |
2280 | + */ |
2281 | + public static String BranchTrue3CreationTool_title; |
2282 | + |
2283 | + /** |
2284 | + * @generated |
2285 | + */ |
2286 | + public static String BranchTrue3CreationTool_desc; |
2287 | + |
2288 | + /** |
2289 | + * @generated |
2290 | + */ |
2291 | + public static String Tool_title; |
2292 | |
2293 | /** |
2294 | * @generated |
2295 | @@ -303,6 +313,36 @@ |
2296 | /** |
2297 | * @generated |
2298 | */ |
2299 | + public static String NavigatorGroupName_BranchFalse_4003_target; |
2300 | + |
2301 | + /** |
2302 | + * @generated |
2303 | + */ |
2304 | + public static String NavigatorGroupName_BranchFalse_4003_source; |
2305 | + |
2306 | + /** |
2307 | + * @generated |
2308 | + */ |
2309 | + public static String NavigatorGroupName_BlockNext_4004_target; |
2310 | + |
2311 | + /** |
2312 | + * @generated |
2313 | + */ |
2314 | + public static String NavigatorGroupName_BlockNext_4004_source; |
2315 | + |
2316 | + /** |
2317 | + * @generated |
2318 | + */ |
2319 | + public static String NavigatorGroupName_BranchTrue_4002_target; |
2320 | + |
2321 | + /** |
2322 | + * @generated |
2323 | + */ |
2324 | + public static String NavigatorGroupName_BranchTrue_4002_source; |
2325 | + |
2326 | + /** |
2327 | + * @generated |
2328 | + */ |
2329 | public static String NavigatorGroupName_Algorithm_1000_links; |
2330 | |
2331 | /** |
2332 | @@ -318,16 +358,6 @@ |
2333 | /** |
2334 | * @generated |
2335 | */ |
2336 | - public static String NavigatorGroupName_BranchFalse_4003_target; |
2337 | - |
2338 | - /** |
2339 | - * @generated |
2340 | - */ |
2341 | - public static String NavigatorGroupName_BranchFalse_4003_source; |
2342 | - |
2343 | - /** |
2344 | - * @generated |
2345 | - */ |
2346 | public static String NavigatorGroupName_Block_2002_incominglinks; |
2347 | |
2348 | /** |
2349 | @@ -338,26 +368,6 @@ |
2350 | /** |
2351 | * @generated |
2352 | */ |
2353 | - public static String NavigatorGroupName_BranchTrue_4002_target; |
2354 | - |
2355 | - /** |
2356 | - * @generated |
2357 | - */ |
2358 | - public static String NavigatorGroupName_BranchTrue_4002_source; |
2359 | - |
2360 | - /** |
2361 | - * @generated |
2362 | - */ |
2363 | - public static String NavigatorGroupName_BlockNext_4004_target; |
2364 | - |
2365 | - /** |
2366 | - * @generated |
2367 | - */ |
2368 | - public static String NavigatorGroupName_BlockNext_4004_source; |
2369 | - |
2370 | - /** |
2371 | - * @generated |
2372 | - */ |
2373 | public static String NavigatorActionProvider_OpenDiagramActionName; |
2374 | |
2375 | /** |
2376 | |
2377 | === added file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/ValidateAction.java' |
2378 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/ValidateAction.java 1970-01-01 00:00:00 +0000 |
2379 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/part/ValidateAction.java 2011-03-16 20:54:30 +0000 |
2380 | @@ -0,0 +1,298 @@ |
2381 | +package net.launchpad.vide.algorithm.diagram.part; |
2382 | + |
2383 | +import java.lang.reflect.InvocationTargetException; |
2384 | +import java.util.ArrayList; |
2385 | +import java.util.HashSet; |
2386 | +import java.util.Iterator; |
2387 | +import java.util.List; |
2388 | +import java.util.Set; |
2389 | + |
2390 | +import net.launchpad.vide.algorithm.diagram.providers.AlgorithmMarkerNavigationProvider; |
2391 | +import net.launchpad.vide.algorithm.diagram.providers.AlgorithmValidationProvider; |
2392 | + |
2393 | +import org.eclipse.core.resources.IFile; |
2394 | +import org.eclipse.core.runtime.IProgressMonitor; |
2395 | +import org.eclipse.core.runtime.IStatus; |
2396 | +import org.eclipse.core.runtime.NullProgressMonitor; |
2397 | +import org.eclipse.emf.common.util.Diagnostic; |
2398 | +import org.eclipse.emf.ecore.EObject; |
2399 | +import org.eclipse.emf.ecore.util.Diagnostician; |
2400 | +import org.eclipse.emf.transaction.TransactionalEditingDomain; |
2401 | +import org.eclipse.emf.transaction.util.TransactionUtil; |
2402 | +import org.eclipse.emf.validation.model.EvaluationMode; |
2403 | +import org.eclipse.emf.validation.model.IConstraintStatus; |
2404 | +import org.eclipse.emf.validation.service.IBatchValidator; |
2405 | +import org.eclipse.emf.validation.service.ModelValidationService; |
2406 | +import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; |
2407 | +import org.eclipse.gef.EditPartViewer; |
2408 | +import org.eclipse.gmf.runtime.diagram.ui.OffscreenEditPartFactory; |
2409 | +import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; |
2410 | +import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart; |
2411 | +import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; |
2412 | +import org.eclipse.gmf.runtime.notation.View; |
2413 | +import org.eclipse.jface.action.Action; |
2414 | +import org.eclipse.jface.operation.IRunnableWithProgress; |
2415 | +import org.eclipse.ui.IEditorPart; |
2416 | +import org.eclipse.ui.IWorkbenchPage; |
2417 | +import org.eclipse.ui.IWorkbenchPart; |
2418 | +import org.eclipse.ui.PlatformUI; |
2419 | +import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation; |
2420 | + |
2421 | +/** |
2422 | + * @generated |
2423 | + */ |
2424 | +public class ValidateAction extends Action { |
2425 | + |
2426 | + /** |
2427 | + * @generated |
2428 | + */ |
2429 | + private IWorkbenchPage page; |
2430 | + |
2431 | + /** |
2432 | + * @generated |
2433 | + */ |
2434 | + public ValidateAction(IWorkbenchPage page) { |
2435 | + setText(Messages.ValidateActionMessage); |
2436 | + this.page = page; |
2437 | + } |
2438 | + |
2439 | + /** |
2440 | + * @generated |
2441 | + */ |
2442 | + public void run() { |
2443 | + IWorkbenchPart workbenchPart = page.getActivePart(); |
2444 | + if (workbenchPart instanceof IDiagramWorkbenchPart) { |
2445 | + final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart) workbenchPart; |
2446 | + try { |
2447 | + new WorkspaceModifyDelegatingOperation( |
2448 | + new IRunnableWithProgress() { |
2449 | + |
2450 | + public void run(IProgressMonitor monitor) |
2451 | + throws InterruptedException, |
2452 | + InvocationTargetException { |
2453 | + runValidation(part.getDiagramEditPart(), |
2454 | + part.getDiagram()); |
2455 | + } |
2456 | + }).run(new NullProgressMonitor()); |
2457 | + } catch (Exception e) { |
2458 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
2459 | + "Validation action failed", e); //$NON-NLS-1$ |
2460 | + } |
2461 | + } |
2462 | + } |
2463 | + |
2464 | + /** |
2465 | + * @generated |
2466 | + */ |
2467 | + public static void runValidation(View view) { |
2468 | + try { |
2469 | + if (AlgorithmDiagramEditorUtil.openDiagram(view.eResource())) { |
2470 | + IEditorPart editorPart = PlatformUI.getWorkbench() |
2471 | + .getActiveWorkbenchWindow().getActivePage() |
2472 | + .getActiveEditor(); |
2473 | + if (editorPart instanceof IDiagramWorkbenchPart) { |
2474 | + runValidation( |
2475 | + ((IDiagramWorkbenchPart) editorPart) |
2476 | + .getDiagramEditPart(), |
2477 | + view); |
2478 | + } else { |
2479 | + runNonUIValidation(view); |
2480 | + } |
2481 | + } |
2482 | + } catch (Exception e) { |
2483 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
2484 | + "Validation action failed", e); //$NON-NLS-1$ |
2485 | + } |
2486 | + } |
2487 | + |
2488 | + /** |
2489 | + * @generated |
2490 | + */ |
2491 | + public static void runNonUIValidation(View view) { |
2492 | + DiagramEditPart diagramEditPart = OffscreenEditPartFactory |
2493 | + .getInstance().createDiagramEditPart(view.getDiagram()); |
2494 | + runValidation(diagramEditPart, view); |
2495 | + } |
2496 | + |
2497 | + /** |
2498 | + * @generated |
2499 | + */ |
2500 | + public static void runValidation(DiagramEditPart diagramEditPart, View view) { |
2501 | + final DiagramEditPart fpart = diagramEditPart; |
2502 | + final View fview = view; |
2503 | + TransactionalEditingDomain txDomain = TransactionUtil |
2504 | + .getEditingDomain(view); |
2505 | + AlgorithmValidationProvider.runWithConstraints(txDomain, |
2506 | + new Runnable() { |
2507 | + |
2508 | + public void run() { |
2509 | + validate(fpart, fview); |
2510 | + } |
2511 | + }); |
2512 | + } |
2513 | + |
2514 | + /** |
2515 | + * @generated |
2516 | + */ |
2517 | + private static Diagnostic runEMFValidator(View target) { |
2518 | + if (target.isSetElement() && target.getElement() != null) { |
2519 | + return new Diagnostician() { |
2520 | + |
2521 | + public String getObjectLabel(EObject eObject) { |
2522 | + return EMFCoreUtil.getQualifiedName(eObject, true); |
2523 | + } |
2524 | + }.validate(target.getElement()); |
2525 | + } |
2526 | + return Diagnostic.OK_INSTANCE; |
2527 | + } |
2528 | + |
2529 | + /** |
2530 | + * @generated |
2531 | + */ |
2532 | + private static void validate(DiagramEditPart diagramEditPart, View view) { |
2533 | + IFile target = view.eResource() != null ? WorkspaceSynchronizer |
2534 | + .getFile(view.eResource()) : null; |
2535 | + if (target != null) { |
2536 | + AlgorithmMarkerNavigationProvider.deleteMarkers(target); |
2537 | + } |
2538 | + Diagnostic diagnostic = runEMFValidator(view); |
2539 | + createMarkers(target, diagnostic, diagramEditPart); |
2540 | + IBatchValidator validator = (IBatchValidator) ModelValidationService |
2541 | + .getInstance().newValidator(EvaluationMode.BATCH); |
2542 | + validator.setIncludeLiveConstraints(true); |
2543 | + if (view.isSetElement() && view.getElement() != null) { |
2544 | + IStatus status = validator.validate(view.getElement()); |
2545 | + createMarkers(target, status, diagramEditPart); |
2546 | + } |
2547 | + } |
2548 | + |
2549 | + /** |
2550 | + * @generated |
2551 | + */ |
2552 | + private static void createMarkers(IFile target, IStatus validationStatus, |
2553 | + DiagramEditPart diagramEditPart) { |
2554 | + if (validationStatus.isOK()) { |
2555 | + return; |
2556 | + } |
2557 | + final IStatus rootStatus = validationStatus; |
2558 | + List allStatuses = new ArrayList(); |
2559 | + AlgorithmDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new AlgorithmDiagramEditorUtil.LazyElement2ViewMap( |
2560 | + diagramEditPart.getDiagramView(), collectTargetElements( |
2561 | + rootStatus, new HashSet<EObject>(), allStatuses)); |
2562 | + for (Iterator it = allStatuses.iterator(); it.hasNext();) { |
2563 | + IConstraintStatus nextStatus = (IConstraintStatus) it.next(); |
2564 | + View view = AlgorithmDiagramEditorUtil.findView(diagramEditPart, |
2565 | + nextStatus.getTarget(), element2ViewMap); |
2566 | + addMarker(diagramEditPart.getViewer(), target, view.eResource() |
2567 | + .getURIFragment(view), EMFCoreUtil.getQualifiedName( |
2568 | + nextStatus.getTarget(), true), nextStatus.getMessage(), |
2569 | + nextStatus.getSeverity()); |
2570 | + } |
2571 | + } |
2572 | + |
2573 | + /** |
2574 | + * @generated |
2575 | + */ |
2576 | + private static void createMarkers(IFile target, |
2577 | + Diagnostic emfValidationStatus, DiagramEditPart diagramEditPart) { |
2578 | + if (emfValidationStatus.getSeverity() == Diagnostic.OK) { |
2579 | + return; |
2580 | + } |
2581 | + final Diagnostic rootStatus = emfValidationStatus; |
2582 | + List allDiagnostics = new ArrayList(); |
2583 | + AlgorithmDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new AlgorithmDiagramEditorUtil.LazyElement2ViewMap( |
2584 | + diagramEditPart.getDiagramView(), collectTargetElements( |
2585 | + rootStatus, new HashSet<EObject>(), allDiagnostics)); |
2586 | + for (Iterator it = emfValidationStatus.getChildren().iterator(); it |
2587 | + .hasNext();) { |
2588 | + Diagnostic nextDiagnostic = (Diagnostic) it.next(); |
2589 | + List data = nextDiagnostic.getData(); |
2590 | + if (data != null && !data.isEmpty() |
2591 | + && data.get(0) instanceof EObject) { |
2592 | + EObject element = (EObject) data.get(0); |
2593 | + View view = AlgorithmDiagramEditorUtil.findView( |
2594 | + diagramEditPart, element, element2ViewMap); |
2595 | + addMarker( |
2596 | + diagramEditPart.getViewer(), |
2597 | + target, |
2598 | + view.eResource().getURIFragment(view), |
2599 | + EMFCoreUtil.getQualifiedName(element, true), |
2600 | + nextDiagnostic.getMessage(), |
2601 | + diagnosticToStatusSeverity(nextDiagnostic.getSeverity())); |
2602 | + } |
2603 | + } |
2604 | + } |
2605 | + |
2606 | + /** |
2607 | + * @generated |
2608 | + */ |
2609 | + private static void addMarker(EditPartViewer viewer, IFile target, |
2610 | + String elementId, String location, String message, |
2611 | + int statusSeverity) { |
2612 | + if (target == null) { |
2613 | + return; |
2614 | + } |
2615 | + AlgorithmMarkerNavigationProvider.addMarker(target, elementId, |
2616 | + location, message, statusSeverity); |
2617 | + } |
2618 | + |
2619 | + /** |
2620 | + * @generated |
2621 | + */ |
2622 | + private static int diagnosticToStatusSeverity(int diagnosticSeverity) { |
2623 | + if (diagnosticSeverity == Diagnostic.OK) { |
2624 | + return IStatus.OK; |
2625 | + } else if (diagnosticSeverity == Diagnostic.INFO) { |
2626 | + return IStatus.INFO; |
2627 | + } else if (diagnosticSeverity == Diagnostic.WARNING) { |
2628 | + return IStatus.WARNING; |
2629 | + } else if (diagnosticSeverity == Diagnostic.ERROR |
2630 | + || diagnosticSeverity == Diagnostic.CANCEL) { |
2631 | + return IStatus.ERROR; |
2632 | + } |
2633 | + return IStatus.INFO; |
2634 | + } |
2635 | + |
2636 | + /** |
2637 | + * @generated |
2638 | + */ |
2639 | + private static Set<EObject> collectTargetElements(IStatus status, |
2640 | + Set<EObject> targetElementCollector, List allConstraintStatuses) { |
2641 | + if (status instanceof IConstraintStatus) { |
2642 | + targetElementCollector |
2643 | + .add(((IConstraintStatus) status).getTarget()); |
2644 | + allConstraintStatuses.add(status); |
2645 | + } |
2646 | + if (status.isMultiStatus()) { |
2647 | + IStatus[] children = status.getChildren(); |
2648 | + for (int i = 0; i < children.length; i++) { |
2649 | + collectTargetElements(children[i], targetElementCollector, |
2650 | + allConstraintStatuses); |
2651 | + } |
2652 | + } |
2653 | + return targetElementCollector; |
2654 | + } |
2655 | + |
2656 | + /** |
2657 | + * @generated |
2658 | + */ |
2659 | + private static Set<EObject> collectTargetElements(Diagnostic diagnostic, |
2660 | + Set<EObject> targetElementCollector, List allDiagnostics) { |
2661 | + List data = diagnostic.getData(); |
2662 | + EObject target = null; |
2663 | + if (data != null && !data.isEmpty() && data.get(0) instanceof EObject) { |
2664 | + target = (EObject) data.get(0); |
2665 | + targetElementCollector.add(target); |
2666 | + allDiagnostics.add(diagnostic); |
2667 | + } |
2668 | + if (diagnostic.getChildren() != null |
2669 | + && !diagnostic.getChildren().isEmpty()) { |
2670 | + for (Iterator it = diagnostic.getChildren().iterator(); it |
2671 | + .hasNext();) { |
2672 | + collectTargetElements((Diagnostic) it.next(), |
2673 | + targetElementCollector, allDiagnostics); |
2674 | + } |
2675 | + } |
2676 | + return targetElementCollector; |
2677 | + } |
2678 | +} |
2679 | |
2680 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmElementTypes.java' |
2681 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmElementTypes.java 2011-02-12 23:09:25 +0000 |
2682 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmElementTypes.java 2011-03-16 20:54:30 +0000 |
2683 | @@ -66,15 +66,15 @@ |
2684 | /** |
2685 | * @generated |
2686 | */ |
2687 | - public static final IElementType BranchFalse_4003 = getElementType("net.launchpad.vide.diagram.BranchFalse_4003"); //$NON-NLS-1$ |
2688 | - /** |
2689 | - * @generated |
2690 | - */ |
2691 | public static final IElementType BlockNext_4004 = getElementType("net.launchpad.vide.diagram.BlockNext_4004"); //$NON-NLS-1$ |
2692 | /** |
2693 | * @generated |
2694 | */ |
2695 | public static final IElementType BranchTrue_4002 = getElementType("net.launchpad.vide.diagram.BranchTrue_4002"); //$NON-NLS-1$ |
2696 | + /** |
2697 | + * @generated |
2698 | + */ |
2699 | + public static final IElementType BranchFalse_4003 = getElementType("net.launchpad.vide.diagram.BranchFalse_4003"); //$NON-NLS-1$ |
2700 | |
2701 | /** |
2702 | * @generated |
2703 | |
2704 | === added file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmMarkerNavigationProvider.java' |
2705 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmMarkerNavigationProvider.java 1970-01-01 00:00:00 +0000 |
2706 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmMarkerNavigationProvider.java 2011-03-16 20:54:30 +0000 |
2707 | @@ -0,0 +1,96 @@ |
2708 | +package net.launchpad.vide.algorithm.diagram.providers; |
2709 | + |
2710 | +import java.util.Arrays; |
2711 | +import java.util.Map; |
2712 | + |
2713 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorPlugin; |
2714 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorUtil; |
2715 | + |
2716 | +import org.eclipse.core.resources.IFile; |
2717 | +import org.eclipse.core.resources.IMarker; |
2718 | +import org.eclipse.core.resources.IResource; |
2719 | +import org.eclipse.core.runtime.CoreException; |
2720 | +import org.eclipse.core.runtime.IStatus; |
2721 | +import org.eclipse.emf.ecore.EObject; |
2722 | +import org.eclipse.gef.EditPart; |
2723 | +import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; |
2724 | +import org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider; |
2725 | + |
2726 | +/** |
2727 | + * @generated |
2728 | + */ |
2729 | +public class AlgorithmMarkerNavigationProvider extends |
2730 | + AbstractModelMarkerNavigationProvider { |
2731 | + |
2732 | + /** |
2733 | + * @generated |
2734 | + */ |
2735 | + public static final String MARKER_TYPE = AlgorithmDiagramEditorPlugin.ID |
2736 | + + ".diagnostic"; //$NON-NLS-1$ |
2737 | + |
2738 | + /** |
2739 | + * @generated |
2740 | + */ |
2741 | + protected void doGotoMarker(IMarker marker) { |
2742 | + String elementId = marker |
2743 | + .getAttribute( |
2744 | + org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, |
2745 | + null); |
2746 | + if (elementId == null || !(getEditor() instanceof DiagramEditor)) { |
2747 | + return; |
2748 | + } |
2749 | + DiagramEditor editor = (DiagramEditor) getEditor(); |
2750 | + Map editPartRegistry = editor.getDiagramGraphicalViewer() |
2751 | + .getEditPartRegistry(); |
2752 | + EObject targetView = editor.getDiagram().eResource() |
2753 | + .getEObject(elementId); |
2754 | + if (targetView == null) { |
2755 | + return; |
2756 | + } |
2757 | + EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView); |
2758 | + if (targetEditPart != null) { |
2759 | + AlgorithmDiagramEditorUtil.selectElementsInDiagram(editor, |
2760 | + Arrays.asList(new EditPart[] { targetEditPart })); |
2761 | + } |
2762 | + } |
2763 | + |
2764 | + /** |
2765 | + * @generated |
2766 | + */ |
2767 | + public static void deleteMarkers(IResource resource) { |
2768 | + try { |
2769 | + resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO); |
2770 | + } catch (CoreException e) { |
2771 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
2772 | + "Failed to delete validation markers", e); //$NON-NLS-1$ |
2773 | + } |
2774 | + } |
2775 | + |
2776 | + /** |
2777 | + * @generated |
2778 | + */ |
2779 | + public static IMarker addMarker(IFile file, String elementId, |
2780 | + String location, String message, int statusSeverity) { |
2781 | + IMarker marker = null; |
2782 | + try { |
2783 | + marker = file.createMarker(MARKER_TYPE); |
2784 | + marker.setAttribute(IMarker.MESSAGE, message); |
2785 | + marker.setAttribute(IMarker.LOCATION, location); |
2786 | + marker.setAttribute( |
2787 | + org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, |
2788 | + elementId); |
2789 | + int markerSeverity = IMarker.SEVERITY_INFO; |
2790 | + if (statusSeverity == IStatus.WARNING) { |
2791 | + markerSeverity = IMarker.SEVERITY_WARNING; |
2792 | + } else if (statusSeverity == IStatus.ERROR |
2793 | + || statusSeverity == IStatus.CANCEL) { |
2794 | + markerSeverity = IMarker.SEVERITY_ERROR; |
2795 | + } |
2796 | + marker.setAttribute(IMarker.SEVERITY, markerSeverity); |
2797 | + } catch (CoreException e) { |
2798 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
2799 | + "Failed to create validation marker", e); //$NON-NLS-1$ |
2800 | + } |
2801 | + return marker; |
2802 | + } |
2803 | +} |
2804 | |
2805 | === added file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationDecoratorProvider.java' |
2806 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationDecoratorProvider.java 1970-01-01 00:00:00 +0000 |
2807 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationDecoratorProvider.java 2011-03-16 20:54:30 +0000 |
2808 | @@ -0,0 +1,450 @@ |
2809 | +package net.launchpad.vide.algorithm.diagram.providers; |
2810 | + |
2811 | +import java.util.ArrayList; |
2812 | +import java.util.HashMap; |
2813 | +import java.util.Iterator; |
2814 | +import java.util.List; |
2815 | +import java.util.Map; |
2816 | + |
2817 | +import net.launchpad.vide.algorithm.diagram.edit.parts.AlgorithmEditPart; |
2818 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditor; |
2819 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorPlugin; |
2820 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmVisualIDRegistry; |
2821 | + |
2822 | +import org.eclipse.core.resources.IFile; |
2823 | +import org.eclipse.core.resources.IMarker; |
2824 | +import org.eclipse.core.resources.IResource; |
2825 | +import org.eclipse.core.runtime.CoreException; |
2826 | +import org.eclipse.draw2d.FlowLayout; |
2827 | +import org.eclipse.draw2d.Label; |
2828 | +import org.eclipse.emf.transaction.util.TransactionUtil; |
2829 | +import org.eclipse.emf.workspace.util.WorkspaceSynchronizer; |
2830 | +import org.eclipse.gef.EditDomain; |
2831 | +import org.eclipse.gef.EditPart; |
2832 | +import org.eclipse.gef.editparts.AbstractConnectionEditPart; |
2833 | +import org.eclipse.gmf.runtime.common.core.service.AbstractProvider; |
2834 | +import org.eclipse.gmf.runtime.common.core.service.IOperation; |
2835 | +import org.eclipse.gmf.runtime.common.ui.resources.FileChangeManager; |
2836 | +import org.eclipse.gmf.runtime.common.ui.resources.IFileObserver; |
2837 | +import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; |
2838 | +import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart; |
2839 | +import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain; |
2840 | +import org.eclipse.gmf.runtime.diagram.ui.services.decorator.AbstractDecorator; |
2841 | +import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation; |
2842 | +import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator; |
2843 | +import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider; |
2844 | +import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget; |
2845 | +import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil; |
2846 | +import org.eclipse.gmf.runtime.notation.Diagram; |
2847 | +import org.eclipse.gmf.runtime.notation.Edge; |
2848 | +import org.eclipse.gmf.runtime.notation.View; |
2849 | +import org.eclipse.swt.graphics.Image; |
2850 | +import org.eclipse.ui.ISharedImages; |
2851 | +import org.eclipse.ui.PlatformUI; |
2852 | + |
2853 | +/** |
2854 | + * @generated |
2855 | + */ |
2856 | +public class AlgorithmValidationDecoratorProvider extends AbstractProvider |
2857 | + implements IDecoratorProvider { |
2858 | + |
2859 | + /** |
2860 | + * @generated |
2861 | + */ |
2862 | + private static final String KEY = "validationStatus"; //$NON-NLS-1$ |
2863 | + |
2864 | + /** |
2865 | + * @generated |
2866 | + */ |
2867 | + private static final String MARKER_TYPE = AlgorithmDiagramEditorPlugin.ID |
2868 | + + ".diagnostic"; //$NON-NLS-1$ |
2869 | + |
2870 | + /** |
2871 | + * @generated |
2872 | + */ |
2873 | + private static MarkerObserver fileObserver; |
2874 | + |
2875 | + /** |
2876 | + * @generated |
2877 | + */ |
2878 | + private static Map/*<String, List<IDecorator>>*/allDecorators = new HashMap(); |
2879 | + |
2880 | + /** |
2881 | + * @generated |
2882 | + */ |
2883 | + public void createDecorators(IDecoratorTarget decoratorTarget) { |
2884 | + EditPart editPart = (EditPart) decoratorTarget |
2885 | + .getAdapter(EditPart.class); |
2886 | + if (editPart instanceof GraphicalEditPart |
2887 | + || editPart instanceof AbstractConnectionEditPart) { |
2888 | + Object model = editPart.getModel(); |
2889 | + if ((model instanceof View)) { |
2890 | + View view = (View) model; |
2891 | + if (!(view instanceof Edge) && !view.isSetElement()) { |
2892 | + return; |
2893 | + } |
2894 | + } |
2895 | + EditDomain ed = editPart.getViewer().getEditDomain(); |
2896 | + if (!(ed instanceof DiagramEditDomain)) { |
2897 | + return; |
2898 | + } |
2899 | + if (((DiagramEditDomain) ed).getEditorPart() instanceof AlgorithmDiagramEditor) { |
2900 | + decoratorTarget.installDecorator(KEY, new StatusDecorator( |
2901 | + decoratorTarget)); |
2902 | + } |
2903 | + } |
2904 | + } |
2905 | + |
2906 | + /** |
2907 | + * @generated |
2908 | + */ |
2909 | + public boolean provides(IOperation operation) { |
2910 | + if (!(operation instanceof CreateDecoratorsOperation)) { |
2911 | + return false; |
2912 | + } |
2913 | + IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation) |
2914 | + .getDecoratorTarget(); |
2915 | + View view = (View) decoratorTarget.getAdapter(View.class); |
2916 | + return view != null |
2917 | + && AlgorithmEditPart.MODEL_ID.equals(AlgorithmVisualIDRegistry |
2918 | + .getModelID(view)); |
2919 | + } |
2920 | + |
2921 | + /** |
2922 | + * @generated |
2923 | + */ |
2924 | + public static void refreshDecorators(View view) { |
2925 | + refreshDecorators(ViewUtil.getIdStr(view), view.getDiagram()); |
2926 | + } |
2927 | + |
2928 | + /** |
2929 | + * @generated |
2930 | + */ |
2931 | + private static void refreshDecorators(String viewId, Diagram diagram) { |
2932 | + final List decorators = viewId != null ? (List) allDecorators |
2933 | + .get(viewId) : null; |
2934 | + if (decorators == null || decorators.isEmpty() || diagram == null) { |
2935 | + return; |
2936 | + } |
2937 | + final Diagram fdiagram = diagram; |
2938 | + PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { |
2939 | + |
2940 | + public void run() { |
2941 | + try { |
2942 | + TransactionUtil.getEditingDomain(fdiagram).runExclusive( |
2943 | + new Runnable() { |
2944 | + |
2945 | + public void run() { |
2946 | + for (Iterator it = decorators.iterator(); it |
2947 | + .hasNext();) { |
2948 | + IDecorator decorator = (IDecorator) it |
2949 | + .next(); |
2950 | + decorator.refresh(); |
2951 | + } |
2952 | + } |
2953 | + }); |
2954 | + } catch (Exception e) { |
2955 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
2956 | + "Decorator refresh failure", e); //$NON-NLS-1$ |
2957 | + } |
2958 | + } |
2959 | + }); |
2960 | + } |
2961 | + |
2962 | + /** |
2963 | + * @generated |
2964 | + */ |
2965 | + public static class StatusDecorator extends AbstractDecorator { |
2966 | + |
2967 | + /** |
2968 | + * @generated |
2969 | + */ |
2970 | + private String viewId; |
2971 | + |
2972 | + /** |
2973 | + * @generated |
2974 | + */ |
2975 | + public StatusDecorator(IDecoratorTarget decoratorTarget) { |
2976 | + super(decoratorTarget); |
2977 | + try { |
2978 | + final View view = (View) getDecoratorTarget().getAdapter( |
2979 | + View.class); |
2980 | + TransactionUtil.getEditingDomain(view).runExclusive( |
2981 | + new Runnable() { |
2982 | + |
2983 | + public void run() { |
2984 | + StatusDecorator.this.viewId = view != null ? ViewUtil |
2985 | + .getIdStr(view) : null; |
2986 | + } |
2987 | + }); |
2988 | + } catch (Exception e) { |
2989 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
2990 | + "ViewID access failure", e); //$NON-NLS-1$ |
2991 | + } |
2992 | + } |
2993 | + |
2994 | + /** |
2995 | + * @generated |
2996 | + */ |
2997 | + public void refresh() { |
2998 | + removeDecoration(); |
2999 | + View view = (View) getDecoratorTarget().getAdapter(View.class); |
3000 | + if (view == null || view.eResource() == null) { |
3001 | + return; |
3002 | + } |
3003 | + EditPart editPart = (EditPart) getDecoratorTarget().getAdapter( |
3004 | + EditPart.class); |
3005 | + if (editPart == null || editPart.getViewer() == null) { |
3006 | + return; |
3007 | + } |
3008 | + |
3009 | + // query for all the validation markers of the current resource |
3010 | + String elementId = ViewUtil.getIdStr(view); |
3011 | + if (elementId == null) { |
3012 | + return; |
3013 | + } |
3014 | + int severity = IMarker.SEVERITY_INFO; |
3015 | + IMarker foundMarker = null; |
3016 | + IResource resource = WorkspaceSynchronizer |
3017 | + .getFile(view.eResource()); |
3018 | + if (resource == null || !resource.exists()) { |
3019 | + return; |
3020 | + } |
3021 | + IMarker[] markers = null; |
3022 | + try { |
3023 | + markers = resource.findMarkers(MARKER_TYPE, true, |
3024 | + IResource.DEPTH_INFINITE); |
3025 | + } catch (CoreException e) { |
3026 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
3027 | + "Validation markers refresh failure", e); //$NON-NLS-1$ |
3028 | + } |
3029 | + if (markers == null || markers.length == 0) { |
3030 | + return; |
3031 | + } |
3032 | + Label toolTip = null; |
3033 | + for (int i = 0; i < markers.length; i++) { |
3034 | + IMarker marker = markers[i]; |
3035 | + String attribute = marker |
3036 | + .getAttribute( |
3037 | + org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, |
3038 | + ""); //$NON-NLS-1$ |
3039 | + if (attribute.equals(elementId)) { |
3040 | + int nextSeverity = marker.getAttribute(IMarker.SEVERITY, |
3041 | + IMarker.SEVERITY_INFO); |
3042 | + Image nextImage = getImage(nextSeverity); |
3043 | + if (foundMarker == null) { |
3044 | + foundMarker = marker; |
3045 | + toolTip = new Label(marker.getAttribute( |
3046 | + IMarker.MESSAGE, ""), //$NON-NLS-1$ |
3047 | + nextImage); |
3048 | + } else { |
3049 | + if (toolTip.getChildren().isEmpty()) { |
3050 | + Label comositeLabel = new Label(); |
3051 | + FlowLayout fl = new FlowLayout(false); |
3052 | + fl.setMinorSpacing(0); |
3053 | + comositeLabel.setLayoutManager(fl); |
3054 | + comositeLabel.add(toolTip); |
3055 | + toolTip = comositeLabel; |
3056 | + } |
3057 | + toolTip.add(new Label(marker.getAttribute( |
3058 | + IMarker.MESSAGE, ""), //$NON-NLS-1$ |
3059 | + nextImage)); |
3060 | + } |
3061 | + severity = (nextSeverity > severity) ? nextSeverity |
3062 | + : severity; |
3063 | + } |
3064 | + } |
3065 | + if (foundMarker == null) { |
3066 | + return; |
3067 | + } |
3068 | + |
3069 | + // add decoration |
3070 | + if (editPart instanceof org.eclipse.gef.GraphicalEditPart) { |
3071 | + if (view instanceof Edge) { |
3072 | + setDecoration(getDecoratorTarget().addConnectionDecoration( |
3073 | + getImage(severity), 50, true)); |
3074 | + } else { |
3075 | + int margin = -1; |
3076 | + if (editPart instanceof org.eclipse.gef.GraphicalEditPart) { |
3077 | + margin = MapModeUtil.getMapMode( |
3078 | + ((org.eclipse.gef.GraphicalEditPart) editPart) |
3079 | + .getFigure()).DPtoLP(margin); |
3080 | + } |
3081 | + setDecoration(getDecoratorTarget() |
3082 | + .addShapeDecoration(getImage(severity), |
3083 | + IDecoratorTarget.Direction.NORTH_EAST, |
3084 | + margin, true)); |
3085 | + } |
3086 | + getDecoration().setToolTip(toolTip); |
3087 | + } |
3088 | + } |
3089 | + |
3090 | + /** |
3091 | + * @generated |
3092 | + */ |
3093 | + private Image getImage(int severity) { |
3094 | + String imageName = ISharedImages.IMG_OBJS_ERROR_TSK; |
3095 | + switch (severity) { |
3096 | + case IMarker.SEVERITY_ERROR: |
3097 | + imageName = ISharedImages.IMG_OBJS_ERROR_TSK; |
3098 | + break; |
3099 | + case IMarker.SEVERITY_WARNING: |
3100 | + imageName = ISharedImages.IMG_OBJS_WARN_TSK; |
3101 | + break; |
3102 | + default: |
3103 | + imageName = ISharedImages.IMG_OBJS_INFO_TSK; |
3104 | + } |
3105 | + return PlatformUI.getWorkbench().getSharedImages() |
3106 | + .getImage(imageName); |
3107 | + } |
3108 | + |
3109 | + /** |
3110 | + * @generated |
3111 | + */ |
3112 | + public void activate() { |
3113 | + if (viewId == null) { |
3114 | + return; |
3115 | + } |
3116 | + |
3117 | + // add self to global decorators registry |
3118 | + List list = (List) allDecorators.get(viewId); |
3119 | + if (list == null) { |
3120 | + list = new ArrayList(2); |
3121 | + list.add(this); |
3122 | + allDecorators.put(viewId, list); |
3123 | + } else if (!list.contains(this)) { |
3124 | + list.add(this); |
3125 | + } |
3126 | + |
3127 | + // start listening to changes in resources |
3128 | + View view = (View) getDecoratorTarget().getAdapter(View.class); |
3129 | + if (view == null) { |
3130 | + return; |
3131 | + } |
3132 | + Diagram diagramView = view.getDiagram(); |
3133 | + if (diagramView == null) { |
3134 | + return; |
3135 | + } |
3136 | + if (fileObserver == null) { |
3137 | + FileChangeManager.getInstance().addFileObserver( |
3138 | + fileObserver = new MarkerObserver(diagramView)); |
3139 | + } |
3140 | + } |
3141 | + |
3142 | + /** |
3143 | + * @generated |
3144 | + */ |
3145 | + public void deactivate() { |
3146 | + if (viewId == null) { |
3147 | + return; |
3148 | + } |
3149 | + |
3150 | + // remove self from global decorators registry |
3151 | + List list = (List) allDecorators.get(viewId); |
3152 | + if (list != null) { |
3153 | + list.remove(this); |
3154 | + if (list.isEmpty()) { |
3155 | + allDecorators.remove(viewId); |
3156 | + } |
3157 | + } |
3158 | + |
3159 | + // stop listening to changes in resources if there are no more decorators |
3160 | + if (fileObserver != null && allDecorators.isEmpty()) { |
3161 | + FileChangeManager.getInstance() |
3162 | + .removeFileObserver(fileObserver); |
3163 | + fileObserver = null; |
3164 | + } |
3165 | + super.deactivate(); |
3166 | + } |
3167 | + } |
3168 | + |
3169 | + /** |
3170 | + * @generated |
3171 | + */ |
3172 | + static class MarkerObserver implements IFileObserver { |
3173 | + |
3174 | + /** |
3175 | + * @generated |
3176 | + */ |
3177 | + private Diagram diagram; |
3178 | + |
3179 | + /** |
3180 | + * @generated |
3181 | + */ |
3182 | + private MarkerObserver(Diagram diagram) { |
3183 | + this.diagram = diagram; |
3184 | + } |
3185 | + |
3186 | + /** |
3187 | + * @generated |
3188 | + */ |
3189 | + public void handleFileRenamed(IFile oldFile, IFile file) { |
3190 | + } |
3191 | + |
3192 | + /** |
3193 | + * @generated |
3194 | + */ |
3195 | + public void handleFileMoved(IFile oldFile, IFile file) { |
3196 | + } |
3197 | + |
3198 | + /** |
3199 | + * @generated |
3200 | + */ |
3201 | + public void handleFileDeleted(IFile file) { |
3202 | + } |
3203 | + |
3204 | + /** |
3205 | + * @generated |
3206 | + */ |
3207 | + public void handleFileChanged(IFile file) { |
3208 | + } |
3209 | + |
3210 | + /** |
3211 | + * @generated |
3212 | + */ |
3213 | + public void handleMarkerAdded(IMarker marker) { |
3214 | + if (marker |
3215 | + .getAttribute( |
3216 | + org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, |
3217 | + null) != null) { |
3218 | + handleMarkerChanged(marker); |
3219 | + } |
3220 | + } |
3221 | + |
3222 | + /** |
3223 | + * @generated |
3224 | + */ |
3225 | + public void handleMarkerDeleted(IMarker marker, Map attributes) { |
3226 | + String viewId = (String) attributes |
3227 | + .get(org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID); |
3228 | + refreshDecorators(viewId, diagram); |
3229 | + } |
3230 | + |
3231 | + /** |
3232 | + * @generated |
3233 | + */ |
3234 | + public void handleMarkerChanged(IMarker marker) { |
3235 | + if (!MARKER_TYPE.equals(getType(marker))) { |
3236 | + return; |
3237 | + } |
3238 | + String viewId = marker |
3239 | + .getAttribute( |
3240 | + org.eclipse.gmf.runtime.common.ui.resources.IMarker.ELEMENT_ID, |
3241 | + ""); //$NON-NLS-1$ |
3242 | + refreshDecorators(viewId, diagram); |
3243 | + } |
3244 | + |
3245 | + /** |
3246 | + * @generated |
3247 | + */ |
3248 | + private String getType(IMarker marker) { |
3249 | + try { |
3250 | + return marker.getType(); |
3251 | + } catch (CoreException e) { |
3252 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
3253 | + "Validation marker refresh failure", e); //$NON-NLS-1$ |
3254 | + return ""; //$NON-NLS-1$ |
3255 | + } |
3256 | + } |
3257 | + } |
3258 | +} |
3259 | |
3260 | === added file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationProvider.java' |
3261 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationProvider.java 1970-01-01 00:00:00 +0000 |
3262 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmValidationProvider.java 2011-03-16 20:54:30 +0000 |
3263 | @@ -0,0 +1,127 @@ |
3264 | +package net.launchpad.vide.algorithm.diagram.providers; |
3265 | + |
3266 | +import net.launchpad.vide.algorithm.AlgorithmPackage; |
3267 | +import net.launchpad.vide.algorithm.diagram.edit.parts.AlgorithmEditPart; |
3268 | +import net.launchpad.vide.algorithm.diagram.expressions.AlgorithmOCLFactory; |
3269 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmDiagramEditorPlugin; |
3270 | +import net.launchpad.vide.algorithm.diagram.part.AlgorithmVisualIDRegistry; |
3271 | + |
3272 | +import org.eclipse.core.runtime.IStatus; |
3273 | +import org.eclipse.core.runtime.Status; |
3274 | +import org.eclipse.emf.ecore.EObject; |
3275 | +import org.eclipse.emf.ecore.EcorePackage; |
3276 | +import org.eclipse.emf.transaction.TransactionalEditingDomain; |
3277 | +import org.eclipse.emf.validation.AbstractModelConstraint; |
3278 | +import org.eclipse.emf.validation.IValidationContext; |
3279 | +import org.eclipse.emf.validation.model.IClientSelector; |
3280 | +import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil; |
3281 | +import org.eclipse.gmf.runtime.notation.View; |
3282 | + |
3283 | +/** |
3284 | + * @generated |
3285 | + */ |
3286 | +public class AlgorithmValidationProvider { |
3287 | + |
3288 | + /** |
3289 | + * @generated |
3290 | + */ |
3291 | + private static boolean constraintsActive = false; |
3292 | + |
3293 | + /** |
3294 | + * @generated |
3295 | + */ |
3296 | + public static boolean shouldConstraintsBePrivate() { |
3297 | + return false; |
3298 | + } |
3299 | + |
3300 | + /** |
3301 | + * @generated |
3302 | + */ |
3303 | + public static void runWithConstraints( |
3304 | + TransactionalEditingDomain editingDomain, Runnable operation) { |
3305 | + final Runnable op = operation; |
3306 | + Runnable task = new Runnable() { |
3307 | + public void run() { |
3308 | + try { |
3309 | + constraintsActive = true; |
3310 | + op.run(); |
3311 | + } finally { |
3312 | + constraintsActive = false; |
3313 | + } |
3314 | + } |
3315 | + }; |
3316 | + if (editingDomain != null) { |
3317 | + try { |
3318 | + editingDomain.runExclusive(task); |
3319 | + } catch (Exception e) { |
3320 | + AlgorithmDiagramEditorPlugin.getInstance().logError( |
3321 | + "Validation failed", e); //$NON-NLS-1$ |
3322 | + } |
3323 | + } else { |
3324 | + task.run(); |
3325 | + } |
3326 | + } |
3327 | + |
3328 | + /** |
3329 | + * @generated |
3330 | + */ |
3331 | + static boolean isInDefaultEditorContext(Object object) { |
3332 | + if (shouldConstraintsBePrivate() && !constraintsActive) { |
3333 | + return false; |
3334 | + } |
3335 | + if (object instanceof View) { |
3336 | + return constraintsActive |
3337 | + && AlgorithmEditPart.MODEL_ID |
3338 | + .equals(AlgorithmVisualIDRegistry |
3339 | + .getModelID((View) object)); |
3340 | + } |
3341 | + return true; |
3342 | + } |
3343 | + |
3344 | + /** |
3345 | + * @generated |
3346 | + */ |
3347 | + public static class DefaultCtx implements IClientSelector { |
3348 | + |
3349 | + /** |
3350 | + * @generated |
3351 | + */ |
3352 | + public boolean selects(Object object) { |
3353 | + return isInDefaultEditorContext(object); |
3354 | + } |
3355 | + } |
3356 | + |
3357 | + /** |
3358 | + * @generated |
3359 | + */ |
3360 | + public static class Adapter1 extends AbstractModelConstraint { |
3361 | + |
3362 | + /** |
3363 | + * @generated |
3364 | + */ |
3365 | + public IStatus validate(IValidationContext ctx) { |
3366 | + final Object context = ctx.getTarget().eGet( |
3367 | + AlgorithmPackage.eINSTANCE.getBlock_Commands()); |
3368 | + if (context == null) { |
3369 | + return ctx.createFailureStatus(new Object[] { formatElement(ctx |
3370 | + .getTarget()) }); |
3371 | + } |
3372 | + Object result = AlgorithmOCLFactory.getExpression(3, |
3373 | + EcorePackage.eINSTANCE.getEString(), null) |
3374 | + .evaluate(context); |
3375 | + if (result instanceof Boolean && ((Boolean) result).booleanValue()) { |
3376 | + return Status.OK_STATUS; |
3377 | + } |
3378 | + return ctx.createFailureStatus(new Object[] { formatElement(ctx |
3379 | + .getTarget()) }); |
3380 | + } |
3381 | + } |
3382 | + |
3383 | + /** |
3384 | + * @generated |
3385 | + */ |
3386 | + static String formatElement(EObject object) { |
3387 | + return EMFCoreUtil.getQualifiedName(object, true); |
3388 | + } |
3389 | + |
3390 | +} |
3391 | |
3392 | === modified file 'net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmViewProvider.java' |
3393 | --- net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmViewProvider.java 2011-02-18 16:41:37 +0000 |
3394 | +++ net.launchpad.vide.diagram/src/net/launchpad/vide/algorithm/diagram/providers/AlgorithmViewProvider.java 2011-03-16 20:54:30 +0000 |
3395 | @@ -46,7 +46,6 @@ |
3396 | import org.eclipse.gmf.runtime.notation.NotationPackage; |
3397 | import org.eclipse.gmf.runtime.notation.RelativeBendpoints; |
3398 | import org.eclipse.gmf.runtime.notation.Routing; |
3399 | -import org.eclipse.gmf.runtime.notation.Shape; |
3400 | import org.eclipse.gmf.runtime.notation.View; |
3401 | import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint; |
3402 | import org.eclipse.jface.preference.IPreferenceStore; |
3403 | @@ -338,65 +337,6 @@ |
3404 | /** |
3405 | * @generated |
3406 | */ |
3407 | - public Edge createBranchFalse_4003(View containerView, int index, |
3408 | - boolean persisted, PreferencesHint preferencesHint) { |
3409 | - Connector edge = NotationFactory.eINSTANCE.createConnector(); |
3410 | - edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); |
3411 | - RelativeBendpoints bendpoints = NotationFactory.eINSTANCE |
3412 | - .createRelativeBendpoints(); |
3413 | - ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>( |
3414 | - 2); |
3415 | - points.add(new RelativeBendpoint()); |
3416 | - points.add(new RelativeBendpoint()); |
3417 | - bendpoints.setPoints(points); |
3418 | - edge.setBendpoints(bendpoints); |
3419 | - ViewUtil.insertChildView(containerView, edge, index, persisted); |
3420 | - edge.setType(AlgorithmVisualIDRegistry |
3421 | - .getType(BranchFalseEditPart.VISUAL_ID)); |
3422 | - edge.setElement(null); |
3423 | - // initializePreferences |
3424 | - final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint |
3425 | - .getPreferenceStore(); |
3426 | - |
3427 | - org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( |
3428 | - prefStore, IPreferenceConstants.PREF_LINE_COLOR); |
3429 | - ViewUtil.setStructuralFeatureValue(edge, |
3430 | - NotationPackage.eINSTANCE.getLineStyle_LineColor(), |
3431 | - FigureUtilities.RGBToInteger(lineRGB)); |
3432 | - FontStyle edgeFontStyle = (FontStyle) edge |
3433 | - .getStyle(NotationPackage.Literals.FONT_STYLE); |
3434 | - if (edgeFontStyle != null) { |
3435 | - FontData fontData = PreferenceConverter.getFontData(prefStore, |
3436 | - IPreferenceConstants.PREF_DEFAULT_FONT); |
3437 | - edgeFontStyle.setFontName(fontData.getName()); |
3438 | - edgeFontStyle.setFontHeight(fontData.getHeight()); |
3439 | - edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); |
3440 | - edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); |
3441 | - org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter |
3442 | - .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); |
3443 | - edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) |
3444 | - .intValue()); |
3445 | - } |
3446 | - Routing routing = Routing.get(prefStore |
3447 | - .getInt(IPreferenceConstants.PREF_LINE_STYLE)); |
3448 | - if (routing != null) { |
3449 | - ViewUtil.setStructuralFeatureValue(edge, |
3450 | - NotationPackage.eINSTANCE.getRoutingStyle_Routing(), |
3451 | - routing); |
3452 | - } |
3453 | - Node label6002 = createLabel(edge, |
3454 | - AlgorithmVisualIDRegistry.getType(FalseLabelEditPart.VISUAL_ID)); |
3455 | - label6002.setLayoutConstraint(NotationFactory.eINSTANCE |
3456 | - .createLocation()); |
3457 | - Location location6002 = (Location) label6002.getLayoutConstraint(); |
3458 | - location6002.setX(10); |
3459 | - location6002.setY(0); |
3460 | - return edge; |
3461 | - } |
3462 | - |
3463 | - /** |
3464 | - * @generated |
3465 | - */ |
3466 | public Edge createBlockNext_4004(View containerView, int index, |
3467 | boolean persisted, PreferencesHint preferencesHint) { |
3468 | Connector edge = NotationFactory.eINSTANCE.createConnector(); |
3469 | @@ -508,6 +448,65 @@ |
3470 | /** |
3471 | * @generated |
3472 | */ |
3473 | + public Edge createBranchFalse_4003(View containerView, int index, |
3474 | + boolean persisted, PreferencesHint preferencesHint) { |
3475 | + Connector edge = NotationFactory.eINSTANCE.createConnector(); |
3476 | + edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle()); |
3477 | + RelativeBendpoints bendpoints = NotationFactory.eINSTANCE |
3478 | + .createRelativeBendpoints(); |
3479 | + ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>( |
3480 | + 2); |
3481 | + points.add(new RelativeBendpoint()); |
3482 | + points.add(new RelativeBendpoint()); |
3483 | + bendpoints.setPoints(points); |
3484 | + edge.setBendpoints(bendpoints); |
3485 | + ViewUtil.insertChildView(containerView, edge, index, persisted); |
3486 | + edge.setType(AlgorithmVisualIDRegistry |
3487 | + .getType(BranchFalseEditPart.VISUAL_ID)); |
3488 | + edge.setElement(null); |
3489 | + // initializePreferences |
3490 | + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint |
3491 | + .getPreferenceStore(); |
3492 | + |
3493 | + org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor( |
3494 | + prefStore, IPreferenceConstants.PREF_LINE_COLOR); |
3495 | + ViewUtil.setStructuralFeatureValue(edge, |
3496 | + NotationPackage.eINSTANCE.getLineStyle_LineColor(), |
3497 | + FigureUtilities.RGBToInteger(lineRGB)); |
3498 | + FontStyle edgeFontStyle = (FontStyle) edge |
3499 | + .getStyle(NotationPackage.Literals.FONT_STYLE); |
3500 | + if (edgeFontStyle != null) { |
3501 | + FontData fontData = PreferenceConverter.getFontData(prefStore, |
3502 | + IPreferenceConstants.PREF_DEFAULT_FONT); |
3503 | + edgeFontStyle.setFontName(fontData.getName()); |
3504 | + edgeFontStyle.setFontHeight(fontData.getHeight()); |
3505 | + edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0); |
3506 | + edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0); |
3507 | + org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter |
3508 | + .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR); |
3509 | + edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB) |
3510 | + .intValue()); |
3511 | + } |
3512 | + Routing routing = Routing.get(prefStore |
3513 | + .getInt(IPreferenceConstants.PREF_LINE_STYLE)); |
3514 | + if (routing != null) { |
3515 | + ViewUtil.setStructuralFeatureValue(edge, |
3516 | + NotationPackage.eINSTANCE.getRoutingStyle_Routing(), |
3517 | + routing); |
3518 | + } |
3519 | + Node label6002 = createLabel(edge, |
3520 | + AlgorithmVisualIDRegistry.getType(FalseLabelEditPart.VISUAL_ID)); |
3521 | + label6002.setLayoutConstraint(NotationFactory.eINSTANCE |
3522 | + .createLocation()); |
3523 | + Location location6002 = (Location) label6002.getLayoutConstraint(); |
3524 | + location6002.setX(10); |
3525 | + location6002.setY(0); |
3526 | + return edge; |
3527 | + } |
3528 | + |
3529 | + /** |
3530 | + * @generated |
3531 | + */ |
3532 | private void stampShortcut(View containerView, Node target) { |
3533 | if (!AlgorithmEditPart.MODEL_ID.equals(AlgorithmVisualIDRegistry |
3534 | .getModelID(containerView))) { |
3535 | |
3536 | === added file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_If.gif' |
3537 | Binary files net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_If.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_If.gif 2011-03-16 20:54:30 +0000 differ |
3538 | === renamed file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_If.gif' => 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_If.gif.moved' |
3539 | === added file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_SingleInstruction.gif' |
3540 | Binary files net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_SingleInstruction.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_SingleInstruction.gif 2011-03-16 20:54:30 +0000 differ |
3541 | === renamed file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_SingleInstruction.gif' => 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_SingleInstruction.gif.moved' |
3542 | === added file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_While.gif' |
3543 | Binary files net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_While.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_While.gif 2011-03-16 20:54:30 +0000 differ |
3544 | === renamed file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_While.gif' => 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_While.gif.moved' |
3545 | === added file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_WhileLanguageInstruction.gif' |
3546 | Binary files net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_WhileLanguageInstruction.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_WhileLanguageInstruction.gif 2011-03-16 20:54:30 +0000 differ |
3547 | === renamed file 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_WhileLanguageInstruction.gif' => 'net.launchpad.vide.edit/icons/full/ctool16/CreateWhileLanguageAlgorithm_instructions_WhileLanguageInstruction.gif.moved' |
3548 | === added file 'net.launchpad.vide.edit/icons/full/obj16/BooleanExpression.gif' |
3549 | Binary files net.launchpad.vide.edit/icons/full/obj16/BooleanExpression.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/obj16/BooleanExpression.gif 2011-03-16 20:54:30 +0000 differ |
3550 | === renamed file 'net.launchpad.vide.edit/icons/full/obj16/BooleanExpression.gif' => 'net.launchpad.vide.edit/icons/full/obj16/BooleanExpression.gif.moved' |
3551 | === added file 'net.launchpad.vide.edit/icons/full/obj16/If.gif' |
3552 | Binary files net.launchpad.vide.edit/icons/full/obj16/If.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/obj16/If.gif 2011-03-16 20:54:30 +0000 differ |
3553 | === renamed file 'net.launchpad.vide.edit/icons/full/obj16/If.gif' => 'net.launchpad.vide.edit/icons/full/obj16/If.gif.moved' |
3554 | === added file 'net.launchpad.vide.edit/icons/full/obj16/SingleInstruction.gif' |
3555 | Binary files net.launchpad.vide.edit/icons/full/obj16/SingleInstruction.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/obj16/SingleInstruction.gif 2011-03-16 20:54:30 +0000 differ |
3556 | === renamed file 'net.launchpad.vide.edit/icons/full/obj16/SingleInstruction.gif' => 'net.launchpad.vide.edit/icons/full/obj16/SingleInstruction.gif.moved' |
3557 | === added file 'net.launchpad.vide.edit/icons/full/obj16/While.gif' |
3558 | Binary files net.launchpad.vide.edit/icons/full/obj16/While.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/obj16/While.gif 2011-03-16 20:54:30 +0000 differ |
3559 | === renamed file 'net.launchpad.vide.edit/icons/full/obj16/While.gif' => 'net.launchpad.vide.edit/icons/full/obj16/While.gif.moved' |
3560 | === added file 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageAlgorithm.gif' |
3561 | Binary files net.launchpad.vide.edit/icons/full/obj16/WhileLanguageAlgorithm.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/obj16/WhileLanguageAlgorithm.gif 2011-03-16 20:54:30 +0000 differ |
3562 | === renamed file 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageAlgorithm.gif' => 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageAlgorithm.gif.moved' |
3563 | === added file 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageBlock.gif' |
3564 | Binary files net.launchpad.vide.edit/icons/full/obj16/WhileLanguageBlock.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/obj16/WhileLanguageBlock.gif 2011-03-16 20:54:30 +0000 differ |
3565 | === renamed file 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageBlock.gif' => 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageBlock.gif.moved' |
3566 | === added file 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageInstruction.gif' |
3567 | Binary files net.launchpad.vide.edit/icons/full/obj16/WhileLanguageInstruction.gif 1970-01-01 00:00:00 +0000 and net.launchpad.vide.edit/icons/full/obj16/WhileLanguageInstruction.gif 2011-03-16 20:54:30 +0000 differ |
3568 | === renamed file 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageInstruction.gif' => 'net.launchpad.vide.edit/icons/full/obj16/WhileLanguageInstruction.gif.moved' |
3569 | === modified file 'net.launchpad.vide.edit/plugin.properties' |
3570 | --- net.launchpad.vide.edit/plugin.properties 2011-03-16 17:21:51 +0000 |
3571 | +++ net.launchpad.vide.edit/plugin.properties 2011-03-16 20:54:30 +0000 |
3572 | @@ -20,6 +20,13 @@ |
3573 | _UI_Instruction_type = Instruction |
3574 | _UI_Block_type = Block |
3575 | _UI_Branch_type = Branch |
3576 | +_UI_WhileLanguageAlgorithm_type = While Language Algorithm |
3577 | +_UI_WhileLanguageInstruction_type = While Language Instruction |
3578 | +_UI_While_type = While |
3579 | +_UI_If_type = If |
3580 | +_UI_WhileLanguageBlock_type = While Language Block |
3581 | +_UI_BooleanExpression_type = Boolean Expression |
3582 | +_UI_SingleInstruction_type = Single Instruction |
3583 | _UI_Unknown_type = Object |
3584 | |
3585 | _UI_Unknown_datatype= Value |
3586 | @@ -30,8 +37,18 @@ |
3587 | _UI_Branch_condtion_feature = Condtion |
3588 | _UI_Branch_false_feature = False |
3589 | _UI_Branch_true_feature = True |
3590 | +_UI_WhileLanguageAlgorithm_instructions_feature = Instructions |
3591 | +_UI_WhileLanguageInstruction_next_feature = Next |
3592 | +_UI_While_body_feature = Body |
3593 | +_UI_While_false_feature = False |
3594 | +_UI_While_condition_feature = Condition |
3595 | +_UI_If_true_feature = True |
3596 | +_UI_If_false_feature = False |
3597 | +_UI_If_condition_feature = Condition |
3598 | +_UI_WhileLanguageBlock_instructions_feature = Instructions |
3599 | _UI_Unknown_feature = Unspecified |
3600 | |
3601 | +<<<<<<< TREE |
3602 | _UI_Instruction_next_feature = Next |
3603 | _UI_WhileLanguageAlgorithm_type = While Language Algorithm |
3604 | _UI_WhileLanguageInstruction_type = While Language Instruction |
3605 | @@ -48,3 +65,5 @@ |
3606 | _UI_If_false_feature = False |
3607 | _UI_If_condition_feature = Condition |
3608 | _UI_WhileLanguageBlock_instructions_feature = Instructions |
3609 | +======= |
3610 | +>>>>>>> MERGE-SOURCE |
3611 | |
3612 | === added file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java' |
3613 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java 1970-01-01 00:00:00 +0000 |
3614 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java 2011-03-16 20:54:30 +0000 |
3615 | @@ -0,0 +1,123 @@ |
3616 | +/** |
3617 | + * <copyright> |
3618 | + * </copyright> |
3619 | + * |
3620 | + * $Id$ |
3621 | + */ |
3622 | +package net.launchpad.vide.algorithm.provider; |
3623 | + |
3624 | + |
3625 | +import java.util.Collection; |
3626 | +import java.util.List; |
3627 | + |
3628 | +import org.eclipse.emf.common.notify.AdapterFactory; |
3629 | +import org.eclipse.emf.common.notify.Notification; |
3630 | + |
3631 | +import org.eclipse.emf.common.util.ResourceLocator; |
3632 | + |
3633 | +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
3634 | +import org.eclipse.emf.edit.provider.IItemLabelProvider; |
3635 | +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
3636 | +import org.eclipse.emf.edit.provider.IItemPropertySource; |
3637 | +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
3638 | +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
3639 | +import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
3640 | + |
3641 | +/** |
3642 | + * This is the item provider adapter for a {@link net.launchpad.vide.algorithm.BooleanExpression} object. |
3643 | + * <!-- begin-user-doc --> |
3644 | + * <!-- end-user-doc --> |
3645 | + * @generated |
3646 | + */ |
3647 | +public class BooleanExpressionItemProvider |
3648 | + extends ItemProviderAdapter |
3649 | + implements |
3650 | + IEditingDomainItemProvider, |
3651 | + IStructuredItemContentProvider, |
3652 | + ITreeItemContentProvider, |
3653 | + IItemLabelProvider, |
3654 | + IItemPropertySource { |
3655 | + /** |
3656 | + * This constructs an instance from a factory and a notifier. |
3657 | + * <!-- begin-user-doc --> |
3658 | + * <!-- end-user-doc --> |
3659 | + * @generated |
3660 | + */ |
3661 | + public BooleanExpressionItemProvider(AdapterFactory adapterFactory) { |
3662 | + super(adapterFactory); |
3663 | + } |
3664 | + |
3665 | + /** |
3666 | + * This returns the property descriptors for the adapted class. |
3667 | + * <!-- begin-user-doc --> |
3668 | + * <!-- end-user-doc --> |
3669 | + * @generated |
3670 | + */ |
3671 | + @Override |
3672 | + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
3673 | + if (itemPropertyDescriptors == null) { |
3674 | + super.getPropertyDescriptors(object); |
3675 | + |
3676 | + } |
3677 | + return itemPropertyDescriptors; |
3678 | + } |
3679 | + |
3680 | + /** |
3681 | + * This returns BooleanExpression.gif. |
3682 | + * <!-- begin-user-doc --> |
3683 | + * <!-- end-user-doc --> |
3684 | + * @generated |
3685 | + */ |
3686 | + @Override |
3687 | + public Object getImage(Object object) { |
3688 | + return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanExpression")); |
3689 | + } |
3690 | + |
3691 | + /** |
3692 | + * This returns the label text for the adapted class. |
3693 | + * <!-- begin-user-doc --> |
3694 | + * <!-- end-user-doc --> |
3695 | + * @generated |
3696 | + */ |
3697 | + @Override |
3698 | + public String getText(Object object) { |
3699 | + return getString("_UI_BooleanExpression_type"); |
3700 | + } |
3701 | + |
3702 | + /** |
3703 | + * This handles model notifications by calling {@link #updateChildren} to update any cached |
3704 | + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
3705 | + * <!-- begin-user-doc --> |
3706 | + * <!-- end-user-doc --> |
3707 | + * @generated |
3708 | + */ |
3709 | + @Override |
3710 | + public void notifyChanged(Notification notification) { |
3711 | + updateChildren(notification); |
3712 | + super.notifyChanged(notification); |
3713 | + } |
3714 | + |
3715 | + /** |
3716 | + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
3717 | + * that can be created under this object. |
3718 | + * <!-- begin-user-doc --> |
3719 | + * <!-- end-user-doc --> |
3720 | + * @generated |
3721 | + */ |
3722 | + @Override |
3723 | + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
3724 | + super.collectNewChildDescriptors(newChildDescriptors, object); |
3725 | + } |
3726 | + |
3727 | + /** |
3728 | + * Return the resource locator for this item provider's resources. |
3729 | + * <!-- begin-user-doc --> |
3730 | + * <!-- end-user-doc --> |
3731 | + * @generated |
3732 | + */ |
3733 | + @Override |
3734 | + public ResourceLocator getResourceLocator() { |
3735 | + return AlgorithmEditPlugin.INSTANCE; |
3736 | + } |
3737 | + |
3738 | +} |
3739 | |
3740 | === renamed file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java' => 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/BooleanExpressionItemProvider.java.moved' |
3741 | === added file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java' |
3742 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java 1970-01-01 00:00:00 +0000 |
3743 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java 2011-03-16 20:54:30 +0000 |
3744 | @@ -0,0 +1,181 @@ |
3745 | +/** |
3746 | + * <copyright> |
3747 | + * </copyright> |
3748 | + * |
3749 | + * $Id$ |
3750 | + */ |
3751 | +package net.launchpad.vide.algorithm.provider; |
3752 | + |
3753 | + |
3754 | +import java.util.Collection; |
3755 | +import java.util.List; |
3756 | + |
3757 | +import net.launchpad.vide.algorithm.AlgorithmPackage; |
3758 | + |
3759 | +import org.eclipse.emf.common.notify.AdapterFactory; |
3760 | +import org.eclipse.emf.common.notify.Notification; |
3761 | + |
3762 | +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
3763 | +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
3764 | +import org.eclipse.emf.edit.provider.IItemLabelProvider; |
3765 | +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
3766 | +import org.eclipse.emf.edit.provider.IItemPropertySource; |
3767 | +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
3768 | +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
3769 | + |
3770 | +/** |
3771 | + * This is the item provider adapter for a {@link net.launchpad.vide.algorithm.If} object. |
3772 | + * <!-- begin-user-doc --> |
3773 | + * <!-- end-user-doc --> |
3774 | + * @generated |
3775 | + */ |
3776 | +public class IfItemProvider |
3777 | + extends WhileLanguageInstructionItemProvider |
3778 | + implements |
3779 | + IEditingDomainItemProvider, |
3780 | + IStructuredItemContentProvider, |
3781 | + ITreeItemContentProvider, |
3782 | + IItemLabelProvider, |
3783 | + IItemPropertySource { |
3784 | + /** |
3785 | + * This constructs an instance from a factory and a notifier. |
3786 | + * <!-- begin-user-doc --> |
3787 | + * <!-- end-user-doc --> |
3788 | + * @generated |
3789 | + */ |
3790 | + public IfItemProvider(AdapterFactory adapterFactory) { |
3791 | + super(adapterFactory); |
3792 | + } |
3793 | + |
3794 | + /** |
3795 | + * This returns the property descriptors for the adapted class. |
3796 | + * <!-- begin-user-doc --> |
3797 | + * <!-- end-user-doc --> |
3798 | + * @generated |
3799 | + */ |
3800 | + @Override |
3801 | + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
3802 | + if (itemPropertyDescriptors == null) { |
3803 | + super.getPropertyDescriptors(object); |
3804 | + |
3805 | + addTruePropertyDescriptor(object); |
3806 | + addFalsePropertyDescriptor(object); |
3807 | + addConditionPropertyDescriptor(object); |
3808 | + } |
3809 | + return itemPropertyDescriptors; |
3810 | + } |
3811 | + |
3812 | + /** |
3813 | + * This adds a property descriptor for the True feature. |
3814 | + * <!-- begin-user-doc --> |
3815 | + * <!-- end-user-doc --> |
3816 | + * @generated |
3817 | + */ |
3818 | + protected void addTruePropertyDescriptor(Object object) { |
3819 | + itemPropertyDescriptors.add |
3820 | + (createItemPropertyDescriptor |
3821 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
3822 | + getResourceLocator(), |
3823 | + getString("_UI_If_true_feature"), |
3824 | + getString("_UI_PropertyDescriptor_description", "_UI_If_true_feature", "_UI_If_type"), |
3825 | + AlgorithmPackage.Literals.IF__TRUE, |
3826 | + true, |
3827 | + false, |
3828 | + true, |
3829 | + null, |
3830 | + null, |
3831 | + null)); |
3832 | + } |
3833 | + |
3834 | + /** |
3835 | + * This adds a property descriptor for the False feature. |
3836 | + * <!-- begin-user-doc --> |
3837 | + * <!-- end-user-doc --> |
3838 | + * @generated |
3839 | + */ |
3840 | + protected void addFalsePropertyDescriptor(Object object) { |
3841 | + itemPropertyDescriptors.add |
3842 | + (createItemPropertyDescriptor |
3843 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
3844 | + getResourceLocator(), |
3845 | + getString("_UI_If_false_feature"), |
3846 | + getString("_UI_PropertyDescriptor_description", "_UI_If_false_feature", "_UI_If_type"), |
3847 | + AlgorithmPackage.Literals.IF__FALSE, |
3848 | + true, |
3849 | + false, |
3850 | + true, |
3851 | + null, |
3852 | + null, |
3853 | + null)); |
3854 | + } |
3855 | + |
3856 | + /** |
3857 | + * This adds a property descriptor for the Condition feature. |
3858 | + * <!-- begin-user-doc --> |
3859 | + * <!-- end-user-doc --> |
3860 | + * @generated |
3861 | + */ |
3862 | + protected void addConditionPropertyDescriptor(Object object) { |
3863 | + itemPropertyDescriptors.add |
3864 | + (createItemPropertyDescriptor |
3865 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
3866 | + getResourceLocator(), |
3867 | + getString("_UI_If_condition_feature"), |
3868 | + getString("_UI_PropertyDescriptor_description", "_UI_If_condition_feature", "_UI_If_type"), |
3869 | + AlgorithmPackage.Literals.IF__CONDITION, |
3870 | + true, |
3871 | + false, |
3872 | + true, |
3873 | + null, |
3874 | + null, |
3875 | + null)); |
3876 | + } |
3877 | + |
3878 | + /** |
3879 | + * This returns If.gif. |
3880 | + * <!-- begin-user-doc --> |
3881 | + * <!-- end-user-doc --> |
3882 | + * @generated |
3883 | + */ |
3884 | + @Override |
3885 | + public Object getImage(Object object) { |
3886 | + return overlayImage(object, getResourceLocator().getImage("full/obj16/If")); |
3887 | + } |
3888 | + |
3889 | + /** |
3890 | + * This returns the label text for the adapted class. |
3891 | + * <!-- begin-user-doc --> |
3892 | + * <!-- end-user-doc --> |
3893 | + * @generated |
3894 | + */ |
3895 | + @Override |
3896 | + public String getText(Object object) { |
3897 | + return getString("_UI_If_type"); |
3898 | + } |
3899 | + |
3900 | + /** |
3901 | + * This handles model notifications by calling {@link #updateChildren} to update any cached |
3902 | + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
3903 | + * <!-- begin-user-doc --> |
3904 | + * <!-- end-user-doc --> |
3905 | + * @generated |
3906 | + */ |
3907 | + @Override |
3908 | + public void notifyChanged(Notification notification) { |
3909 | + updateChildren(notification); |
3910 | + super.notifyChanged(notification); |
3911 | + } |
3912 | + |
3913 | + /** |
3914 | + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
3915 | + * that can be created under this object. |
3916 | + * <!-- begin-user-doc --> |
3917 | + * <!-- end-user-doc --> |
3918 | + * @generated |
3919 | + */ |
3920 | + @Override |
3921 | + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
3922 | + super.collectNewChildDescriptors(newChildDescriptors, object); |
3923 | + } |
3924 | + |
3925 | +} |
3926 | |
3927 | === renamed file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java' => 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/IfItemProvider.java.moved' |
3928 | === modified file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/InstructionItemProvider.java' |
3929 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/InstructionItemProvider.java 2011-02-06 00:10:56 +0000 |
3930 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/InstructionItemProvider.java 2011-03-16 20:54:30 +0000 |
3931 | @@ -10,13 +10,11 @@ |
3932 | import java.util.Collection; |
3933 | import java.util.List; |
3934 | |
3935 | -import net.launchpad.vide.algorithm.AlgorithmPackage; |
3936 | import org.eclipse.emf.common.notify.AdapterFactory; |
3937 | import org.eclipse.emf.common.notify.Notification; |
3938 | |
3939 | import org.eclipse.emf.common.util.ResourceLocator; |
3940 | |
3941 | -import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
3942 | import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
3943 | import org.eclipse.emf.edit.provider.IItemLabelProvider; |
3944 | import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
3945 | |
3946 | === added file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java' |
3947 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java 1970-01-01 00:00:00 +0000 |
3948 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java 2011-03-16 20:54:30 +0000 |
3949 | @@ -0,0 +1,109 @@ |
3950 | +/** |
3951 | + * <copyright> |
3952 | + * </copyright> |
3953 | + * |
3954 | + * $Id$ |
3955 | + */ |
3956 | +package net.launchpad.vide.algorithm.provider; |
3957 | + |
3958 | + |
3959 | +import java.util.Collection; |
3960 | +import java.util.List; |
3961 | + |
3962 | +import org.eclipse.emf.common.notify.AdapterFactory; |
3963 | +import org.eclipse.emf.common.notify.Notification; |
3964 | + |
3965 | +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
3966 | +import org.eclipse.emf.edit.provider.IItemLabelProvider; |
3967 | +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
3968 | +import org.eclipse.emf.edit.provider.IItemPropertySource; |
3969 | +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
3970 | +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
3971 | + |
3972 | +/** |
3973 | + * This is the item provider adapter for a {@link net.launchpad.vide.algorithm.SingleInstruction} object. |
3974 | + * <!-- begin-user-doc --> |
3975 | + * <!-- end-user-doc --> |
3976 | + * @generated |
3977 | + */ |
3978 | +public class SingleInstructionItemProvider |
3979 | + extends WhileLanguageInstructionItemProvider |
3980 | + implements |
3981 | + IEditingDomainItemProvider, |
3982 | + IStructuredItemContentProvider, |
3983 | + ITreeItemContentProvider, |
3984 | + IItemLabelProvider, |
3985 | + IItemPropertySource { |
3986 | + /** |
3987 | + * This constructs an instance from a factory and a notifier. |
3988 | + * <!-- begin-user-doc --> |
3989 | + * <!-- end-user-doc --> |
3990 | + * @generated |
3991 | + */ |
3992 | + public SingleInstructionItemProvider(AdapterFactory adapterFactory) { |
3993 | + super(adapterFactory); |
3994 | + } |
3995 | + |
3996 | + /** |
3997 | + * This returns the property descriptors for the adapted class. |
3998 | + * <!-- begin-user-doc --> |
3999 | + * <!-- end-user-doc --> |
4000 | + * @generated |
4001 | + */ |
4002 | + @Override |
4003 | + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
4004 | + if (itemPropertyDescriptors == null) { |
4005 | + super.getPropertyDescriptors(object); |
4006 | + |
4007 | + } |
4008 | + return itemPropertyDescriptors; |
4009 | + } |
4010 | + |
4011 | + /** |
4012 | + * This returns SingleInstruction.gif. |
4013 | + * <!-- begin-user-doc --> |
4014 | + * <!-- end-user-doc --> |
4015 | + * @generated |
4016 | + */ |
4017 | + @Override |
4018 | + public Object getImage(Object object) { |
4019 | + return overlayImage(object, getResourceLocator().getImage("full/obj16/SingleInstruction")); |
4020 | + } |
4021 | + |
4022 | + /** |
4023 | + * This returns the label text for the adapted class. |
4024 | + * <!-- begin-user-doc --> |
4025 | + * <!-- end-user-doc --> |
4026 | + * @generated |
4027 | + */ |
4028 | + @Override |
4029 | + public String getText(Object object) { |
4030 | + return getString("_UI_SingleInstruction_type"); |
4031 | + } |
4032 | + |
4033 | + /** |
4034 | + * This handles model notifications by calling {@link #updateChildren} to update any cached |
4035 | + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
4036 | + * <!-- begin-user-doc --> |
4037 | + * <!-- end-user-doc --> |
4038 | + * @generated |
4039 | + */ |
4040 | + @Override |
4041 | + public void notifyChanged(Notification notification) { |
4042 | + updateChildren(notification); |
4043 | + super.notifyChanged(notification); |
4044 | + } |
4045 | + |
4046 | + /** |
4047 | + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
4048 | + * that can be created under this object. |
4049 | + * <!-- begin-user-doc --> |
4050 | + * <!-- end-user-doc --> |
4051 | + * @generated |
4052 | + */ |
4053 | + @Override |
4054 | + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
4055 | + super.collectNewChildDescriptors(newChildDescriptors, object); |
4056 | + } |
4057 | + |
4058 | +} |
4059 | |
4060 | === renamed file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java' => 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/SingleInstructionItemProvider.java.moved' |
4061 | === added file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java' |
4062 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java 1970-01-01 00:00:00 +0000 |
4063 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java 2011-03-16 20:54:30 +0000 |
4064 | @@ -0,0 +1,181 @@ |
4065 | +/** |
4066 | + * <copyright> |
4067 | + * </copyright> |
4068 | + * |
4069 | + * $Id$ |
4070 | + */ |
4071 | +package net.launchpad.vide.algorithm.provider; |
4072 | + |
4073 | + |
4074 | +import java.util.Collection; |
4075 | +import java.util.List; |
4076 | + |
4077 | +import net.launchpad.vide.algorithm.AlgorithmPackage; |
4078 | + |
4079 | +import org.eclipse.emf.common.notify.AdapterFactory; |
4080 | +import org.eclipse.emf.common.notify.Notification; |
4081 | + |
4082 | +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
4083 | +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
4084 | +import org.eclipse.emf.edit.provider.IItemLabelProvider; |
4085 | +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
4086 | +import org.eclipse.emf.edit.provider.IItemPropertySource; |
4087 | +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
4088 | +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
4089 | + |
4090 | +/** |
4091 | + * This is the item provider adapter for a {@link net.launchpad.vide.algorithm.While} object. |
4092 | + * <!-- begin-user-doc --> |
4093 | + * <!-- end-user-doc --> |
4094 | + * @generated |
4095 | + */ |
4096 | +public class WhileItemProvider |
4097 | + extends WhileLanguageInstructionItemProvider |
4098 | + implements |
4099 | + IEditingDomainItemProvider, |
4100 | + IStructuredItemContentProvider, |
4101 | + ITreeItemContentProvider, |
4102 | + IItemLabelProvider, |
4103 | + IItemPropertySource { |
4104 | + /** |
4105 | + * This constructs an instance from a factory and a notifier. |
4106 | + * <!-- begin-user-doc --> |
4107 | + * <!-- end-user-doc --> |
4108 | + * @generated |
4109 | + */ |
4110 | + public WhileItemProvider(AdapterFactory adapterFactory) { |
4111 | + super(adapterFactory); |
4112 | + } |
4113 | + |
4114 | + /** |
4115 | + * This returns the property descriptors for the adapted class. |
4116 | + * <!-- begin-user-doc --> |
4117 | + * <!-- end-user-doc --> |
4118 | + * @generated |
4119 | + */ |
4120 | + @Override |
4121 | + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
4122 | + if (itemPropertyDescriptors == null) { |
4123 | + super.getPropertyDescriptors(object); |
4124 | + |
4125 | + addBodyPropertyDescriptor(object); |
4126 | + addFalsePropertyDescriptor(object); |
4127 | + addConditionPropertyDescriptor(object); |
4128 | + } |
4129 | + return itemPropertyDescriptors; |
4130 | + } |
4131 | + |
4132 | + /** |
4133 | + * This adds a property descriptor for the Body feature. |
4134 | + * <!-- begin-user-doc --> |
4135 | + * <!-- end-user-doc --> |
4136 | + * @generated |
4137 | + */ |
4138 | + protected void addBodyPropertyDescriptor(Object object) { |
4139 | + itemPropertyDescriptors.add |
4140 | + (createItemPropertyDescriptor |
4141 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
4142 | + getResourceLocator(), |
4143 | + getString("_UI_While_body_feature"), |
4144 | + getString("_UI_PropertyDescriptor_description", "_UI_While_body_feature", "_UI_While_type"), |
4145 | + AlgorithmPackage.Literals.WHILE__BODY, |
4146 | + true, |
4147 | + false, |
4148 | + true, |
4149 | + null, |
4150 | + null, |
4151 | + null)); |
4152 | + } |
4153 | + |
4154 | + /** |
4155 | + * This adds a property descriptor for the False feature. |
4156 | + * <!-- begin-user-doc --> |
4157 | + * <!-- end-user-doc --> |
4158 | + * @generated |
4159 | + */ |
4160 | + protected void addFalsePropertyDescriptor(Object object) { |
4161 | + itemPropertyDescriptors.add |
4162 | + (createItemPropertyDescriptor |
4163 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
4164 | + getResourceLocator(), |
4165 | + getString("_UI_While_false_feature"), |
4166 | + getString("_UI_PropertyDescriptor_description", "_UI_While_false_feature", "_UI_While_type"), |
4167 | + AlgorithmPackage.Literals.WHILE__FALSE, |
4168 | + true, |
4169 | + false, |
4170 | + true, |
4171 | + null, |
4172 | + null, |
4173 | + null)); |
4174 | + } |
4175 | + |
4176 | + /** |
4177 | + * This adds a property descriptor for the Condition feature. |
4178 | + * <!-- begin-user-doc --> |
4179 | + * <!-- end-user-doc --> |
4180 | + * @generated |
4181 | + */ |
4182 | + protected void addConditionPropertyDescriptor(Object object) { |
4183 | + itemPropertyDescriptors.add |
4184 | + (createItemPropertyDescriptor |
4185 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
4186 | + getResourceLocator(), |
4187 | + getString("_UI_While_condition_feature"), |
4188 | + getString("_UI_PropertyDescriptor_description", "_UI_While_condition_feature", "_UI_While_type"), |
4189 | + AlgorithmPackage.Literals.WHILE__CONDITION, |
4190 | + true, |
4191 | + false, |
4192 | + true, |
4193 | + null, |
4194 | + null, |
4195 | + null)); |
4196 | + } |
4197 | + |
4198 | + /** |
4199 | + * This returns While.gif. |
4200 | + * <!-- begin-user-doc --> |
4201 | + * <!-- end-user-doc --> |
4202 | + * @generated |
4203 | + */ |
4204 | + @Override |
4205 | + public Object getImage(Object object) { |
4206 | + return overlayImage(object, getResourceLocator().getImage("full/obj16/While")); |
4207 | + } |
4208 | + |
4209 | + /** |
4210 | + * This returns the label text for the adapted class. |
4211 | + * <!-- begin-user-doc --> |
4212 | + * <!-- end-user-doc --> |
4213 | + * @generated |
4214 | + */ |
4215 | + @Override |
4216 | + public String getText(Object object) { |
4217 | + return getString("_UI_While_type"); |
4218 | + } |
4219 | + |
4220 | + /** |
4221 | + * This handles model notifications by calling {@link #updateChildren} to update any cached |
4222 | + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
4223 | + * <!-- begin-user-doc --> |
4224 | + * <!-- end-user-doc --> |
4225 | + * @generated |
4226 | + */ |
4227 | + @Override |
4228 | + public void notifyChanged(Notification notification) { |
4229 | + updateChildren(notification); |
4230 | + super.notifyChanged(notification); |
4231 | + } |
4232 | + |
4233 | + /** |
4234 | + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
4235 | + * that can be created under this object. |
4236 | + * <!-- begin-user-doc --> |
4237 | + * <!-- end-user-doc --> |
4238 | + * @generated |
4239 | + */ |
4240 | + @Override |
4241 | + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
4242 | + super.collectNewChildDescriptors(newChildDescriptors, object); |
4243 | + } |
4244 | + |
4245 | +} |
4246 | |
4247 | === renamed file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java' => 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileItemProvider.java.moved' |
4248 | === added file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java' |
4249 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java 1970-01-01 00:00:00 +0000 |
4250 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java 2011-03-16 20:54:30 +0000 |
4251 | @@ -0,0 +1,186 @@ |
4252 | +/** |
4253 | + * <copyright> |
4254 | + * </copyright> |
4255 | + * |
4256 | + * $Id$ |
4257 | + */ |
4258 | +package net.launchpad.vide.algorithm.provider; |
4259 | + |
4260 | + |
4261 | +import java.util.Collection; |
4262 | +import java.util.List; |
4263 | + |
4264 | +import net.launchpad.vide.algorithm.AlgorithmFactory; |
4265 | +import net.launchpad.vide.algorithm.AlgorithmPackage; |
4266 | +import net.launchpad.vide.algorithm.WhileLanguageAlgorithm; |
4267 | + |
4268 | +import org.eclipse.emf.common.notify.AdapterFactory; |
4269 | +import org.eclipse.emf.common.notify.Notification; |
4270 | + |
4271 | +import org.eclipse.emf.common.util.ResourceLocator; |
4272 | + |
4273 | +import org.eclipse.emf.ecore.EStructuralFeature; |
4274 | + |
4275 | +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
4276 | +import org.eclipse.emf.edit.provider.IItemLabelProvider; |
4277 | +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
4278 | +import org.eclipse.emf.edit.provider.IItemPropertySource; |
4279 | +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
4280 | +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
4281 | +import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
4282 | +import org.eclipse.emf.edit.provider.ViewerNotification; |
4283 | + |
4284 | +/** |
4285 | + * This is the item provider adapter for a {@link net.launchpad.vide.algorithm.WhileLanguageAlgorithm} object. |
4286 | + * <!-- begin-user-doc --> |
4287 | + * <!-- end-user-doc --> |
4288 | + * @generated |
4289 | + */ |
4290 | +public class WhileLanguageAlgorithmItemProvider |
4291 | + extends ItemProviderAdapter |
4292 | + implements |
4293 | + IEditingDomainItemProvider, |
4294 | + IStructuredItemContentProvider, |
4295 | + ITreeItemContentProvider, |
4296 | + IItemLabelProvider, |
4297 | + IItemPropertySource { |
4298 | + /** |
4299 | + * This constructs an instance from a factory and a notifier. |
4300 | + * <!-- begin-user-doc --> |
4301 | + * <!-- end-user-doc --> |
4302 | + * @generated |
4303 | + */ |
4304 | + public WhileLanguageAlgorithmItemProvider(AdapterFactory adapterFactory) { |
4305 | + super(adapterFactory); |
4306 | + } |
4307 | + |
4308 | + /** |
4309 | + * This returns the property descriptors for the adapted class. |
4310 | + * <!-- begin-user-doc --> |
4311 | + * <!-- end-user-doc --> |
4312 | + * @generated |
4313 | + */ |
4314 | + @Override |
4315 | + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
4316 | + if (itemPropertyDescriptors == null) { |
4317 | + super.getPropertyDescriptors(object); |
4318 | + |
4319 | + } |
4320 | + return itemPropertyDescriptors; |
4321 | + } |
4322 | + |
4323 | + /** |
4324 | + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
4325 | + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
4326 | + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
4327 | + * <!-- begin-user-doc --> |
4328 | + * <!-- end-user-doc --> |
4329 | + * @generated |
4330 | + */ |
4331 | + @Override |
4332 | + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
4333 | + if (childrenFeatures == null) { |
4334 | + super.getChildrenFeatures(object); |
4335 | + childrenFeatures.add(AlgorithmPackage.Literals.WHILE_LANGUAGE_ALGORITHM__INSTRUCTIONS); |
4336 | + } |
4337 | + return childrenFeatures; |
4338 | + } |
4339 | + |
4340 | + /** |
4341 | + * <!-- begin-user-doc --> |
4342 | + * <!-- end-user-doc --> |
4343 | + * @generated |
4344 | + */ |
4345 | + @Override |
4346 | + protected EStructuralFeature getChildFeature(Object object, Object child) { |
4347 | + // Check the type of the specified child object and return the proper feature to use for |
4348 | + // adding (see {@link AddCommand}) it as a child. |
4349 | + |
4350 | + return super.getChildFeature(object, child); |
4351 | + } |
4352 | + |
4353 | + /** |
4354 | + * This returns WhileLanguageAlgorithm.gif. |
4355 | + * <!-- begin-user-doc --> |
4356 | + * <!-- end-user-doc --> |
4357 | + * @generated |
4358 | + */ |
4359 | + @Override |
4360 | + public Object getImage(Object object) { |
4361 | + return overlayImage(object, getResourceLocator().getImage("full/obj16/WhileLanguageAlgorithm")); |
4362 | + } |
4363 | + |
4364 | + /** |
4365 | + * This returns the label text for the adapted class. |
4366 | + * <!-- begin-user-doc --> |
4367 | + * <!-- end-user-doc --> |
4368 | + * @generated |
4369 | + */ |
4370 | + @Override |
4371 | + public String getText(Object object) { |
4372 | + return getString("_UI_WhileLanguageAlgorithm_type"); |
4373 | + } |
4374 | + |
4375 | + /** |
4376 | + * This handles model notifications by calling {@link #updateChildren} to update any cached |
4377 | + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
4378 | + * <!-- begin-user-doc --> |
4379 | + * <!-- end-user-doc --> |
4380 | + * @generated |
4381 | + */ |
4382 | + @Override |
4383 | + public void notifyChanged(Notification notification) { |
4384 | + updateChildren(notification); |
4385 | + |
4386 | + switch (notification.getFeatureID(WhileLanguageAlgorithm.class)) { |
4387 | + case AlgorithmPackage.WHILE_LANGUAGE_ALGORITHM__INSTRUCTIONS: |
4388 | + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
4389 | + return; |
4390 | + } |
4391 | + super.notifyChanged(notification); |
4392 | + } |
4393 | + |
4394 | + /** |
4395 | + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
4396 | + * that can be created under this object. |
4397 | + * <!-- begin-user-doc --> |
4398 | + * <!-- end-user-doc --> |
4399 | + * @generated |
4400 | + */ |
4401 | + @Override |
4402 | + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
4403 | + super.collectNewChildDescriptors(newChildDescriptors, object); |
4404 | + |
4405 | + newChildDescriptors.add |
4406 | + (createChildParameter |
4407 | + (AlgorithmPackage.Literals.WHILE_LANGUAGE_ALGORITHM__INSTRUCTIONS, |
4408 | + AlgorithmFactory.eINSTANCE.createWhileLanguageInstruction())); |
4409 | + |
4410 | + newChildDescriptors.add |
4411 | + (createChildParameter |
4412 | + (AlgorithmPackage.Literals.WHILE_LANGUAGE_ALGORITHM__INSTRUCTIONS, |
4413 | + AlgorithmFactory.eINSTANCE.createWhile())); |
4414 | + |
4415 | + newChildDescriptors.add |
4416 | + (createChildParameter |
4417 | + (AlgorithmPackage.Literals.WHILE_LANGUAGE_ALGORITHM__INSTRUCTIONS, |
4418 | + AlgorithmFactory.eINSTANCE.createIf())); |
4419 | + |
4420 | + newChildDescriptors.add |
4421 | + (createChildParameter |
4422 | + (AlgorithmPackage.Literals.WHILE_LANGUAGE_ALGORITHM__INSTRUCTIONS, |
4423 | + AlgorithmFactory.eINSTANCE.createSingleInstruction())); |
4424 | + } |
4425 | + |
4426 | + /** |
4427 | + * Return the resource locator for this item provider's resources. |
4428 | + * <!-- begin-user-doc --> |
4429 | + * <!-- end-user-doc --> |
4430 | + * @generated |
4431 | + */ |
4432 | + @Override |
4433 | + public ResourceLocator getResourceLocator() { |
4434 | + return AlgorithmEditPlugin.INSTANCE; |
4435 | + } |
4436 | + |
4437 | +} |
4438 | |
4439 | === renamed file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java' => 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageAlgorithmItemProvider.java.moved' |
4440 | === added file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java' |
4441 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java 1970-01-01 00:00:00 +0000 |
4442 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java 2011-03-16 20:54:30 +0000 |
4443 | @@ -0,0 +1,149 @@ |
4444 | +/** |
4445 | + * <copyright> |
4446 | + * </copyright> |
4447 | + * |
4448 | + * $Id$ |
4449 | + */ |
4450 | +package net.launchpad.vide.algorithm.provider; |
4451 | + |
4452 | + |
4453 | +import java.util.Collection; |
4454 | +import java.util.List; |
4455 | + |
4456 | +import net.launchpad.vide.algorithm.AlgorithmPackage; |
4457 | + |
4458 | +import org.eclipse.emf.common.notify.AdapterFactory; |
4459 | +import org.eclipse.emf.common.notify.Notification; |
4460 | + |
4461 | +import org.eclipse.emf.common.util.ResourceLocator; |
4462 | + |
4463 | +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
4464 | +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
4465 | +import org.eclipse.emf.edit.provider.IItemLabelProvider; |
4466 | +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
4467 | +import org.eclipse.emf.edit.provider.IItemPropertySource; |
4468 | +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
4469 | +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
4470 | +import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
4471 | + |
4472 | +/** |
4473 | + * This is the item provider adapter for a {@link net.launchpad.vide.algorithm.WhileLanguageBlock} object. |
4474 | + * <!-- begin-user-doc --> |
4475 | + * <!-- end-user-doc --> |
4476 | + * @generated |
4477 | + */ |
4478 | +public class WhileLanguageBlockItemProvider |
4479 | + extends ItemProviderAdapter |
4480 | + implements |
4481 | + IEditingDomainItemProvider, |
4482 | + IStructuredItemContentProvider, |
4483 | + ITreeItemContentProvider, |
4484 | + IItemLabelProvider, |
4485 | + IItemPropertySource { |
4486 | + /** |
4487 | + * This constructs an instance from a factory and a notifier. |
4488 | + * <!-- begin-user-doc --> |
4489 | + * <!-- end-user-doc --> |
4490 | + * @generated |
4491 | + */ |
4492 | + public WhileLanguageBlockItemProvider(AdapterFactory adapterFactory) { |
4493 | + super(adapterFactory); |
4494 | + } |
4495 | + |
4496 | + /** |
4497 | + * This returns the property descriptors for the adapted class. |
4498 | + * <!-- begin-user-doc --> |
4499 | + * <!-- end-user-doc --> |
4500 | + * @generated |
4501 | + */ |
4502 | + @Override |
4503 | + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
4504 | + if (itemPropertyDescriptors == null) { |
4505 | + super.getPropertyDescriptors(object); |
4506 | + |
4507 | + addInstructionsPropertyDescriptor(object); |
4508 | + } |
4509 | + return itemPropertyDescriptors; |
4510 | + } |
4511 | + |
4512 | + /** |
4513 | + * This adds a property descriptor for the Instructions feature. |
4514 | + * <!-- begin-user-doc --> |
4515 | + * <!-- end-user-doc --> |
4516 | + * @generated |
4517 | + */ |
4518 | + protected void addInstructionsPropertyDescriptor(Object object) { |
4519 | + itemPropertyDescriptors.add |
4520 | + (createItemPropertyDescriptor |
4521 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
4522 | + getResourceLocator(), |
4523 | + getString("_UI_WhileLanguageBlock_instructions_feature"), |
4524 | + getString("_UI_PropertyDescriptor_description", "_UI_WhileLanguageBlock_instructions_feature", "_UI_WhileLanguageBlock_type"), |
4525 | + AlgorithmPackage.Literals.WHILE_LANGUAGE_BLOCK__INSTRUCTIONS, |
4526 | + true, |
4527 | + false, |
4528 | + true, |
4529 | + null, |
4530 | + null, |
4531 | + null)); |
4532 | + } |
4533 | + |
4534 | + /** |
4535 | + * This returns WhileLanguageBlock.gif. |
4536 | + * <!-- begin-user-doc --> |
4537 | + * <!-- end-user-doc --> |
4538 | + * @generated |
4539 | + */ |
4540 | + @Override |
4541 | + public Object getImage(Object object) { |
4542 | + return overlayImage(object, getResourceLocator().getImage("full/obj16/WhileLanguageBlock")); |
4543 | + } |
4544 | + |
4545 | + /** |
4546 | + * This returns the label text for the adapted class. |
4547 | + * <!-- begin-user-doc --> |
4548 | + * <!-- end-user-doc --> |
4549 | + * @generated |
4550 | + */ |
4551 | + @Override |
4552 | + public String getText(Object object) { |
4553 | + return getString("_UI_WhileLanguageBlock_type"); |
4554 | + } |
4555 | + |
4556 | + /** |
4557 | + * This handles model notifications by calling {@link #updateChildren} to update any cached |
4558 | + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
4559 | + * <!-- begin-user-doc --> |
4560 | + * <!-- end-user-doc --> |
4561 | + * @generated |
4562 | + */ |
4563 | + @Override |
4564 | + public void notifyChanged(Notification notification) { |
4565 | + updateChildren(notification); |
4566 | + super.notifyChanged(notification); |
4567 | + } |
4568 | + |
4569 | + /** |
4570 | + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
4571 | + * that can be created under this object. |
4572 | + * <!-- begin-user-doc --> |
4573 | + * <!-- end-user-doc --> |
4574 | + * @generated |
4575 | + */ |
4576 | + @Override |
4577 | + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
4578 | + super.collectNewChildDescriptors(newChildDescriptors, object); |
4579 | + } |
4580 | + |
4581 | + /** |
4582 | + * Return the resource locator for this item provider's resources. |
4583 | + * <!-- begin-user-doc --> |
4584 | + * <!-- end-user-doc --> |
4585 | + * @generated |
4586 | + */ |
4587 | + @Override |
4588 | + public ResourceLocator getResourceLocator() { |
4589 | + return AlgorithmEditPlugin.INSTANCE; |
4590 | + } |
4591 | + |
4592 | +} |
4593 | |
4594 | === renamed file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java' => 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageBlockItemProvider.java.moved' |
4595 | === added file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java' |
4596 | --- net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java 1970-01-01 00:00:00 +0000 |
4597 | +++ net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java 2011-03-16 20:54:30 +0000 |
4598 | @@ -0,0 +1,149 @@ |
4599 | +/** |
4600 | + * <copyright> |
4601 | + * </copyright> |
4602 | + * |
4603 | + * $Id$ |
4604 | + */ |
4605 | +package net.launchpad.vide.algorithm.provider; |
4606 | + |
4607 | + |
4608 | +import java.util.Collection; |
4609 | +import java.util.List; |
4610 | + |
4611 | +import net.launchpad.vide.algorithm.AlgorithmPackage; |
4612 | + |
4613 | +import org.eclipse.emf.common.notify.AdapterFactory; |
4614 | +import org.eclipse.emf.common.notify.Notification; |
4615 | + |
4616 | +import org.eclipse.emf.common.util.ResourceLocator; |
4617 | + |
4618 | +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
4619 | +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
4620 | +import org.eclipse.emf.edit.provider.IItemLabelProvider; |
4621 | +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
4622 | +import org.eclipse.emf.edit.provider.IItemPropertySource; |
4623 | +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
4624 | +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
4625 | +import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
4626 | + |
4627 | +/** |
4628 | + * This is the item provider adapter for a {@link net.launchpad.vide.algorithm.WhileLanguageInstruction} object. |
4629 | + * <!-- begin-user-doc --> |
4630 | + * <!-- end-user-doc --> |
4631 | + * @generated |
4632 | + */ |
4633 | +public class WhileLanguageInstructionItemProvider |
4634 | + extends ItemProviderAdapter |
4635 | + implements |
4636 | + IEditingDomainItemProvider, |
4637 | + IStructuredItemContentProvider, |
4638 | + ITreeItemContentProvider, |
4639 | + IItemLabelProvider, |
4640 | + IItemPropertySource { |
4641 | + /** |
4642 | + * This constructs an instance from a factory and a notifier. |
4643 | + * <!-- begin-user-doc --> |
4644 | + * <!-- end-user-doc --> |
4645 | + * @generated |
4646 | + */ |
4647 | + public WhileLanguageInstructionItemProvider(AdapterFactory adapterFactory) { |
4648 | + super(adapterFactory); |
4649 | + } |
4650 | + |
4651 | + /** |
4652 | + * This returns the property descriptors for the adapted class. |
4653 | + * <!-- begin-user-doc --> |
4654 | + * <!-- end-user-doc --> |
4655 | + * @generated |
4656 | + */ |
4657 | + @Override |
4658 | + public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
4659 | + if (itemPropertyDescriptors == null) { |
4660 | + super.getPropertyDescriptors(object); |
4661 | + |
4662 | + addNextPropertyDescriptor(object); |
4663 | + } |
4664 | + return itemPropertyDescriptors; |
4665 | + } |
4666 | + |
4667 | + /** |
4668 | + * This adds a property descriptor for the Next feature. |
4669 | + * <!-- begin-user-doc --> |
4670 | + * <!-- end-user-doc --> |
4671 | + * @generated |
4672 | + */ |
4673 | + protected void addNextPropertyDescriptor(Object object) { |
4674 | + itemPropertyDescriptors.add |
4675 | + (createItemPropertyDescriptor |
4676 | + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
4677 | + getResourceLocator(), |
4678 | + getString("_UI_WhileLanguageInstruction_next_feature"), |
4679 | + getString("_UI_PropertyDescriptor_description", "_UI_WhileLanguageInstruction_next_feature", "_UI_WhileLanguageInstruction_type"), |
4680 | + AlgorithmPackage.Literals.WHILE_LANGUAGE_INSTRUCTION__NEXT, |
4681 | + true, |
4682 | + false, |
4683 | + true, |
4684 | + null, |
4685 | + null, |
4686 | + null)); |
4687 | + } |
4688 | + |
4689 | + /** |
4690 | + * This returns WhileLanguageInstruction.gif. |
4691 | + * <!-- begin-user-doc --> |
4692 | + * <!-- end-user-doc --> |
4693 | + * @generated |
4694 | + */ |
4695 | + @Override |
4696 | + public Object getImage(Object object) { |
4697 | + return overlayImage(object, getResourceLocator().getImage("full/obj16/WhileLanguageInstruction")); |
4698 | + } |
4699 | + |
4700 | + /** |
4701 | + * This returns the label text for the adapted class. |
4702 | + * <!-- begin-user-doc --> |
4703 | + * <!-- end-user-doc --> |
4704 | + * @generated |
4705 | + */ |
4706 | + @Override |
4707 | + public String getText(Object object) { |
4708 | + return getString("_UI_WhileLanguageInstruction_type"); |
4709 | + } |
4710 | + |
4711 | + /** |
4712 | + * This handles model notifications by calling {@link #updateChildren} to update any cached |
4713 | + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
4714 | + * <!-- begin-user-doc --> |
4715 | + * <!-- end-user-doc --> |
4716 | + * @generated |
4717 | + */ |
4718 | + @Override |
4719 | + public void notifyChanged(Notification notification) { |
4720 | + updateChildren(notification); |
4721 | + super.notifyChanged(notification); |
4722 | + } |
4723 | + |
4724 | + /** |
4725 | + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
4726 | + * that can be created under this object. |
4727 | + * <!-- begin-user-doc --> |
4728 | + * <!-- end-user-doc --> |
4729 | + * @generated |
4730 | + */ |
4731 | + @Override |
4732 | + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
4733 | + super.collectNewChildDescriptors(newChildDescriptors, object); |
4734 | + } |
4735 | + |
4736 | + /** |
4737 | + * Return the resource locator for this item provider's resources. |
4738 | + * <!-- begin-user-doc --> |
4739 | + * <!-- end-user-doc --> |
4740 | + * @generated |
4741 | + */ |
4742 | + @Override |
4743 | + public ResourceLocator getResourceLocator() { |
4744 | + return AlgorithmEditPlugin.INSTANCE; |
4745 | + } |
4746 | + |
4747 | +} |
4748 | |
4749 | === renamed file 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java' => 'net.launchpad.vide.edit/src/net/launchpad/vide/algorithm/provider/WhileLanguageInstructionItemProvider.java.moved' |
4750 | === modified file 'net.launchpad.vide.flowchart/model/algorithm.genmodel' |
4751 | --- net.launchpad.vide.flowchart/model/algorithm.genmodel 2011-02-12 23:09:25 +0000 |
4752 | +++ net.launchpad.vide.flowchart/model/algorithm.genmodel 2011-03-16 20:54:30 +0000 |
4753 | @@ -10,6 +10,7 @@ |
4754 | <genClasses ecoreClass="algorithm.ecore#//Algorithm"> |
4755 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference algorithm.ecore#//Algorithm/instructions"/> |
4756 | <genOperations ecoreOperation="algorithm.ecore#//Algorithm/getFirstInstruction"/> |
4757 | + <genOperations ecoreOperation="algorithm.ecore#//Algorithm/getWhileLanguageRepresentation"/> |
4758 | </genClasses> |
4759 | <genClasses image="false" ecoreClass="algorithm.ecore#//Instruction"/> |
4760 | <genClasses ecoreClass="algorithm.ecore#//Block"> |
4761 | @@ -21,5 +22,26 @@ |
4762 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//Branch/false"/> |
4763 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//Branch/true"/> |
4764 | </genClasses> |
4765 | + <genClasses ecoreClass="algorithm.ecore#//WhileLanguageAlgorithm"> |
4766 | + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference algorithm.ecore#//WhileLanguageAlgorithm/instructions"/> |
4767 | + </genClasses> |
4768 | + <genClasses ecoreClass="algorithm.ecore#//WhileLanguageInstruction"> |
4769 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//WhileLanguageInstruction/next"/> |
4770 | + </genClasses> |
4771 | + <genClasses ecoreClass="algorithm.ecore#//While"> |
4772 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//While/body"/> |
4773 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//While/false"/> |
4774 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//While/condition"/> |
4775 | + </genClasses> |
4776 | + <genClasses ecoreClass="algorithm.ecore#//If"> |
4777 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//If/true"/> |
4778 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//If/false"/> |
4779 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//If/condition"/> |
4780 | + </genClasses> |
4781 | + <genClasses ecoreClass="algorithm.ecore#//WhileLanguageBlock"> |
4782 | + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference algorithm.ecore#//WhileLanguageBlock/instructions"/> |
4783 | + </genClasses> |
4784 | + <genClasses ecoreClass="algorithm.ecore#//BooleanExpression"/> |
4785 | + <genClasses ecoreClass="algorithm.ecore#//SingleInstruction"/> |
4786 | </genPackages> |
4787 | </genmodel:GenModel> |
4788 | |
4789 | === modified file 'net.launchpad.vide.flowchart/model/flowchart.gmfgen' |
4790 | --- net.launchpad.vide.flowchart/model/flowchart.gmfgen 2011-02-18 16:41:37 +0000 |
4791 | +++ net.launchpad.vide.flowchart/model/flowchart.gmfgen 2011-03-16 20:54:30 +0000 |
4792 | @@ -3,13 +3,43 @@ |
4793 | xmlns:xmi="http://www.omg.org/XMI" |
4794 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
4795 | xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" diagramFileExtension="flowchart"> |
4796 | + <audits> |
4797 | + <categories |
4798 | + id="01" |
4799 | + name="Block" |
4800 | + description="Block warnings" |
4801 | + path="//@audits/@categories.0" |
4802 | + audits="//@audits/@rules.0"/> |
4803 | + <rules |
4804 | + name="No instruction" |
4805 | + description="No instruction warning" |
4806 | + id="333" |
4807 | + rule="//@expressionProviders/@providers.0/@expressions.3" |
4808 | + message="Blok mora imati barem jednu naredbu" |
4809 | + severity="WARNING" |
4810 | + useInLiveMode="true" |
4811 | + category="//@audits/@categories.0"> |
4812 | + <target |
4813 | + xsi:type="gmfgen:GenDomainAttributeTarget" |
4814 | + contextSelector="//@audits/@clientContexts.0" |
4815 | + nullAsError="true"> |
4816 | + <attribute |
4817 | + href="algorithm.genmodel#//algorithm/Block/commands"/> |
4818 | + </target> |
4819 | + </rules> |
4820 | + <clientContexts |
4821 | + ruleTargets="//@audits/@rules.0/@target"/> |
4822 | + </audits> |
4823 | <diagram |
4824 | visualID="1000" |
4825 | editPartClassName="AlgorithmEditPart" |
4826 | itemSemanticEditPolicyClassName="AlgorithmItemSemanticEditPolicy" |
4827 | canonicalEditPolicyClassName="AlgorithmCanonicalEditPolicy" |
4828 | iconProviderPriority="Low" |
4829 | - validationProviderPriority="Low"> |
4830 | + validationProviderPriority="Low" |
4831 | + validationEnabled="true" |
4832 | + validationDecorators="true" |
4833 | + validationDecoratorProviderPriority="Medium"> |
4834 | <diagramRunTimeClass |
4835 | href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/> |
4836 | <elementType |
4837 | @@ -92,7 +122,7 @@ |
4838 | xsi:type="gmfgen:InnerClassViewmap" |
4839 | layoutType="FLOW_LAYOUT" |
4840 | className="BlockFigure" |
4841 | - classBody="
/**
 * @generated
 */
public class BlockFigure extends org.eclipse.draw2d.RectangleFigure {


	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureBlockCommandsFigure; 


	/**
	 * @generated
	 */
	public BlockFigure() {
		
	org.eclipse.draw2d.FlowLayout layoutThis = new org.eclipse.draw2d.FlowLayout();
	layoutThis.setStretchMinorAxis(false);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.FlowLayout.ALIGN_LEFTTOP
);

	layoutThis.setMajorAlignment(org.eclipse.draw2d.FlowLayout.ALIGN_LEFTTOP
);
	layoutThis.setMajorSpacing(5);
	layoutThis.setMinorSpacing(5);
	layoutThis.setHorizontal(true);

	this.setLayoutManager(layoutThis);

			this.setBackgroundColor(org.eclipse.draw2d.ColorConstants.white);
this.setPreferredSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(144)
, getMapMode().DPtoLP(36)
));
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


fFigureBlockCommandsFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureBlockCommandsFigure.setText("<...>");

this.add(fFigureBlockCommandsFigure);


	}





	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureBlockCommandsFigure() {
		return fFigureBlockCommandsFigure;
	}


}

"> |
4842 | + classBody="
/**
 * @generated
 */
public class BlockFigure extends org.eclipse.draw2d.RectangleFigure {


	/**
	 * @generated
	 */
	private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel fFigureBlockCommandsFigure; 


	/**
	 * @generated
	 */
	public BlockFigure() {
		
	org.eclipse.draw2d.FlowLayout layoutThis = new org.eclipse.draw2d.FlowLayout();
	layoutThis.setStretchMinorAxis(false);
	layoutThis.setMinorAlignment(org.eclipse.draw2d.FlowLayout.ALIGN_CENTER
);

	layoutThis.setMajorAlignment(org.eclipse.draw2d.FlowLayout.ALIGN_CENTER
);
	layoutThis.setMajorSpacing(5);
	layoutThis.setMinorSpacing(5);
	layoutThis.setHorizontal(true);

	this.setLayoutManager(layoutThis);

			this.setBackgroundColor(org.eclipse.draw2d.ColorConstants.white);
this.setPreferredSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(144)
, getMapMode().DPtoLP(36)
));
		createContents();
	}
	/**
	 * @generated
	 */
	private void createContents(){


fFigureBlockCommandsFigure = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel();
fFigureBlockCommandsFigure.setText("<...>");

this.add(fFigureBlockCommandsFigure);


	}





	/**
	 * @generated
	 */
	public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getFigureBlockCommandsFigure() {
		return fFigureBlockCommandsFigure;
	}


}

"> |
4843 | <attributes |
4844 | xsi:type="gmfgen:StyleAttributes" |
4845 | fixedBackground="true"/> |
4846 | @@ -149,6 +179,8 @@ |
4847 | <metaFeature |
4848 | href="algorithm.genmodel#//algorithm/Block/next"/> |
4849 | </modelFacet> |
4850 | + <creationConstraints |
4851 | + targetEnd="//@expressionProviders/@providers.0/@expressions.0"/> |
4852 | </links> |
4853 | <links |
4854 | visualID="4002" |
4855 | @@ -194,6 +226,8 @@ |
4856 | <modelFacet |
4857 | parser="//@labelParsers/@implementations.1"/> |
4858 | </labels> |
4859 | + <creationConstraints |
4860 | + targetEnd="//@expressionProviders/@providers.0/@expressions.1"/> |
4861 | </links> |
4862 | <links |
4863 | visualID="4003" |
4864 | @@ -239,6 +273,8 @@ |
4865 | <modelFacet |
4866 | parser="//@labelParsers/@implementations.1"/> |
4867 | </labels> |
4868 | + <creationConstraints |
4869 | + targetEnd="//@expressionProviders/@providers.0/@expressions.2"/> |
4870 | </links> |
4871 | <palette> |
4872 | <groups |
4873 | @@ -253,6 +289,9 @@ |
4874 | title="BlockNext" |
4875 | description="Connect next Block" |
4876 | genLinks="//@diagram/@links.0"/> |
4877 | + </groups> |
4878 | + <groups |
4879 | + title="branch"> |
4880 | <entries |
4881 | xsi:type="gmfgen:ToolEntry" |
4882 | title="Branch" |
4883 | @@ -268,6 +307,9 @@ |
4884 | title="BranchTrue" |
4885 | description="Create new Branch True" |
4886 | genLinks="//@diagram/@links.1"/> |
4887 | + <entries |
4888 | + xsi:type="gmfgen:StandardEntry" |
4889 | + title=""/> |
4890 | </groups> |
4891 | </palette> |
4892 | <preferencePages |
4893 | @@ -456,6 +498,23 @@ |
4894 | </propertySheet> |
4895 | <domainGenModel |
4896 | href="algorithm.genmodel#/"/> |
4897 | + <expressionProviders> |
4898 | + <providers |
4899 | + xsi:type="gmfgen:GenExpressionInterpreter"> |
4900 | + <expressions |
4901 | + xsi:type="gmfgen:GenConstraint" |
4902 | + body="self<>oppositeEnd"/> |
4903 | + <expressions |
4904 | + xsi:type="gmfgen:GenConstraint" |
4905 | + body="self<>oppositeEnd"/> |
4906 | + <expressions |
4907 | + xsi:type="gmfgen:GenConstraint" |
4908 | + body="self<>oppositeEnd"/> |
4909 | + <expressions |
4910 | + xsi:type="gmfgen:GenConstraint" |
4911 | + body="self <> ''"/> |
4912 | + </providers> |
4913 | + </expressionProviders> |
4914 | <labelParsers |
4915 | extensibleViaService="true"> |
4916 | <implementations |
4917 | |
4918 | === modified file 'net.launchpad.vide.flowchart/model/flowchart.gmfgraph' |
4919 | --- net.launchpad.vide.flowchart/model/flowchart.gmfgraph 2011-02-18 16:41:37 +0000 |
4920 | +++ net.launchpad.vide.flowchart/model/flowchart.gmfgraph 2011-03-16 20:54:30 +0000 |
4921 | @@ -20,7 +20,9 @@ |
4922 | xsi:type="gmfgraph:Rectangle" |
4923 | name="BlockFigure"> |
4924 | <layout |
4925 | - xsi:type="gmfgraph:FlowLayout"/> |
4926 | + xsi:type="gmfgraph:FlowLayout" |
4927 | + majorAlignment="CENTER" |
4928 | + minorAlignment="CENTER"/> |
4929 | <backgroundColor |
4930 | xsi:type="gmfgraph:ConstantColor"/> |
4931 | <preferredSize |
4932 | @@ -127,20 +129,28 @@ |
4933 | <labels |
4934 | name="BlockCommands" |
4935 | figure="BlockFigure" |
4936 | - accessor="//@figures.0/@descriptors.0/@accessors.0"/> |
4937 | + accessor="//@figures.0/@descriptors.0/@accessors.0"> |
4938 | + <facets |
4939 | + xsi:type="gmfgraph:AlignmentFacet" |
4940 | + alignment="CENTER"/> |
4941 | + </labels> |
4942 | <labels |
4943 | name="BranchCondtion" |
4944 | figure="BranchFigure" |
4945 | - accessor="//@figures.0/@descriptors.1/@accessors.0"/> |
4946 | + accessor="//@figures.0/@descriptors.1/@accessors.0"> |
4947 | + <facets |
4948 | + xsi:type="gmfgraph:AlignmentFacet" |
4949 | + alignment="CENTER"/> |
4950 | + </labels> |
4951 | <labels |
4952 | name="BranchTrueLabel" |
4953 | figure="TrueLabel"> |
4954 | <facets |
4955 | + xsi:type="gmfgraph:LabelOffsetFacet" |
4956 | + x="10"/> |
4957 | + <facets |
4958 | xsi:type="gmfgraph:AlignmentFacet" |
4959 | alignment="END"/> |
4960 | - <facets |
4961 | - xsi:type="gmfgraph:LabelOffsetFacet" |
4962 | - x="10"/> |
4963 | </labels> |
4964 | <labels |
4965 | name="BranchFalseLabel" |
4966 | |
4967 | === modified file 'net.launchpad.vide.flowchart/model/flowchart.gmfmap' |
4968 | --- net.launchpad.vide.flowchart/model/flowchart.gmfmap 2011-02-12 23:09:25 +0000 |
4969 | +++ net.launchpad.vide.flowchart/model/flowchart.gmfmap 2011-03-16 20:54:30 +0000 |
4970 | @@ -20,7 +20,7 @@ |
4971 | </labelMappings> |
4972 | <tool |
4973 | xsi:type="gmftool:CreationTool" |
4974 | - href="flowchart.gmftool#//@palette/@tools.0/@tools.2"/> |
4975 | + href="flowchart.gmftool#//@palette/@tools.1/@tools.0"/> |
4976 | <diagramNode |
4977 | href="flowchart.gmfgraph#Branch"/> |
4978 | </ownedChild> |
4979 | @@ -54,6 +54,10 @@ |
4980 | <linkMetaFeature |
4981 | xsi:type="ecore:EReference" |
4982 | href="algorithm.ecore#//Block/next"/> |
4983 | + <creationConstraints> |
4984 | + <targetEnd |
4985 | + body="self<>oppositeEnd"/> |
4986 | + </creationConstraints> |
4987 | </links> |
4988 | <links> |
4989 | <labelMappings |
4990 | @@ -63,12 +67,16 @@ |
4991 | </labelMappings> |
4992 | <tool |
4993 | xsi:type="gmftool:CreationTool" |
4994 | - href="flowchart.gmftool#//@palette/@tools.0/@tools.4"/> |
4995 | + href="flowchart.gmftool#//@palette/@tools.1/@tools.2"/> |
4996 | <diagramLink |
4997 | href="flowchart.gmfgraph#BranchTrue"/> |
4998 | <linkMetaFeature |
4999 | xsi:type="ecore:EReference" |
5000 | href="algorithm.ecore#//Branch/true"/> |
The diff has been truncated for viewing.