Bugzilla 307458 - Using 'platform:/plugin' URI on handlers

Final changes to tools
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassMoveParticipant.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassMoveParticipant.java
index 0c883aa..675979a 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassMoveParticipant.java
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassMoveParticipant.java
@@ -46,7 +46,7 @@
 		String toBundle = Util.getBundleSymbolicName(fragment.getJavaProject().getProject());
 		String toClassName = fragment.getElementName().length() == 0 ? type.getElementName() : fragment.getElementName() + "." + type.getElementName();
 		
-		return RefactorParticipantDelegate.createChange(pm, this, "platform:/plugin/"+fromBundle+"/"+fromClassname, "platform:/plugin/"+toBundle+"/"+toClassName);
+		return RefactorParticipantDelegate.createChange(pm, this, "bundleclass://"+fromBundle+"/"+fromClassname, "bundleclass://"+toBundle+"/"+toClassName);
 	}
 
 }
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassRenameParticipant.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassRenameParticipant.java
index 7547109..e053cda 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassRenameParticipant.java
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassRenameParticipant.java
@@ -50,8 +50,8 @@
 			OperationCanceledException {
 		String bundle = Util.getBundleSymbolicName(type.getJavaProject().getProject());
 		
-		final String newUrl = "platform:/plugin/" + bundle + "/" + (type.getPackageFragment().getElementName().length() == 0 ? getArguments().getNewName() : type.getPackageFragment().getElementName() + "." + getArguments().getNewName());
-		String oldUrl = "platform:/plugin/" + bundle + "/" + type.getFullyQualifiedName().replace(".", "\\.");
+		final String newUrl = "bundleclass://" + bundle + "/" + (type.getPackageFragment().getElementName().length() == 0 ? getArguments().getNewName() : type.getPackageFragment().getElementName() + "." + getArguments().getNewName());
+		String oldUrl = "bundleclass://" + bundle + "/" + type.getFullyQualifiedName().replace(".", "\\.");
 		return RefactorParticipantDelegate.createChange(pm, this, oldUrl, newUrl);
 	}
 
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java
index a1da6fd..a37f124 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java
@@ -53,7 +53,7 @@
 
 	private void createOpen(MContribution contribution, EditingDomain domain,
 			IProject project, Shell shell, boolean forceNew) {
-		if( forceNew || contribution.getContributionURI() == null || contribution.getContributionURI().trim().length() == 0 || !contribution.getContributionURI().startsWith("platform:") ) {
+		if( forceNew || contribution.getContributionURI() == null || contribution.getContributionURI().trim().length() == 0 || !contribution.getContributionURI().startsWith("bundleclass:") ) {
 			NewAddonClassWizard wizard = new NewAddonClassWizard();
 			wizard.init( null, new StructuredSelection(project));
 			WizardDialog dialog = new WizardDialog(shell, wizard);
@@ -74,7 +74,7 @@
 						fullyQualified = wizard.getDomainClass().getName();
 					}
 					
-					Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "platform:/plugin/" + Util.getBundleSymbolicName(f.getProject()) + "/" + fullyQualified);
+					Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "bundleclass://" + Util.getBundleSymbolicName(f.getProject()) + "/" + fullyQualified);
 					if( cmd.canExecute() ) {
 						domain.getCommandStack().execute(cmd);
 					}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java
index e8e1ca2..d1be445 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java
@@ -43,7 +43,7 @@
 	}
 	
 	private void createOpen(MContribution contribution, EditingDomain domain, IProject project, Shell shell, boolean forceNew) {
-		if( contribution.getContributionURI() == null || contribution.getContributionURI().trim().length() == 0 || !contribution.getContributionURI().startsWith("platform:") ) {
+		if( contribution.getContributionURI() == null || contribution.getContributionURI().trim().length() == 0 || !contribution.getContributionURI().startsWith("bundleclass:") ) {
 			NewHandlerClassWizard wizard = new NewHandlerClassWizard();
 			wizard.init( null, new StructuredSelection(project));
 			WizardDialog dialog = new WizardDialog(shell, wizard);
@@ -64,7 +64,7 @@
 						fullyQualified = wizard.getDomainClass().getName();
 					}
 					
-					Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "platform:/plugin/" + Util.getBundleSymbolicName(f.getProject()) + "/" + fullyQualified);
+					Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "bundleclass://" + Util.getBundleSymbolicName(f.getProject()) + "/" + fullyQualified);
 					if( cmd.canExecute() ) {
 						domain.getCommandStack().execute(cmd);
 					}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java
