TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.uml2sd.trace.loaders
Class TraceInteractions

java.lang.Object
  extended by org.eclipse.hyades.uml2sd.trace.loaders.BaseTraceInteractions
      extended by org.eclipse.hyades.uml2sd.trace.loaders.TraceInteractions
All Implemented Interfaces:
java.util.EventListener, IProfileEventListener, IFilterViewer, ITraceInteractionPreferenceListener, IExtendedFilterProvider, ISDAdvancedPagingProvider, ISDCollapseProvider, ISDExtendedActionBarProvider, ISDFilterProvider, ISDFindProvider, ISDGraphNodeSupporter, ISDInternalMesFilterProvider, ISDPagingProvider, ISDPropertiesProvider, org.eclipse.ui.ISelectionListener

public class TraceInteractions
extends BaseTraceInteractions
implements IExtendedFilterProvider, ISDAdvancedPagingProvider, ISDInternalMesFilterProvider, ISDCollapseProvider, ITraceInteractionPreferenceListener, ISDPropertiesProvider, ISDFilterProvider, IFilterViewer

The abstract trace loader. It is based on the parsing of MethodInvocations from the model. Lifelines attribution is made by the concrete classes.


Field Summary
static int CATEGORY_AGENT
           
static int CATEGORY_CARD
           
static int CATEGORY_CLASSES
          Categories: - first one for classes - second one for instances of classes - third one for collapsed classes and/or objects
static int CATEGORY_COLLAPSED
           
static int CATEGORY_NODE
           
static int CATEGORY_OBJECTS
           
static int CATEGORY_PROCESS
           
static int CATEGORY_THREAD
           
 
Fields inherited from class org.eclipse.hyades.uml2sd.trace.loaders.BaseTraceInteractions
ACTIONS_SHOWSTATTABLE
 
Fields inherited from interface org.eclipse.hyades.uml2sd.trace.preferences.ITraceInteractionPreferenceListener
PAGE_SIZE
 
Fields inherited from interface org.eclipse.hyades.uml2sd.ui.actions.provider.ISDGraphNodeSupporter
ASYNCMESSAGE, ASYNCMESSAGERETURN, LIFELINE, STOP, SYNCMESSAGE, SYNCMESSAGERETURN
 
Constructor Summary
TraceInteractions()
           
 
Method Summary
 void applyPreferences()
          Implementation of ITraceInteractionPreferenceListener
 void backLastDrillDown()
           
 void clearInternals()
           
 void collapseCalledMessages(java.util.ArrayList graphNodes)
           
 void collapseLifelines(java.util.List graphNodes)
           
 void collapseTwoLifelines(Lifeline lifeline1, Lifeline lifeline2)
          Implementation of ISDCollapseProvider
 int currentPage()
           
 void drillDown(java.util.ArrayList graphNodes)
           
 void expandCalledMessages(java.util.ArrayList graphNodes)
           
 void expandLifelines(java.util.List graphNodes)
           
 void fillPage(org.eclipse.hyades.uml2sd.trace.loaders.internal.TraceInteractionUpdate update)
           
 boolean filter(java.util.List filters)
          Come back from the filters dialog
 void filterIn(java.util.ArrayList graphNodes)
           
 void filterSelectedGraphNodes(java.util.ArrayList graphNodes)
           
 void filterUpdated()
          When a filter is selected or changed, this method is called to signal to the viewer that one of its filters have changed or updated.
static void findInvocation(TRCMethodInvocation model, boolean isReturn)
          Try to find, select and display a given method invocation message or message return.
 org.eclipse.jface.action.Action getFilterAction()
           
 java.lang.String[] getFilterScope()
          Returns the filter scope associated with the IFilterViewer implementor.
 java.lang.String getFinalTitleString()
           
