@Override public void run() throws Exception { processors.forEach(p -> { ICompletionProposal[] proposals= p.computeCompletionProposals(viewer, offset); if (proposals != null) { res.addAll(Arrays.asList(proposals)); } fLastErrorMessage= p.getErrorMessage(); }); } });
@Override public void run() throws Exception { result[0]= ((ISubjectControlContentAssistProcessor) p) .computeContextInformation(contentAssistSubjectControl, offset); fLastErrorMessage= p.getErrorMessage(); } });
@Override public boolean isContextInformationValid(int offset) { if (fContentAssistSubjectControl != null && fProcessor instanceof ISubjectControlContentAssistProcessor) { IContextInformation[] infos= ((ISubjectControlContentAssistProcessor)fProcessor).computeContextInformation(fContentAssistSubjectControl, offset); if (infos != null && infos.length > 0) { for (IContextInformation info : infos) { if (fContextInformation.equals(info)) return true; } } } return false; } }
@Override public void run() throws Exception { result[0]= ((ISubjectControlContentAssistProcessor) p) .computeCompletionProposals(contentAssistSubjectControl, offset); fLastErrorMessage= p.getErrorMessage(); } });
@Override public boolean isContextInformationValid(int offset) { if (fContentAssistSubjectControl != null && fProcessor instanceof ISubjectControlContentAssistProcessor) { IContextInformation[] infos= ((ISubjectControlContentAssistProcessor)fProcessor).computeContextInformation(fContentAssistSubjectControl, offset); if (infos != null && infos.length > 0) { for (int i= 0; i < infos.length; i++) { if (fContextInformation.equals(infos[i])) return true; } } } return false; } }