Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.IInformationControlCreator


      // hover region: the beginning of the concerned line to place the control right over the line
      IDocument document= fSourceViewer.getDocument();
      int offset= document.getLineOffset(line);
      String contentType= TextUtilities.getContentType(document, fSourceViewerConfiguration.getConfiguredDocumentPartitioning(fSourceViewer), offset, true);

      IInformationControlCreator controlCreator= null;
      if (annotationHover instanceof IInformationProviderExtension2) // this is undocumented, but left here for backwards compatibility
        controlCreator= ((IInformationProviderExtension2) annotationHover).getInformationPresenterControlCreator();
      else if (annotationHover instanceof IAnnotationHoverExtension)
        controlCreator= ((IAnnotationHoverExtension) annotationHover).getHoverControlCreator();
View Full Code Here


        if (hoverRegion == null)
          return false;

        String hoverInfo= textHover.getHoverInfo(sourceViewer, hoverRegion);

        IInformationControlCreator controlCreator= null;
        if (textHover instanceof IInformationProviderExtension2) // this is conceptually wrong, but left here for backwards compatibility
          controlCreator= ((IInformationProviderExtension2)textHover).getInformationPresenterControlCreator();

        IInformationProvider informationProvider= new FocusedInformationPresenter.InformationProvider(hoverRegion, hoverInfo, controlCreator);
View Full Code Here

  /*
   * @see org.eclipse.jface.text.IInformationControlExtension5#getInformationPresenterControlCreator()
   * @since 3.4
   */
  public IInformationControlCreator getInformationPresenterControlCreator() {
    return new IInformationControlCreator() {
      public IInformationControl createInformationControl(Shell parent) {
        return new SourceViewerInformationControl(parent, true, fSymbolicFontName, null);
      }
    };
  }
View Full Code Here

        return getTemplate().getDescription();
    }
   
    private IInformationControlCreator defaultCreatorWithHtmlTextPresenter() {
        return
            new IInformationControlCreator() {
                public IInformationControl createInformationControl(Shell parent) {
                    BrowserInformationControl browserInformationControl = new BrowserInformationControl(parent, SWT.TOOL | SWT.NO_TRIM, SWT.COLOR_GREEN, getTemplate().getName());
                    return browserInformationControl;
                }
            };
View Full Code Here

    /**
     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getInformationControlCreator(org.eclipse.jface.text.source.ISourceViewer)
     */
    public IInformationControlCreator getInformationControlCreator( ISourceViewer sourceViewer )
    {
        return new IInformationControlCreator()
        {
            public IInformationControl createInformationControl( Shell parent )
            {
                return new DefaultInformationControl( parent, SWT.WRAP, null );
            }
View Full Code Here

    /*
     * @see org.eclipse.jface.text.ITextHoverExtension#getHoverControlCreator()
     */
    public IInformationControlCreator getHoverControlCreator() {
        return new IInformationControlCreator() {
            public IInformationControl createInformationControl(Shell parent) {
                String tooltipAffordanceString = null;
                try {
                    tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
                } catch (Throwable e) {
View Full Code Here

    public void hide() {
        super.hide();
    }

    public static IInformationControlCreator createInformationControlCreator(ISourceViewer sourceViewer) {
        return new IInformationControlCreator() {
            public IInformationControl createInformationControl(Shell parent) {
                return new DefaultInformationControl(parent, new PyInformationPresenter());
            }
        };
    }
View Full Code Here

            ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();

            fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
            fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
            fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning");
            fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
                public IInformationControl createInformationControl(Shell shell) {
                    return new DefaultInformationControl(shell);
                }
            });
            fProjectionSupport.install();
View Full Code Here

    /*
     * @see org.eclipse.jface.text.ITextHoverExtension#getHoverControlCreator()
     */
    public IInformationControlCreator getHoverControlCreator() {
        return new IInformationControlCreator() {
            public IInformationControl createInformationControl(Shell parent) {
                String tooltipAffordanceString = null;
                try {
                    tooltipAffordanceString = EditorsUI.getTooltipAffordanceString();
                } catch (Throwable e) {
View Full Code Here

  }

  public IInformationControlCreator getInformationControlCreator(
      ISourceViewer sourceViewer) {
    return new IInformationControlCreator() {
      public IInformationControl createInformationControl(Shell parent) {
        return new DefaultInformationControl(parent,
            new HTMLTextPresenter());
      }
    };
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.IInformationControlCreator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.