Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorsten Sommer2013-05-24 15:12:13 +0000
committerTorsten Sommer2013-05-24 15:12:13 +0000
commit5107da15e808f83a7e1a7e61d1ea8a69a614ee66 (patch)
tree150a180efb0e18d285a41b1c24cd340c673dd8d2 /bundles
parent83460fcc49ca3cb3edd30eed8ab8d0714d4c3391 (diff)
downloadorg.eclipse.efxclipse-ecp_10.tar.gz
org.eclipse.efxclipse-ecp_10.tar.xz
org.eclipse.efxclipse-ecp_10.zip
Applied API changes in ECP 1.0.ecp_10
Diffstat (limited to 'bundles')
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyControlContext.java7
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProject.java42
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProjectManager.java18
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProvider.java84
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProviderRegistry.java18
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepository.java24
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepositoryManager.java11
-rw-r--r--bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/impl/ControlFactoryRegistryImpl.java8
8 files changed, 93 insertions, 119 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyControlContext.java b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyControlContext.java
index 7e205259a..cd8e46f8b 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyControlContext.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyControlContext.java
@@ -1,5 +1,7 @@
package org.eclipse.fx.ecp.dummy;
+import java.util.Locale;
+
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
@@ -55,4 +57,9 @@ public class DummyControlContext implements ECPControlContext {
throw new UnsupportedOperationException();
}
+ @Override
+ public Locale getLocale() {
+ throw new UnsupportedOperationException();
+ }
+
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProject.java b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProject.java
index 47f25b333..293444347 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProject.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProject.java
@@ -9,7 +9,6 @@ import org.eclipse.emf.ecp.core.ECPProject;
import org.eclipse.emf.ecp.core.ECPProvider;
import org.eclipse.emf.ecp.core.ECPRepository;
import org.eclipse.emf.ecp.core.util.ECPElement;
-import org.eclipse.emf.ecp.core.util.ECPModelContext;
import org.eclipse.emf.ecp.core.util.ECPProperties;
import org.eclipse.emf.edit.domain.EditingDomain;
@@ -38,19 +37,14 @@ public class DummyProject implements ECPProject {
}
@Override
- public String getType() {
- return ECPProject.TYPE;
- }
-
- @Override
public int compareTo(ECPElement arg0) {
throw new UnsupportedOperationException("Not implemented yet");
}
- @Override
- public ECPModelContext getContext() {
- throw new UnsupportedOperationException("Not implemented yet");
- }
+// @Override
+// public ECPModelContext getContext() {
+// throw new UnsupportedOperationException("Not implemented yet");
+// }
@Override
public ECPProvider getProvider() {
@@ -97,30 +91,34 @@ public class DummyProject implements ECPProject {
return workspace.getEditingDomain();
}
+
+// @Override
+// public EList<Object> getElements() {
+// EList<? extends Object> contents = ECollections.unmodifiableEList(resource.getContents());
+// return (EList<Object>) contents;
+// }
+
@Override
- public Object getAdapter(Class adapter) {
- throw new UnsupportedOperationException("Not implemented yet");
+ public void deleteElements(Collection<Object> objects) {
+ throw new UnsupportedOperationException();
}
@Override
- public EList<Object> getElements() {
+ public EList<Object> getContents() {
EList<? extends Object> contents = ECollections.unmodifiableEList(resource.getContents());
return (EList<Object>) contents;
}
@Override
- public void saveModel() {
- throw new UnsupportedOperationException();
+ public void saveContents() {
+ // TODO Auto-generated method stub
+
}
@Override
- public boolean isModelDirty() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void deleteElements(Collection<Object> objects) {
- throw new UnsupportedOperationException();
+ public boolean hasDirtyContents() {
+ // TODO Auto-generated method stub
+ return false;
}
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProjectManager.java b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProjectManager.java
index 91adf8a0c..a0f588358 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProjectManager.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProjectManager.java
@@ -7,31 +7,26 @@ import org.eclipse.emf.ecp.core.ECPProjectManager;
import org.eclipse.emf.ecp.core.ECPProvider;
import org.eclipse.emf.ecp.core.ECPRepository;
import org.eclipse.emf.ecp.core.util.ECPProperties;
-import org.eclipse.emf.ecp.core.util.observer.ECPProjectManagerObserver;
public class DummyProjectManager implements ECPProjectManager {
DummyWorkspace workspace = DummyWorkspace.INSTANCE;
@Override
- public ECPProject createProject(ECPProvider provider, String name) throws ProjectWithNameExistsException {
+ public ECPProject createProject(ECPProvider provider, String name) {
throw new UnsupportedOperationException();
}
@Override
- public ECPProject createProject(ECPProvider provider, String name, ECPProperties properties) throws ProjectWithNameExistsException {
+ public ECPProject createProject(ECPProvider provider, String name, ECPProperties properties) {
throw new UnsupportedOperationException();
}
@Override
- public ECPProject createProject(ECPRepository repository, String name, ECPProperties properties) throws ProjectWithNameExistsException {
+ public ECPProject createProject(ECPRepository repository, String name, ECPProperties properties) {
throw new UnsupportedOperationException();
}
- @Override
- public ECPProject cloneProject(ECPProject project) {
- throw new UnsupportedOperationException();
- }
@Override
public ECPProject getProject(Object adaptable) {
@@ -49,12 +44,7 @@ public class DummyProjectManager implements ECPProjectManager {
}
@Override
- public void addObserver(ECPProjectManagerObserver observer) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void removeObserver(ECPProjectManagerObserver observer) {
+ public ECPProject createProject(ECPProject arg0, String arg1) {
throw new UnsupportedOperationException();
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProvider.java b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProvider.java
index 8a101c380..3cb3d923c 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProvider.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProvider.java
@@ -1,7 +1,6 @@
package org.eclipse.fx.ecp.dummy;
import java.util.Collection;
-import java.util.Collections;
import java.util.Iterator;
import java.util.Set;
@@ -13,9 +12,8 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecp.core.ECPProject;
import org.eclipse.emf.ecp.core.ECPProjectManager;
import org.eclipse.emf.ecp.core.ECPProvider;
-import org.eclipse.emf.ecp.core.ECPRepository;
+import org.eclipse.emf.ecp.core.util.ECPContainer;
import org.eclipse.emf.ecp.core.util.ECPElement;
-import org.eclipse.emf.ecp.core.util.ECPModelContext;
import org.eclipse.emf.ecp.spi.core.InternalProject;
import org.eclipse.emf.ecp.spi.core.InternalProvider;
import org.eclipse.emf.ecp.spi.core.InternalRepository;
@@ -35,11 +33,6 @@ public class DummyProvider implements InternalProvider {
}
@Override
- public String getType() {
- return ECPProvider.TYPE;
- }
-
- @Override
public int compareTo(ECPElement arg0) {
throw new UnsupportedOperationException();
}
@@ -54,15 +47,15 @@ public class DummyProvider implements InternalProvider {
throw new UnsupportedOperationException();
}
- @Override
- public Set<ECPRepository> getRepositories() {
- return Collections.singleton((ECPRepository) workspace.getRepository());
- }
+// @Override
+// public Set<ECPRepository> getRepositories() {
+// return Collections.singleton((ECPRepository) workspace.getRepository());
+// }
- @Override
- public boolean canAddRepositories() {
- return false;
- }
+// @Override
+// public boolean canAddRepositories() {
+// return false;
+// }
// @Override
// public boolean hasUnsharedProjectSupport() {
@@ -74,10 +67,10 @@ public class DummyProvider implements InternalProvider {
throw new UnsupportedOperationException();
}
- @Override
- public ECPModelContext getModelContext(Object element) {
- throw new UnsupportedOperationException();
- }
+// @Override
+// public ECPModelContext getModelContext(Object element) {
+// throw new UnsupportedOperationException();
+// }
@Override
public void setLabel(String label) {
@@ -140,14 +133,15 @@ public class DummyProvider implements InternalProvider {
}
@Override
- public void fillChildren(ECPModelContext context, Object parent, InternalChildrenList childrenList) {
+ public void fillChildren(ECPContainer context, Object parent, InternalChildrenList childrenList) {
if (parent instanceof ECPProjectManager) {
childrenList.addChildren(((ECPProjectManager) parent).getProjects());
}
else if (parent instanceof ECPProject) {
- childrenList.addChildren(((ECPProject) parent).getElements());
+ EList<Object> contents = ((ECPProject) parent).getContents();
+ childrenList.addChildren(contents);
}
else {
@@ -160,10 +154,10 @@ public class DummyProvider implements InternalProvider {
return;
}
- @Override
- public void handleLifecycle(ECPModelContext context, LifecycleEvent event) {
- throw new UnsupportedOperationException();
- }
+// @Override
+// public void handleLifecycle(ECPModelContext context, LifecycleEvent event) {
+// throw new UnsupportedOperationException();
+// }
@Override
public EList<? extends Object> getElements(InternalProject project) {
@@ -220,10 +214,10 @@ public class DummyProvider implements InternalProvider {
throw new UnsupportedOperationException();
}
- @Override
- public boolean canAddOfflineProjects() {
- return false;
- }
+// @Override
+// public boolean canAddOfflineProjects() {
+// return false;
+// }
@Override
public Set<EPackage> getUnsupportedEPackages(Collection<EPackage> ePackages, InternalRepository repository) {
@@ -235,4 +229,34 @@ public class DummyProvider implements InternalProvider {
throw new UnsupportedOperationException();
}
+ @Override
+ public boolean hasCreateProjectWithoutRepositorySupport() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean hasCreateRepositorySupport() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public ECPContainer getModelContext(Object arg0) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+// @Override
+// public void fillChildren(ECPContainer arg0, Object arg1, InternalChildrenList arg2) {
+// // TODO Auto-generated method stub
+//
+// }
+
+ @Override
+ public void handleLifecycle(ECPContainer arg0, LifecycleEvent arg1) {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProviderRegistry.java b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProviderRegistry.java
index 91c4e6501..0763f0b10 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProviderRegistry.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyProviderRegistry.java
@@ -5,18 +5,12 @@ import java.util.Collections;
import org.eclipse.emf.ecp.core.ECPProvider;
import org.eclipse.emf.ecp.core.ECPProviderRegistry;
-import org.eclipse.emf.ecp.core.util.observer.ECPProviderRegistryObserver;
public class DummyProviderRegistry implements ECPProviderRegistry {
DummyWorkspace workspace = DummyWorkspace.INSTANCE;
@Override
- public ECPProvider getProvider(Object adaptable) {
- return workspace.getProvider();
- }
-
- @Override
public ECPProvider getProvider(String name) {
return workspace.getProvider();
}
@@ -37,16 +31,4 @@ public class DummyProviderRegistry implements ECPProviderRegistry {
throw new UnsupportedOperationException();
}
- @Override
- public void addObserver(ECPProviderRegistryObserver changeObserver) {
- // TODO fix this
- // workspace.addProvidersChangedObserver(changeObserver);
- }
-
- @Override
- public void removeObserver(ECPProviderRegistryObserver changeObserver) {
- // TODO fix this
- // workspace.removeProvidersChangedObserver(changeObserver);
- }
-
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepository.java b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepository.java
index 55f2e267e..d9a919798 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepository.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepository.java
@@ -3,40 +3,29 @@ package org.eclipse.fx.ecp.dummy;
import org.eclipse.emf.ecp.core.ECPProvider;
import org.eclipse.emf.ecp.core.ECPRepository;
import org.eclipse.emf.ecp.core.util.ECPElement;
-import org.eclipse.emf.ecp.core.util.ECPModelContext;
import org.eclipse.emf.ecp.core.util.ECPProperties;
public class DummyRepository implements ECPRepository {
-
+
DummyWorkspace workspace = DummyWorkspace.INSTANCE;
-
+
String name;
-
+
@Override
public String getName() {
return name;
}
-
+
public void setName(String name) {
this.name = name;
}
@Override
- public String getType() {
- return ECPRepository.TYPE;
- }
-
- @Override
public int compareTo(ECPElement element) {
throw new UnsupportedOperationException();
}
@Override
- public ECPModelContext getContext() {
- throw new UnsupportedOperationException();
- }
-
- @Override
public ECPProvider getProvider() {
return workspace.getProvider();
}
@@ -57,11 +46,6 @@ public class DummyRepository implements ECPRepository {
}
@Override
- public Object getAdapter(Class adapter) {
- throw new UnsupportedOperationException();
- }
-
- @Override
public String getLabel() {
throw new UnsupportedOperationException();
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepositoryManager.java b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepositoryManager.java
index da4024ae9..147780258 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepositoryManager.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.dummy/src/org/eclipse/fx/ecp/dummy/DummyRepositoryManager.java
@@ -7,7 +7,6 @@ import org.eclipse.emf.ecp.core.ECPProvider;
import org.eclipse.emf.ecp.core.ECPRepository;
import org.eclipse.emf.ecp.core.ECPRepositoryManager;
import org.eclipse.emf.ecp.core.util.ECPProperties;
-import org.eclipse.emf.ecp.core.util.observer.ECPRepositoryManagerObserver;
public class DummyRepositoryManager implements ECPRepositoryManager {
@@ -33,14 +32,4 @@ public class DummyRepositoryManager implements ECPRepositoryManager {
throw new UnsupportedOperationException();
}
- @Override
- public void addObserver(ECPRepositoryManagerObserver changeObserver) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void removeObserver(ECPRepositoryManagerObserver changeObserver) {
- throw new UnsupportedOperationException();
- }
-
}
diff --git a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/impl/ControlFactoryRegistryImpl.java b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/impl/ControlFactoryRegistryImpl.java
index 273ae9016..62bd3bed3 100644
--- a/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/impl/ControlFactoryRegistryImpl.java
+++ b/bundles/runtime/org.eclipse.fx.ecp.ui/src/org/eclipse/fx/ecp/ui/impl/ControlFactoryRegistryImpl.java
@@ -8,7 +8,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecp.edit.util.ECPApplicableTester;
-import org.eclipse.emf.ecp.edit.util.StaticApplicableTester;
+import org.eclipse.emf.ecp.edit.util.ECPStaticApplicableTester;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.fx.ecp.ui.Control;
import org.eclipse.fx.ecp.ui.Control.Factory;
@@ -81,7 +81,7 @@ public class ControlFactoryRegistryImpl implements Control.Factory.Registry {
String supportedFeature = testerExtension.getAttribute(TESTER_FEATURE);
- testers.add(new StaticApplicableTester(singleValue, priority, supportedClassType,
+ testers.add(new ECPStaticApplicableTester(singleValue, priority, supportedClassType,
supportedEObject, supportedFeature));
}
@@ -119,8 +119,8 @@ public class ControlFactoryRegistryImpl implements Control.Factory.Registry {
int currentPriority = -1;
for (ECPApplicableTester tester : descriptor.getTesters()) {
- if(tester instanceof StaticApplicableTester) {
- if (((StaticApplicableTester) tester).isSingleValue() == false)
+ if(tester instanceof ECPStaticApplicableTester) {
+ if (((ECPStaticApplicableTester) tester).isSingleValue() == false)
System.out.println();;
}

Back to the top