Search in sources :

Example 1 with HierarchyInformationPresenter

use of org.eclipse.xtext.xbase.ui.hierarchy.HierarchyInformationPresenter in project xtext-eclipse by eclipse.

the class JvmImplementationOpener method openQuickHierarchy.

protected void openQuickHierarchy(ITextViewer textViewer, IJavaElement element, IRegion region) {
    HierarchyInformationPresenter presenter = new HierarchyInformationPresenter((ISourceViewer) textViewer, element, region);
    presenter.setDocumentPartitioning(IDocumentExtension3.DEFAULT_PARTITIONING);
    presenter.setAnchor(AbstractInformationControlManager.ANCHOR_GLOBAL);
    IInformationProvider provider = new JavaElementProvider(null, false);
    presenter.setInformationProvider(provider, IDocument.DEFAULT_CONTENT_TYPE);
    presenter.setInformationProvider(provider, IJavaPartitions.JAVA_DOC);
    presenter.setInformationProvider(provider, IJavaPartitions.JAVA_MULTI_LINE_COMMENT);
    presenter.setInformationProvider(provider, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT);
    presenter.setInformationProvider(provider, IJavaPartitions.JAVA_STRING);
    presenter.setInformationProvider(provider, IJavaPartitions.JAVA_CHARACTER);
    presenter.setSizeConstraints(50, 20, true, false);
    presenter.install(textViewer);
    presenter.showInformation();
}
Also used : JavaElementProvider(org.eclipse.jdt.internal.ui.text.JavaElementProvider) HierarchyInformationPresenter(org.eclipse.xtext.xbase.ui.hierarchy.HierarchyInformationPresenter) IInformationProvider(org.eclipse.jface.text.information.IInformationProvider)

Aggregations

JavaElementProvider (org.eclipse.jdt.internal.ui.text.JavaElementProvider)1 IInformationProvider (org.eclipse.jface.text.information.IInformationProvider)1 HierarchyInformationPresenter (org.eclipse.xtext.xbase.ui.hierarchy.HierarchyInformationPresenter)1