Package org.eclipse.ui.internal.ide

Examples of org.eclipse.ui.internal.ide.ChooseWorkspaceData


            }           
            return EXIT_OK;
        }

        // -data @noDefault or -data not specified, prompt and set
        ChooseWorkspaceData launchData = new ChooseWorkspaceData(instanceLoc
                .getDefault());

        boolean force = false;
        while (true) {
            URL workspaceUrl = promptForWorkspace(shell, launchData, force);
            if (workspaceUrl == null) {
        return EXIT_OK;
      }

            // if there is an error with the first selection, then force the
            // dialog to open to give the user a chance to correct
            force = true;

            try {
                // the operation will fail if the url is not a valid
                // instance data area, so other checking is unneeded
                if (instanceLoc.setURL(workspaceUrl, true)) {
                    launchData.writePersistedData();
                    writeWorkspaceVersion();
                    return null;
                }
            } catch (IllegalStateException e) {
                MessageDialog
View Full Code Here


  private List workspacesList;
  private Button removeButton;


  public void init(IWorkbench workbench) {
    workspacesData = new ChooseWorkspaceData(Platform.getInstanceLocation().getURL());
  }
View Full Code Here

      }

      if (instanceLocaction.isSet()) {
        // everything is fine
      } else {
        ChooseWorkspaceData launchData = new ChooseWorkspaceData(instanceLocaction.getDefault());

        new ChooseWorkspaceDialog(null, launchData, false, true).prompt(true);

        String instancePath = launchData.getSelection();

        File workspace = new File(instancePath);
        if (!workspace.exists()) {
          workspace.mkdir();
        }

        String path = workspace.getAbsolutePath().replace(File.separatorChar, '/');

        URL candidateWorkspaceURL = new URL("file", null, path);

        instanceLocaction.setURL(candidateWorkspaceURL, true);
        launchData.writePersistedData();
      }
    } finally {
      if (shell != null) {
        shell.dispose();
      }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.ide.ChooseWorkspaceData

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.