Changes for page Infrastructure for Meta Layout (KIML)
Last modified by Richard Kreissig on 2023/09/14 10:13
<
edited by Alexander Schulz-Rosengarten
on 2023/07/11 10:33
on 2023/07/11 10:33
edited by Richard Kreissig
on 2023/09/14 10:13
on 2023/09/14 10:13
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. als1 +XWiki.stu230980 - Content
-
... ... @@ -2,7 +2,8 @@ 2 2 KIML has been discontinued and is replaced by the [[Eclipse Layout Kernel (ELK)>>url:http://www.eclipse.org/elk/||shape="rect"]]. 3 3 {{/warning}} 4 4 5 -{{panel borderStyle="dashed" title="Project Overview"}} 5 +Project Overview 6 + 6 6 Related Publications: 7 7 8 8 * 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"]]) ... ... @@ -13,9 +13,7 @@ 13 13 Related Theses: 14 14 15 15 * 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"]]) 16 -{{/panel}} 17 17 18 -\\ 19 19 20 20 ===== Contents ===== 21 21 ... ... @@ -95,7 +95,7 @@ 95 95 96 96 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. 97 97 98 -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.97 +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. 99 99 100 100 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. 101 101 ... ... @@ -139,7 +139,7 @@ 139 139 140 140 An overview of the internal structure of KIML is given in the following. 141 141 142 -[[~[~[image:attach:kiml-overview.png~]~]>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/files/documentation/kiml-structure.png||style="text-decoration: none;" shape="rect"]]141 +[[~[~[image:attach:kiml-overview.png~]~]>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/files/documentation/kiml-structure.png||shape="rect" style="text-decoration: none;"]] 143 143 144 144 The interaction with the diagram editor or viewer is handled by //layout managers//, represented by [[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. 145 145 ... ... @@ -153,7 +153,7 @@ 153 153 154 154 == Connecting Layout Algorithms == 155 155 156 -Layout algorithms must be connected by extending [[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"]]. The input 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 {{code language="none"}}doLayout{{/code}} method is an instance of the [[KGraph>>doc:KIELER.Discontinued Projects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]], 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-pragmatics/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-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 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-pragmatics/plugins/de.cau.cs.kieler.klay.layered/src/de/cau/cs/kieler/klay/layered/LayeredLayoutProvider.java||shape="rect"]].155 +Layout algorithms must be connected by extending [[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"]]. The input of [[t>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/AbstractLayoutProvider||rel="nofollow" shape="rect" style="text-decoration: none;" class="missing wiki"]]he {{code language="none"}}doLayout{{/code}} method is an instance of the [[KGraph>>doc:KIELER.Discontinued Projects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]], 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-pragmatics/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-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 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-pragmatics/plugins/de.cau.cs.kieler.klay.layered/src/de/cau/cs/kieler/klay/layered/LayeredLayoutProvider.java||shape="rect"]]. 157 157 158 158 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. 159 159 ... ... @@ -164,16 +164,15 @@ 164 164 boolean isInteractive = nodeLayout.getProperty(LayoutOptions.INTERACTIVE); 165 165 {{/code}} 166 166 167 -\\ 168 168 169 169 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. 170 170 171 171 == Connecting Diagram Editors == 172 172 173 -(% style="line-height: 1.4285715;" %)The transformation of input diagrams to [[KGraph>>doc:KIELER.Discontinued Projects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]] 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||style="line-height: 1.4285715;"shape="rect"]](% style="line-height:1.4285715;" %) implementations. For most diagram editors that are based on (%%)[[GMF>>url:http://www.eclipse.org/modeling/gmp/||style="line-height: 1.4285715;"shape="rect"]](% style="line-height:1.4285715;" %) the generic (%%)[[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;" %) can be used, while for (%%)[[Graphiti>>url:http://www.eclipse.org/graphiti/||style="line-height: 1.4285715;"shape="rect"]](% style="line-height:1.4285715;" %) there is the generic (%%)[[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, 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 {{code language="none"}}layoutManagers{{/code}}.171 +(% style="line-height:1.4285715" %)The transformation of input diagrams to [[KGraph>>doc:KIELER.Discontinued Projects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]] 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" style="line-height: 1.4285715;"]](% style="line-height:1.4285715" %) implementations. For most diagram editors that are based on (%%)[[GMF>>url:http://www.eclipse.org/modeling/gmp/||shape="rect" style="line-height: 1.4285715;"]](% style="line-height:1.4285715" %) the generic (%%)[[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" %) can be used, while for (%%)[[Graphiti>>url:http://www.eclipse.org/graphiti/||shape="rect" style="line-height: 1.4285715;"]](% style="line-height:1.4285715" %) there is the generic (%%)[[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, 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 {{code language="none"}}layoutManagers{{/code}}. 174 174 175 -(% style="line-height: 1.4285715;" %)The diagram layout manager implementation that is applicable to the currently selected diagram viewer is chosen based on the {{code language="none"}}supports(Object){{/code}} method: the first implementation that returns {{code language="none"}}true{{/code}} for the respective workbench part instance is selected. Implementations can be assigned a priority in the extension;(%%) diagram layout managers with higher priority are queried first. The object passed to supports(Object){{code language="none"}}{{/code}} can also be an element of the selection. For example, GEF-based editors report edit part instances to the Eclipse selection service. Which diagram layout manager to use for a selected edit part is determined by testing which implementation supports that edit part instance.173 +(% style="line-height:1.4285715" %)The diagram layout manager implementation that is applicable to the currently selected diagram viewer is chosen based on the {{code language="none"}}supports(Object){{/code}} method: the first implementation that returns {{code language="none"}}true{{/code}} for the respective workbench part instance is selected. Implementations can be assigned a priority in the extension;(%%) diagram layout managers with higher priority are queried first. The object passed to supports(Object){{code language="none"}}{{/code}} can also be an element of the selection. For example, GEF-based editors report edit part instances to the Eclipse selection service. Which diagram layout manager to use for a selected edit part is determined by testing which implementation supports that edit part instance. 176 176 177 177 Each diagram layout manager must be able to map the graph structure of its supported diagram viewers to the [[KGraph>>doc:KIELER.Discontinued Projects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]] format using the {{code language="none"}}buildLayoutGraph({{/code}}…{{code language="none"}}){{/code}} method. The result is stored 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"]], which stores a bidirectional map between graph elements and diagram elements and can be enriched with additional information. Such information is often required when the new computed layout is applied back to the diagram, which is done with {{code language="none"}}applyLayout({{/code}}…{{code language="none"}}){{/code}}. This method is also responsible for applying animation of the transition between the old layout and the new layout and for automatic zooming, if requested. 178 178 179 -(% style="line-height: 1.4285715;" %)There are many ways to customize the configuration of graphs created by layout managers. These are documented in [[doc:KIELER.Discontinued Projects.Infrastructure for Meta Layout (KIML).Configuring Automatic Layout.WebHome]].177 +(% style="line-height:1.4285715" %)There are many ways to customize the configuration of graphs created by layout managers. These are documented in [[doc:KIELER.Discontinued Projects.Infrastructure for Meta Layout (KIML).Configuring Automatic Layout.WebHome]].