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

java.lang.Object
  extended byorg.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  IContentProvider getContentProvider(TreeViewer viewer)
          Returns the ContentProvider to use with the given viewer.
 KeyListener[] getKeyListeners(TreeViewer viewer)
          Returns an array of KeyListeners to attach to the given viewer's control or null.
 ILabelProvider getLabelProvider(TreeViewer viewer)
          Returns the LabelProvider for the items within the given viewer.
 IContributionItem[] getMenuContributions(TreeViewer viewer)
          Returns the menu contribution items for the local menu in the outline.
 IMenuListener getMenuListener(TreeViewer viewer)
          Returns the menu listener to notify when the given viewer's context menu is about to be shown or null.
 ISelection getSelection(TreeViewer viewer, ISelection selection)
          Returns the (filtered) selection from the given selection.
 IContributionItem[] getToolbarContributions(TreeViewer viewer)
          Returns contribution items for the local toolbar in the outline.
 TransferDragSourceListener[] getTransferDragSourceListeners(TreeViewer treeViewer)
          Adopted since you can't easily removeDragSupport from StructuredViewers.
 TransferDropTargetListener[] getTransferDropTargetListeners(TreeViewer treeViewer)
          Adopted since you can't easily removeDropSupport from StructuredViewers.
 boolean isLinkedWithEditor(TreeViewer treeViewer)
          Returns true if node selection changes affect selection in the TreeViewer.
 void unconfigure(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 IContentProvider getContentProvider(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 KeyListener[] getKeyListeners(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 ILabelProvider getLabelProvider(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 IContributionItem[] getMenuContributions(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 IMenuListener getMenuListener(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 ISelection getSelection(TreeViewer viewer,
                               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.

getToolbarContributions

public final IContributionItem[] getToolbarContributions(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 TransferDragSourceListener[] getTransferDragSourceListeners(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 TransferDropTargetListener[] getTransferDropTargetListeners(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(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(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