Examples of WizardDialog


Examples of org.eclipse.jface.wizard.WizardDialog

                @Override
                public IStatus runInUIThread(IProgressMonitor monitor) {
                    ResolutionResult result = job.getResolutionResult();
                    ResolutionWizard wizard = new ResolutionWizard(model, file, result);
                    if (result.getOutcome() != ResolutionResult.Outcome.Resolved /*|| !result.getResolve().getOptionalResources().isEmpty() */) {
                        WizardDialog dialog = new WizardDialog(shell, wizard);
                        if (dialog.open() != Window.OK) {
                            if (!wizard.performFinish()) {
                                MessageDialog.openError(shell, "Error", "Unable to store resolution results into Run Bundles list.");
                            }
                        }
                    } else {
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

    public void run(IAction action) {
        EmptyBndFileWizard wizard = new EmptyBndFileWizard();
        wizard.init(window.getWorkbench(), selection);

        WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
        dialog.open();
    }
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

        IFile targetResource = ResourceUtil.getFile(editor.getEditorInput());
        try {
            Project project = LaunchUtils.getBndProject(targetResource);

            RunExportSelectionWizard wizard = new RunExportSelectionWizard(configElems, model, project);
            WizardDialog dialog = new WizardDialog(parentShell, wizard);
            dialog.open();

        } catch (CoreException e) {
            ErrorDialog.openError(parentShell, "Error", null, new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error deriving Bnd project.", e));
        }
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

                            prefs.setHideWarningExternalFile(true);
                        }
                    }

                    AddFilesToRepositoryWizard wizard = new AddFilesToRepositoryWizard(null, files);
                    WizardDialog dialog = new WizardDialog(getSection().getShell(), wizard);
                    if (Window.OK == dialog.open()) {
                        List<Pair<String,String>> addingBundles = wizard.getSelectedBundles();
                        List<VersionedClause> addingClauses = new ArrayList<VersionedClause>(addingBundles.size());

                        for (Pair<String,String> addingBundle : addingBundles) {
                            Attrs attribs = new Attrs();
                            attribs.put(Constants.VERSION_ATTRIBUTE, addingBundle.getSecond());
                            addingClauses.add(new VersionedClause(addingBundle.getFirst(), attribs));
                        }

                        handleAdd(addingClauses);
                    }
                    return true;
                }
                return false;
            }

            private boolean handleSelectionDrop() {
                ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
                if (selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
                    return false;
                }
                List<VersionedClause> adding = new LinkedList<VersionedClause>();
                Iterator< ? > iterator = ((IStructuredSelection) selection).iterator();
                while (iterator.hasNext()) {
                    Object item = iterator.next();
                    if (item instanceof RepositoryBundle) {
                        VersionedClause newClause = RepositoryUtils.convertRepoBundle((RepositoryBundle) item);
                        adding.add(newClause);
                    } else if (item instanceof RepositoryBundleVersion) {
                        RepositoryBundleVersion bundleVersion = (RepositoryBundleVersion) item;
                        VersionedClause newClause = RepositoryUtils.convertRepoBundleVersion(bundleVersion, phase);
                        adding.add(newClause);
                    }
                }

                handleAdd(adding);
                return true;
            }

            private boolean handleURLDrop(String urlStr) {
                try {
                    URI uri = new URI(urlStr);
                    AddJpmDependenciesWizard wizard = new AddJpmDependenciesWizard(uri);
                    WizardDialog dialog = new WizardDialog(getSection().getShell(), wizard);
                    if (dialog.open() == Window.OK) {
                        Set<ResourceDescriptor> resources = wizard.getResult();
                        List<VersionedClause> newBundles = new ArrayList<VersionedClause>(resources.size());
                        for (ResourceDescriptor resource : resources) {
                            Attrs attrs = new Attrs();
                            attrs.put(Constants.VERSION_ATTRIBUTE, resource.version != null ? resource.version.toString() : Version.emptyVersion.toString());
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

    private void doAdd() {
        Project project = getProject();
        try {
            RepoBundleSelectionWizard wizard = createBundleSelectionWizard(project, getBundles());
            if (wizard != null) {
                WizardDialog dialog = new WizardDialog(getSection().getShell(), wizard);
                if (dialog.open() == Window.OK) {
                    setBundles(wizard.getSelectedBundles());
                    markDirty();
                }
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

        }
    }

    void doAdd() {
        PluginSelectionWizard wizard = new PluginSelectionWizard();
        WizardDialog dialog = new WizardDialog(getManagedForm().getForm().getShell(), wizard);
        if (dialog.open() == Window.OK) {
            HeaderClause newPlugin = wizard.getHeader();

            data.add(newPlugin);
            viewer.add(newPlugin);
            markDirty();
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

        if (header != null) {
            Attrs copyOfProperties = new Attrs(header.getAttribs());

            IConfigurationElement configElem = configElements.get(header.getName());
            PluginEditWizard wizard = new PluginEditWizard(configElem, copyOfProperties);
            WizardDialog dialog = new WizardDialog(getManagedForm().getForm().getShell(), wizard);

            if (dialog.open() == Window.OK && wizard.isChanged()) {
                header.getAttribs().clear();
                header.getAttribs().putAll(copyOfProperties);

                viewer.update(header, null);
                markDirty();
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

                  }
                }
              }
            }
            TunnelCommandDefinitionWizard wizard = new TunnelCommandDefinitionWizard(commands, serviceInfo);
            WizardDialog dialog = new WizardDialog(getShell(), wizard);
            if (dialog.open() == Window.OK) {
              commands = wizard.getExternalToolLaunchCommandsServer();

              try {
                TunnelServiceCommandStore.getCurrentStore().storeServerServiceCommands(commands);
              }
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

      public IStatus runInUIThread(IProgressMonitor monitor) {
        Shell shell = getShell();

        CaldecottTunnelWizard wizard = new CaldecottTunnelWizard(cloudServer);
        WizardDialog dialog = new WizardDialog(shell, wizard);
        if (dialog.open() == Window.OK) {

          Set<CaldecottTunnelDescriptor> descriptorsToRemove = wizard.getDescriptorsToRemove();
          if (descriptorsToRemove != null) {
            for (CaldecottTunnelDescriptor descriptor : descriptorsToRemove) {
              try {
View Full Code Here

Examples of org.eclipse.jface.wizard.WizardDialog

    GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(false, false).applyTo(addButton);
    addButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        ApplicationURLWizard wizard = new ApplicationURLWizard(cloudServer, null);
        WizardDialog dialog = new WizardDialog(addButton.getShell(), wizard);
        if (dialog.open() == Dialog.OK) {
          String newURI = wizard.getUrl();
          urls.add(newURI);
          update();
        }
      }
    });

    editButton = new Button(buttonComposite, SWT.PUSH);
    editButton.setText(Messages.COMMONTXT_EDIT);
    GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(false, false).applyTo(editButton);
    editButton.setEnabled(false);
    editButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
        String url = (String) selection.getFirstElement();

        ApplicationURLWizard wizard = new ApplicationURLWizard(cloudServer, url);
        WizardDialog dialog = new WizardDialog(addButton.getShell(), wizard);
        if (dialog.open() == Dialog.OK) {
          String newURI = wizard.getUrl();
          urls.remove(url);
          urls.add(newURI);
          update();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.