Java 类org.eclipse.jface.wizard.WizardDialog 实例源码

项目:cft    文件:ServiceToApplicationsBindingAction.java   
@Override
public void run() {
    UIJob uiJob = new UIJob(Messages.MANAGE_SERVICES_TO_APPLICATIONS_TITLE) {
        public IStatus runInUIThread(IProgressMonitor monitor) {
            try {
                if (serverBehaviour != null) {
                    ServiceToApplicationsBindingWizard wizard = new ServiceToApplicationsBindingWizard(
                            servicesHandler, serverBehaviour.getCloudFoundryServer(), editorPage);
                    WizardDialog dialog = new WizardDialog(editorPage.getSite().getShell(), wizard);
                    dialog.open();
                }
            }
            catch (CoreException e) {
                if (Logger.ERROR) {
                    Logger.println(Logger.ERROR_LEVEL, this, "runInUIThread", "Error launching wizard", e); //$NON-NLS-1$ //$NON-NLS-2$
                }
            }

            return Status.OK_STATUS;
        }

    };
    uiJob.setSystem(true);
    uiJob.setPriority(Job.INTERACTIVE);
    uiJob.schedule();
}
项目:dockerfoundry    文件:ServiceToApplicationsBindingAction.java   
@Override
public void run() {
    UIJob uiJob = new UIJob(Messages.MANAGE_SERVICES_TO_APPLICATIONS_TITLE) {
        public IStatus runInUIThread(IProgressMonitor monitor) {
            try {
                if (serverBehaviour != null) {
                    ServiceToApplicationsBindingWizard wizard = new ServiceToApplicationsBindingWizard(
                            servicesHandler, serverBehaviour.getCloudFoundryServer(), editorPage);
                    WizardDialog dialog = new WizardDialog(editorPage.getSite().getShell(), wizard);
                    dialog.open();
                }
            }
            catch (CoreException e) {
                if (Logger.ERROR) {
                    Logger.println(Logger.ERROR_LEVEL, this, "runInUIThread", "Error launching wizard", e); //$NON-NLS-1$ //$NON-NLS-2$
                }
            }

            return Status.OK_STATUS;
        }

    };
    uiJob.setSystem(true);
    uiJob.setPriority(Job.INTERACTIVE);
    uiJob.schedule();
}
项目:n4js    文件:WorkingSetConfigurationDialog.java   
private void createWorkingSet() {
    if (manager instanceof MutableWorkingSetManager) {

        final WorkingSetNewWizard wizard = ((MutableWorkingSetManager) manager).createNewWizard();
        // set allWorkingSets according to dialog to use it as a base for validation
        wizard.setAllWorkingSets(allWorkingSets);

        final WizardDialog dialog = new WizardDialog(getShell(), wizard);
        if (dialog.open() == Window.OK) {
            final WorkingSet workingSet = wizard.getWorkingSet().orNull();
            if (workingSet != null) {
                diffBuilder.add(workingSet);
                getShell().getDisplay().asyncExec(new Runnable() {

                    @Override
                    public void run() {
                        allWorkingSets.add(workingSet);
                        tableViewer.add(workingSet);
                        tableViewer.setChecked(workingSet, true);
                    }

                });
            }
        }
    }
}
项目:convertigo-eclipse    文件:ProjectExplorerImportAction.java   
@Override
public void run(IAction action) {
    Display display = Display.getDefault();
    Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);       

    Shell shell = getParentShell();
    shell.setCursor(waitCursor);

       try {
        ImportWizard importWizard = new ImportWizard();
        importWizard.setWindowTitle("Convertigo project import Wizard");
        WizardDialog wzdlg = new WizardDialog(shell, importWizard);
        wzdlg.open();
       }
       catch (Throwable e) {
        ConvertigoPlugin.logException(e, "Unable to import project!");
       }
       finally {
        shell.setCursor(null);
        waitCursor.dispose();
       }
}
项目:convertigo-eclipse    文件:SetupAction.java   
public static boolean runSetup() {
    Display display = Display.getDefault();
    WizardDialog wizardDialog = new WizardDialog(display.getActiveShell(), new SetupWizard()) {

        @Override
        protected void configureShell(Shell shell) {
            super.configureShell(shell);
            shell.setSize(730, 700);
            setReturnCode(WizardDialog.CANCEL);
        }

    };

    int ret = wizardDialog.open(); 

    return ret == WizardDialog.OK;
}
项目:convertigo-eclipse    文件:HtmlConnectorDesignComposite.java   
public void createCriteriasFromSelection(Document dom) throws EngineException {
    String className = "com.twinsoft.convertigo.beans.core.Criteria";

    // Retrieve selected criterias xpath
    String criteriaXpath = xpathEvaluator.getSelectionXpath();

    // Retrieve parent ScreenClass
    HtmlScreenClass parentObject = getParentHtmlScreenClass();

    NewObjectWizard newObjectWizard = new NewObjectWizard(parentObject, className, criteriaXpath, dom);
    WizardDialog wzdlg = new WizardDialog(Display.getCurrent().getActiveShell(), newObjectWizard);
    wzdlg.setPageSize(850, 650);
    wzdlg.open();
    if (wzdlg.getReturnCode() != Window.CANCEL) {
        Criteria criteria = (Criteria)newObjectWizard.newBean;

        // Reload parent ScreenClass in Tree
        fireObjectChanged(new CompositeEvent(parentObject));

        // Set selection on last created criteria (will expand tree to new criteria)
        if (criteria != null) fireObjectSelected(new CompositeEvent(criteria));

        // Set back selection on parent ScreenClass
        fireObjectSelected(new CompositeEvent(parentObject));
    }
}
项目:Open_Source_ECOA_Toolset_AS5    文件:ServicesWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:CompDefWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:InitAssmblWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:LogicalSysWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:CompImplWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:FinalAssmblWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:DeployWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:Open_Source_ECOA_Toolset_AS5    文件:TypesWizardCommand.java   
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(ID);
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(ID);
    }
    if (descriptor == null) {
        descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(ID);
    }
    try {
        if (descriptor != null) {
            IWizard wizard = descriptor.createWizard();
            WizardDialog wd = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
            wd.setTitle(wizard.getWindowTitle());
            wd.open();
        }
    } catch (CoreException e) {
        e.printStackTrace();
    }
    return null;
}
项目:gw4e.project    文件:RunAsManualWizard.java   
public static void open(String modelPath, ModelData[] additionalModels, String generatorstopcondition,
        String startnode, boolean removeBlockedElements, boolean omitEgdeswithoutDescription) {
    try {
        Display.getDefault().asyncExec(() -> {
            RunAsManualWizard wizard = new RunAsManualWizard(modelPath, additionalModels, generatorstopcondition,
                    startnode, removeBlockedElements, omitEgdeswithoutDescription);
            wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection) null);
            Shell activeShell = Display.getDefault().getActiveShell();
            if (activeShell == null)
                return;
            WizardDialog dialog = new WizardDialog(activeShell, wizard);
            dialog.open();
        });
    } catch (Exception e) {
        ResourceManager.logException(e);
    }
}
项目:gw4e.project    文件:ConvertToHandler.java   
public Object execute(ExecutionEvent event) throws ExecutionException {

        ISelection sel = HandlerUtil.getCurrentSelection(event);
        if (sel.isEmpty())
            return null;
        if (!(sel instanceof IStructuredSelection))
            return null;
        Object obj = ((IStructuredSelection) sel).getFirstElement();
        if (!(obj instanceof IFile))
            return null;

        try {
            ConvertToFileCreationWizard wizard = new ConvertToFileCreationWizard( );
            wizard.init(PlatformUI.getWorkbench(), (IStructuredSelection)sel);
            Shell activeShell = HandlerUtil.getActiveShell(event);
            if (activeShell==null) return null;
            WizardDialog dialog = new WizardDialog(activeShell,wizard);
            dialog.open();
        } catch (Exception e) {
            ResourceManager.logException(e);
        }

        return null;
    }
