commit | 26b7abbc9994d2ae1dfcd1863947b7b5ab3617a0 | [log] [tgz] |
---|---|---|
author | Pascal Rapicault <prapicau> | Thu May 27 14:46:33 2004 +0000 |
committer | Pascal Rapicault <prapicau> | Thu May 27 14:46:33 2004 +0000 |
tree | b5f94379ae371a02bd31fe10269032835de12759 | |
parent | e4c7a6aa54a95fd93ba77af9f6bd1692d0a536b5 [diff] |
Bug 63324 Plugin not deactivated with Exception at startup()
diff --git a/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/compatibility/PluginActivator.java b/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/compatibility/PluginActivator.java index aeea375..93bc957 100644 --- a/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/compatibility/PluginActivator.java +++ b/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/compatibility/PluginActivator.java
@@ -45,8 +45,15 @@ this.context = context; PluginDescriptor pd = (PluginDescriptor) Platform.getPluginRegistry().getPluginDescriptor(context.getBundle().getSymbolicName()); plugin = pd.getPlugin(); - plugin.start(context); - plugin.startup(); + try { + plugin.start(context); + plugin.startup(); + } catch(Exception e) { + plugin.shutdown(); + plugin.stop(context); + pd.markAsDeactivated(); + throw e; + } } private void ensureNormalStartup(BundleContext context) throws BundleException {
diff --git a/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/plugins/PluginDescriptor.java b/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/plugins/PluginDescriptor.java index bab92a7..a771088 100644 --- a/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/plugins/PluginDescriptor.java +++ b/bundles/org.eclipse.core.runtime.compatibility/src-runtime/org/eclipse/core/internal/plugins/PluginDescriptor.java
@@ -439,4 +439,8 @@ public boolean hasPluginObject() { return pluginObject!=null; } + + public void markAsDeactivated() { + deactivated = true; + } } \ No newline at end of file