public IContextInformationValidator getContextInformationValidator() { List<IContextInformationValidator> validators = null; for (IContentAssistProcessor delegate : delegates) { IContextInformationValidator validator = delegate.getContextInformationValidator(); if (validator != null) { if (validators == null) { validators = new ArrayList<IContextInformationValidator>(); } } } if (validators != null) { // FIXME: return a compound validator return validators.get(0); } return null; }
/** * Returns the context information validator that should be used to determine when the currently * displayed context information should be dismissed. The position is used to determine the * appropriate content assist processor to invoke. * * @param viewer the text viewer * @param offset a document offset * @return an validator * @see IContentAssistProcessor#getContextInformationValidator() * @since 3.0 */ IContextInformationValidator getContextInformationValidator(ITextViewer viewer, int offset) { IContentAssistProcessor p= getProcessor(viewer, offset); return p != null ? p.getContextInformationValidator() : null; }
/** * Returns the context information validator that should be used to determine when the currently * displayed context information should be dismissed. The position is used to determine the * appropriate content assist processor to invoke. * * @param contentAssistSubjectControl the content assist subject control * @param offset a document offset * @return an validator * @see IContentAssistProcessor#getContextInformationValidator() * @since 3.0 */ IContextInformationValidator getContextInformationValidator(IContentAssistSubjectControl contentAssistSubjectControl, int offset) { IContentAssistProcessor p= getProcessor(contentAssistSubjectControl, offset); return p != null ? p.getContextInformationValidator() : null; }
/** * Returns the context information validator that should be used to * determine when the currently displayed context information should * be dismissed. The position is used to determine the appropriate * content assist processor to invoke. * * @param textViewer the text viewer * @param offset a document offset * @return an validator * * @see IContentAssistProcessor#getContextInformationValidator */ IContextInformationValidator getContextInformationValidator(ITextViewer textViewer, int offset) { IContentAssistProcessor p= getProcessor(textViewer, offset); return p != null ? p.getContextInformationValidator() : null; }
/** * Returns the context information validator that should be used to * determine when the currently displayed context information should * be dismissed. The position is used to determine the appropriate * content assist processor to invoke. * * @param textViewer the text viewer * @param offset a document offset * @return an validator * * @see IContentAssistProcessor#getContextInformationValidator */ IContextInformationValidator getContextInformationValidator(ITextViewer textViewer, int offset) { IContentAssistProcessor p= getProcessor(textViewer, offset); return p != null ? p.getContextInformationValidator() : null; }
/** * Returns the context information validator that should be used to determine when the currently * displayed context information should be dismissed. The position is used to determine the * appropriate content assist processor to invoke. * * @param viewer the text viewer * @param offset a document offset * @return an validator * @see IContentAssistProcessor#getContextInformationValidator() * @since 3.0 */ IContextInformationValidator getContextInformationValidator(ITextViewer viewer, int offset) { Set<IContentAssistProcessor> processors= getProcessors(viewer, offset); if (processors == null || processors.isEmpty()) { return null; } // pick first one, arbitrary IContentAssistProcessor p = processors.iterator().next(); return p != null ? p.getContextInformationValidator() : null; }
/** * Returns the context information validator that should be used to determine when the currently * displayed context information should be dismissed. The position is used to determine the * appropriate content assist processor to invoke. * * @param contentAssistSubjectControl the content assist subject control * @param offset a document offset * @return an validator * @see IContentAssistProcessor#getContextInformationValidator() * @since 3.0 */ IContextInformationValidator getContextInformationValidator(IContentAssistSubjectControl contentAssistSubjectControl, int offset) { Set<IContentAssistProcessor> processors= getProcessors(contentAssistSubjectControl, offset); if (processors == null || processors.isEmpty()) { return null; } // pick first one, arbitrary IContentAssistProcessor p = processors.iterator().next(); return p != null ? p.getContextInformationValidator() : null; }