项目:Hydrograph    文件:SubJobUtility.java   
/**
 * Open sub graph save dialog.
 * 
 * @return the i file
 */
public IFile openSubJobSaveDialog() {
    IFile iFile = null;
    IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(Messages.JOB_WIZARD_ID);
    if (descriptor != null) {
        IWizard wizard = null;
        try {
            wizard = descriptor.createWizard();
        } catch (CoreException coreException) {
            logger.error("Error while opening create job wizard", coreException);
        }
        WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
        wizardDialog.setTitle(wizard.getWindowTitle());
        wizardDialog.open();
        JobCreationPage jobCreationPage = (JobCreationPage) wizardDialog.getSelectedPage();
        iFile = jobCreationPage.getNewFile();
    }
    return iFile;
}
项目:time4sys    文件:NewTime4SysModel.java   
public Object execute(ExecutionEvent event) throws ExecutionException {

        final INewWizard wizard = new NewModelWizard();

        // Initialize the selection
        final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        final ISelectionService service = window.getSelectionService();
        final IStructuredSelection selection = (IStructuredSelection)service
                .getSelection("org.eclipse.sirius.ui.tools.views.model.explorer"); //$NON-NLS-1$
        wizard.init(PlatformUI.getWorkbench(), selection);

        // Open the new model wizard
        final WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
        dialog.open();
        return null;
    }
