Bug 533299 - No Template Model Migration

Added a string replacement based migration for the view.ecore namespace
URI for template models. The migrations are added to the ViewEditorPart
and the TemplateModelEditorPart.

ViewEditorPart:
* If the view model needs migration and the user decides to migrate it,
prompt the user afterwards whether he wants to search the workplace for
template models that need migration

TemplateEditorPart:
* Check whether the opened template model needs migration. If yes,
prompt the user whether (s)he wants to migrate
* If the opened template model is migrated, prompt the user whether the
workspace should be analyzed for other template models.

General:
* Added a WorkspaceUtil that provides a utility method to search the
workspace for all files of a given ending
* Add A TemplateModelMigrationUtil that gives access to a
TemplateModelWorkspaceMigrator
* TemplateModelWorkspaceMigrator: allows to check whether a template
model needs migration and to perform the migration
* TemplateModelWorkspaceMigrator implementation: Currently uses string
based migration => in the future should be replaced with an Edapt
migration
* ViewNsMigrationUtil: Allows to migrate a view ecore name space uri by
string replacement: the file's NS URI is compared to the NS URI of the
current view ecore version registered in the package registry. If the
URIs differ the one in the file is replaced with the one from the
pacakge registry. Added tests cases for this

NOTE: These changes should be refactored in the future:
* TemplateModelMigrationUtil, TemlateModelWorkspaceMigrator are part of
the view.migrator bundle
* The logic for checking for migrating files in the workspace is
duplicated between the view and the template editor (except for
searching for model files, this is in WorkspaceUtil in the ide.util
bundle)
* The view model and the template model migration are completely
separated from each other. Additionally, the template model migration is
only based on string substitution.
* The migration should be refactored to have a based Edapt migrator and
(if necessary) subclasses with specific details for view and template
models. The basic Edapt migrator should be located in a common migration
bundle.
* The workspace migration should be centralized in a common workspace
migration bundle and check for all "EMF Forms" models (currently view
and template).

Change-Id: Ia8ee600cc43837095d5451f8d557d37448763ec5
Signed-off-by: Lucas Koehler <lkoehler@eclipsesource.com>
diff --git a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/MigrationDialogHelper.java b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/MigrationDialogHelper.java
index d8d990f..8b048fc 100644
--- a/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/MigrationDialogHelper.java
+++ b/bundles/org.eclipse.emf.ecp.ide.editor.view/src/org/eclipse/emf/ecp/ide/editor/view/MigrationDialogHelper.java
@@ -49,6 +49,24 @@
 		dialog.setInitialElementSelections(input);
 		return dialog;
 	}
+
+	/**
+	 * Returns a {@link ListSelectionDialog} for selecting template models that should be migrated.
+	 *
+	 * @param parentShell the parent shell of the dialog
+	 * @param input the list of template model URIs to be presented to the user
+	 * @return the dialog
+	 */
+	public static ListSelectionDialog getTemplateModelListMigrationDialog(Shell parentShell, List<URI> input) {
+		final IStructuredContentProvider contentProvider = new ArrayContentProvider();
+		final ILabelProvider labelProvider = new ListMigrationDialogLabelProvider();
+		final ListSelectionDialog dialog = new ListSelectionDialog(parentShell, input, contentProvider, labelProvider,
+			Messages.MigrationDialogHelper_TemplatesTitle);
+		dialog.setTitle(Messages.MigrationDialogHelper_TemplatesDescription);
+		dialog.setHelpAvailable(false);
+		dialog.setInitialElementSelections(input);
+		return dialog;
+	}
 }
 
 /** Label provider for the Migration ListSelectionDialog. */
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 411659f..a5b8019 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
@@ -16,6 +16,7 @@
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.EventObject;
+import java.util.LinkedList;
 import java.util.List;
 
 import org.eclipse.core.resources.IFile;
@@ -45,6 +46,9 @@
 import org.eclipse.emf.ecp.ide.spi.util.EcoreHelper;
 import org.eclipse.emf.ecp.ide.spi.util.ViewModelHelper;
 import org.eclipse.emf.ecp.ide.view.service.ViewModelEditorCallback;
+import org.eclipse.emf.ecp.spi.view.migrator.TemplateModelMigrationException;
+import org.eclipse.emf.ecp.spi.view.migrator.TemplateModelMigratorUtil;
+import org.eclipse.emf.ecp.spi.view.migrator.TemplateModelWorkspaceMigrator;
 import org.eclipse.emf.ecp.ui.view.ECPRendererException;
 import org.eclipse.emf.ecp.ui.view.swt.DefaultReferenceService;
 import org.eclipse.emf.ecp.ui.view.swt.ECPSWTView;
@@ -366,6 +370,63 @@
 				}
 
 			}
+
+			migrateTemplateModels(shell);
+		}
+	}
+
+	/**
+	 * If there is a template migrator, prompt the user if (s)he wants to search the workspace for template models that
+	 * need migration. Afterwards, let the user chose which models to migrate and execute the migration.
+	 *
+	 * @param shell The {@link Shell} to create the dialogs for prompting the user on.
+	 */
+	private void migrateTemplateModels(final Shell shell) {
+		final TemplateModelWorkspaceMigrator templateMigrator = TemplateModelMigratorUtil
+			.getTemplateModelWorkspaceMigrator();
+		if (templateMigrator == null) {
+			return;
+		}
+		// Prompt user to migrate template models in the workspace
+		final boolean migrateTemplates = MessageDialog.openQuestion(shell,
+			Messages.ViewEditorPart_TemplateMigrationTitle,
+			Messages.ViewEditorPart_TemplateMigrationDescription);
+		if (migrateTemplates) {
+			final List<URI> templateModelsToMigrate = getTemplateModelWorkspaceURIsToMigrate();
+
+			final IRunnableWithProgress runnable = new IRunnableWithProgress() {
+				@Override
+				public void run(IProgressMonitor monitor)
+					throws InvocationTargetException {
+					try {
+						for (final URI uri : templateModelsToMigrate) {
+							templateMigrator.performMigration(uri);
+						}
+					} catch (final TemplateModelMigrationException ex) {
+						throw new InvocationTargetException(ex);
+					}
+				}
+			};
+
+			try {
+				new ProgressMonitorDialog(shell).run(true, false, runnable);
+			} catch (final InvocationTargetException e) {
+				MessageDialog.openError(
+					Display.getDefault().getActiveShell(), Messages.ViewEditorPart_TemplateMigrationErrorTitle,
+					Messages.ViewEditorPart_TemplateMigrationErrorMessage);
+				Activator
+					.getDefault().getLog().log(
+						new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+							Messages.ViewEditorPart_TemplateMigrationErrorTitle, e));
+			} catch (final InterruptedException e) {
+				MessageDialog.openError(
+					Display.getDefault().getActiveShell(), Messages.ViewEditorPart_TemplateMigrationErrorTitle,
+					Messages.ViewEditorPart_TemplateMigrationErrorMessage);
+				Activator.getDefault().getLog().log(
+					new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+						Messages.ViewEditorPart_TemplateMigrationErrorTitle, e));
+			}
+
 		}
 	}
 
@@ -412,6 +473,37 @@
 		return uris;
 	}
 
