[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform] Re: Editor - not based on resource
|
- From: Paul Webster <pwebster@xxxxxxxxxx>
- Date: Thu, 01 Dec 2005 07:42:34 -0500
- Newsgroups: eclipse.platform
- Organization: EclipseCorner
- User-agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929)
Judith wrote:
I want to show a datastructure in an editor which is not based on a
single resource. The datastructure is the result of merging several files.
How can I implement an editor that is not based on a resource?
You can use an action to open your editor with something like:
window.getActivePage().openEditor(editorInput, MyFormEditor.ID);
For your editor input, you can create a special one that holds the in
memory datastructure that you need.
As long as your input implements IEditorInput, it should open fine.
I've even opened editors using an anonymous IEditorInput class, ex:
window.getActivePage().openEditor(new IEditorInput() {
//... all the methods that need to be implemented
}, MyEditor.ID);
Later,
PW