org.eclipse.wst.sse.ui.views.contentoutline
Class ContentOutlineConfiguration

java.lang.Object
  extended by org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
Direct Known Subclasses:
CSSContentOutlineConfiguration, DTDContentOutlineConfiguration, XMLContentOutlineConfiguration

public abstract class ContentOutlineConfiguration
extends java.lang.Object

Basic Configuration class for Outline Pages

Since:
1.0

Constructor Summary
ContentOutlineConfiguration()
          Create new instance of ContentOutlineConfiguration
 
Method Summary
abstract  org.eclipse.jface.viewers.IContentProvider getContentProvider(org.eclipse.jface.viewers.TreeViewer viewer)
          Returns the ContentProvider to use with the given viewer.
 org.eclipse.swt.events.KeyListener[] getKeyListeners(org.eclipse.jface.viewers.TreeViewer viewer)
          Returns an array of KeyListeners to attach to the given viewer's control or null.
 org.eclipse.jface.viewers.ILabelProvider getLabelProvider(org.eclipse.jface.viewers.TreeViewer viewer)
          Returns the LabelProvider for the items within the given viewer.
 org.eclipse.jface.action.IContributionItem[] getMenuContributions(org.eclipse.jface.viewers.TreeViewer viewer)
          Returns the menu contribution items for the local menu in the outline.
 org.eclipse.jface.action.IMenuListener getMenuListener(org.eclipse.jface.viewers.TreeViewer viewer)
          Returns the menu listener to notify when the given viewer's context menu is about to be shown or null.
 org.eclipse.jface.viewers.ISelection getSelection(org.eclipse.jface.viewers.TreeViewer viewer, org.eclipse.jface.viewers.ISelection selection)
          Returns the (filtered) selection from the given selection.
 org.eclipse.jface.viewers.ILabelProvider getStatusLineLabelProvider(org.eclipse.jface.viewers.TreeViewer treeViewer)
           
 org.eclipse.jface.action.IContributionItem[] getToolbarContributions(org.eclipse.jface.viewers.TreeViewer viewer)
          Returns contribution items for the local toolbar in the outline.
 org.eclipse.jface.util.TransferDragSourceListener[] getTransferDragSourceListeners(org.eclipse.jface.viewers.TreeViewer treeViewer)
          Adopted since you can't easily removeDragSupport from StructuredViewers.
 org.eclipse.jface.util.TransferDropTargetListener[] getTransferDropTargetListeners(org.eclipse.jface.viewers.TreeViewer treeViewer)
          Adopted since you can't easily removeDropSupport from StructuredViewers.
 boolean isLinkedWithEditor(org.eclipse.jface.viewers.TreeViewer treeViewer)
          Returns true if node selection changes affect selection in the TreeViewer.
 void unconfigure(org.eclipse.jface.viewers.TreeViewer viewer)
          General hook for resource releasing and listener removal when configurations change or the viewer is disposed of.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentOutlineConfiguration

public ContentOutlineConfiguration()
Create new instance of ContentOutlineConfiguration

Method Detail

getContentProvider

public abstract org.eclipse.jface.viewers.IContentProvider getContentProvider(org.eclipse.jface.viewers.TreeViewer viewer)
Returns the ContentProvider to use with the given viewer.

Parameters:
viewer - the TreeViewer associated with this configuration
Returns:
the IContentProvider to use with this viewer

getKeyListeners

public org.eclipse.swt.events.KeyListener[] getKeyListeners(org.eclipse.jface.viewers.TreeViewer viewer)
Returns an array of KeyListeners to attach to the given viewer's control or null.

Parameters:
viewer - the TreeViewer associated with this configuration
Returns:
an array of KeyListeners to attach to the TreeViewer's Control, or null. The listeners should adhere to the KeyEvent.doit field to ensure proper behaviors. Ordering of the event notifications is dependent on the Control in the TreeViewer.

getLabelProvider

public org.eclipse.jface.viewers.ILabelProvider getLabelProvider(org.eclipse.jface.viewers.TreeViewer viewer)
Returns the LabelProvider for the items within the given viewer.

Parameters:
viewer - the TreeViewer associated with this configuration
Returns:
the ILabelProvider for items within the viewer

getMenuContributions

public final org.eclipse.jface.action.IContributionItem[] getMenuContributions(org.eclipse.jface.viewers.TreeViewer viewer)
Returns the menu contribution items for the local menu in the outline.

Parameters:
viewer - the TreeViewer associated with this configuration
Returns:
IContributionItem[] for the local menu

getMenuListener

public org.eclipse.jface.action.IMenuListener getMenuListener(org.eclipse.jface.viewers.TreeViewer viewer)
Returns the menu listener to notify when the given viewer's context menu is about to be shown or null.

Parameters:
viewer - the TreeViewer associated with this configuration
Returns:
the IMenuListener to notify when the viewer's context menu is about to be shown, or null

getSelection

public org.eclipse.jface.viewers.ISelection getSelection(org.eclipse.jface.viewers.TreeViewer viewer,
                                                         org.eclipse.jface.viewers.ISelection selection)
Returns the (filtered) selection from the given selection.

Parameters:
selection - model selection
viewer - the TreeViewer associated with this configuration
Returns:
The (filtered) selection from this event. Uses include mapping model selection onto elements provided by the content provider. Should only return elements that will be shown in the Tree Control.

getStatusLineLabelProvider

public org.eclipse.jface.viewers.ILabelProvider getStatusLineLabelProvider(org.eclipse.jface.viewers.TreeViewer treeViewer)
Parameters:
treeViewer -
Returns:
a label provider providing the status line contents
Since:
2.0

getToolbarContributions

public final org.eclipse.jface.action.IContributionItem[] getToolbarContributions(org.eclipse.jface.viewers.TreeViewer viewer)
Returns contribution items for the local toolbar in the outline.

Parameters:
viewer - the TreeViewer associated with this configuration
Returns:
IContributionItem[] for the local toolbar

getTransferDragSourceListeners

public org.eclipse.jface.util.TransferDragSourceListener[] getTransferDragSourceListeners(org.eclipse.jface.viewers.TreeViewer treeViewer)
Adopted since you can't easily removeDragSupport from StructuredViewers.

Parameters:
treeViewer - the TreeViewer associated with this configuration
Returns:
an array of TransferDragSourceListeners

getTransferDropTargetListeners

public org.eclipse.jface.util.TransferDropTargetListener[] getTransferDropTargetListeners(org.eclipse.jface.viewers.TreeViewer treeViewer)
Adopted since you can't easily removeDropSupport from StructuredViewers.

Parameters:
treeViewer - the TreeViewer associated with this configuration
Returns:
an array of TransferDropTargetListeners

isLinkedWithEditor

public boolean isLinkedWithEditor(org.eclipse.jface.viewers.TreeViewer treeViewer)
Returns true if node selection changes affect selection in the TreeViewer.

Parameters:
treeViewer - the TreeViewer associated with this configuration
Returns:
true if outline is currently linked to selection in editor, false otherwise

unconfigure

public void unconfigure(org.eclipse.jface.viewers.TreeViewer viewer)
General hook for resource releasing and listener removal when configurations change or the viewer is disposed of. This implementation stops of any remaining PropertyChangeUpdateActionContributionItem from preference listening.

Parameters:
viewer - the TreeViewer associated with this configuration