Interface IValuesViewDelegate


  • public interface IValuesViewDelegate
    'Values' view container creation and management delegate. Creates UI components that represents IBslValue content. Values view delegate extension is defined in plugin.xml.

    Following is an example definition of a values view delegate extension:

     <extension point="com._1c.g5.v8.dt.debug.ui.valuesViewDelegates">
       <valuesViewDelegate
          class="com.example.ExampleValuesViewDelegate"
          priority="7">
       </valuesViewDelegate>
     </extension>
     

    Defined values view delegates are automatically used to represent selecting BSL values (depending on #matches(IBslValue) method and extension priority).

    This interface is intended to be implemented and registered by clients.

    Instances are not intended to be explicitly used by client.

    See Also:
    IBslValue
    Restriction:
    This class is not intended to be instantiated by clients.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Viewer createContent​(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.IWorkbenchPart part, org.eclipse.debug.core.model.IValue value)
      Creates UI-components of 'Values' view and return value viewer for selection listening.
      void filter​(String searchText)
      Sets the search string to the delegate to filter and highlight pattern occurrences.
      List<Object> getSelectionPath()
      Returns the object path to selected object.
      boolean matches​(org.eclipse.debug.core.model.IValue value)
      Returns whether this delegate can represent this value content.
      void refresh()
      Refreshes current view delegate state.
      void setInput​(org.eclipse.debug.core.model.IValue value, IBslStackFrame stackFrame)
      Sets input to 'Values' view delegate.
    • Method Detail

      • matches

        boolean matches​(org.eclipse.debug.core.model.IValue value)
        Returns whether this delegate can represent this value content. Value will be used by 'Values' view to define which delegate will represent this value.

        If there are several delegates, that matches to this value, delegate extension with max priority will be used.

        Parameters:
        value - candidate value, never null
        Returns:
        whether this delegate can represent this value content
      • createContent

        Viewer createContent​(org.eclipse.swt.widgets.Composite parent,
                             org.eclipse.ui.IWorkbenchPart part,
                             org.eclipse.debug.core.model.IValue value)
        Creates UI-components of 'Values' view and return value viewer for selection listening.

        Can return null, than no listeners will be added.

        Parameters:
        parent - parent composite, never null
        part - parent part, never null
        value - viewing value (UI components can depends on value content), never null
        Returns:
        value viewer, can return null than no listeners will be added
      • setInput

        void setInput​(org.eclipse.debug.core.model.IValue value,
                      IBslStackFrame stackFrame)
        Sets input to 'Values' view delegate. Delegate will fill its UI content with value content.
        Parameters:
        value - viewing value, cannot be null
        stackFrame - the BSL stack frame, cannot be null
      • refresh

        void refresh()
        Refreshes current view delegate state. Method is invoked when 'Values' view is notified about debug model changes, and is needed to refresh existing delegate: e.g. delegate viewer content.
      • getSelectionPath

        List<Object> getSelectionPath()
        Returns the object path to selected object. This path will be passed to 'Values' view source and will be added to current selection path.

        Simple view delegates must return single selected object, wrapped in list. Compound delegates (e.g. containing TreeViewer) must return entire path to selected element, then source view ('Values' view) will create correct selection.

        If delegate doesn't return viewer on creation, this method would never be invoked.

        Can return null, then no selection will be passed to source view, or will be used to set new input

        Returns:
        object path to selection object, can be null, then no selection will be passed to source view, or will be used to set new input
        Throws:
        UnsupportedOperationException - if delegate doesn't return viewer on creation
      • filter

        void filter​(String searchText)
        Sets the search string to the delegate to filter and highlight pattern occurrences.
        Parameters:
        searchText - cannot be null