How to get the source Location ?

V

vpennella

Hello !!!


I have a IProject that is return when I execute
resource.getProject().

But I need the path of the source folder of the project.
¿ How can I get the location of the source folder ? If someboby knows
it, please respond me the message.

Thanks,
Valeria.
 
O

Oliver Wong

Hello !!!


I have a IProject that is return when I execute
resource.getProject().

But I need the path of the source folder of the project.
¿ How can I get the location of the source folder ? If someboby knows
it, please respond me the message.

Thanks,
Valeria.

It's in the IProjectDescription. Get the description from the project,
then get the IPath from the description.

- Oliver
 
O

Oliver Wong

Andrew Thompson said:

The OP's question was poorly phrased. (S)he is working with the Eclipse
API, and (s)he means to access the source folder of the project currently
highlighted or selected or whatever in Eclipse, so that his/her plugin can
perform some voodoo magic on it. (S)he did not intend to get the path of the
currently running application or anything like that.

I recognized it as an Eclipse question because of the APIs mentioned
(IProject.getResource()), but the OP would do well to specify, next time,
that their question was related to Eclipse, and not just the broad world of
Java in general.

- Oliver
 
A

Andrew Thompson

Oliver Wong wrote:
...
I recognized it as an Eclipse question because of the APIs mentioned
(IProject.getResource()), but the OP would do well to specify, next time,

When posting their Eclipse question to the Eclipse forums?
that their question was related to Eclipse,

...I think there, they may pretty well *assume* it is
to do with Eclipse. ;-)
 
O

Oliver Wong

Andrew Thompson said:
Oliver Wong wrote:
..

When posting their Eclipse question to the Eclipse forums?


..I think there, they may pretty well *assume* it is
to do with Eclipse. ;-)

Sorry, let me rephrase: Next time the OP (or anyone else for that
matter) wants to post a question about the Eclipse API on
comp.lang.java.programmer, they should specify that their question is about
the Eclipse API, and not about Java programming in general.

Preferably mention "Eclipse API" in the subject line, so people who
don't know/don't care about the Eclipse API can skip the message.

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top