Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IResource


  boolean isCoupoundAssigned = (bits & ASTNode.IsCompoundAssigned) != 0;
  boolean isReadAccess = isCoupoundAssigned || (bits & ASTNode.IsStrictlyAssigned) == 0;
  boolean isWriteAccess = isCoupoundAssigned || (bits & ASTNode.IsStrictlyAssigned) != 0;
  boolean insideDocComment = (bits & ASTNode.InsideJavadoc) != 0;
  SearchParticipant participant = getParticipant();
  IResource resource = this.currentPossibleMatch.resource;
  return new LocalVariableReferenceMatch(enclosingElement, accuracy, offset, length, isReadAccess, isWriteAccess, insideDocComment, participant, resource);
}
View Full Code Here


    int length,
    boolean isConstructor,
    boolean isSynthetic,
    ASTNode reference) {
  SearchParticipant participant = getParticipant();
  IResource resource = this.currentPossibleMatch.resource;
  boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0;
  if (enclosingBinding != null)
    enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding);
  boolean isOverridden = (accuracy & PatternLocator.SUPER_INVOCATION_FLAVOR) != 0;
  return new MethodReferenceMatch(enclosingElement, accuracy, offset, length, isConstructor, isSynthetic, isOverridden, insideDocComment, participant, resource);
View Full Code Here

    int accuracy,
    int offset, 
    int length,
    ASTNode reference) {
  SearchParticipant participant = getParticipant();
  IResource resource = this.currentPossibleMatch.resource;
  boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0;
  return new PackageReferenceMatch(enclosingElement, accuracy, offset, length, insideDocComment, participant, resource);
}
View Full Code Here

    int length,
    ASTNode reference) {
  int bits = reference.bits;
  boolean insideDocComment = (bits & ASTNode.InsideJavadoc) != 0;
  SearchParticipant participant = getParticipant();
  IResource resource = this.currentPossibleMatch.resource;
  return new TypeParameterReferenceMatch(enclosingElement, accuracy, offset, length, insideDocComment, participant, resource);
}
View Full Code Here

    int accuracy,
    int offset, 
    int length,
    ASTNode reference) {
  SearchParticipant participant = getParticipant();
  IResource resource = this.currentPossibleMatch.resource;
  boolean insideDocComment = (reference.bits & ASTNode.InsideJavadoc) != 0;
  if (enclosingBinding != null)
    enclosingElement = ((JavaElement) enclosingElement).resolved(enclosingBinding);
  return new TypeReferenceMatch(enclosingElement, accuracy, offset, length, insideDocComment, participant, resource);
}
View Full Code Here

        manager.closeZipFile(zip); // handle null case
      }
    } else {
      Object target = JavaModel.getTarget(ResourcesPlugin.getWorkspace().getRoot(), root.getPath(), true);
      if (target instanceof IResource) {
        IResource resource = (IResource) target;
        if (resource instanceof IContainer) {
          try {
            IResource[] members = ((IContainer) resource).members();
            for (int i = 0, max = members.length; i < max; i++) {
              IResource member = members[i];
              if (member.getType() == IResource.FOLDER) {
                firstLevelPackageNames.add(member.getName());
              } else if (Util.isClassFileName(member.getName())) {
                containsADefaultPackage = true;
              }
            }
          } catch (CoreException e) {
            // ignore
View Full Code Here

  private void computeRootPath(IContainer container, HashSet firstLevelPackageNames, boolean hasDefaultPackage, Set set) {
    try {
      IResource[] resources = container.members();
      boolean hasSubDirectories = false;
      loop: for (int i = 0, max = resources.length; i < max; i++) {
        IResource resource = resources[i];
        if (resource.getType() == IResource.FOLDER) {
          hasSubDirectories = true;
          if (firstLevelPackageNames.contains(resource.getName())) {
            IPath fullPath = container.getFullPath();
            IPath rootPathEntry = fullPath.removeFirstSegments(this.sourcePath.segmentCount()).setDevice(null);
            set.add(rootPathEntry);
            break loop;
          } else {
View Full Code Here

      }
    } else {
      Object target = JavaModel.getTarget(ResourcesPlugin.getWorkspace().getRoot(), this.sourcePath, true);
      if (target instanceof IResource) {
        if (target instanceof IContainer) {
          IResource res = ((IContainer)target).findMember(fullName);
          if (res instanceof IFile) {
            try {
              source = org.aspectj.org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray((IFile)res);
            } catch (JavaModelException e) {
              // ignore
View Full Code Here

    char[][] exclusionPatterns = root.fullExclusionPatternChars();
    int i;
    for (i = 0; i < this.pkgName.length; i++) {
      String subFolderName = this.pkgName[i];
      sideEffectPackageName = Util.arrayConcat(sideEffectPackageName, subFolderName);
      IResource subFolder = parentFolder.findMember(subFolderName);
      if (subFolder == null) {
        createFolder(parentFolder, subFolderName, force);
        parentFolder = parentFolder.getFolder(new Path(subFolderName));
        IPackageFragment addedFrag = root.getPackageFragment(sideEffectPackageName);
        if (!Util.isExcluded(parentFolder, inclusionPatterns, exclusionPatterns)) {
View Full Code Here

    return new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, root);
  }
  IContainer parentFolder = (IContainer) root.getResource();
  int i;
  for (i = 0; i < this.pkgName.length; i++) {
    IResource subFolder = parentFolder.findMember(this.pkgName[i]);
    if (subFolder != null) {
      if (subFolder.getType() != IResource.FOLDER) {
        return new JavaModelStatus(
          IJavaModelStatusConstants.NAME_COLLISION,
          Messages.bind(Messages.status_nameCollision, subFolder.getFullPath().toString()));
      }
      parentFolder = (IContainer) subFolder;
    }
  }
  return JavaModelStatus.VERIFIED_OK;
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.IResource

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.