Package org.eclipse.dltk.internal.core

Examples of org.eclipse.dltk.internal.core.ProjectFragment


  private ISourceModule findInProject(IScriptProject scriptProject,
      IPath path, boolean isFullPath) throws ModelException {
    IProjectFragment[] roots = scriptProject.getProjectFragments();
    for (int j = 0, rootCount = roots.length; j < rootCount; j++) {
      final ProjectFragment root = (ProjectFragment) roots[j];
      IPath rootPath = root.getPath();
      if (!isFullPath) {
        rootPath = EnvironmentPathUtils.getLocalPath(rootPath);
      }
      if (rootPath.isPrefixOf(path)
          && !Util.isExcluded(path, root.fullInclusionPatternChars(),
              root.fullExclusionPatternChars(), false)) {
        IPath localPath = path.setDevice(null).removeFirstSegments(
            rootPath.segmentCount());
        if (localPath.segmentCount() >= 1) {
          final IScriptFolder folder;
          if (localPath.segmentCount() > 1) {
            folder = root.getScriptFolder(localPath
                .removeLastSegments(1));
          } else {
            folder = root.getScriptFolder(""); //$NON-NLS-1$
          }
          return folder.getSourceModule(localPath.lastSegment());
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.internal.core.ProjectFragment

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.