Examples of InformationPresenter


Examples of org.eclipse.jface.text.information.InformationPresenter

    IEditorPart editorPart = Plugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();   
    if (editorPart != null && editorPart instanceof AbstractWGATextEditor) {
     
      AbstractWGATextEditor editor = (AbstractWGATextEditor) editorPart;

      InformationPresenter presenter=
        new InformationPresenter(new HTMLInformationControlCreator(500,250));
      presenter.setDocumentPartitioning(editor.getViewerConfiguration().getConfiguredDocumentPartitioning(editor.getViewer()));

      IInformationProvider provider= new TMLInformationProvider();
     
      String[] contentTypes = editor.getViewerConfiguration().getConfiguredContentTypes(editor.getViewer());
      for (int i= 0; i < contentTypes.length; i++) {
        presenter.setInformationProvider(provider, contentTypes[i]);
      }
      presenter.install(editor.getViewer());
      presenter.showInformation();
    }
    return null;
 
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    public void createPartControl(final Composite parent) {
        super.createPartControl(parent);

        final IInformationControlCreator informationControlCreator = getSourceViewerConfiguration()
                .getInformationControlCreator(getSourceViewer());
        fInformationPresenter = new InformationPresenter(informationControlCreator);
        // sizes: see org.eclipse.jface.text.TextViewer.TEXT_HOVER_*_CHARS
        fInformationPresenter.setSizeConstraints(100, 12, true, true);
        fInformationPresenter.install(getSourceViewer());
        fInformationPresenter.setDocumentPartitioning(getSourceViewerConfiguration()
                .getConfiguredDocumentPartitioning(getSourceViewer()));
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    /**
     * Initializes a new instance.
     */
    ShowAnnotationContextEditAction() {
      if (mPresenter == null) {
        mPresenter = new InformationPresenter(new AnnotationEditingControlCreator());

        mPresenter.setInformationProvider(new AnnotationInformationProvider(AnnotationEditor.this),
                org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
        mPresenter.setDocumentPartitioning(org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
        mPresenter.install(getSourceViewer());
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    /**
     * Initializes a new instance.
     */
    ShowAnnotationContextEditAction() {
      mPresenter = new InformationPresenter(new AnnotationEditingControlCreator());

      mPresenter.setInformationProvider(new AnnotationInformationProvider(AnnotationEditor.this),
              org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
      mPresenter.setDocumentPartitioning(org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
      mPresenter.install(getSourceViewer());
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    return null;
  }
 
  @Override
  public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
    InformationPresenter informationPresenter = (InformationPresenter) super.getInformationPresenter(sourceViewer);
    ScriptInformationProvider_Mod sip = new ScriptInformationProvider_Mod(getEditor()) {
      @Override
      protected IScriptEditorTextHover createImplementation() {
        return new DeeDocTextHover();
      }
    };
    informationPresenter.setInformationProvider(sip, IDocument.DEFAULT_CONTENT_TYPE);
    return informationPresenter;
  }
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    if (getEditor() != null
        && getEditor().getEditorInput() != null
        && EditorUtility.getEditorInputModelElement(getEditor(), true) == null)
      return null;
   
    InformationPresenter presenter = new InformationPresenter(getHierarchyPresenterControlCreator());
    presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
    @SuppressWarnings("restriction")
    IInformationProvider provider = new org.eclipse.dltk.internal.ui.text.ScriptElementProvider(getEditor(), doCodeResolve);
//    IInformationProvider provider = new ScriptElementProvider(getEditor(), doCodeResolve);
   
    presenter.setInformationProvider(provider, DeePartitions.DEE_CODE);
   
    presenter.setSizeConstraints(50, 20, true, false);
    return presenter;
  }
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

        int style= cutDown ? SWT.NONE : (SWT.V_SCROLL | SWT.H_SCROLL);
        return new DefaultInformationControl(shell, SWT.RESIZE | SWT.TOOL, style, new HTMLTextPresenter(cutDown));
      }
    };
   
    fInformationPresenter= new InformationPresenter(informationControlCreator);
    fInformationPresenter.setSizeConstraints(60, 10, true, true);
    fInformationPresenter.install(getSourceViewer());
    fInformationPresenter.setDocumentPartitioning(getSourceViewerConfiguration().getConfiguredDocumentPartitioning(getSourceViewer()));
   
  }
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    // Do not create hierarchy presenter if there's no CU.
    if (getEditor() != null && getEditor().getEditorInput() != null
            && EditorUtility.getEditorInputModelElement(getEditor(), true) == null)
      return null;

    InformationPresenter presenter = new InformationPresenter(
            getHierarchyPresenterControlCreator(sourceViewer));
    presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
    IInformationProvider provider = new ScriptElementProvider(getEditor(), doCodeResolve);
    presenter.setInformationProvider(provider, IDocument.DEFAULT_CONTENT_TYPE);

    presenter.setSizeConstraints(50, 20, true, false);
    return presenter;
  }
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    /**
     * Initializes a new instance.
     */
    ShowAnnotationContextEditAction() {
      mPresenter = new InformationPresenter(new AnnotationEditingControlCreator());

      mPresenter.setInformationProvider(new AnnotationInformationProvider(AnnotationEditor.this),
              org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
      mPresenter.setDocumentPartitioning(org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
      mPresenter.install(getSourceViewer());
View Full Code Here

Examples of org.eclipse.jface.text.information.InformationPresenter

    /**
     * Initializes a new instance.
     */
    ShowAnnotationContextEditAction() {
      mPresenter = new InformationPresenter(new AnnotationEditingControlCreator());

      mPresenter.setInformationProvider(new AnnotationInformationProvider(AnnotationEditor.this),
              org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
      mPresenter.setDocumentPartitioning(org.eclipse.jface.text.IDocument.DEFAULT_CONTENT_TYPE);
      mPresenter.install(getSourceViewer());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.