Examples of makeRelative()


Examples of org.eclipse.core.runtime.IPath.makeRelative()

        List<FSDesignResourceState> remoteStates = _server.getServices().retrieveFSDesignResourceState(_server.getSession(), computeRelativPathFromDesignRoot(start).toString());
       
        // map states by path rooted to wga designroot
        for (LocalFSDesignResourceState state : localStates) {
          IPath path = new Path(state.getPath());
          _localStates.put(path.makeRelative(), state);
        }       
        for (FSDesignResourceState state : remoteStates) {
          IPath path = new Path(state.getPath());
          _remoteStates.put(path.makeRelative(), state);   
        }
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

          IPath path = new Path(state.getPath());
          _localStates.put(path.makeRelative(), state);
        }       
        for (FSDesignResourceState state : remoteStates) {
          IPath path = new Path(state.getPath());
          _remoteStates.put(path.makeRelative(), state);   
        }
       
        // perform steps for plugin sync if runtime is started
        if (TomcatUtils.getInstance().isRunning(_runtime)) {
            monitor.beginTask("connecting to local WGA server", IProgressMonitor.UNKNOWN);
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

      Object target = JavaModel.getTarget(ResourcesPlugin.getWorkspace().getRoot(), libPath, false);
      String pathString;
      if (target instanceof java.io.File)
        pathString = libPath.toOSString();
      else
        pathString = libPath.makeRelative().toString();
      result[0] = manager.intern(Messages.bind(
        org.aspectj.org.eclipse.jdt.internal.core.util.Messages.restrictedAccess_library,
        new String[] {"{0}", pathString})); //$NON-NLS-1$
      result[1] = manager.intern(Messages.bind(
          org.aspectj.org.eclipse.jdt.internal.core.util.Messages.restrictedAccess_constructor_library,
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

        if (index == 0) {
          // custom output is nested in project's output: need to check if all source entries have a custom
          // output before complaining
          if (potentialNestedOutput == null) potentialNestedOutput = customOutput;
        } else {
          return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_cannotNestOutputInOutput, new String[] {customOutput.makeRelative().toString(), outputLocations[index].makeRelative().toString()}));
        }
      }
    }
    // allow custom output nesting in project's output if all source entries have a custom output
    if (sourceEntryCount <= outputCount-1) {
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

      IPath entryPath = entry.getPath();
      int kind = entry.getEntryKind();

      // Build some common strings for status message
      boolean isProjectRelative = projectName.equals(entryPath.segment(0));
      String entryPathMsg = isProjectRelative ? entryPath.removeFirstSegments(1).toString() : entryPath.makeRelative().toString();

      // complain if duplicate path
      if (!pathes.add(entryPath)){
        return new JavaModelStatus(IJavaModelStatusConstants.NAME_COLLISION, Messages.bind(Messages.classpath_duplicateEntryPath, new String[] {entryPathMsg, projectName}));
      }
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

      }
      // no further check if entry coincidates with project or output location
      if (entryPath.equals(projectPath)){
        // complain if self-referring project entry
        if (kind == IClasspathEntry.CPE_PROJECT){
          return new JavaModelStatus(IJavaModelStatusConstants.INVALID_PATH, Messages.bind(Messages.classpath_cannotReferToItself, entryPath.makeRelative().toString()));
        }
        // tolerate nesting output in src if src==prj
        continue;
      }
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

        for (int j = 0; j < outputCount; j++){
            IPath currentOutput = outputLocations[j];
          if (entryPath.equals(currentOutput)) continue;
        if (entryPath.isPrefixOf(currentOutput)) {
            if (kind != IClasspathEntry.CPE_SOURCE || !Util.isExcluded(currentOutput, inclusionPatterns, exclusionPatterns, true)) {
            return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_cannotNestOutputInEntry, new String[] {currentOutput.makeRelative().toString(), entryPath.makeRelative().toString()}));
            }
        }
        }

        // prevent nesting entry inside output location - when distinct from project or a source folder
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

        // prevent nesting entry inside output location - when distinct from project or a source folder
        for (int j = 0; j < outputCount; j++){
            if (allowNestingInOutputLocations[j]) continue;
            IPath currentOutput = outputLocations[j];
        if (currentOutput.isPrefixOf(entryPath)) {
          return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CLASSPATH, Messages.bind(Messages.classpath_cannotNestEntryInOutput, new String[] {entryPath.makeRelative().toString(), currentOutput.makeRelative().toString()}));
        }
        }
    }
    // ensure that no specific output is coincidating with another source folder (only allowed if matching current source folder)
    // 36465 - for 2.0 backward compatibility, only check specific output locations (the default can still coincidate)
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

      IPath entryPath = entry.getPath();
      int kind = entry.getEntryKind();

      // Build some common strings for status message
      boolean isProjectRelative = projectName.equals(entryPath.segment(0));
      String entryPathMsg = isProjectRelative ? entryPath.removeFirstSegments(1).toString() : entryPath.makeRelative().toString();

      if (kind == IClasspathEntry.CPE_SOURCE) {
        IPath output = entry.getOutputLocation();
        if (output == null) continue; // 36465 - for 2.0 backward compatibility, only check specific output locations (the default can still coincidate)
        // if (output == null) output = projectOutputLocation; // if no specific output, still need to check using default output (this line would check default output)
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.makeRelative()

                if (containerEntry == null
                  || kind == IClasspathEntry.CPE_SOURCE
                  || kind == IClasspathEntry.CPE_VARIABLE
                  || kind == IClasspathEntry.CPE_CONTAINER){
                    String description = container.getDescription();
                    if (description == null) description = path.makeRelative().toString();
                    return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CP_CONTAINER_ENTRY, project, path);
                }
                if (recurseInContainers) {
                  IJavaModelStatus containerEntryStatus = validateClasspathEntry(project, containerEntry, checkSourceAttachment, recurseInContainers);
                  if (!containerEntryStatus.isOK()){
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.