[SOLVED] How to open a .java file in Eclipse programmatically? [message #649667] |
Thu, 20 January 2011 03:35  |
Eclipse User |
|
|
|
For those who are interested with the actual solution, please visit: http:// www.eclipse.org/forums/index.php?t=msg&th=203583&unr ead=1&S=8f8e4b034c1c9f1d2752e8381e6abff7
Hi all,
I want to open a .java file in a project in Eclipse's main window (i.e., list of files that you work on) using Eclipse API. It would be the exact correspondence of 'double' clicking that particular file (IFile) using the actual Eclipse as a user.
First of all is this possible (using Eclipse API, I think Eclipse does it itself (while applying some of the quick fixes etc.))? Second, could you show me a start point on what should I search for?
Actually, it would be better for me if I could just simulate whatever internal change is done during this opening process without actually opening the file itself (not sure if this is possible), but just asking.
I need this because I am trying to apply a Change object (by Change.perform(...)), and if the file is not open at the background (i.e., list of file that are being worked on), then the Change is not applied at all (I don't know why, and it somebody could point my why, that would be great knowledge for me).
Thanks in advance, regards,
[Updated on: Thu, 10 February 2011 06:38] by Moderator
|
|
|
Re: How to open a .java file in Eclipse programmatically? [message #649685 is a reply to message #649667] |
Thu, 20 January 2011 04:00  |
Eclipse User |
|
|
|
On 20.01.2011 09:35, Kivanc Muslu wrote:
> Hi all,
>
> I want to open a .java file in a project in Eclipse's main window
> (i.e., list of files that you work on) using Eclipse API.
See org.eclipse.ui.ide.IDE.openEditor(*).
Dani
> It would be the exact correspondence of 'double' clicking that
> particular file (IFile) using the actual Eclipse as a user.
>
> First of all is this possible (using Eclipse API, I think Eclipse does
> it itself (while applying some of the quick fixes etc.))? Second,
> could you show me a start point on what should I search for?
>
> Actually, it would be better for me if I could just simulate whatever
> internal change is done during this opening process without actually
> opening the file itself (not sure if this is possible), but just asking.
>
> I need this because I am trying to apply a Change object (by
> Change.perform(...)), and if the file is not open at the background
> (i.e., list of file that are being worked on), then the Change is not
> applied at all (I don't know why, and it somebody could point my why,
> that would be great knowledge for me).
>
> Thanks in advance, regards,
|
|
|
Powered by
FUDForum. Page generated in 0.15411 seconds