Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui/src/org/eclipse/papyrus/emf/facet/custom/ui/internal/CustomizedTreeContentProvider.java54
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/build.properties3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisEditor.java1
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisconfigurationEditor.java1
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattabletesterEditor.java1
5 files changed, 11 insertions, 49 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 abd94f120ee..df6273808ed 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
@@ -10,6 +10,7 @@
* Gregoire Dupe (Mia-Software) - Bug 385292 - [CustomizedTreeContentProvider] StackOverFlow when refreshing a TreeViewer with ICustomizedTreeContentProvider
* Gregoire Dupe (Mia-Software) - Bug 386387 - [CustomizedTreeContentProvider] The TreeElements are not preserved between two calls to getElements()
* Christian W. Damus (CEA) - bug 430700
+ * Christian W. Damus (CEA) - bug 440795
*
*******************************************************************************/
package org.eclipse.papyrus.emf.facet.custom.ui.internal;
@@ -43,7 +44,6 @@ import org.eclipse.papyrus.emf.facet.custom.core.exception.CustomizationExceptio
import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EAttributeTreeElement;
import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EReferenceTreeElement;
-import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement;
import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement;
import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeproxyFactory;
@@ -169,7 +169,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
// Just add it
elementList.add(existing);
} else if(element instanceof EObject) {
- final EObjectTreeElement eObjectProxy = createEObjectProxy(element, null);
+ final EObjectTreeElement eObjectProxy = getEObjectProxy(element, null);
elementList.add(eObjectProxy);
} else {
elementList.add(element);
@@ -232,7 +232,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
for (final Object object : result) {
if (object instanceof EObject) {
final EObject childEObject = (EObject) object;
- children.add(createEObjectProxy(childEObject, attributeProxy));
+ children.add(getEObjectProxy(childEObject, attributeProxy));
}
children.add(object);
}
@@ -275,7 +275,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
final EObject referedEObject = facetManager.getOrInvoke(
eObject, eReference, EObject.class);
if (referedEObject != null) {
- child = createEObjectProxy(referedEObject, parent);
+ child = getEObjectProxy(referedEObject, parent);
}
} catch (final FacetManagerException e) {
Logger.logError(e, Activator.getDefault());
@@ -299,7 +299,7 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
for (final Object object : result) {
if (object instanceof EObject) {
final EObject childEObject = (EObject) object;
- children.add(createEObjectProxy(childEObject, parent));
+ children.add(getEObjectProxy(childEObject, parent));
}
}
} catch (final FacetManagerException e) {
@@ -311,44 +311,6 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
return children;
}
-
-
- private Collection<EAttributeTreeElement> createAttributeProxies(final List<EAttribute> allAttributes, final EObjectTreeElement parent) {
- final EObject eObject = parent.getEObject();
- final List<EAttributeTreeElement> result = new ArrayList<EAttributeTreeElement>();
- for (final EAttribute eAttribute : allAttributes) {
- if (isVisible(eObject, eAttribute)) {
- final EAttributeTreeElement attributeProxy = TreeproxyFactory.eINSTANCE.createEAttributeTreeElement();
- attributeProxy.setEAttribute(eAttribute);
- attributeProxy.setParent(parent);
- result.add(attributeProxy);
- }
- }
- return result;
- }
-
-
-
- private Collection<? extends Object> createReferenceProxies(final List<EReference> allReferences, final EObjectTreeElement parent) {
- final EObject eObject = parent.getEObject();
- final List<EReferenceTreeElement> result = new ArrayList<EReferenceTreeElement>();
- for (final EReference eReference : allReferences) {
- if (isVisible(eObject, eReference)) {
- if(!(collapseLink(eObject, eReference))) {
- final EReferenceTreeElement referenceProxy = TreeproxyFactory.eINSTANCE.createEReferenceTreeElement();
- referenceProxy.setEReference(eReference);
- referenceProxy.setParent(parent);
- result.add(referenceProxy);
- }
- else{
- System.err.println("Do not Create an eReference"+ eReference+" create directly its childreen");
- }
-
- }
- }
- return result;
- }
-
public Object getParent(final Object element) {
Object result = null;
if (element instanceof TreeElement) {
@@ -365,7 +327,9 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
- // nothing to do
+ if(oldInput != newInput) {
+ cache.clear();
+ }
}
public ICustomizationManager getCustomizationManager() {
@@ -544,4 +508,4 @@ public class CustomizedTreeContentProvider implements ICustomizedTreeContentProv
public void dispose() {
cache.clear();
}
-}
+} \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/build.properties b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/build.properties
index c53991b03c5..5cf99b8d514 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/build.properties
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/build.properties
@@ -17,6 +17,7 @@ bin.includes = .,\
plugin.pdoc,\
about.html
jars.compile.order = .
-source.. = src-gen/
+source.. = src-gen/,\
+ custom-src/
output.. = bin
src.includes = about.html
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisEditor.java
index c9f4bdd9909..c43656556ef 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisEditor.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisEditor.java
@@ -9,7 +9,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.XMIResource;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.presentation.NattableaxisEditor;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.presentation.NattableconfigurationEditor;
import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisconfigurationEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisconfigurationEditor.java
index 78b188bd0d6..4421e7facc6 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisconfigurationEditor.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattableaxisconfigurationEditor.java
@@ -9,7 +9,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.XMIResource;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.presentation.NattableaxisconfigurationEditor;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.presentation.NattableconfigurationEditor;
import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattabletesterEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattabletesterEditor.java
index cf7f43a0b44..18d8ee2bc8f 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattabletesterEditor.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/custom-src/org/eclipse/papyrus/infra/nattable/model/editor/customeditors/CustomNattabletesterEditor.java
@@ -8,7 +8,6 @@ import org.eclipse.emf.common.command.BasicCommandStack;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.XMIResource;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.presentation.NattableconfigurationEditor;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.presentation.NattabletesterEditor;
import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
import org.eclipse.ui.IEditorPart;

Back to the top