Examples of SimpleLookupTable


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

  }
  // map the additional source files by qualified type name
  if (additionalFiles == null) {
    this.additionalUnits = null;
  } else {
    this.additionalUnits = new SimpleLookupTable(additionalFiles.length);
    for (int i = 0, l = additionalFiles.length; i < l; i++) {
      SourceFile additionalUnit = additionalFiles[i];
      if (additionalUnit != null)
        this.additionalUnits.put(additionalUnit.initialTypeName, additionalFiles[i]);
    }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

AccessRuleSet accessRuleSet;

ClasspathDirectory(IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet) {
  this.binaryFolder = binaryFolder;
  this.isOutputFolder = isOutputFolder;
  this.directoryCache = new SimpleLookupTable(5);
  this.accessRuleSet = accessRuleSet;
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

public boolean isPackage(String qualifiedPackageName) {
  return directoryList(qualifiedPackageName) != null;
}

public void reset() {
  this.directoryCache = new SimpleLookupTable(5);
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

  char[][] fullExclusionPatternChars;
  char[][] fulInclusionPatternChars;

ClasspathSourceDirectory(IContainer sourceFolder, char[][] fullExclusionPatternChars, char[][] fulInclusionPatternChars) {
  this.sourceFolder = sourceFolder;
  this.directoryCache = new SimpleLookupTable(5);
  this.fullExclusionPatternChars = fullExclusionPatternChars;
  this.fulInclusionPatternChars = fulInclusionPatternChars;
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

public void cleanup() {
  this.directoryCache = null;
}

SimpleLookupTable directoryTable(String qualifiedPackageName) {
  SimpleLookupTable dirTable = (SimpleLookupTable) directoryCache.get(qualifiedPackageName);
  if (dirTable == missingPackageHolder) return null; // package exists in another classpath directory or jar
  if (dirTable != null) return dirTable;

  try {
    IResource container = sourceFolder.findMember(qualifiedPackageName); // this is a case-sensitive check
    if (container instanceof IContainer) {
      IResource[] members = ((IContainer) container).members();
      dirTable = new SimpleLookupTable();
      for (int i = 0, l = members.length; i < l; i++) {
        IResource m = members[i];
        String name;
        if (m.getType() == IResource.FILE) {
          int index = Util.indexOfJavaLikeExtension(name = m.getName());
          if (index >= 0) {
            String fullPath = m.getFullPath().toString();
            if (!org.aspectj.org.eclipse.jdt.internal.compiler.util.Util.isExcluded(fullPath.toCharArray(), this.fulInclusionPatternChars, this.fullExclusionPatternChars, false/*not a folder path*/)) {
              dirTable.put(name.substring(0, index), m);
            }
          }
        }
      }
      directoryCache.put(qualifiedPackageName, dirTable);
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

  return sourceFolder.equals(((ClasspathSourceDirectory) o).sourceFolder);
}

public NameEnvironmentAnswer findClass(String sourceFileWithoutExtension, String qualifiedPackageName, String qualifiedSourceFileWithoutExtension) {
  SimpleLookupTable dirTable = directoryTable(qualifiedPackageName);
  if (dirTable != null && dirTable.elementSize > 0) {
    IFile file = (IFile) dirTable.get(sourceFileWithoutExtension);
    if (file != null) {
      return new NameEnvironmentAnswer(new ResourceCompilationUnit(file, file.getLocationURI()), null /* no access restriction */);
    }
  }
  return null;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

public boolean isPackage(String qualifiedPackageName) {
  return directoryTable(qualifiedPackageName) != null;
}

public void reset() {
  this.directoryCache = new SimpleLookupTable(5);
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

SimpleLookupTable storedAnnotations(boolean forceInitialize) {
  if (forceInitialize && this.storedAnnotations == null && this.scope != null) { // scope null when no annotation cached, and type got processed fully (159631)
    this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true;
    if (!this.scope.environment().globalOptions.storeAnnotations)
      return null; // not supported during this compile
    this.storedAnnotations = new SimpleLookupTable(3);
  }
  return this.storedAnnotations;
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

  int copiesLength = copies.size();
  this.workingCopies = new org.eclipse.jdt.core.ICompilationUnit[copiesLength];
  copies.toArray(this.workingCopies);

  JavaModelManager manager = JavaModelManager.getJavaModelManager();
  this.bindings = new SimpleLookupTable();
  try {
    // optimize access to zip files during search operation
    manager.cacheZipFiles(this);

    // initialize handle factory (used as a cache of handles so as to optimize space)
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.util.SimpleLookupTable

    try {
      monitor.enterRead(); // ask permission to read

      String[] paths = index.queryDocumentNames(""); // all file names //$NON-NLS-1$
      int max = paths == null ? 0 : paths.length;
      final SimpleLookupTable indexedFileNames = new SimpleLookupTable(max==0 ? 33 : max+11);
      final String OK = "OK"; //$NON-NLS-1$
      final String DELETED = "DELETED"; //$NON-NLS-1$
      if (paths == null) {
        this.folder.accept(new IResourceProxyVisitor() {
          public boolean visit(IResourceProxy proxy) {
            if (IndexBinaryFolder.this.isCancelled) return false;
            if (proxy.getType() == IResource.FILE) {
              if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(proxy.getName())) {
                IFile file = (IFile) proxy.requestResource();
                String containerRelativePath = Util.relativePath(file.getFullPath(), IndexBinaryFolder.this.containerPath.segmentCount());
                indexedFileNames.put(containerRelativePath, file);
              }
              return false;
            }
            return true;
          }
        }, IResource.NONE);
      } else {
        for (int i = 0; i < max; i++) {
          indexedFileNames.put(paths[i], DELETED);
        }
        final long indexLastModified = index.getIndexFile().lastModified();
        this.folder.accept(
          new IResourceProxyVisitor() {
            public boolean visit(IResourceProxy proxy) throws CoreException {
              if (IndexBinaryFolder.this.isCancelled) return false;
              if (proxy.getType() == IResource.FILE) {
                if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(proxy.getName())) {
                  IFile file = (IFile) proxy.requestResource();
                  URI location = file.getLocationURI();
                  if (location != null) {
                    String containerRelativePath = Util.relativePath(file.getFullPath(), IndexBinaryFolder.this.containerPath.segmentCount());
                    indexedFileNames.put(containerRelativePath,
                      indexedFileNames.get(containerRelativePath) == null
                          || indexLastModified <
                          EFS.getStore(location).fetchInfo().getLastModified()
                        ? (Object) file
                        : (Object) OK);
                  }
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.