Skip to content
Snippets Groups Projects
Commit b66edde0 authored by Andreas Bayha's avatar Andreas Bayha
Browse files

Merge remote-tracking branch 'origin/master' into 4279


Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parents 41d046ba 0a17507d
No related branches found
No related tags found
1 merge request!2114279
Pipeline #39229 passed
Pipeline: maven-releng

#39230

    Showing
    with 35 additions and 18 deletions
    ...@@ -2,7 +2,7 @@ DiagramCoordinate.java 6b00aec99054d4cd19003a72bd4e5e774ac6a641 GREEN ...@@ -2,7 +2,7 @@ DiagramCoordinate.java 6b00aec99054d4cd19003a72bd4e5e774ac6a641 GREEN
    DiagramLayers.java aa1f95dbae290c8b00202abe4385b01b8f36e5ab GREEN DiagramLayers.java aa1f95dbae290c8b00202abe4385b01b8f36e5ab GREEN
    DiagramViewer.java 537358db18da8b5ba2bf56082bfd87dec3ca88d8 GREEN DiagramViewer.java 537358db18da8b5ba2bf56082bfd87dec3ca88d8 GREEN
    DiagramViewerDefaultTags.java 6230763252409c60009ab8887b4ef582cf883229 GREEN DiagramViewerDefaultTags.java 6230763252409c60009ab8887b4ef582cf883229 GREEN
    DiagramViewerFeatures.java 3dd78d9c117fc156924a151c6f8d770c53c103bc GREEN DiagramViewerFeatures.java b48515b91e81cb07b405a92ab02925815f128ce9 GREEN
    DiagramViewerSelection.java e833f592543bc97077907d980a39b123fc4044e6 GREEN DiagramViewerSelection.java e833f592543bc97077907d980a39b123fc4044e6 GREEN
    EDragGesture.java 5cfa098d3877db11981c2750e5e103156d62fc5e GREEN EDragGesture.java 5cfa098d3877db11981c2750e5e103156d62fc5e GREEN
    FeedbackChange.java b088fa89af648f1674f2f9c1f7f99d585ce801ca GREEN FeedbackChange.java b088fa89af648f1674f2f9c1f7f99d585ce801ca GREEN
    ......
    /******************************************************************************* /*******************************************************************************
    * Copyright (c) 2019, 2020 fortiss GmbH. * Copyright (c) 2019, 2020, 2023 fortiss GmbH.
    * *
    * This program and the accompanying materials are made available under the * This program and the accompanying materials are made available under the
    * terms of the Apache License, Version 2.0 which is available at * terms of the Apache License, Version 2.0 which is available at
    ...@@ -51,7 +51,9 @@ public final class DiagramViewerFeatures { ...@@ -51,7 +51,9 @@ public final class DiagramViewerFeatures {
    /** The flag for drawing the outer border, which occupies the first grid row and lane. */ /** The flag for drawing the outer border, which occupies the first grid row and lane. */
    private boolean drawOuterBorder = true; private boolean drawOuterBorder = true;
    /** The indicator type. */ /** The indicator type. */
    private IndicatorType indicatorType = IndicatorType.CROSS; private IndicatorType currentIndicatorType = IndicatorType.INVISIBLE;
    /** The indicator type to be used, when enabling the grid. */
    private IndicatorType defaultIndicatorType = IndicatorType.CROSS;
    /** The background color. */ /** The background color. */
    private Color backgroundColor = LIGHTGRAY; private Color backgroundColor = LIGHTGRAY;
    /** The help text for the diagram viewer in-place help */ /** The help text for the diagram viewer in-place help */
    ...@@ -149,15 +151,20 @@ public final class DiagramViewerFeatures { ...@@ -149,15 +151,20 @@ public final class DiagramViewerFeatures {
    /** Returns the indicator type. */ /** Returns the indicator type. */
    public IndicatorType getIndicatorType() { public IndicatorType getIndicatorType() {
    return indicatorType; return currentIndicatorType;
    } }
    /** Sets the indicator type. */ /** Sets the indicator type. */
    public void setIndicatorType(IndicatorType indicatorType) { public void setIndicatorType(IndicatorType indicatorType) {
    this.indicatorType = indicatorType; this.currentIndicatorType = indicatorType;
    viewer.updateAllVisuals(); viewer.updateAllVisuals();
    } }
    /** Sets the displayed indicator type to the default value. */
    public void setIndicatorTypeToDefault() {
    setIndicatorType(defaultIndicatorType);
    }
    /** Returns the background color. */ /** Returns the background color. */
    public Color getBackgroundColor() { public Color getBackgroundColor() {
    return backgroundColor; return backgroundColor;
    ...@@ -316,4 +323,14 @@ public final class DiagramViewerFeatures { ...@@ -316,4 +323,14 @@ public final class DiagramViewerFeatures {
    public void setHelpText(String helpText) { public void setHelpText(String helpText) {
    this.helpText = helpText; this.helpText = helpText;
    } }
    /** Retrieves the indicator type to be used, when enabling indicators. */
    public IndicatorType getDefaultIndicatorType() {
    return defaultIndicatorType;
    }
    /** Sets the indicator type to be used when enabling the grid. */
    public void setDefaultIndicatorType(IndicatorType defaultIndicatorType) {
    this.defaultIndicatorType = defaultIndicatorType;
    }
    } }
    ...@@ -2,7 +2,7 @@ AnchorageContentControllerBase.java da56b10cbf2711b5da69f0b59f43eacbe54f4eea GRE ...@@ -2,7 +2,7 @@ AnchorageContentControllerBase.java da56b10cbf2711b5da69f0b59f43eacbe54f4eea GRE
    ClickControllerBase.java 8e5861ed5f9318008ad0fdd5497ed320cd5bd647 GREEN ClickControllerBase.java 8e5861ed5f9318008ad0fdd5497ed320cd5bd647 GREEN
    ContentAnchorageMoveControllerBase.java c18e7915ce23e124757f5b736086ecc46694800a GREEN ContentAnchorageMoveControllerBase.java c18e7915ce23e124757f5b736086ecc46694800a GREEN
    ControllerBase.java 9311521b252e46640e26d409610e527fd5ed6922 GREEN ControllerBase.java 9311521b252e46640e26d409610e527fd5ed6922 GREEN
    DefaultDiagramController.java 3f60229b2e0fe0b6ac40c617858cc5a0685a59eb GREEN DefaultDiagramController.java f707d03674e42aacc7d5d8b3eb8d15b45add2004 GREEN
    DelegatingContentAnchorageController.java 1889628a346a2183082ffe213978f9d15a949494 GREEN DelegatingContentAnchorageController.java 1889628a346a2183082ffe213978f9d15a949494 GREEN
    DragControllerBase.java b15ff874304f679fe494d85f57cc8cbe4d0d1d15 GREEN DragControllerBase.java b15ff874304f679fe494d85f57cc8cbe4d0d1d15 GREEN
    DraggingUtils.java 95117e2ea4c36b6c6a31f8088bb95b484e0e6612 GREEN DraggingUtils.java 95117e2ea4c36b6c6a31f8088bb95b484e0e6612 GREEN
    ......
    ...@@ -34,9 +34,6 @@ public class DefaultDiagramController extends ControllerBase { ...@@ -34,9 +34,6 @@ public class DefaultDiagramController extends ControllerBase {
    /** Flag for ignoring mouse click event after dragging gesture. */ /** Flag for ignoring mouse click event after dragging gesture. */
    private boolean ignoreNextMouseClick = false; private boolean ignoreNextMouseClick = false;
    /** Previous grid indicator type (to restore grid after it has been hidden). */
    private IndicatorType previousGridIndicatorType = null;
    /** Constructor. */ /** Constructor. */
    public DefaultDiagramController(IMVCBundle mvcb) { public DefaultDiagramController(IMVCBundle mvcb) {
    super(mvcb); super(mvcb);
    ...@@ -83,16 +80,13 @@ public class DefaultDiagramController extends ControllerBase { ...@@ -83,16 +80,13 @@ public class DefaultDiagramController extends ControllerBase {
    private MenuItem createGridMenuItem(DiagramViewerFeatures features) { private MenuItem createGridMenuItem(DiagramViewerFeatures features) {
    MenuItem gridMenuItem = null; MenuItem gridMenuItem = null;
    if(features.getIndicatorType() == IndicatorType.INVISIBLE) { if(features.getIndicatorType() == IndicatorType.INVISIBLE) {
    if(previousGridIndicatorType != null) { gridMenuItem = new MenuItem("Show Grid");
    gridMenuItem = new MenuItem("Show Grid"); gridMenuItem.setOnAction(evt -> {
    gridMenuItem.setOnAction(evt -> { features.setIndicatorTypeToDefault();
    features.setIndicatorType(previousGridIndicatorType); });
    });
    }
    } else { } else {
    gridMenuItem = new MenuItem("Hide Grid"); gridMenuItem = new MenuItem("Hide Grid");
    gridMenuItem.setOnAction(evt -> { gridMenuItem.setOnAction(evt -> {
    previousGridIndicatorType = features.getIndicatorType();
    features.setIndicatorType(IndicatorType.INVISIBLE); features.setIndicatorType(IndicatorType.INVISIBLE);
    }); });
    } }
    ......
    CrossFeatureConstraintPropertySectionBase.java 37e772fb3471f85320170d373cbe2f319c350655 GREEN CrossFeatureConstraintPropertySectionBase.java 37e772fb3471f85320170d373cbe2f319c350655 GREEN
    FeaturePropertySectionBase.java 598842b12b5bbb6f3cf2461a4d05fc721b637f54 GREEN FeaturePropertySectionBase.java 9b338ff5ab4c70179d406bc0d76b8c62a1dbc8ae GREEN
    HasPresenceConditionPropertySectionBase.java ef300f0d9294d76f5d80e45b8cc0d94c24586a24 GREEN HasPresenceConditionPropertySectionBase.java ef300f0d9294d76f5d80e45b8cc0d94c24586a24 GREEN
    ...@@ -56,6 +56,7 @@ public class FeaturePropertySectionBase extends PropertySectionBase { ...@@ -56,6 +56,7 @@ public class FeaturePropertySectionBase extends PropertySectionBase {
    if(feature.eContainer() instanceof AbstractAlternativeFeature || if(feature.eContainer() instanceof AbstractAlternativeFeature ||
    feature instanceof AbstractFeatureModel) { feature instanceof AbstractFeatureModel) {
    optionalCheckbox.setEnabled(false); optionalCheckbox.setEnabled(false);
    optionalCheckbox.setSelection(false);
    } else { } else {
    optionalCheckbox.setEnabled(true); optionalCheckbox.setEnabled(true);
    optionalCheckbox.setSelection(feature.isOptional()); optionalCheckbox.setSelection(feature.isOptional());
    ......
    VariabilityModelElementFactory.java 5a50d78b0fc94a20329b95991b519a3e3fbf4410 GREEN VariabilityModelElementFactory.java 5a50d78b0fc94a20329b95991b519a3e3fbf4410 GREEN
    VariabilityStaticImpl.java d274310be2b110c002b3e514bc570fd5f4f6e48a GREEN VariabilityStaticImpl.java 96bc4364ebe635c94fafbd3ef60b8237b18c17c6 GREEN
    ...@@ -30,6 +30,7 @@ import org.eclipse.emf.ecore.EObject; ...@@ -30,6 +30,7 @@ import org.eclipse.emf.ecore.EObject;
    import org.fortiss.variability.model.base.RemoveBindingStrategy; import org.fortiss.variability.model.base.RemoveBindingStrategy;
    import org.fortiss.variability.model.features.AbstractAlternativeFeature; import org.fortiss.variability.model.features.AbstractAlternativeFeature;
    import org.fortiss.variability.model.features.AbstractFeature; import org.fortiss.variability.model.features.AbstractFeature;
    import org.fortiss.variability.model.features.AbstractFeatureModel;
    import org.fortiss.variability.model.features.configuration.AlternativeFeatureConfiguration; import org.fortiss.variability.model.features.configuration.AlternativeFeatureConfiguration;
    import org.fortiss.variability.model.features.configuration.CompositionalFeatureConfiguration; import org.fortiss.variability.model.features.configuration.CompositionalFeatureConfiguration;
    import org.fortiss.variability.model.features.configuration.IFeatureConfiguration; import org.fortiss.variability.model.features.configuration.IFeatureConfiguration;
    ...@@ -327,6 +328,10 @@ public class VariabilityStaticImpl { ...@@ -327,6 +328,10 @@ public class VariabilityStaticImpl {
    return false; return false;
    } }
    if(target instanceof AbstractFeatureModel) {
    return subject == target;
    }
    return target.getClass() == subject.getClass() && return target.getClass() == subject.getClass() &&
    ((AbstractFeature)target).getName().equals(subject.getName()); ((AbstractFeature)target).getName().equals(subject.getName());
    } }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment