/** * Creates a context frame for the given offset. * * @param information the context information * @param offset the offset * @return the created context frame * @since 3.0 */ private ContextFrame createContextFrame(IContextInformation information, int offset) { IContextInformationValidator validator= fContentAssistSubjectControlAdapter.getContextInformationValidator(fContentAssistant, offset); if (validator != null) { int beginOffset= (information instanceof IContextInformationExtension) ? ((IContextInformationExtension) information).getContextInformationPosition() : offset; if (beginOffset == -1) beginOffset= offset; int visibleOffset= fContentAssistSubjectControlAdapter.getWidgetSelectionRange().x - (offset - beginOffset); IContextInformationPresenter presenter = fContentAssistSubjectControlAdapter.getContextInformationPresenter(fContentAssistant, offset); return new ContextFrame(information, beginOffset, offset, visibleOffset, validator, presenter); } return null; }
/** * Creates a context frame for the given offset. * * @param information the context information * @param offset the offset * @return the created context frame * @since 3.0 */ private ContextFrame createContextFrame(IContextInformation information, int offset) { IContextInformationValidator validator= fContentAssistSubjectControlAdapter.getContextInformationValidator(fContentAssistant, offset); if (validator != null) { int beginOffset= (information instanceof IContextInformationExtension) ? ((IContextInformationExtension) information).getContextInformationPosition() : offset; if (beginOffset == -1) beginOffset= offset; int visibleOffset= fContentAssistSubjectControlAdapter.getWidgetSelectionRange().x - (offset - beginOffset); IContextInformationPresenter presenter = fContentAssistSubjectControlAdapter.getContextInformationPresenter(fContentAssistant, offset); return new ContextFrame(information, beginOffset, offset, visibleOffset, validator, presenter); } return null; }