Search in sources :

Example 31 with Wizard

use of org.eclipse.jface.wizard.Wizard in project tdq-studio-se by Talend.

the class EditFileDelimitedAction method run.

/*
     * (non-Jsdoc)
     * 
     * @see org.eclipse.jface.action.Action#run()
     */
@Override
public void run() {
    if (node != null) {
        Wizard wizard = new DelimitedFileWizard(PlatformUI.getWorkbench(), false, (RepositoryNode) node, null);
        WizardDialog dialog = new WizardDialog(null, wizard);
        if (Window.OK == dialog.open()) {
            CorePlugin.getDefault().refreshDQView(node);
        }
    }
}
Also used : DelimitedFileWizard(org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard) Wizard(org.eclipse.jface.wizard.Wizard) DelimitedFileWizard(org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 32 with Wizard

use of org.eclipse.jface.wizard.Wizard in project tdq-studio-se by Talend.

the class ExportParserRuleAction method run.

@Override
public void run() {
    Wizard wizard = isForExchange ? new ExportForExchangeWizard(WorkbenchUtils.getFolder((RepositoryNode) parserRuleFolder).getFullPath().toString()) : new ExportParserRuleWizard(parserRuleFolder, isForExchange);
    WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
    wizard.setWindowTitle(getText());
    if (WizardDialog.OK == dialog.open()) {
        try {
            IFolder folder = WorkbenchUtils.getFolder((RepositoryNode) parserRuleFolder);
            folder.refreshLocal(IResource.DEPTH_INFINITE, null);
        } catch (CoreException e) {
            log.error(e, e);
        }
    }
}
Also used : ExportParserRuleWizard(org.talend.dataprofiler.core.ui.wizard.parserrule.ExportParserRuleWizard) CoreException(org.eclipse.core.runtime.CoreException) ExportForExchangeWizard(org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard) Wizard(org.eclipse.jface.wizard.Wizard) ExportForExchangeWizard(org.talend.dataprofiler.core.ui.imex.ExportForExchangeWizard) ExportParserRuleWizard(org.talend.dataprofiler.core.ui.wizard.parserrule.ExportParserRuleWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) IFolder(org.eclipse.core.resources.IFolder)

Example 33 with Wizard

use of org.eclipse.jface.wizard.Wizard in project tdq-studio-se by Talend.

the class AnalyzeColumnCorrelationAction method openStandardAnalysisDialog.

private int openStandardAnalysisDialog(AnalysisType type) {
    AnalysisLabelParameter parameter = new AnalysisLabelParameter();
    checkSelectedColumn();
    if (hasNumberColumn && hasDateColumn) {
        // $NON-NLS-1$
        MessageUI.openError(DefaultMessagesImpl.getString("AnalyzeColumnCorrelationAction.InvalidOperation"));
        return Window.CANCEL;
    } else if (hasNumberColumn && !hasDateColumn) {
        parameter.setCategoryLabel(AnalysisLabelParameter.NUMBERIC_CORRELATION);
    } else if (!hasNumberColumn && hasDateColumn) {
        parameter.setCategoryLabel(AnalysisLabelParameter.DATE_CORRELATION);
    } else {
        parameter.setCategoryLabel(AnalysisLabelParameter.NOMINAL_CORRELATION);
    }
    Wizard wizard = WizardFactory.createAnalysisWizard(type, parameter);
    wizard.setForcePreviousAndNextButtons(true);
    WizardDialog dialog = new WizardDialog(null, wizard);
    dialog.setPageSize(500, 340);
    return dialog.open();
}
Also used : Wizard(org.eclipse.jface.wizard.Wizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) AnalysisLabelParameter(org.talend.dq.analysis.parameters.AnalysisLabelParameter)

Example 34 with Wizard

use of org.eclipse.jface.wizard.Wizard in project AutoRefactor by JnRouvignac.

the class ChooseRefactoringsWizardHandler method execute.

/**
 * Execute.
 *
 * @param event The event
 *
 * @return An object
 *
 * @throws ExecutionException ExecutionException
 */
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
    final Shell shell = HandlerUtil.getActiveShell(event);
    try {
        // Retrieve the targeted java element before the menu item is disposed by the
        // framework
        final Wizard wizard = new ChooseCleanupsWizard(AutoRefactorHandler.getSelectedJavaElements(event));
        final WizardDialog dialog = new WizardDialog(shell, wizard);
        dialog.open();
    } catch (final Exception e) {
        Display.getDefault().asyncExec(() -> {
            final StringWriter sw = new StringWriter();
            final PrintWriter pw = new PrintWriter(sw);
            e.printStackTrace(pw);
            // $NON-NLS-1$ //$NON-NLS-2$
            MessageDialog.openInformation(shell, "Info", "An error has occurred:\n\n" + sw);
        });
    }
    return null;
}
Also used : Shell(org.eclipse.swt.widgets.Shell) StringWriter(java.io.StringWriter) Wizard(org.eclipse.jface.wizard.Wizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) ExecutionException(org.eclipse.core.commands.ExecutionException) PrintWriter(java.io.PrintWriter)

