Skip to content

Commit efe9a2a

Browse files
committed
sccharts.ui: Adjusted defaults for synthesis options
Label management and label side
1 parent 00765a4 commit efe9a2a

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/LabelPlacementSideHook.xtend

+9-10
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ class LabelPlacementSideHook extends SynthesisHook {
5151
/** The sub category for label placement side selection. */
5252
public static final SynthesisOption LABEL_SIDE_CATEGORY = GeneralSynthesisOptions::LAYOUT
5353

54-
private static final String STRATEGY_CONSISTENT = "Consistent side";
55-
private static final String STRATEGY_SMART = "Smart side";
56-
private static final String STRATEGY_DIRECTIONAL = "Direction-dependent side";
54+
private static final String STRATEGY_CONSISTENT = "Always above";
55+
private static final String STRATEGY_SMART = "Smart";
56+
private static final String STRATEGY_DIRECTIONAL = "Direction-dependent";
5757
private static final String STRATEGY_ON_EDGE = "On edge";
58-
private static final String STRATEGY_ON_EDGE_DIRECTIONAL = "On edge (with arrows)"
58+
private static final boolean ON_EDGE_ARROWS = true;
5959

6060
/** The synthesis option to switch between different side selection strategies. */
6161
public static final SynthesisOption LABEL_SIDE_SELECTION_STRATEGY = SynthesisOption.createChoiceOption(
@@ -64,10 +64,9 @@ class LabelPlacementSideHook extends SynthesisHook {
6464
newLinkedList(
6565
STRATEGY_CONSISTENT,
6666
STRATEGY_SMART,
67-
STRATEGY_DIRECTIONAL,
68-
STRATEGY_ON_EDGE,
69-
STRATEGY_ON_EDGE_DIRECTIONAL),
70-
STRATEGY_CONSISTENT).setCategory(LABEL_SIDE_CATEGORY);
67+
// STRATEGY_DIRECTIONAL,
68+
STRATEGY_ON_EDGE),
69+
STRATEGY_ON_EDGE).setCategory(LABEL_SIDE_CATEGORY);
7170

7271
@Inject
7372
extension TransitionStyles;
@@ -82,7 +81,7 @@ class LabelPlacementSideHook extends SynthesisHook {
8281
override finish(Scope scope, KNode node) {
8382
// If inline labels are enabled, we need to style them appropriately
8483
val strategy = LABEL_SIDE_SELECTION_STRATEGY.objectValue;
85-
if (strategy != STRATEGY_ON_EDGE && strategy != STRATEGY_ON_EDGE_DIRECTIONAL) {
84+
if (strategy != STRATEGY_ON_EDGE) {
8685
// Next-to-edge strategies don't need any further processing
8786
return;
8887
}
@@ -102,7 +101,7 @@ class LabelPlacementSideHook extends SynthesisHook {
102101
LinesDecorator.create()
103102
.withColor(foreground))
104103

105-
if (strategy == STRATEGY_ON_EDGE_DIRECTIONAL) {
104+
if (ON_EDGE_ARROWS) {
106105
inlineLabelConfigurator.addDecoratorRenderingProvider(
107106
DirectionalArrowsDecoratorHotFixed.create()
108107
.withColor(foreground))

plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/LabelShorteningHook.xtend

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class LabelShorteningHook extends SynthesisActionHook {
5555
LabelShorteningStrategies.PRIORITIES,
5656
LabelShorteningStrategies.SEMANTIC_SOFT_WRAPPING,
5757
LabelShorteningStrategies.TRUNCATE
58-
), LabelShorteningStrategies.NO).setCategory(LABEL_MANAGEMENT_CATEGORY).
58+
), LabelShorteningStrategies.SEMANTIC_SOFT_WRAPPING).setCategory(LABEL_MANAGEMENT_CATEGORY).
5959
setUpdateAction(LabelShorteningHook.ID) // Register this action as updater
6060
/** The synthesis option for fixed shorten labels value */
6161
public static val SynthesisOption SHORTEN_LABEL_WIDTH = SynthesisOption::createRangeOption(LabelShorteningHook, "Shortening Width",

0 commit comments

Comments
 (0)