Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.search
Class SearchResultElementAdapter

java.lang.Object
  extended by AbstractSystemViewAdapter
      extended by com.ibm.etools.iseries.rse.ui.search.SearchResultElementAdapter
All Implemented Interfaces:
IPDMOptions

public class SearchResultElementAdapter
extends AbstractSystemViewAdapter
implements IPDMOptions

This is the adapter to handle the iseries result elements from the search result view. Adapter for: (According to: SearchResultAdapterFactory) - SearchResultRootElement - SearchResultChildElement


Field Summary
static String Copyright
           
 
Fields inherited from interface com.ibm.etools.iseries.rse.ui.view.objtable.IPDMOptions
PDM_OPTION_10_RESTORE, PDM_OPTION_11_MOVE, PDM_OPTION_12_WORK_WITH, PDM_OPTION_15_COPY_FILE, PDM_OPTION_2_CHANGE, PDM_OPTION_2_EDIT, PDM_OPTION_25_FIND_STRING, PDM_OPTION_3_COPY, PDM_OPTION_4_DELETE, PDM_OPTION_5_BROWSE, PDM_OPTION_55_MERGE_MEMBER, PDM_OPTION_7_RENAME, PDM_OPTION_9_SAVE
 
Constructor Summary
SearchResultElementAdapter()
          Constructor for ISeriesSearchResultElementAdapter.
 
Method Summary
 void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
          Add the pop-up actions to the result view
 void addSelectionChangedListener(ISelectionChangedListener arg0)
           
 boolean canDelete()
          Is delete supported
 boolean canDelete(Object element)
          Should the delete action be enabled for the given selected object?
 boolean canRename()
           
 boolean canRename(Object element)
          Should the rename action be enabled for the given selected object?
 boolean doDelete()
          Actually do the delete of currently selected items.
 boolean doDelete(IProgressMonitor monitor)
           
 boolean doRename(String[] newNames)
          Actually do the rename of currently selected items.
 String getAbsoluteName(Object element)
          Return the absolute name, versus just display name, of this object
 Object[] getChildren(IAdaptable element, IProgressMonitor monitor)
          Return the children of the view
 ImageDescriptor getImageDescriptor(Object element)
           
 Object getParent(Object element)
           
 ISelection getSelection()
           
 String getText(Object element)
           
 String getType(Object element)
           
 boolean handleDoubleClick(Object element)
          Handle double click action to open the member
 boolean hasChildren(IAdaptable element)
          Return if there is children for the view
protected  IPropertyDescriptor[] internalGetPropertyDescriptors()
          Return our unique property descriptors
 Object internalGetPropertyValue(Object key)
          Return our unique property values
 void removeFromTreeView(Vector toBeRemovedVector)
          Remove item from tree view
 void removeSelectionChangedListener(ISelectionChangedListener arg0)
           
 void setSelection(ISelection arg0)
           
 boolean showDelete()
          Should we show delete
 boolean showRename()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Constructor Detail

SearchResultElementAdapter

public SearchResultElementAdapter()
Constructor for ISeriesSearchResultElementAdapter.

Method Detail

getChildren

public Object[] getChildren(IAdaptable element,
                            IProgressMonitor monitor)
Return the children of the view


hasChildren

public boolean hasChildren(IAdaptable element)
Return if there is children for the view


getParent

public Object getParent(Object element)
See Also:
IWorkbenchAdapter

getImageDescriptor

public ImageDescriptor getImageDescriptor(Object element)
See Also:
com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter#getImageDescriptor(Object, boolean)

getText

public String getText(Object element)
See Also:
com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter#getText(Object)

getAbsoluteName

public String getAbsoluteName(Object element)
Return the absolute name, versus just display name, of this object


getType

public String getType(Object element)
See Also:
com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter#getType(Object)

addActions

public void addActions(SystemMenuManager menu,
                       IStructuredSelection selection,
                       Shell shell,
                       String menuGroup)
Add the pop-up actions to the result view


internalGetPropertyDescriptors

protected IPropertyDescriptor[] internalGetPropertyDescriptors()
Return our unique property descriptors


internalGetPropertyValue

public Object internalGetPropertyValue(Object key)
Return our unique property values


handleDoubleClick

public boolean handleDoubleClick(Object element)
Handle double click action to open the member


canDelete

public boolean canDelete(Object element)
Should the delete action be enabled for the given selected object?


canRename

public boolean canRename(Object element)
Should the rename action be enabled for the given selected object?


showDelete

public boolean showDelete()
Should we show delete


canDelete

public boolean canDelete()
Is delete supported


doDelete

public boolean doDelete()
Actually do the delete of currently selected items. Return true if it worked. Return false if it didn't (you display msg), or throw an exception (framework displays msg)


removeFromTreeView

public void removeFromTreeView(Vector toBeRemovedVector)
Remove item from tree view

Parameters:
deletedVector -

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener arg0)

getSelection

public ISelection getSelection()

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener arg0)

setSelection

public void setSelection(ISelection arg0)

showRename

public boolean showRename()

canRename

public boolean canRename()

doRename

public boolean doRename(String[] newNames)
Actually do the rename of currently selected items. The array of new names matches the currently selected items. Return true if it worked. Return false if it didn't (you display msg), or throw an exception (framework displays msg)


doDelete

public boolean doDelete(IProgressMonitor monitor)

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.