com.ibm.lab.soln.contributions
Class SmartRefreshAction

java.lang.Object
  |
  +--com.ibm.lab.soln.contributions.SmartRefreshAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate

public class SmartRefreshAction
extends java.lang.Object
implements org.eclipse.ui.IObjectActionDelegate

This action is the implementation of an object contribution on a file resource that is enabled only if the selected file is not in-sync with the local file system; a little smarter version of the standard Refresh action. The special child tag "adaptable" in the extension point org.eclipse.ui.popupMenus is handled in the selectionChanged method. This action is dependent on the host plug-in to include the extension point org.eclipse.ui.startup.

See Also:
IObjectActionDelegate

Constructor Summary
SmartRefreshAction()
           
 
Method Summary
 void run(org.eclipse.jface.action.IAction action)
           
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          Captures the view's selected IFile items including those items that are adaptable to an IFile object.
 void setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart tgtPart)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartRefreshAction

public SmartRefreshAction()
Method Detail

run

public void run(org.eclipse.jface.action.IAction action)
Specified by:
run in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.run(IAction)

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Captures the view's selected IFile items including those items that are adaptable to an IFile object. This allows the action to operate on items in the Java Package Explorer view which contains Java classes are not files but are adaptable to files.
Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.selectionChanged(IAction, ISelection)

setActivePart

public void setActivePart(org.eclipse.jface.action.IAction action,
                          org.eclipse.ui.IWorkbenchPart tgtPart)
Specified by:
setActivePart in interface org.eclipse.ui.IObjectActionDelegate
See Also:
IObjectActionDelegate.setActivePart(IAction, IWorkbenchPart)