|
Re: How do I open an editor programmatically in Eclipse Helios [message #1014627 is a reply to message #1013433] |
Tue, 26 February 2013 02:23  |
Eclipse User |
|
|
|
On 23.02.2013 17:43, John Jhonson wrote:
> Hi everyone, I'm working with Eclipse Helios Service Release 2. I've
> been trying for a while to open an editor programmatically. Basically
> I need to create a file dynamically and then open the corresponding
> editor in Eclipse.
> I was trying to do something like it's detailed here:
> http://wiki.eclipse.org/FAQ_How_do_I_open_an_editor_programmatically%3F,
> but in this line:
>
> EFS.getLocalFileSystem().getStore(fileToOpen.toURI());
>
> I get a NPE, here is the log:
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at org.eclipse.core.filesystem.EFS.getLocalFileSystem(EFS.java:439)
> at
> org.eclipse.pde.uiimpact.refactoring.handlers.Test.createFile(Test.java:42)
> at
> org.eclipse.pde.uiimpact.refactoring.handlers.Test.main(Test.java:27)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.core.internal.filesystem.InternalFileSystemCore.<init>(InternalFileSystemCore.java:49)
> at
> org.eclipse.core.internal.filesystem.InternalFileSystemCore.<clinit>(InternalFileSystemCore.java:25)
> ... 3 more
>
>
> This is giving me such a hard time, the example of that FAQ is for
> Eclipse 3.3, I'm not sure if something should be different for Helios.
> I just can't find anything that works for me.
>
Looks like you start your app as normal 'Java Application' instead of as
'Eclipse Application'.
Dani
> I'd really appreciate if anybody can help me.
>
>
> Thanks!!
>
|
|
|
Powered by
FUDForum. Page generated in 0.03744 seconds