Add a synthesis hook to configure top-down layout for SCCharts#127
Draft
Add a synthesis hook to configure top-down layout for SCCharts#127
Conversation
Member
NiklasRentzCAU
left a comment
There was a problem hiding this comment.
If it also works with the last ELK/KLighD releases, I'd be happy to have it in the semantics master! Alex would need to review first before merging, though.
Comment on lines
42
to
56
| public static final SynthesisOption USE_TOPDOWN_LAYOUT = | ||
| SynthesisOption.createCheckOption(TopdownLayoutHook, "Topdown Layout", false) | ||
| .setCategory(GeneralSynthesisOptions::LAYOUT) | ||
|
|
||
| public static final SynthesisOption TOPDOWN_HIERARCHICAL_NODE_WIDTH = | ||
| SynthesisOption.createRangeOption("Topdown Hierarchical Node Width", 50.0f, 5000.0f, 1.0f, 150.0f) | ||
| .setCategory(GeneralSynthesisOptions::LAYOUT) | ||
|
|
||
| public static final SynthesisOption TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO = | ||
| SynthesisOption.createRangeOption("Topdown Hierarchical Node Aspect Ratio", 0.2f, 5.0f, 0.01f, 1.41f) | ||
| .setCategory(GeneralSynthesisOptions::LAYOUT) | ||
|
|
||
| public static final SynthesisOption SCALE_CAP = | ||
| SynthesisOption.createCheckOption(TopdownLayoutHook, "Enable Scale Cap", true) | ||
| .setCategory(GeneralSynthesisOptions::LAYOUT) |
Member
There was a problem hiding this comment.
- Try to always use the
create...method using the class, that causes better IDs for the options to be generated. - please use the
setDescriptionmethod for each new option: This creates a hover-feedback popup for all options better describing what the option does. For example, I don't really get just from the name what "Enable Scale Cap" in the layout category should do.
Member
There was a problem hiding this comment.
Please order the options the same way as they are used in the displayed synthesis options, or at least alphabetical
| .setCategory(GeneralSynthesisOptions::LAYOUT) | ||
|
|
||
|
|
||
| // public static final SynthesisOption |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This synthesis hook adds a very basic configuration of top-down layout for SCCharts.
depends on eclipse-elk/elk#1089