Eclipse Platform
2.0

org.eclipse.ui.views.bookmarkexplorer
Class BookmarkNavigator

java.lang.Object
  |
  +--org.eclipse.ui.part.WorkbenchPart
        |
        +--org.eclipse.ui.part.ViewPart
              |
              +--org.eclipse.ui.views.bookmarkexplorer.BookmarkNavigator
All Implemented Interfaces:
IAdaptable, IExecutableExtension, IViewPart, IWorkbenchPart

public class BookmarkNavigator
extends ViewPart

Main class for the bookmark navigator for displaying bookmarks on resources and opening an editor on the bookmarked resource when the user commands.

This standard view has id "org.eclipse.ui.views.BookmarkNavigator".

The workbench will automatically instantiate this class when a bookmark navigator is needed for a workbench window. This class is not intended to be instantiated or subclassed by clients.


Field Summary
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
BookmarkNavigator()
          Creates the bookmarks view.
 
Method Summary
 void createPartControl(Composite parent)
          Creates the SWT controls for this workbench part.
 void init(IViewSite site, IMemento memento)
          Initializes this view with the given view site.
protected  void initDragAndDrop()
          Adds drag and drop support to the bookmark navigator.
 void saveState(IMemento memento)
          Saves the object state within a memento.
 void setFocus()
          Asks this part to take focus within the workbench.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, dispose, firePropertyChange, getAdapter, getConfigurationElement, getDefaultImage, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setInitializationData, setSite, setTitle, setTitleImage, setTitleToolTip
 
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, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

BookmarkNavigator

public BookmarkNavigator()
Creates the bookmarks view.

Method Detail

createPartControl

public void createPartControl(Composite parent)
Description copied from interface: IWorkbenchPart
Creates the SWT controls for this workbench part.

Clients should not call this method (the workbench calls this method when it needs to, which may be never).

For implementors this is a multi-step process:

  1. Create one or more controls within the parent.
  2. Set the parent layout as needed.
  3. Register any global actions with the IActionService.
  4. Register any popup menus with the IActionService.
  5. Register a selection provider with the ISelectionService (optional).

Specified by:
createPartControl in interface IWorkbenchPart
Specified by:
createPartControl in class WorkbenchPart
Parameters:
parent - the parent control

init

public void init(IViewSite site,
                 IMemento memento)
          throws PartInitException
Description copied from interface: IViewPart
Initializes this view with the given view site. A memento is passed to the view which contains a snapshot of the views state from a previous session. Where possible, the view should try to recreate that state within the part controls.

This method is automatically called by the workbench shortly after part construction. It marks the start of the views's lifecycle. Clients must not call this method.

Specified by:
init in interface IViewPart
Overrides:
init in class ViewPart
Parameters:
site - the view site
memento - the IViewPart state or null if there is no previous saved state
Throws:
PartInitException - if this view was not initialized successfully

initDragAndDrop

protected void initDragAndDrop()
Adds drag and drop support to the bookmark navigator.


saveState

public void saveState(IMemento memento)
Description copied from interface: IViewPart
Saves the object state within a memento.

Specified by:
saveState in interface IViewPart
Overrides:
saveState in class ViewPart
Parameters:
memento - a memento to receive the object state

setFocus

public void setFocus()
Description copied from interface: IWorkbenchPart
Asks this part to take focus within the workbench.

Clients should not call this method (the workbench calls this method at appropriate times).

Specified by:
setFocus in interface IWorkbenchPart
Specified by:
setFocus in class WorkbenchPart

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.