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

java.lang.Object
  extended by org.eclipse.ui.actions.ActionDelegate
      extended by com.telelogic.synergy.integration.ui.teamaction.CCMAction
          extended by com.telelogic.integration.eclipse.guide.taskbar.QueryProject
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IActionDelegate2, org.eclipse.ui.IObjectActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate

public class QueryProject
extends com.telelogic.synergy.integration.ui.teamaction.CCMAction
implements org.eclipse.ui.IWorkbenchWindowActionDelegate

Opens a new window that allows the user to input a query to open projects that match this query.

Queries must be of proper syntax as given in the example presented in the window. All projects that match this query will be opened without confirmation if they are not already in working state.

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.


Field Summary
 
Fields inherited from class com.telelogic.synergy.integration.ui.teamaction.CCMAction
PROGRESS_BUSYCURSOR, PROGRESS_DIALOG
 
Constructor Summary
QueryProject()
          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.
 
Methods inherited from class com.telelogic.synergy.integration.ui.teamaction.CCMAction
setActivePart
 
Methods inherited from class org.eclipse.ui.actions.ActionDelegate
init, runWithEvent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProject

public QueryProject()
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 org.eclipse.ui.actions.ActionDelegate
See Also:

This run method runs the query and opens each project that is returned as a result.


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.teamaction.CCMAction
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.IActionDelegate2
Specified by:
dispose in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
Overrides:
dispose in class org.eclipse.ui.actions.ActionDelegate
See Also:
IWorkbenchWindowActionDelegate.dispose()

init

public void init(org.eclipse.ui.IWorkbenchWindow window)
Specified by:
init in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
See Also:
IWorkbenchWindowActionDelegate.init(org.eclipse.ui.IWorkbenchWindow)