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

java.lang.Object
  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.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

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.


Nested Class Summary
(package private)  class FileView.NameFilter
          This filter identifies the files from the input source that should actually be displayed in the viewer.
(package private)  class FileView.SelectionInput
          Listener for part selection; the current selection can be used as the input if it is of the right type.
 
Field Summary
 
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.
(package private)  org.eclipse.swt.widgets.Combo getModChoice()
          Provides access to the Combo that will indicate the user's choice for which files should be highlighted as recent modifications.
(package private) static long[] getModSince()
          Provides access to the timeframe values that control which elements will be highlighted as recent modifications.
 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
getViewSite, init, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
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
 

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()

getModChoice

org.eclipse.swt.widgets.Combo getModChoice()
Provides access to the Combo that will indicate the user's choice for which files should be highlighted as recent modifications.

Returns:
the Combo that controls recent modification highlighting.

getModSince

static long[] getModSince()
Provides access to the timeframe values that control which elements will be highlighted as recent modifications.

Returns:
array of modification timeframe values.

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.

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)