Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Piggott2011-04-15 12:44:32 -0400
committerMatthew Piggott2011-04-15 15:03:24 -0400
commitcfc9d18fb6459472703ee574e6d5a1e0e6f5effe (patch)
tree5a88be0ce50becaa93262ff039fb75e3c86358ef /org.eclipse.m2e.refactoring
parent72aebf4dd3e1edf8b158a11627fe3c0dd044557c (diff)
downloadm2e-core-cfc9d18fb6459472703ee574e6d5a1e0e6f5effe.tar.gz
m2e-core-cfc9d18fb6459472703ee574e6d5a1e0e6f5effe.tar.xz
m2e-core-cfc9d18fb6459472703ee574e6d5a1e0e6f5effe.zip
Removed many uses of depreciated MavenPlugin.getDefault()
Diffstat (limited to 'org.eclipse.m2e.refactoring')
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/AbstractPomRefactoring.java11
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java6
2 files changed, 6 insertions, 11 deletions
diff --git a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/AbstractPomRefactoring.java b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/AbstractPomRefactoring.java
index 8b42b482..954cab0e 100644
--- a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/AbstractPomRefactoring.java
+++ b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/AbstractPomRefactoring.java
@@ -73,9 +73,6 @@ public abstract class AbstractPomRefactoring extends Refactoring {
// main file that is being refactored
protected IFile file;
- // maven plugin
- protected MavenPlugin mavenPlugin;
-
// editing domain
protected AdapterFactoryEditingDomain editingDomain;
@@ -84,8 +81,6 @@ public abstract class AbstractPomRefactoring extends Refactoring {
public AbstractPomRefactoring(IFile file) {
this.file = file;
- this.mavenPlugin = MavenPlugin.getDefault();
-
List<AdapterFactoryImpl> factories = new ArrayList<AdapterFactoryImpl>();
factories.add(new ResourceItemProviderAdapterFactory());
factories.add(new ReflectiveItemProviderAdapterFactory());
@@ -107,7 +102,7 @@ public abstract class AbstractPomRefactoring extends Refactoring {
@Override
public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
CompositeChange res = new CompositeChange(getTitle());
- IMavenProjectFacade[] projects = mavenPlugin.getMavenProjectRegistry().getProjects();
+ IMavenProjectFacade[] projects = MavenPlugin.getMavenProjectRegistry().getProjects();
pm.beginTask(Messages.AbstractPomRefactoring_task, projects.length);
models = new HashMap<String, RefactoringModelResources>();
@@ -270,8 +265,8 @@ public abstract class AbstractPomRefactoring extends Refactoring {
protected MavenProject getParentProject(IMavenProjectFacade project, MavenProject current, IProgressMonitor monitor)
throws CoreException {
- IMaven maven = mavenPlugin.getMaven();
- IMavenProjectRegistry projectManager = mavenPlugin.getMavenProjectRegistry();
+ IMaven maven = MavenPlugin.getMaven();
+ IMavenProjectRegistry projectManager = MavenPlugin.getMavenProjectRegistry();
MavenExecutionRequest request = projectManager.createExecutionRequest(project.getPom(),
project.getResolverConfiguration(), monitor);
diff --git a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java
index 5597843d..6cb39e16 100644
--- a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java
+++ b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java
@@ -82,11 +82,11 @@ public class ExcludeArtifactRefactoring extends Refactoring {
}
protected IMavenProjectFacade getMavenProjectFacade(IFile pom) {
- return MavenPlugin.getDefault().getMavenProjectRegistry().create(pom, true, new NullProgressMonitor());
+ return MavenPlugin.getMavenProjectRegistry().create(pom, true, new NullProgressMonitor());
}
protected IMavenProjectFacade getMavenProjectFacade(MavenProject mavenProject) {
- return MavenPlugin.getDefault().getMavenProjectRegistry()
+ return MavenPlugin.getMavenProjectRegistry()
.getMavenProject(mavenProject.getGroupId(), mavenProject.getArtifactId(), mavenProject.getVersion());
}
@@ -225,7 +225,7 @@ public class ExcludeArtifactRefactoring extends Refactoring {
}
private Visitor locate(MavenProject project, IProgressMonitor monitor) throws CoreException {
- DependencyNode root = MavenPlugin.getDefault().getMavenModelManager()
+ DependencyNode root = MavenPlugin.getMavenModelManager()
.readDependencyTree(project, JavaScopes.TEST, monitor);
Visitor visitor = new Visitor(project);
root.accept(visitor);

Back to the top