FileDocCategorySizeDatePackage
NewXmlFileWizardAction.javaAPI DocAndroid 1.5 API2100Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.adt.wizards.actions

NewXmlFileWizardAction

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

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

        if (mSelection instanceof IStructuredSelection) {
            IStructuredSelection selection = (IStructuredSelection)mSelection;

            // call the new xml file wizard on the current selection.
            NewXmlFileWizard wizard = new NewXmlFileWizard();
            wizard.init(mWorkbench, selection);
            WizardDialog dialog = new WizardDialog(mWorkbench.getDisplay().getActiveShell(),
                    wizard);
            dialog.open();
        }
    
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)

        mWorkbench = targetPart.getSite().getWorkbenchWindow().getWorkbench();