static TraceInteractions getInstance()
          returns the firstly created instance of TraceInteractions
 boolean getInternalMessageFiltered()
          Returns the current state for internal messages filtering, from loader
 ILifelineLoader getLifelineLoader()
           
 java.lang.String getNodeName(int nodeType, java.lang.String loaderClassName)
          Return the name to use in dialogs Not called if isNodeSupported return false
 org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetEntry()
          Implementation of ISDPropertiesProvider
 java.lang.String getTitleString()
          This is the title
 boolean hasNextPage()
          implementation of ISDPagingProvider
 boolean hasPrevPage()
          Return true to enable the previous page button in the coolBar, false otherwise
 void highlightCallStack(java.util.ArrayList graphNodes)
          Highlight call stack action
 java.lang.String itemsText()
           
 int itemsTotalCount()
           
 int maxItemsByPageCount()
          Implementation of ISDAdvancedPagingProvider
 void nextPage()
          Called back when next page button is pressed in the coolBar
 java.lang.String noItemsText()
           
 boolean notFoundYet(Criteria toSearch)
          Called when find in the current shown graph nodes returned an empty strings.
 java.lang.String oneItemText()
           
 void onSetViewer()
          Implementation of IUml2SDLoader
 void pageNumberChanged(int pageNumber_)
          Instructs a load of the <pageNumber_>th page.
 int pagesCount()
           
 void pageSettingsChanged(int maxItemsByPage_, int pageNumber_)
          Updates the number of items in a page and instructs a load of <pageNumber_>th page.
 void prevPage()
          Called back when previous page button is pressed in the coolBar
 void resetDrillDown()
           
static void setExternalDateSelection(IDateSelection selection)
           
 void setFilterQueryProvider(IFilterQueryProvider filterQueryProvider_)
          When the action is created, this method is called providing the IFilterQueryProvider to the viewer.
 void setFrameName()
           
 void setInternalMessageFiltered(boolean value)
          Set internal messages filtering on/off Renames setFiltered @since 3.2
 void setLifelineLoader(BaseLifelineLoader lifelineLoader_)
           
 void setLifelineLoader(java.lang.String className)
           
 void supplementCoolbarContent(org.eclipse.ui.IActionBars bar)
          Extension of ISDExtendedActionBarProvider
 
Methods inherited from class org.eclipse.hyades.uml2sd.trace.loaders.BaseTraceInteractions
aboutToBeReplaced, cancel, find, getView, handleProfileEvent, isNodeSupported, selectionChanged, setViewer, sortTraceThreadList
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.uml2sd.ui.actions.provider.ISDGraphNodeSupporter
isNodeSupported
 

Field Detail

CATEGORY_CLASSES

public static final int CATEGORY_CLASSES
Categories: - first one for classes - second one for instances of classes - third one for collapsed classes and/or objects

See Also:
Constant Field Values

CATEGORY_OBJECTS

public static final int CATEGORY_OBJECTS
See Also:
Constant Field Values

CATEGORY_NODE

public static final int CATEGORY_NODE
See Also:
Constant Field Values

CATEGORY_AGENT

public static final int CATEGORY_AGENT
See Also:
Constant Field Values

CATEGORY_PROCESS

public static final int CATEGORY_PROCESS
See Also:
Constant Field Values

CATEGORY_THREAD

public static final int CATEGORY_THREAD
See Also:
Constant Field Values

CATEGORY_COLLAPSED

public static final int CATEGORY_COLLAPSED
See Also:
Constant Field Values

CATEGORY_CARD

public static final int CATEGORY_CARD
See Also:
Constant Field Values
Constructor Detail

TraceInteractions

public TraceInteractions()
Method Detail

onSetViewer

public void onSetViewer()
Implementation of IUml2SDLoader

Specified by:
onSetViewer in class BaseTraceInteractions

clearInternals

public void clearInternals()

setFrameName

public void setFrameName()
Specified by:
setFrameName in class BaseTraceInteractions
Parameters:
process -

getTitleString

public java.lang.String getTitleString()
This is the title


fillPage

public void fillPage(org.eclipse.hyades.uml2sd.trace.loaders.internal.TraceInteractionUpdate update)
Specified by:
fillPage in class BaseTraceInteractions
Parameters:
update -

findInvocation

public static void findInvocation(TRCMethodInvocation model,
                                  boolean isReturn)
Try to find, select and display a given method invocation message or message return.

Parameters:
model - method invocation to look for
isReturn - true if looking for the corresponding message return, false for the message

setExternalDateSelection

public static void setExternalDateSelection(IDateSelection selection)
Parameters:
selection - must contain a IDateSelection with an absolute time, the meaning NOW and no need for getEObject() to return a process (a null EObject would be fine).

hasNextPage

public boolean hasNextPage()
implementation of ISDPagingProvider

Specified by:
hasNextPage in interface ISDPagingProvider
Returns:
true if a next page exists false otherwise

hasPrevPage

public boolean hasPrevPage()
Description copied from interface: ISDPagingProvider
Return true to enable the previous page button in the coolBar, false otherwise

