Sample Code Sample Code: Setting Selections in Results Pane


Assuming you already have a reference to the GlossaryVConsoleProperties object, you first need to to get a reference to the display model:

    VDisplayModel model =
        (VDisplayModel)(properties.getPropertyObject(VConsoleProperties.DISPLAY);

To select specific nodes, where vSelected is a Vector of VScopeNode objects:

    model.setSelectedNodes(vSelected);

To select a range of nodes by index:

    model.setSelectionInterval(index0, index1);

To select all nodes:

    model.selectAll();

To unselect all nodes:

    model.clearSelection();