// ============================================================================ // // Copyright (C) 2006-2016 Talend Inc. - www.talend.com // // This source code is available under agreement available at // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt // // You should have received a copy of the agreement // along with this program; if not, write to Talend SA // 9 rue Pages 92150 Suresnes, France // // ============================================================================ package org.talend.dataprofiler.core.ui.imex.action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.talend.dataprofiler.core.ImageLib; import org.talend.dataprofiler.core.i18n.internal.DefaultMessagesImpl; import org.talend.dataprofiler.core.ui.imex.ExportWizard; import org.talend.repository.ui.actions.AContextualAction; /** * DOC bZhou class global comment. Detailled comment */ public class ExportItemAction extends AContextualAction implements IWorkbenchWindowActionDelegate { public ExportItemAction() { setText(DefaultMessagesImpl.getString("ExportItemAction.exportItems")); //$NON-NLS-1$ setImageDescriptor(ImageLib.getImageDescriptor(ImageLib.EXPORT)); } /* * (non-Javadoc) * * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */ public void dispose() { // TODO Auto-generated method stub } /* * (non-Javadoc) * * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ public void init(IWorkbenchWindow window) { // TODO Auto-generated method stub } /* * (non-Javadoc) * * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ public void run(IAction action) { ExportWizard wizard = new ExportWizard(); WizardDialog dialog = new WizardDialog(null, wizard); dialog.setPageSize(620, 500); dialog.open(); } /* * (non-Javadoc) * * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, * org.eclipse.jface.viewers.ISelection) */ public void selectionChanged(IAction action, ISelection selection) { // TODO Auto-generated method stub } /* * (non-Javadoc) * * @see org.talend.commons.ui.swt.actions.ITreeContextualAction#init(org.eclipse.jface.viewers.TreeViewer, * org.eclipse.jface.viewers.IStructuredSelection) */ public void init(TreeViewer viewer, IStructuredSelection selection) { // TODO Auto-generated method stub } /* * (non-Javadoc) * * @see org.talend.repository.ui.actions.AContextualAction#doRun() */ @Override protected void doRun() { run(this); } }