+	private List<URI> getTemplateModelWorkspaceURIsToMigrate() {
+		final List<URI> uris = new LinkedList<URI>();
+
+		final TemplateModelWorkspaceMigrator workspaceMigrator = TemplateModelMigratorUtil
+			.getTemplateModelWorkspaceMigrator();
+		if (workspaceMigrator == null) {
+			return uris;
+		}
+		try {
+			final List<URI> urIsToMigrate = workspaceMigrator.getURIsToMigrate();
+
+			if (urIsToMigrate.size() > 0) {
+				final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+				final ListSelectionDialog migrationDialog = MigrationDialogHelper
+					.getTemplateModelListMigrationDialog(shell, urIsToMigrate);
+
+				if (migrationDialog.open() == Window.OK) {
+					final Object[] selectedURIs = migrationDialog.getResult();
+					if (selectedURIs != null) {
+						for (final Object selectedUri : selectedURIs) {
+							uris.add((URI) selectedUri);
+						}
+					}
+				}
+			}
+		} catch (final CoreException ex) {
+			Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, ex.getMessage(), ex));
+		}
+		return uris;
+	}
+
 	private boolean checkIfMigrationIsNeeded(Shell shell, final URI resourceURI, final ViewModelMigrator migrator) {
 		final CheckMigrationRunnable runnable = new CheckMigrationRunnable(migrator, resourceURI);
 		try {
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 55cab33..dea6d35 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
@@ -35,12 +35,18 @@
 	public static String ViewEditorPart_MigrationQuestion;
 	public static String ViewEditorPart_MigrationTitle;
 	public static String ViewEditorPart_No;
+	public static String ViewEditorPart_TemplateMigrationDescription;
+	public static String ViewEditorPart_TemplateMigrationErrorMessage;
+	public static String ViewEditorPart_TemplateMigrationErrorTitle;
+	public static String ViewEditorPart_TemplateMigrationTitle;
 	public static String ViewEditorPart_ViewCannotBeDisplayed;
 	public static String ViewEditorPart_Warning;
 	public static String ViewEditorPart_WorkspaceMigrationError;
 	public static String ViewEditorPart_Yes;
 	public static String MigrationDialog_Title;
 	public static String MigrationDialog_Description;
+	public static String MigrationDialogHelper_TemplatesDescription;
+	public static String MigrationDialogHelper_TemplatesTitle;
 	public static String WorkspaceMigrationDialog_Title;
 	public static String WorkspaceMigrationDialog_Description;
 
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 929edbf..c8dfd36 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
@@ -13,11 +13,17 @@
 ViewEditorPart_MigrationQuestion=This view model was saved using an older version of EMF Forms.\nAutomatically migrate to the latest version?
 ViewEditorPart_MigrationTitle=Perform migration to the latest view model version?
 ViewEditorPart_No=No
+ViewEditorPart_TemplateMigrationDescription=Do you want to scan the workspace for template models that need migration?
+ViewEditorPart_TemplateMigrationErrorMessage=An error occurred during the migration of the view model. More information on the error can be found in the error log.
+ViewEditorPart_TemplateMigrationErrorTitle=Template Model Migration Error
+ViewEditorPart_TemplateMigrationTitle=Migrate Template Models in the Workspace?
 ViewEditorPart_ViewCannotBeDisplayed=This view cannot be displayed.\nReason: {0}
 ViewEditorPart_Warning=Warning
 ViewEditorPart_WorkspaceMigrationError=View Model at workspace location {0} cannot be migrated because one or more of its referenced Ecores could not be registered.
 ViewEditorPart_Yes=Yes
 MigrationDialog_Title=Migrate view models from workspace
 MigrationDialog_Description=The following view models in your workspace also need migration.\n\nPlease select the view models to migrate:
+MigrationDialogHelper_TemplatesDescription=Migrate Template Models from the Workspace
+MigrationDialogHelper_TemplatesTitle=The following template models in your workspace need migration.\n\nPlease select the template models to migrate:
 WorkspaceMigrationDialog_Title=Migrate view models from workspace
 WorkspaceMigrationDialog_Description=Scan workspace for other view models to be migrated?
\ No newline at end of file
diff --git a/bundles/org.eclipse.emf.ecp.ide.util/src/org/eclipse/emf/ecp/ide/spi/util/WorkspaceUtil.java b/bundles/org.eclipse.emf.ecp.ide.util/src/org/eclipse/emf/ecp/ide/spi/util/WorkspaceUtil.java
new file mode 100644
index 0000000..ca3cd4a
--- /dev/null
+++ b/bundles/org.eclipse.emf.ecp.ide.util/src/org/eclipse/emf/ecp/ide/spi/util/WorkspaceUtil.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2018 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:
+ * Lucas Koehler - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.ecp.ide.spi.util;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * Utility class containing common functionality for services using the workspace.
+ *
+ * @author Lucas Koehler
+ * @since 1.17
+ *
+ */
+public final class WorkspaceUtil {
+
+	// Utility class should not be instantiated by clients.
+	private WorkspaceUtil() {
+	}
+
+	/**
+	 * Get the {@link URI URIs} of all files in the workspace that have the given file extension.
+	 *
+	 * @param fileExtension The file extension of the files to search for in the workspace.
+	 * @return The list of {@link URI URIs}
+	 * @throws CoreException If something goes wrong while analyzing the workspace
+	 */
+	public static List<URI> getURIsInWorkspace(final String fileExtension) throws CoreException {
+		final ArrayList<URI> uris = new ArrayList<URI>();
+		final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		workspace.getRoot().accept(new IResourceVisitor() {
+			@Override
+			public boolean visit(IResource resource) throws CoreException {
+				if (resource.getFileExtension() != null && resource.getFileExtension().equals(fileExtension)) {
+					try {
+						uris.add(URI.createURI(resource.getLocationURI().toURL().toExternalForm()));
+					} catch (final MalformedURLException ex) {
+						return false;
+					}
+				}
+				if (resource.getType() == IResource.FILE) {
+					return false;
+				}
+				return true;
+			}
+		});
+		return uris;
+	}
+
+	/**
+	 * Converts an EMF {@link URI} to a Java {@link File}.
+	 *
+	 * @param uri The {@link URI} to convert
+	 * @return The Java {@link File}
+	 */
+	public static File uriToFile(URI uri) {
+		if (uri.isFile() && !uri.isRelative()) {
+			return new Path(uri.toFileString()).toFile();
+		}
+		return ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.path()))
+			.getLocation().toFile();
+	}
+}
diff --git a/bundles/org.eclipse.emf.ecp.view.migrator/META-INF/MANIFEST.MF b/bundles/org.eclipse.emf.ecp.view.migrator/META-INF/MANIFEST.MF
index 7cb7c90..87981a9 100644
--- a/bundles/org.eclipse.emf.ecp.view.migrator/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.emf.ecp.view.migrator/META-INF/MANIFEST.MF
@@ -10,7 +10,8 @@
 Require-Bundle: org.eclipse.emf.common;bundle-version="[2.7.0,3.0.0)";visibility:=reexport,
  org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.emfforms.common;bundle-version="[1.17.0,1.18.0]",
- org.eclipse.emf.ecore;bundle-version="[2.7.0,3.0.0)"
+ org.eclipse.emf.ecore;bundle-version="[2.7.0,3.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.12.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
 Automatic-Module-Name: org.eclipse.emf.ecp.view.migrator
