TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.trace.ui
Class TraceViewer

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by org.eclipse.hyades.trace.ui.TraceViewer
All Implemented Interfaces:
java.util.EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, IDeleteListener, IProfileEventListener, IExportViewer, org.eclipse.jface.action.IMenuListener, org.eclipse.ui.IPersistable, org.eclipse.ui.ISelectionListener, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation
Direct Known Subclasses:
FilterTraceViewer

public abstract class TraceViewer
extends org.eclipse.ui.part.ViewPart
implements org.eclipse.jface.action.IMenuListener, org.eclipse.ui.ISelectionListener, IProfileEventListener, IDeleteListener, IExportViewer

This class defines an abstract base class for viewers shown in the trace model. This is for the profile monitor navigator, log view naviator. Part of TraveViewer in trace.ui: doesn't include: menuAboutToShow, enableEditActions


Field Summary
 java.lang.String GROUP_ADD_VIEWS
           
 java.lang.String GROUP_ADDITIONS
           
 java.lang.String GROUP_GENERIC
           
static java.lang.String VIEW_ID
           
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
TraceViewer()
          Constructor
 
Method Summary
 void addViewPage(org.eclipse.emf.ecore.EObject object)
          Add a page to the workbook.
 void addViewPage(org.eclipse.emf.ecore.EObject object, boolean newPage)
          Add a page to the workbook.
 boolean contextHandlerSelectionChanged()
           
abstract  TraceViewerPage createPage(org.eclipse.emf.ecore.EObject mofObject)
          Creates the TraceViewerPage instance associated with this trace viewer.
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
 void createReportAction()
           
 void deregister(java.lang.Object obj)
          Invoked when a top hierarchy object is deleted from the model.
 void dispose()
           
 org.eclipse.ui.part.IPage getCurrentPage()
          Returns the current page in the view
 org.eclipse.ui.part.IPage getDefaultPage()
           
 java.lang.String getDefaultPageMessage()
          Returns the default page message.
 org.eclipse.jface.viewers.Viewer[] getExportViewer()
           
 java.lang.Object getModelObject()
           
static org.eclipse.emf.ecore.EObject getObjectToView_(org.eclipse.emf.ecore.EObject selObject)
           
 org.eclipse.emf.ecore.EObject getObjectToView(org.eclipse.emf.ecore.EObject selObject)
          Returns the object that should be viewd if true if the selObject is selected in the monitors view For example, if the process node is selected, the view should display the profiling data if trace collects profiling data
 TraceViewerPage getPage(org.eclipse.emf.ecore.EObject mofObject)
          Returns the TraceViewerPage instance for the given EObject
 java.lang.Object[] getViewerControls()
           
 java.lang.String getViewerTitle()
           
 java.lang.String getViewID()
           
abstract  java.lang.String getViewTitle()
          Returns the title of the view for this viewer
 void handleProfileEvent(ProfileEvent event)
          This method applies the appropriate function on this viewer for the given ProfileEvent
 void initializeActionBar()
          Initializes the action bar for this viewer
 void initializedMenu(boolean init)
          Sets where the menu has been initialized
 boolean isFPartVisible()
           
 boolean isFRefreshView()
           
 boolean isInitializedMenu()
          Returns whether the menu has been initialized
 boolean isProcessRefreshEvents()
          Returns true of this viewer processes refresh events.
 boolean isSaveNeeded()
          Returns true if a save is needed for the view
 void loadingTrace()
           
 void loadingTraceDone()
           
 void makeActions()
          This method is called to create the actions for the viewer
 void menuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
           
 void removePage(java.lang.Object obj)
          Removes the page associated with the given object
 void selectionChanged(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)
          Selection has changed in the Monitors view (PDProjectExplorer)
 void setFocus()
          Requests the part to take focus within the desktop.
 void setFPartVisible(boolean partVisible)
           
 void setFRefreshView(boolean refreshView)
           
 void setRecordSelection(org.eclipse.emf.ecore.EObject record, org.eclipse.emf.ecore.EObject treeSel)
          Sets the record selection for this viewer
 void showPage(org.eclipse.ui.part.IPage page)
          Shows the given page
 
Methods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init, init, saveState, setInitializationData
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy
 
Methods inherited from class java.lang.Object
equals, 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

VIEW_ID

public static final java.lang.String VIEW_ID
See Also:
Constant Field Values

GROUP_ADD_VIEWS

public final java.lang.String GROUP_ADD_VIEWS
See Also:
Constant Field Values

GROUP_GENERIC

public final java.lang.String GROUP_GENERIC
See Also:
Constant Field Values

GROUP_ADDITIONS

public final java.lang.String GROUP_ADDITIONS
See Also:
Constant Field Values
Constructor Detail

TraceViewer

public TraceViewer()
Constructor

Method Detail

loadingTrace

public void loadingTrace()

loadingTraceDone

public void loadingTraceDone()

addViewPage

public void addViewPage(org.eclipse.emf.ecore.EObject object,
                        boolean newPage)
Add a page to the workbook. If the mofObject is null, show default empty page

Parameters:
object - an EObject, the EObject the page will be based on
newPage - a boolean, whether this is a new page to display or not

addViewPage

