Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilos Kleint2011-03-21 03:59:12 -0400
committerMilos Kleint2011-03-21 03:59:12 -0400
commit327612b3f099cd074388c0ab3f1644230e5463a9 (patch)
treefbb1adccbb01feccea64d59fe77dd1f21e44fe48 /org.eclipse.m2e.editor.xml
parent7c51544b4f47201686733a55af17c42b251a7ed7 (diff)
downloadm2e-core-327612b3f099cd074388c0ab3f1644230e5463a9.tar.gz
m2e-core-327612b3f099cd074388c0ab3f1644230e5463a9.tar.xz
m2e-core-327612b3f099cd074388c0ab3f1644230e5463a9.zip
fix some issues as reported by the problems view
Diffstat (limited to 'org.eclipse.m2e.editor.xml')
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java5
-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/PomHyperlinkDetector.java2
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java2
4 files changed, 4 insertions, 7 deletions
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java
index 24c14c58..276548e3 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java
@@ -25,7 +25,6 @@ import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.ICompletionProposalExtension5;
import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
@@ -42,12 +41,10 @@ public class InsertExpressionProposal implements ICompletionProposal, ICompletio
private MavenProject project;
private String key;
private Region region;
- private ISourceViewer sourceViewer;
private int len = 0;
- public InsertExpressionProposal(ISourceViewer sourceViewer, Region region, String key, MavenProject mvnproject) {
+ public InsertExpressionProposal(Region region, String key, MavenProject mvnproject) {
assert project != null;
- this.sourceViewer = sourceViewer;
this.region = region;
this.key = key;
this.project = mvnproject;
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 184de30c..0e648cdd 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
@@ -183,7 +183,7 @@ public class PomContentAssistProcessor extends XMLContentAssistProcessor {
collect.add("project.build.directory"); //$NON-NLS-1$
}
for (String key : collect) {
- ICompletionProposal proposal = new InsertExpressionProposal(sourceViewer, region, key, prj);
+ ICompletionProposal proposal = new InsertExpressionProposal(region, key, prj);
if(request.shouldSeparate()) {
request.addMacro(proposal);
} else {
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
index 35021671..1c2ddb3f 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
@@ -607,7 +607,7 @@ public class PomHyperlinkDetector implements IHyperlinkDetector {
if (versionString == null) {
return Status.OK_STATUS;
}
- final IEditorPart page = OpenPomAction.openEditor(gridString,
+ OpenPomAction.openEditor(gridString,
artidString,
versionString, monitor);
// TODO: it's preferable to open the xml page, but this code will blink and open overview first and later switch. looks bad
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
index 81a41359..0061026b 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
@@ -196,7 +196,7 @@ public enum PomTemplateContext {
}
}
//mkleint: this concept that all versions out there are equal is questionable..
- if (project != null && "dependency".equals(node.getParentNode().getNodeName())) { //$NON-NLS-1$
+ if ("dependency".equals(node.getParentNode().getNodeName())) { //$NON-NLS-1$
//see if we can complete the properties ending with .version
List<String> keys = new ArrayList<String>();

Back to the top