diff --git a/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelMigrationException.java b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelMigrationException.java
new file mode 100644
index 0000000..ed11b02
--- /dev/null
+++ b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelMigrationException.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2018 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:
+ * Lucas Koehler - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.ecp.spi.view.migrator;
+
+/**
+ * An exception that might occur during template model migration.
+ *
+ * @author Lucas Koehler
+ * @since 1.17
+ *
+ */
+public class TemplateModelMigrationException extends Exception {
+	private static final long serialVersionUID = 81393242066915618L;
+
+	/**
+	 * Default constructor.
+	 *
+	 * @param ex the throwable to wrap
+	 */
+	public TemplateModelMigrationException(Throwable ex) {
+		super(ex);
+	}
+}
diff --git a/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelMigratorUtil.java b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelMigratorUtil.java
new file mode 100644
index 0000000..09cf061
--- /dev/null
+++ b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelMigratorUtil.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2018 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:
+ * Lucas Koehler - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.ecp.spi.view.migrator;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * @author Lucas Koehler
+ * @since 1.17
+ *
+ */
+public final class TemplateModelMigratorUtil {
+
+	private static TemplateModelWorkspaceMigrator templateModelWorkspaceMigrator;
+
+	// Utility class should not be instantiated.
+	private TemplateModelMigratorUtil() {
+	}
+
+	/**
+	 * Returns a {@link TemplateModelWorkspaceMigrator} if any is registered. Otherwise, <code>null</code> is returned.
+	 *
+	 * @return The {@link TemplateModelWorkspaceMigrator}, or <code>null</code> if none is registered.
+	 */
+	public static TemplateModelWorkspaceMigrator getTemplateModelWorkspaceMigrator() {
+		if (templateModelWorkspaceMigrator == null) {
+			final Bundle bundle = FrameworkUtil.getBundle(TemplateModelMigratorUtil.class);
+			final BundleContext bundleContext = bundle.getBundleContext();
+			final ServiceReference<TemplateModelWorkspaceMigrator> serviceReference = bundleContext
+				.getServiceReference(TemplateModelWorkspaceMigrator.class);
+			if (serviceReference == null) {
+				return null;
+			}
+			templateModelWorkspaceMigrator = bundleContext.getService(serviceReference);
+		}
+		return templateModelWorkspaceMigrator;
+	}
+}
diff --git a/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelWorkspaceMigrator.java b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelWorkspaceMigrator.java
new file mode 100644
index 0000000..1c0ca38
--- /dev/null
+++ b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/TemplateModelWorkspaceMigrator.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2018 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:
+ * Lucas Koehler - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.ecp.spi.view.migrator;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * A service that provides methods to get all uris of template models in the workspace that need to be migrated and to
+ * migrate these models.
+ * 
+ * @author Lucas Koehler
+ * @since 1.17
+ *
+ */
+public interface TemplateModelWorkspaceMigrator {
+
+	/**
+	 * Returns a list of template model {@link URI}s that need to be migrated.
+	 *
+	 * @return the template model URIs
+	 * @throws CoreException if a problem occurred while searching the workspace
+	 **/
+	List<URI> getURIsToMigrate() throws CoreException;
+
+	/**
+	 * Migrates a template model to the latest version.
+	 *
+	 * @param resourceURI The URI of the template model that should be migrated.
+	 * @throws TemplateModelMigrationException If the migration fails.
+	 */
+	void performMigration(URI resourceURI) throws TemplateModelMigrationException;
+}
diff --git a/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/ViewNsMigrationUtil.java b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/ViewNsMigrationUtil.java
new file mode 100644
index 0000000..1c650f1
--- /dev/null
+++ b/bundles/org.eclipse.emf.ecp.view.migrator/src/org/eclipse/emf/ecp/spi/view/migrator/ViewNsMigrationUtil.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2018 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:
+ * Lucas Koehler - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.ecp.spi.view.migrator;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * Utility class to migrate the view name space uri in a file.
+ *
+ * @author Lucas Koehler
+ * @since 1.17
+ */
+public final class ViewNsMigrationUtil {
+
+	// Utility class should not be instantiated
+	private ViewNsMigrationUtil() {
+	}
+
+	private static final Pattern VIEW_NS_URI_PATTERN = Pattern
+		.compile("http://org/eclipse/emf/ecp/view/model(/[0-9]+)?"); //$NON-NLS-1$
+
+	/**
+	 * If the given file references the view ecore, migrate the view ecore
+	 * namespace URI of the template model to the namespace URI of the registered version of the view ecore.
+	 * This is necessary for domain model reference selectors to be compatible to the view models of the current
+	 * version. Thereby, we assume that view models use the registered version of the view ecore because otherwise they
+	 * could not be used in the current runtime environment.
+	 * <p>
+	 * <strong>Note:</strong> If no migration is necessary, nothing is written to the output writer.
+	 *
+	 * @param file The {@link File} containing the template model
+	 * @return whether the namespace uri was migrated
+	 * @throws IOException if something goes wrong reading or writing the template model file
+	 */
+	public static boolean migrateViewEcoreNsUri(File file) throws IOException {
+		return migrateViewEcoreNsUri(file, file);
+	}
+
+	/**
+	 * Checks whether the view name space uri of the given file needs to be migrated.
+	 *
+	 * @param file The file to check
+	 * @return <code>true</code> if no migration is necessary and <code>false</code> if the name space uri needs
+	 *         to be migrated.
+	 * @throws IOException if the file cannot be read
+	 */
+	public static boolean checkMigration(File file) throws IOException {
+		final FileReader fileReader = new FileReader(file);
+		final String templateModelString = readFile(fileReader);
+		fileReader.close();
+		final String viewNs = extractViewNsUri(new StringReader(templateModelString));
+		final String registeredViewNsUri = getRegisteredViewNsUri();
+
+		final boolean needsMigration = needsMigration(viewNs, registeredViewNsUri);
+		return !needsMigration;
+	}
+
+	/**
+	 * @param viewNs The view package's name space uri of the file
+	 * @param registeredViewNsUri The name space uri of the registered view package.
+	 * @return Whether a migration is necessary
+	 */
+	private static boolean needsMigration(final String viewNs, final String registeredViewNsUri) {
+		return viewNs != null && registeredViewNsUri != null && !viewNs.equals(registeredViewNsUri);
+	}
+
+	/**
+	 * Inner method to migrate the view ecore namespace uri that allows using two different files for input and output.
+	 * Two different files are mainly useful for testing.
+	 *
+	 * @param inputFile The {@link File} containing the template model
+	 * @param outputFile The {@link File} containing the migrated template model if any migration as necessary
+	 * @return whether the namespace uri was migrated
+	 * @throws IOException if something goes wrong reading or writing the template model file
+	 * @see {@link #migrateViewEcoreNsUri(File)}
+	 */
+	static boolean migrateViewEcoreNsUri(File inputFile, File outputFile) throws IOException {
+		final FileReader fileReader = new FileReader(inputFile);
+		final String templateModelString = readFile(fileReader);
+		fileReader.close();
+		final String viewNs = extractViewNsUri(new StringReader(templateModelString));
+
+		final String registeredViewNsUri = getRegisteredViewNsUri();
+
+		if (needsMigration(viewNs, registeredViewNsUri)) {
+			// NS URI migration needed
+			final String updatedModel = templateModelString.toString().replaceAll(viewNs, registeredViewNsUri);
+
+			final FileWriter writer = new FileWriter(outputFile, false);
+			writer.write(updatedModel);
+			writer.close();
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * @return The whole file read into one String.
+	 */
+	private static String readFile(Reader stringReader) throws IOException {
+		final StringBuilder builder = new StringBuilder();
+		final BufferedReader bufferedReader = new BufferedReader(stringReader);
+		String line;
+		while ((line = bufferedReader.readLine()) != null) {
+			builder.append(line);
+			builder.append('\n');
+		}
+		bufferedReader.close();
+		return builder.toString();
+	}
+
+	/**
+	 * @return The namespace URI of the registered view ecore, or <code>null</code> if it is not registered
+	 */
+	private static String getRegisteredViewNsUri() {
+		String registeredViewNsUri = null;
+		for (final String packageNsUri : EPackage.Registry.INSTANCE.keySet()) {
+			final Matcher matcher = VIEW_NS_URI_PATTERN.matcher(packageNsUri);
+			if (matcher.matches()) {
+				registeredViewNsUri = packageNsUri;
+				break;
+			}
+		}
+		return registeredViewNsUri;
+	}
+
+	/**
+	 * @return The view ecore's namespace uri used in the template model, or <code>null</code> if the template model
+	 *         does not reference the view ecore.
+	 */
+	private static String extractViewNsUri(final Reader reader) throws IOException {
+		final NameSpaceHandler handler = new NameSpaceHandler();
+		SAXUtil.executeContentHandler(reader, handler);
+		reader.close();
+		final List<String> nsURIs = handler.getNsURIs();
+		String viewNs = null;
+		for (final String nsUri : nsURIs) {
+			final Matcher matcher = VIEW_NS_URI_PATTERN.matcher(nsUri);
+			if (matcher.matches()) {
+				viewNs = nsUri;
+				break;
+			}
+		}
+		return viewNs;
+	}
+}
diff --git a/bundles/org.eclipse.emf.ecp.view.template.tooling/META-INF/MANIFEST.MF b/bundles/org.eclipse.emf.ecp.view.template.tooling/META-INF/MANIFEST.MF
index 94f7336..0c666e7 100644
--- a/bundles/org.eclipse.emf.ecp.view.template.tooling/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.emf.ecp.view.template.tooling/META-INF/MANIFEST.MF
@@ -31,7 +31,8 @@
  org.eclipse.emfforms.core.services;bundle-version="[1.17.0,1.18.0]",
  org.eclipse.emf.databinding;bundle-version="[1.3.0,2.0.0)",
  org.eclipse.emfforms.editor;bundle-version="[1.17.0,1.18.0]",
- org.eclipse.emfforms.swt.treemasterdetail;bundle-version="[1.17.0,1.18.0]"
+ org.eclipse.emfforms.swt.treemasterdetail;bundle-version="[1.17.0,1.18.0]",
+ org.eclipse.emf.ecp.view.migrator;bundle-version="[1.17.0,1.18.0)"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Import-Package: org.eclipse.emf.ecp.edit.spi.swt.util;version="[1.17.0,1.18.0]",
  org.eclipse.emf.edit.ui.provider;version="0.0.0",
diff --git a/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/internal/tooling/Messages.java b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/internal/tooling/Messages.java
index e4d82be..924edcf 100644
--- a/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/internal/tooling/Messages.java
+++ b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/internal/tooling/Messages.java
@@ -66,7 +66,16 @@
 	public static String EMFFormsTemplateWizardPage_title;
 	public static String HexColorSelectionControlSWTRenderer_SelectColorBtn;
 	public static String HexColorSelectionControlSWTRenderer_UnsetColorBtn;
+	public static String MigrationDialogHelper_TemplatesDescription;
+	public static String MigrationDialogHelper_TemplatesTitle;
 	public static String TemplateModelEditorPart_initError;
+	public static String TemplateModelEditorPart_MigrationDescription;
+	public static String TemplateModelEditorPart_MigrationQuestion;
+	public static String TemplateModelEditorPart_TemplateMigrationDescription;
+	public static String TemplateModelEditorPart_TemplateMigrationErrorMessage;
+	public static String TemplateModelEditorPart_TemplateMigrationErrorTitle;
+	public static String TemplateModelEditorPart_TemplateMigrationTitle;
+	public static String TemplateModelEditorPart_viewEcoreNsUriUpdate;
 	public static String URLSelectionControlSWTRenderer_SelectExternalFileBtn;
 	public static String URLSelectionControlSWTRenderer_SelectWorkspaceFileBtn;
 	public static String URLSelectionControlSWTRenderer_UnsetText;
diff --git a/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/internal/tooling/util/MigrationDialogHelper.java b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/internal/tooling/util/MigrationDialogHelper.java
new file mode 100644
index 0000000..a6f17d9
--- /dev/null
+++ b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/internal/tooling/util/MigrationDialogHelper.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2018 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:
+ * lucas - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.ecp.view.template.internal.tooling.util;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecp.view.template.internal.tooling.Messages;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+
+/**
+ * Helper class that provides a ListSelectionDialog for selecting template models that should be migrated.
+ *
+ * @author Lucas Koehler
+ *
+ */
+// TODO this is in parts duplicated from the org.eclipse.emf.ecp.ide.editor.view bundle and should be refactored in the
+// future
+public final class MigrationDialogHelper {
+
+	private MigrationDialogHelper() {
+	}
+
+	/**
+	 * Returns a {@link ListSelectionDialog} for selecting template models that should be migrated.
+	 *
+	 * @param parentShell the parent shell of the dialog
+	 * @param input the list of template model URIs to be presented to the user
+	 * @return the dialog
+	 */
+	public static ListSelectionDialog getTemplateModelListMigrationDialog(Shell parentShell, List<URI> input) {
+		final IStructuredContentProvider contentProvider = new ArrayContentProvider();
+		final ILabelProvider labelProvider = new ListMigrationDialogLabelProvider();
+		final ListSelectionDialog dialog = new ListSelectionDialog(parentShell, input, contentProvider, labelProvider,
+			Messages.MigrationDialogHelper_TemplatesTitle);
+		dialog.setTitle(Messages.MigrationDialogHelper_TemplatesDescription);
+		dialog.setHelpAvailable(false);
+		dialog.setInitialElementSelections(input);
+		return dialog;
+	}
+}
+
+/** Label provider for the Migration ListSelectionDialog. */
+class ListMigrationDialogLabelProvider extends LabelProvider {
+
+	@Override
+	public String getText(Object element) {
+		if (!URI.class.isInstance(element)) {
+			return super.getText(element);
+		}
+		final URI uri = (URI) element;
+		final String filePath = uri.devicePath();
+		final String platformPath = Platform.getLocation().toString();
+		String text = filePath;
+		if (filePath.contains(platformPath)) {
+			final int startIndex = filePath.indexOf(platformPath);
+			text = filePath.substring(startIndex + 1 + platformPath.length());
+		}
+		return String.format("%s [%s]", uri.lastSegment(), text); //$NON-NLS-1$
+	}
+
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/editor/TemplateModelEditorPart.java b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/editor/TemplateModelEditorPart.java
index 5584943..8b38a2a 100644
--- a/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/editor/TemplateModelEditorPart.java
+++ b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/editor/TemplateModelEditorPart.java
@@ -8,11 +8,19 @@
  *
  * Contributors:
  * Eugen Neufeld - initial API and implementation
+ * Lucas Koehler - add migration of view ecore namespace URI
  ******************************************************************************/
 package org.eclipse.emf.ecp.view.template.tooling.editor;
 
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.LinkedList;
+import java.util.List;
 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.EObject;
@@ -20,18 +28,31 @@
 import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
 import org.eclipse.emf.ecp.ide.spi.util.EcoreHelper;
+import org.eclipse.emf.ecp.spi.view.migrator.TemplateModelMigrationException;
+import org.eclipse.emf.ecp.spi.view.migrator.TemplateModelMigratorUtil;
+import org.eclipse.emf.ecp.spi.view.migrator.TemplateModelWorkspaceMigrator;
+import org.eclipse.emf.ecp.spi.view.migrator.ViewNsMigrationUtil;
 import org.eclipse.emf.ecp.view.template.internal.tooling.Activator;
 import org.eclipse.emf.ecp.view.template.internal.tooling.Messages;
+import org.eclipse.emf.ecp.view.template.internal.tooling.util.MigrationDialogHelper;
 import org.eclipse.emf.ecp.view.template.model.VTViewTemplate;
 import org.eclipse.emfforms.spi.editor.GenericEditor;
 import org.eclipse.emfforms.spi.swt.treemasterdetail.TreeMasterDetailComposite;
 import org.eclipse.emfforms.spi.swt.treemasterdetail.util.CreateElementCallback;
 import org.eclipse.emfforms.spi.swt.treemasterdetail.util.RootObject;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
 import org.eclipse.ui.part.FileEditorInput;
 
 /**
@@ -52,8 +73,18 @@
 
 		final FileEditorInput fei = (FileEditorInput) getEditorInput();
 
-		final ResourceSet resourceSet = new ResourceSetImpl();
 		try {
+			if (!ViewNsMigrationUtil.checkMigration(fei.getPath().toFile())) {
+				final boolean migrate = MessageDialog.openQuestion(site.getShell(),
+					Messages.TemplateModelEditorPart_MigrationQuestion,
+					Messages.TemplateModelEditorPart_MigrationDescription);
+				if (migrate) {
+					ViewNsMigrationUtil.migrateViewEcoreNsUri(fei.getPath().toFile());
+					migrateWorkspaceModels(site.getShell());
+				}
+			}
+
+			final ResourceSet resourceSet = new ResourceSetImpl();
 			final Resource resource = resourceSet.createResource(URI.createURI(fei.getURI().toURL().toExternalForm()));
 			resource.load(null);
 			final EList<EObject> resourceContents = resource.getContents();
@@ -118,4 +149,91 @@
 		treeMasterDetail.setSelection(new StructuredSelection(objectToReveal));
 	}
 
+	/**
+	 * If there is a template migrator, prompt the user if (s)he wants to search the workspace for template models that
+	 * need migration. Afterwards, let the user chose which models to migrate and execute the migration.
+	 * <p>
+	 *
+	 * @param shell The {@link Shell} to create the dialogs for prompting the user on.
+	 */
+	// TODO This is (nearly) duplicated from the ViewEditor Part and should be refactored into a single source
+	private void migrateWorkspaceModels(final Shell shell) {
+		final TemplateModelWorkspaceMigrator templateMigrator = TemplateModelMigratorUtil
+			.getTemplateModelWorkspaceMigrator();
+		if (templateMigrator == null) {
+			return;
+		}
+		// Prompt user to migrate template models in the workspace
+		final boolean migrateTemplates = MessageDialog.openQuestion(shell,
+			Messages.TemplateModelEditorPart_TemplateMigrationTitle,
+			Messages.TemplateModelEditorPart_TemplateMigrationDescription);
+		if (migrateTemplates) {
+			final List<URI> templateModelsToMigrate = getTemplateModelWorkspaceURIsToMigrate();
+
+			final IRunnableWithProgress runnable = new IRunnableWithProgress() {
+				@Override
+				public void run(IProgressMonitor monitor)
+					throws InvocationTargetException {
+					try {
+						for (final URI uri : templateModelsToMigrate) {
+							templateMigrator.performMigration(uri);
+						}
+					} catch (final TemplateModelMigrationException ex) {
+						throw new InvocationTargetException(ex);
+					}
+				}
+			};
+
+			try {
+				new ProgressMonitorDialog(shell).run(true, false, runnable);
+			} catch (final InvocationTargetException e) {
+				MessageDialog.openError(
+					Display.getDefault().getActiveShell(), Messages.TemplateModelEditorPart_TemplateMigrationErrorTitle,
+					Messages.TemplateModelEditorPart_TemplateMigrationErrorMessage);
+				Activator
+					.getDefault().getLog().log(
+						new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+							Messages.TemplateModelEditorPart_TemplateMigrationErrorTitle, e));
+			} catch (final InterruptedException e) {
+				MessageDialog.openError(
+					Display.getDefault().getActiveShell(), Messages.TemplateModelEditorPart_TemplateMigrationErrorTitle,
+					Messages.TemplateModelEditorPart_TemplateMigrationErrorMessage);
+				Activator.getDefault().getLog().log(
+					new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+						Messages.TemplateModelEditorPart_TemplateMigrationErrorTitle, e));
+			}
+
+		}
+	}
+
+	private List<URI> getTemplateModelWorkspaceURIsToMigrate() {
+		final List<URI> uris = new LinkedList<URI>();
+
+		final TemplateModelWorkspaceMigrator workspaceMigrator = TemplateModelMigratorUtil
+			.getTemplateModelWorkspaceMigrator();
+		if (workspaceMigrator == null) {
+			return uris;
+		}
+		try {
+			final List<URI> urIsToMigrate = workspaceMigrator.getURIsToMigrate();
+
+			if (urIsToMigrate.size() > 0) {
+				final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+				final ListSelectionDialog migrationDialog = MigrationDialogHelper
+					.getTemplateModelListMigrationDialog(shell, urIsToMigrate);
+
+				if (migrationDialog.open() == Window.OK) {
+					final Object[] selectedURIs = migrationDialog.getResult();
+					if (selectedURIs != null) {
+						for (final Object selectedUri : selectedURIs) {
+							uris.add((URI) selectedUri);
+						}
+					}
+				}
+			}
+		} catch (final CoreException ex) {
+			Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, ex.getMessage(), ex));
+		}
+		return uris;
+	}
 }
