com.ibm.jdg2e.view.files.ui
Class FileView

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.ui.part.WorkbenchPart
          extended byorg.eclipse.ui.part.ViewPart
              extended bycom.ibm.jdg2e.view.files.ui.FileView
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.jface.viewers.ISelectionChangedListener, org.eclipse.ui.part.IShowInSource, org.eclipse.ui.part.IShowInTarget, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation

public class FileView
extends org.eclipse.ui.part.ViewPart
implements org.eclipse.ui.part.IShowInTarget, org.eclipse.ui.part.IShowInSource, org.eclipse.jface.viewers.ISelectionChangedListener

Implementation of file utility view. This view helps you find files, displaying the filtered and sorted contents of a selected IContainer in a flat table of all IFile resources.


Field Summary
protected  org.eclipse.jface.viewers.ViewerSorter lastSorter
           
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
FileView()
          The constructor.
 
Method Summary
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
          Create view user interface; a set of controls to direct view content and display rules and a multi-column table viewer are used in the user interface.
 void dispose()
          Remove listener and release references.
 org.eclipse.ui.part.ShowInContext getShowInContext()
          Support the show in context process for Eclipse by creating a context to be used when sending the request.
 org.eclipse.jface.viewers.StructuredViewer getViewer()
          Provides access to the viewer used in the view.
 void init(org.eclipse.ui.IViewSite site, org.eclipse.ui.IMemento memento)
          Return view to previous display settings by setting the column widths to those that were in use when the part was shutdown with the workbench.
 void saveState(org.eclipse.ui.IMemento memento)
          Saves column width information so that the columns are as they were when the view is shown again after a platform restart.
 void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
          Customize user interface based on current selection.
 void setCustomPartName(java.lang.String partName)
          Used to provide access to ViewPart.setPartName() method so that multiple views can be distinguished.
 void setFocus()
          Passing the focus request to the viewer's control.
 boolean show(org.eclipse.ui.part.ShowInContext context)
          Show the context requested when this view is the target of a show in part request.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

lastSorter

protected org.eclipse.jface.viewers.ViewerSorter lastSorter
Constructor Detail

FileView

public FileView()
The constructor.

Method Detail

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Create view user interface; a set of controls to direct view content and display rules and a multi-column table viewer are used in the user interface.

Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
See Also:
IWorkbenchPart.createPartControl(org.eclipse.swt.widgets.Composite)

dispose

public void dispose()
Remove listener and release references.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
See Also:
IWorkbenchPart.dispose()

getShowInContext

public org.eclipse.ui.part.ShowInContext getShowInContext()
Support the show in context process for Eclipse by creating a context to be used when sending the request.

Specified by:
getShowInContext in interface org.eclipse.ui.part.IShowInSource
See Also:
IShowInSource.getShowInContext()

getViewer

public org.eclipse.jface.viewers.StructuredViewer getViewer()
Provides access to the viewer used in the view.

Returns:
viewer used in this view.

init

public void init(org.eclipse.ui.IViewSite site,
                 org.eclipse.ui.IMemento memento)
          throws org.eclipse.ui.PartInitException
Return view to previous display settings by setting the column widths to those that were in use when the part was shutdown with the workbench.

Specified by:
init in interface org.eclipse.ui.IViewPart
Throws:
org.eclipse.ui.PartInitException
See Also:
ViewPart.init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)

saveState

public void saveState(org.eclipse.ui.IMemento memento)
Saves column width information so that the columns are as they were when the view is shown again after a platform restart. Last used file filter value is saved as well.

Specified by:
saveState in interface org.eclipse.ui.IViewPart
See Also:
ViewPart.saveState(org.eclipse.ui.IMemento)

selectionChanged

public void selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
Customize user interface based on current selection.

Specified by:
selectionChanged in interface org.eclipse.jface.viewers.ISelectionChangedListener
See Also:
ISelectionChangedListener.selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)

setCustomPartName

public void setCustomPartName(java.lang.String partName)
Used to provide access to ViewPart.setPartName() method so that multiple views can be distinguished.

Parameters:
partName -

setFocus

public void setFocus()
Passing the focus request to the viewer's control.

Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart

show

public boolean show(org.eclipse.ui.part.ShowInContext context)
Show the context requested when this view is the target of a show in part request.

Specified by:
show in interface org.eclipse.ui.part.IShowInTarget
See Also:
IShowInTarget.show(org.eclipse.ui.part.ShowInContext)