-
Notifications
You must be signed in to change notification settings - Fork 90
Tree Layout with vertical position constraints #960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
8eefe55
spaeter commit
ClaasN 18646ba
ein zwischenstand
ClaasN 9314139
ein paar checks
ClaasN b7394d8
neuere version aufs gitlab bringen
ClaasN 1854fb9
Merge remote-tracking branch 'cln/master' into cln/tree-algo
Eddykasp 3e4fa44
remove remaining force alg references
Eddykasp 426e6e4
Update Copyright notices
Eddykasp 45a4edc
Documentation and Cleanup
Eddykasp 21ba60a
Support nodeNode spacing property
Eddykasp 973ff09
Remove unnecessary try catch blocks
Eddykasp 103836e
remove wrongly committed files
Eddykasp aa26fcc
Use enum for layout strategy
Eddykasp 2da37e1
update build.properties
Eddykasp fdacded
Extract property
Eddykasp ec0d332
clean up
Eddykasp a48f53d
Rename algorithm to VertiFlex
Eddykasp 7c851b2
rename to vertiflex in ELK feature
Eddykasp e1605f4
rename to vertiflex in ELK pom
Eddykasp 1f968f4
Graph size calculation
Eddykasp 9204ddd
Check for invalid vertical constraints
Eddykasp 625b72c
Remove magic number offset
Eddykasp 2e1f8e6
Refactor phase packages
Eddykasp 96b118d
Fix graph size calculation
Eddykasp 07fbbee
Clean up imports
Eddykasp d5718f2
Add bend edge router
Eddykasp b06244c
Fix issues
Eddykasp d024b5d
Update documentation
Eddykasp 9afabc1
Refactor unclear variable names
Eddykasp 2430094
Documentation
Eddykasp 59c9f66
Document TODO
Eddykasp f60f1bc
Add consider model order option for straightline layouts
Eddykasp 16e0564
Update build.properties
Eddykasp 9a928ef
tidy up formatting
Eddykasp 26f9216
Refactor variable usage and map access
Eddykasp 7d2b3ed
Documentation
Eddykasp 0fa7c23
Remove unused variable
Eddykasp 288e0f8
Add comments
Eddykasp 192a8d2
Document outline node better
Eddykasp 8940da0
Merge NodeComparator and InverseYNodeComparator classes
Eddykasp 8b02497
Refactor method names
Eddykasp d4dc7de
Improve Javadoc
Eddykasp 567c0c7
Merge branch 'master' into cln/tree-algo
Eddykasp 8410c2d
update test files
Eddykasp 9e4f9ee
Update plugins/org.eclipse.elk.alg.vertiflex/META-INF/MANIFEST.MF
Eddykasp 4de0be9
add calculation of node micro layout
Eddykasp 019c2a8
Merge branch 'cln/tree-algo' of git@github.com:Eddykasp/elk.git into …
Eddykasp f748400
Merge branch 'master' into cln/tree-algo
Eddykasp d939b0f
Merge branch 'master' into cln/tree-algo
Eddykasp f65e2f0
fix incorrect centering of roots
Eddykasp 4d6b2f6
Merge branch 'master' into cln/tree-algo
Eddykasp e340662
Update pom.xml
Eddykasp b37155f
Update pom.xml
Eddykasp d9483ba
update manifest for vertiflex to java 17 and elk 0.11
Eddykasp 0399303
remove checkstyle nature
Eddykasp 84378fa
add documentation file plus example image for vertiflex algorithm
Eddykasp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
| <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
| <classpathentry kind="src" path="src"/> | ||
| <classpathentry kind="src" path="src-gen"/> | ||
| <classpathentry kind="output" path="bin"/> | ||
| </classpath> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <projectDescription> | ||
| <name>org.eclipse.elk.alg.vertiflex</name> | ||
| <comment></comment> | ||
| <projects> | ||
| </projects> | ||
| <buildSpec> | ||
| <buildCommand> | ||
| <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| <buildCommand> | ||
| <name>org.eclipse.jdt.core.javabuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| <buildCommand> | ||
| <name>org.eclipse.pde.ManifestBuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| <buildCommand> | ||
| <name>org.eclipse.pde.SchemaBuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| <buildCommand> | ||
| <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| <buildCommand> | ||
| <name>org.eclipse.m2e.core.maven2Builder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| </buildSpec> | ||
| <natures> | ||
| <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
| <nature>org.eclipse.pde.PluginNature</nature> | ||
| <nature>org.eclipse.jdt.core.javanature</nature> | ||
| <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
| </natures> | ||
| </projectDescription> |
297 changes: 297 additions & 0 deletions
297
plugins/org.eclipse.elk.alg.vertiflex/.settings/org.eclipse.jdt.core.prefs
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
plugins/org.eclipse.elk.alg.vertiflex/.settings/org.eclipse.jdt.ui.prefs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| eclipse.preferences.version=1 | ||
| formatter_profile=_Elk | ||
| formatter_settings_version=12 | ||
| org.eclipse.jdt.ui.javadoc=true | ||
| org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} ${user} and others.\n * \n * This program and the accompanying materials are made available under the\n * terms of the Eclipse Public License 2.0 which is available at\n * http://www.eclipse.org/legal/epl-2.0.\n * \n * SPDX-License-Identifier: EPL-2.0 \n *******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> |
15 changes: 15 additions & 0 deletions
15
plugins/org.eclipse.elk.alg.vertiflex/META-INF/MANIFEST.MF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Manifest-Version: 1.0 | ||
| Automatic-Module-Name: org.eclipse.elk.alg.vertiflex | ||
| Bundle-ManifestVersion: 2 | ||
| Bundle-Name: VertiFlex Tree Layout Algorithm | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other algorithm names start with ELK |
||
| Bundle-SymbolicName: org.eclipse.elk.alg.vertiflex;singleton:=true | ||
| Bundle-Version: 0.11.0.qualifier | ||
| Bundle-Vendor: Eclipse Modeling Project | ||
| Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
| Require-Bundle: com.google.guava, | ||
| org.eclipse.elk.alg.common, | ||
| org.eclipse.elk.core, | ||
| org.eclipse.elk.graph, | ||
| org.eclipse.emf.common | ||
| Export-Package: org.eclipse.elk.alg.vertiflex, | ||
| org.eclipse.elk.alg.vertiflex.options | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| <head> | ||
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | ||
| <title>About</title> | ||
| </head> | ||
| <body lang="EN-US"> | ||
| <h2>About This Content</h2> | ||
|
|
||
| <p>October 11, 2023</p> | ||
| <h3>License</h3> | ||
|
|
||
| <p> | ||
| The Eclipse Foundation makes available all content in this plug-in | ||
| ("Content"). Unless otherwise indicated below, the Content | ||
| is provided to you under the terms and conditions of the Eclipse | ||
| Public License Version 2.0 ("EPL"). A copy of the EPL is | ||
| available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. | ||
| For purposes of the EPL, "Program" will mean the Content. | ||
| </p> | ||
|
|
||
| <p> | ||
| If you did not receive this Content directly from the Eclipse | ||
| Foundation, the Content is being redistributed by another party | ||
| ("Redistributor") and different terms and conditions may | ||
| apply to your use of any object code in the Content. Check the | ||
| Redistributor's license that was provided with the Content. If no such | ||
| license exists, contact the Redistributor. Unless otherwise indicated | ||
| below, the terms and conditions of the EPL still apply to any source | ||
| code in the Content and such source code may be obtained at <a | ||
| href="http://www.eclipse.org/">http://www.eclipse.org</a>. | ||
| </p> | ||
|
|
||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ############################################################################### | ||
| # Copyright (c) 2023 Kiel University and others. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Eclipse Public License 2.0 which is available at | ||
| # http://www.eclipse.org/legal/epl-2.0. | ||
| # | ||
| # SPDX-License-Identifier: EPL-2.0 | ||
| ############################################################################### | ||
| source.. = src/,\ | ||
| src-gen/ | ||
| output.. = bin/ | ||
| bin.includes = META-INF/,\ | ||
| .,\ | ||
| about.html | ||
| src.includes = about.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Vertiflex is a special tree drawing algorithm that diverges from the classic aesthetic constraint that requires nodes to be assigned to discrete layers. | ||
| Instead each node may now come with its own defined height constraint. | ||
| Nodes that do not define their own height constraint are assigned a location based on the defined spacings and the other nodes in the graph. | ||
|
|
||
|  | ||
|
|
||
| The wrapper node in the example illustrates the vertical constraints. | ||
| The node *n1* has a vertical constraint of 115 (see [_ELK's coordinate system_]({{< relref "documentation/tooldevelopers/graphdatastructure/coordinatesystem.html" >}}). | ||
| The node's *n4*, *n7* and *n8* have no vertical constraint and are placed below *n3* to satisfy the specified node node spacing. | ||
|
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| Copyright (c) 2023 Kiel University and others. | ||
|
|
||
| This program and the accompanying materials are made available under the | ||
| terms of the Eclipse Public License 2.0 which is available at | ||
| http://www.eclipse.org/legal/epl-2.0. | ||
|
|
||
| SPDX-License-Identifier: EPL-2.0 | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
| <parent> | ||
| <groupId>org.eclipse.elk</groupId> | ||
| <artifactId>parent</artifactId> | ||
| <version>0.11.0-SNAPSHOT</version> | ||
| <relativePath>../../build/pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <groupId>org.eclipse.elk</groupId> | ||
| <artifactId>org.eclipse.elk.alg.vertiflex</artifactId> | ||
| <name>ELK Y Constraint Tree Layout Algorithm</name> | ||
| <version>0.11.0-SNAPSHOT</version> | ||
| <description>Tree drawing algorithm with y-level constraints.</description> | ||
| <packaging>eclipse-plugin</packaging> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.eclipse.elk</groupId> | ||
| <artifactId>org.eclipse.elk.core</artifactId> | ||
| <version>0.11.0-SNAPSHOT</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.eclipse.elk</groupId> | ||
| <artifactId>org.eclipse.elk.alg.common</artifactId> | ||
| <version>0.11.0-SNAPSHOT</version> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <!-- Generate code from .melk files. --> | ||
| <plugin> | ||
| <groupId>org.eclipse.xtext</groupId> | ||
| <artifactId>xtext-maven-plugin</artifactId> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> |
1 change: 1 addition & 0 deletions
1
...elk.alg.vertiflex/src/META-INF/services/org.eclipse.elk.core.data.ILayoutMetaDataProvider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| org.eclipse.elk.alg.vertiflex.options.VertiFlexMetaDataProvider |
28 changes: 28 additions & 0 deletions
28
.../org.eclipse.elk.alg.vertiflex/src/org/eclipse/elk/alg/vertiflex/EdgeRoutingStrategy.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2023 Kiel University and others. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0. | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| *******************************************************************************/ | ||
| package org.eclipse.elk.alg.vertiflex; | ||
|
|
||
| /** | ||
| * Strategies for routing edges in the tree layout. | ||
| * | ||
| */ | ||
| public enum EdgeRoutingStrategy { | ||
|
|
||
| /** | ||
| * Straight lines between nodes. | ||
| */ | ||
| STRAIGHT, | ||
|
|
||
| /** | ||
| * Allow one bend point in edges to enable more compact layouts while also maintaining the node model order. | ||
| */ | ||
| BEND | ||
|
|
||
| } |
69 changes: 69 additions & 0 deletions
69
...s/org.eclipse.elk.alg.vertiflex/src/org/eclipse/elk/alg/vertiflex/InternalProperties.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2023 Kiel University and others. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0. | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| *******************************************************************************/ | ||
| package org.eclipse.elk.alg.vertiflex; | ||
|
|
||
| import org.eclipse.elk.alg.vertiflex.p2relative.OutlineNode; | ||
| import org.eclipse.elk.graph.ElkNode; | ||
| import org.eclipse.elk.graph.properties.IProperty; | ||
| import org.eclipse.elk.graph.properties.Property; | ||
|
|
||
| /** | ||
| * The internal properties of the tree layouter. Properties that are used internally | ||
| * but do not need to be public are stored here. | ||
| * | ||
| */ | ||
| public final class InternalProperties { | ||
|
|
||
| /** | ||
| * Private constructor to prevent initialization. | ||
| */ | ||
| private InternalProperties() { } | ||
|
|
||
| /** | ||
| * Defines the left outline of this subtree. | ||
| */ | ||
| public static final IProperty<OutlineNode> LEFT_OUTLINE = new Property<OutlineNode>("LEFT_OUTLINE"); | ||
|
|
||
| /** | ||
| * Defines the right outline of this subtree. | ||
| */ | ||
| public static final IProperty<OutlineNode> RIGHT_OUTLINE = new Property<OutlineNode>("RIGHT_OUTLINE"); | ||
|
|
||
| /** | ||
| * Defines the maximum depth of outlines. This is the lowest point of the outline in the tree layout. | ||
| */ | ||
| public static final IProperty<Double> OUTLINE_MAX_DEPTH = new Property<Double>("OUTLINE_MAX_DEPTH"); | ||
|
|
||
| /** Defines the canvas of the tree. */ | ||
| public static final IProperty<Double> MIN_X = new Property<Double>("MIN_X"); | ||
|
|
||
| /** Defines the canvas of the tree. */ | ||
| public static final IProperty<Double> MAX_X = new Property<Double>("MAX_X"); | ||
|
|
||
| /** Defines the canvas of the tree. */ | ||
| public static final IProperty<Double> MIN_Y = new Property<Double>("MIN_Y"); | ||
|
|
||
| /** Defines the canvas of the tree. */ | ||
| public static final IProperty<Double> MAX_Y = new Property<Double>("MAX_Y"); | ||
|
|
||
| /** The root node of the graph. */ | ||
| public static final IProperty<ElkNode> ROOT_NODE = new Property<ElkNode>("root"); | ||
|
|
||
| /** | ||
| * Defines the bendpoint of an edge. | ||
| */ | ||
| public static final IProperty<Double> EDGE_BEND_HEIGHT = new Property<Double>("EDGE_BEND_HEIGHT"); | ||
|
|
||
| /** | ||
| * Stores the model order of nodes. Smaller values come before larger values. | ||
| */ | ||
| public static final IProperty<Integer> NODE_MODEL_ORDER = new Property<Integer>("Node Model Order"); | ||
|
|
||
| } |
81 changes: 81 additions & 0 deletions
81
plugins/org.eclipse.elk.alg.vertiflex/src/org/eclipse/elk/alg/vertiflex/VertiFlex.melk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2023 Kiel University and others. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0. | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| *******************************************************************************/ | ||
| package org.eclipse.elk.alg.vertiflex | ||
|
|
||
| import org.eclipse.elk.alg.vertiflex.EdgeRoutingStrategy | ||
| import org.eclipse.elk.alg.vertiflex.VertiFlexLayoutProvider | ||
| import org.eclipse.elk.core.math.ElkPadding | ||
|
|
||
| /** | ||
| * Declarations for the ELK VertiFlex tree layout algorithm. | ||
| */ | ||
| bundle { | ||
| metadataClass options.VertiFlexMetaDataProvider | ||
| idPrefix org.eclipse.elk.vertiflex | ||
| } | ||
|
|
||
| algorithm vertiflex(VertiFlexLayoutProvider) { | ||
| label "ELK VertiFlex" | ||
| description | ||
| "Tree layout algorithm that allows defining set vertical positions for nodes | ||
| rather than automatically placing nodes on levels according to their topology." | ||
| documentation "@vertiflex.md" | ||
| metadataClass options.VertiFlexOptions | ||
| category org.eclipse.elk.tree | ||
| features multi_edges, edge_labels | ||
| supports org.eclipse.elk.spacing.nodeNode = 20 | ||
| supports org.eclipse.elk.padding = new ElkPadding(5) | ||
| supports org.eclipse.elk.interactive | ||
| supports org.eclipse.elk.portConstraints | ||
| supports org.eclipse.elk.edgeLabels.inline = false | ||
| // Common node micro layout | ||
| supports org.eclipse.elk.omitNodeMicroLayout | ||
| supports org.eclipse.elk.margins | ||
| // Algorithm specific properties | ||
| supports verticalConstraint | ||
| supports layoutStrategy | ||
| supports layerDistance | ||
| supports considerNodeModelOrder | ||
|
|
||
| } | ||
|
|
||
| option verticalConstraint: double { | ||
| label "Fixed vertical position" | ||
| description | ||
| "The Y position that the node should be fixed at." | ||
| targets nodes | ||
| } | ||
|
|
||
| option layoutStrategy: EdgeRoutingStrategy { | ||
| label "Edge layout strategy" | ||
| description | ||
| "Strategy for the layout of the children. 'straight' for straight line drawings, 'bend' for a possible bend. | ||
| When straight edges are prioritized the nodes will be reordered in order to guarantee that straight edges are | ||
| possible. If bend points are enabled on the other hand, the given model order of the nodes is maintained and | ||
| bend points are introduced to prevent edge node overlaps." | ||
| targets nodes | ||
| default = EdgeRoutingStrategy.STRAIGHT | ||
| } | ||
|
|
||
| option layerDistance: double { | ||
| label "Layer distance" | ||
| description | ||
| "The distance to use between nodes of different layers if no vertical constraints are set." | ||
| targets parents | ||
| default = 50.0 | ||
| } | ||
|
|
||
| option considerNodeModelOrder: boolean { | ||
| label "Consider node model order" | ||
| description | ||
| "Consider node model as a secondary criterion when using straight line routing." | ||
| targets parents | ||
| default = true | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Eddykasp Maybe we need a fix for this? I think we are already on a different JavaSE.