Merge branch 'master' of ssh://git.eclipse.org/gitroot/emfclient/org.eclipse.emf.ecp.other
diff --git a/ECP2/org.eclipse.emf.ecp.common/.settings/org.eclipse.core.resources.prefs b/ECP2/org.eclipse.emf.ecp.common/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..dbe729d
--- /dev/null
+++ b/ECP2/org.eclipse.emf.ecp.common/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//src/org/eclipse/emf/ecp/common/cachetree/AbstractCachedTree.java=UTF-8
diff --git a/ECP2/org.eclipse.emf.ecp.common/META-INF/MANIFEST.MF b/ECP2/org.eclipse.emf.ecp.common/META-INF/MANIFEST.MF
index 38edabb..7dc5d7e 100644
--- a/ECP2/org.eclipse.emf.ecp.common/META-INF/MANIFEST.MF
+++ b/ECP2/org.eclipse.emf.ecp.common/META-INF/MANIFEST.MF
@@ -4,3 +4,5 @@
Bundle-SymbolicName: org.eclipse.emf.ecp.common
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.8.1,3.0.0)"
+Export-Package: org.eclipse.emf.ecp.common.cachetree;version="1.0.0"
diff --git a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/AbstractCachedTree.java b/ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/AbstractCachedTree.java
similarity index 98%
rename from ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/AbstractCachedTree.java
rename to ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/AbstractCachedTree.java
index 3779941..100893b 100644
--- a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/AbstractCachedTree.java
+++ b/ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/AbstractCachedTree.java
@@ -10,7 +10,7 @@
* Edgar Mueller - initial API and implementation
*
*******************************************************************************/
-package org.eclipse.emf.ecp.ui.cachetree;
+package org.eclipse.emf.ecp.common.cachetree;
import org.eclipse.emf.ecore.EObject;
diff --git a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/CachedTreeNode.java b/ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/CachedTreeNode.java
similarity index 98%
rename from ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/CachedTreeNode.java
rename to ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/CachedTreeNode.java
index 07dcc1f..5dcb048 100644
--- a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/CachedTreeNode.java
+++ b/ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/CachedTreeNode.java
@@ -9,7 +9,7 @@
* Contributors:
*
*******************************************************************************/
-package org.eclipse.emf.ecp.ui.cachetree;
+package org.eclipse.emf.ecp.common.cachetree;
import java.util.Collection;
import java.util.HashMap;
diff --git a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/IExcludedObjectsCallback.java b/ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/IExcludedObjectsCallback.java
similarity index 94%
rename from ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/IExcludedObjectsCallback.java
rename to ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/IExcludedObjectsCallback.java
index 2dbfc80..600f6c1 100644
--- a/ECP2/org.eclipse.emf.ecp.ui/src/org/eclipse/emf/ecp/ui/cachetree/IExcludedObjectsCallback.java
+++ b/ECP2/org.eclipse.emf.ecp.common/src/org/eclipse/emf/ecp/common/cachetree/IExcludedObjectsCallback.java
@@ -9,7 +9,7 @@
* Contributors:
* Eugen Neufeld - initial API and implementation
******************************************************************************/
-package org.eclipse.emf.ecp.ui.cachetree;
+package org.eclipse.emf.ecp.common.cachetree;
/**
* @author Eugen Neufeld
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPCloseableProperties.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPCloseableProperties.java
index 7fb4449..54ab454 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPCloseableProperties.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPCloseableProperties.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Eugen Neufeld - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.internal.core.properties;
import org.eclipse.net4j.util.properties.DefaultPropertyTester;
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPDeletableProperties.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPDeletableProperties.java
index 1c7699c..f8b43d9 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPDeletableProperties.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPDeletableProperties.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Eugen Neufeld - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.internal.core.properties;
import org.eclipse.net4j.util.properties.DefaultPropertyTester;
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPProjectProperties.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPProjectProperties.java
index 60febba..2ca2db3 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPProjectProperties.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPProjectProperties.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Eugen Neufeld - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.internal.core.properties;
import org.eclipse.net4j.util.properties.DefaultPropertyTester;
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPRepositoryProperties.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPRepositoryProperties.java
index d5e8e9b..aa960ae 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPRepositoryProperties.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/internal/core/properties/ECPRepositoryProperties.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Eugen Neufeld - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.internal.core.properties;
import org.eclipse.net4j.util.properties.DefaultPropertyTester;
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/AdapterProvider.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/AdapterProvider.java
index 65af412..9f2dd3d 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/AdapterProvider.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/AdapterProvider.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Jonas Helming - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.spi.core.util;
/**
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalDescriptor.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalDescriptor.java
index 1e679e8..3a0548a 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalDescriptor.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalDescriptor.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Jonas Helming - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.spi.core.util;
import org.eclipse.emf.ecp.core.util.ECPElement;
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalElementRegistry.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalElementRegistry.java
index 06e6737..830dbee 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalElementRegistry.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalElementRegistry.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Jonas Helming - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.spi.core.util;
import org.eclipse.emf.ecp.core.util.ECPElement;
diff --git a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalRegistryElement.java b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalRegistryElement.java
index f0b4c6f..e35800a 100644
--- a/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalRegistryElement.java
+++ b/ECP2/org.eclipse.emf.ecp.core/src/org/eclipse/emf/ecp/spi/core/util/InternalRegistryElement.java
@@ -1,12 +1,15 @@
-/*
- * Copyright (c) 2011 Eike Stepper (Berlin, Germany) and others.
+/*******************************************************************************
+ * Copyright (c) 2011-2012 EclipseSource Muenchen GmbH and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
* Contributors:
* Eike Stepper - initial API and implementation
- */
+ * Jonas Helming - JavaDoc
+ *******************************************************************************/
package org.eclipse.emf.ecp.spi.core.util;
import org.eclipse.emf.ecp.core.util.ECPDisposable;
@@ -16,7 +19,14 @@
* @author Eike Stepper
*/
public interface InternalRegistryElement extends ECPRegistryElement, ECPDisposable {
+
+ /**
+ * {@inheritDoc}
+ */
void setLabel(String label);
+ /**
+ * {@inheritDoc}
+ */
void setDescription(String description);
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/icons/help.png b/ECP2/org.eclipse.emf.ecp.edit.swt/icons/help.png
new file mode 100644
index 0000000..5c87017
--- /dev/null
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/icons/help.png
Binary files differ
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/plugin.xml b/ECP2/org.eclipse.emf.ecp.edit.swt/plugin.xml
index b9595c4..547ed00 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/plugin.xml
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/plugin.xml
@@ -2,6 +2,7 @@
<?eclipse version="3.4"?>
<plugin>
<extension-point id="celleditor" name="ECP SWT Table CellEditor" schema="schema/celleditor.exsd"/>
+ <extension-point id="dialogWrapper" name="Dialog Wrapper" schema="schema/dialogWrapper.exsd"/>
<extension
point="org.eclipse.emf.ecp.edit.controls">
<control
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/schema/dialogWrapper.exsd b/ECP2/org.eclipse.emf.ecp.edit.swt/schema/dialogWrapper.exsd
new file mode 100644
index 0000000..3dc8845
--- /dev/null
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/schema/dialogWrapper.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.emf.ecp.edit.swt" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.emf.ecp.edit.swt" id="dialogWrapper" name="Dialog Wrapper"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="dialogWrapper"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="dialogWrapper">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.emf.ecp.edit.internal.swt.util.DialogWrapper"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/Activator.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/Activator.java
index 7936e5a..979d08c 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/Activator.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/Activator.java
@@ -105,11 +105,11 @@
}
public static Image getImage(URL url) {
- if (!getDefault().imageRegistry.containsKey(url.toExternalForm())) {
- getDefault().imageRegistry.put(url.toExternalForm(),
- new ImageDescriptorToImage(ImageDescriptor.createFromURL(url)));
+ if (!getDefault().imageRegistry.containsKey(url == null ? "NULL" : url.toExternalForm())) {
+ getDefault().imageRegistry.put(url == null ? "NULL" : url.toExternalForm(), new ImageDescriptorToImage(
+ ImageDescriptor.createFromURL(url)));
}
- return getDefault().imageRegistry.get(url.toExternalForm()).getImage();
+ return getDefault().imageRegistry.get(url == null ? "NULL" : url.toExternalForm()).getImage();
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/AddReferenceAction.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/AddReferenceAction.java
index 003e64d..e6f650a 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/AddReferenceAction.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/AddReferenceAction.java
@@ -54,7 +54,7 @@
IItemLabelProvider labelProvider = getItemPropertyDescriptor().getLabelProvider(
modelElementContext.getModelElement());
- Image image = Activator.getImage((URL) labelProvider.getImage(obj));
+ Image image = Activator.getImage(obj == null ? null : (URL) labelProvider.getImage(obj));
String overlayString = "icons/link_overlay.png";//$NON-NLS-1$
if (eReference.isContainment()) {
@@ -83,6 +83,9 @@
@Override
public void run() {
EObject selectedEObject = getModelElementContext().getExistingElementFor((EReference) getFeature());
+ if (selectedEObject == null) {
+ return;
+ }
getModelElementContext().addModelElement(selectedEObject, (EReference) getFeature());
getModelElementContext().openEditor(selectedEObject);
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/NewReferenceAction.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/NewReferenceAction.java
index 84ae072..96d1a3e 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/NewReferenceAction.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/NewReferenceAction.java
@@ -127,6 +127,9 @@
// getModelElementContext().getEditingDomain().getCommandStack()
// .execute(new NewReferenceCommand(getModelElementContext().getModelElement()));
EObject eObject = getModelElementContext().getNewElementFor((EReference) getFeature());
+ if (eObject == null) {
+ return;
+ }
getModelElementContext().addModelElement(eObject, (EReference) getFeature());
getModelElementContext().openEditor(eObject);
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/BooleanControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/BooleanControl.java
index 0380ee3..3f115e3 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/BooleanControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/BooleanControl.java
@@ -69,4 +69,13 @@
IObservableValue targetValue = SWTObservables.observeSelection(check);
getDataBindingContext().bindValue(targetValue, getModelValue());
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl#getHelpText()
+ */
+ @Override
+ protected String getHelpText() {
+ return "This is a boolean field";
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/DateTimeControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/DateTimeControl.java
index 667df81..b48f3ea 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/DateTimeControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/DateTimeControl.java
@@ -166,4 +166,13 @@
getDataBindingContext().bindValue(target, getModelValue());
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl#getHelpText()
+ */
+ @Override
+ protected String getHelpText() {
+ return "This is a date-time control. The date field is DD.MM.YYYY and the time field is mm:hh";
+ }
+
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/EEnumControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/EEnumControl.java
index fdbcb02..f212e44 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/EEnumControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/EEnumControl.java
@@ -79,4 +79,13 @@
getDataBindingContext().bindValue(target, getModelValue());
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl#getHelpText()
+ */
+ @Override
+ protected String getHelpText() {
+ return "This is an enum field. You can select a value here.";
+ }
+
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/LinkControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/LinkControl.java
index 5b131ab..a51bc13 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/LinkControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/LinkControl.java
@@ -71,7 +71,7 @@
private Label imageHyperlink;
- private ComposedAdapterFactory composedAdapterFactory;
+ protected ComposedAdapterFactory composedAdapterFactory;
// private AdapterFactoryLabelProvider adapterFactoryLabelProvider;
@@ -294,4 +294,13 @@
hyperlink.dispose();
super.dispose();
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl#getHelpText()
+ */
+ @Override
+ protected String getHelpText() {
+ return "A link control pointing to a referenced element.";
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/NumericalControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/NumericalControl.java
index b418550..db2dd7d 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/NumericalControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/NumericalControl.java
@@ -29,6 +29,8 @@
* @author Eugen Neufeld
*/
public class NumericalControl extends AbstractTextControl {
+ private String helpText;
+
/**
* Constructor for a String control.
*
@@ -41,6 +43,41 @@
public NumericalControl(boolean showLabel, IItemPropertyDescriptor itemPropertyDescriptor,
EStructuralFeature feature, ECPControlContext modelElementContext, boolean embedded) {
super(showLabel, itemPropertyDescriptor, feature, modelElementContext, embedded);
+
+ prepareHelpText();
+ }
+
+ /**
+ *
+ */
+ private void prepareHelpText() {
+ Class<?> instanceClass = getStructuralFeature().getEType().getInstanceClass();
+ if (instanceClass.isPrimitive()) {
+ try {
+ if (Integer.class.getField("TYPE").get(null).equals(instanceClass)) {
+ helpText = "This is an Integer Field. The format is '#'.";
+ } else if (Double.class.getField("TYPE").get(null).equals(instanceClass)) {
+ helpText = "This is an Float Field. The format is '#.#'.";
+ }
+ } catch (NoSuchFieldException e) {
+ Activator.logException(e);
+ } catch (IllegalArgumentException e) {
+ Activator.logException(e);
+ } catch (IllegalAccessException e) {
+ Activator.logException(e);
+ } catch (SecurityException e) {
+ Activator.logException(e);
+ }
+
+ } else if (BigInteger.class.isAssignableFrom(instanceClass)) {
+ helpText = "This is an Integer Field. The format is '#'.";
+ } else if (Integer.class.isAssignableFrom(instanceClass)) {
+ helpText = "This is an Integer Field. The format is '#'.";
+ } else if (BigDecimal.class.isAssignableFrom(instanceClass)) {
+ helpText = "This is an Float Field. The format is '#.#'.";
+ } else if (Double.class.isAssignableFrom(instanceClass)) {
+ helpText = "This is an Float Field. The format is '#.#'.";
+ }
}
@Override
@@ -59,32 +96,13 @@
@Override
protected void customizeText(Text text) {
- Class<?> instanceClass = getStructuralFeature().getEType().getInstanceClass();
- if (instanceClass.isPrimitive()) {
- try {
- if (Integer.class.getField("TYPE").get(null).equals(instanceClass)) {
- text.setToolTipText("This is an Integer Field. The format is '#'.");
- } else if (Double.class.getField("TYPE").get(null).equals(instanceClass)) {
- text.setToolTipText("This is an Float Field. The format is '#.#'.");
- }
- } catch (NoSuchFieldException e) {
- Activator.logException(e);
- } catch (IllegalArgumentException e) {
- Activator.logException(e);
- } catch (IllegalAccessException e) {
- Activator.logException(e);
- } catch (SecurityException e) {
- Activator.logException(e);
- }
-
- } else if (BigInteger.class.isAssignableFrom(instanceClass)) {
- text.setToolTipText("This is an Integer Field. The format is '#'.");
- } else if (Integer.class.isAssignableFrom(instanceClass)) {
- text.setToolTipText("This is an Integer Field. The format is '#'.");
- } else if (BigDecimal.class.isAssignableFrom(instanceClass)) {
- text.setToolTipText("This is an Float Field. The format is '#.#'.");
- } else if (Double.class.isAssignableFrom(instanceClass)) {
- text.setToolTipText("This is an Float Field. The format is '#.#'.");
+ if (!getModelElementContext().isRunningAsWebApplication()) {
+ text.setToolTipText(helpText);
}
}
+
+ @Override
+ protected String getHelpText() {
+ return helpText;
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/SingleControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/SingleControl.java
index 47cb14f..65b7738 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/SingleControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/SingleControl.java
@@ -15,14 +15,21 @@
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecp.edit.ECPControlContext;
import org.eclipse.emf.ecp.edit.internal.swt.Activator;
+import org.eclipse.emf.ecp.edit.internal.swt.util.ECPDialogExecutor;
import org.eclipse.emf.ecp.edit.internal.swt.util.SWTControl;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jface.dialogs.IDialogLabelKeys;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
@@ -59,12 +66,15 @@
* @see org.eclipse.emf.ecp.internal.edit.controls.AbstractControl#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
- public Composite createControl(Composite parent) {
+ public Composite createControl(final Composite parent) {
final Composite composite = new Composite(parent, SWT.NONE);
int numColumns = 2;
if (isEmbedded()) {
numColumns--;
}
+ if (getModelElementContext().isRunningAsWebApplication()) {
+ numColumns++;
+ }
GridLayoutFactory.fillDefaults().numColumns(numColumns).spacing(10, 0).applyTo(composite);
GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.BEGINNING).applyTo(composite);
if (!isEmbedded()) {
@@ -79,10 +89,39 @@
fillInnerComposite(innerComposite);
setEditable(isEditable());
bindValue();
+
+ if (getModelElementContext().isRunningAsWebApplication()) {
+ Button b = new Button(composite, SWT.PUSH);
+ b.setImage(Activator.getImage("icons/help.png"));
+ b.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ super.widgetSelected(e);
+ MessageDialog dialog = new MessageDialog(parent.getShell(), "Help", null, getHelpText(),
+ MessageDialog.INFORMATION, new String[] { JFaceResources
+ .getString(IDialogLabelKeys.OK_LABEL_KEY) }, 0);
+ new ECPDialogExecutor(dialog) {
+
+ @Override
+ public void handleResult(int codeResult) {
+
+ }
+ }.execute();
+ }
+
+ });
+ }
+
return composite;
}
/**
+ * @return
+ */
+ protected abstract String getHelpText();
+
+ /**
* This method must be overridden by concrete classes. Here the widget displaying the data is added to the
* composite.
*
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/StringControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/StringControl.java
index b313d6d..0c4f386 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/StringControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/StringControl.java
@@ -73,4 +73,13 @@
protected String getTextVariantID() {
return "org_eclipse_emf_ecp_control_swt_string";
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl#getHelpText()
+ */
+ @Override
+ protected String getHelpText() {
+ return "This is a free text control.";
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/TableControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/TableControl.java
index 12c06cc..e266551 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/TableControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/TableControl.java
@@ -23,6 +23,7 @@
import org.eclipse.emf.ecp.edit.internal.swt.Activator;
import org.eclipse.emf.ecp.edit.internal.swt.util.CellEditorFactory;
import org.eclipse.emf.ecp.edit.internal.swt.util.ECPCellEditor;
+import org.eclipse.emf.ecp.edit.internal.swt.util.ECPDialogExecutor;
import org.eclipse.emf.ecp.edit.internal.swt.util.SWTControl;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.command.RemoveCommand;
@@ -39,31 +40,41 @@
import org.eclipse.jface.databinding.swt.SWTObservables;
import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
import org.eclipse.jface.databinding.viewers.ObservableMapCellLabelProvider;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogLabelKeys;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewerEditor;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationListener;
+import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.ColumnViewerEditorDeactivationEvent;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.TableViewerEditor;
+import org.eclipse.jface.viewers.TableViewerFocusCellManager;
+import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TableColumn;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -108,22 +119,51 @@
EClass clazz = ((EReference) getStructuralFeature()).getEReferenceType();
final Composite parentComposite = new Composite(parent, SWT.NONE);
- parentComposite.setLayout(new GridLayout(2, false));
+ GridLayoutFactory.fillDefaults().numColumns(2).equalWidth(false).applyTo(parentComposite);
+
+ Label label = new Label(parentComposite, SWT.NONE);
+ label.setText(getItemPropertyDescriptor().getDisplayName(null));
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BOTTOM).grab(true, false).applyTo(label);
+
+ final Composite buttonComposite = new Composite(parentComposite, SWT.NONE);
+ GridDataFactory.fillDefaults().align(SWT.END, SWT.BOTTOM).grab(false, false).applyTo(buttonComposite);
+ buttonComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
+
+ createAddRowButton(clazz, buttonComposite);
+ createRemoveRowButton(clazz, buttonComposite);
final Composite composite = new Composite(parentComposite, SWT.NONE);
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.BEGINNING).hint(SWT.DEFAULT, 200)
+ GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).hint(SWT.DEFAULT, 200).span(2, 1)
.applyTo(composite);
- composite.setLayout(new FillLayout(SWT.HORIZONTAL | SWT.VERTICAL));
tableViewer = new TableViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION
| SWT.BORDER);
tableViewer.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_swt_table");
tableViewer.getTable().setHeaderVisible(true);
tableViewer.getTable().setLinesVisible(true);
+
+ TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(tableViewer,
+ new FocusCellOwnerDrawHighlighter(tableViewer));
+ ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(tableViewer) {
+ @Override
+ protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
+ return event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
+ || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION
+ || event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.CR
+ || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
+ }
+ };
+
+ TableViewerEditor.create(tableViewer, focusCellManager, actSupport, ColumnViewerEditor.TABBING_HORIZONTAL
+ | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_VERTICAL
+ | ColumnViewerEditor.KEYBOARD_ACTIVATION);
+
// create a content provider
ObservableListContentProvider cp = new ObservableListContentProvider();
EObject tempInstance = clazz.getEPackage().getEFactoryInstance().create(clazz);
-
+ ECPTableViewerComparator comparator = new ECPTableViewerComparator();
+ tableViewer.setComparator(comparator);
+ int columnNumber = 0;
for (final EStructuralFeature feature : clazz.getEAllStructuralFeatures()) {
IItemPropertyDescriptor itemPropertyDescriptor = adapterFactoryItemDelegator.getPropertyDescriptor(
tempInstance, feature);
@@ -131,10 +171,18 @@
// if we can't render because no edit information is available, do nothing
continue;
}
+
final CellEditor cellEditor = CellEditorFactory.INSTANCE.getCellEditor(itemPropertyDescriptor,
tempInstance, tableViewer.getTable());
// create a new column
- TableViewerColumn column = new TableViewerColumn(tableViewer, cellEditor.getStyle());
+ final TableViewerColumn column = new TableViewerColumn(tableViewer, cellEditor.getStyle());
+
+ if (ECPCellEditor.class.isInstance(cellEditor)) {
+ column.getColumn().setData("width", ((ECPCellEditor) cellEditor).getColumnWidthWeight());
+ } else {
+ column.getColumn().setData("width", 100);
+ }
+
// determine the attribute that should be observed
IObservableMap map = EMFProperties.value(feature).observeDetail(cp.getKnownElements());
column.setLabelProvider(new ObservableMapCellLabelProvider(map) {
@@ -147,31 +195,34 @@
ECPCellEditor ecpCellEditor = (ECPCellEditor) cellEditor;
String text = ecpCellEditor.getFormatedString(value);
cell.setText(text == null ? "" : text);
+
} else {
cell.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
+
}
}
});
+ column.getColumn().addSelectionListener(getSelectionAdapter(comparator, column.getColumn(), columnNumber));
// set the column title & set the size
column.getColumn().setText(itemPropertyDescriptor.getDisplayName(null));
column.getColumn().setToolTipText(itemPropertyDescriptor.getDescription(null));
- column.getColumn().setResizable(false);
+ column.getColumn().setResizable(true);
column.getColumn().setMoveable(false);
-
+ // remove if no editing needed
EditingSupport observableSupport = new EditingSupport(tableViewer) {
private EditingState editingState;
private final ColumnViewerEditorActivationListenerHelper activationListener = new ColumnViewerEditorActivationListenerHelper();
/**
- *
* Default implementation always returns <code>true</code>.
*
* @see org.eclipse.jface.viewers.EditingSupport#canEdit(java.lang.Object)
*/
@Override
protected boolean canEdit(Object element) {
+ // return false here otherwise
return true;
}
@@ -299,6 +350,7 @@
};
column.setEditingSupport(observableSupport);
+ columnNumber++;
}
tableViewer.setContentProvider(cp);
list = EMFEditObservables.observeList(getModelElementContext().getEditingDomain(), getModelElementContext()
@@ -311,21 +363,28 @@
// - the layout stops resizing columns that have been resized manually by the user (this could be considered a
// feature though)
for (TableColumn col : tableViewer.getTable().getColumns()) {
- layout.setColumnData(col, new ColumnWeightData(100));
+
+ layout.setColumnData(col, new ColumnWeightData((Integer) col.getData("width")));
}
- final Composite buttonComposite = new Composite(parentComposite, SWT.NONE);
- buttonComposite.setLayout(new FillLayout(SWT.VERTICAL));
-
- createAddRowButton(clazz, buttonComposite);
- createRemoveRowButton(clazz, buttonComposite);
-
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- buttonComposite.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 1, 1));
-
return parentComposite;
}
+ private SelectionAdapter getSelectionAdapter(final ECPTableViewerComparator comparator, final TableColumn column,
+ final int index) {
+ SelectionAdapter selectionAdapter = new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ comparator.setColumn(index);
+ int dir = comparator.getDirection();
+ tableViewer.getTable().setSortDirection(dir);
+ tableViewer.getTable().setSortColumn(column);
+ tableViewer.refresh();
+ }
+ };
+ return selectionAdapter;
+ }
+
private void createRemoveRowButton(EClass clazz, final Composite buttonComposite) {
Button removeButton = new Button(buttonComposite, SWT.None);
Image image = Activator.getImage("icons/delete.png"); //$NON-NLS-1$
@@ -344,18 +403,32 @@
return;
}
- List<EObject> deletionList = new ArrayList<EObject>();
+ final List<EObject> deletionList = new ArrayList<EObject>();
Iterator<?> iterator = selection.iterator();
while (iterator.hasNext()) {
deletionList.add((EObject) iterator.next());
}
- EObject modelElement = getModelElementContext().getModelElement();
- EditingDomain editingDomain = getModelElementContext().getEditingDomain();
- editingDomain.getCommandStack().execute(
- RemoveCommand.create(editingDomain, modelElement, getStructuralFeature(), deletionList));
+ MessageDialog dialog = new MessageDialog(tableViewer.getTable().getShell(), "Delete?", null,
+ "Are you sure you want to delete the selected Elements?", MessageDialog.CONFIRM, new String[] {
+ JFaceResources.getString(IDialogLabelKeys.YES_LABEL_KEY),
+ JFaceResources.getString(IDialogLabelKeys.NO_LABEL_KEY) }, 0);
+ new ECPDialogExecutor(dialog) {
+
+ @Override
+ public void handleResult(int codeResult) {
+ if (codeResult == IDialogConstants.CANCEL_ID) {
+ return;
+ }
+
+ EObject modelElement = getModelElementContext().getModelElement();
+ EditingDomain editingDomain = getModelElementContext().getEditingDomain();
+ editingDomain.getCommandStack().execute(
+ RemoveCommand.create(editingDomain, modelElement, getStructuralFeature(), deletionList));
+ }
+ }.execute();
}
});
}
@@ -404,8 +477,65 @@
EObject instance = clazz.getEPackage().getEFactoryInstance().create(clazz);
EditingDomain editingDomain = getModelElementContext().getEditingDomain();
- editingDomain.getCommandStack().execute(
- AddCommand.create(editingDomain, modelElement, getStructuralFeature(), Collections.singleton(instance)));
+ if (tableViewer.getSelection() == null) {
+ editingDomain.getCommandStack().execute(
+ AddCommand.create(editingDomain, modelElement, getStructuralFeature(), instance));
+ } else {
+ editingDomain.getCommandStack().execute(
+ AddCommand.create(editingDomain, modelElement, getStructuralFeature(), instance, tableViewer.getTable()
+ .getSelectionIndex()));
+ }
+
}
+ private class ECPTableViewerComparator extends ViewerComparator {
+ private int propertyIndex;
+ private static final int DESCENDING = 1;
+ private int direction = DESCENDING;
+
+ public ECPTableViewerComparator() {
+ propertyIndex = 0;
+ direction = DESCENDING;
+ }
+
+ public int getDirection() {
+ return direction == 1 ? SWT.DOWN : SWT.UP;
+ }
+
+ public void setColumn(int column) {
+ if (column == propertyIndex) {
+ // Same column as last sort; toggle the direction
+ direction = 1 - direction;
+ } else {
+ // New column; do an ascending sort
+ propertyIndex = column;
+ direction = DESCENDING;
+ }
+ }
+
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ int rc = 0;
+ EObject object1 = (EObject) e1;
+ EObject object2 = (EObject) e2;
+ EStructuralFeature feat1 = object1.eClass().getEAllStructuralFeatures().get(propertyIndex);
+ EStructuralFeature feat2 = object2.eClass().getEAllStructuralFeatures().get(propertyIndex);
+
+ Object value1 = object1.eGet(feat1);
+ Object value2 = object2.eGet(feat2);
+
+ if (value1 == null) {
+ rc = 1;
+ } else if (value2 == null) {
+ rc = -1;
+ } else {
+ rc = value1.toString().compareTo(value2.toString());
+ }
+ // If descending order, flip the direction
+ if (direction == DESCENDING) {
+ rc = -rc;
+ }
+ return rc;
+ }
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/XmlDateControl.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/XmlDateControl.java
index da4170e..9baa663 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/XmlDateControl.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/XmlDateControl.java
@@ -141,4 +141,13 @@
});
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.controls.SingleControl#getHelpText()
+ */
+ @Override
+ protected String getHelpText() {
+ return "A XMLGregorianDate control showing a date. The format is DD.MM.YYYY";
+ }
+
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/DateCellEditor.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/DateCellEditor.java
index 3c2e95a..f2eb759 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/DateCellEditor.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/DateCellEditor.java
@@ -196,4 +196,12 @@
}
return dateFormat.format(cal);
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.util.ECPCellEditor#getColumnWidthWeight()
+ */
+ public int getColumnWidthWeight() {
+ return 75;
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/LinkCellEditor.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/LinkCellEditor.java
index 0a9b21d..35f56d1 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/LinkCellEditor.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/LinkCellEditor.java
@@ -169,4 +169,12 @@
public String getFormatedString(Object value) {
return adapterFactoryItemDelegator.getText(value);
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.util.ECPCellEditor#getColumnWidthWeight()
+ */
+ public int getColumnWidthWeight() {
+ return 100;
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/NumberCellEditor.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/NumberCellEditor.java
index 1fb74a8..50a293d 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/NumberCellEditor.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/NumberCellEditor.java
@@ -48,4 +48,12 @@
return ((Number) value).toString();
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.util.ECPCellEditor#getColumnWidthWeight()
+ */
+ public int getColumnWidthWeight() {
+ return 50;
+ }
+
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/XmlDateCellEditor.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/XmlDateCellEditor.java
index 535646a..2caa7d6 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/XmlDateCellEditor.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/table/XmlDateCellEditor.java
@@ -189,4 +189,12 @@
}
return dateFormat.format(cal.toGregorianCalendar().getTime());
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.internal.swt.util.ECPCellEditor#getColumnWidthWeight()
+ */
+ public int getColumnWidthWeight() {
+ return 75;
+ }
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/DialogOpener.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/DialogOpener.java
new file mode 100644
index 0000000..5db9bff
--- /dev/null
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/DialogOpener.java
@@ -0,0 +1,36 @@
+/**
+ *
+ */
+package org.eclipse.emf.ecp.edit.internal.swt.util;
+
+import org.eclipse.emf.ecp.edit.internal.swt.Activator;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.dialogs.Dialog;
+
+/**
+ * @author Eugen Neufeld
+ *
+ */
+public class DialogOpener {
+
+ public static void openDialog(Dialog dialog, ECPDialogExecutor callBack) {
+ DialogWrapper wrapper = null;
+ IConfigurationElement[] controls = Platform.getExtensionRegistry().getConfigurationElementsFor(
+ "org.eclipse.emf.ecp.edit.swt.dialogWrapper");
+ for (IConfigurationElement e : controls) {
+ try {
+ wrapper = (DialogWrapper) e.createExecutableExtension("class");
+ break;
+ } catch (CoreException e1) {
+ Activator.logException(e1);
+ }
+ }
+ if (wrapper == null) {
+ callBack.handleResult(dialog.open());
+ }
+ wrapper.openDialog(dialog, callBack);
+ }
+}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/DialogWrapper.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/DialogWrapper.java
new file mode 100644
index 0000000..afc41c2
--- /dev/null
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/DialogWrapper.java
@@ -0,0 +1,16 @@
+/**
+ *
+ */
+package org.eclipse.emf.ecp.edit.internal.swt.util;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+
+/**
+ * @author Eugen Neufeld
+ *
+ */
+public interface DialogWrapper {
+
+ void openDialog(final Dialog dialog, final ECPDialogExecutor callBack);
+}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/ECPCellEditor.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/ECPCellEditor.java
index 7d31418..954fc76 100644
--- a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/ECPCellEditor.java
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/ECPCellEditor.java
@@ -21,4 +21,13 @@
* @return
*/
String getFormatedString(Object value);
+
+ /**
+ * The returned value is used for layouting the table columns. The value is a relative column weight. A column
+ * containing text has a weight of 100. Please consider this when defining you weight. E.g if you return 200 your
+ * column will be twice the width of a text column.
+ *
+ * @return the relative column width
+ */
+ int getColumnWidthWeight();
}
diff --git a/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/ECPDialogExecutor.java b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/ECPDialogExecutor.java
new file mode 100644
index 0000000..d0a9e89
--- /dev/null
+++ b/ECP2/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/util/ECPDialogExecutor.java
@@ -0,0 +1,32 @@
+/**
+ *
+ */
+package org.eclipse.emf.ecp.edit.internal.swt.util;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+
+/**
+ * @author Eugen Neufeld
+ *
+ */
+public abstract class ECPDialogExecutor {
+
+ private Dialog dialog;
+
+ /**
+ * @param dialog
+ */
+ public ECPDialogExecutor(Dialog dialog) {
+ this.dialog = dialog;
+ }
+
+ /**
+ * @param codeResult
+ */
+ public abstract void handleResult(int codeResult);
+
+ public void execute() {
+ DialogOpener.openDialog(dialog, this);
+ }
+}
diff --git a/ECP2/org.eclipse.emf.ecp.edit/src/org/eclipse/emf/ecp/edit/ECPControlContext.java b/ECP2/org.eclipse.emf.ecp.edit/src/org/eclipse/emf/ecp/edit/ECPControlContext.java
index ac81e73..aeca2c1 100644
--- a/ECP2/org.eclipse.emf.ecp.edit/src/org/eclipse/emf/ecp/edit/ECPControlContext.java
+++ b/ECP2/org.eclipse.emf.ecp.edit/src/org/eclipse/emf/ecp/edit/ECPControlContext.java
@@ -68,4 +68,6 @@
EObject getNewElementFor(EReference eReference);
EObject getExistingElementFor(EReference eReference);
+
+ boolean isRunningAsWebApplication();
}
diff --git a/ECP2/org.eclipse.emf.ecp.emfstore.ui/META-INF/MANIFEST.MF b/ECP2/org.eclipse.emf.ecp.emfstore.ui/META-INF/MANIFEST.MF
index 5fde273..c82131d 100644
--- a/ECP2/org.eclipse.emf.ecp.emfstore.ui/META-INF/MANIFEST.MF
+++ b/ECP2/org.eclipse.emf.ecp.emfstore.ui/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@
org.eclipse.emf.ecp.ui;bundle-version="[1.0.0,2.0.0)",
org.eclipse.emf.emfstore.client;bundle-version="[1.0.0,2.0.0)",
org.eclipse.emf.emfstore.client.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.net4j.util;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.net4j.util;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.emf.ecp.common;bundle-version="[1.0.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.emf.ecp.emfstore.internal.ui;version="1.0.0.qualifier";x-internal:=true,
diff --git a/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/decorator/EMFStoreDirtyDecoratorCachedTree.java b/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/decorator/EMFStoreDirtyDecoratorCachedTree.java
index 3d91b24..b447149 100644
--- a/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/decorator/EMFStoreDirtyDecoratorCachedTree.java
+++ b/ECP2/org.eclipse.emf.ecp.emfstore.ui/src/org/eclipse/emf/ecp/emfstore/internal/ui/decorator/EMFStoreDirtyDecoratorCachedTree.java
@@ -13,10 +13,10 @@
package org.eclipse.emf.ecp.emfstore.internal.ui.decorator;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecp.common.cachetree.AbstractCachedTree;
+import org.eclipse.emf.ecp.common.cachetree.CachedTreeNode;
+import org.eclipse.emf.ecp.common.cachetree.IExcludedObjectsCallback;
import org.eclipse.emf.ecp.core.ECPProject;
-import org.eclipse.emf.ecp.ui.cachetree.AbstractCachedTree;
-import org.eclipse.emf.ecp.ui.cachetree.CachedTreeNode;
-import org.eclipse.emf.ecp.ui.cachetree.IExcludedObjectsCallback;
import java.util.HashMap;
import java.util.Map;
diff --git a/ECP2/org.eclipse.emf.ecp.explorereditorbridge/src/org/eclipse/emf/ecp/explorereditorbridge/internal/ECPControlContextImpl.java b/ECP2/org.eclipse.emf.ecp.explorereditorbridge/src/org/eclipse/emf/ecp/explorereditorbridge/internal/ECPControlContextImpl.java
index 0f3a38c..2875c5d 100644
--- a/ECP2/org.eclipse.emf.ecp.explorereditorbridge/src/org/eclipse/emf/ecp/explorereditorbridge/internal/ECPControlContextImpl.java
+++ b/ECP2/org.eclipse.emf.ecp.explorereditorbridge/src/org/eclipse/emf/ecp/explorereditorbridge/internal/ECPControlContextImpl.java
@@ -115,13 +115,12 @@
}
// add the new object to the reference
// Object object = modelElement.eGet(eReference);
- if (eReference.getUpperBound() > 1) {
- getEditingDomain().getCommandStack().execute(
- AddCommand.create(getEditingDomain(), modelElement, eReference, newMEInstance));
-
- } else {
+ if (eReference.getUpperBound() == 1) {
getEditingDomain().getCommandStack().execute(
SetCommand.create(getEditingDomain(), modelElement, eReference, newMEInstance));
+ } else {
+ getEditingDomain().getCommandStack().execute(
+ AddCommand.create(getEditingDomain(), modelElement, eReference, newMEInstance));
}
}
@@ -286,4 +285,13 @@
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.ecp.edit.ECPControlContext#isRunningAsWebApplication()
+ */
+ public boolean isRunningAsWebApplication() {
+ // TODO IMPLEMENT to be generic
+ return false;
+ }
+
}
diff --git a/ECP2/org.eclipse.emf.ecp.site-feature/category.xml b/ECP2/org.eclipse.emf.ecp.site-feature/category.xml
index 15341f4..d894b8e 100644
--- a/ECP2/org.eclipse.emf.ecp.site-feature/category.xml
+++ b/ECP2/org.eclipse.emf.ecp.site-feature/category.xml
@@ -18,6 +18,12 @@
<feature url="features/org.eclipse.emf.ecp.cdo_1.0.0.qualifier.jar" id="org.eclipse.emf.ecp.cdo" version="1.0.0.qualifier">
<category name="org.eclipse.emf.ecp.provider.category"/>
</feature>
+ <feature url="features/org.eclipse.emf.ecp.example_1.0.0.qualifier.jar" id="org.eclipse.emf.ecp.example" version="1.0.0.qualifier">
+ <category name="org.eclipse.emf.ecp.extra.category"/>
+ </feature>
+ <feature url="features/org.eclipse.emf.ecp.target_1.0.0.qualifier.jar" id="org.eclipse.emf.ecp.target" version="1.0.0.qualifier">
+ <category name="org.eclipse.emf.ecp.extra.category"/>
+ </feature>
<category-def name="org.eclipse.emf.ecp.category" label="EMF Client Platform"/>
<category-def name="org.eclipse.emf.ecp.provider.category" label="EMF Client Platform Providers (at least one is required)"/>
<category-def name="org.eclipse.emf.ecp.3x.category" label="Eclipse 3.x UI"/>
diff --git a/ECP2/org.eclipse.emf.ecp.site-feature/feature.xml b/ECP2/org.eclipse.emf.ecp.site-feature/feature.xml
index 82805a4..a6f3b8d 100644
--- a/ECP2/org.eclipse.emf.ecp.site-feature/feature.xml
+++ b/ECP2/org.eclipse.emf.ecp.site-feature/feature.xml
@@ -59,4 +59,8 @@
id="org.eclipse.emf.ecp.example"
version="0.0.0"/>
+ <includes
+ id="org.eclipse.emf.ecp.target"
+ version="0.0.0"/>
+
</feature>
diff --git a/ECP2/org.eclipse.emf.ecp.target-feature/feature.xml b/ECP2/org.eclipse.emf.ecp.target-feature/feature.xml
index 3724a4a..085d5eb 100644
--- a/ECP2/org.eclipse.emf.ecp.target-feature/feature.xml
+++ b/ECP2/org.eclipse.emf.ecp.target-feature/feature.xml
@@ -893,4 +893,58 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.core.net"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.net.linux.x86"
+ os="linux"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.net.linux.x86_64"
+ os="linux"
+ arch="x86_64"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.net.win32.x86"
+ os="win32"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.net.win32.x86_64"
+ os="win32"
+ arch="x86_64"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.h2"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/ECP2/org.eclipse.emf.ecp.ui/.settings/org.eclipse.core.resources.prefs b/ECP2/org.eclipse.emf.ecp.ui/.settings/org.eclipse.core.resources.prefs
index d378d9c..6c7086b 100644
--- a/ECP2/org.eclipse.emf.ecp.ui/.settings/org.eclipse.core.resources.prefs
+++ b/ECP2/org.eclipse.emf.ecp.ui/.settings/org.eclipse.core.resources.prefs
@@ -3,4 +3,3 @@
encoding//model/etypes.ecore=UTF-8
encoding//model/etypes.ecorediag=UTF-8
encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
-encoding//src/org/eclipse/emf/ecp/ui/cachetree/AbstractCachedTree.java=UTF-8
diff --git a/ECP2/org.eclipse.emf.ecp.ui/META-INF/MANIFEST.MF b/ECP2/org.eclipse.emf.ecp.ui/META-INF/MANIFEST.MF
index 5626fc2..aa7df58 100644
--- a/ECP2/org.eclipse.emf.ecp.ui/META-INF/MANIFEST.MF
+++ b/ECP2/org.eclipse.emf.ecp.ui/META-INF/MANIFEST.MF
@@ -16,7 +16,6 @@
org.eclipse.emf.ecp.internal.wizards;version="1.0.0";x-internal:=true,
org.eclipse.emf.ecp.internal.wizards.page;version="1.0.0";x-internal:=true,
org.eclipse.emf.ecp.spi.ui;version="1.0.0",
- org.eclipse.emf.ecp.ui.cachetree;version="1.0.0",
org.eclipse.emf.ecp.ui.common;version="1.0.0",
org.eclipse.emf.ecp.ui.common.dnd;version="1.0.0",
org.eclipse.emf.ecp.ui.util;version="1.0.0"
diff --git a/ECP2/org.eclipse.emf.ecp.validation/META-INF/MANIFEST.MF b/ECP2/org.eclipse.emf.ecp.validation/META-INF/MANIFEST.MF
index 8482653..2c8090e 100644
--- a/ECP2/org.eclipse.emf.ecp.validation/META-INF/MANIFEST.MF
+++ b/ECP2/org.eclipse.emf.ecp.validation/META-INF/MANIFEST.MF
@@ -7,7 +7,8 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.emf.ecore;bundle-version="2.8.1",
- org.eclipse.emf.ecp.ui;bundle-version="1.0.0"
+ org.eclipse.emf.ecp.ui;bundle-version="1.0.0",
+ org.eclipse.emf.ecp.common;bundle-version="[1.0.0,2.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.emf.ecp.validation.api
diff --git a/ECP2/org.eclipse.emf.ecp.validation/build.properties b/ECP2/org.eclipse.emf.ecp.validation/build.properties
index e256c3f..4ab6e26 100644
--- a/ECP2/org.eclipse.emf.ecp.validation/build.properties
+++ b/ECP2/org.eclipse.emf.ecp.validation/build.properties
@@ -1,4 +1,5 @@
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ OSGI-INF/
source.. = src/
diff --git a/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationService.java b/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationService.java
index 847f95a..ea29c0b 100644
--- a/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationService.java
+++ b/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationService.java
@@ -22,9 +22,9 @@
import org.eclipse.emf.ecore.EValidator;
import org.eclipse.emf.ecore.util.Diagnostician;
import org.eclipse.emf.ecore.util.EObjectValidator;
-import org.eclipse.emf.ecp.ui.cachetree.AbstractCachedTree;
-import org.eclipse.emf.ecp.ui.cachetree.CachedTreeNode;
-import org.eclipse.emf.ecp.ui.cachetree.IExcludedObjectsCallback;
+import org.eclipse.emf.ecp.common.cachetree.AbstractCachedTree;
+import org.eclipse.emf.ecp.common.cachetree.CachedTreeNode;
+import org.eclipse.emf.ecp.common.cachetree.IExcludedObjectsCallback;
import org.eclipse.emf.ecp.validation.api.IValidationService;
/**
diff --git a/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationServiceProvider.java b/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationServiceProvider.java
index ffd1a83..20f40b9 100644
--- a/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationServiceProvider.java
+++ b/ECP2/org.eclipse.emf.ecp.validation/src/org/eclipse/emf/ecp/internal/validation/ValidationServiceProvider.java
@@ -19,8 +19,8 @@
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecp.common.cachetree.IExcludedObjectsCallback;
import org.eclipse.emf.ecp.core.ECPProject;
-import org.eclipse.emf.ecp.ui.cachetree.IExcludedObjectsCallback;
import org.eclipse.emf.ecp.validation.api.IValidationService;
import org.eclipse.emf.ecp.validation.api.IValidationServiceProvider;