Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » org.eclipse.jdt.internal.compiler.Compiler.process() - Full path name of the file being compiled
org.eclipse.jdt.internal.compiler.Compiler.process() - Full path name of the file being compiled [message #244542] Thu, 14 June 2007 18:50 Go to next message
Eclipse UserFriend
Originally posted by: g_karab.cs.concordia.ca

Hi guys,

I am wondering if there is an "easy" way to obtain the full path name of
the file containing the compilation unit being processed? The
CompilationUnitDeclaration.getFileName() returns a partial path name
relative to the workspace AFAIK. Another workaround to this will be to
be able to obtain the current workspace but I can't see how I can do this.

Of course I can use the Compiler.lookupEnvironment.nameEnvironment and
search for it. Is there any other way?

Any help/ideas is appreciated.

TIA,

George
Re: org.eclipse.jdt.internal.compiler.Compiler.process() - Full path name of the file being compiled [message #244978 is a reply to message #244542] Thu, 28 June 2007 06:20 Go to previous message
Eclipse UserFriend
George Karabotsos wrote:
> Hi guys,
>
> I am wondering if there is an "easy" way to obtain the full path name of
> the file containing the compilation unit being processed? The
> CompilationUnitDeclaration.getFileName() returns a partial path name
> relative to the workspace AFAIK. Another workaround to this will be to
> be able to obtain the current workspace but I can't see how I can do this.
>
> Of course I can use the Compiler.lookupEnvironment.nameEnvironment and
> search for it. Is there any other way?
>
> Any help/ideas is appreciated.
>
> TIA,
>
> George
When building in Eclipse, the builder is indeed using resource paths,
i.e. relative to workspace root.

Now, you can always find the resource again (given the path) and ask it
for its true location.
Previous Topic:Exporting plugin
Next Topic:How to maintain marker position when code is changed?
Goto Forum:
  


Current Time: Sat Jul 19 17:20:33 EDT 2025

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

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

Back to the top