Bug 461175 - View Editor Load Behaviour unknown features
https://bugs.eclipse.org/bugs/show_bug.cgi?id=461175

Change-Id: If4b835fed33f933aeb10ff8fe75a14627ffb0afd
Signed-off-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>
diff --git a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/ViewEditorPart.java b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/ViewEditorPart.java
index b0ff11c..5d32ba0 100644
--- a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/ViewEditorPart.java
+++ b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/ViewEditorPart.java
@@ -271,11 +271,11 @@
 						Messages.ViewEditorPart_MigrationErrorText1 +
 							Messages.ViewEditorPart_MigrationErrorText2);
 					Activator
-					.getDefault()
-					.getLog()
-					.log(
-						new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.ViewEditorPart_MigrationErrorTitle,
-							e));
+						.getDefault()
+						.getLog()
+						.log(
+							new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.ViewEditorPart_MigrationErrorTitle,
+								e));
 				} catch (final InterruptedException e) {
 					MessageDialog.openError(
 						Display.getDefault().getActiveShell(), Messages.ViewEditorPart_MigrationErrorTitle,
@@ -394,6 +394,16 @@
 	private void showView() {
 		final VView view = getView();
 
+		if (XMLResource.class.isInstance(view.eResource())
+			&& !XMLResource.class.cast(view.eResource()).getEObjectToExtensionMap().isEmpty()) {
+			// we are showing a view which wasn't fully loaded
+			MessageDialog
+				.openWarning(
+					parent.getShell(),
+					Messages.ViewEditorPart_LoadedPartyTitle,
+					Messages.ViewEditorPart_LoadedPartyDescription);
+		}
+
 		try {
 			render = ECPSWTViewRenderer.INSTANCE.render(parent, view);
 		} catch (final ECPRendererException ex) {
diff --git a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/Messages.java b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/Messages.java
index 4a22ed9..b65fd41 100644
--- a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/Messages.java
+++ b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/Messages.java
@@ -23,6 +23,8 @@
 	public static String ViewEditorPart_EcoreSelectionTitle;
 	public static String ViewEditorPart_EcoreSelectionValidation;
 	public static String ViewEditorPart_EditorViewChanged;
+	public static String ViewEditorPart_LoadedPartyDescription;
+	public static String ViewEditorPart_LoadedPartyTitle;
 	public static String ViewEditorPart_MigrationErrorText1;
 	public static String ViewEditorPart_MigrationErrorText2;
 	public static String ViewEditorPart_MigrationErrorTitle;
diff --git a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/messages.properties b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/messages.properties
index 8ae4abd..30a2b7f 100644
--- a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/messages.properties
+++ b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/messages/messages.properties
@@ -1,6 +1,8 @@
 ViewEditorPart_EcoreSelectionTitle=Select Ecore
 ViewEditorPart_EcoreSelectionValidation=Please Select a File
 ViewEditorPart_EditorViewChanged=The ECore of your ViewModel just changed. This change is not reflected in this View Model Editor. Do you want to reload now?
+ViewEditorPart_LoadedPartyDescription=The view model could only be loaded partly. Probably it needs migration. Please visit our migration guide for more information.
+ViewEditorPart_LoadedPartyTitle=Problems while loading the view model.
 ViewEditorPart_MigrationErrorText1=An error occured during migration of the model. 
 ViewEditorPart_MigrationErrorText2=More information on the error can be found in the error log.
 ViewEditorPart_MigrationErrorTitle=EMFForms View Model Migration Error
diff --git a/features/org.eclipse.emf.ecp.emfforms.sdk.feature/feature.xml b/features/org.eclipse.emf.ecp.emfforms.sdk.feature/feature.xml
index 55bd2b8..6fa21d8 100644
--- a/features/org.eclipse.emf.ecp.emfforms.sdk.feature/feature.xml
+++ b/features/org.eclipse.emf.ecp.emfforms.sdk.feature/feature.xml
@@ -111,4 +111,8 @@
          id="org.eclipse.emf.ecp.workspace.feature.source"
          version="0.0.0"/>
 
+   <includes
+         id="org.eclipse.emf.ecp.view.edapt.feature"
+         version="0.0.0"/>
+
 </feature>
diff --git a/features/org.eclipse.emf.ecp.view.edapt.feature/feature.xml b/features/org.eclipse.emf.ecp.view.edapt.feature/feature.xml
index 57635f8..ee4431e 100644
--- a/features/org.eclipse.emf.ecp.view.edapt.feature/feature.xml
+++ b/features/org.eclipse.emf.ecp.view.edapt.feature/feature.xml
@@ -20,6 +20,10 @@
       %license
    </license>
 
+   <includes
+         id="org.eclipse.emf.edapt.runtime.feature"
+         version="0.0.0"/>
+
    <plugin
          id="org.eclipse.emf.ecp.view.edapt"
          download-size="0"
diff --git a/features/org.eclipse.emf.ecp.view.edapt.feature/pom.xml b/features/org.eclipse.emf.ecp.view.edapt.feature/pom.xml
index badb66d..ba98744 100644
--- a/features/org.eclipse.emf.ecp.view.edapt.feature/pom.xml
+++ b/features/org.eclipse.emf.ecp.view.edapt.feature/pom.xml
@@ -12,4 +12,27 @@
   <artifactId>org.eclipse.emf.ecp.view.edapt.feature</artifactId>
   <version>1.5.1-SNAPSHOT</version>
   <packaging>eclipse-feature</packaging>
+  
+  	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.eclipse.tycho.extras</groupId>
+				<artifactId>tycho-source-feature-plugin</artifactId>
+				<version>${tycho-version}</version>
+				<executions>
+					<execution>
+						<id>generate-source-feature</id>
+						<goals>
+							<goal>source-feature</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<excludes>
+					  <feature id="org.eclipse.emf.edapt.runtime.feature"/>
+					</excludes>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
 </project>
diff --git a/releng/org.eclipse.emf.ecp.target.rcp/ecp.tpd b/releng/org.eclipse.emf.ecp.target.rcp/ecp.tpd
new file mode 100644
index 0000000..39b5149
--- /dev/null
+++ b/releng/org.eclipse.emf.ecp.target.rcp/ecp.tpd
@@ -0,0 +1,56 @@
+target "ECP RCP"
+
+location "http://download.eclipse.org/eclipse/updates/4.4" {
+	org.eclipse.equinox.sdk.feature.group
+	org.eclipse.platform.ide
+}
+
+location "http://download.eclipse.org/emf-store/releases_14" {
+	org.eclipse.emf.emfstore.client.transaction.feature.feature.group
+	org.eclipse.emf.emfstore.client.feature.feature.group
+	org.eclipse.emf.emfstore.common.feature.feature.group
+	org.eclipse.emf.emfstore.server.feature.feature.group
+	org.eclipse.emf.emfstore.example.feature.feature.group
+	org.eclipse.emf.emfstore.client.ui.feature.feature.group
+	org.eclipse.emf.emfstore.ecore.feature.feature.group
+}
+
+location "http://download.eclipse.org/releases/luna/" {
+	org.eclipse.jdt.feature.group
+	org.eclipse.emf.sdk.feature.group
+	org.eclipse.gef.sdk.feature.group
+	org.eclipse.graphiti.feature.feature.group
+	org.eclipse.graphiti.export.feature.feature.group
+	org.eclipse.emf.validation.sdk.feature.group
+	org.eclipse.emf.transaction.sdk.feature.group
+	org.eclipse.net4j.sdk.feature.group
+	org.eclipse.emf.cdo.sdk.feature.group
+	org.eclipse.pde.feature.group
+	org.eclipse.ocl.all.sdk.feature.group	
+}
+
+location "http://build.eclipse.org/rt/rap/base-platforms/2.3/extra-dependencies/" {
+	org.mockito.mockito-all
+}
+
+location "http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/" {
+	org.apache.log4j.source
+	org.objenesis.source
+	org.apache.log4j
+	org.objenesis
+	org.h2.source
+	org.h2
+	javax.validation
+	javax.validation.source
+}
+
+location "http://download.eclipse.org/edapt/releases/10x/101" {
+	org.eclipse.emf.edapt.runtime.feature.feature.group
+}
+
+location "http://download.eclipse.org/technology/swtbot/releases/latest/" {
+	org.eclipse.swtbot.eclipse.gef.feature.group
+	org.eclipse.swtbot.forms.feature.group
+	org.eclipse.swtbot.eclipse.feature.group
+	org.eclipse.swtbot.feature.group
+}