项目:java-builders-generator    文件:GenerateBuildersHandler.java   
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {

    final IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
    final ICompilationUnit icu = JavaUI.getWorkingCopyManager().getWorkingCopy(editorPart.getEditorInput());

    try {
        final IType type = icu.getTypes()[0];
        final List<Field> fields = new ArrayList<>();
        for (final IField field : type.getFields()) {
            final String fieldName = field.getElementName();
            final String fieldType = Signature.getSignatureSimpleName(field.getTypeSignature());
            fields.add(new Field(fieldName, fieldType));
        }

        new WizardDialog(HandlerUtil.getActiveShell(event), new BuilderGeneratorWizard(icu, fields)).open();

    }
    catch (final JavaModelException e) {
        e.printStackTrace();
    }

    return null;
}
项目:team-explorer-everywhere    文件:AddTask.java   
@Override
public IStatus run() {
    final AddFilesWizard wizard = new AddFilesWizard(startingBrowseLocalPath, startingBrowseServerPath);

    final WizardDialog dialog = new WizardDialog(getShell(), wizard);

    if (dialog.open() != IDialogConstants.OK_ID) {
        return Status.CANCEL_STATUS;
    }

    final String[] addPaths = wizard.getLocalPaths();
    if (addPaths.length == 0) {
        return Status.OK_STATUS;
    }

    final AddCommand command = new AddCommand(repository, addPaths);

    return getCommandExecutor().execute(command);
}
项目:team-explorer-everywhere    文件:ConnectHelpers.java   
public static void connectToServer(final Shell shell) {
    final TFSProductPlugin plugin = TFSCommonUIClientPlugin.getDefault().getProductPlugin();
    final ITeamProjectWizard wizard = plugin.getTeamProjectWizard();
    final WizardDialog dialog = new WizardDialog(shell, wizard);

    if (dialog.open() == IDialogConstants.OK_ID) {
        final TFSServer defaultServer = plugin.getServerManager().getDefaultServer();
        final TFSRepository[] repositories = plugin.getRepositoryManager().getRepositories();

        if (defaultServer != null) {
            defaultServer.refresh(true);
        }

        for (int i = 0; i < repositories.length; i++) {
            repositories[i].getPendingChangeCache().refresh();
        }
    }
}
项目:team-explorer-everywhere    文件:TfsBuildDefinitionDialog.java   
@Override
protected SelectionListener getCreateButtonSelectionListener(final Shell shell) {
    return new SelectionAdapter() {
        @Override
        public void widgetSelected(final SelectionEvent e) {
            final CreateBuildConfigurationWizard wizard = new CreateBuildConfigurationWizard();

            // update the build definition to contain values as
            // currently defined, that way
            // information inside is available in the creation wizard.
            updateAndVerifyBuildDefinition(true);

            wizard.init(buildDefinition);

            final WizardDialog dialog = new WizardDialog(getShell(), wizard);
            final int rc = dialog.open();

            if (rc == IDialogConstants.OK_ID) {
                checkForBuildFileExistence(true);
                validate();
            }
        }
    };
}
项目:team-explorer-everywhere    文件:TeamExplorerGitRepositoriesSection.java   
@Override
public void run() {
    try {
        if (!GitHelpers.isEGitInstalled(true)) {
            final String errorMessage =
                Messages.getString("TeamExplorerGitWizardNavigationLink.EGitMissingErrorMessageText"); //$NON-NLS-1$
            final String title =
                Messages.getString("TeamExplorerGitWizardNavigationLink.EGitMissingErrorMessageTitle"); //$NON-NLS-1$

            log.error("Cannot import from a Git Repository. EGit plugin is required for this action."); //$NON-NLS-1$
            MessageDialog.openError(treeViewer.getControl().getShell(), title, errorMessage);
            return;
        }

        // open Git import wizard
        final GitImportWizard wizard = new GitImportWizard(serverItems);
        wizard.init(PlatformUI.getWorkbench(), null);
        final WizardDialog dialog = new WizardDialog(treeViewer.getControl().getShell(), wizard);
        dialog.open();
    } catch (final Exception e) {
        log.error("", e); //$NON-NLS-1$
    }
}
项目:team-explorer-everywhere    文件:ProjectManagerUIDataProvider.java   
@Override
public TFSTeamProjectCollection promptForConnection(final IProject project) {
    Check.notNull(project, "project"); //$NON-NLS-1$

    final Shell parentShell = ShellUtils.getWorkbenchShell();

    final EclipseConnectErrorWizard connectWizard = new EclipseConnectErrorWizard();

    final String messageFormat =
        Messages.getString("ProjectManagerUiDataProvider.WorkspaceNotLocatedDialogTextFormat"); //$NON-NLS-1$
    final String message = MessageFormat.format(messageFormat, project.getName());
    connectWizard.setErrorMessage(message);

    final WizardDialog connectDialog = new WizardDialog(parentShell, connectWizard);

    if (UIHelpers.openOnUIThread(connectDialog) != IDialogConstants.OK_ID) {
        return null;
    }

    if (connectWizard.hasPageData(TFSTeamProjectCollection.class)) {
        return (TFSTeamProjectCollection) connectWizard.getPageData(TFSTeamProjectCollection.class);
    }

    return null;
}
项目:team-explorer-everywhere    文件:ProjectManagerUIDataProvider.java   
/**
 * Given a profile and a failure that occurred when connecting it, will
 * prompt the user to update the details. Uses extension points to find a
 * contributor who can provide profile details (normally the UI Plug-in.)
 *
 * @param profile
 *        The profile that failed
 * @param failure
 *        The failure that occurred
 * @return The profile to connect with, or null if the user canceled.
 * @param cachedWorkspace
 *        The CachedWorkspace with a null or incomplete profile
 * @return A Profile to connect this CachedWorkspace, or null if none could
 *         be obtained or the user canceled.
 */
