Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » get the list of sources files which exist in eclipse project explorer using CDT (get the list of sources files which exist in eclipse project explorer using CDT )
get the list of sources files which exist in eclipse project explorer using CDT [message #912854] Fri, 14 September 2012 09:38
anil kumar is currently offline anil kumarFriend
Messages: 17
Registered: January 2012
Junior Member
i am working on CDT eclipse plug in development, i am trying to get the list of sources files which exist in eclipse project explorer using CDT code using following code ,which results null.

Case1: IFile[] files2 = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(new URI("file:/"+workingDirectory)); for (IFile file : files2) { System.out.println("fullpath " +file.getFullPath());

}
Case2:
IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(getProject().getRawLocationURI()); for (IFile file : files) { System.out.println("fullpath " +file.getFullPath());

}

Case3: IFile[] files3 = ResourceLookup.findFilesByName(getProject().getFullPath(),ResourcesPlugin.getWorkspace().getRoot().getProjects(),false); for (IFile file : files3) { System.out.println("fullpath " +file.getFullPath());

}

Case4: IFolder srcFolder = project.getFolder("src");

Case 1 ,2,3 giving me output null, where i am expecting list of files of existing project say "helloworld"; in Case 4: i am getting the list of "helloworld/src" files, but i am expecting to get the files from the existing project mean main root ,ex:"helloworld" please suggest me on this
Previous Topic:Indexer and "grey-background" problems with #ifdef in includes
Next Topic:Cross Compilation
Goto Forum:
  


Current Time: Thu Oct 10 17:23:26 GMT 2024

Powered by FUDForum. Page generated in 0.03425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top