Examples of validateName()


Examples of org.eclipse.core.resources.IWorkspace.validateName()

        getButton(IDialogConstants.OK_ID).setEnabled(false);
    }

    private void updateButtons() {
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      boolean allowCreation = workspace.validateName(name, IResource.FOLDER).isOK();
      allowCreation &= !((IFolder) definitionFolder.getParent()).getFolder(name).exists();
        getButton(IDialogConstants.OK_ID).setEnabled(allowCreation);
    }

    @Override
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

    //If the file is vaid checks if the prj can be parsed.
   
    String name = this.prj_name.getText();
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IStatus nameStatus = workspace.validateName(name, IResource.PROJECT);
    if (!nameStatus.isOK()) {
      updateStatus(nameStatus.getMessage());
      return false;
    }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

     
      updateStatus(IDEWorkbenchMessages.WizardNewProjectCreationPage_projectNameEmpty);
      return false;
    }

    IStatus nameStatus = workspace.validateName(projectFieldContents,
        IResource.PROJECT);
    if (!nameStatus.isOK()) {
      updateStatus(nameStatus.getMessage());
      return false;
    }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

      setErrorMessage(null);
      setMessage(NewWizardMessages.NewJavaProjectWizardPageOne_Message_enterProjectName);
      return false;
    }

    final IStatus nameStatus = workspace.validateName(name, IResource.PROJECT);
    if (!nameStatus.isOK()) {
      setErrorMessage(nameStatus.getMessage());
      return false;
    }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

  }

  private IProject getProject(String projectName) {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject project = null;
    IStatus status = workspace.validateName(projectName, IResource.PROJECT);
    if (status.isOK()) {
      project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
      if (!project.exists()) {
        return null;
      }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

    String projectName = fProjText.getText().trim();
    IProject project = null;
    if (projectName.length() > 0) {
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      IStatus status = workspace.validateName(projectName, IResource.PROJECT);
      if (status.isOK()) {
        project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
        if (!project.exists()) {
          setErrorMessage(MessageFormat.format("Project {0} does not exist", projectName));
          fWebappDirButton.setEnabled(false);
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

      String projectName = config.getAttribute(
          IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
      IProject project = null;
      if (projectName.length() > 0) {
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IStatus status = workspace.validateName(projectName,
            IResource.PROJECT);
        if (status.isOK()) {
          project = ResourcesPlugin.getWorkspace().getRoot()
              .getProject(projectName);
          if (!project.exists()) {
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

    } catch (CoreException e) {
      return false;
    }
    if (projectName.length() > 0) {
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      IStatus status = workspace.validateName(projectName,
          IResource.PROJECT);
      if (status.isOK()) {
        IProject project = ResourcesPlugin.getWorkspace().getRoot()
            .getProject(projectName);
        if (!project.exists()) {
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

  }

  private static IProject getProject(String projectName) {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject project = null;
    IStatus status = workspace.validateName(projectName, IResource.PROJECT);
    if (status.isOK()) {
      project = ResourcesPlugin.getWorkspace().getRoot()
          .getProject(projectName);
      if (!project.exists()) {
        return null;
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspace.validateName()

    String projectName = fProjText.getText().trim();
    IProject project = null;
    if (projectName.length() > 0) {
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      IStatus status = workspace.validateName(projectName,
          IResource.PROJECT);
      if (status.isOK()) {
        project = ResourcesPlugin.getWorkspace().getRoot()
            .getProject(projectName);
        if (!project.exists()) {
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.