Interface ElementAdapter
- All Known Implementing Classes:
WorkflowElementAdapter
public interface ElementAdapter
An adapter to the
That is process specific decisions and syntax element and variable normalisation.
DebugMonitor
that handle all element type specific activities on the runtime
side.That is process specific decisions and syntax element and variable normalisation.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
returns true, if the implementation handles the element typeboolean
checkVariableHasMembers
(Object element) check if the variable representation of this element shall show memberscreateElement
(Object element) computes a SyntaxElement for a specific element type
the containerName should be the name of the underlying file name
the element name should be the name of the surrounding element (e.g.createEndElementTO
(Object element) computes a SyntaxElement for a surrounding element representing the end position to be highlighted before returning
the containerName should be the name of the file that holds the element
the element name should be a description of the end element
start, end and line should point to the end text to be highlightedfindElement
(SyntaxElement se, Object actual, int flag) find the element that corresponds to the given syntax element informationa unique type must be provided for each implementationgetVariableDetailRep
(Object element) compute the string representation of the element ready to display in the variables detail view.getVariables
(Object element) collect all available variables for a given element.getVariableSimpleRep
(Object element) compute a shorter string representation of the element ready to display in the variables view.boolean
isSurroundingElement
(Object element) returns whether the element has a body and debugger shall stop again at the end of the execution of that elementvoid
setContext
(Object context) set the current execution context
the context should be cached and can be used to collect information about elementsboolean
shallAddToCallStack
(Object element) Returns true if the syntax element should be appended to callstack.boolean
shallHandle
(Object element) this method is called from the DebugMonitor prior to all other suspension activities (e.g.boolean
shallSuspend
(Object element, int flag) this method is called from the DebugMonitor after all other suspension activities (e.g.
-
Method Details
-
canHandle
returns true, if the implementation handles the element type- Parameters:
element
- the element that is going to be debugged- Returns:
- true, if this class handles the element type
-
shallHandle
this method is called from the DebugMonitor prior to all other suspension activities (e.g. breakpoint check, subroutine level check)
this provides the opportunity to handle specific elements individually
Normal return value should be true- Parameters:
element
- the element that is going to be debugged- Returns:
- whether or not to suspend the debugger process for the element
-
shallSuspend
this method is called from the DebugMonitor after all other suspension activities (e.g. breakpoint check, subroutine level check)
this provides the opportunity for a last call by the adapter.
Implementations can *avoid* suspension, although it would suspend otherwise, if the return value is set to false here- Parameters:
element
- the element that is going to be debuggedflag
- one of the valuesIProcessHandler.PUSH
orIProcessHandler.POP
- Returns:
- whether or not to suspend the debugger process for the element
-
createElement
computes a SyntaxElement for a specific element type
the containerName should be the name of the underlying file name
the element name should be the name of the surrounding element (e.g. in Java we highlight the line to be debugged, but show the surrounding method name in the Launch view)
start, end and line should point to the text that shall be highlighted for the element- Parameters:
element
- the element that is going to be debugged- Returns:
- a SyntaxElement that contains the information to be shown in the debugger views in a common neutral way
-
shallAddToCallStack
Returns true if the syntax element should be appended to callstack.- Parameters:
element
- element to be checked.- Returns:
- true if the element will be added to callstack.
-
isSurroundingElement
returns whether the element has a body and debugger shall stop again at the end of the execution of that element- Parameters:
element
- the element that is debugged currently- Returns:
- whether the element has a body
-
createEndElementTO
computes a SyntaxElement for a surrounding element representing the end position to be highlighted before returning
the containerName should be the name of the file that holds the element
the element name should be a description of the end element
start, end and line should point to the end text to be highlighted- Parameters:
element
- the element that is going to be debugged- Returns:
- a SyntaxElement that contains the information to be shown in the debugger views in a common neutral way
-
findElement
find the element that corresponds to the given syntax element information- Parameters:
se
- the syntax element transfer objectflag
-actual
-- Returns:
- the corresponding element
-
getVariables
collect all available variables for a given element. With this method only the variables themselfs are collected, not their members.
Implementations must consider thatelement
can be both a syntax element or an arbitrary java element to collect the member variables from!!- Parameters:
element
- the current element- Returns:
- a name/value list that contains the variables
-
getVariableDetailRep
compute the string representation of the element ready to display in the variables detail view.- Parameters:
element
- the element to be considered- Returns:
- the String representation of this element
-
getVariableSimpleRep
compute a shorter string representation of the element ready to display in the variables view.- Parameters:
element
- the element to be considered- Returns:
- a string representation of this element
-
checkVariableHasMembers
check if the variable representation of this element shall show members- Parameters:
element
- the element to be considered- Returns:
- the decision
-
setContext
set the current execution context
the context should be cached and can be used to collect information about elements- Parameters:
context
- the context
-
getContext
Object getContext() -
getAdapterType
String getAdapterType()a unique type must be provided for each implementation- Returns:
- the adapterType
-