Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.ContainerSelectionDialog


  /**
   * Uses the standard container selection dialog to choose the new value for
   * the container field.
   */
  private void handleBrowse() {
    ContainerSelectionDialog dialog = new ContainerSelectionDialog(
        getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
        "Select new file container");
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        containerText.setText(((Path) result[0]).toString());
      }
    }
  }
View Full Code Here


      } else updateStatus("You may select only one UML model.");
    }
  }
 
  private void handlePrismDirBrowse() {
    ContainerSelectionDialog dialog = new ContainerSelectionDialog(
        getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
        "Select prism models container");
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        prismDirText.setText(((Path) result[0]).toString());
      }
    }
  }
View Full Code Here

   * Uses the standard container selection dialog to choose the new value for
   * the container field.
   */

  private void handleBrowse() {
    ContainerSelectionDialog dialog = new ContainerSelectionDialog(
        getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
        WizardMessages.NewMessageWizardPage_containerSelectionLabel);
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        containerText.setText(((Path) result[0]).toString());
      }
    }
  }
View Full Code Here

   * Uses the standard container selection dialog to choose the new value for
   * the container field.
   */

  private void handleBrowse() {
    ContainerSelectionDialog dialog = new ContainerSelectionDialog(
        getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
        WizardMessages.NewCamelXMLWizardPage_containerSelectionLabel);
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        containerText.setText(((Path) result[0]).toString());
      }
    }
  }
View Full Code Here

     *
     * @author Fabio Zadrozny
     */
    private final class ChooseAction extends ProgressAction {
        public void run() {
            ContainerSelectionDialog dialog = new ContainerSelectionDialog(getSite().getShell(), null, false,
                    "Choose folder to be analyzed in the code-coverage");
            dialog.showClosedProjects(false);
            if (dialog.open() != Window.OK) {
                return;
            }
            Object[] objects = dialog.getResult();
            if (objects.length == 1) { //only one folder can be selected
                if (objects[0] instanceof IPath) {
                    IPath p = (IPath) objects[0];

                    IWorkspace w = ResourcesPlugin.getWorkspace();
View Full Code Here

    private void handleWorkspaceDirBrowseButtonSelected() {
        IContainer currentContainer = getContainer();
        if (currentContainer == null) {
            currentContainer = ResourcesPlugin.getWorkspace().getRoot();
        }
        ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), currentContainer, false,
                "Select a workspace relative working directory");
        dialog.showClosedProjects(false);
        dialog.open();
        Object[] results = dialog.getResult();
        if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {
            IPath path = (IPath) results[0];
            String containerName = path.makeRelative().toString();
            setOtherWorkingDirectoryText("${workspace_loc:" + containerName + "}"); //$NON-NLS-1$ //$NON-NLS-2$
        }
View Full Code Here

   * Uses the standard container selection dialog to choose the new value for
   * the container field.
   */

  private void handleBrowse() {
    final ContainerSelectionDialog dialog = new ContainerSelectionDialog(
        getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
        PHPUIMessages.PHPFileCreationWizardPage_9);
    dialog.showClosedProjects(false);
    if (dialog.open() == Window.OK) {
      final Object[] result = dialog.getResult();
      if (result.length == 1)
        containerText.setText(((Path) result[0]).toOSString());
    }
  }
View Full Code Here

  /**
   * Uses the standard diagramContainer selection dialog to choose the new value for the diagramContainer field.
   */

  private void handleBrowse() {
    ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), ResourcesPlugin.getWorkspace()
        .getRoot(), false, "Select Folder for the diagram");
    if (dialog.open() == Window.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        containerText.setText(((Path) result[0]).toString());
      }
    }
  }
View Full Code Here

        outputLocation.setText(returnString);
      }
    } else {
      IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();

      ContainerSelectionDialog dialog = new ContainerSelectionDialog(
          getShell(), root, false, CodegenWizardPlugin
              .getResourceString("page3.containerbox.title"));
      if (dialog.open() == ContainerSelectionDialog.OK) {
        Object[] result = dialog.getResult();
        if (result.length == 1) {
          Path path = ((Path) result[0]);
          if (root.exists(path)) {
            //Fixing issue AXIS2-4008 by retrieving the project path instead of appending it to the workspace root.
            IProject project = null;
View Full Code Here

   * Uses the standard container selection dialog to
   * choose the new value for the container field.
   */
  private void handleBrowse() {
       
    ContainerSelectionDialog dialog =  new ContainerSelectionDialog(
      getShell(),
      ResourcesPlugin.getWorkspace().getRoot(),
      true,
      "Select new file container"
    );
   
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        this.cfcBean.setPath(((Path)result[0]).toOSString());
        this.cfcPath.setText(this.cfcBean.getPath());
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.dialogs.ContainerSelectionDialog

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.