Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to obtain source folders for a project
How to obtain source folders for a project [message #213077] Mon, 22 August 2005 11:59
Eclipse UserFriend
Hello

I've been trying for days to reliably get the source folders for a
project. All I came up with was

IClasspathEntry[] cpe = javaProject.getRawClasspath();
for (IClasspathEntry entry : cpe) {
int kind = entry.getEntryKind();
switch (kind) {
case IClasspathEntry.CPE_CONTAINER:
...
break;
case IClasspathEntry.CPE_LIBRARY:
...
break;
case IClasspathEntry.CPE_SOURCE:
...
break;
case IClasspathEntry.CPE_VARIABLE:
...
break;
}
}

and noticed the entries CPE_SOURCE also refer to dependent projects. Hmpf.

Is there a more reliable/elegant way of handling this?
Previous Topic:getDictionaryLocation
Next Topic:Priority for marker annotations in Java editor
Goto Forum:
  


Current Time: Tue May 06 00:16:01 EDT 2025

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

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

Back to the top