Specified by:
hasPrevPage in interface ISDPagingProvider
Returns:
true if a previous page exists false otherwise

nextPage

public void nextPage()
Description copied from interface: ISDPagingProvider
Called back when next page button is pressed in the coolBar

Specified by:
nextPage in interface ISDPagingProvider

prevPage

public void prevPage()
Description copied from interface: ISDPagingProvider
Called back when previous page button is pressed in the coolBar

Specified by:
prevPage in interface ISDPagingProvider

maxItemsByPageCount

public int maxItemsByPageCount()
Implementation of ISDAdvancedPagingProvider

Specified by:
maxItemsByPageCount in interface ISDAdvancedPagingProvider
Returns:
number of items in a page

itemsTotalCount

public int itemsTotalCount()
Specified by:
itemsTotalCount in interface ISDAdvancedPagingProvider
Returns:
the total number of items the loader is dealing with (on all pages)

noItemsText

public java.lang.String noItemsText()
Specified by:
noItemsText in interface ISDAdvancedPagingProvider
Returns:
text to be shown when maxItemsByPageCount() or itemsTotalCount() return 0

oneItemText

public java.lang.String oneItemText()
Specified by:
oneItemText in interface ISDAdvancedPagingProvider
Returns:
text to be shown when maxItemsByPageCount() or itemsTotalCount() return 1

itemsText

public java.lang.String itemsText()
Specified by:
itemsText in interface ISDAdvancedPagingProvider
Returns:
text to be shown when maxItemsByPageCount() or itemsTotalCount() return 2 or more

currentPage

public int currentPage()
Specified by:
currentPage in interface ISDAdvancedPagingProvider
Returns:
the current page the loader is dealing with Note that first page has the 0 index (indexes are from 0 to pagesCount()-1).

pagesCount

public int pagesCount()
Specified by:
pagesCount in interface ISDAdvancedPagingProvider
Returns:
number of pages the loader is dealing with

pageSettingsChanged

public void pageSettingsChanged(int maxItemsByPage_,
                                int pageNumber_)
Description copied from interface: ISDAdvancedPagingProvider
Updates the number of items in a page and instructs a load of <pageNumber_>th page.
Note that first page has the 0 index (indexes are from 0 to pagesCount()-1).

Specified by:
pageSettingsChanged in interface ISDAdvancedPagingProvider
Parameters:
maxItemsByPage_ - index of the page to load
pageNumber_ - index of the page to load

pageNumberChanged

public void pageNumberChanged(int pageNumber_)
Description copied from interface: ISDAdvancedPagingProvider
Instructs a load of the <pageNumber_>th page.
Note that first page has the index 0 (indexes are from 0 to pagesCount()-1).

Specified by:
pageNumberChanged in interface ISDAdvancedPagingProvider
Parameters:
pageNumber_ - index of the page to load

notFoundYet

public boolean notFoundYet(Criteria toSearch)
Description copied from class: BaseTraceInteractions
Called when find in the current shown graph nodes returned an empty strings.
It's the moment to search in other pages if any.

Specified by:
notFoundYet in class BaseTraceInteractions
Returns:
See Also:
BaseTraceInteractions.notFoundYet(org.eclipse.hyades.uml2sd.ui.actions.widgets.Criteria)

setInternalMessageFiltered

public void setInternalMessageFiltered(boolean value)
Description copied from interface: ISDInternalMesFilterProvider
Set internal messages filtering on/off Renames setFiltered @since 3.2

Specified by:
setInternalMessageFiltered in interface ISDInternalMesFilterProvider

getInternalMessageFiltered

public boolean getInternalMessageFiltered()
Description copied from interface: ISDInternalMesFilterProvider
Returns the current state for internal messages filtering, from loader

Specified by:
getInternalMessageFiltered in interface ISDInternalMesFilterProvider

filterSelectedGraphNodes

public void filterSelectedGraphNodes(java.util.ArrayList graphNodes)

filter

public boolean filter(java.util.List filters)
Come back from the filters dialog

Specified by:
filter in interface ISDFilterProvider
Returns:
true if the filter applied

getFilterAction

public org.eclipse.jface.action.Action getFilterAction()
Specified by:
getFilterAction in interface IExtendedFilterProvider
See Also:
IExtendedFilterProvider.getFilterAction()

filterUpdated