public void addViewPage(org.eclipse.emf.ecore.EObject object)
Add a page to the workbook. If the mofObject is null, show default empty page

Parameters:
object - an EObject, the EObject the page will be based on

getObjectToView

public org.eclipse.emf.ecore.EObject getObjectToView(org.eclipse.emf.ecore.EObject selObject)
Returns the object that should be viewd if true if the selObject is selected in the monitors view For example, if the process node is selected, the view should display the profiling data if trace collects profiling data

Parameters:
selObject - an EObject
Returns:
an EObject, the object to view

createPage

public abstract TraceViewerPage createPage(org.eclipse.emf.ecore.EObject mofObject)
Creates the TraceViewerPage instance associated with this trace viewer.

Parameters:
mofObject - an EObject, the object associate with this viewer and page
Returns:
a TraceViewerPage instance, the created page

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart
See Also:
IWorkbenchPart.createPartControl(org.eclipse.swt.widgets.Composite)

getCurrentPage

public org.eclipse.ui.part.IPage getCurrentPage()
Returns the current page in the view

Returns:
org.eclipse.eclipse.ui.part.IPage

getPage

public TraceViewerPage getPage(org.eclipse.emf.ecore.EObject mofObject)
Returns the TraceViewerPage instance for the given EObject

Parameters:
mofObject - an EObject instance
Returns:
a TraceViewerPage instances

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.part.WorkbenchPart
See Also:
IWorkbenchPart.dispose()

initializedMenu

public void initializedMenu(boolean init)
Sets where the menu has been initialized

Parameters:
init - a boolean

isInitializedMenu

public boolean isInitializedMenu()
Returns whether the menu has been initialized

Returns:
boolean

isSaveNeeded

public boolean isSaveNeeded()
Returns true if a save is needed for the view

Returns:
a boolean

makeActions

public void makeActions()
This method is called to create the actions for the viewer


createReportAction

public void createReportAction()

removePage

public void removePage(java.lang.Object obj)
Removes the page associated with the given object

Parameters:
obj - an Object

setFocus

public void setFocus()
Requests the part to take focus within the desktop.

Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart

showPage

public void showPage(org.eclipse.ui.part.IPage page)
Shows the given page


selectionChanged

public void selectionChanged(org.eclipse.ui.IWorkbenchPart part,
                             org.eclipse.jface.viewers.ISelection selection)
Selection has changed in the Monitors view (PDProjectExplorer)

Specified by:
selectionChanged in interface org.eclipse.ui.ISelectionListener

getViewTitle

public abstract java.lang.String getViewTitle()
Returns the title of the view for this viewer

Returns:
a String

handleProfileEvent

public void handleProfileEvent(ProfileEvent event)
This method applies the appropriate function on this viewer for the given ProfileEvent

Specified by:
handleProfileEvent in interface IProfileEventListener
Parameters:
event - a ProfileEvent instance

initializeActionBar

public void initializeActionBar()
Initializes the action bar for this viewer


setRecordSelection

public void setRecordSelection(org.eclipse.emf.ecore.EObject record,
                               org.eclipse.emf.ecore.EObject treeSel)
Sets the record selection for this viewer

Parameters:
record - an EObject, the record
treeSel - an EObject, the tree selection

isProcessRefreshEvents

public boolean isProcessRefreshEvents()
Returns true of this viewer processes refresh events.

Returns:
a boolean

deregister

public void deregister(java.lang.Object obj)
Invoked when a top hierarchy object is deleted from the model. Deregisters the given object.

Specified by:
deregister in interface IDeleteListener

isFRefreshView

public boolean isFRefreshView()

setFRefreshView

public void setFRefreshView(boolean refreshView)

isFPartVisible

public boolean isFPartVisible()

setFPartVisible

public void setFPartVisible(boolean partVisible)

getViewerControls

public java.lang.Object[] getViewerControls()
Specified by:
getViewerControls in interface IExportViewer
Returns:
control containing the data to be exported Subclasses should override this method and return the desired control to be exported

getViewerTitle

public java.lang.String getViewerTitle()
Specified by:
getViewerTitle in interface IExportViewer
Returns:
view title

getExportViewer

public org.eclipse.jface.viewers.Viewer[] getExportViewer()
Specified by:
getExportViewer in interface IExportViewer
Returns:
viewer associated with this view, if applicable can be a TreeViewer, TableTreeViewer or null if the view is not using a viewer

contextHandlerSelectionChanged

public boolean contextHandlerSelectionChanged()

getModelObject

public java.lang.Object getModelObject()
Specified by:
getModelObject in interface IExportViewer
Returns:
the model input for this view

getDefaultPageMessage

public java.lang.String getDefaultPageMessage()
Returns the default page message.


menuAboutToShow

public void menuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
Specified by:
menuAboutToShow in interface org.eclipse.jface.action.IMenuListener
See Also:
IMenuListener.menuAboutToShow(org.eclipse.jface.action.IMenuManager)

getDefaultPage

public org.eclipse.ui.part.IPage getDefaultPage()

getViewID

public java.lang.String getViewID()

getObjectToView_

public static org.eclipse.emf.ecore.EObject getObjectToView_(org.eclipse.emf.ecore.EObject selObject)

TPTP 4.5.0 Platform Project
Public API Specification