@Override
public TFSTeamProjectCollection promptForConnection(
    final URI serverURI,
    final Credentials credentials,
    final String errorMessage) {
    Check.notNull(errorMessage, "errorMessage"); //$NON-NLS-1$

    final Shell parentShell = ShellUtils.getWorkbenchShell();

    final EclipseConnectErrorWizard connectWizard = new EclipseConnectErrorWizard();
    connectWizard.setErrorMessage(errorMessage);

    final WizardDialog connectDialog = new WizardDialog(parentShell, connectWizard);

    if (UIHelpers.openOnUIThread(connectDialog) != IDialogConstants.OK_ID) {
        return null;
    }

    if (connectWizard.hasPageData(TFSTeamProjectCollection.class)) {
        return (TFSTeamProjectCollection) connectWizard.getPageData(TFSTeamProjectCollection.class);
    }

    return null;
}
项目:team-explorer-everywhere    文件:TFSEclipseClientUILicenseChecker.java   
@Override
public boolean isLicensed() {
    final Display display = Display.getDefault();

    if (display == null) {
        return super.isLicensed();
    }

    UIHelpers.runOnUIThread(false, new Runnable() {
        @Override
        public void run() {
            if (TFSEclipseClientUILicenseChecker.needsPrompt()) {
                final EULAWizard eulaWizard = new EULAWizard();
                final WizardDialog eulaWizardDialog = new WizardDialog(ShellUtils.getWorkbenchShell(), eulaWizard);

                eulaWizardDialog.open();
            }
        }
    });

    /* Retest EULA and product key */
    return super.isLicensed();
}
项目:team-explorer-everywhere    文件:ImportFolderAction.java   
@Override
public void doRun(final IAction action) {
    if (items == null) {
        return;
    }

    final TfsImportWizard importWizard = new TfsImportWizard();

    // Add current selected folders as selection.
    final String[] importFolders = new String[items.length];
    for (int i = 0; i < importFolders.length; i++) {
        importFolders[i] = items[i].getFullPath();
    }
    importWizard.setImportFolders(importFolders);

    importWizard.init(getWorkbenchWindow().getWorkbench(), null);

    final WizardDialog dialog = new WizardDialog(getShell(), importWizard);
    dialog.open();
}
项目:subclipse    文件:BranchTagAction.java   
protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
    if (action != null && !action.isEnabled()) { 
        action.setEnabled(true);
    } 
    else {
     IResource[] resources = getSelectedResources();
        BranchTagWizard wizard = new BranchTagWizard(resources);
        SizePersistedWizardDialog dialog = new SizePersistedWizardDialog(getShell(), wizard, "BranchTag"); //$NON-NLS-1$
        wizard.setParentDialog(dialog);
        if (dialog.open() == WizardDialog.OK) { 
            SVNUrl[] sourceUrls = wizard.getUrls();
            SVNUrl destinationUrl = wizard.getToUrl();
            String message = wizard.getComment();
            boolean createOnServer = wizard.isCreateOnServer();
         BranchTagOperation branchTagOperation = new BranchTagOperation(getTargetPart(), getSelectedResources(), sourceUrls, destinationUrl, createOnServer, wizard.getRevision(), message);
         branchTagOperation.setMakeParents(wizard.isMakeParents());
         branchTagOperation.setMultipleTransactions(wizard.isSameStructure());
         branchTagOperation.setNewAlias(wizard.getNewAlias());
         branchTagOperation.switchAfterTagBranchOperation(wizard.isSwitchAfterBranchTag());
         branchTagOperation.setSvnExternals(wizard.getSvnExternals());
         branchTagOperation.run();              
        }
    }
}
项目:subclipse    文件:ResolveTreeConflictWizard.java   
public void partClosed(IWorkbenchPartReference partRef) {
    IWorkbenchPart part = partRef.getPart(false);
    if (part instanceof CompareEditor) {
        CompareEditor editor = (CompareEditor)part;
        IEditorInput input = editor.getEditorInput();
        String name = input.getName();
        if (name != null && name.startsWith(compareName)) {
            targetPart.getSite().getPage().removePartListener(this);
            if (MessageDialog.openQuestion(getShell(), Messages.ResolveTreeConflictWizard_editorClosed, Messages.ResolveTreeConflictWizard_promptToReolve + treeConflict.getResource().getName() + "?")) { //$NON-NLS-1$
                ResolveTreeConflictWizard wizard = new ResolveTreeConflictWizard(treeConflict, targetPart);
                WizardDialog dialog = new SizePersistedWizardDialog(Display.getDefault().getActiveShell(), wizard, "ResolveTreeConflict"); //$NON-NLS-1$
                dialog.open();
            }
        }
    }
}
项目:tlaplus    文件:TraceExplorerComposite.java   
/**
 * Opens a dialog for formula processing and returns the edited formula  
 * @param formula initial formula, can be <code>null</code>
 * @return result of editing or <code>null</code>, if editing canceled
 */
