Package org.eclipse.jface.wizard

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


                            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

    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

        }
    }

    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

        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

                  }
                }
              }
            }
            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

      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

    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

      public void run() {
        // Do not create the service right away.
        boolean deferAdditionOfService = true;
        CloudFoundryServiceWizard wizard = new CloudFoundryServiceWizard(cloudServer, deferAdditionOfService);
        WizardDialog dialog = new WizardDialog(getShell(), wizard);
        dialog.setBlockOnOpen(true);
        if (dialog.open() == Window.OK) {
          // This cloud service does not yet exist. It will be created
          // outside of the wizard
          CloudService addedService = wizard.getService();
          if (addedService != null) {
            addService(addedService);
View Full Code Here

   * otherwise
   */
  protected CloudServerURL promptForCloudURL(String serverID, Shell shell, List<CloudServerURL> allURLs,
      String existingURL, String existingName) {
    CloudUrlWizard wizard = new CloudUrlWizard(serverID, allURLs, existingURL, existingName);
    WizardDialog dialog = new WizardDialog(shell, wizard);
    if (dialog.open() == Dialog.OK) {
      return wizard.getCloudUrl();
    }
    return null;

  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.wizard.WizardDialog

Copyright © 2018 www.massapicom. 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.