Changes for page Infrastructure for Meta Layout (KIML)
Last modified by Richard Kreissig on 2023/09/14 10:13
To version 28.1
edited by msp
on 2014/03/05 14:00
on 2014/03/05 14:00
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 6 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -KIELER.Home.Discontinued Projects.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. uru1 +XWiki.msp - Content
-
... ... @@ -1,8 +1,8 @@ 1 -{{warning}} 2 -KIML has been discontinued and is replaced by the [[Eclipse Layout Kernel (ELK)>>url:http://www.eclipse.org/elk/||shape="rect"]]. 3 -{{/warning}} 1 +{{panel title="Project Overview" borderStyle="dashed"}} 2 +Responsible: 4 4 5 -{{panel borderStyle="dashed" title="Project Overview"}} 4 +* {{mention reference="XWiki.msp" style="FULL_NAME" anchor="XWiki-msp-vwAYK"/}} 5 + 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"]]) ... ... @@ -15,7 +15,7 @@ 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 16 {{/panel}} 17 17 18 - \\18 + 19 19 20 20 ===== Contents ===== 21 21 ... ... @@ -23,23 +23,23 @@ 23 23 24 24 {{toc maxLevel="2"/}} 25 25 26 -= Getting Started = 26 += 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"]] = 27 27 28 28 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 computed by layout algorithms. 29 29 30 30 In order to use KIML with your own GMF-based editor, you need to do the following steps: 31 31 32 -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"]]33 -1*. It includes the Java-based layout algorithms developed in the [[KLay project>>doc: KIELER.Layout Algorithms (KLay)]].32 +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"]] 33 +1*. It includes the Java-based layout algorithms developed in the [[KLay project>>doc:Layout Algorithms (KLay)]]. 34 34 1. Open a diagram and press the layout button [[image:attach:kieler-arrange.gif]] or use the shortcut Ctrl+R L. 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 42 -* Internal representation of the graph structure of the current diagram, built on the [[KGraph>>doc:K IELER.Home.Discontinued Projects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]] model.42 +* Internal representation of the graph structure of the current diagram, built on the [[KGraph>>doc:KGraph Meta Model]] model. 43 43 44 44 **//Layout Algorithm//** 45 45 ... ... @@ -59,7 +59,7 @@ 59 59 60 60 **//Layout Data//** 61 61 62 -* Concrete layout data (position and size) and abstract layout data (layout options) attached to elements of the layout graph using the [[KLayoutData>>doc:K IELER.KLayoutData Meta Model]] model.62 +* 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. 63 63 64 64 //**Layout Meta Data**// 65 65 ... ... @@ -85,11 +85,11 @@ 85 85 86 86 * A singleton class for invoking layout algorithms on diagram viewers and editors. 87 87 88 -= User Interface = 88 += 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"]] = 89 89 90 90 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. 91 91 92 -== Layout View == 92 +== 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"]] == 93 93 94 94 [[image:attach:layout_view.png]] 95 95 ... ... @@ -101,7 +101,7 @@ 101 101 102 102 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. 103 103 104 -The standard layout options defined in KIML are documented in [[doc:KI ELER.KIML Layout Options]]. However, layout algorithms may define additional layout options.104 +The standard layout options defined in KIML are documented in [[doc:KIML Layout Options]]. However, layout algorithms may define additional layout options. 105 105 106 106 [[image:attach:context_menu.png]] 107 107 ... ... @@ -109,7 +109,7 @@ 109 109 110 110 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. 111 111 112 -== Preference Page == 112 +== 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"]] == 113 113 114 114 [[image:attach:preference_page.png]] 115 115 ... ... @@ -127,53 +127,43 @@ 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 -= ProgrammingInterface =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"]] = 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:K IELER.Home.Discontinued Projects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]] structure, configuring and executing the layout algorithms, and writing new position information back to the diagram.It is invokedwith132 +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. 133 133 134 -{{code language="java" theme="Eclipse"}} 135 -DiagramLayoutEngine.INSTANCE.layout(workbenchPart, diagramPart) 136 -{{/code}} 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]]. 137 137 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}}). 139 - 140 -An overview of the internal structure of KIML is given in the following. 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"]] 143 - 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 - 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:KIELER.Home.Discontinued Projects.Infrastructure for Meta Layout (KIML).Configuring Automatic Layout.WebHome]]. 147 - 148 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 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"]]isused to access the available layout algorithms,layoutoptions, diagramtypes, layout types, and stored option values.Similarly, thereareotherservice classesfor accessing themeta data managed by KIML. Metadata are storedin XML formataccordingtotheextensionpoints mechanism of Eclipse.138 +[[~[~[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"]] 151 151 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. 141 + 152 152 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. 153 153 154 -== Connecting Layout Algorithms == 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"]] == 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.Home.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"]].146 +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" 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-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 160 -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-pragmatics/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>>doc:KI ELER.KIML Layout Options]], which are all defined in [[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 providers can access the layout option values using 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:150 +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-pragmatics/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>>doc:KIML Layout Options]], which are all defined in [[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 providers can access the layout option values using 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: 161 161 162 -{{code language="java"theme="Eclipse"}}152 +{{code theme="Eclipse" language="java"}} 163 163 KShapeLayout nodeLayout = parentNode.getData(KShapeLayout.class); 164 164 boolean isInteractive = nodeLayout.getProperty(LayoutOptions.INTERACTIVE); 165 165 {{/code}} 166 166 167 - \\157 + 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 -== Connecting Diagram Editors == 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"]] == 172 172 173 - (%style="line-height:1.4285715;" %)Thetransformationof input diagrams to[[KGraph>>doc:KIELER.Home.DiscontinuedProjects.InfrastructureforMeta Layout(KIML).KGraph MetaModel.WebHome]] instancesaswellasthetransferofcomputed layoutsbackto theinput diagramsisdoneby(%%)[[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. Formost diagram editorsthatarebased on(%%)[[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,whilefor(%%)[[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}}.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. 174 174 175 - (%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.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}}. 176 176 177 - Eachdiagram layout manager must be able to map the graph structure of its supported diagram viewers to the [[KGraph>>doc:KIELER.Home.DiscontinuedProjects.Infrastructure for Meta Layout (KIML).KGraph Meta Model.WebHome]] 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.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"]] = 178 178 179 - (%style="line-height:1.4285715;"%)There aremany ways to customizetheconfiguration of graphscreatedby layoutmanagers.These aredocumentedin [[doc:KIELER.Home.Discontinued Projects.InfrastructureforMetaLayout(KIML).ConfiguringAutomatic Layout.WebHome]].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.
- analyzediagram.gif
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1.4 KB - Content
- context_menu.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -20.7 KB - Content
- kieler-arrange.gif
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -1.0 KB - Content
- kiml-overview.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -36.4 KB - Content
- layout_view.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -37.1 KB - Content
- preference_page.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -88.9 KB - Content
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 3280781 +9469972 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 328078/Infrastructure for Meta Layout (KIML)1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9469972/Infrastructure for Meta Layout (KIML)