Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » opening an editor with FileEditorInput
opening an editor with FileEditorInput [message #456004] Tue, 10 October 2006 18:03 Go to next message
Eclipse UserFriend
Originally posted by: kostadin.gmail.com

I'm using the Web Tools Project (WTP) XML editor within my RCP
application. In order to open a new file using this editor I read that I
ought to use a FileEditorInput object. However, I can't access this
particular type from 'org.eclipse.ui.part'. I don't understand why??

Alternatively, I noticed that the editor gets opened within the Eclipse
workbench (in 'Open File...') using a JavaFileEditorInput. This one works,
but again access restrictions and warnings everywhere. I wanted to open a
new file, but since I ripped this approach from the 'Open File...' menu
option I have to have an actual file on disk. This isn't very smooth at
all.

Is there a better alternative to what I've tried in order to open a new
file using an external editor? Is there a better XML editor for RCP (seems
that all existing XML editors I find are written for the workbench and not
ideal for RCP apps)?

I appreciate any comments or ideas. Thanks,
-Kosta
Re: opening an editor with FileEditorInput [message #456020 is a reply to message #456004] Wed, 11 October 2006 02:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi Kosta,

FileEditorInput is in the org.eclipse.ui.ide plugin. From there you
should be able to access it.


Regards,
Jan

Kosta Damevski schrieb:
> I'm using the Web Tools Project (WTP) XML editor within my RCP
> application. In order to open a new file using this editor I read that I
> ought to use a FileEditorInput object. However, I can't access this
> particular type from 'org.eclipse.ui.part'. I don't understand why??
>
> Alternatively, I noticed that the editor gets opened within the Eclipse
> workbench (in 'Open File...') using a JavaFileEditorInput. This one
> works, but again access restrictions and warnings everywhere. I wanted
> to open a new file, but since I ripped this approach from the 'Open
> File...' menu option I have to have an actual file on disk. This isn't
> very smooth at all.
>
> Is there a better alternative to what I've tried in order to open a new
> file using an external editor? Is there a better XML editor for RCP
> (seems that all existing XML editors I find are written for the
> workbench and not ideal for RCP apps)?
>
> I appreciate any comments or ideas. Thanks,
> -Kosta
>
Re: opening an editor with FileEditorInput [message #456073 is a reply to message #456020] Wed, 11 October 2006 17:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kostadin.gmail.com

I guess I still don't know how to use the FileEditorInput. It requires an
'org.eclipse.core.resources.IFile' object in it's constructor. The only
concrete subclass of IFile avialable
'org.eclipse.core.internal.resources.File'. This File class is constructed
using a Workspace object... how do I get that from an RCP app. I used this
line:

IWorkspace workspace = ResourcesPlugin.getWorkspace();

..and it doesn't want an IWorkspace object. Anyhow, all of this seems a
bit strange to me as I proceed. Too many internals, too many warnings. Is
there a simpler way to do this?

-Kosta
Re: opening an editor with FileEditorInput [message #459531 is a reply to message #456004] Mon, 04 December 2006 16:40 Go to previous message
Eclipse UserFriend
Did you sort this out?
I am looking to do the very same. An RCP app with an XML editor. Any luck?
Previous Topic:adding Plugins adds Actions, button in toolbar and preferences page...
Next Topic:views in same space
Goto Forum:
  


Current Time: Mon Mar 17 01:54:00 EDT 2025

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

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

Back to the top