Changes for page Infrastructure for Meta Layout (KIML)
Last modified by Richard Kreissig on 2023/09/14 10:13
From version 33.1
edited by arl
on 2016/11/04 21:05
on 2016/11/04 21:05
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. arl1 +XWiki.cds - Content
-
... ... @@ -1,14 +1,17 @@ 1 1 {{panel borderStyle="dashed" title="Project Overview"}} 2 +Responsible: 3 + 4 +* {{mention reference="XWiki.msp" style="FULL_NAME" anchor="XWiki-msp-kmQOH"/}} 5 + 2 2 Related Publications: 3 3 4 -* Miro Spönemann, Hauke Fuhrmann, and Reinhard von Hanxleden. //Automatic Layout of Data Flow Diagrams in KIELER and Ptolemy II//. Technical Report 0914, Christian-Albrechts-Universität zu Kiel, Department of Computer Science, 2009. ([[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/papers/report-0914.pdf||shape="rect"]] / [[bib>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/cgi-bin/bibcgi.cgi?key=SpoenemannFvH09||shape="rect"]]) 5 -* Hauke Fuhrmann, Miro Spönemann, Michael Matzen, and Reinhard von Hanxleden. Automatic layout and structure-based editing of UML diagrams. In //Proceedings of the 1st Workshop on Model Based Engineering for Embedded Systems Design// (M-BED'10), Dresden, 2010. ([[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/papers/mbed10.pdf||shape="rect"]] / [[bib>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/cgi-bin/bibcgi.cgi?key=FuhrmannSM+10||shape="rect"]]) 6 -* Christian Schneider, Miro Spönemann, and Reinhard von Hanxleden. Transient view generation in Eclipse. In //Proceedings of the First Workshop on Academics Modeling with Eclipse//, Kgs. Lyngby, Denmark, 2012. ([[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/papers/acme12.pdf||shape="rect"]] / [[bib>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/cgi-bin/bibcgi.cgi?key=SchneiderSvH12a||shape="rect"]]) 7 -* Miro Spönemann, Christoph Daniel Schulze, Christian Motika, Christian Schneider, and Reinhard von Hanxleden. KIELER: Building on Automatic Layout for Pragmatics-Aware Modeling (Showpiece). In //Proceedings of the IEEE Symposium on Visual Languages and Human-Centric Computing// (VL/HCC’13), San Jose, CA, USA, 15–19 September 2013. ([[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/papers/vlhcc13-showpiece.pdf||shape="rect"]] / [[bib>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/cgi-bin/bibcgi.cgi?key=SpoenemannSM+13||shape="rect"]]) 8 +* (% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)Miro Spönemann, Hauke Fuhrmann, and Reinhard von Hanxleden. //Automatic Layout of Data Flow Diagrams in KIELER and Ptolemy II//. Technical Report 0914, Christian-Albrechts-Universität zu Kiel, Department of Computer Science, 2009. ((% style="color: rgb(0,0,0);" %)[[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/papers/report-0914.pdf||shape="rect"]](% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %) / (% style="color: rgb(0,0,0);" %)[[bib>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/cgi-bin/bibcgi.cgi?key=SpoenemannFvH09||shape="rect"]]) 9 +* (% style="color: rgb(0,0,0);" %)Hauke Fuhrmann, Miro Spönemann, Michael Matzen, and Reinhard von Hanxleden. Automatic layout and structure-based editing of UML diagrams. In (% class="cmti-10" %)//Proceedings of the 1st Workshop on Model Based//(%%)// (% class="cmti-10" %)Engineering for Embedded Systems Design (M-BED'10)//(%%), Dresden, 2010. ((%%)[[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/papers/mbed10.pdf||shape="rect"]] (% style="color: rgb(0,0,0);" %)/ (%%)[[bib>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/cgi-bin/bibcgi.cgi?key=FuhrmannSM+10||shape="rect"]]) 10 +* (% style="color: rgb(0,0,0);" %)Christian Schneider, Miro Spönemann, and Reinhard von Hanxleden. Transient view generation in Eclipse. In (% class="cmti-10" %)//Proceedings of the First//(%%)// (% class="cmti-10" %)Workshop on Academics Modeling with Eclipse//(%%), Kgs. Lyngby, Denmark, 2012. ((%%)[[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/papers/acme12.pdf||shape="rect"]] /(% style="color: rgb(0,0,0);" %) (%%)[[bib>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/cgi-bin/bibcgi.cgi?key=SchneiderSvH12a||shape="rect"]]) 8 8 9 9 Related Theses: 10 10 11 -* Björn Duderstadt, //Evolutionary Meta Layout for KIELER//, May 2011 ([[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/theses/bdu-st.pdf||shape="rect" class="extTarget"]]) 14 +* (% style="color: rgb(0,0,0);" %)Björn Duderstadt, //Evolutionary Meta Layout for KIELER//, May 2011 ((%%)[[pdf>>url:http://rtsys.informatik.uni-kiel.de/~~biblio/downloads/theses/bdu-st.pdf||style="text-decoration: none;" shape="rect" class="extTarget"]](% style="color: rgb(0,0,0);" %)) 12 12 {{/panel}} 13 13 14 14 ... ... @@ -19,20 +19,18 @@ 19 19 20 20 {{toc maxLevel="2"/}} 21 21 22 -= Getting Started = 25 += Getting Started[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#GettingStarted||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] = 23 23 24 -This subproject deals with the automatic layout of graph-based models. KIML offers interfaces to connect layout algorithms to diagram editors and viewers. The focus is on flexible configurability, which is a crucial issue for creating good layouts for different graphical languages and in different circumstances. The term //meta layout// relates to the idea of specifying the layout of a diagram on an abstract level, while //concrete layout// information is c omputed by layout algorithms.27 +This subproject deals with the automatic layout of graph-based models. KIML offers interfaces to connect layout algorithms to diagram editors and viewers. The focus is on flexible configurability, which is a crucial issue for creating good layouts for different graphical languages and in different circumstances. The term //meta layout// relates to the idea of specifying the layout of a diagram on an abstract level, while //concrete layout// information is calculated by layout algorithms. 25 25 26 26 In order to use KIML with your own GMF-based editor, you need to do the following steps: 27 27 28 -1. Install the "//KIELER Layout for GMF//" feature from our update site, see [[Downloads>>url:http://www. rtsys.informatik.uni-kiel.de/en/research/kieler/||shape="rect"]]31 +1. Install the "//KIELER Layout for GMF//" feature from our update site, see [[Downloads>>url:http://www.informatik.uni-kiel.de/en/rtsys/kieler/downloads/||shape="rect"]] 29 29 1*. It includes the Java-based layout algorithms developed in the [[KLay project>>doc:Layout Algorithms (KLay)]]. 30 30 1. Open a diagram and press the layout button [[image:attach:kieler-arrange.gif]] or use the shortcut Ctrl+R L. 31 31 32 - Similarly,the"//KIELER Layout forGraphiti//" feature provides the KIML interface toGraphiti-based editors.35 +=== Terminology === 33 33 34 -== Terminology == 35 - 36 36 //**Layout Graph**// 37 37 38 38 * Internal representation of the graph structure of the current diagram, built on the [[KGraph>>doc:KGraph Meta Model]] model. ... ... @@ -51,20 +51,12 @@ 51 51 52 52 **//Layout Configurator//** 53 53 54 -* A component that is responsible for retrieving specific layout option values for model element s.55 +* A component that is responsible for retrieving specific layout option values for each model element. 55 55 56 56 **//Layout Data//** 57 57 58 58 * Concrete layout data (position and size) and abstract layout data (layout options) attached to elements of the layout graph using the [[KLayoutData>>doc:KLayoutData Meta Model]] model. 59 59 60 -//**Layout Meta Data**// 61 - 62 -* Meta information on layout algorithms, layout options, etc. gathered through extension points. 63 - 64 -//**Meta Layout**// 65 - 66 -* The process of creating abstract layout data (configuration of layout options) through layout configurators. In a more general sense, also used for the whole layout infrastructure. 67 - 68 68 **//Layout Type//** 69 69 70 70 * Classification of layout algorithms depending on their basic approach (e.g. layered, force, etc.). ... ... @@ -77,28 +77,22 @@ 77 77 78 78 * The central interface for connecting diagram editors with layout algorithms. 79 79 80 -// **DiagramLayoutEngine**//73 += User Interface[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#UserInterface||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] = 81 81 82 - *Asingletonclassfor invokinglayout algorithmsondiagramviewers andeditors.75 +The main user interface element of KIML is the command to layout the current diagram. This command is availabe in the main KIELER menu, in the toolbar ([[image:attach:kieler-arrange.gif]]), or using the Ctrl+R L shortcut. Additionally, an entry in the context menu allows to layout only a selected part of the diagram. 83 83 84 -= UserInterface =77 +== Layout View[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#LayoutView||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] == 85 85 86 -The main user interface element of KIML is the command to layout the current diagram. This command is available in the toolbar ([[image:attach:kieler-arrange.gif]]) or using the Ctrl+R L shortcut. Additionally, an entry in the context menu allows to layout only a selected part of the diagram. 87 - 88 -== Layout View == 89 - 90 90 [[image:attach:layout_view.png]] 91 91 92 92 The //Layout// view allows flexible customization of layout options for the selected objects in the diagram. If no object is selected, the view shows the options for the top-level container of the diagram. Options are stored persistently in the notation model of the diagram, so that they are still available after the next Eclipse restart. Of course this requires the diagram to be saved after an option was changed. 93 93 94 -The options can be grouped according to the function of the selected object. The groups//Node,// //Edge//, //Port//,and//Label//contain options related to the object itself, such as its size or priority, while the groups//Graph// and//Subgraph//contain options for the elements contained in the selected object, such as the applied layout algorithm or the spacing between elements. Which layout options are displayed depends on the types of selected objects and the active layout algorithm, since each algorithm supports only a subset of the available options. Furthermore, some options are only visible if the //Show Advanced Properties// button in the view toolbar is activated. The group types can be hidden using the //Show Categories// button.83 +The options are grouped according to the function of the selected objects. The group //Nodes// (respectively //Edges//, //Ports//, or //Labels//) contains options related to the object itself, such as its size or priority, while the group //Parents// contains options for the elements contained in the selected objects, such as the applied layout algorithm or the spacing between elements. Which layout options are displayed depends on the types of selected objects and the active layout algorithm, since each algorithm supports only a subset of the available options. Furthermore, some options are only visible if the //Show Advanced Properties// button in the view toolbar is activated. The group types can be hidden using the //Show Categories// button. 95 95 96 96 An option can be changed by selecting or entering a new value in the corresponding cell of the //Value// column. The most important option is //Layout Algorithm//, which is used to determine the layout algorithm for the contents of the selected element. Here either a specific layout algorithm or a layout type can be chosen; in the latter case, the most suitable layout algorithm of the given type is taken. By changing the active layout algorithm, the content of the layout view is updated to display only those options that are supported by the new layout algorithm. 97 97 98 98 Selecting //Restore Default Value// in the context menu or the view toolbar removes any value for the currently selected option that is stored in the current model file, thus resetting the option to its default value. The view menu has an entry //Remove all Layout Options// which resets all options of the current model by removing persistent data in the model file. 99 99 100 -The standard layout options defined in KIML are documented in [[doc:KIML Layout Options]]. However, layout algorithms may define additional layout options. 101 - 102 102 [[image:attach:context_menu.png]] 103 103 104 104 The context menu for a specific layout option has different alternatives to set the currently active value as default value: //Set as Default for this Diagram// changes the open model file so that the same value is applied to all similar objects of that model. //Set as Default for ... in this Context// applies the value to all similar objects that are displayed with the same diagram editor (the option is linked to the //edit part// class of the selected object). Choosing //Set as Default for all ...// links the option value with the domain model element or diagram type of the selected object (see the context menu depicted above). These four alternatives have different priorities: if present, the default value for the current diagram is taken first, then the default value for the edit part is checked, then the default value for the domain model element, and then the default value for the diagram type. ... ... @@ -105,57 +105,92 @@ 105 105 106 106 The information button of the view toolbar can be used to display some useful details on the current selection, such as the edit part and domain model classes. 107 107 108 -== Preference Page == 95 +== Preference Page[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#PreferencePage||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] == 109 109 110 -[[image:attach:preference _page.png]]97 +[[image:attach:preferences.png]] 111 111 112 -// Animatelayout//enables animationofthetransition ofthe old layouttothe newlayoutwhenever the layout isrecomputed.99 +If //Set routing style of all edges to oblique// is active, all routing styles and smoothness settings of edges are removed when automatic layout is performed. Since most layouters compute the routing of edges as part of their algorithm, these styles usually do not yield the expected results. 113 113 114 - Automaticzoomingcan be enabled with //Zoom to fit after layout//.101 +The //Default Layout Option Values// table is used to manage the default setting for layout options, which can also be modified with the context menu of the layout view (see above). All user-defined settings are displayed here, and the buttons on the right of the table serve to create, edit, and remove entries. The //Type// column shows the type of element the option is linked with: either //edit part//,//model element//, or //diagram type//. The //Element// column shows the class name for options that relate to edit parts or domain model elements, and the diagram type name for options that relate to diagram types. //Option// is the name of the layout option, and //Value// is the currently set value of the option. 115 115 116 - If//Showlayoutprogress//is active,a progressdialog is shownduring the computationoflayouts.103 +Creating a new entry requires the selection of the type of related element and entering its class name or identifier. Class names of edit parts and domain model elements can be explored using the information button of the layout view, while diagram type identifiers can be selected with the //Browse// button. After that, a layout option has to be selected from the list using the corresponding //Browse //button. Hitting //OK// creates an entry, and its value can then be set using the //Edit// button. 117 117 118 - If //Obliqueedge routing// is active,allrouting stylesand smoothness settings of edges are removed when automatic layoutisperformed on GMF editors. Since most layouters compute the routing of edgesas part of their algorithm, these styles usually do not yield the expected results.105 += Special Layout Options = 119 119 120 - The option//Debug graphoutput//is usedfordebugging,asthenamesuggests.Itwrites thelayoutgraphofeachlayoutcomputation toafile inthecurrentuser'shomedirectory.107 +While most layout options are used to affect how the active layout algorithm computes concrete coordinates for the graph elements, there are some layout options that have a special role in KIML. 121 121 122 - The //DefaultLayoutOption Values// table is used to manage the default setting for layout options, which can also be modified with the context menu of the layout view (see above).All user-defined settings are displayed here, and the buttons on therightof the table serve to create, edit, and removeentries. The //Type// column shows the type of element the option is linked with: either //Diagram Part//, //Model Element//, or //Diagram Type//. The //Element// column shows the class name for options that relate to diagram parts (i.e. edit parts) or domain model elements, and the diagram type name for options that relate to diagram types. //Option// is the name of the layout option, and //Value// is the currently set value of the option.109 +== Layout Algorithm == 123 123 124 - Creatinga new entry requirestheselection ofthetypeofrelatedelementand enteringitsclass name oridentifier.Classnamesofdiagrampartsand domain modelelementscan be exploredusingthe informationbutton ofthelayoutview, while diagram type identifierscan be selected with the //Browse// button. Afterthat,alayoutoption hasto be selectedfromthelistusingthecorresponding //Browse //button.Hitting //OK// createsan entry,anditsvalue can then be set using the//Edit// button.111 +The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for the content of a composite node. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied. 125 125 126 - =ProgrammingInterface=113 +The following layout types are predefined: 127 127 128 -The primary API of KIML is the [[DiagramLayoutEngine>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml.service/src/de/cau/cs/kieler/kiml/service/DiagramLayoutEngine.java||shape="rect"]], which is responsible for analyzing diagrams, creating a [[KGraph>>doc:KGraph Meta Model]] structure, configuring and executing the layout algorithms, and writing new position information back to the diagram. It is invoked with 115 +* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points. 116 +* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method. 117 +* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. 118 +* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph. 119 +* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type. 129 129 130 -{{code language="java" theme="Eclipse"}} 131 -DiagramLayoutEngine.INSTANCE.layout(workbenchPart, diagramPart) 132 -{{/code}} 121 +=== Available Algorithms and Libraries === 133 133 134 -where {{code language="none"}}workbenchPart{{/code}} is the Eclipse editor part or view part whose content shall be processed, and {{code language="none"}}diagramPart{{/code}} is a further reference to which part of the diagram the layout shall be applied (may be {{code language="none"}}null{{/code}}). 123 +* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and edge labels. 124 +* **Randomizer** - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph. 125 +* ((( 126 +**Box Layout** - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions. 127 +))) 128 +* **Fixed Layout** - Does not compute a new layout, but leaves all nodes and edges where they are. If the Position and Bend Points options are set for the elements of the graph, the pre-defined layout is applied. 129 +* **OGDF** ((% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)[[www.ogdf.net>>url:http://www.ogdf.net/||shape="rect"]](%%)) - A self-contained C++ class library for the automatic layout of diagrams. The version that is shipped with KIELER is compiled as an executable that reads files in OGML format and outputs the computed concrete layout. 130 +* **Graphviz** ([[www.graphviz.org>>url:http://www.graphviz.org/||shape="rect"]]) - An open source graph visualization tool with several graph layout programs, web and interactive graphical interfaces, auxiliary tools, libraries, and language bindings. Graphviz needs to be installed separately in order to be used within KIELER, since it is called in a separate process using the DOT language for communication. 135 135 136 - Anoverview of the internalstructureof KIML is given in the following.132 +== Diagram Type == 137 137 138 - [[~[~[image:attach:kiml-overview.png~]~]>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/files/documentation/kiml-structure.png||style="text-decoration:none;"shape="rect"]]134 +Diagram types are used to classify graphical diagrams for setting default layout option values for a set of similar diagrams. The diagram type of an element is specified with the layout option {{code language="none"}}de.cau.cs.kieler.diagramType{{/code}}. Layout algorithms can declare which diagram types they support well, and give a priority value for each supported type. KIML decides at runtime which layout algorithm has the highest priority for a given diagram, so that the most suitable algorithm is always used. Usual values for such priorities are between 1 and 10, where the highest value should only be assigned if the algorithm is especially designed for diagrams of the respective type, or if it has proven to be very adequate for them. Lower values should be given if the algorithm is able to draw the diagrams correctly, but with lower quality of the resulting layout. 139 139 140 -The interactionwiththediagrameditor or viewer is handled by//layout managers//, representedby [[IDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml.service/src/de/cau/cs/kieler/kiml/service/IDiagramLayoutManager.java||shape="rect"]] implementations, explained with more detail below.136 +The following diagram types are predefined: 141 141 142 -The configuration of automatic layout is done by the [[LayoutOptionManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml.service/src/de/cau/cs/kieler/kiml/service/LayoutOptionManager.java||shape="rect"]], which iterates over all graph elements and applies a set of layout configurators, represented by the interface [[ILayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/config/ILayoutConfig.java||shape="rect"]]. Layout configurators analyze the context of each graph element and set specific values for some layout options. More information on layout configuration is available on [[doc:Configuring Automatic Layout]]. 138 +* **General** - This type is automatically assigned to all diagrams for which no specific type is declared. A layout algorithm that has the highest priority on the //General// diagram type is taken as the default algorithm when no further information on a diagram is available to KIML. 139 +* **State Machine** - All kinds of state machines, automata, and activity diagrams. Examples: [[doc:SCCharts SyncCharts]], UML Activity diagrams. 140 +* **Data Flow Diagram** - Actor-oriented diagrams, where connections are mostly done between //ports// of nodes. These diagrams can only be handled properly by very special layout algorithms, such as those developed in the [[KLay project>>doc:Layout Algorithms (KLay)]]. 141 +* **Class Diagram** - Class diagrams such as Ecore diagrams for the [[EMF>>url:http://www.eclipse.org/modeling/emf/||shape="rect"]] or UML Class diagrams. 142 +* **Use Case Diagram** - Use case diagrams as defined by the UML. 143 +* **Unconnected Boxes** - Sets of nodes that have no connections and are treated as resizable boxes. This is related to mathematical [[packing problems>>url:http://en.wikipedia.org/wiki/Packing_problem||shape="rect"]]. Example: Regions in [[doc:SCCharts SyncCharts]].\\ 143 143 144 - Hierarchically structured graphs are handled by the [[RecursiveGraphLayoutEngine>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/RecursiveGraphLayoutEngine.java||shape="rect"]],which executes layout algorithms separatelyon each hierarchy level, starting with the innermost levels. The actual layout computationsare performed by subclasses of [[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/AbstractLayoutProvider.java||shape="rect"]], which are registered with the {{code language="none"}}layoutProviders{{/code}} extension point.145 +== Other Options == 145 145 146 -The singleton class [[LayoutMetaDataService>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/LayoutMetaDataService.java||shape="rect"]] is used to access the available layout algorithms, layout options, diagram types, layout types, and stored option values. Similarly, there are other service classes for accessing the meta data managed by KIML. Meta data are stored in XML format according to the extension points mechanism of Eclipse. 147 +* **Layout Hierarchy** ({{code language="none"}}de.cau.cs.kieler.layoutHierarchy{{/code}}) - If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution. 148 +* **Hypernode** ({{code language="none"}}de.cau.cs.kieler.hypernode{{/code}}) - A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models. 149 +* **Comment Box** ({{code language="none"}}de.cau.cs.kieler.commentBox{{/code}}) - A node that is marked as comment box is treated as a label that needs to be placed somewhere. This is different to normal node labels, which are usually regarded as fixed. 150 +* **No Layout** ({{code language="none"}}de.cau.cs.kieler.noLayout{{/code}}) - Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements. 147 147 148 - KIMLmakes extensiveuse ofthe[[IPropertyHolder>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/IPropertyHolder.java||shape="rect"]] interface; a //property holder// isanobjectthat can giveandreceive values for specific properties. The key for specifying which property toaccess is [[IProperty>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/IProperty.java||shape="rect"]], which is usually instanced exactly oncefor each property. The layoutdata classes [[KShapeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KShapeLayout.java||shape="rect"]] and [[KEdgeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KEdgeLayout.java||shape="rect"]] areproperty holders, which means that they can storelayout option valuesfor the graph elementstheyare connected with.152 += Internal Structure[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#InternalStructure||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] = 149 149 150 -= =ConnectingLayoutAlgorithms ==154 +The primary public interface of KIML is the [[DiagramLayoutEngine>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/diagram/DiagramLayoutEngine.java||shape="rect"]], which is responsible for analyzing diagrams, creating a [[KGraph>>doc:KGraph Meta Model]] structure, configuring and executing the layout algorithms, and writing new position information back to the diagram. The interaction with the diagram editor or viewer is handled by [[IDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/diagram/IDiagramLayoutManager.java||shape="rect"]] implementations. 151 151 152 - Layoutalgorithmsmustbe connectedbyextending[[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/AbstractLayoutProvider.java||shape="rect"]]. Theinput of [[t>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/AbstractLayoutProvider||style="text-decoration:none;"rel="nofollow"shape="rect" class="missing wiki"]]he{{codelanguage="none"}}doLayout{{/code}}method is aninstance of the [[KGraph>>doc:KGraphMetaModel]], an [[EMF>>url:http://www.eclipse.org/modeling/emf/||shape="rect"]] basedgraphstructure,togetherwith a progressmonitor ([[IKielerProgressMonitor>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/alg/IKielerProgressMonitor.java||shape="rect"]]).The graph is represented bya [[KNode>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.core.kgraph/src/de/cau/cs/kieler/core/kgraph/KNode.java||shape="rect"]],which serves as top-level container. The contained graph elements initially have attached[[KShapeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KShapeLayout.java||shape="rect"]]or [[KEdgeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KEdgeLayout.java||shape="rect"]]with informationonthe original layout ofthediagramas wellas anabstractlayoutspecifiedby layoutoptions.The layoutprovider should considerlayout optionsfrom theattachedlayout data,execute a layout algorithm, and writetheconcreteresults back to the layout data. Agoodexample foralayoutproviderimplementationis [[LayeredLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.klay.layered/src/de/cau/cs/kieler/klay/layered/LayeredLayoutProvider.java||shape="rect"]].156 +The meta layout configuration is done by the [[LayoutOptionManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/service/LayoutOptionManager.java||shape="rect"]], which iterates over all graph elements and applies a set of layout configurators, represented by the interface [[ILayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/config/ILayoutConfig.java||shape="rect"]]. Layout configurators analyze the context of each graph element and set specific values for some layout options. Layout options are defined with the extension point {{code language="none"}}layoutProviders{{/code}}. The most relevant layout configurators are listed in the following, with increasing priority. 153 153 154 -The {{code language="none"}}layoutProviders{{/code}} extension point is needed to register layout algorithms; one layout provider class may provide multiple layout algorithms by giving a parameter string in the extension point. The extension point allows to attach information on known layout options, supported diagram types, and supported graph features to a layout algorithm. The known layout options are those that are offered in the Layout view when the respective algorithm is selected. The supported diagram types are used to automatically select the most suitable algorithm for a specific diagram type: from all algorithms that state to support a given type, the one with the highest priority is taken. The supported graph features are used to state which special features that a graph can contain can be handled by the algorithm; examples for such features are edge labels, ports, or clusters. Furthermore, the extension point can be used to specify new layout options, layout types, and categories of layout algorithms. 158 +* [[DefaultLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/config/DefaultLayoutConfig.java||shape="rect"]] - fixed default values of layout options and layout algorithms. 159 +* [[EclipseLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/service/EclipseLayoutConfig.java||shape="rect"]] - user defined default values for edit parts, domain model elements, or diagram types; contributed by the preference page or the layoutInfo{{code language="none"}}{{/code}} extension point. 160 +* [[SemanticLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/config/SemanticLayoutConfig.java||shape="rect"]] - abstract superclass for configurators that react on specific properties of the domain model. 161 +* [[GmfLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.gmf/src/de/cau/cs/kieler/kiml/gmf/GmfLayoutConfig.java||shape="rect"]] / [[GraphitiLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.graphiti/src/de/cau/cs/kieler/kiml/graphiti/GraphitiLayoutConfig.java||shape="rect"]] - option values selected in the Layout view and stored in the notation model file of a diagram. 162 +* [[VolatileLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/config/VolatileLayoutConfig.java||shape="rect"]] - key-value mapping created for a single layout run. This is helpful for configuring layout from the [[view management>>doc:View Management (KIVi)]]. 155 155 156 - Eachlayoutoption that isregisteredin the extension point needs a corresponding constantin Java code, wherethe most relevantdata is replicatedwitha[[Property>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/Property.java||shape="rect"]]constantfor easy usein theimplementationoflayout algorithms.KIMLcomeswithalarge setof [[built-inlayoutoptions>>doc:KIMLLayoutOptions]],whichareall definedin[[LayoutOptions>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/options/LayoutOptions.java||shape="rect"]].Layout providerscanaccessthelayout option valuesusingthe[[IPropertyHolder>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/IPropertyHolder.java||shape="rect"]]interface:164 +Hierarchically structured graphs are handled by the [[RecursiveGraphLayoutEngine>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/RecursiveGraphLayoutEngine.java||shape="rect"]], which executes layout algorithms separately on each hierarchy level, starting with the innermost levels. The actual layout computations are performed by subclasses of [[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/AbstractLayoutProvider.java||shape="rect"]], which are registered with the {{code language="none"}}layoutProviders{{/code}} extension point. 157 157 158 -{{code language="java" theme="Eclipse"}} 166 +[[~[~[image:url:http://rtsys.informatik.uni-kiel.de/~~~~kieler/files/documentation/kiml-structure.png~]~]>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/files/documentation/kiml-structure.png||style="text-decoration: none;" shape="rect"]] 167 + 168 +The singleton class [[LayoutDataService>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/LayoutDataService.java||shape="rect"]] is used to access the available layout algorithms, layout options, diagram types, layout types, and stored option values. Similarly, there are other service classes for accessing the meta data managed by KIML. 169 + 170 +KIML makes extensive use of the [[IPropertyHolder>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/IPropertyHolder.java||shape="rect"]] interface; a //property holder// is an object that can give and receive values for specific properties. The key for specifying which property to access is [[IProperty>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/IProperty.java||shape="rect"]], which is usually instanced exactly once for each property. The layout data classes [[KShapeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KShapeLayout.java||shape="rect"]] and [[KEdgeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KEdgeLayout.java||shape="rect"]] are property holders, which means that they can store layout option values for the graph elements they are connected with. 171 + 172 +== Connecting Layout Algorithms[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#ConnectingLayoutAlgorithms||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] == 173 + 174 +Layout algorithms must be connected by extending [[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/AbstractLayoutProvider.java||shape="rect"]]. The input of [[t>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/AbstractLayoutProvider||rel="nofollow" style="text-decoration: none;" shape="rect" class="missing wiki"]]he {{code language="none"}}doLayout{{/code}} method is an instance of the [[KGraph>>doc:KGraph Meta Model]], an [[EMF>>url:http://www.eclipse.org/modeling/emf/||shape="rect"]] based graph structure, together with a progress monitor ([[IKielerProgressMonitor>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/alg/IKielerProgressMonitor.java||shape="rect"]]). The graph is represented by a [[KNode>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core.kgraph/src/de/cau/cs/kieler/core/kgraph/KNode.java||shape="rect"]], which serves as top-level container. The contained graph elements initially have attached [[KShapeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KShapeLayout.java||shape="rect"]] or [[KEdgeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KEdgeLayout.java||shape="rect"]] with information on the original layout of the diagram as well as an abstract layout specified by layout options. The layout provider should consider layout options from the attached layout data, execute a layout algorithm, and write the concrete results back to the layout data. A good example for a layout provider implementation is [[LayeredLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.klay.layered/src/de/cau/cs/kieler/klay/layered/LayeredLayoutProvider.java||shape="rect"]]. 175 + 176 +The {{code language="none"}}layoutProviders{{/code}} extension point is needed to register layout algorithms; one layout provider class may provide multiple layout algorithms by giving a parameter string in the extension point. The extension point allows to attach information on known layout options, supported diagrams types, and supported graph features to a layout algorithm. The known layout options are those that are offered in the Layout view when the respective algorithm is selected. The supported diagram types are used to automatically select the most suitable algorithm for a specific diagram type: from all algorithms that state to support a given type, the one with the highest priority is taken. The supported graph features are used to state which special features that a graph can contain can be handled by the algorithm; examples for such features are edge labels, ports, or clusters. Furthermore, the extension point can be used to specify new layout options, layout types, and categories of layout algorithms. 177 + 178 +Each layout option that is registered in the extension point needs a corresponding constant in Java code, where the most relevant data is replicated with a [[Property>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/Property.java||shape="rect"]] constant for easy use in the implementation of layout algorithms. KIML comes with a large set of built-in layout options, which are all defined in [[LayoutOptions>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/options/LayoutOptions.java||shape="rect"]]. Layout providers can access the layout option values using the [[IPropertyHolder>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/IPropertyHolder.java||shape="rect"]] interface: 179 + 180 +{{code theme="Eclipse" language="java"}} 159 159 KShapeLayout nodeLayout = parentNode.getData(KShapeLayout.class); 160 160 boolean isInteractive = nodeLayout.getProperty(LayoutOptions.INTERACTIVE); 161 161 {{/code}} ... ... @@ -164,12 +164,12 @@ 164 164 165 165 The layout option that is used in this example has a default value, thus it is guaranteed that the option always returns a valid value. This and the fact that properties are type-safe allows us to implicitly cast and unbox the returned value to a {{code language="none"}}boolean{{/code}} without checking for NullPointerExceptions or ClassCastExceptions. 166 166 167 -== Connecting Diagram Editors == 189 +== Connecting Diagram Editors[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#ConnectingDiagramEditors||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] == 168 168 169 - (% style="line-height: 1.4285715;" %)The transformation ofinput diagrams to[[KGraph>>doc:KGraphMetaModel]]instancesaswellasthetransferofcomputedlayoutsback totheinputdiagramsis doneby(%%)[[IDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/diagram/IDiagramLayoutManager.java||style="line-height:1.4285715;" shape="rect"]](%style="line-height:1.4285715;" %) implementations. Formostdiagram editorsthat arebasedon (%%)[[GMF>>url:http://www.eclipse.org/modeling/gmp/||style="line-height:1.4285715;" shape="rect"]](%style="line-height: 1.4285715;"%) thegeneric (%%)[[GmfDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml.gmf/src/de/cau/cs/kieler/kiml/gmf/GmfDiagramLayoutManager.java||shape="rect"]](%style="line-height:1.4285715;"%)canbeused,while for(%%)[[Graphiti>>url:http://www.eclipse.org/graphiti/||style="line-height:1.4285715;"shape="rect"]](%style="line-height:1.4285715;"%)thereisthegeneric(%%)[[GraphitiDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml.graphiti/src/de/cau/cs/kieler/kiml/graphiti/GraphitiDiagramLayoutManager.java||shape="rect"]](%style="line-height:1.4285715;" %). However,somecustomizeddiagram editors do not work with the generic diagram layoutmanagersand hence requiretheirown specializedimplementations,which canbe contributedwith theextensionpoint {{codelanguage="none"}}layoutManagers{{/code}}.191 +The extension point {{code language="none"}}layoutInfo{{/code}} is used to define diagram types and to assign default layout options to specific parts of a diagram. Layout options can be associated with elements of the domain model, where the qualified name of the model element interface must be given, or with edit parts of a specific diagram editor, where the qualified class name of the edit part must be given. The diagram type can be assigned by setting the predefined layout option {{code language="none"}}de.cau.cs.kieler.diagramType{{/code}} with the diagram type identifier as value. This helps KIML to find a suitable layout algorithm for a part of the diagram editor without the need of referencing a specific algorithm. For cases when it is not sufficient to bind a layout option value with a domain model class, but the actual value depends on some properties of the runtime domain model instance, the {{code language="none"}}layoutInfo{{/code}} extension point allows to register implementations of [[SemanticLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/config/SemanticLayoutConfig.java||shape="rect"]]. This allows to include arbitrary analysis of the domain model in order to derive a layout configuration. 170 170 171 - (%style="line-height:1.4285715;" %)Thediagramlayoutmanagerimplementationthat is applicabletothecurrentlyselecteddiagramviewer ischosen basedonthe {{code language="none"}}supports(Object){{/code}} method:thefirstimplementation that returns{{codelanguage="none"}}true{{/code}} fortherespective workbenchpartinstanceisselected.Implementationscan beassignedapriorityinthe extension;(%%)diagramlayoutmanagers with higherpriorityare queriedfirst. Theobject passed tosupports(Object){{codelanguage="none"}}{{/code}}can also bean elementoftheselection.Forexample,GEF-based editorsreporteditpartinstancesto theEclipseselectionservice.Whichdiagram layout managerto useforaselectededit part is determinedby testing whichimplementationsupportsthat edit partinstance.193 +The transformation of input diagrams to [[KGraph>>doc:KGraph Meta Model]] instances as well as the transfer of computed layouts back to the input diagrams is done by [[IDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/diagram/IDiagramLayoutManager.java||shape="rect"]] implementations. For most diagram editors that are based on [[GMF>>url:http://www.eclipse.org/modeling/gmp/||shape="rect"]] the generic [[GmfDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.gmf/src/de/cau/cs/kieler/kiml/gmf/GmfDiagramLayoutManager.java||shape="rect"]] can be used, while for [[Graphiti>>url:http://www.eclipse.org/graphiti/||shape="rect"]] there is the generic [[GraphitiDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.graphiti/src/de/cau/cs/kieler/kiml/graphiti/GraphitiDiagramLayoutManager.java||shape="rect"]]. However, some customized diagram editors do not work with the generic diagram layout managers and hence require their own specialized implementations, which can be contributed with the extension point layoutManagers{{code language="none"}}{{/code}}. 172 172 173 - Eachdiagram layout manager must be able to map the graph structure of its supported diagram viewers to the [[KGraph>>doc:KGraphMeta Model]] format using the {{code language="none"}}buildLayoutGraph({{/code}}…{{code language="none"}}){{/code}} method. The resultisstored in a[[LayoutMapping>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler-pragmatics/plugins/de.cau.cs.kieler.kiml.service/src/de/cau/cs/kieler/kiml/service/LayoutMapping.java||shape="rect"]], whichstoresabidirectional mapbetweengraph elementsand diagram elements andcan beenriched with additional information.Such information is often required when the new computedlayoutisapplied backto the diagram, which is donewith{{code language="none"}}applyLayout({{/code}}…{{code language="none"}}){{/code}}. This methodis also responsible forapplying animation of the transition between the old layout and the new layout and forautomatic zooming, if requested.195 += Graph Analysis[[url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML#GraphAnalysis||style="text-decoration: none;" title="Link to this section" shape="rect" class="anchor"]] = 174 174 175 - (%style="line-height:1.4285715;"%)There aremany ways to customizetheconfiguration of graphscreatedby layoutmanagers.These aredocumentedin [[doc:ConfiguringAutomaticLayout]].197 +KIML offers an interface for graph analysis, available with the [[image:attach:analyzediagram.gif]] button. Here a selection of analyses can be made, which refer to the structure or to the drawing of the graph. After performing the analyses, the results are shown in a dialog and in the Analysis view. New analyses, which must implement [[IAnalysis>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.service/src/de/cau/cs/kieler/kiml/service/grana/IAnalysis.java||shape="rect"]], can be registered using the {{code language="none"}}analysisProviders{{/code}} extension point.
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 378143891 +9469962 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 37814389/Infrastructure for Meta Layout (KIML)1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9469962/Infrastructure for Meta Layout (KIML)