org.eclipse.corona.container.project.ui.explorer.actions
Class OpenPCXActionDelegate

java.lang.Object
  extended by org.eclipse.corona.container.project.ui.explorer.actions.AbstractPCXActionDelegate
      extended by org.eclipse.corona.container.project.ui.explorer.actions.OpenPCXActionDelegate
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate, org.eclipse.ui.IViewActionDelegate

public class OpenPCXActionDelegate
extends AbstractPCXActionDelegate
implements org.eclipse.ui.IViewActionDelegate, org.eclipse.ui.IObjectActionDelegate

Action delegate for open ui action invoked on project container or a resource associated with a workbench project. The action reads through the selection of PCX and opens projects if closed.

Author:
cwpl-pkaczmar

Field Summary
protected  org.eclipse.ui.IViewPart view
           
 
Fields inherited from class org.eclipse.corona.container.project.ui.explorer.actions.AbstractPCXActionDelegate
logService, manager, selection
 
Constructor Summary
OpenPCXActionDelegate()
           
 
Method Summary
 void init(org.eclipse.ui.IViewPart view)
           
 void run(org.eclipse.jface.action.IAction action)
          Opens project container or repository.
static void run(org.eclipse.jface.viewers.ISelection selection, org.eclipse.ui.IViewPart view)
           
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          Enables or disables open action depending on the status of project contaier and repository in workbench.
 void setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)
           
 
Methods inherited from class org.eclipse.corona.container.project.ui.explorer.actions.AbstractPCXActionDelegate
getUIRepositoryAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

protected org.eclipse.ui.IViewPart view
Constructor Detail

OpenPCXActionDelegate

public OpenPCXActionDelegate()
Method Detail

init

public void init(org.eclipse.ui.IViewPart view)
Specified by:
init in interface org.eclipse.ui.IViewActionDelegate

run

public void run(org.eclipse.jface.action.IAction action)
Opens project container or repository. If called on project container stub, the method attempts to open corresponding project container giving member name. If openForMember fails, simple open is invoked. For repositories, repository adapter searched and invoked to perform the open operation.

Specified by:
run in interface org.eclipse.ui.IActionDelegate

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Enables or disables open action depending on the status of project contaier and repository in workbench. Repository adapter is used to check repository status.

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate

run

public static void run(org.eclipse.jface.viewers.ISelection selection,
                       org.eclipse.ui.IViewPart view)

setActivePart

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

Copyright 2006 IBM Corporation and others.
All Rights Reserved.