Interface IVariableValueEditor


  • public interface IVariableValueEditor
    A variable value editor allows the user to edit a variable's value. Variable value editors are contributed for a debug model via the org.eclipse.debug.ui.variableValueEditors extension point.

    Following is example plug-in XML for contributing a variable value editor.

     <extension point="org.eclipse.debug.ui.variableValueEditors">
        <variableEditor
           modelId="com.examples.myDebugModel"
           class="com.examples.variables.MyVariableValueEditor"/>
     </extension>
     
    The attributes are specified as follows:
    • modelId the debug model identifier for which the given variable value editor is applicable
    • class fully qualified name of a class that implements IVariableValueEditor

    Clients may implement this interface.

    Since:
    3.1
    • Method Detail

      • editVariable

        boolean editVariable​(IVariable variable,
                             Shell shell)
        Edits the given variable, if appropriate. If this editor does not apply to the given variable this method returns false, which indicates that the Debug Platform's default variable edit dialog should be used.
        Parameters:
        variable - the variable to edit
        shell - the currently active shell, which can be used to open a dialog for the user
        Returns:
        whether this editor has completed the edit operation for the given variable. true if no more work should be done, false if the debug platform should prompt the user to edit the given variable using the default variable editor
      • saveVariable

        boolean saveVariable​(IVariable variable,
                             String expression,
                             Shell shell)
        Saves the given expression to the given variable, if appropriate. If this editor does not set the given variable's value from the given expression, this method returns false. Returning false indicates that the Debug Platform should perform the default operation to set a variable's value based on a String.
        Parameters:
        variable - the variable to edit
        expression - the expression to assign to the given variable
        shell - the currently active shell, which can be used to report errors to the user. May be null if no active shell could be found.
        Returns:
        whether this editor has completed the save operation for the given variable. true if no more work should be done, false if the debug platform should perform the default save operation