private void collectSpellingProblems(Annotation annotation, List<SpellingProblem> problems) { if (annotation instanceof SpellingAnnotation) problems.add(((SpellingAnnotation)annotation).getSpellingProblem()); }
@Override public void accept(SpellingProblem problem) { fAddAnnotations.put(new SpellingAnnotation(problem), new Position(problem.getOffset(), problem.getLength())); }
@Override public void accept(SpellingProblem problem) { fAddAnnotations.put(new SpellingAnnotation(problem), new Position(problem.getOffset(), problem.getLength())); }
private void collectSpellingProblems(Annotation annotation, Position pos, List problems) { if (annotation instanceof SpellingAnnotation) problems.add(((SpellingAnnotation)annotation).getSpellingProblem()); }
public void accept(SpellingProblem problem) { fAddAnnotations.put(new SpellingAnnotation(problem), new Position(problem.getOffset(), problem.getLength())); }
private void collectSpellingProblems(Annotation annotation, List<SpellingProblem> problems) { if (annotation instanceof SpellingAnnotation) problems.add(((SpellingAnnotation)annotation).getSpellingProblem()); }
@Override public void accept(SpellingProblem problem) { fAddAnnotations.put(new SpellingAnnotation(problem), new Position(problem.getOffset(), problem.getLength())); }
/** * @since 2.3 */ protected List<ICompletionProposal> createQuickfixes(IQuickAssistInvocationContext invocationContext, Set<Annotation> applicableAnnotations) { List<ICompletionProposal> result = Lists.newArrayList(); ISourceViewer sourceViewer = invocationContext.getSourceViewer(); IAnnotationModel annotationModel = sourceViewer.getAnnotationModel(); IXtextDocument xtextDocument = XtextDocumentUtil.get(sourceViewer); for(Annotation annotation : applicableAnnotations) { if (annotation instanceof SpellingAnnotation) { SpellingProblem spellingProblem = ((SpellingAnnotation) annotation).getSpellingProblem(); result.addAll(asList(spellingProblem.getProposals())); } else { final Issue issue = issueUtil.getIssueFromAnnotation(annotation); if (issue != null) { Iterable<IssueResolution> resolutions = getResolutions(issue, xtextDocument); if (resolutions.iterator().hasNext()) { Position pos = annotationModel.getPosition(annotation); for (IssueResolution resolution : resolutions) { result.add(create(pos, resolution)); } } } } } return result; }
SpellingAnnotation annotation = (SpellingAnnotation) key; if (amodel.getPosition(annotation).overlapsWith(offset, 1)) { ICompletionProposal[] proposals = annotation.getSpellingProblem().getProposals(); for (ICompletionProposal proposal : proposals) { proposalSet.add(proposal);