/** * Returns the proposals for the incorrectly spelled region. * * @param context the invocation context or <code>null</code> if none * @return the proposals for the incorrectly spelled region * @since 3.4 */ public ICompletionProposal[] getProposals(IQuickAssistInvocationContext context) { return getProposals(); } }
/** * Returns the proposals for the incorrectly spelled region. * * @param context the invocation context or <code>null</code> if none * @return the proposals for the incorrectly spelled region * @since 3.4 */ public ICompletionProposal[] getProposals(IQuickAssistInvocationContext context) { return getProposals(); } }
private List<ICompletionProposal> computeProposals(IQuickAssistInvocationContext context, SpellingProblem[] spellingProblems) { List<ICompletionProposal> proposals= new ArrayList<>(); for (int i= 0; i < spellingProblems.length; i++) proposals.addAll(Arrays.asList(spellingProblems[i].getProposals(context))); return proposals; }
private List computeProposals(IQuickAssistInvocationContext context, SpellingProblem[] spellingProblems) { List proposals= new ArrayList(); for (int i= 0; i < spellingProblems.length; i++) proposals.addAll(Arrays.asList(spellingProblems[i].getProposals())); return proposals; }
private List<ICompletionProposal> computeProposals(IQuickAssistInvocationContext context, SpellingProblem[] spellingProblems) { List<ICompletionProposal> proposals= new ArrayList<>(); for (int i= 0; i < spellingProblems.length; i++) proposals.addAll(Arrays.asList(spellingProblems[i].getProposals(context))); return proposals; }
/** * @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);