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 Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Label provider for external object modules.
    protected class 
    Display BSL source job.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of BslSourceDisplay.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BslSourceDisplay

      public BslSourceDisplay()
      Creates an instance of BslSourceDisplay.
  • Method Details

    • displaySource

      public void displaySource(Object element, org.eclipse.ui.IWorkbenchPage page, boolean forceSourceLookup)
      Specified by:
      displaySource in interface org.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 be null
      page - the page in which to display source, cannot be null
      stackFrame - the BSL stack frame, cannot be null
      module - the BSL module, cannot be null
      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 be null
      reference - reference from module owner to module, cannot be null
      page - the page in which to display source, cannot be null
      stackFrame - BSL stack frame, cannot be null
      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 be null
      reference - reference from module owner to module, cannot be null
      page - the page in which to display source, cannot be null
      stackFrame - BSL stack frame, cannot be null
      forceSourceLookup - whether source lookup should be performed, ignoring any previously cached results for the same element
    • openSourceNotFoundEditor

      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.

      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 be null
      element - the debug element to open editor for, cannot be null
    • 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 be null
      lineNumber - the line number to get information about, cannot be null
      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 be null
      frame - the stack frame to get position with, cannot be null
    • clearSourceSelection

      protected void clearSourceSelection(Object source)
      Clears any source decorations associated with the given thread or debug target.
      Parameters:
      source - a thread or debug target, cannot be null