Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Webster2012-01-25 20:20:35 +0000
committerPaul Webster2012-01-25 20:20:35 +0000
commit4ee216e9c34fd9723532d4fb3e7feb4ce52d1c0b (patch)
tree1a22ce3cbcb510b99e2cafb68110d0b64597e324
parent12ba42ca945ce97c906be8ed405ae2ecc68459a6 (diff)
downloadorg.eclipse.e4.tools-4ee216e9c34fd9723532d4fb3e7feb4ce52d1c0b.tar.gz
org.eclipse.e4.tools-4ee216e9c34fd9723532d4fb3e7feb4ce52d1c0b.tar.xz
org.eclipse.e4.tools-4ee216e9c34fd9723532d4fb3e7feb4ce52d1c0b.zip
Bugzilla 307458 - Using 'platform:/plugin' URI on handlersv20120125-2020I20120127-1145I20120126-1300I20120125-2200I20120125-1700
Final changes to tools
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassMoveParticipant.java2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/ClassRenameParticipant.java4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/AddonContributionEditor.java4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/HandlerContributionEditor.java4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/extension/PartContributionEditor.java4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ContributionURIValidator.java2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java2
8 files changed, 13 insertions, 13 deletions
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 0c883aa0..675979aa 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 @@ public class ClassMoveParticipant extends
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 75471091..e053cda6 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 @@ public class ClassRenameParticipant extends
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 a1da6fd5..a37f1242 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 @@ public class AddonContributionEditor implements IContributionClassCreator {
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 @@ public class AddonContributionEditor implements IContributionClassCreator {
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 e8e1ca2a..d1be445e 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 @@ public class HandlerContributionEditor implements IContributionClassCreator {
}
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 @@ public class HandlerContributionEditor implements IContributionClassCreator {
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 22561f88..7383e50f 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 @@ public class PartContributionEditor implements IContributionClassCreator {
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 @@ public class PartContributionEditor implements IContributionClassCreator {
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 115cac4c..4ec31937 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 class ContributionURIValidator implements IValidator {
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 730a1f2a..31e5bf0e 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 @@ public class ModelEditor {
}
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 @@ public class ModelEditor {
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 d7664cf4..50b4056f 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 @@ public class ContributionClassDialog extends TitleAreaDialog {
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);

Back to the top