Examples of ContainerSelectionDialog


Examples of org.eclipse.ui.dialogs.ContainerSelectionDialog

   */
  private class BrowseListener extends SelectionAdapter
  {
    public void widgetSelected(SelectionEvent e)
    {
      ContainerSelectionDialog dialog = new ContainerSelectionDialog(
          getShell(), getProject(), false, "Select a working folder");
      dialog.setValidator(new ISelectionValidator()
      {
        public String isValid(Object selection)
        {
          if (selection.toString().indexOf(getProjectPath()) == 0)
            return null;
          else
            return "Cannot select a folder in other projects";
        }
       
      });
      if (dialog.open() == ContainerSelectionDialog.OK)
      {
        Object[] result = dialog.getResult();
        if (result.length == 1)
        {
          String path = ((Path)result[0]).toString();
          path = path.substring(getProjectPath().length() + 1);
          m_WorkFolder.setText(path);
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.