|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.viewers.Viewer
org.eclipse.jface.viewers.ContentViewer
org.eclipse.jface.viewers.StructuredViewer
org.eclipse.jface.viewers.AbstractTreeViewer
org.eclipse.jface.viewers.TreeViewer
org.eclipse.rse.ui.view.scratchpad.SystemScratchpadView
This subclass of the standard JFace tabletree viewer is used to show a generic tabletree view of the selected object
| Nested Class Summary |
|---|
| Nested classes inherited from class org.eclipse.jface.viewers.StructuredViewer |
|---|
StructuredViewer.ColorAndFontCollector, StructuredViewer.ColorAndFontCollectorWithProviders |
| Field Summary | |
|---|---|
protected ClearAction |
_clearAllAction
|
protected ClearSelectedAction |
_clearSelectedAction
|
protected SystemCommonDeleteAction |
_deleteAction
|
protected SystemOpenExplorerPerspectiveAction |
_openToPerspectiveAction
|
protected PropertyDialogAction |
_propertyDialogAction
|
protected SystemRefreshAction |
_refreshAction
|
protected SystemRemotePropertiesAction |
_remotePropertyDialogAction
|
protected SystemCommonRenameAction |
_renameAction
|
protected SystemCommonSelectAllAction |
_selectAllAction
|
protected boolean |
_selectionEnableDeleteAction
|
protected boolean |
_selectionEnableRenameAction
|
protected boolean |
_selectionFlagsUpdated
|
protected boolean |
_selectionIsRemoteObject
|
protected boolean |
_selectionShowDeleteAction
|
protected boolean |
_selectionShowOpenViewActions
|
protected boolean |
_selectionShowRefreshAction
|
protected boolean |
_selectionShowRenameAction
|
protected SystemShowInTableAction |
_showInTableAction
|
protected boolean |
menuListenerAdded
|
| Fields inherited from class org.eclipse.jface.viewers.AbstractTreeViewer |
|---|
ALL_LEVELS |
| Fields inherited from class org.eclipse.jface.viewers.Viewer |
|---|
WIDGET_DATA_KEY |
| Constructor Summary | |
|---|---|
SystemScratchpadView(Tree tableTree,
ISystemMessageLine msgLine)
Constructor for the table view |
|
| Method Summary | |
|---|---|
boolean |
canDelete()
Required method from ISystemDeleteTarget Decides whether to enable the delete menu item. |
boolean |
canRename()
Required method from ISystemRenameTarget Decides whether to enable the rename menu item. |
void |
clearMessage()
Clear message/status shown on the message/status line |
void |
displayMessage(String msg)
Display a message/status on the message/status line |
void |
dispose()
|
boolean |
doDelete(IProgressMonitor monitor)
Actually do the delete of currently selected items. |
boolean |
doRename(String[] newNames)
Required method from ISystemRenameTarget |
void |
doSelectAll(IStructuredSelection selection)
When this action is run via Edit->Select All or via Ctrl+A, perform the select all action. |
boolean |
enableSelectAll(IStructuredSelection selection)
Return true if select all should be enabled for the given object. |
void |
fillContextMenu(IMenuManager menu)
|
protected ISystemViewElementAdapter |
getAdapter(Object obj)
Convenience method for retrieving the view adapter for an object |
protected IAction |
getClearAllAction()
|
protected IAction |
getClearSelectedAction()
|
Menu |
getContextMenu()
Return the popup menu for the table |
MenuManager |
getContextMenuManager()
Return the popup menu for the table |
protected IAction |
getDeleteAction()
Rather than pre-defined this common action we wait until it is first needed, for performance reasons. |
Object |
getInput()
|
Layout |
getLayout()
|
protected SystemOpenExplorerPerspectiveAction |
getOpenToPerspectiveAction()
Get the common "Open to->" action for opening a new Remote System Explorer view, scoped to the currently selected object. |
protected Object |
getParentForContent(Object element)
|
protected PropertyDialogAction |
getPropertyDialogAction()
Rather than pre-defining this common action we wait until it is first needed, for performance reasons. |
protected IAction |
getRefreshAction()
Return the refresh action |
protected ISystemRemoteElementAdapter |
getRemoteAdapter(Object o)
Returns the implementation of ISystemRemoteElement for the given object. |
protected SystemRemotePropertiesAction |
getRemotePropertyDialogAction()
Rather than pre-defining this common action we wait until it is first needed, for performance reasons. |
protected IAction |
getRenameAction()
Rather than pre-defined this common action we wait until it is first needed, for performance reasons. |
protected IAction |
getSelectAllAction()
Return the select All action |
ISelection |
getSelection()
|
Shell |
getShell()
This is the method in your class that will be called to return the shell for your viewer |
protected SystemShowInTableAction |
getShowInTableAction()
|
protected void |
initDragAndDrop()
|
void |
inputChanged(Object newObject,
Object oldObject)
Called whenever the input for the view changes |
void |
menuAboutToShow(IMenuManager manager)
|
void |
removeAsListener()
Remove as listener. |
boolean |
sameParent()
This is called to ensure all elements in a multiple-selection have the same parent in the tree viewer. |
protected void |
scanSelections()
-------------------------------------------------------------------------------- For many actions we have to walk the selection list and examine each selected object to decide if a given common action is supported or not. |
void |
selectionChanged(SelectionChangedEvent event)
|
void |
setWorkbenchPart(IWorkbenchPart part)
|
boolean |
showDelete()
Required method from ISystemDeleteTarget. |
protected boolean |
showRefresh()
Decides whether to even show the refresh menu item. |
boolean |
showRename()
Required method from ISystemRenameTarget. |
void |
systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
This is the method in your class that will be called when a remote resource changes. |
void |
systemResourceChanged(ISystemResourceChangeEvent event)
Used to asynchronously update the view whenever properties change. |
| Methods inherited from class org.eclipse.jface.viewers.TreeViewer |
|---|
addTreeListener, assertContentProviderType, buildLabel, cancelEditing, createChildren, doUpdateItem, editElement, getCellEditors, getCellModifier, getChild, getChildren, getColumnProperties, getControl, getExpanded, getItem, getItemCount, getItemCount, getItems, getLabelProvider, getParentElement, getParentItem, getRawChildren, getSelection, getTree, hookControl, internalAdd, internalRefreshStruct, isCellEditorActive, isExpandable, isSameSelection, mapElement, newItem, removeAll, replace, setCellEditors, setCellModifier, setChildCount, setColumnProperties, setExpanded, setLabelProvider, setSelection, showItem |
| Methods inherited from class org.eclipse.jface.viewers.ContentViewer |
|---|
getContentProvider, handleDispose |
| Methods inherited from class org.eclipse.jface.viewers.Viewer |
|---|
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, setData, setSelection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider |
|---|
addSelectionChangedListener, removeSelectionChangedListener, setSelection |
| Field Detail |
protected SystemRefreshAction _refreshAction
protected PropertyDialogAction _propertyDialogAction
protected SystemRemotePropertiesAction _remotePropertyDialogAction
protected SystemOpenExplorerPerspectiveAction _openToPerspectiveAction
protected SystemShowInTableAction _showInTableAction
protected SystemCommonDeleteAction _deleteAction
protected SystemCommonRenameAction _renameAction
protected SystemCommonSelectAllAction _selectAllAction
protected ClearSelectedAction _clearSelectedAction
protected ClearAction _clearAllAction
protected boolean _selectionShowRefreshAction
protected boolean _selectionShowOpenViewActions
protected boolean _selectionShowDeleteAction
protected boolean _selectionShowRenameAction
protected boolean _selectionEnableDeleteAction
protected boolean _selectionEnableRenameAction
protected boolean _selectionIsRemoteObject
protected boolean _selectionFlagsUpdated
protected boolean menuListenerAdded
| Constructor Detail |
public SystemScratchpadView(Tree tableTree,
ISystemMessageLine msgLine)
| Method Detail |
public Layout getLayout()
public void setWorkbenchPart(IWorkbenchPart part)
public Menu getContextMenu()
public MenuManager getContextMenuManager()
public void inputChanged(Object newObject,
Object oldObject)
public Object getInput()
getInput in interface IInputProviderprotected ISystemViewElementAdapter getAdapter(Object obj)
protected void initDragAndDrop()
public void systemResourceChanged(ISystemResourceChangeEvent event)
systemResourceChanged in interface ISystemResourceChangeListenerISystemResourceChangeEventpublic void systemRemoteResourceChanged(ISystemRemoteChangeEvent event)
systemRemoteResourceChanged in interface ISystemRemoteChangeListenerISystemRemoteChangeEventpublic void displayMessage(String msg)
public void clearMessage()
public void selectionChanged(SelectionChangedEvent event)
selectionChanged in interface ISelectionChangedListenerpublic void dispose()
public void removeAsListener()
protected PropertyDialogAction getPropertyDialogAction()
protected SystemRemotePropertiesAction getRemotePropertyDialogAction()
protected IAction getSelectAllAction()
protected IAction getRenameAction()
protected IAction getDeleteAction()
protected IAction getClearSelectedAction()
protected IAction getClearAllAction()
protected IAction getRefreshAction()
protected SystemOpenExplorerPerspectiveAction getOpenToPerspectiveAction()
protected SystemShowInTableAction getShowInTableAction()
public Shell getShell()
ISystemResourceChangeListener
getShell in interface ISystemResourceChangeListenerpublic boolean showDelete()
showDelete in interface ISystemDeleteTargetpublic boolean canDelete()
canDelete in interface ISystemDeleteTargetpublic boolean doDelete(IProgressMonitor monitor)
ISystemDeleteTarget
doDelete in interface ISystemDeleteTargetpublic boolean showRename()
showRename in interface ISystemRenameTargetpublic boolean canRename()
canRename in interface ISystemRenameTargetprotected Object getParentForContent(Object element)
public boolean doRename(String[] newNames)
doRename in interface ISystemRenameTargetprotected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
public boolean enableSelectAll(IStructuredSelection selection)
enableSelectAll in interface ISystemSelectAllTargetpublic void doSelectAll(IStructuredSelection selection)
doSelectAll in interface ISystemSelectAllTargetpublic void menuAboutToShow(IMenuManager manager)
menuAboutToShow in interface IMenuListenerpublic ISelection getSelection()
getSelection in interface ISelectionProviderpublic void fillContextMenu(IMenuManager menu)
protected boolean showRefresh()
public boolean sameParent()
Designed to be as fast as possible by going directly to the SWT widgets
protected void scanSelections()
Walking this list multiple times while building the popup menu is a performance hit, so we have this common method that does it only once, setting instance variables for all of the decisions we are in interested in. --------------------------------------------------------------------------------
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||