diff --git a/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/messages.properties b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/messages.properties
index 85d476d..4a1b847 100644
--- a/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/messages.properties
+++ b/bundles/org.eclipse.emf.ecp.view.template.tooling/src/org/eclipse/emf/ecp/view/template/tooling/messages.properties
@@ -41,7 +41,16 @@
 EMFFormsTemplateWizardPage_title=Multi-page Editor File
 HexColorSelectionControlSWTRenderer_SelectColorBtn=Select color
 HexColorSelectionControlSWTRenderer_UnsetColorBtn=Unset color
+MigrationDialogHelper_TemplatesDescription=Migrate Template Models from the Workspace
+MigrationDialogHelper_TemplatesTitle=The following template models in your workspace need migration.\n\nPlease select the template models to migrate:
 TemplateModelEditorPart_initError=Error while displaying resource. Please check the contents of the input file.
+TemplateModelEditorPart_MigrationDescription=This template model was saved using an older version of EMF Forms.\nAutomatically migrate to the latest version?
+TemplateModelEditorPart_MigrationQuestion=Migrate Template Model?
+TemplateModelEditorPart_TemplateMigrationDescription=Do you want to scan the workspace for template models that need migration?
+TemplateModelEditorPart_TemplateMigrationErrorMessage=An error occurred during the migration of the view model. More information on the error can be found in the error log.
+TemplateModelEditorPart_TemplateMigrationErrorTitle=Template Model Migration Error
+TemplateModelEditorPart_TemplateMigrationTitle=Migrate Template Models in the Workspace?
+TemplateModelEditorPart_viewEcoreNsUriUpdate=Migrated the template model's view ecore namespace URI from "{0}" to "{1}". Template model file: {2}
 URLSelectionControlSWTRenderer_SelectExternalFileBtn=Select external File 
 URLSelectionControlSWTRenderer_SelectWorkspaceFileBtn=Select workspace File 
 URLSelectionControlSWTRenderer_UnsetText=No file selected\!
