コード例 #1
0
 /** Save the currently selected node. */
 private void setSelectedNode() {
   String storeValue = null;
   IStructuredSelection selection = (IStructuredSelection) getTreeViewer().getSelection();
   if (selection.size() == 1) {
     IPreferenceNode node = (IPreferenceNode) selection.getFirstElement();
     storeValue = node.getId();
   }
   setSelectedNodePreference(storeValue);
 }
コード例 #2
0
 /**
  * Clear the last selected node. This is so that we not chache the last selection in case of an
  * error.
  */
 void clearSelectedNode() {
   setSelectedNodePreference(null);
 }
コード例 #3
0
 /**
  * Sets the name of the selected item preference. Public equivalent to <code>
  * setSelectedNodePreference</code>.
  *
  * @param pageId The identifier for the page
  * @since 3.0
  */
 public void setSelectedNode(String pageId) {
   setSelectedNodePreference(pageId);
 }