Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Guilet2018-10-10 14:09:09 +0000
committerMaxime Porhel2018-10-11 13:15:29 +0000
commit26225147878aee3e6b7eee3cece7c736bc400d1b (patch)
treecde309b8c657208b69a7836c0e20ae38a395f200
parent192174084189f754c76328383d4e08dfcb1e4ea8 (diff)
downloadorg.eclipse.sirius-26225147878aee3e6b7eee3cece7c736bc400d1b.tar.gz
org.eclipse.sirius-26225147878aee3e6b7eee3cece7c736bc400d1b.tar.xz
org.eclipse.sirius-26225147878aee3e6b7eee3cece7c736bc400d1b.zip
[527109] Make hide action in tabbar usable for visible element
- The hide action in tabbar is now usable when visibility is active and the selected diagram element is not hidden. Bug: 527109 Change-Id: Id03eeda5a701300599acd4e848c61cbae5f6b71b Signed-off-by: Pierre Guilet <pierre.guilet@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/visibility/HideDDiagramElementAction.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/visibility/HideDDiagramElementAction.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/visibility/HideDDiagramElementAction.java
index 020ccabf95..8f8f361d06 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/visibility/HideDDiagramElementAction.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/actions/visibility/HideDDiagramElementAction.java
@@ -40,6 +40,7 @@ import org.eclipse.sirius.diagram.DDiagramElementContainer;
import org.eclipse.sirius.diagram.business.api.diagramtype.DiagramTypeDescriptorRegistry;
import org.eclipse.sirius.diagram.business.api.diagramtype.IDiagramDescriptionProvider;
import org.eclipse.sirius.diagram.business.api.diagramtype.IDiagramTypeDescriptor;
+import org.eclipse.sirius.diagram.business.api.query.DDiagramElementQuery;
import org.eclipse.sirius.diagram.business.internal.query.DDiagramElementContainerExperimentalQuery;
import org.eclipse.sirius.diagram.tools.api.command.IDiagramCommandFactory;
import org.eclipse.sirius.diagram.tools.api.command.IDiagramCommandFactoryProvider;
@@ -153,7 +154,8 @@ public class HideDDiagramElementAction extends Action implements IObjectActionDe
if (!ddes.isEmpty()) {
DDiagram parentDiagram = ddes.iterator().next().getParentDiagram();
Predicate<DDiagramElement> allowsHideReveal = allowsHideReveal(parentDiagram);
- return Iterables.all(ddes, allowsHideReveal) && !parentDiagram.isIsInShowingMode();
+ Predicate<DDiagramElement> notDirectlyHidden = dde -> !new DDiagramElementQuery(dde).isHidden();
+ return Iterables.all(ddes, Predicates.and(allowsHideReveal, notDirectlyHidden));
}
}

Back to the top