Example 35 with Wizard

use of org.eclipse.jface.wizard.Wizard in project egit by eclipse.

the class CommitJob method pushUpstream.

private void pushUpstream(final RevCommit commit, final PushMode pushTo) {
    final RemoteConfig config = SimpleConfigurePushDialog.getConfiguredRemote(repository);
    if (pushTo == PushMode.GERRIT || config == null) {
        final Display display = PlatformUI.getWorkbench().getDisplay();
        display.asyncExec(new Runnable() {

            @Override
            public void run() {
                Wizard pushWizard = getPushWizard(commit, pushTo);
                if (pushWizard != null) {
                    WizardDialog wizardDialog = new WizardDialog(display.getActiveShell(), pushWizard);
                    wizardDialog.setHelpAvailable(true);
                    wizardDialog.open();
                }
            }
        });
    } else {
        PushOperationUI op = new PushOperationUI(repository, config.getName(), false);
        op.start();
    }
}
Also used : PushOperationUI(org.eclipse.egit.ui.internal.push.PushOperationUI) RemoteConfig(org.eclipse.jgit.transport.RemoteConfig) PushToGerritWizard(org.eclipse.egit.ui.internal.push.PushToGerritWizard) PushBranchWizard(org.eclipse.egit.ui.internal.push.PushBranchWizard) Wizard(org.eclipse.jface.wizard.Wizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) Display(org.eclipse.swt.widgets.Display)

Aggregations

Wizard (org.eclipse.jface.wizard.Wizard)40 WizardDialog (org.eclipse.jface.wizard.WizardDialog)34 InvocationTargetException (java.lang.reflect.InvocationTargetException)9 CoreException (org.eclipse.core.runtime.CoreException)7 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)7 IOException (java.io.IOException)6 IFile (org.eclipse.core.resources.IFile)6 Path (org.eclipse.core.runtime.Path)6 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)5 Shell (org.eclipse.swt.widgets.Shell)5 InvalidAlgorithmParameterException (de.flexiprovider.api.exceptions.InvalidAlgorithmParameterException)4 NoSuchAlgorithmException (de.flexiprovider.api.exceptions.NoSuchAlgorithmException)4 AlgorithmParameterSpec (de.flexiprovider.api.parameters.AlgorithmParameterSpec)4 ByteArrayInputStream (java.io.ByteArrayInputStream)4 IContainer (org.eclipse.core.resources.IContainer)4 IResource (org.eclipse.core.resources.IResource)4 ResourcesPlugin (org.eclipse.core.resources.ResourcesPlugin)4 MessageDialog (org.eclipse.jface.dialogs.MessageDialog)4 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)4 INewWizard (org.eclipse.ui.INewWizard)4