<
From version < 8.1 >
edited by msp
on 2012/04/20 09:30
To version < 9.1 >
edited by msp
on 2012/04/23 09:34
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -13,8 +13,6 @@
13 13  * (% 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);" %))
14 14  {{/panel}}
15 15  
16 -This subproject deals with the automatic layout of graph-based models. 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.
17 -
18 18  
19 19  
20 20  {{toc maxLevel="2"/}}
... ... @@ -21,6 +21,8 @@
21 21  
22 22  = 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  
22 +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.
23 +
24 24  In order to use KIML with your own GMF-based editor, you need to do the following steps:
25 25  
26 26  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"]]
... ... @@ -32,10 +32,6 @@
32 32  * [[(% class="icon" %) (%%)Project set for KIML with GMF>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/projectsets/de.cau.cs.kieler.kiml.gmf.psf||style="text-decoration: none;" shape="rect" class="ext-link"]]
33 33  * [[(% class="icon" %) (%%)Project set for KIML with Graphiti>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/projectsets/de.cau.cs.kieler.kiml.graphiti.psf||style="text-decoration: none;" shape="rect" class="ext-link"]]
34 34  
35 -= Introduction =
36 -
37 -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.
38 -
39 39  === Terminology ===
40 40  
41 41  //**Layout Graph**//
... ... @@ -78,25 +78,25 @@
78 78  
79 79  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.
80 80  
81 -=== 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"]] ===
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"]] ==
82 82  
83 83  [[image:attach:layout_view.png]]
84 84  
85 85  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.
86 86  
87 -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 such algorithms may not support all kinds of 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.
88 88  
89 89  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.
90 90  
91 -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 open model file, thus resetting the option to its default value. The view menu has an entry //Remove all Layout Options// which resets all options by removing persistent data in the model file.
87 +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.
92 92  
93 93  [[image:attach:context_menu.png]]
94 94  
95 -The context menu for a specific layout option has different alternatives to set the current 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 Figure [[context_menu>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/attachment/wiki/Projects/KIML/context_menu.png||style="text-decoration: none;" title="Attachment 'context_menu.png' in Projects/KIML" shape="rect" class="attachment"]](% class="noprint" %) [[~[~[image:url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/chrome/common/download.png~]~]>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/raw-attachment/wiki/Projects/KIML/context_menu.png||style="text-decoration: none;" title="Download" shape="rect" class="trac-rawlink"]](%%)). 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.
91 +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 Figure [[context_menu>>attach:context_menu.png]]). 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.
96 96  
97 97  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.
98 98  
99 -=== 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"]] ===
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"]] ==
100 100  
101 101  [[image:attach:preferences.png]]
102 102  
... ... @@ -104,18 +104,30 @@
104 104  
105 105  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.
106 106  
107 -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.
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.
108 108  
109 -== 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"]] ==
105 += 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"]] =
110 110  
111 -The central concept of the KIML implementation is the [[DiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/ui/layout/DiagramLayoutManager.html||style="text-decoration: none;" shape="rect" class="javadoc"]], which is responsible for analyzing diagrams, creating a [[KGraph>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/KGraph||style="text-decoration: none;" shape="rect" class="wiki"]] structure, creating a //layout configuration//, and writing new position information back to the diagram. Internally, GEF diagrams are composed of //figures// (responsible for drawing the diagram), //edit parts// (the controllers), //notation// model elements (holding concrete layout data), and //domain// model elements (holding semantic data). For each type of diagram, a specialized diagram layout manager implementation is needed, e.g. in [[de.cau.cs.kieler.kiml.gmf>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/browser/plugins/de.cau.cs.kieler.kiml.gmf||style="text-decoration: none;" shape="rect" class="source"]] for [[(% class="icon" %) (%%)GMF>>url:http://www.eclipse.org/modeling/gmp/||style="text-decoration: none;" shape="rect" class="ext-link"]] and in [[de.cau.cs.kieler.kiml.graphiti>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/browser/plugins/de.cau.cs.kieler.kiml.graphiti||style="text-decoration: none;" shape="rect" class="source"]] for [[(% class="icon" %) (%%)Graphiti>>url:http://www.eclipse.org/graphiti/||style="text-decoration: none;" shape="rect" class="ext-link"]]. Diagram layout managers provide [[IGraphicalFrameworkBridge>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/core/ui/IGraphicalFrameworkBridge.html||style="text-decoration: none;" shape="rect" class="javadoc"]]s to access features that are specific to the respective editing framework, and[[ILayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/ILayoutConfig.html||style="text-decoration: none;" shape="rect" class="javadoc"]]s to access layout options that are stored in the diagram files. Layout configurations may take different sources for assigning specific values to layout options, such as the notation model, user preferences, the de.cau.cs.kieler.kiml.layoutInfo extension point, or default values of layout providers or layout options. These configurations can then be used to transfer all relevant options to the layout graph using the [[KLayoutData>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/KLayoutData||style="text-decoration: none;" shape="rect" class="wiki"]] structure and to display options in the Layout view. The singleton class [[LayoutDataService>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/LayoutDataService.html||style="text-decoration: none;" shape="rect" class="javadoc"]] is used to access the available layout algorithms, layout options, diagram types, layout types, and stored option values.
107 +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. 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 (% style="" %)de.cau.cs.kieler.kiml.ui.layoutManagers{{code language="none"}}{{/code}}.
112 112  
109 +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 (% style="" %){{code language="none"}}de.cau.cs.kieler.kiml.layoutProviders{{/code}}. The most relevant layout configurators are listed in the following, with increasing priority.
110 +
111 +* [[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.
112 +* [[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 de.cau.cs.kieler.kiml.layoutInfo{{code language="none"}}{{/code}} extension point.
113 +* [[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.
114 +* [[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.
115 +* [[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)]].
116 +
117 +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 de.cau.cs.kieler.kiml.{{code language="none"}}{{/code}}{{code language="none"}}layoutProviders{{/code}} 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.
118 +
113 113  [[~[~[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"]]
114 114  
115 -KIML makes extensive use of the [[IPropertyHolder>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/core/properties/IPropertyHolder.html||style="text-decoration: none;" shape="rect" class="javadoc"]] 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/~~kieler/doc/de/cau/cs/kieler/core/properties/IProperty.html||style="text-decoration: none;" shape="rect" class="javadoc"]], which is usually instanced exactly once for each property. The layout data classes [[KShapeLayout>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/klayoutdata/KShapeLayout.html||style="text-decoration: none;" shape="rect" class="javadoc"]] and [[KEdgeLayout>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/klayoutdata/KEdgeLayout.html||style="text-decoration: none;" shape="rect" class="javadoc"]] are property holders, which means that they can store layout option values for the graph elements they are connected with. Furthermore, [[ILayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/ILayoutConfig.html||style="text-decoration: none;" shape="rect" class="javadoc"]]s are property holders, which means that they can store layout options values to be transferred to the layout graph or to be displayed in the Layout view. [[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/AbstractLayoutProvider.html||style="text-decoration: none;" shape="rect" class="javadoc"]]s are property holders for storage of default values that are specific to the layout provider.
121 +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.
116 116  
117 -=== 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"]] ===
123 +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.
118 118  
125 +== 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"]] ==
126 +
119 119  Layout algorithms must be connected by extending [[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/AbstractLayoutProvider.html||style="text-decoration: none;" shape="rect" class="javadoc"]] and using the de.cau.cs.kieler.kiml.layoutProviders extension point. The input of [[AbstractLayoutProvider?>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/AbstractLayoutProvider||rel="nofollow" style="text-decoration: none;" shape="rect" class="missing wiki"]] is an instance of the [[KGraph>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/KGraph||style="text-decoration: none;" shape="rect" class="wiki"]], an [[(% class="icon" %) (%%)EMF>>url:http://www.eclipse.org/modeling/emf/||style="text-decoration: none;" shape="rect" class="ext-link"]] based graph structure, together with a progress monitor ([[IKielerProgressMonitor>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/core/alg/IKielerProgressMonitor.html||style="text-decoration: none;" shape="rect" class="javadoc"]]). The KGraph instance already has attached [[KLayoutData>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/KLayoutData||style="text-decoration: none;" shape="rect" class="wiki"]], which is initially set to the original layout of the diagram. The layout provider should read layout options from the attached layout data, execute a layout algorithm, and write the results back to the layout data. See the [[documentation of connected layouters>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML/Layouters||style="text-decoration: none;" shape="rect" class="wiki"]]. A good example for a layout provider implementation is [[LayeredLayoutProvider>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/browser/plugins/de.cau.cs.kieler.klay.layered/src/de/cau/cs/kieler/klay/layered/LayeredLayoutProvider.java||style="text-decoration: none;" shape="rect" class="source"]].
120 120  
121 121  The layoutProviders 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. Furthermore, the extension point can be used to specify which layout options are understood and which diagram types are supported by the layout algorithm, and to define new layout options, layout types, and categories of layout algorithms. The priority value given with a supported diagram type is used to determine the most suitable layout algorithm for that diagram type; see the [[documentation of pre-defined diagram types>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/KIML/DiagramTypes||style="text-decoration: none;" shape="rect" class="wiki"]].
... ... @@ -133,12 +133,12 @@
133 133  
134 134  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 boolean without checking forNullPointerExceptions or ClassCastExceptions.
135 135  
136 -=== 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"]] ===
144 +== 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"]] ==
137 137  
138 138  The extension point de.cau.cs.kieler.kiml.layoutInfo 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 de.cau.cs.kieler.layout.options.diagramType 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.
139 139  
140 140  KIML provides [[DiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/ui/layout/DiagramLayoutManager.html||style="text-decoration: none;" shape="rect" class="javadoc"]] implementations for GMF and Graphiti. For diagram editors that are not compatible with those layout managers, a new implementation must be made. This includes specialized implementations of [[IGraphicalFrameworkBridge>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/core/ui/IGraphicalFrameworkBridge.html||style="text-decoration: none;" shape="rect" class="javadoc"]] and of[[ILayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/ILayoutConfig.html||style="text-decoration: none;" shape="rect" class="javadoc"]]. Diagram layout managers have to be registered using the de.cau.cs.kieler.kiml.ui.layoutManagers extension point.
141 141  
142 -== 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"]] ==
150 += 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"]] =
143 143  
144 144  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 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/~~kieler/doc/de/cau/cs/kieler/kiml/grana/IAnalysis.html||style="text-decoration: none;" shape="rect" class="javadoc"]], can be registered using the de.cau.cs.kieler.kiml.grana.analysisProviders extension point.
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -885121
1 +885123
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/885121/Infrastructure for Meta Layout (KIML)
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/885123/Infrastructure for Meta Layout (KIML)