protected Formula doEditFormula(Formula formula)
{
    // Create the wizard
    FormulaWizard wizard = new FormulaWizard(section.getText(), section.getDescription());
    wizard.setFormula(formula);

    // Create the wizard dialog
    WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
    dialog.setHelpAvailable(true);

    // Open the wizard dialog
    if (Window.OK == dialog.open())
    {
        return wizard.getFormula();
    } else
    {
        return null;
    }
}
项目:tlaplus    文件:ValidateableConstantSectionPart.java   
protected Assignment doEditFormula(Assignment formula) // gets called when editing a constant and ...
{
    Assert.isNotNull(formula);

    // Create the wizard
    AssignmentWizard wizard = new AssignmentWizard(getSection().getText(), getSection().getDescription(),
            (Assignment) formula, AssignmentWizard.SHOW_OPTION, AssignmentWizardPage.CONSTANT_WIZARD_ID);
    // Create the wizard dialog
    WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
    wizard.setWizardDialog(dialog);
    dialog.setHelpAvailable(true);

    // Open the wizard dialog
    if (Window.OK == dialog.open())
    {
        return wizard.getFormula();
    } else
    {
        return null;  // We get here if the user cancels.
    }
}
项目:tlaplus    文件:ValidateableTableSectionPart.java   
/**
 * Opens a dialog for formula processing and returns the edited formula  
 * @param formula initial formula, can be <code>null</code>
 * @return result of editing or <code>null</code>, if editing canceled
 */
