public interface IInputInterpreter
IContentViewerInput
(i.e. content viewers show different
modes - Tree, Property, List etc). A particular content viewer is used to
display a specific view mode. The interpreter also provides the input to the
specific content viewer.
Clients need not implement this interface. Clients must extend the
AbstractInputInterpreter
AbstractInputInterpreter
Modifier and Type | Method and Description |
---|---|
boolean |
canBrowseContext(ViewModeDescriptor sourceViewMode,
ViewModeDescriptor targetViewMode,
org.eclipse.jface.viewers.ISelection selection)
Allows the interpreter to decide if in browse mode the selections from
the specified source view mode can be set as as the input to the
specified target view mode.
|
boolean |
canSupportInput(IContentViewerInput input)
Checks if the specified input can be handled by the interpreter.
|
java.util.List |
getBrowseViewModes(IContentViewerInput input)
Returns the list of browse view modes for the specified input.
|
java.util.List |
getCurrentViewModes(IContentViewerInput input)
Returns the list of current view modes for the specified input.
|
IContentDescriptor |
revealContent(IContentViewerInput input,
IViewerData viewerData)
Reveals the content associated with the current input within the context
of the specified content viewer.
|
boolean |
setBrowseContext(org.eclipse.jface.viewers.ISelection selection,
IViewerData viewerData)
Sets the browse context associated with the current selection within the
specified content viewer.
|
boolean |
setContext(IContentViewerInput input,
IViewerData viewerData,
boolean force)
Sets the context associated with the current input within the specified
content viewer.
|
boolean |
setInitialBrowseContext(IContentViewerInput input,
IViewerData viewerData)
Sets the default browse context associated with the current input within
the specified content viewer.
|
boolean canSupportInput(IContentViewerInput input)
input
- the input associatedtrue
if input can be handled, false
otherwisejava.util.List getCurrentViewModes(IContentViewerInput input)
input
- the input associatedViewModeDescriptor
java.util.List getBrowseViewModes(IContentViewerInput input)
input
- the input associatedViewModeDescriptor
IContentDescriptor revealContent(IContentViewerInput input, IViewerData viewerData)
input
- the input associated, which represents the current selection
in the StructureViewerviewerData
- the associated viewer databoolean setContext(IContentViewerInput input, IViewerData viewerData, boolean force)
input
- the input associated, which represents the current selection
in the StructureViewerviewerData
- the associated viewer dataforce
- a flag to indicate if the input needs to set irrespective of
its previous inputboolean setInitialBrowseContext(IContentViewerInput input, IViewerData viewerData)
input
- the input associated, which represents the current selection
in the StructureViewerviewerData
- the associated viewer databoolean canBrowseContext(ViewModeDescriptor sourceViewMode, ViewModeDescriptor targetViewMode, org.eclipse.jface.viewers.ISelection selection)
sourceViewMode
- the source view mode from where the input is usedtargetViewMode
- the target view mode where the input from the source is setselection
- the source selectionboolean setBrowseContext(org.eclipse.jface.viewers.ISelection selection, IViewerData viewerData)
selection
- the selection from the source viewerviewerData
- the target viewer data