Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-03-05 12:45:44 +0000
committerptessier2014-03-05 12:45:44 +0000
commitb97d916544dbefc0965e2ce96f28851bf78a0257 (patch)
treee929b11aaaa21bac7ff5cd5e0325542558285316 /plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui
parent7e597be478eb26ea14533d06c580be9da689c698 (diff)
downloadorg.eclipse.papyrus-b97d916544dbefc0965e2ce96f28851bf78a0257.tar.gz
org.eclipse.papyrus-b97d916544dbefc0965e2ce96f28851bf78a0257.tar.xz
org.eclipse.papyrus-b97d916544dbefc0965e2ce96f28851bf78a0257.zip
Bug 386118 - [EMF Facet] Papyrus should progressively support EMF Facet
0.2 add custom for UML
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui/src/org/eclipse/papyrus/emf/facet/custom/ui/internal/CustomizedTreeContentProvider.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui/src/org/eclipse/papyrus/emf/facet/custom/ui/internal/CustomizedTreeContentProvider.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui/src/org/eclipse/papyrus/emf/facet/custom/ui/internal/CustomizedTreeContentProvider.java
index 7c55f248153..03f85f9b10d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui/src/org/eclipse/papyrus/emf/facet/custom/ui/internal/CustomizedTreeContentProvider.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui/src/org/eclipse/papyrus/emf/facet/custom/ui/internal/CustomizedTreeContentProvider.java
@@ -53,7 +53,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
private final IContentPropertiesHandler contentHandler;
private Object previousInput;
private Object[] rootElements;
-
+
private final Map<EObjectCacheElement, TreeElement> cache;
private class EObjectCacheElement {
@@ -309,7 +309,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
return result;
}
-
+
private Collection<? extends Object> createReferenceProxies(final List<EReference> allReferences, final EObjectTreeElement parent) {
final EObject eObject = parent.getEObject();
@@ -325,7 +325,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
else{
System.err.println("Do not Create an eReference"+ eReference+" create directly its childreen");
}
-
+
}
}
return result;
@@ -344,7 +344,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
return getChildren(element).length > 0;
}
-
+
public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
// nothing to do
@@ -379,9 +379,9 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
}
return result.booleanValue();
}
-
-
-
+
+
+
private Collection<? extends Object> createReferences(final EObjectTreeElement treeElement) {
final EObject eObject = treeElement.getEObject();
final EClass eClass = eObject.eClass();
@@ -433,9 +433,11 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
List<TreeElement> result = new LinkedList<TreeElement>();
for(EAttribute eAttribute : allAttributes) {
- TreeElement eAttributeTreeElement = getEAttributeProxy(eAttribute, treeElement);
- if(eAttributeTreeElement != null) {
- result.add(eAttributeTreeElement);
+ if(isVisible(eObject, eAttribute)) {
+ TreeElement eAttributeTreeElement = getEAttributeProxy(eAttribute, treeElement);
+ if(eAttributeTreeElement != null) {
+ result.add(eAttributeTreeElement);
+ }
}
}
return result;

Back to the top