Class BslSourceDisplay
java.lang.Object
com._1c.g5.v8.dt.internal.debug.ui.BslSourceDisplay
- All Implemented Interfaces:
org.eclipse.debug.ui.sourcelookup.ISourceDisplay
- Direct Known Subclasses:
CachingBslSourceDisplay
public class BslSourceDisplay
extends Object
implements org.eclipse.debug.ui.sourcelookup.ISourceDisplay
Displays BSL module sources for a 1C:Enterprise runtime BSL debug stack frames.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Label provider for external object modules.protected class
Display BSL source job. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
clearSourceSelection
(Object source) Clears any source decorations associated with the given thread or debug target.protected void
displayModule
(Object element, org.eclipse.ui.IWorkbenchPage page, IBslStackFrame stackFrame, Module module, boolean forceSourceLookup) Displays source for the given BSL module in the specified workbench page.protected void
displayModule
(org.eclipse.emf.ecore.EObject moduleOwner, org.eclipse.emf.ecore.EStructuralFeature reference, org.eclipse.ui.IWorkbenchPage page, IBslStackFrame stackFrame, boolean forceSourceLookup) Displays an editor for the provided source lookup module result: module owner and owner reference: Opens a module in the lookuped editor.void
displaySource
(Object element, org.eclipse.ui.IWorkbenchPage page, boolean forceSourceLookup) protected org.eclipse.debug.ui.IDebugEditorPresentation
Returns an editor presentation.protected org.eclipse.jface.text.IRegion
getLineInformation
(org.eclipse.ui.texteditor.ITextEditor editor, int lineNumber) Returns the line information for the given line in the given editor.protected org.eclipse.ui.IEditorPart
openModuleEditor
(org.eclipse.emf.ecore.EObject moduleOwner, org.eclipse.emf.ecore.EStructuralFeature reference, org.eclipse.ui.IWorkbenchPage page, IBslStackFrame stackFrame, boolean forceSourceLookup) Opens an editor for the given source lookup module result: module owner and owner reference.protected void
openSourceNotFoundEditor
(org.eclipse.ui.IWorkbenchPage page, Object element) Open Source Not Found editor, associated with given debug element on the given workbench page.protected void
positionEditor
(org.eclipse.ui.texteditor.ITextEditor editor, org.eclipse.debug.core.model.IStackFrame frame) Positions the text editor for the given stack frame.
-
Constructor Details
-
BslSourceDisplay
public BslSourceDisplay()Creates an instance ofBslSourceDisplay
.
-
-
Method Details
-
displaySource
public void displaySource(Object element, org.eclipse.ui.IWorkbenchPage page, boolean forceSourceLookup) - Specified by:
displaySource
in interfaceorg.eclipse.debug.ui.sourcelookup.ISourceDisplay
-
displayModule
protected void displayModule(Object element, org.eclipse.ui.IWorkbenchPage page, IBslStackFrame stackFrame, Module module, boolean forceSourceLookup) Displays source for the given BSL module in the specified workbench page.- Parameters:
element
- debug model element to display source for, cannot benull
page
- the page in which to display source, cannot benull
stackFrame
- the BSL stack frame, cannot benull
module
- the BSL module, cannot benull
forceSourceLookup
- whether source lookup should be performed, ignoring any previously cached results for the same element
-
displayModule
protected void displayModule(org.eclipse.emf.ecore.EObject moduleOwner, org.eclipse.emf.ecore.EStructuralFeature reference, org.eclipse.ui.IWorkbenchPage page, IBslStackFrame stackFrame, boolean forceSourceLookup) Displays an editor for the provided source lookup module result: module owner and owner reference:- Opens a module in the lookuped editor.
- Annotates module editor with debug annotation.
- Positions editor with the stack frame information.
- Parameters:
moduleOwner
- module owner, cannot benull
reference
- reference from module owner to module, cannot benull
page
- the page in which to display source, cannot benull
stackFrame
- BSL stack frame, cannot benull
forceSourceLookup
- whether source lookup should be performed, ignoring any previously cached results for the same element
-
openModuleEditor
protected org.eclipse.ui.IEditorPart openModuleEditor(org.eclipse.emf.ecore.EObject moduleOwner, org.eclipse.emf.ecore.EStructuralFeature reference, org.eclipse.ui.IWorkbenchPage page, IBslStackFrame stackFrame, boolean forceSourceLookup) Opens an editor for the given source lookup module result: module owner and owner reference.- Parameters:
moduleOwner
- module owner, cannot benull
reference
- reference from module owner to module, cannot benull
page
- the page in which to display source, cannot benull
stackFrame
- BSL stack frame, cannot benull
forceSourceLookup
- whether source lookup should be performed, ignoring any previously cached results for the same element
-
openSourceNotFoundEditor
Open Source Not Found editor, associated with given debug element on the given workbench page.Method will find opened Source Not Found editor and will re-use it with new element input, or just open a new editor, if an editor was not found.
- Parameters:
page
- the workbench page to open editor on, cannot benull
element
- the debug element to open editor for, cannot benull
-
getEditorPresentation
protected org.eclipse.debug.ui.IDebugEditorPresentation getEditorPresentation()Returns an editor presentation.- Returns:
- an editor presentation, never
null
-
getLineInformation
protected org.eclipse.jface.text.IRegion getLineInformation(org.eclipse.ui.texteditor.ITextEditor editor, int lineNumber) Returns the line information for the given line in the given editor.- Parameters:
editor
- the text editor to get line information for, cannot benull
lineNumber
- the line number to get information about, cannot benull
- Returns:
- the line region or
null
if get fails
-
positionEditor
protected void positionEditor(org.eclipse.ui.texteditor.ITextEditor editor, org.eclipse.debug.core.model.IStackFrame frame) Positions the text editor for the given stack frame.- Parameters:
editor
- the text editor to set position, cannot benull
frame
- the stack frame to get position with, cannot benull
-
clearSourceSelection
Clears any source decorations associated with the given thread or debug target.- Parameters:
source
- a thread or debug target, cannot benull
-