Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian de Alwis2012-04-26 18:50:33 -0400
committerBrian de Alwis2012-04-26 18:50:33 -0400
commita83f56d519a09fa4816d8f23facad75abde8b9cc (patch)
tree2d3f9b151d8233993c90519895ddd7bd4d9a2fab
parentad212df863ef3e30f23821022c41f182f30e64d2 (diff)
downloadorg.eclipse.e4.tools-a83f56d519a09fa4816d8f23facad75abde8b9cc.tar.gz
org.eclipse.e4.tools-a83f56d519a09fa4816d8f23facad75abde8b9cc.tar.xz
org.eclipse.e4.tools-a83f56d519a09fa4816d8f23facad75abde8b9cc.zip
Soup up E4NewProjectWizard to use well-known Eclipse identifiers for commandsv20120426-2250I20120427-1300
-rw-r--r--bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
index e7a1434e..1fce85eb 100644
--- a/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
+++ b/bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java
@@ -68,7 +68,6 @@ import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.pde.core.build.IBuildEntry;
-import org.eclipse.pde.core.build.IBuildModelFactory;
import org.eclipse.pde.core.plugin.IPluginBase;
import org.eclipse.pde.core.plugin.IPluginElement;
import org.eclipse.pde.core.plugin.IPluginExtension;
@@ -452,16 +451,20 @@ public class E4NewProjectWizard extends NewPluginProjectWizard {
resource.getContents().add((EObject) application);
// Create Quit command
- MCommand quitCommand = createCommand("quitCommand", "QuitHandler",
+ MCommand quitCommand = createCommand("org.eclipse.ui.file.exit",
+ "quitCommand", "QuitHandler",
"M1+Q", pluginName, fragment, application);
- MCommand openCommand = createCommand("openCommand", "OpenHandler",
+ MCommand openCommand = createCommand(pluginName + ".open",
+ "openCommand", "OpenHandler",
"M1+O", pluginName, fragment, application);
- MCommand saveCommand = createCommand("saveCommand", "SaveHandler",
+ MCommand saveCommand = createCommand("org.eclipse.ui.file.save",
+ "saveCommand", "SaveHandler",
"M1+S", pluginName, fragment, application);
- MCommand aboutCommand = createCommand("aboutCommand",
+ MCommand aboutCommand = createCommand(
+ "org.eclipse.ui.help.aboutAction", "aboutCommand",
"AboutHandler", "M1+A", pluginName, fragment,
application);
@@ -640,12 +643,13 @@ public class E4NewProjectWizard extends NewPluginProjectWizard {
}
}
- private MCommand createCommand(String name, String className,
+ private MCommand createCommand(String commandId, String name,
+ String className,
String keyBinding, String projectName, IPackageFragment fragment,
MApplication application) {
MCommand command = MCommandsFactory.INSTANCE.createCommand();
command.setCommandName(name);
- command.setElementId(projectName + "." + name);
+ command.setElementId(commandId);
application.getCommands().add(command);
{
// Create Quit handler for command

Back to the top