/** * Shows the given context frame. * * @param frame the frane to display * @param initial <code>true</code> if this is the first frame to be displayed * @since 2.0 */ private void internalShowContextFrame(ContextFrame frame, boolean initial) { frame.fValidator.install(frame.fInformation, fViewer, frame.fOffset); if (frame.fPresenter != null) { if (fTextPresentation == null) fTextPresentation= new TextPresentation(); frame.fPresenter.install(frame.fInformation, fViewer, frame.fBeginOffset); frame.fPresenter.updatePresentation(frame.fOffset, fTextPresentation); } createContextInfoPopup(); fContextInfoText.setText(frame.fInformation.getInformationDisplayString()); if (fTextPresentation != null) TextPresentation.applyTextPresentation(fTextPresentation, fContextInfoText); resize(); if (initial) { if (fContentAssistant.addContentAssistListener(this, ContentAssistant2.CONTEXT_INFO_POPUP)) { fContentAssistant.addToLayout(this, fContextInfoPopup, ContentAssistant2.LayoutManager.LAYOUT_CONTEXT_INFO_POPUP, frame.fVisibleOffset); fContextInfoPopup.setVisible(true); } } else { fContentAssistant.layout(ContentAssistant2.LayoutManager.LAYOUT_CONTEXT_INFO_POPUP, frame.fVisibleOffset); } }
/** * Shows the given context frame. * * @param frame the frane to display * @param initial <code>true</code> if this is the first frame to be displayed * @since 2.0 */ private void internalShowContextFrame(ContextFrame frame, boolean initial) { frame.fValidator.install(frame.fInformation, fViewer, frame.fOffset); if (frame.fPresenter != null) { if (fTextPresentation == null) fTextPresentation= new TextPresentation(); frame.fPresenter.install(frame.fInformation, fViewer, frame.fBeginOffset); frame.fPresenter.updatePresentation(frame.fOffset, fTextPresentation); } createContextInfoPopup(); fContextInfoText.setText(frame.fInformation.getInformationDisplayString()); if (fTextPresentation != null) TextPresentation.applyTextPresentation(fTextPresentation, fContextInfoText); resize(); if (initial) { if (fContentAssistant.addContentAssistListener(this, ContentAssistant2.CONTEXT_INFO_POPUP)) { fContentAssistant.addToLayout(this, fContextInfoPopup, ContentAssistant2.LayoutManager.LAYOUT_CONTEXT_INFO_POPUP, frame.fVisibleOffset); fContextInfoPopup.setVisible(true); } } else { fContentAssistant.layout(ContentAssistant2.LayoutManager.LAYOUT_CONTEXT_INFO_POPUP, frame.fVisibleOffset); } }