Package org.eclipse.core.resources

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


            + ".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) {
            res = activeProject.findMember(partenerFile
View Full Code Here


        res = activeProject.findMember(aimFileName
            .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

  }
 
  protected String findPomLocation(IStructuredSelection selection, String workspace_location) {
    String pomLocation = null;
    IProject project = getProject(selection);
    IResource pom = project.findMember("pom.xml");
   
    if ( pom != null )
      pomLocation = pom.getRawLocation().toPortableString();
       
    return pomLocation;
View Full Code Here

    boolean result = false;
    // We look for a maven project in the current selection
    if ( receiver instanceof IStructuredSelection ) {
      IProject project = getProject((IStructuredSelection) receiver);
      if ( project != null )
        if ( project.findMember("pom.xml") != null )
          result = true;
    }
   
    return result;
  }
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

      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

  }
  public ResourceImage(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; //$NON-NLS-1$
            resource = project.findMember(new Path(src));
            if (resource != null) {
              String ext = resource.getFileExtension();
              if (ext.equals("gif") || ext.equals("png") || ext.equals("jpg")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                IPath fullPath = project.getWorkspace().getRoot().getRawLocation().append(resource.getFullPath());
                String fullpath = fullPath.toString();
View Full Code Here

        }
      }
    } while (tokenizer.hasMoreTokens());
    IJavaProject prj = VisualSwingPlugin.getCurrentProject();
    IProject project = prj.getProject();
    IResource resource = project.findMember(new Path((String) value));
    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 + value; //$NON-NLS-1$
            resource = project.findMember(new Path(src));
            if (resource != null) {
              String ext = resource.getFileExtension();
              if (ext!=null&&(ext.equalsIgnoreCase("gif") || ext.equalsIgnoreCase("png") || ext.equalsIgnoreCase("jpg"))) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                return null;
              else
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.