Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Piggott2011-03-18 10:35:38 -0400
committerMatthew Piggott2011-03-18 13:51:33 -0400
commit20adda52abe844ebd1acae94ade1984c86262acc (patch)
tree4c5bdfcd330ff3f792a2744d7afc52dbc6a3dad2 /org.eclipse.m2e.discovery/src
parent07867ddc215159d12b46b5e9bbf480b49e961bec (diff)
downloadm2e-core-20adda52abe844ebd1acae94ade1984c86262acc.tar.gz
m2e-core-20adda52abe844ebd1acae94ade1984c86262acc.tar.xz
m2e-core-20adda52abe844ebd1acae94ade1984c86262acc.zip
Bug 340328 - Avoid early activation of m2e bundles on first run
Diffstat (limited to 'org.eclipse.m2e.discovery/src')
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java
index e64cc46c..0470605d 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/startup/UpdateConfigurationStartup.java
@@ -42,8 +42,10 @@ public class UpdateConfigurationStartup implements IStartup {
private static final String PROJECT_PREF = DiscoveryActivator.PLUGIN_ID + ".pref.projects"; //$NON-NLS-1$
public void earlyStartup() {
- final MavenPlugin plugin = MavenPlugin.getDefault();
- new UpdateConfigurationJob(plugin, getSavedProjects()).schedule();
+ IProject[] projects = getSavedProjects();
+ if(projects != null && projects.length > 0) {
+ updateConfiguration(projects);
+ }
disableStartup();
}
@@ -87,6 +89,11 @@ public class UpdateConfigurationStartup implements IStartup {
new UpdateConfigurationJob(MavenPlugin.getDefault(), projects.toArray(new IProject[projects.size()])).schedule();
}
+ private static void updateConfiguration(IProject[] projects) {
+ final MavenPlugin plugin = MavenPlugin.getDefault();
+ new UpdateConfigurationJob(plugin, projects).schedule();
+ }
+
private static void addEarlyStartup() {
String[] disabledEarlyActivation = Workbench.getInstance().getDisabledEarlyActivatedPlugins();

Back to the top