org.eclipse.xtext.ui.editor.outline.impl
Class OutlinePage

java.lang.Object
  extended by org.eclipse.ui.part.Page
      extended by org.eclipse.ui.views.contentoutline.ContentOutlinePage
          extended by org.eclipse.xtext.ui.editor.outline.impl.OutlinePage
All Implemented Interfaces:
org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.ui.part.IPage, org.eclipse.ui.part.IPageBookViewPage, org.eclipse.ui.views.contentoutline.IContentOutlinePage, ISourceViewerAware
Direct Known Subclasses:
Xtend2OutlinePage, XtextOutlinePage

public class OutlinePage
extends org.eclipse.ui.views.contentoutline.ContentOutlinePage
implements ISourceViewerAware

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
OutlinePage()
           
 
Method Summary
protected  void addChildren(java.util.List<IOutlineNode> nodes, java.util.List<IOutlineNode> allChildren, int depth)
           
protected  void configureActions()
           
protected  void configureModelListener()
           
protected  void configureTextInputListener()
           
protected  void configureTree()
           
 void createControl(org.eclipse.swt.widgets.Composite parent)
          The ContentOutlinePage implementation of this IContentOutlinePage method creates a tree viewer.
 void dispose()
          The Page implementation of this IPage method disposes of this page's control (if it has one and it has not already been disposed).
protected  int getDefaultExpansionLevel()
           
protected  java.util.List<IOutlineNode> getInitiallyExpandedNodes()
           
protected  OutlineRefreshJob getRefreshJob()
           
 org.eclipse.jface.text.source.ISourceViewer getSourceViewer()
           
 IOutlineTreeProvider getTreeProvider()
           
 org.eclipse.jface.viewers.TreeViewer getTreeViewer()
          Returns this page's tree viewer.
 IXtextDocument getXtextDocument()
           
protected  void refreshViewer(IOutlineNode rootNode, java.util.Collection<IOutlineNode> nodesToBeExpanded, java.util.Collection<IOutlineNode> selectedNodes)
           
 void scheduleRefresh()
           
 void setSourceViewer(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
protected  void treeUpdated()
          For testing.
 
Methods inherited from class org.eclipse.ui.views.contentoutline.ContentOutlinePage
addSelectionChangedListener, fireSelectionChanged, getControl, getSelection, getTreeStyle, init, removeSelectionChangedListener, selectionChanged, setFocus, setSelection
 
Methods inherited from class org.eclipse.ui.part.Page
getSite, makeContributions, setActionBars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.part.IPage
setActionBars
 

Constructor Detail

OutlinePage

public OutlinePage()
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class: org.eclipse.ui.views.contentoutline.ContentOutlinePage
The ContentOutlinePage implementation of this IContentOutlinePage method creates a tree viewer. Subclasses must extend this method configure the tree viewer with a proper content provider, label provider, and input element.

Specified by:
createControl in interface org.eclipse.ui.part.IPage
Overrides:
createControl in class org.eclipse.ui.views.contentoutline.ContentOutlinePage
Parameters:
parent - the parent control

configureTree

protected void configureTree()

getInitiallyExpandedNodes

protected java.util.List<IOutlineNode> getInitiallyExpandedNodes()

getDefaultExpansionLevel

protected int getDefaultExpansionLevel()

addChildren

protected void addChildren(java.util.List<IOutlineNode> nodes,
                           java.util.List<IOutlineNode> allChildren,
                           int depth)

configureModelListener

protected void configureModelListener()

configureActions

protected void configureActions()

dispose

public void dispose()
Description copied from class: org.eclipse.ui.part.Page
The Page implementation of this IPage method disposes of this page's control (if it has one and it has not already been disposed). Subclasses may extend.

Specified by:
dispose in interface org.eclipse.ui.part.IPage
Overrides:
dispose in class org.eclipse.ui.part.Page

setSourceViewer

public void setSourceViewer(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Specified by:
setSourceViewer in interface ISourceViewerAware

configureTextInputListener

protected void configureTextInputListener()
Since:
2.0

getSourceViewer

public org.eclipse.jface.text.source.ISourceViewer getSourceViewer()

getXtextDocument

public IXtextDocument getXtextDocument()

getRefreshJob

protected OutlineRefreshJob getRefreshJob()

scheduleRefresh

public void scheduleRefresh()

getTreeViewer

public org.eclipse.jface.viewers.TreeViewer getTreeViewer()
Description copied from class: org.eclipse.ui.views.contentoutline.ContentOutlinePage
Returns this page's tree viewer.

Overrides:
getTreeViewer in class org.eclipse.ui.views.contentoutline.ContentOutlinePage
Returns:
this page's tree viewer, or null if createControl has not been called yet

getTreeProvider

public IOutlineTreeProvider getTreeProvider()

refreshViewer

protected void refreshViewer(IOutlineNode rootNode,
                             java.util.Collection<IOutlineNode> nodesToBeExpanded,
                             java.util.Collection<IOutlineNode> selectedNodes)

treeUpdated

protected void treeUpdated()
For testing.