public abstract class TreeView
extends org.eclipse.ui.part.ViewPart
implements org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.ui.part.ISetSelectionTarget
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_ADDITIONS
ID for the separator in the context menu of the
TreeView to add global contributions to (placed on top). |
Constructor and Description |
---|
TreeView(String id)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) |
protected org.eclipse.jface.viewers.ILabelDecorator |
createLabelDecorator()
Creates a label decorator.
|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent) |
protected abstract org.eclipse.jface.viewers.TreeViewer |
createViewer(org.eclipse.swt.widgets.Composite parent)
Creates the
TreeViewer . |
protected void |
doubleClicked(org.eclipse.jface.viewers.DoubleClickEvent event)
Called if a double click is triggered in the TreeViewer.
|
protected void |
fillContextMenu(org.eclipse.jface.action.IMenuManager manager)
Fills the contect menu of the view.
|
protected void |
fillLocalPullDown(org.eclipse.jface.action.IMenuManager manager)
Fills the menue of the view.
|
protected void |
fillLocalToolBar(org.eclipse.jface.action.IToolBarManager manager)
Fills the toolbar of the view.
|
String |
getID()
Retrieves the ID of this
TreeView . |
org.eclipse.jface.action.Action |
getRefreshAction()
Return the refresh action, which triggers a reload on the TreeViewer.
|
org.eclipse.jface.viewers.IStructuredSelection |
getSelection() |
org.eclipse.jface.viewers.TreeViewer |
getViewer()
Returns JFace
TreeViewer used in this TreeViewer . |
void |
init(org.eclipse.ui.IViewSite site) |
void |
removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener) |
void |
selectReveal(org.eclipse.jface.viewers.ISelection selection) |
void |
setFocus() |
void |
setSelection(org.eclipse.jface.viewers.ISelection selection) |
protected void |
showMessage(String message)
Shows a message to the user.
|
checkSite, getViewSite, init, saveState, setContentDescription, setInitializationData, setPartName
addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final String GLOBAL_ADDITIONS
TreeView
to add global contributions to (placed on top).public final org.eclipse.jface.viewers.TreeViewer getViewer()
TreeViewer
used in this TreeViewer
.TreeViewer
public final org.eclipse.jface.action.Action getRefreshAction()
Action
public void init(org.eclipse.ui.IViewSite site) throws org.eclipse.ui.PartInitException
init
in interface org.eclipse.ui.IViewPart
init
in class org.eclipse.ui.part.ViewPart
org.eclipse.ui.PartInitException
public final void createPartControl(org.eclipse.swt.widgets.Composite parent)
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
createPartControl
in class org.eclipse.ui.part.WorkbenchPart
public void setFocus()
setFocus
in interface org.eclipse.ui.IWorkbenchPart
setFocus
in class org.eclipse.ui.part.WorkbenchPart
public org.eclipse.jface.viewers.IStructuredSelection getSelection()
getSelection
in interface org.eclipse.jface.viewers.ISelectionProvider
public void setSelection(org.eclipse.jface.viewers.ISelection selection)
setSelection
in interface org.eclipse.jface.viewers.ISelectionProvider
public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
addSelectionChangedListener
in interface org.eclipse.jface.viewers.ISelectionProvider
public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
removeSelectionChangedListener
in interface org.eclipse.jface.viewers.ISelectionProvider
public void selectReveal(org.eclipse.jface.viewers.ISelection selection)
selectReveal
in interface org.eclipse.ui.part.ISetSelectionTarget
protected void showMessage(String message)
message
- the message as a Stringprotected org.eclipse.jface.viewers.ILabelDecorator createLabelDecorator()
protected abstract org.eclipse.jface.viewers.TreeViewer createViewer(org.eclipse.swt.widgets.Composite parent)
TreeViewer
. To be implemented by sub classes.parent
- the parent composite to place the TreeViewer on.TreeViewer
protected void fillLocalPullDown(org.eclipse.jface.action.IMenuManager manager)
manager
- the IMenuManager
to be filled.protected void fillLocalToolBar(org.eclipse.jface.action.IToolBarManager manager)
manager
- the IToolBarManager
to be filled.protected void fillContextMenu(org.eclipse.jface.action.IMenuManager manager)
manager
- the IMenuManager
to be filled.protected void doubleClicked(org.eclipse.jface.viewers.DoubleClickEvent event)
event
- the DoubleClickEvent
Copyright © 2017. All rights reserved.