Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/CustomizationsDelegatingList.java53
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java2
2 files changed, 46 insertions, 9 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/CustomizationsDelegatingList.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/CustomizationsDelegatingList.java
index afcebd1f5c7..f3fb45e2d40 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/CustomizationsDelegatingList.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/CustomizationsDelegatingList.java
@@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.papyrus.emf.facet.custom.core.internal;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
@@ -41,18 +42,45 @@ public class CustomizationsDelegatingList implements List<Customization> {
}
public Iterator<Customization> iterator() {
- // FIXME implement
- throw new UnsupportedOperationException("not implemented"); //$NON-NLS-1$
+ ArrayList<Customization> tmp= new ArrayList<Customization>();
+ for(Iterator<FacetSet> iterator = this.delegate.iterator(); iterator.hasNext();) {
+ FacetSet facetSet = (FacetSet)iterator.next();
+ if( facetSet instanceof Customization){
+ tmp.add((Customization)facetSet);
+ }
+
+ }
+
+
+ return tmp.iterator(); //$NON-NLS-1$
}
public Object[] toArray() {
- // FIXME implement
- throw new UnsupportedOperationException("not implemented"); //$NON-NLS-1$
+ ArrayList<Customization> tmp= new ArrayList<Customization>();
+ for(Iterator<FacetSet> iterator = this.delegate.iterator(); iterator.hasNext();) {
+ FacetSet facetSet = (FacetSet)iterator.next();
+ if( facetSet instanceof Customization){
+ tmp.add((Customization)facetSet);
+ }
+
+ }
+
+
+ return tmp.toArray(); //$NON-NLS-1$
}
public <T> T[] toArray(final T[] a) {
- // FIXME implement
- throw new UnsupportedOperationException("not implemented"); //$NON-NLS-1$
+ ArrayList<Customization> tmp= new ArrayList<Customization>();
+ for(Iterator<FacetSet> iterator = this.delegate.iterator(); iterator.hasNext();) {
+ FacetSet facetSet = (FacetSet)iterator.next();
+ if( facetSet instanceof Customization){
+ tmp.add((Customization)facetSet);
+ }
+
+ }
+
+
+ return tmp.toArray(a);
}
public boolean add(final Customization o) {
@@ -64,8 +92,17 @@ public class CustomizationsDelegatingList implements List<Customization> {
}
public boolean containsAll(final Collection<?> c) {
- // FIXME implement
- throw new UnsupportedOperationException("not implemented"); //$NON-NLS-1$
+ ArrayList<Customization> tmp= new ArrayList<Customization>();
+ for(Iterator<FacetSet> iterator = this.delegate.iterator(); iterator.hasNext();) {
+ FacetSet facetSet = (FacetSet)iterator.next();
+ if( facetSet instanceof Customization){
+ tmp.add((Customization)facetSet);
+ }
+
+ }
+
+
+ return tmp.containsAll(c);
}
public boolean addAll(final Collection<? extends Customization> c) {
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java
index f67a78594b4..d1819aa0689 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/LoadBrowserCustomization.java
@@ -112,7 +112,7 @@ public class LoadBrowserCustomization extends AbstractHandler {
return null;
}
};
- ILoadCustomizationsDialog dialog=ILoadCustomizationsDialogFactory.DEFAULT.createLoadCustomizationDialog(shell, registeredCustomizations, Collections.EMPTY_LIST, dialogCallBack);
+ ILoadCustomizationsDialog dialog=ILoadCustomizationsDialogFactory.DEFAULT.createLoadCustomizationDialog(shell, registeredCustomizations, customizationManager.getManagedCustomizations(), dialogCallBack);
//
// try {
// ServicesRegistry registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);

Back to the top