diff options
author | Thomas Schindl | 2010-12-17 09:48:58 +0000 |
---|---|---|
committer | Thomas Schindl | 2010-12-17 09:48:58 +0000 |
commit | 6c1b827b9fcd2a868e69ba94e986fd5965462b44 (patch) | |
tree | e8df8c28d6afeafd895ba315d15980dc6e07e934 | |
parent | 951a1e4c56b61c411887855f692a2329d84c6402 (diff) | |
download | org.eclipse.e4.tools-6c1b827b9fcd2a868e69ba94e986fd5965462b44.tar.gz org.eclipse.e4.tools-6c1b827b9fcd2a868e69ba94e986fd5965462b44.tar.xz org.eclipse.e4.tools-6c1b827b9fcd2a868e69ba94e986fd5965462b44.zip |
Bug 332712 - After creating the skeleton e4-Application with the wizward provided by E4 Tools the generated projects doesn't work because of missing Addons etc
-rw-r--r-- | bundles/org.eclipse.e4.tools/src/org/eclipse/e4/internal/tools/wizards/project/E4NewProjectWizard.java | 31 | ||||
-rw-r--r-- | bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java | 7 |
2 files changed, 33 insertions, 5 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 e2375e5f..50ef617d 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 @@ -30,6 +30,7 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Platform; +import org.eclipse.e4.ui.model.application.MAddon; import org.eclipse.e4.ui.model.application.MApplication; import org.eclipse.e4.ui.model.application.MApplicationFactory; import org.eclipse.e4.ui.model.application.commands.MBindingContext; @@ -346,6 +347,36 @@ public class E4NewProjectWizard extends NewPluginProjectWizard { application.setElementId("org.eclipse.e4.ide.application"); + MAddon addon = MApplicationFactory.INSTANCE.createAddon(); + addon.setElementId("org.eclipse.e4.core.commands.service"); + addon.setContributionURI("platform:/plugin/org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"); + application.getAddons().add(addon); + + addon = MApplicationFactory.INSTANCE.createAddon(); + addon.setElementId("org.eclipse.e4.ui.contexts.service"); + addon.setContributionURI("platform:/plugin/org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"); + application.getAddons().add(addon); + + addon = MApplicationFactory.INSTANCE.createAddon(); + addon.setElementId("org.eclipse.e4.ui.bindings.service"); + addon.setContributionURI("platform:/plugin/org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"); + application.getAddons().add(addon); + + addon = MApplicationFactory.INSTANCE.createAddon(); + addon.setElementId("org.eclipse.e4.ui.workbench.commands.model"); + addon.setContributionURI("platform:/plugin/org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"); + application.getAddons().add(addon); + + addon = MApplicationFactory.INSTANCE.createAddon(); + addon.setElementId("org.eclipse.e4.ui.workbench.contexts.model"); + addon.setContributionURI("platform:/plugin/org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"); + application.getAddons().add(addon); + + addon = MApplicationFactory.INSTANCE.createAddon(); + addon.setElementId("org.eclipse.e4.ui.workbench.bindings.model"); + addon.setContributionURI("platform:/plugin/org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"); + application.getAddons().add(addon); + MBindingContext rootContext = MCommandsFactory.INSTANCE.createBindingContext(); rootContext.setElementId("org.eclipse.ui.contexts.dialogAndWindow"); rootContext.setName("In Dialog and Windows"); diff --git a/bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java b/bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java index c1e49cdf..02963726 100644 --- a/bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java +++ b/bundles/org.eclipse.e4.tools/templates/src/handlers/SaveHandler.java @@ -17,7 +17,6 @@ import javax.inject.Named; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.e4.core.contexts.ContextInjectionFactory; import org.eclipse.e4.core.contexts.IEclipseContext; -import org.eclipse.e4.core.di.IDisposable; import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.core.di.annotations.CanExecute; import org.eclipse.e4.ui.model.application.MContribution; @@ -59,9 +58,7 @@ public class SaveHandler { } } }); - - if (pmContext instanceof IDisposable) { - ((IDisposable) pmContext).dispose(); - } + + pmContext.dispose(); } } |