Interface IValuesViewDelegate


  • public interface IValuesViewDelegate
    'Values' view container creation/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 Detail

      • matches

        boolean matches​(IBslValue 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,
                             IBslValue value)
        Create 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​(IBslValue value)
        Set input to 'Values' view delegate. Delegate will fill its UI content with value content.
        Parameters:
        value - viewing value, never null
      • refresh

        void refresh()
        Refresh 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()
        Get 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