Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Faltermeier2017-02-09 15:40:42 +0000
committerJohannes Faltermeier2017-02-09 15:40:42 +0000
commit751cbf631d746de552b1be787b4a0254ee3dd9e4 (patch)
treea736eb6210c97224cb75a0222cc64d346d687605 /bundles
parent647eba075381a9ce686af06fa112dc107829d539 (diff)
parentfd7a0260152b3c3351559dd582390dc6a3074c91 (diff)
downloadorg.eclipse.emf.ecp.core-751cbf631d746de552b1be787b4a0254ee3dd9e4.tar.gz
org.eclipse.emf.ecp.core-751cbf631d746de552b1be787b4a0254ee3dd9e4.tar.xz
org.eclipse.emf.ecp.core-751cbf631d746de552b1be787b4a0254ee3dd9e4.zip
Merge branch 'develop' into feature_inputValidation
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.emf.ecp.view.model/src/org/eclipse/emf/ecp/view/spi/model/impl/VElementImpl.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/bundles/org.eclipse.emf.ecp.view.model/src/org/eclipse/emf/ecp/view/spi/model/impl/VElementImpl.java b/bundles/org.eclipse.emf.ecp.view.model/src/org/eclipse/emf/ecp/view/spi/model/impl/VElementImpl.java
index 197bfd5b0c..d939d8c159 100644
--- a/bundles/org.eclipse.emf.ecp.view.model/src/org/eclipse/emf/ecp/view/spi/model/impl/VElementImpl.java
+++ b/bundles/org.eclipse.emf.ecp.view.model/src/org/eclipse/emf/ecp/view/spi/model/impl/VElementImpl.java
@@ -650,6 +650,17 @@ public abstract class VElementImpl extends EObjectImpl implements VElement {
return result.toString();
}
+ private VElement getVElementParent() {
+ EObject parent = eContainer();
+ while (parent != null) {
+ if (VElement.class.isInstance(parent)) {
+ return VElement.class.cast(parent);
+ }
+ parent = parent.eContainer();
+ }
+ return null;
+ }
+
/**
*
* {@inheritDoc}
@@ -660,9 +671,9 @@ public abstract class VElementImpl extends EObjectImpl implements VElement {
@Override
public boolean isEffectivelyVisible() {
boolean result = isVisible();
- final EObject parent = eContainer();
+ final VElement parent = getVElementParent();
if (parent != null) {
- result &= VElement.class.cast(parent).isEffectivelyVisible();
+ result &= parent.isEffectivelyVisible();
}
return result;
}
@@ -677,9 +688,9 @@ public abstract class VElementImpl extends EObjectImpl implements VElement {
@Override
public boolean isEffectivelyEnabled() {
boolean result = isEnabled();
- final EObject parent = eContainer();
+ final VElement parent = getVElementParent();
if (parent != null) {
- result &= VElement.class.cast(parent).isEffectivelyEnabled();
+ result &= parent.isEffectivelyEnabled();
}
return result;
}
@@ -694,9 +705,9 @@ public abstract class VElementImpl extends EObjectImpl implements VElement {
@Override
public boolean isEffectivelyReadonly() {
boolean result = isReadonly();
- final EObject parent = eContainer();
+ final VElement parent = getVElementParent();
if (parent != null) {
- result &= VElement.class.cast(parent).isEffectivelyReadonly();
+ result &= parent.isEffectivelyReadonly();
}
return result;
}

Back to the top