Changes for page KIELER Lightweight Diagrams
Last modified by Soeren Domroes on 2025/01/30 12:04
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -20,13 +20,13 @@ 20 20 1. Let your diagram synthesis create a node for each state declared in your state machine. 21 21 1*. Let those node be depicted by ellipses or rounded rectangles containing a text field showing the corresponding state's name 22 22 1*. Add some space around the text by trying out all of 23 -1**. {{code language="none"}}setSurroundingSpace(...){{/code}}24 -1**. {{code language="none"}}setAreaPlacementData().from(LEFT, ..., ..., TOP, ..., ...).to(RIGHT, ..., ..., BOTTOM, ..., ...){{/code}}, as well as23 +1**. setSurroundingSpace(...), as well as 24 +1**. setAreaPlacementData().from(LEFT, ..., ..., TOP, ..., ...).to(RIGHT, ..., ..., BOTTOM, ..., ...) 25 25 1**. ((( 26 26 (% class="p1" %) 27 -(% class="s2" %)setPointPlacementData(% class="s3" %)LEFT(% class="s4" %)00.5f(% class="s3" %)TOP(% class="s4" %)00.5f(% class="s3" %)H_CENTRALV_CENTRAL(% class="s4" %)0 000{{codelanguage="none"}}(,,,,,,, , 1, 1, ,){{/code}}27 +(% class="s2" %)setPointPlacementData(%%)((% class="s3" %)LEFT(%%), (% class="s4" %)0(%%), (% class="s4" %)0.5f(%%), (% class="s3" %)TOP(%%), (% class="s4" %)0(%%), (% class="s4" %)0.5f(%%), (% class="s3" %)H_CENTRAL(%%), (% class="s3" %)V_CENTRAL(%%), 1(% class="s4" %)0(%%), 1(% class="s4" %)0(%%), (% class="s4" %)0(%%), (% class="s4" %)0(%%)); 28 28 ))) 29 -1*. Make yourself familiarwith all of that opportunities, play around with the parameters to figure out their effects!29 +1*. Make yourself with all of that opportunities, play around with the parameters to figure out their effects! 30 30 \\ 31 31 1. Let your diagram synthesis create an edge for each transition being depicted by a polyline 32 32 1*. Attach arrow decorators to those polylines. ... ... @@ -37,8 +37,8 @@ 37 37 1. The actor nodes in {{code language="none"}}UML2UseCaseDiagramSynthesis{{/code}} are equipped with (node) labels. This is done by means of a convenience method provided {{code language="none"}}KLabelExtensions{{/code}}. 38 38 1*. Equip the edges of your turing diagrams with labels exhibiting the guard, new symbol, etc; use a fitting method for edge labels from {{code language="none"}}KLabelExtensions{{/code}}. 39 39 1. Improve the layout of your diagrams 40 -1 *. switch the layout algorithm to Graphviz {{code language="none"}}dot{{/code}} by setting the layout option //LayoutOptions//{{code language="none"}}.ALGORITHM{{/code}} on the root node to {{code language="none"}}de.cau.cs.kieler.graphviz.dot{{/code}}.41 -1 *. change the edge figures from polylines to splines.40 +11. switch the layout algorithm to Graphviz {{code language="none"}}dot{{/code}} by setting the layout option //LayoutOptions//{{code language="none"}}.ALGORITHM{{/code}} on the root node to {{code language="none"}}de.cau.cs.kieler.graphviz.dot{{/code}}. 41 +11. change the edge figures from polylines to splines. 42 42 43 43 = Introduce synthesis and layout options = 44 44 ... ... @@ -59,43 +59,6 @@ 59 59 11*. What is the effect of the {{code language="none"}}1{{/code}}? 60 60 11. add polylines acting as separators of the above figure elements 61 61 62 - =Manipulate displayed diagrams =62 + 63 63 64 -KLighD diagrams provide interactivity by allowing to link action to KRenderings 65 - 66 -1. add a {{code language="none"}}KAction{{/code}} to the title text of node representing the turing machine by calling 67 -{{code language="none"}}text.addAction({{/code}}{{code language="none"}}Trigger::DOUBLECLICK, KlighdConstants::ACTION_COLLAPSE_EXPAND){{/code}} 68 -1*. observe the effect and enjoy 69 -1. Implement your own action 70 -1*. have a look at {{code language="none"}}de.cau.cs.kieler.klighd.actions.CollapseExpandAction{{/code}} and its registration in the corresponding {{code language="none"}}plugin.xml{{/code}} 71 -1*. implement an own {{code language="none"}}IAction{{/code}} that manipulates the current diagram by changing colors, adding or removing elements, hiding and showing single nodes or edges, ... , and register it 72 -1*. associate it with a diagram part of your choice and test it 73 -1. Run your action via a menu contribution 74 -1*. ((( 75 -copy the following snippet into a {{code language="none"}}plugin.xml{{/code}} of your projects, replace{{code language="none"}} ##YOUR_PLUGINS_ID##{{/code}} and {{code language="none"}}##YOUR_ACTIONS_ID##{{/code}} by the corresponding strings 76 - 77 -{{code}} 78 - <extension 79 - id="##YOUR_PLUGINS_ID##.internal.commands.handler" 80 - point="org.eclipse.ui.menus"> 81 - <menuContribution 82 - allPopups="false" 83 - locationURI="toolbar:de.cau.cs.kieler.layout.toolbar"> 84 - <command 85 - commandId="de.cau.cs.kieler.klighd.ui.actionExecution" 86 - label="TestContribution" 87 - style="push"> 88 - <parameter 89 - name="de.cau.cs.kieler.klighd.ui.action" 90 - value="##YOUR_ACTIONS_ID##"> 91 - </parameter> 92 - </command> 93 - </menuContribution> 94 - </extension> 95 - 96 -{{/code}} 97 -))) 98 -1*. change {{code language="none"}}##YOUR_PLUGINS_ID##{{/code}} part of{{code language="none"}} {{/code}}the label, enter your action's id ({{code language="none"}}##YOUR_ACTIONS_ID##{{/code}}), feel free to put it at a different location, e.g. the context menu 99 -1*. test it by selecting a diagram node or edge and hitting your menu entry 100 - 101 101
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 107512311 +8651139 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 10751231/Student Tutorial on KIELER Lightweight Diagrams1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/8651139/Student Tutorial on KIELER Lightweight Diagrams