Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-02-04 03:15:45 +0000
committerIgor Fedorenko2011-02-04 15:33:10 +0000
commit4f90ba9fe1d69d9975ab7590c146bd7dbd8e1600 (patch)
treee74e757c57a9eb22542bd227e936e5ad0a10cdea /org.eclipse.m2e.jdt/src
parentdaed6eacd6cf37d1786851d09c77fe558bce39b5 (diff)
downloadm2e-core-4f90ba9fe1d69d9975ab7590c146bd7dbd8e1600.tar.gz
m2e-core-4f90ba9fe1d69d9975ab7590c146bd7dbd8e1600.tar.xz
m2e-core-4f90ba9fe1d69d9975ab7590c146bd7dbd8e1600.zip
moved m2e.jdt state to proper state location
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.jdt/src')
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/MavenJdtPlugin.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/MavenJdtPlugin.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/MavenJdtPlugin.java
index 3f269c61..c37b51b8 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/MavenJdtPlugin.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/MavenJdtPlugin.java
@@ -9,7 +9,6 @@
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
-
/*******************************************************************************
* Copyright (c) 2008 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
@@ -51,12 +50,13 @@ import org.eclipse.m2e.jdt.internal.launch.MavenLaunchConfigurationListener;
public class MavenJdtPlugin extends AbstractUIPlugin {
public static String PLUGIN_ID = "org.eclipse.m2e.jdt"; //$NON-NLS-1$
-
+
private static MavenJdtPlugin instance;
MavenLaunchConfigurationListener launchConfigurationListener;
+
BuildPathManager buildpathManager;
-
+
public MavenJdtPlugin() {
instance = this;
@@ -67,11 +67,13 @@ public class MavenJdtPlugin extends AbstractUIPlugin {
}
public void start(BundleContext bundleContext) throws Exception {
+ super.start(bundleContext);
+
if(Boolean.parseBoolean(Platform.getDebugOption(PLUGIN_ID + "/debug/initialization"))) { //$NON-NLS-1$
System.err.println("### executing start() " + PLUGIN_ID); //$NON-NLS-1$
new Throwable().printStackTrace();
}
-
+
IWorkspace workspace = ResourcesPlugin.getWorkspace();
MavenPlugin mavenPlugin = MavenPlugin.getDefault();
@@ -80,7 +82,7 @@ public class MavenJdtPlugin extends AbstractUIPlugin {
IndexManager indexManager = mavenPlugin.getIndexManager();
IMavenConfiguration mavenConfiguration = MavenPlugin.getDefault().getMavenConfiguration();
- File stateLocationDir = mavenPlugin.getStateLocation().toFile(); // TODO migrate JDT settings to this plugin's store
+ File stateLocationDir = getStateLocation().toFile();
this.buildpathManager = new BuildPathManager(console, projectManager, indexManager, bundleContext, stateLocationDir);
workspace.addResourceChangeListener(buildpathManager, IResourceChangeEvent.PRE_DELETE);
@@ -89,22 +91,24 @@ public class MavenJdtPlugin extends AbstractUIPlugin {
mavenConfiguration.addConfigurationChangeListener(new AbstractMavenConfigurationChangeListener() {
public void mavenConfigutationChange(MavenConfigurationChangeEvent event) {
- if (!MavenConfigurationChangeEvent.P_USER_SETTINGS_FILE.equals(event.getKey())) {
+ if(!MavenConfigurationChangeEvent.P_USER_SETTINGS_FILE.equals(event.getKey())) {
return;
}
- if (buildpathManager.setupVariables() && buildpathManager.variablesAreInUse()) {
+ if(buildpathManager.setupVariables() && buildpathManager.variablesAreInUse()) {
WorkspaceJob job = new WorkspaceJob(Messages.MavenJdtPlugin_job_name) {
public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, monitor);
return Status.OK_STATUS;
}
-
+
};
job.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
job.schedule();
- }}});
+ }
+ }
+ });
this.launchConfigurationListener = new MavenLaunchConfigurationListener();
DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(launchConfigurationListener);

Back to the top