diff --git a/bundles/org.eclipse.emf.ecp.view.workspace.migrator/META-INF/MANIFEST.MF b/bundles/org.eclipse.emf.ecp.view.workspace.migrator/META-INF/MANIFEST.MF
index 8ee295c..b2d5216 100644
--- a/bundles/org.eclipse.emf.ecp.view.workspace.migrator/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.emf.ecp.view.workspace.migrator/META-INF/MANIFEST.MF
@@ -7,7 +7,8 @@
 Export-Package: org.eclipse.emf.ecp.view.workspace.migrator;version="1.17.0"
 Require-Bundle: org.eclipse.emf.ecp.view.migrator;bundle-version="[1.17.0,1.18.0]",
  org.eclipse.equinox.common;bundle-version="[3.6.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.7.0,4.0.0)"
+ org.eclipse.core.resources;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.emf.ecp.ide.util;bundle-version="[1.17.0,1.18.0)"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Service-Component: OSGI-INF/workspaceMigrator.xml
 Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.emf.ecp.view.workspace.migrator/src/org/eclipse/emf/ecp/view/workspace/migrator/ViewModelWorkspaceMigratorService.java b/bundles/org.eclipse.emf.ecp.view.workspace.migrator/src/org/eclipse/emf/ecp/view/workspace/migrator/ViewModelWorkspaceMigratorService.java
index d1651ce..397efc9 100644
--- a/bundles/org.eclipse.emf.ecp.view.workspace.migrator/src/org/eclipse/emf/ecp/view/workspace/migrator/ViewModelWorkspaceMigratorService.java
+++ b/bundles/org.eclipse.emf.ecp.view.workspace.migrator/src/org/eclipse/emf/ecp/view/workspace/migrator/ViewModelWorkspaceMigratorService.java
@@ -11,16 +11,12 @@
  ******************************************************************************/
 package org.eclipse.emf.ecp.view.workspace.migrator;
 
-import java.net.MalformedURLException;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecp.ide.spi.util.WorkspaceUtil;
 import org.eclipse.emf.ecp.view.migrator.ViewModelMigrator;
 import org.eclipse.emf.ecp.view.migrator.ViewModelMigratorUtil;
 import org.eclipse.emf.ecp.view.migrator.ViewModelWorkspaceMigrator;
@@ -59,24 +55,6 @@
 	}
 
 	private static List<URI> getViewModelURIsInWorkspace() throws CoreException {
-		final ArrayList<URI> uris = new ArrayList<URI>();
-		final IWorkspace workspace = ResourcesPlugin.getWorkspace();
-		workspace.getRoot().accept(new IResourceVisitor() {
-			@Override
-			public boolean visit(IResource resource) throws CoreException {
-				if (resource.getFileExtension() != null && resource.getFileExtension().equals("view")) { //$NON-NLS-1$
-					try {
-						uris.add(URI.createURI(resource.getLocationURI().toURL().toExternalForm()));
-					} catch (final MalformedURLException ex) {
-						return false;
-					}
-				}
-				if (resource.getType() == IResource.FILE) {
-					return false;
-				}
-				return true;
-			}
-		});
-		return uris;
+		return WorkspaceUtil.getURIsInWorkspace("view"); //$NON-NLS-1$
 	}
 }