protected Formula doEditFormula(Formula formula)
{
    // Create the wizard
    FormulaWizard wizard = new FormulaWizard(getSection().getText(), getSection().getDescription());
    wizard.setFormula(formula);

    // Create the wizard dialog
    WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard);
    dialog.setHelpAvailable(true);

    // Open the wizard dialog
    if (Window.OK == dialog.open())
    {
        return wizard.getFormula();
    } else
    {
        return null;
    }
}
项目:hadoop-EAR    文件:NewLocationAction.java   
@Override
public void run() {
  WizardDialog dialog = new WizardDialog(null, new Wizard() {
    private HadoopLocationWizard page = new HadoopLocationWizard();

    @Override
    public void addPages() {
      super.addPages();
      setWindowTitle("New Hadoop location...");
      addPage(page);
    }

    @Override
    public boolean performFinish() {
      page.performFinish();
      return true;
    }

  });

  dialog.create();
  dialog.setBlockOnOpen(true);
  dialog.open();

  super.run();
}
项目:cft    文件:CloneServerCommand.java   
public void doRun(final CloudFoundryServer cloudServer) {
    final Shell shell = activePart != null && activePart.getSite() != null ? activePart.getSite().getShell()
            : CFUiUtil.getShell();

    if (shell != null) {
        UIJob job = new UIJob(getJobName()) {

            public IStatus runInUIThread(IProgressMonitor monitor) {
                OrgsAndSpacesWizard wizard = new OrgsAndSpacesWizard(cloudServer);
                WizardDialog dialog = new WizardDialog(shell, wizard);
                dialog.open();

                return Status.OK_STATUS;
            }
        };
        job.setSystem(true);
        job.schedule();
    }
    else {
        CloudFoundryPlugin.logError("Unable to find an active shell to open the orgs and spaces wizard."); //$NON-NLS-1$
    }

}
项目:cft    文件:CloudFoundryUiCallback.java   
@Override
public void getCredentials(final CloudFoundryServer server) {
    Display.getDefault().syncExec(new Runnable() {

        public void run() {
            CloudFoundryCredentialsWizard wizard = new CloudFoundryCredentialsWizard(server);
            WizardDialog dialog = new WizardDialog(
                    PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(), wizard);
            dialog.open();
        }
    });

    if (server.getUsername() == null || server.getUsername().length() == 0 || server.getPassword() == null
            || server.getPassword().length() == 0 || server.getUrl() == null || server.getUrl().length() == 0) {
        throw new OperationCanceledException();
    }
}
项目:cft    文件:CloudFoundryUiCallback.java   
@Override
public void deleteServices(final List<String> services, final CloudFoundryServer cloudServer) {
    if (services == null || services.isEmpty()) {
        return;
    }

    Display.getDefault().syncExec(new Runnable() {

        public void run() {
            DeleteServicesWizard wizard = new DeleteServicesWizard(cloudServer, services);
            WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
            dialog.open();
        }

    });
}
项目:synergyview    文件:ExportAnnotationForCollectionHandler.java   
public Object execute(ExecutionEvent event) throws ExecutionException {
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (!(selection instanceof IStructuredSelection)) {
    return null;
}
IStructuredSelection structSel = (IStructuredSelection) selection;
Object element = structSel.iterator().next();

if (element instanceof CollectionNode) {
    CollectionNode collectionNode = (CollectionNode) element;
    WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(), new ExportCollectionAnnotationWizard(collectionNode));
    dialog.open();
    return null;
} else {
    return null;
}
   }
