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.editor.xml
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.editor.xml')
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java2
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java3
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java6
3 files changed, 5 insertions, 6 deletions
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java
index 9b9c475a..5e0c0199 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java
@@ -330,7 +330,7 @@ public class PomContentAssistProcessor extends XMLContentAssistProcessor {
public static String findRelativePath(ISourceViewer viewer, String groupId, String artifactId, String version) {
if (groupId != null && artifactId != null && version != null) {
- IMavenProjectFacade facade = MavenPlugin.getDefault().getMavenProjectRegistry().getMavenProject(groupId, artifactId, version);
+ IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().getMavenProject(groupId, artifactId, version);
if (facade != null) {
//now add the proposal for relativePath
IFile parentPomFile = facade.getPom();
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java
index 384b7b17..ffd75d31 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java
@@ -49,9 +49,8 @@ class PomTemplateContextUtil {
return descriptor;
}
- MavenPlugin plugin = MavenPlugin.getDefault();
try {
- IMaven embedder = MavenPlugin.getDefault().getMaven();
+ IMaven embedder = MavenPlugin.getMaven();
List<ArtifactRepository> repositories = embedder.getArtifactRepositories();
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java
index 2261e7a0..ba210189 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java
@@ -81,7 +81,7 @@ public class XmlUtils {
* what is this method supposed to do? for the sourceViewer find the associated file on disk and for
* that one find the IProject it belongs to. The required condition for the IProject instance is that
* project relative path of the file shall only be pom.xml (thus no nested, unopened maven pom).
- * So that when MavenPlugin.getDefault().getMavenProjectManager().getProject(prj); is called later on
+ * So that when MavenPlugin.getMavenProjectManager().getProject(prj); is called later on
* the instance, it actually returns the maven model facade for the pom.xml backing the sourceViewer.
* @param sourceViewer
* @return
@@ -156,12 +156,12 @@ public class XmlUtils {
}
String[] splitStrings = modelId.split(":");
assert splitStrings.length == 3;
- IMavenProjectFacade facade = MavenPlugin.getDefault().getMavenProjectRegistry().getMavenProject(splitStrings[0], splitStrings[1], splitStrings[2]);
+ IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().getMavenProject(splitStrings[0], splitStrings[1], splitStrings[2]);
if (facade != null) {
file = facade.getPomFile();
} else {
//if not in the workspace, try looking into the local repository.
- IMaven maven = MavenPlugin.getDefault().getMaven();
+ IMaven maven = MavenPlugin.getMaven();
try {
String path = maven.getArtifactPath(maven.getLocalRepository(), splitStrings[0], splitStrings[1], splitStrings[2], "pom", null);
if (path != null) {

Back to the top