public void filterUpdated()
Description copied from interface: IFilterViewer
When a filter is selected or changed, this method is called to signal to the viewer that one of its filters have changed or updated. The implementor can handle this in its choosing (examples: lazy refreshing, immediate refreshing).

Specified by:
filterUpdated in interface IFilterViewer
See Also:
org.eclipse.hyades.trace.ui.filters.IFilterViewer#filterUpdate(org.eclipse.hyades.models.hierarchy.extensions.SimpleSearchQuery)

setFilterQueryProvider

public void setFilterQueryProvider(IFilterQueryProvider filterQueryProvider_)
Description copied from interface: IFilterViewer
When the action is created, this method is called providing the IFilterQueryProvider to the viewer. The viewer could then use this method to get the filter, or update filter queries in some programmatic way. The IFilterQueryProvider must also be used to call #IFilterQueryProvider.viewerDisposed() when this viewer is disposed.

Specified by:
setFilterQueryProvider in interface IFilterViewer
See Also:
org.eclipse.hyades.trace.ui.filters.IFilterViewer#setFilterQueryProvider(org.eclipse.hyades.trace.ui.filters.IFilterQueryProvider)

getFilterScope

public java.lang.String[] getFilterScope()
Description copied from interface: IFilterViewer
Returns the filter scope associated with the IFilterViewer implementor. The filter scope is used to determine what filter types associated with this viewer. If a filter type is associated with any scope returned here its filters are displayed and can be edited/created from the action of this IFilterViewer.

Specified by:
getFilterScope in interface IFilterViewer
See Also:
org.eclipse.hyades.trace.ui.filters.IFilterViewer#getFilterScope()

drillDown

public void drillDown(java.util.ArrayList graphNodes)

backLastDrillDown

public void backLastDrillDown()

resetDrillDown

public void resetDrillDown()

filterIn

public void filterIn(java.util.ArrayList graphNodes)

collapseLifelines

public void collapseLifelines(java.util.List graphNodes)

expandLifelines

public void expandLifelines(java.util.List graphNodes)

collapseTwoLifelines

public void collapseTwoLifelines(Lifeline lifeline1,
                                 Lifeline lifeline2)
Implementation of ISDCollapseProvider

Specified by:
collapseTwoLifelines in interface ISDCollapseProvider
Parameters:
lifeline1 - - One of the lifeline to collapse

collapseCalledMessages

public void collapseCalledMessages(java.util.ArrayList graphNodes)

expandCalledMessages

public void expandCalledMessages(java.util.ArrayList graphNodes)

highlightCallStack

public void highlightCallStack(java.util.ArrayList graphNodes)
Highlight call stack action


applyPreferences

public void applyPreferences()
Implementation of ITraceInteractionPreferenceListener

Specified by:
applyPreferences in interface ITraceInteractionPreferenceListener

supplementCoolbarContent

public void supplementCoolbarContent(org.eclipse.ui.IActionBars bar)
Extension of ISDExtendedActionBarProvider

Specified by:
supplementCoolbarContent in interface ISDExtendedActionBarProvider
Overrides:
supplementCoolbarContent in class BaseTraceInteractions
Parameters:
bar - the bar

getInstance

public static TraceInteractions getInstance()
returns the firstly created instance of TraceInteractions


setLifelineLoader

public void setLifelineLoader(java.lang.String className)
Parameters:
lifelineLoader - The lifelineLoader to set.

setLifelineLoader

public void setLifelineLoader(BaseLifelineLoader lifelineLoader_)
Parameters:
loader -

getLifelineLoader

public ILifelineLoader getLifelineLoader()
Returns:
Returns the lifelineLoader.

getFinalTitleString

public java.lang.String getFinalTitleString()
See Also:
org.eclipse.hyades.uml2sd.trace.loaders.BaseTraceInteractions#getFinalTitleString()

getNodeName

public java.lang.String getNodeName(int nodeType,
                                    java.lang.String loaderClassName)
Description copied from interface: ISDGraphNodeSupporter
Return the name to use in dialogs Not called if isNodeSupported return false

Specified by:
getNodeName in interface ISDGraphNodeSupporter
Returns:
the name to use in dialogs

getPropertySheetEntry

public org.eclipse.ui.views.properties.IPropertySheetPage getPropertySheetEntry()
Implementation of ISDPropertiesProvider

Specified by:
getPropertySheetEntry in interface ISDPropertiesProvider
Returns:

TPTP 4.5.0 Platform Project
Public API Specification