Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IContainer.findMember()


    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, this.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) ((JavaElement) root).resource();
  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()));
View Full Code Here

      final RepositoryMapping rm = (RepositoryMapping)rmObj;
      final IContainer c = rm.getContainer();
      if (c == null)
        continue; // Not fully mapped yet?

      final IResource dotGit = c.findMember(Constants.DOT_GIT);
      if (dotGit != null) {
        try {
          final Repository r = rm.getRepository();
          final File dotGitDir = dotGit.getLocation().toFile()
              .getCanonicalFile();
View Full Code Here

    } catch (CoreException err) {
      Activator.logError(
          CoreText.GitProjectData_failedToCacheRepoMapping, err);
    }

    dotGit = c.findMember(Constants.DOT_GIT);
    if (dotGit != null && dotGit.getLocation().toFile().equals(git)) {
      protect(dotGit);
    }
  }
View Full Code Here

                mode = FileMode.REGULAR_FILE;
            break;
          case IResource.PROJECT:
          case IResource.FOLDER: {
            final IContainer c = (IContainer) f;
            if (c.findMember(Constants.DOT_GIT) != null)
              mode = FileMode.GITLINK;
            else
              mode = FileMode.TREE;
            break;
          }
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, this.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) ((JavaElement) root).resource();
  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()));
View Full Code Here

    IResource destinationResource = ResourceUtil.getResource(fDestination);
    if (destinationResource.equals(resource.getParent()))
      return false;
    if (destinationResource instanceof IContainer) {
      IContainer container = (IContainer) destinationResource;
      IResource member = container.findMember(resource.getName());
      if (member == null || !member.exists())
        return false;
      if (member instanceof IContainer) {
        try {
          if (((IContainer) member).members().length == 0)
View Full Code Here

                  String[] parts = line.split(":");
                 
                  if(parts.length > 0) {
                    String[] fileParts = parts[0].trim().split(File.separatorChar=='\\' ? "\\\\" : File.separator);
                    String filename = fileParts[fileParts.length-1];
                    IResource testFile = parent.findMember(filename);
                     
                        if(parts.length > 1){
                          parts = parts[1].split("\\+");
                        }
View Full Code Here

                message = parts[3];
              }
             
              int lineNo = 1;
              lineNo = Integer.parseInt(parts[1]);
              IResource testFile = parent.findMember(parts[0].trim());
              MarkerUtilities.addMarker(testFile, lineNo, message, IMarker.SEVERITY_ERROR);
             
            } else if (line.matches("(^.*_test.go:[0-9]+:.*)") ) {
              success = false;
              String[] parts = line.split(":");
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.