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 classLabel provider for external object modules.protected classDisplay BSL source job. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclearSourceSelection(Object source) Clears any source decorations associated with the given thread or debug target.protected voiddisplayModule(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 voiddisplayModule(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.voiddisplaySource(Object element, org.eclipse.ui.IWorkbenchPage page, boolean forceSourceLookup) protected org.eclipse.debug.ui.IDebugEditorPresentationReturns an editor presentation.protected org.eclipse.jface.text.IRegiongetLineInformation(org.eclipse.ui.texteditor.ITextEditor editor, int lineNumber) Returns the line information for the given line in the given editor.protected org.eclipse.ui.IEditorPartopenModuleEditor(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 voidopenSourceNotFoundEditor(org.eclipse.ui.IWorkbenchPage page, Object element) Open Source Not Found editor, associated with given debug element on the given workbench page.protected voidpositionEditor(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:
displaySourcein 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 benullpage- the page in which to display source, cannot benullstackFrame- the BSL stack frame, cannot benullmodule- the BSL module, cannot benullforceSourceLookup- 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 benullreference- reference from module owner to module, cannot benullpage- the page in which to display source, cannot benullstackFrame- BSL stack frame, cannot benullforceSourceLookup- 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 benullreference- reference from module owner to module, cannot benullpage- the page in which to display source, cannot benullstackFrame- BSL stack frame, cannot benullforceSourceLookup- 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 benullelement- 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 benulllineNumber- the line number to get information about, cannot benull- Returns:
- the line region or
nullif 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 benullframe- 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
-