Package org.eclipse.core.resources

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


    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

    if(checkExist != null){
      setErrorMessage(checkExist);
    }
    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

  }

  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

    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

      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

    if(checkExist != null){
      setErrorMessage(checkExist);
    }
    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

      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

    } 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

       
        // Do not allow a closed project to be selected
        IPath fullPath = resourceGroup.getContainerFullPath();
        if (fullPath != null) {
            String projectName = fullPath.segment(0);
            IStatus isValidProjectName = workspace.validateName(projectName, IResource.PROJECT);
            if(isValidProjectName.isOK()) {
                IProject project = workspace.getRoot().getProject(projectName);
                if(!project.isOpen()) {
                    setErrorMessage(IDEWorkbenchMessages.SaveAsDialog_closedProjectMessage);
                    return false;
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.