index 22561f8..7383e50 100644
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java
@@ -45,7 +45,7 @@
 			IProject project, Shell shell, boolean forceNew) {
 		if ( forceNew || contribution.getContributionURI() == null
 				|| contribution.getContributionURI().trim().length() == 0
-				|| !contribution.getContributionURI().startsWith("platform:")) {
+				|| !contribution.getContributionURI().startsWith("bundleclass:")) {
 			NewPartClassWizard wizard = new NewPartClassWizard();
 			wizard.init(null, new StructuredSelection(project));
 			WizardDialog dialog = new WizardDialog(shell, wizard);
@@ -66,7 +66,7 @@
 						fullyQualified = wizard.getDomainClass().getName();
 					}
 					
-					Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "platform:/plugin/" + Util.getBundleSymbolicName(f.getProject()) + "/" + fullyQualified);
+					Command cmd = SetCommand.create(domain, contribution, ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI, "bundleclass://" + Util.getBundleSymbolicName(f.getProject()) + "/" + fullyQualified);
 					if( cmd.canExecute() ) {
 						domain.getCommandStack().execute(cmd);
 					}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ContributionURIValidator.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ContributionURIValidator.java
index 115cac4..4ec3193 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ContributionURIValidator.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ContributionURIValidator.java
@@ -20,7 +20,7 @@
 	public IStatus validate(Object value) {
 		if (value == null) {
 			return new Status(IStatus.ERROR, "org.eclipse.e4.tools.emf.ui", "The URI must not be empty!");
-		} else if (!value.toString().startsWith("platform:/plugin")) {
+		} else if (!value.toString().startsWith("bundleclass:")) {
 			return new Status(IStatus.ERROR, "org.eclipse.e4.tools.emf.ui", "The URI has to start with 'platform:/plugin'");
 		} else {
 			try {
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
index 730a1f2..31e5bf0 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
@@ -854,7 +854,7 @@
 			}
 
 			IContributionFactory fact = context.get(IContributionFactory.class);
-			AbstractComponentEditor editor = (AbstractComponentEditor) fact.create("platform:/plugin/" + el.getContributor().getName() + "/" + el.getAttribute("class"), context); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			AbstractComponentEditor editor = (AbstractComponentEditor) fact.create("bundleclass://" + el.getContributor().getName() + "/" + el.getAttribute("class"), context); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			registerVirtualEditor(el.getAttribute("id"), editor); //$NON-NLS-1$
 		}
 	}
@@ -906,7 +906,7 @@
 				IEditorDescriptor desc = (IEditorDescriptor) el.createExecutableExtension("descriptorClass"); //$NON-NLS-1$
 				EClass eClass = desc.getEClass();
 				IContributionFactory fact = context.get(IContributionFactory.class);
-				AbstractComponentEditor editor = (AbstractComponentEditor) fact.create("platform:/plugin/" + el.getContributor().getName() + "/" + desc.getEditorClass().getName(), context); //$NON-NLS-1$ //$NON-NLS-2$
+				AbstractComponentEditor editor = (AbstractComponentEditor) fact.create("bundleclass://" + el.getContributor().getName() + "/" + desc.getEditorClass().getName(), context); //$NON-NLS-1$ //$NON-NLS-2$
 				registerEditor(eClass, editor);
 			} catch (CoreException e) {
 				// TODO Auto-generated catch block
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java
index d7664cf..50b4056 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java
@@ -162,7 +162,7 @@
 		IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
 		if (!s.isEmpty()) {
 			ContributionData cd = (ContributionData) s.getFirstElement();
-			String uri = "platform:/plugin/" + cd.bundleName + "/" + cd.className; //$NON-NLS-1$ //$NON-NLS-2$
+			String uri = "bundleclass://" + cd.bundleName + "/" + cd.className; //$NON-NLS-1$ //$NON-NLS-2$
 			Command cmd = SetCommand.create(editingDomain, contribution, feature, uri);
 			if (cmd.canExecute()) {
 				editingDomain.getCommandStack().execute(cmd);