From 2970b66f622f9703c1ef0082d1f9afbe1d38bf08 Mon Sep 17 00:00:00 2001 From: Cedric Dumoulin Date: Sat, 9 Nov 2013 14:19:55 +0100 Subject: Allows isLayerEnabled properties and explorer delete, move. Factorization of methods in LayerStackSynchronizer. --- .../layers/impl/AbstractLayerOperatorImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'extraplugins/layers/org.eclipse.papyrus.layers.stackmodel') diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/AbstractLayerOperatorImpl.java b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/AbstractLayerOperatorImpl.java index 0e4636ef110..692416e78fb 100644 --- a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/AbstractLayerOperatorImpl.java +++ b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel/src/org/eclipse/papyrus/layers/stackmodel/layers/impl/AbstractLayerOperatorImpl.java @@ -334,6 +334,12 @@ public abstract class AbstractLayerOperatorImpl extends LayerOperatorImpl implem @Override public ComputePropertyValueCommand getComputePropertyValueCommand(View view, Property property) throws LayersException { + // Do nothing if the layer is disable. + if( ! isLayerEnabled() ) { + return null; + } + + // The list of commands provided by each layers EList collectedCmds = new BasicEList(getLayers().size()); @@ -369,6 +375,11 @@ public abstract class AbstractLayerOperatorImpl extends LayerOperatorImpl implem @Override public EList getPropertiesComputePropertyValueCommand(View view, List properties) throws LayersException { + // Do nothing if the layer is disable. + if( ! isLayerEnabled() ) { + return null; + } + // Simple implementation // TODO Check if we can optimize @@ -415,6 +426,11 @@ public abstract class AbstractLayerOperatorImpl extends LayerOperatorImpl implem @Override public EList getViewsComputePropertyValueCommand(List views, Property property) throws LayersException { + // Do nothing if the layer is disable. + if( ! isLayerEnabled() ) { + return null; + } + // Simple implementation // TODO Check if we can optimize -- cgit v1.2.3