Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How can I get ICompilationUnit form a IFile ?
How can I get ICompilationUnit form a IFile ? [message #175412] Thu, 26 August 2004 11:05 Go to next message
Eclipse UserFriend
Originally posted by: esalbuquerque.hotmail.com

How can I get ICompilationUnit form a IFile ?

For example:

...
IFile fileSource01 = (IFile)project.findMember("Source01.java");
...
// ICompilationUnit icu = XXXXXXXXXXXXXX;
// HOW ??
...

Thanks
Re: How can I get ICompilationUnit form a IFile ? [message #175428 is a reply to message #175412] Thu, 26 August 2004 11:12 Go to previous messageGo to next message
Eclipse UserFriend
JavaCore.createCompilationUnitFrom(IFile)

"Eduardo Soares Albuquerque" <esalbuquerque@hotmail.com> wrote in message
news:cgku7i$3od$1@eclipse.org...
> How can I get ICompilationUnit form a IFile ?
>
> For example:
>
> ..
> IFile fileSource01 = (IFile)project.findMember("Source01.java");
> ..
> // ICompilationUnit icu = XXXXXXXXXXXXXX;
> // HOW ??
> ..
>
> Thanks
>
Re: How can I get ICompilationUnit form a IFile ? [message #175449 is a reply to message #175428] Thu, 26 August 2004 11:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: esalbuquerque.hotmail.com

Thanks !!


Jerome Lanneluc wrote:

> JavaCore.createCompilationUnitFrom(IFile)

> "Eduardo Soares Albuquerque" <esalbuquerque@hotmail.com> wrote in message
> news:cgku7i$3od$1@eclipse.org...
> > How can I get ICompilationUnit form a IFile ?
> >
> > For example:
> >
> > ..
> > IFile fileSource01 = (IFile)project.findMember("Source01.java");
> > ..
> > // ICompilationUnit icu = XXXXXXXXXXXXXX;
> > // HOW ??
> > ..
> >
> > Thanks
> >
Re: How can I get ICompilationUnit form a IFile ? [message #545678 is a reply to message #175412] Thu, 08 July 2010 11:03 Go to previous messageGo to next message
Eclipse UserFriend
Can I get ICompilationUnit from .properties file?!

i need IResource of properties to put a Marker on some lines of it.
Re: How can I get ICompilationUnit form a IFile ? [message #548189 is a reply to message #545678] Tue, 20 July 2010 22:32 Go to previous messageGo to next message
Eclipse UserFriend
Dimitri wrote on Thu, 08 July 2010 11:03
Can I get ICompilationUnit from .properties file?!

No. ICompilationUnit only corresponds to .java files.

You should be able to get the IResource out of the IFile.

Olivier
Re: How can I get ICompilationUnit form a IFile ? [message #549823 is a reply to message #548189] Wed, 28 July 2010 02:58 Go to previous message
Eclipse UserFriend
It works fine now!
Thank you for your help!
Previous Topic:Relocated/move/drag breakpoint?
Next Topic:Help with creating new project from source in Eclipse Helios
Goto Forum:
  


Current Time: Tue Jul 15 03:57:46 EDT 2025

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

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

Back to the top