Package org.eclipse.core.resources

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


  }
  public ResourceIcon(String p) {
    this.path = p;
    IJavaProject prj = VisualSwingPlugin.getCurrentProject();
    IProject project = prj.getProject();
    IResource resource = project.findMember(new Path(p));
    if (resource == null) {
      IPackageFragmentRoot[] roots;
      try {
        roots = prj.getPackageFragmentRoots();
        for (IPackageFragmentRoot root : roots) {
View Full Code Here


        roots = prj.getPackageFragmentRoots();
        for (IPackageFragmentRoot root : roots) {
          if (!root.isArchive()) {
            String src = root.getElementName();
            src = "/" + src + p;
            resource = project.findMember(new Path(src));
            if (resource != null) {
              String ext = resource.getFileExtension();
              if (ext.equals("gif") || ext.equals("png") || ext.equals("jpg")) {
                IPath fullPath = project.getWorkspace().getRoot().getRawLocation().append(resource.getFullPath());
                String fullpath = fullPath.toString();
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 && filterCoreResources// only filtered is cached
      return cachedClassPath;

    StringBuffer result = new StringBuffer(1000);
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 && filterCoreResources// only filtered is cached
      return cachedClassPath;

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

        MessageDialog.openInformation(window.getShell(),"Tapesty 5 tips","Only Tapestry 5 page class or .tml page file can use this function!");
        return ;
      }
      if(aimFileName.indexOf("/") > -1)
        aimNameShort = aimFileName.substring(aimFileName.lastIndexOf("/") + 1);
      final IResource res = activeProject.findMember(aimFileName.substring(("/" + activeProject.getName()).length()));
      if(res != null && res.getType() == IResource.FILE){
        window.getShell().getDisplay().asyncExec(new Runnable() {
          public void run() {
            IWorkbenchPage page = PlatformUI.getWorkbench()
                .getActiveWorkbenchWindow().getActivePage();
View Full Code Here

          }
        });
      }else{
        searchPartenerFile(activeProject, aimNameShort);
        if(this.partenerFile != null){
          final IResource res2 = activeProject.findMember(partenerFile.substring(("/" + activeProject.getName()).length()));
          if(res2 != null && res2.getType() == IResource.FILE){
            window.getShell().getDisplay().asyncExec(new Runnable() {
              public void run() {
                IWorkbenchPage page = PlatformUI.getWorkbench()
                    .getActiveWorkbenchWindow().getActivePage();
View Full Code Here

                IProject iProject = localProjects.get(projectID);
                if (isPartialRemoteProject(projectID)) {
                    List<IPath> paths = getRemoteFileList(projectID).getPaths();
                    List<IResource> dependentResources = new ArrayList<IResource>();
                    for (IPath iPath : paths) {
                        dependentResources.add(iProject.findMember(iPath));
                    }
                    sessionManager.getSarosSession().addSharedResources(
                        iProject, projectID, dependentResources);
                } else {
                    sessionManager.getSarosSession().addSharedResources(
View Full Code Here

//                 spurious output.  Don't know why we are calling refreshLocal at all.
                JSFCorePlugin.log(Status.WARNING, "Error.RefreshingLocal", e); //$NON-NLS-1$
        }
    }
   
    IResource res = project.findMember(new Path(projectPath));
    if ((res != null) && (res.exists())) {
      return project;
    }
    return null;
  }
View Full Code Here

                fileName.length() - 4) + ".java";
            IResource res = null;
            if (aimFileName.indexOf("/") > -1)
              aimNameShort = aimFileName.substring(aimFileName
                  .lastIndexOf("/") + 1);
            res = activeProject.findMember(aimFileName
                .substring(("/" + activeProject.getName())
                    .length()));
            if (res == null) {
              searchPartenerFile(activeProject, aimNameShort);
              if (this.partenerFile != null) {
View Full Code Here

                .substring(("/" + activeProject.getName())
                    .length()));
            if (res == null) {
              searchPartenerFile(activeProject, aimNameShort);
              if (this.partenerFile != null) {
                res = activeProject.findMember(partenerFile
                    .substring(("/" + activeProject
                        .getName()).length()));
              }
            }
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.