Examples of validatePath()


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

      if (fileName.lastIndexOf('.') == -1) {
        String newFileName = addDefaultExtension(fileName);
        IPath resourcePath = fullPath.append(newFileName);

        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
        if (!result.isOK()) {
          // path invalid
          setErrorMessage(result.getMessage());
          return false;
        }
View Full Code Here

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

  private IProject getProjectFromPath(IPath path) {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject project = null;

    if (path != null) {
      if (workspace.validatePath(path.toString(), IResource.PROJECT).isOK()) {
        project = workspace.getRoot().getProject(path.toString());
      }
      else {
        project = workspace.getRoot().getFile(path).getProject();
      }
View Full Code Here

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

      if (fileName.lastIndexOf('.') == -1) {
        String newFileName = addDefaultExtension(fileName);
        IPath resourcePath = fullPath.append(newFileName);

        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
        if (!result.isOK()) {
          // path invalid
          setErrorMessage(result.getMessage());
          return false;
        }
View Full Code Here

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

  private IProject getProjectFromPath(IPath path) {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject project = null;

    if (path != null) {
      if (workspace.validatePath(path.toString(), IResource.PROJECT).isOK()) {
        project = workspace.getRoot().getProject(path.toString());
      }
      else {
        project = workspace.getRoot().getFile(path).getProject();
      }
View Full Code Here

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

      if (fileName.lastIndexOf('.') == -1) {
        String newFileName = addDefaultExtension(fileName);
        IPath resourcePath = fullPath.append(newFileName);

        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
        if (!result.isOK()) {
          // path invalid
          setErrorMessage(result.getMessage());
          return false;
        }
View Full Code Here

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

  private IProject getProjectFromPath(IPath path) {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject project = null;

    if (path != null) {
      if (workspace.validatePath(path.toString(), IResource.PROJECT).isOK()) {
        project = workspace.getRoot().getProject(path.toString());
      }
      else {
        project = workspace.getRoot().getFile(path).getProject();
      }
View Full Code Here

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

      IProject dmy = workspace.getRoot().getProject("project"); //$NON-NLS-1$

      IStatus status;
      IPath srcPath = dmy.getFullPath().append(srcName);
      if (srcName.length() != 0) {
        status = workspace.validatePath(srcPath.toString(),
            IResource.FOLDER);
        if (!status.isOK()) {
          String message = Messages
              .format(
                  PreferencesMessages.NewPHPProjectPreferencePage_folders_error_invalidsrcname,
View Full Code Here

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

          return;
        }
      }
      IPath binPath = dmy.getFullPath().append(binName);
      if (binName.length() != 0) {
        status = workspace.validatePath(binPath.toString(),
            IResource.FOLDER);
        if (!status.isOK()) {
          String message = Messages
              .format(
                  PreferencesMessages.NewPHPProjectPreferencePage_folders_error_invalidbinname,
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.