com.telelogic.integration.eclipse.guide.taskbar
Class FastUndoCheckOut

java.lang.Object
  extended by com.telelogic.synergy.integration.ui.toolbar.SelectedResourceAction
      extended by com.telelogic.integration.eclipse.guide.taskbar.FastUndoCheckOut
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate

public class FastUndoCheckOut
extends com.telelogic.synergy.integration.ui.toolbar.SelectedResourceAction

Provides functionality to perform an undo checkout operation without confirmation on selected Synergy files in the Navigator view.

Our sample action implements workbench action delegate. The action proxy will be created by the workbench and shown in the UI. When the user tries to use the action, this delegate will be created and execution will be delegated to it.

See Also:

You may copy, modify, and distribute these samples, or their modifications, in any form, internally or as part of your application or related documentation. These samples have not been tested under all conditions and are provided to you by IBM without obligation of support of any kind. IBM PROVIDES THESE SAMPLES "AS IS", SUBJECT TO ANY STATUTORY WARRANTIES THAT CANNOT BE EXCLUDED. IBM MAKES NO WARRANTIES OR CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT REGARDING THESE SAMPLES OR TECHNICAL SUPPORT, IF ANY.


Constructor Summary
FastUndoCheckOut()
          The constructor.
 
Method Summary
 void dispose()
          We can use this method to dispose of any system resources we previously allocated.
 void init(org.eclipse.ui.IWorkbenchWindow window)
           
 void run(org.eclipse.jface.action.IAction action)
          The action has been activated.
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          Selection in the workbench has been changed.
 java.lang.String UndoCheckout(java.lang.String _connectionName, java.lang.String fileset, java.lang.String comments, org.eclipse.core.runtime.IProgressMonitor monitor)
          This function undoes the check out of selected resources.
 
Methods inherited from class com.telelogic.synergy.integration.ui.toolbar.SelectedResourceAction
getSelectedResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastUndoCheckOut

public FastUndoCheckOut()
The constructor.

Method Detail

run

public void run(org.eclipse.jface.action.IAction action)
The action has been activated. The argument of the method represents the 'real' action sitting in the workbench UI.

Specified by:
run in interface org.eclipse.ui.IActionDelegate
Overrides:
run in class com.telelogic.synergy.integration.ui.toolbar.SelectedResourceAction
See Also:
IActionDelegate.run(org.eclipse.jface.action.IAction)

UndoCheckout

public java.lang.String UndoCheckout(java.lang.String _connectionName,
                                     java.lang.String fileset,
                                     java.lang.String comments,
                                     org.eclipse.core.runtime.IProgressMonitor monitor)
This function undoes the check out of selected resources. We can change the state of the 'real' action here if we want, but this can only happen after the delegate has been created.

Parameters:
_connectionName - Connection Name of the database connection. If null or empty, operation will be aborted.
fileset - Full path of the file on the local system to perform an undo checkout operation on.
comments - Any comments associated with the undo checkout of the file. This is set to be null by default.
monitor - An instance of IProgressMonitor.
Returns:
Returns result of operation as a string.
See Also:
IActionDelegate.selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Selection in the workbench has been changed. We can change the state of the 'real' action here if we want, but this can only happen after the delegate has been created.

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate
Overrides:
selectionChanged in class com.telelogic.synergy.integration.ui.toolbar.SelectedResourceAction
See Also:
IActionDelegate.selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)

dispose

public void dispose()
We can use this method to dispose of any system resources we previously allocated.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
Overrides:
dispose in class com.telelogic.synergy.integration.ui.toolbar.SelectedResourceAction
See Also:
IWorkbenchWindowActionDelegate.dispose()

init

public void init(org.eclipse.ui.IWorkbenchWindow window)
Specified by:
init in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
Overrides:
init in class com.telelogic.synergy.integration.ui.toolbar.SelectedResourceAction
See Also:
IWorkbenchWindowActionDelegate.init(org.eclipse.ui.IWorkbenchWindow)