Package org.eclipse.core.resources

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


      return ""; //$NON-NLS-1$
    }
    IJavaProject javaProj = JavaCore.create(project);
    IProject projectRoot = javaProj.getProject();

    IResource classFileResource = projectRoot.findMember(".classpath"); //$NON-NLS-1$
    long stamp = classFileResource.getModificationStamp();
    if (stamp == cachedStamp && filterCoreResources// only filtered is cached
      return cachedClassPath;

    StringBuffer result = new StringBuffer(1000);
View Full Code Here


    dialog.setTitle(title);
    dialog.setMessage(message);
    dialog.addFilter(filter);
    dialog.setInput(currProject);
    dialog.setComparator(new ResourceComparator(1));
    IResource res = currProject.findMember(initialPath);
    if(res != null)
      dialog.setInitialSelection(res);
    if(dialog.open() == 0)
      return (IFolder)dialog.getFirstResult();
    return null;
View Full Code Here

      if (getComponentContainer() != null) {
        componentFolder = getComponentContainer();
      }
      else if (selection != null) {
        for (String container : PREFERRED_COMPONENT_CONTAINER_PATHS) {
          IResource el = project.findMember(container);
          if (el instanceof IFolder) {
            componentFolder = (IFolder) el;
            break;
          }
        }
View Full Code Here

        String href = attrValue;
        if (href.indexOf("#") > 0) {
          href = href.substring(0, href.indexOf("#"));
        }
        IPath path = file.getParent().getProjectRelativePath();
        IResource resource = project.findMember(path.append(href));
        if (resource != null && resource.exists() && resource instanceof IFile) {
          HTMLHyperlinkInfo info = new HTMLHyperlinkInfo();
          info.setObject(resource);
          info.setOffset(0);
          info.setLength(attrValue.length());
View Full Code Here

              String local = fullLocation.substring(fullLocation
                  .indexOf(matchingString) + matchingString.length());

              System.out.println("local: " + local);

              IResource member = project.findMember(local);
              System.out.println("member: " + member);

              if (member instanceof IFile) {
                IFile file = (IFile) member;
View Full Code Here

           * extensión ".java"
           *
           * AHORA MISMO FUNCIONA SOLO SI LOS PLANES ESTÁN EN LA MISMA CLASE QUE LA CAPABILITY OJO!
           */
         
          resource = (IFile)(project.findMember("/src/main/java/" + capabilityPackage +  "/" + classname + ".java"));
        }
       
      }
      if(resource != null ){
        fileList.add(resource);       
View Full Code Here

      return ""; //$NON-NLS-1$
    }
    IJavaProject javaProj = JavaCore.create(project);
    IProject projectRoot = javaProj.getProject();

    IResource classFileResource = projectRoot.findMember(".classpath"); //$NON-NLS-1$
    long stamp = classFileResource.getModificationStamp();
    if (stamp == cachedStamp)
      return cachedClassPath;
    cachedStamp = stamp;
View Full Code Here

          IResource resource = event.getResource();
          if (resource instanceof IProject) {
            IProject project = (IProject) resource;
            if (project.isAccessible()) {
              if (RepositoryProvider.getProvider(project) instanceof GitProvider) {
                IResource dotGit = project
                    .findMember(Constants.DOT_GIT);
                if (dotGit != null
                    && dotGit.getType() == IResource.FOLDER)
                  GitProjectData.reconfigureWindowCache();
              }
View Full Code Here

            throws InterruptedException {
        monitorCheck(monitor);
        String moveResourceName = moveResource.getName();
        IProject project = getRefactorModel().getDestinationProject();
        String destinationPath = getRefactorModel().getDestinationPath();
        IResource testResource = project.findMember(destinationPath + "/" + moveResourceName);
        if (logger.isDebugEnabled()) {
            logger.debug("Resource '" + destinationPath + "/" + moveResourceName + "' "
                    + (testResource != null && testResource.exists() ? "exists" : "does not exist") + " in project '"
                    + project.getName() + "'");
        }
View Full Code Here

     
      IResource resource = foundMapping.getResource();
      if (resource instanceof IProject) {
        IProject mappedItem = (IProject) resource;
       
        IResource resource2 = mappedItem.findMember(subPath);
        return resource2;
      }
    }
    else{
      //if we didnt find the mapping, try it as a project absolute one
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.