Last modified by Richard Kreissig on 2023/09/14 10:13

From version 29.1
edited by msp
on 2014/03/05 14:06
Change comment: There is no comment for this version
To version 31.1
edited by msp
on 2014/03/05 15:12
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,7 +1,7 @@
1 1  {{panel title="Project Overview" borderStyle="dashed"}}
2 2  Responsible:
3 3  
4 -* {{mention reference="XWiki.msp" style="FULL_NAME" anchor="XWiki-msp-VYCZH"/}}
4 +* {{mention reference="XWiki.msp" style="FULL_NAME" anchor="XWiki-msp-SVmBQ"/}}
5 5  
6 6  Related Publications:
7 7  
... ... @@ -35,7 +35,7 @@
35 35  
36 36  Similarly, the "//KIELER Layout for Graphiti//" feature provides the KIML interface to Graphiti-based editors.
37 37  
38 -=== Terminology ===
38 +== Terminology ==
39 39  
40 40  //**Layout Graph**//
41 41  
... ... @@ -127,18 +127,28 @@
127 127  
128 128  Creating a new entry requires the selection of the type of related element and entering its class name or identifier. Class names of diagram 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.
129 129  
130 -= 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"]] =
130 += Programming Interface[[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"]] =
131 131  
132 -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. The interaction with the diagram editor or viewer is handled 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.
132 +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
133 133  
134 -The meta layout configuration 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. Layout options are defined with the extension point {{code language="none"}}layoutProviders{{/code}}. More information on layout configuration is available on [[doc:Configuring Automatic Layout]].
134 +{{code theme="Eclipse" language="java"}}
135 +DiagramLayoutEngine.INSTANCE.layout(workbenchPart, diagramPart)
136 +{{/code}}
135 135  
136 -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 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-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.
138 +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}}).
137 137  
140 +An overview of the internal structure of KIML is given in the following.
141 +
138 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"]]
139 139  
140 -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.
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.
141 141  
146 +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]].
147 +
148 +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 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-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.
149 +
150 +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.
151 +
142 142  KIML makes extensive use of the [[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// 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-pragmatics/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-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"]] are property holders, which means that they can store layout option values for the graph elements they are connected with.
143 143  
144 144  == 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"]] ==
... ... @@ -160,10 +160,10 @@
160 160  
161 161  == 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"]] ==
162 162  
163 -The extension point {{code language="none"}}layoutConfigs{{/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.
173 +(% style="line-height: 1.4285715;" %)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||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}}.
164 164  
165 -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}}.
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.
166 166  
167 -= 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"]] =
177 +Each diagram layout manager must be able to map the graph structure of its supported diagram viewers to the [[KGraph>>doc:KGraph Meta Model]] 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.
168 168  
169 -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-pragmatics/plugins/de.cau.cs.kieler.kiml.grana/src/de/cau/cs/kieler/kiml/grana/IAnalysis.java||shape="rect"]], can be registered using the {{code language="none"}}analysisProviders{{/code}} extension point.
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:Configuring Automatic Layout]].
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9469974
1 +9471537
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9469974/Infrastructure for Meta Layout (KIML)
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9471537/Infrastructure for Meta Layout (KIML)