diff --git a/releng/org.eclipse.emf.ecp.releng.tests/pom.xml b/releng/org.eclipse.emf.ecp.releng.tests/pom.xml
index e3af6bf..1132c41 100644
--- a/releng/org.eclipse.emf.ecp.releng.tests/pom.xml
+++ b/releng/org.eclipse.emf.ecp.releng.tests/pom.xml
@@ -158,6 +158,7 @@
 		<!-- Migration -->
 		<module>../../tests/org.eclipse.emf.ecp.view.edapt.test</module>
 		<module>../../tests/org.eclipse.emf.ecp.view.edapt.util.test</module>
+		<module>../../tests/org.eclipse.emf.ecp.view.migrator.test</module>
 		
 		<!-- Core Services -->
 		<module>../../tests/org.eclipse.emfforms.core.services.datatemplate.test</module>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.checkstyle b/tests/org.eclipse.emf.ecp.view.migrator.test/.checkstyle
new file mode 100644
index 0000000..24d357f
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.checkstyle
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false">
+  <local-check-config name="ESMCheckstyleTest" location="/org.eclipse.emf.ecp.releng/checkstyle/esmCheckstyleTest.xml" type="project" description="">
+    <additional-data name="protect-config-file" value="false"/>
+  </local-check-config>
+  <fileset name="Java Files" enabled="true" check-config-name="ESMCheckstyleTest" local="true">
+    <file-match-pattern match-pattern=".java" include-pattern="true"/>
+  </fileset>
+</fileset-config>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.classpath b/tests/org.eclipse.emf.ecp.view.migrator.test/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.project b/tests/org.eclipse.emf.ecp.view.migrator.test/.project
new file mode 100644
index 0000000..5119bcd
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.emf.ecp.view.migrator.test</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+	</natures>
+</projectDescription>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..f548abb
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+
+encoding//model/etypes.ecore=UTF-8
+
+
+encoding/<project>=UTF-8
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.core.runtime.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..ec8a6ca
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,418 @@
+eclipse.preferences.version=1

+org.eclipse.jdt.core.builder.cleanOutputFolder=clean

+org.eclipse.jdt.core.builder.duplicateResourceTask=warning

+org.eclipse.jdt.core.builder.invalidClasspath=abort

+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore

+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=

+org.eclipse.jdt.core.circularClasspath=error

+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled

+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled

+org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error

+org.eclipse.jdt.core.codeComplete.argumentPrefixes=

+org.eclipse.jdt.core.codeComplete.argumentSuffixes=

+org.eclipse.jdt.core.codeComplete.fieldPrefixes=

+org.eclipse.jdt.core.codeComplete.fieldSuffixes=

+org.eclipse.jdt.core.codeComplete.localPrefixes=

+org.eclipse.jdt.core.codeComplete.localSuffixes=

+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=

+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=

+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=

+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=

+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled

+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore

+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull

+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault

+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable

+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled

+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled

+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6

+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve

+org.eclipse.jdt.core.compiler.compliance=1.6

+org.eclipse.jdt.core.compiler.debug.lineNumber=generate

+org.eclipse.jdt.core.compiler.debug.localVariable=generate

+org.eclipse.jdt.core.compiler.debug.sourceFile=generate

+org.eclipse.jdt.core.compiler.doc.comment.support=enabled

+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100

+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore

+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning

+org.eclipse.jdt.core.compiler.problem.deadCode=warning

+org.eclipse.jdt.core.compiler.problem.deprecation=warning

+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled

+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled

+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning

+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning

+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore

+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning

+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled

+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore

+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning

+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning

+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error

+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning

+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled

+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning

+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore

+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore

+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public

+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore

+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning

+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore

+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning

+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled

+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning

+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore

+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled

+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public

+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag

+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore

+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled

+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled

+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public

+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning

+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled

+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning

+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning

+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning

+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning

+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore

+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning

+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error

+org.eclipse.jdt.core.compiler.problem.nullReference=warning

+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error

+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning

+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning

+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore

+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning

+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore

+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning

+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning

+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning

+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore

+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning

+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore

+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore

+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled

+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning

+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled

+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled

+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled

+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore

+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning

+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled

+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning

+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning

+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore

+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning

+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning

+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning

+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled

+org.eclipse.jdt.core.compiler.problem.unusedImport=warning

+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning

+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning

+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore

+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore

+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled

+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled

+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled

+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning

+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore

+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning

+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning

+org.eclipse.jdt.core.compiler.source=1.6

+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled

+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW,NORMAL

+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED,APITODO

+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_assignment=0

+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16

+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80

+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0

+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16

+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0

+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16

+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80

+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16

+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16

+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16

+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1

+org.eclipse.jdt.core.formatter.blank_lines_after_package=1

+org.eclipse.jdt.core.formatter.blank_lines_before_field=0

+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0

+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1

+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1

+org.eclipse.jdt.core.formatter.blank_lines_before_method=1

+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1

+org.eclipse.jdt.core.formatter.blank_lines_before_package=0

+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1

+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1

+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true

+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false

+org.eclipse.jdt.core.formatter.comment.format_block_comments=true

+org.eclipse.jdt.core.formatter.comment.format_header=true

+org.eclipse.jdt.core.formatter.comment.format_html=true

+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true

+org.eclipse.jdt.core.formatter.comment.format_line_comments=true

+org.eclipse.jdt.core.formatter.comment.format_source_code=true

+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true

+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true

+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert

+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert

+org.eclipse.jdt.core.formatter.comment.line_length=120

+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true

+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true

+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false

+org.eclipse.jdt.core.formatter.compact_else_if=true

+org.eclipse.jdt.core.formatter.continuation_indentation=1

+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1

+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off

+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on

+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false

+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true

+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true

+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true

+org.eclipse.jdt.core.formatter.indent_empty_lines=false

+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true

+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true

+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true

+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false

+org.eclipse.jdt.core.formatter.indentation.size=4

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert

+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert

+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert

+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert

+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert

+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert

+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.join_lines_in_comments=false

+org.eclipse.jdt.core.formatter.join_wrapped_lines=false

+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false

+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false

+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false

+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false

+org.eclipse.jdt.core.formatter.lineSplit=120

+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false

+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false

+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0

+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1

+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true

+org.eclipse.jdt.core.formatter.tabulation.char=tab

+org.eclipse.jdt.core.formatter.tabulation.size=4

+org.eclipse.jdt.core.formatter.use_on_off_tags=true

+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false

+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true

+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

+org.eclipse.jdt.core.incompatibleJDKLevel=ignore

+org.eclipse.jdt.core.incompleteClasspath=error

diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.launching.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000..3bb2352
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..8553926
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,127 @@
+cleanup.add_default_serial_version_id=true

+cleanup.add_generated_serial_version_id=false

+cleanup.add_missing_annotations=true

+cleanup.add_missing_deprecated_annotations=true

+cleanup.add_missing_methods=false

+cleanup.add_missing_nls_tags=false

+cleanup.add_missing_override_annotations=true

+cleanup.add_missing_override_annotations_interface_methods=true

+cleanup.add_serial_version_id=false

+cleanup.always_use_blocks=true

+cleanup.always_use_parentheses_in_expressions=false

+cleanup.always_use_this_for_non_static_field_access=false

+cleanup.always_use_this_for_non_static_method_access=false

+cleanup.convert_functional_interfaces=false

+cleanup.convert_to_enhanced_for_loop=false

+cleanup.correct_indentation=false

+cleanup.format_source_code=true

+cleanup.format_source_code_changes_only=false

+cleanup.insert_inferred_type_arguments=false

+cleanup.make_local_variable_final=true

+cleanup.make_parameters_final=false

+cleanup.make_private_fields_final=true

