Changes for page Infrastructure for Meta Layout (KIML)
Last modified by Richard Kreissig on 2023/09/14 10:13
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +1,7 @@ 1 1 {{panel title="Project Overview" borderStyle="dashed"}} 2 2 Responsible: 3 3 4 -* {{mentionreference="XWiki.msp"style="FULL_NAME"anchor="XWiki-msp-ulkvC"/}}4 +* [[Miro Spönemann>>url:http://www.informatik.uni-kiel.de/rtsys/kontakt/msp/||shape="rect"]] 5 5 6 6 Related Publications: 7 7 ... ... @@ -13,7 +13,7 @@ 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 - =====Contents =====16 + 17 17 18 18 {{toc maxLevel="2"/}} 19 19 ... ... @@ -27,6 +27,11 @@ 27 27 1*. It includes the Java-based layout algorithms developed in the [[KLay project>>doc:Layout Algorithms (KLay)]]. 28 28 1. Open a diagram and press the layout button [[image:attach:kieler-arrange.gif]] or use the shortcut Ctrl+R L. 29 29 30 +For development with the KIML plug-ins, check out using team project sets: 31 + 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 +* [[(% 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 + 30 30 === Terminology === 31 31 32 32 //**Layout Graph**// ... ... @@ -83,7 +83,7 @@ 83 83 84 84 [[image:attach:context_menu.png]] 85 85 86 -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 thecontextmenudepictedabove). 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. 87 87 88 88 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. 89 89 ... ... @@ -97,66 +97,19 @@ 97 97 98 98 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. 99 99 100 -= Special Layout Options = 101 - 102 -While most layout options are used to affect how the active layout algorithm computes concrete coordinates for the graph elements, there are some layout options that have a special role in KIML. 103 - 104 -== Layout Algorithm == 105 - 106 -The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for the content of a composite node. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied. 107 - 108 -The following layout types are predefined: 109 - 110 -* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points. 111 -* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method. 112 -* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. 113 -* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph. 114 -* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type. 115 - 116 -=== Available Algorithms and Libraries === 117 - 118 -* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and edge labels. 119 -* (% style="color: rgb(51,51,51);" %)**Randomizer** - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph. 120 -* ((( 121 -(% style="color: rgb(51,51,51);" %)**Box Layout** - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions. 122 -))) 123 -* (% style="color: rgb(51,51,51);" %)**Fixed Layout** - Does not compute a new layout, but leaves all nodes and edges where they are. If the //Position// and //Bend Points// options are set for the elements of the graph, the pre-defined layout is applied. 124 -* (% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(51, 51, 51)" %)**OGD**(% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0)" %)**F** ([[www.ogdf.net>>url:http://www.ogdf.net/||shape="rect"]](% style="color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(0, 0, 0); color: rgb(51, 51, 51); color: rgb(51, 51, 51)" %)) - (% style="color: rgb(51,51,51);" %)A self-contained C++ class library for the automatic layout of diagrams. The version that is shipped with KIELER is compiled as an executable that reads files in OGML format and outputs the computed concrete layout. 125 -* **Graphviz** ([[www.graphviz.org>>url:http://www.graphviz.org/||shape="rect"]])(% style="color: rgb(51,51,51);" %) - An open source graph visualization tool with several graph layout programs, web and interactive graphical interfaces, auxiliary tools, libraries, and language bindings. Graphviz needs to be installed separately in order to be used within KIELER, since it is called in a separate process using the DOT language for communication. 126 - 127 -== (% style="color: rgb(0,0,0);" %)Diagram Type(%%) == 128 - 129 -Diagram types are used to classify graphical diagrams for setting default layout option values for a set of similar diagrams. The diagram type of an element is specified with the layout option {{code language="none"}}de.cau.cs.kieler.diagramType{{/code}}. Layout algorithms can declare which diagram types they support well, and give a priority value for each supported type. KIML decides at runtime which layout algorithm has the highest priority for a given diagram, so that the most suitable algorithm is always used. Usual values for such priorities are between 1 and 10, where the highest value should only be assigned if the algorithm is especially designed for diagrams of the respective type, or if it has proven to be very adequate for them. Lower values should be given if the algorithm is able to draw the diagrams correctly, but with lower quality of the resulting layout. 130 - 131 -The following diagram types are predefined: 132 - 133 -* **General** - This type is automatically assigned to all diagrams for which no specific type is declared. A layout algorithm that has the highest priority on the //General// diagram type is taken as the default algorithm when no further information on a diagram is available to KIML. 134 -* **State Machine** - All kinds of state machines, automata, and activity diagrams. Examples: [[SyncCharts>>doc:Thin SyncCharts Editor (ThinKCharts)]], UML Activity diagrams. 135 -* **Data Flow Diagram** - Actor-oriented diagrams, where connections are mostly done between //ports// of nodes. These diagrams can only be handled properly by very special layout algorithms, such as those developed in the [[KLay project>>doc:Layout Algorithms (KLay)]]. 136 -* **Class Diagram** - Class diagrams such as Ecore diagrams for the [[EMF>>url:http://www.eclipse.org/modeling/emf/||shape="rect"]] or UML Class diagrams. 137 -* **Use Case Diagram** - Use case diagrams as defined by the UML. 138 -* **Unconnected Boxes** - Sets of nodes that have no connections and are treated as resizable boxes. This is related to mathematical [[packing problems>>url:http://en.wikipedia.org/wiki/Packing_problem||shape="rect"]]. Example: Regions in [[SyncCharts>>doc:Thin SyncCharts Editor (ThinKCharts)]].\\ 139 - 140 -== Other Options == 141 - 142 -* **Layout Hierarchy** ({{code language="none"}}de.cau.cs.kieler.layoutHierarchy{{/code}}) - If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution. 143 -* **Hypernode** ({{code language="none"}}de.cau.cs.kieler.hypernode{{/code}}) - A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models. 144 -* **Comment Box** ({{code language="none"}}de.cau.cs.kieler.commentBox{{/code}}) - A node that is marked as comment box is treated as a label that needs to be placed somewhere. This is different to normal node labels, which are usually regarded as fixed. 145 -* **No Layout** ({{code language="none"}}de.cau.cs.kieler.noLayout{{/code}}) - Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements. 146 - 147 147 = 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"]] = 148 148 149 -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. 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}}. 150 150 151 -The meta layout configuration is done by the [[LayoutOptionManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/service/LayoutOptionManager.java||shape="rect"]], which iterates over all graph elements and applies a set of layout configurators, represented by the interface [[ILayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/config/ILayoutConfig.java||shape="rect"]]. Layout configurators analyze the context of each graph element and set specific values for some layout options. Layout options are defined with the extension point {{code language="none"}}layoutProviders{{/code}}. The most relevant layout configurators are listed in the following, with increasing priority. 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. 152 152 153 153 * [[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. 154 -* [[EclipseLayoutConfig>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/service/EclipseLayoutConfig.java||shape="rect"]] - user defined default values for edit parts, domain model elements, or diagram types; contributed by the preference page or the layoutInfo{{code language="none"}}{{/code}} extension point. 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. 155 155 * [[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. 156 156 * [[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. 157 157 * [[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)]]. 158 158 159 -Hierarchically structured graphs are handled by the [[RecursiveGraphLayoutEngine>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/RecursiveGraphLayoutEngine.java||shape="rect"]], which executes layout algorithms separately on each hierarchy level, starting with the innermost levels. The actual layout computations are performed by subclasses of [[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/AbstractLayoutProvider.java||shape="rect"]], which are registered with the {{code language="none"}}layoutProviders{{/code}} extension point. 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. 160 160 161 161 [[~[~[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"]] 162 162 ... ... @@ -166,27 +166,29 @@ 166 166 167 167 == 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"]] == 168 168 169 -Layout algorithms must be connected by extending [[AbstractLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/ fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/AbstractLayoutProvider.java||shape="rect"]]. The input of [[t>>url:http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Projects/AbstractLayoutProvider||rel="nofollow" style="text-decoration: none;" shape="rect" class="missing wiki"]]he {{code language="none"}}doLayout{{/code}} methodis an instance of the [[KGraph>>doc:KGraphMetaModel]], an [[EMF>>url:http://www.eclipse.org/modeling/emf/||shape="rect"]] based graph structure, together with a progress monitor ([[IKielerProgressMonitor>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/alg/IKielerProgressMonitor.java||shape="rect"]]). Thegraph is representedby a [[KNode>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core.kgraph/src/de/cau/cs/kieler/core/kgraph/KNode.java||shape="rect"]],whichservesas top-level container. Thecontained graphelementsinitially haveattached [[KShapeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KShapeLayout.java||shape="rect"]] or [[KEdgeLayout>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/klayoutdata/KEdgeLayout.java||shape="rect"]] with informationonthe original layout of the diagramas well as an abstract layout specified by layout options. The layout provider shouldconsider layout options from the attached layout data, execute a layout algorithm, and write theconcrete results back to the layout data. A good example for a layout provider implementation is [[LayeredLayoutProvider>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.klay.layered/src/de/cau/cs/kieler/klay/layered/LayeredLayoutProvider.java||shape="rect"]].127 +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"]]. 170 170 171 -The {{codelanguage="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 toattachinformationon knownlayout options,supported diagramstypes,andsupportedgraphfeaturesto alayout algorithm.Theknownlayout options arethosethatareofferedin theLayoutview whentherespective algorithmis selected.Thesupported diagram typesareused toautomatically selectthe most suitable algorithm for aspecificdiagram type:from all algorithms that statetosupportagiventype, theonewith the highest priorityistaken. Thesupported graph featuresare usedtostate whichspecialfeaturesthat a graphcan contain can behandled by thealgorithm; examplesforsuch features are edgelabels, ports, or clusters. Furthermore,the extensionpoint can be used tospecifynewlayout options, layout types, and categories of layoutalgorithms.129 +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"]]. 172 172 173 -Each layout option that is registered in the extension point needs a corresponding constant in Java code, where the most relevant data is replicated with a [[Property>>url:http://rtsys.informatik.uni-kiel.de/ fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/Property.java||shape="rect"]] constant for easy use in the implementation of layoutalgorithms. KIML comes with a large set of built-in layout options, which are all defined in [[LayoutOptions>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml/src/de/cau/cs/kieler/kiml/options/LayoutOptions.java||shape="rect"]]. Layout providers can access the layout option values using the [[IPropertyHolder>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.core/src/de/cau/cs/kieler/core/properties/IPropertyHolder.java||shape="rect"]]interface:131 +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/~~kieler/doc/de/cau/cs/kieler/core/properties/Property.html||style="text-decoration: none;" shape="rect" class="javadoc"]] constant for easy use in the implementation of layout providers. KIML comes with a large set of built-in layout options, which are all defined in [[LayoutOptions>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/doc/de/cau/cs/kieler/kiml/options/LayoutOptions.html||style="text-decoration: none;" shape="rect" class="javadoc"]]. If a layout provider wants to override the default value of a layout option, it must set the corresponding properties for itself (which is a property holder) either in the constructor or in the initialization method, and it must use its own instance of the corresponding property. See for example the [[Properties>>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/Properties.java||style="text-decoration: none;" shape="rect" class="source"]] class for the KLay layered layouter, which defines its own copy of the OBJ_SPACING option using a specific default value. Layout providers can access the layout option values using 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: 174 174 175 -{{code theme="Eclipse" language="java"}} 176 -KShapeLayout nodeLayout = parentNode.getData(KShapeLayout.class); 177 -boolean isInteractive = nodeLayout.getProperty(LayoutOptions.INTERACTIVE); 178 -{{/code}} 133 +(% class="code" style="margin-left: 1.75em;" %) 134 +((( 135 +(% class="o" %)=.(% class="na" style="color: rgb(0,128,128);" %)getData(% class="o" %)(.(% class="na" style="color: rgb(0,128,128);" %)class(% class="o" %));(% class="kt" style="color: rgb(68,85,136);" %)boolean(% class="o" %)=.(% class="na" style="color: rgb(0,128,128);" %)getProperty(% class="o" %)(.(% class="na" style="color: rgb(0,128,128);" %)INTERACTIVE(% class="o" %)); 179 179 180 - 137 +{{{KShapeLayout nodeLayout parentNodeKShapeLayout 138 + isInteractive nodeLayoutLayoutOptions 139 +}}} 140 +))) 181 181 182 -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 forNullPointerExceptions or ClassCastExceptions.142 +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. 183 183 184 184 == 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"]] == 185 185 186 -The extension point {{codelanguage="none"}}layoutInfo{{/code}}is used to define diagram types and to assign default layout options to specific parts of a diagram. Layout options can be associated with elements of the domain model, where the qualified name of the model element interface must be given, or with edit parts of a specific diagram editor, where the qualified class name of the edit part must be given. The diagram type can be assigned by setting the predefined layout option{{codelanguage="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.146 +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. 187 187 188 - The transformation of input diagrams to [[KGraph>>doc:KGraphMetaModel]] instances as well as the transferof computed layouts back to theinputdiagrams is doneby[[IDiagramLayoutManager>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/diagram/IDiagramLayoutManager.java||shape="rect"]] implementations. Formost diagram editors that arebasedon [[GMF>>url:http://www.eclipse.org/modeling/gmp/||shape="rect"]] thegeneric[[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 beused, whilefor[[Graphiti>>url:http://www.eclipse.org/graphiti/||shape="rect"]] thereisthe 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, somecustomized diagram editorsdonotwork withthegeneric diagram layout managersandhence require their own specializedimplementations,which canbecontributedwiththeextension pointlayoutManagers{{codelanguage="none"}}{{/code}}.148 +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. 189 189 190 190 = 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"]] = 191 191 192 -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 t o the drawing of the graph. After performing the analyses, the results are shown in a dialog and in the Analysis view. New analyses, which must implement [[IAnalysis>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/plugins/de.cau.cs.kieler.kiml.service/src/de/cau/cs/kieler/kiml/service/grana/IAnalysis.java||shape="rect"]], can be registered using the{{codelanguage="none"}}analysisProviders{{/code}} extension point.152 +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 -8851 421 +885123 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/8851 42/Infrastructure for Meta Layout (KIML)1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/885123/Infrastructure for Meta Layout (KIML)