Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » default source folder
default source folder [message #75840] Tue, 15 July 2003 02:06 Go to next message
Eclipse UserFriend
Originally posted by: jzhou.persistence.com

Hi,

Does anyone know how to get the name of the default source folder of a Java
project?

Thanks very much,

Jie
Re: default source folder [message #75924 is a reply to message #75840] Tue, 15 July 2003 07:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Jie Zhou wrote:

>Hi,
>
>Does anyone know how to get the name of the default source folder of a Java
>project?
>
There is no such thing as a *default* source folder. A Java project
either has 1.n "real" source folders or the project itself is used as
source folder in which case the source is in a IPackageFragment root
(which you don't see in the UI) with the project as its resource.

HTH
Dani
Re: default source folder [message #75935 is a reply to message #75840] Tue, 15 July 2003 08:05 Go to previous messageGo to next message
Jerome Lanneluc is currently offline Jerome LannelucFriend
Messages: 572
Registered: July 2009
Senior Member
Jie,

It is not clear to me what you call a 'default' source folder. Source
folders are defined by IClasspathEntries. You can get them using
IJavaProject.getResolvedClasspath(...) and then filter the ones that have
the CPE_SOURCE kind. The path of the IClasspathEntry is the path to the
source folder.

Jerome

"Jie Zhou" <jzhou@persistence.com> wrote in message
news:bevncj$d63$1@eclipse.org...
> Hi,
>
> Does anyone know how to get the name of the default source folder of a
Java
> project?
>
> Thanks very much,
>
> Jie
>
>
Re: default source folder [message #76144 is a reply to message #75935] Tue, 15 July 2003 16:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jzhou.persistence.com

Sorry, I should have made it clearer.
I meant the values of the source and output folder used by the New Java
Project Wizard(you can find these values in Window--> preferences-->Java -->
New Project.

Thanks,

Jie


"Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
news:bf0cj5$viq$1@eclipse.org...
> Jie,
>
> It is not clear to me what you call a 'default' source folder. Source
> folders are defined by IClasspathEntries. You can get them using
> IJavaProject.getResolvedClasspath(...) and then filter the ones that have
> the CPE_SOURCE kind. The path of the IClasspathEntry is the path to the
> source folder.
>
> Jerome
>
> "Jie Zhou" <jzhou@persistence.com> wrote in message
> news:bevncj$d63$1@eclipse.org...
> > Hi,
> >
> > Does anyone know how to get the name of the default source folder of a
> Java
> > project?
> >
> > Thanks very much,
> >
> > Jie
> >
> >
>
>
Re: default source folder [message #76317 is a reply to message #75924] Tue, 15 July 2003 19:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jzhou.persistence.com

Thanks. I don't think I have made it clear that I just want to be able to
programmatically get the values of source and output folder that are
specified in the New Java Project prefrence page.

Jie

"Daniel Megert" <daniel.megert@gmx.net> wrote in message
news:bf0bqf$u7q$1@eclipse.org...
> Jie Zhou wrote:
>
> >Hi,
> >
> >Does anyone know how to get the name of the default source folder of a
Java
> >project?
> >
> There is no such thing as a *default* source folder. A Java project
> either has 1.n "real" source folders or the project itself is used as
> source folder in which case the source is in a IPackageFragment root
> (which you don't see in the UI) with the project as its resource.
>
> HTH
> Dani
>
Re: default source folder [message #76349 is a reply to message #75840] Tue, 15 July 2003 21:00 Go to previous message
Eclipse UserFriend
Originally posted by: jzhou.persistence.com

Thanks to everyone for trying to help.
I figured this out. I should use the preference store to get the values.

Thanks,

Jie

"Jie Zhou" <jzhou@persistence.com> wrote in message
news:bevncj$d63$1@eclipse.org...
> Hi,
>
> Does anyone know how to get the name of the default source folder of a
Java
> project?
>
> Thanks very much,
>
> Jie
>
>
Previous Topic:Format ICompilationUnit?
Next Topic:org.eclipse.jdt.ui plugin cannot be activated
Goto Forum:
  


Current Time: Sun Jun 30 13:48:34 GMT 2024

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

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

Back to the top