+cleanup.make_type_abstract_if_missing_method=false

+cleanup.make_variable_declarations_final=true

+cleanup.never_use_blocks=false

+cleanup.never_use_parentheses_in_expressions=true

+cleanup.organize_imports=true

+cleanup.qualify_static_field_accesses_with_declaring_class=false

+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true

+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true

+cleanup.qualify_static_member_accesses_with_declaring_class=true

+cleanup.qualify_static_method_accesses_with_declaring_class=false

+cleanup.remove_private_constructors=true

+cleanup.remove_redundant_type_arguments=true

+cleanup.remove_trailing_whitespaces=true

+cleanup.remove_trailing_whitespaces_all=true

+cleanup.remove_trailing_whitespaces_ignore_empty=false

+cleanup.remove_unnecessary_casts=false

+cleanup.remove_unnecessary_nls_tags=false

+cleanup.remove_unused_imports=true

+cleanup.remove_unused_local_variables=false

+cleanup.remove_unused_private_fields=true

+cleanup.remove_unused_private_members=false

+cleanup.remove_unused_private_methods=true

+cleanup.remove_unused_private_types=true

+cleanup.sort_members=false

+cleanup.sort_members_all=false

+cleanup.use_anonymous_class_creation=false

+cleanup.use_blocks=true

+cleanup.use_blocks_only_for_return_and_throw=false

+cleanup.use_lambda=true

+cleanup.use_parentheses_in_expressions=true

+cleanup.use_this_for_non_static_field_access=true

+cleanup.use_this_for_non_static_field_access_only_if_necessary=true

+cleanup.use_this_for_non_static_method_access=true

+cleanup.use_this_for_non_static_method_access_only_if_necessary=true

+cleanup.use_type_arguments=false

+cleanup_profile=_esmCleanUp

+cleanup_settings_version=2

+eclipse.preferences.version=1

+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true

+formatter_profile=_esmFormatter

+formatter_settings_version=12

+org.eclipse.jdt.ui.exception.name=ex

+org.eclipse.jdt.ui.gettersetter.use.is=true

+org.eclipse.jdt.ui.javadoc=true

+org.eclipse.jdt.ui.keywordthis=false

+org.eclipse.jdt.ui.overrideannotation=true

+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) 2011-${year} EclipseSource Muenchen GmbH and others.\r\n * \r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * ${user} - initial API and implementation\r\n ******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * {@inheritDoc}\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">\t\t\t// TODO Auto-generated catch block\r\n\t\t\t// Do NOT catch all Exceptions ("catch (Exception e)")\r\n\t\t\t// Log AND handle Exceptions if possible \r\n            //\r\n            // You can just uncomment one of the lines below to log an exception\:\r\n\t\t\t// logException will show the logged excpetion to the user\r\n\t\t\t// ModelUtil.logException(${exception_var});\r\n\t\t\t// ModelUtil.logException("YOUR MESSAGE HERE", ${exception_var});\r\n\t\t\t// logWarning will only add the message to the error log\r\n\t\t\t// ModelUtil.logWarning("YOUR MESSAGE HERE", ${exception_var});\r\n\t\t\t// ModelUtil.logWarning("YOUR MESSAGE HERE");\r\n\t\t\t//\t\t\t\r\n\t\t\t// If handling is not possible declare and rethrow Exception</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>

+sp_cleanup.add_default_serial_version_id=true

+sp_cleanup.add_generated_serial_version_id=false

+sp_cleanup.add_missing_annotations=true

+sp_cleanup.add_missing_deprecated_annotations=true

+sp_cleanup.add_missing_methods=false

+sp_cleanup.add_missing_nls_tags=false

+sp_cleanup.add_missing_override_annotations=true

+sp_cleanup.add_missing_override_annotations_interface_methods=true

+sp_cleanup.add_serial_version_id=false

+sp_cleanup.always_use_blocks=true

+sp_cleanup.always_use_parentheses_in_expressions=false

+sp_cleanup.always_use_this_for_non_static_field_access=false

+sp_cleanup.always_use_this_for_non_static_method_access=false

+sp_cleanup.convert_functional_interfaces=false

+sp_cleanup.convert_to_enhanced_for_loop=false

+sp_cleanup.correct_indentation=false

+sp_cleanup.format_source_code=true

+sp_cleanup.format_source_code_changes_only=false

+sp_cleanup.insert_inferred_type_arguments=false

+sp_cleanup.make_local_variable_final=true

+sp_cleanup.make_parameters_final=false

+sp_cleanup.make_private_fields_final=true

+sp_cleanup.make_type_abstract_if_missing_method=false

+sp_cleanup.make_variable_declarations_final=true

+sp_cleanup.never_use_blocks=false

+sp_cleanup.never_use_parentheses_in_expressions=true

+sp_cleanup.on_save_use_additional_actions=true

+sp_cleanup.organize_imports=true

+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false

+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true

+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true

+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true

+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false

+sp_cleanup.remove_private_constructors=true

+sp_cleanup.remove_redundant_type_arguments=false

+sp_cleanup.remove_trailing_whitespaces=true

+sp_cleanup.remove_trailing_whitespaces_all=true

+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false

+sp_cleanup.remove_unnecessary_casts=false

+sp_cleanup.remove_unnecessary_nls_tags=true

+sp_cleanup.remove_unused_imports=true

+sp_cleanup.remove_unused_local_variables=false

+sp_cleanup.remove_unused_private_fields=true

+sp_cleanup.remove_unused_private_members=false

+sp_cleanup.remove_unused_private_methods=true

+sp_cleanup.remove_unused_private_types=true

+sp_cleanup.sort_members=false

+sp_cleanup.sort_members_all=false

+sp_cleanup.use_anonymous_class_creation=false

+sp_cleanup.use_blocks=true

+sp_cleanup.use_blocks_only_for_return_and_throw=false

+sp_cleanup.use_lambda=false

+sp_cleanup.use_parentheses_in_expressions=true

+sp_cleanup.use_this_for_non_static_field_access=true

+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true

+sp_cleanup.use_this_for_non_static_method_access=true

+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

+sp_cleanup.use_type_arguments=false

diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.ltk.core.refactoring.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..864e30f
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 04 09:44:24 CET 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.pde.api.tools.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..e4e3c00
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,97 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Ignore
+automatically_removed_unused_problem_filters=Disabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.pde.prefs b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..0bbee3c
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=1
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.ecp.view.migrator.test/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..343f196
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: EMF Forms Template Tooling Tests
+Bundle-SymbolicName: org.eclipse.emf.ecp.view.migrator.test
+Bundle-Version: 1.17.0.qualifier
+Fragment-Host: org.eclipse.emf.ecp.view.migrator;bundle-version="[1.17.0,1.18.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.junit;bundle-version="[4.12.0,5.0.0)",
+ org.mockito.mockito-core-hamcrest-modified;bundle-version="[1.9.5,2.0.0)",
+ org.objenesis;bundle-version="[1.0.0,2.0.0)"
+Export-Package: org.eclipse.emf.ecp.spi.view.migrator;version="1.17.0"
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/build.properties b/tests/org.eclipse.emf.ecp.view.migrator.test/build.properties
new file mode 100644
index 0000000..34d2e4d
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/pom.xml b/tests/org.eclipse.emf.ecp.view.migrator.test/pom.xml
new file mode 100644
index 0000000..005ccc9
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.eclipse.emf.ecp</groupId>
+		<artifactId>ecp-tests-parent</artifactId>
+		<version>1.17.0-SNAPSHOT</version>
+		<relativePath>../../releng/org.eclipse.emf.ecp.releng.tests/</relativePath>
+	</parent>
+
+	<groupId>org.eclipse.emf.ecp</groupId>
+	<artifactId>org.eclipse.emf.ecp.view.migrator.test</artifactId>
+	<version>1.17.0-SNAPSHOT</version>
+	<packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/src/org/eclipse/emf/ecp/spi/view/migrator/ViewNsMigrationUtil_Test.java b/tests/org.eclipse.emf.ecp.view.migrator.test/src/org/eclipse/emf/ecp/spi/view/migrator/ViewNsMigrationUtil_Test.java
new file mode 100644
index 0000000..a146506
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/src/org/eclipse/emf/ecp/spi/view/migrator/ViewNsMigrationUtil_Test.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2018 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:
+ * Lucas Koehler - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.emf.ecp.spi.view.migrator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EPackage.Registry;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * JUnit tests for the {@link ViewNsMigrationUtil}.
+ *
+ * @author Lucas Koehler
+ *
+ */
+public class ViewNsMigrationUtil_Test {
+
+	private File outputFile;
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	@Before
+	public void setUp() throws Exception {
+		outputFile = new File("testdata/tmp.template");
+		if (outputFile.exists()) {
+			outputFile.delete();
+		}
+		EPackage.Registry.INSTANCE.clear();
+	}
+
+	@Test
+	public void testMigrateViewEcoreNsUri() throws IOException {
+		final Registry instance = EPackage.Registry.INSTANCE;
+		instance.put("http://org/eclipse/emf/ecp/view/model/1170", mock(EPackage.class));
+
+		final File modelFile = new File("testdata/migrate_140.template");
+		final File expectedResultFile = new File("testdata/migrate_expected.template");
+		ViewNsMigrationUtil.migrateViewEcoreNsUri(modelFile, outputFile);
+
+		final String output = readAllLines(outputFile);
+		final String expected = readAllLines(expectedResultFile);
+
+		assertEquals("The migrated file does not match the expected output.", output.trim(), expected.trim());
+	}
+
+	@Test
+	public void testMigrateViewEcoreNsUri_noMigrationNecessary() throws IOException {
+		final Registry instance = EPackage.Registry.INSTANCE;
+		instance.put("http://org/eclipse/emf/ecp/view/model/1170", mock(EPackage.class));
+
+		final File modelFile = new File("testdata/migrate_current.template");
+		ViewNsMigrationUtil.migrateViewEcoreNsUri(modelFile, outputFile);
+
+		assertFalse("If no migration is necessary, nothing should be written to the output file.",
+			outputFile.exists());
+	}
+
+	@Test
+	public void testMigrateViewEcoreNsUri_noRegisteredViewEcore() throws IOException {
+		final File modelFile = new File("testdata/migrate_140.template");
+		ViewNsMigrationUtil.migrateViewEcoreNsUri(modelFile, outputFile);
+
+		assertFalse(
+			"If no view ecore is necessary, no migration should be performed and, thus, nothing should be written to the output file.",
+			outputFile.exists());
+	}
+
+	@Test
+	public void checkMigration_migrationNecessary() throws IOException {
+		final Registry instance = EPackage.Registry.INSTANCE;
+		instance.put("http://org/eclipse/emf/ecp/view/model/1170", mock(EPackage.class));
+
+		final File modelFile = new File("testdata/migrate_140.template");
+		final boolean checkMigration = ViewNsMigrationUtil.checkMigration(modelFile);
+		assertFalse(checkMigration);
+	}
+
+	@Test
+	public void checkMigration_noMigrationNecessary() throws IOException {
+		final Registry instance = EPackage.Registry.INSTANCE;
+		instance.put("http://org/eclipse/emf/ecp/view/model/1170", mock(EPackage.class));
+
+		final File modelFile = new File("testdata/migrate_current.template");
+		final boolean checkMigration = ViewNsMigrationUtil.checkMigration(modelFile);
+		assertTrue(checkMigration);
+	}
+
+	@Test
+	public void checkMigration_noRegisteredViewEcore() throws IOException {
+		final File modelFile = new File("testdata/migrate_140.template");
+		final boolean checkMigration = ViewNsMigrationUtil.checkMigration(modelFile);
+		assertTrue(checkMigration);
+	}
+
+	@Test
+	public void checkMigration_noModelViewEcore() throws IOException {
+		final Registry instance = EPackage.Registry.INSTANCE;
+		instance.put("http://org/eclipse/emf/ecp/view/model/1170", mock(EPackage.class));
+
+		final File modelFile = new File("testdata/no_view_uri.template");
+		final boolean checkMigration = ViewNsMigrationUtil.checkMigration(modelFile);
+		assertTrue(checkMigration);
+	}
+
+	private String readAllLines(File file) throws IOException {
+		final BufferedReader reader = new BufferedReader(new FileReader(file));
+		final StringBuilder builder = new StringBuilder();
+		try {
+			String line;
+			while ((line = reader.readLine()) != null) {
+				builder.append(line);
+				builder.append('\n');
+			}
+		} finally {
+			reader.close();
+		}
+		return builder.toString();
+	}
+}
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_140.template b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_140.template
new file mode 100644
index 0000000..0dbec96
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_140.template
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<org.eclipse.emf.ecp.view.template.model:ViewTemplate xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/140" xmlns:org.eclipse.emf.ecp.view.template.model="http://org/eclipse/emf/ecp/view/template/model" xmlns:org.eclipse.emf.ecp.view.template.selector.domainmodelreference.model="http://www.eclipse.org/emf/ecp/view/template/selector/domainmodelreference/model">
+  <styles>
+    <selector xsi:type="org.eclipse.emf.ecp.view.template.selector.domainmodelreference.model:DomainModelReferenceSelector">
+      <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference">
+        <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.eclipse.org/emfforms/example/coffeemodel#//Processor/vendor"/>
+      </domainModelReference>
+    </selector>
+  </styles>
+</org.eclipse.emf.ecp.view.template.model:ViewTemplate>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_current.template b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_current.template
new file mode 100644
index 0000000..4b8a384
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_current.template
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<org.eclipse.emf.ecp.view.template.model:ViewTemplate xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1170" xmlns:org.eclipse.emf.ecp.view.template.model="http://org/eclipse/emf/ecp/view/template/model" xmlns:org.eclipse.emf.ecp.view.template.selector.domainmodelreference.model="http://www.eclipse.org/emf/ecp/view/template/selector/domainmodelreference/model">
+  <styles>
+    <selector xsi:type="org.eclipse.emf.ecp.view.template.selector.domainmodelreference.model:DomainModelReferenceSelector">
+      <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference">
+        <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.eclipse.org/emfforms/example/coffeemodel#//Processor/vendor"/>
+      </domainModelReference>
+    </selector>
+  </styles>
+</org.eclipse.emf.ecp.view.template.model:ViewTemplate>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_expected.template b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_expected.template
new file mode 100644
index 0000000..4b8a384
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/migrate_expected.template
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ASCII"?>
+<org.eclipse.emf.ecp.view.template.model:ViewTemplate xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.model="http://org/eclipse/emf/ecp/view/model/1170" xmlns:org.eclipse.emf.ecp.view.template.model="http://org/eclipse/emf/ecp/view/template/model" xmlns:org.eclipse.emf.ecp.view.template.selector.domainmodelreference.model="http://www.eclipse.org/emf/ecp/view/template/selector/domainmodelreference/model">
+  <styles>
+    <selector xsi:type="org.eclipse.emf.ecp.view.template.selector.domainmodelreference.model:DomainModelReferenceSelector">
+      <domainModelReference xsi:type="org.eclipse.emf.ecp.view.model:FeaturePathDomainModelReference">
+        <domainModelEFeature xsi:type="ecore:EAttribute" href="http://www.eclipse.org/emfforms/example/coffeemodel#//Processor/vendor"/>
+      </domainModelReference>
+    </selector>
+  </styles>
+</org.eclipse.emf.ecp.view.template.model:ViewTemplate>
diff --git a/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/no_view_uri.template b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/no_view_uri.template
new file mode 100644
index 0000000..217dde7
--- /dev/null
+++ b/tests/org.eclipse.emf.ecp.view.migrator.test/testdata/no_view_uri.template
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="ASCII"?>
+<org.eclipse.emf.ecp.view.template.model:ViewTemplate xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:org.eclipse.emf.ecp.view.template.model="http://org/eclipse/emf/ecp/view/template/model" xmlns:org.eclipse.emf.ecp.view.template.selector.domainmodelreference.model="http://www.eclipse.org/emf/ecp/view/template/selector/domainmodelreference/model">
+</org.eclipse.emf.ecp.view.template.model:ViewTemplate>