Package org.eclipse.jface.text.information

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


   *            the source viewer to be configured by this configuration
   * @return a content assistant
   * @see #getInformationProvider(ISourceViewer, String)
   */
  final public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
    InformationPresenter presenter = new InformationPresenter(getInformationPresenterControlCreator(sourceViewer));

    // information presenter configurations
    presenter.setSizeConstraints(60, 10, true, true);
    presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

    // add information providers for each partition type
    String[] types = getConfiguredContentTypes(sourceViewer);
    for (int i = 0; i < types.length; i++) {
      String type = types[i];

      IInformationProvider provider = getInformationProvider(sourceViewer, type);
      if (provider != null) {
        presenter.setInformationProvider(provider, type);
      }
    }

    return presenter;
  }
View Full Code Here


   *            the source viewer to be configured by this configuration
   * @return a content assistant
   * @see #getInformationProvider(ISourceViewer, String)
   */
  final public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) {
    InformationPresenter presenter = new InformationPresenter(getInformationPresenterControlCreator(sourceViewer));

    // information presenter configurations
    presenter.setSizeConstraints(60, 10, true, true);
    presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

    // add information providers for each partition type
    String[] types = getConfiguredContentTypes(sourceViewer);
    for (int i = 0; i < types.length; i++) {
      String type = types[i];

      IInformationProvider provider = getInformationProvider(sourceViewer, type);
      if (provider != null) {
        presenter.setInformationProvider(provider, type);
      }
    }

    return presenter;
  }
View Full Code Here

        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());
    addReconcilingListeners(getSourceViewerConfiguration(), getTextViewer());
    fPartListener = new PartListener(this);
    getSite().getWorkbenchWindow().getPartService().addPartListener(fPartListener);
View Full Code Here

      fSemanticManager = null;
    }
  }

  private IInformationPresenter configureOutlinePresenter(ISourceViewer sourceViewer, SourceViewerConfiguration config) {
    InformationPresenter presenter = null;

    // Get the quick outline configuration
    AbstractQuickOutlineConfiguration cfg = null;
    ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
    String[] ids = getConfigurationPoints();
    for (int i = 0; cfg == null && i < ids.length; i++) {
      cfg = (AbstractQuickOutlineConfiguration) builder.getConfiguration(ExtendedConfigurationBuilder.QUICKOUTLINECONFIGURATION, ids[i]);
    }

    if (cfg != null) {
      presenter = new InformationPresenter(getOutlinePresenterControlCreator(cfg));
      presenter.setDocumentPartitioning(config.getConfiguredDocumentPartitioning(sourceViewer));
      presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
      IInformationProvider provider = new SourceInfoProvider(this);
      String[] contentTypes = config.getConfiguredContentTypes(sourceViewer);
      for (int i = 0; i < contentTypes.length; i++) {
        presenter.setInformationProvider(provider, contentTypes[i]);
      }
      presenter.setSizeConstraints(50, 20, true, false);
    }
    return presenter;
  }
View Full Code Here

        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());
    addReconcilingListeners(getSourceViewerConfiguration(), getTextViewer());
    fPartListener = new PartListener(this);
    getSite().getWorkbenchWindow().getPartService().addPartListener(fPartListener);
View Full Code Here

      fSemanticManager = null;
    }
  }

  private IInformationPresenter configureOutlinePresenter(ISourceViewer sourceViewer, SourceViewerConfiguration config) {
    InformationPresenter presenter = null;

    // Get the quick outline configuration
    AbstractQuickOutlineConfiguration cfg = null;
    ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();
    String[] ids = getConfigurationPoints();
    for (int i = 0; cfg == null && i < ids.length; i++) {
      cfg = (AbstractQuickOutlineConfiguration) builder.getConfiguration(ExtendedConfigurationBuilder.QUICKOUTLINECONFIGURATION, ids[i]);
    }

    if (cfg != null) {
      presenter = new InformationPresenter(getOutlinePresenterControlCreator(cfg));
      presenter.setDocumentPartitioning(config.getConfiguredDocumentPartitioning(sourceViewer));
      presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
      IInformationProvider provider = new SourceInfoProvider(this);
      String[] contentTypes = config.getConfiguredContentTypes(sourceViewer);
      for (int i = 0; i < contentTypes.length; i++) {
        presenter.setInformationProvider(provider, contentTypes[i]);
      }
      presenter.setSizeConstraints(50, 20, true, false);
    }
    return presenter;
  }
View Full Code Here

    /**
     * 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

   *
   * @param sourceViewer the source viewer to be configured by this configuration
   * @return an information presenter
   */
  public IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer) {
    InformationPresenter presenter;
    presenter = new InformationPresenter(new IInformationControlCreator() {
      public IInformationControl createInformationControl(Shell parent) {
        return new ATGOutlineInformationControl(parent, fEditor);
      }
    });
    presenter.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);

    IInformationProvider provider = new ATGModelInformationProvider();
    for (String contentType : getConfiguredContentTypes(sourceViewer)) {
      presenter.setInformationProvider(provider, contentType);
    }
    presenter.setSizeConstraints(50, 30, true, false);
    return presenter;
  }
View Full Code Here

    // 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

        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());

    addEditorReconcilingListener(getSourceViewerConfiguration(),
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.information.InformationPresenter$Closer

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.