Search in sources :

Example 1 with MavenProjectManager

use of org.eclipse.m2e.core.internal.project.registry.MavenProjectManager in project m2e-nar by maven-nar.

the class MavenNarPlugin method start.

/**
 * @noreference see class javadoc
 */
public void start(BundleContext bundleContext) throws Exception {
    super.start(bundleContext);
    if (Boolean.parseBoolean(Platform.getDebugOption(PLUGIN_ID + "/debug/initialization"))) {
        System.err.println("### executing start() " + PLUGIN_ID);
        new Throwable().printStackTrace();
    }
    // Make sure the m2e jdt plugin is initialised first
    MavenJdtPlugin.getDefault();
    MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();
    this.buildpathManager = new BuildPathManager(projectManager);
    projectManager.addMavenProjectChangedListener(this.buildpathManager);
/*
		 * this.launchConfigurationListener = new
		 * MavenLaunchConfigurationListener();
		 * DebugPlugin.getDefault().getLaunchManager
		 * ().addLaunchConfigurationListener(launchConfigurationListener);
		 * projectManager
		 * .addMavenProjectChangedListener(launchConfigurationListener);
		 * 
		 * this.mavenClassifierManager = new MavenClassifierManager();
		 */
}
Also used : BuildPathManager(com.github.sdedwards.m2e_nar.internal.BuildPathManager) MavenProjectManager(org.eclipse.m2e.core.internal.project.registry.MavenProjectManager)

Example 2 with MavenProjectManager

use of org.eclipse.m2e.core.internal.project.registry.MavenProjectManager in project m2e-nar by maven-nar.

the class AbstractTestBuild method validateCdtProject.

private void validateCdtProject(IProject project) {
    final MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();
    final IMavenProjectFacade facade = projectManager.getProject(project);
    assertNotNull(facade);
}
Also used : IMavenProjectFacade(org.eclipse.m2e.core.project.IMavenProjectFacade) MavenProjectManager(org.eclipse.m2e.core.internal.project.registry.MavenProjectManager)

Example 3 with MavenProjectManager

use of org.eclipse.m2e.core.internal.project.registry.MavenProjectManager in project m2e-nar by maven-nar.

the class MavenNarPlugin method stop.

/**
 * @noreference see class javadoc
 */
public void stop(BundleContext context) throws Exception {
    MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();
    projectManager.removeMavenProjectChangedListener(buildpathManager);
    /*
		 * workspace.removeResourceChangeListener(this.buildpathManager);
		 * 
		 * DebugPlugin.getDefault().getLaunchManager().
		 * removeLaunchConfigurationListener(launchConfigurationListener);
		 * projectManager
		 * .removeMavenProjectChangedListener(launchConfigurationListener);
		 * 
		 * this.launchConfigurationListener = null; this.mavenClassifierManager
		 * = null;
		 */
    this.buildpathManager = null;
}
Also used : MavenProjectManager(org.eclipse.m2e.core.internal.project.registry.MavenProjectManager)

Aggregations

MavenProjectManager (org.eclipse.m2e.core.internal.project.registry.MavenProjectManager)3 BuildPathManager (com.github.sdedwards.m2e_nar.internal.BuildPathManager)1 IMavenProjectFacade (org.eclipse.m2e.core.project.IMavenProjectFacade)1