Package org.eclipse.debug.internal.ui.actions

Examples of org.eclipse.debug.internal.ui.actions.StatusInfo


    fDialogSettings = PHPUiPlugin.getDefault().getDialogSettings();

    fElement = element;

    fNameStatus = new StatusInfo();
    fPathStatus = new StatusInfo();

    NewVariableAdapter adapter = new NewVariableAdapter();
    fNameField = new StringDialogField();
    fNameField.setDialogFieldListener(adapter);
    fNameField
View Full Code Here


      return s2;
    }
  }

  private StatusInfo nameUpdated() {
    StatusInfo status = new StatusInfo();
    String name = fNameField.getText();
    if (name.length() == 0) {
      status.setError(PHPUIMessages.VariableCreationDialog_error_entername);
      return status;
    }
    if (name.trim().length() != name.length()) {
      status.setError(PHPUIMessages.VariableCreationDialog_error_whitespace);
    } else if (!Path.ROOT.isValidSegment(name)) {
      status.setError(PHPUIMessages.VariableCreationDialog_error_invalidname);
    } else if (nameConflict(name)) {
      status.setError(PHPUIMessages.VariableCreationDialog_error_nameexists);
    }
    return status;
  }
View Full Code Here

    }
    return false;
  }

  private StatusInfo pathUpdated() {
    StatusInfo status = new StatusInfo();

    String path = fPathField.getText();
    if (path.length() > 0) { // empty path is ok
      if (!Path.ROOT.isValidPath(path)) {
        status.setError(PHPUIMessages.VariableCreationDialog_error_invalidpath);
      } else if (!new File(path).exists()) {
        status.setWarning(PHPUIMessages.VariableCreationDialog_warning_pathnotexists);
      }
    }
    return status;
  }
View Full Code Here

  private void handleBrowseAction() {
    Class[] acceptedClasses = new Class[] { IProject.class, IFolder.class };
    ISelectionStatusValidator validator = new ISelectionStatusValidator() {
        public IStatus validate(Object[] selection) {
          if ((null == selection) || (selection.length == 0)) {
            return new StatusInfo(IStatus.ERROR, "empty selection is not allowed");
          }

          if (selection.length > 1) {
            return new StatusInfo(IStatus.ERROR, "multiple selection is not allowed");
          }

          if (IFolder.class.isInstance(selection[0]) || IProject.class.isInstance(selection[0])) {
            return new StatusInfo();
          }

          return new StatusInfo(IStatus.ERROR, "not accepted type");
        }
      };

    IWorkspaceRoot workspaceRoot = JDTUtil.getWorkspaceRoot();
    IProject[] allProjects = workspaceRoot.getProjects();
View Full Code Here

TOP

Related Classes of org.eclipse.debug.internal.ui.actions.StatusInfo

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.