项目:cft    文件:CloudFoundryAccountSection.java   
protected void createCloneServerArea(Composite parent, FormToolkit toolkit) {
    final Button changeSpaceButton = toolkit.createButton(parent,
            Messages.CloudFoundryAccountSection_BUTTON_CLONE_SERVER, SWT.PUSH);

    changeSpaceButton.setEnabled(true);

    changeSpaceButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
    changeSpaceButton.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {

            OrgsAndSpacesWizard wizard = new OrgsAndSpacesWizard(cfServer);

            WizardDialog dialog = new WizardDialog(getShell(), wizard);
            dialog.open();

        }
    });
}
项目:PDFReporter-Studio    文件:ExpressionListFieldEditor.java   
@Override
protected String getNewInputObject() {
    if(!ExpressionEditorSupportUtil.isExpressionEditorDialogOpen()) {
        JRExpressionEditor wizard = new JRExpressionEditor();
        WizardDialog dialog = 
                ExpressionEditorSupportUtil.getExpressionEditorWizardDialog(getShell(),wizard);
        if (dialog.open() == Dialog.OK) {
            JRDesignExpression newExp = wizard.getValue();
            if(newExp!=null &&
                    !Misc.nvl(newExp.getText()).equals("")){
                return newExp.getText();
            }
        }
    }
    return null;
}
项目:bts    文件:ApplicationStartupControllerImpl.java   
protected boolean openInstallationWizard() {
    InstallationWizard installWizard = new InstallationWizard(context,
            ApplicationStartupControllerImpl.this, sync, userController);
    WizardDialog dialog = new WizardDialog(new Shell(SWT.NO_TRIM
            | SWT.ON_TOP), installWizard);
    if (dialog.open() == dialog.OK) {
        logger.info("InstallationWizard returned OK");
        localDBUrl = installWizard.getLocalDBUrl();
        context.set(BTSPluginIDs.PREF_LOCAL_DB_URL, localDBUrl);
    } else {
        logger.info("InstallationWizard canceled");
        return false;
    }
    if (installWizard.isLocalProject()) {
        initialProjectCreation();
        return true;
    }

    return true;
}