FileDocCategorySizeDatePackage
ExportAction.javaAPI DocAndroid 1.5 API2320Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.adt.project

ExportAction

public class ExportAction extends Object implements org.eclipse.ui.IObjectActionDelegate

Fields Summary
private org.eclipse.jface.viewers.ISelection
mSelection
Constructors Summary
Methods Summary
public voidrun(org.eclipse.jface.action.IAction action)

        if (mSelection instanceof IStructuredSelection) {
            IStructuredSelection selection = (IStructuredSelection)mSelection;
            // get the unique selected item.
            if (selection.size() == 1) {
                Object element = selection.getFirstElement();

                // get the project object from it.
                IProject project = null;
                if (element instanceof IProject) {
                    project = (IProject) element;
                } else if (element instanceof IAdaptable) {
                    project = (IProject) ((IAdaptable) element).getAdapter(IProject.class);
                }

                // and finally do the action
                if (project != null) {
                    ExportHelper.exportProject(project);
                }
            }
        }
    
public voidselectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)

        this.mSelection = selection;
    
public voidsetActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)

see
IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)