Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1160)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/spelling/SpellingQuickFixProcessor.java

Issue 10816034: Basic 'Quick Fix' support and one fix as example/test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/spelling/SpellingQuickFixProcessor.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/spelling/SpellingQuickFixProcessor.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/spelling/SpellingQuickFixProcessor.java
index b576135a5063529ed0207324680979ada1e2da11..87a0731fc88c03251515787ee25e0245a4e94e55 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/spelling/SpellingQuickFixProcessor.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/spelling/SpellingQuickFixProcessor.java
@@ -13,6 +13,7 @@
*/
package com.google.dart.tools.ui.internal.text.spelling;
+import com.google.dart.compiler.ErrorCode;
import com.google.dart.tools.core.buffer.Buffer;
import com.google.dart.tools.core.model.CompilationUnit;
import com.google.dart.tools.ui.internal.text.dart.DartCompletionProposal;
@@ -96,12 +97,6 @@ public class SpellingQuickFixProcessor implements IQuickFixProcessor {
};
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#accept
- * (org.eclipse.ui.texteditor.spelling.SpellingProblem)
- */
@Override
messick 2012/07/24 16:49:54 Thanks for cleaning up comments!
public void accept(SpellingProblem problem) {
ICompletionProposal[] proposals = problem.getProposals(fContext);
@@ -110,21 +105,11 @@ public class SpellingQuickFixProcessor implements IQuickFixProcessor {
}
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.ui.texteditor.spelling.ISpellingProblemCollector# beginCollecting()
- */
@Override
public void beginCollecting() {
fProposals.clear();
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.ui.texteditor.spelling.ISpellingProblemCollector# endCollecting()
- */
@Override
public void endCollecting() {
}
@@ -142,92 +127,45 @@ public class SpellingQuickFixProcessor implements IQuickFixProcessor {
fProposal = spellingProposal;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(
- * org.eclipse.jface.text.IDocument)
- */
@Override
public void apply(IDocument document) {
fProposal.apply(document);
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.jface.text.contentassist.ICompletionProposal# getAdditionalProposalInfo()
- */
@Override
public String getAdditionalProposalInfo() {
return fProposal.getAdditionalProposalInfo();
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.jface.text.contentassist.ICompletionProposal# getContextInformation()
- */
@Override
public IContextInformation getContextInformation() {
return fProposal.getContextInformation();
}
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.jface.text.contentassist.ICompletionProposal# getDisplayString()
- */
@Override
public String getDisplayString() {
return fProposal.getDisplayString();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
- */
@Override
public Image getImage() {
return fProposal.getImage();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.ui.text.java.IJavaCompletionProposal#getRelevance ()
- */
@Override
public int getRelevance() {
return 50;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection
- * (org.eclipse.jface.text.IDocument)
- */
@Override
public Point getSelection(IDocument document) {
return fProposal.getSelection(document);
}
}
- /**
- *
- */
public SpellingQuickFixProcessor() {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.ui.text.java.IQuickFixProcessor#getCorrections
- * (org.eclipse.wst.jsdt.ui.text.java.IInvocationContext,
- * org.eclipse.wst.jsdt.ui.text.java.IProblemLocation[])
- */
@Override
public DartCompletionProposal[] getCorrections(IInvocationContext context,
IProblemLocation[] locations) throws CoreException {
@@ -252,14 +190,8 @@ public class SpellingQuickFixProcessor implements IQuickFixProcessor {
return collector.getProposals();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.jsdt.ui.text.java.IQuickFixProcessor#hasCorrections
- * (org.eclipse.wst.jsdt.core.IJavaScriptUnit, int)
- */
@Override
- public boolean hasCorrections(CompilationUnit unit, int problemId) {
+ public boolean hasCorrections(CompilationUnit unit, ErrorCode problemId) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698