Wikitext question [message #926700] |
Fri, 28 September 2012 18:37  |
Eclipse User |
|
|
|
Hi everybody,
I am banging the head against this so I will ask to the experts for advice.
What I would like to accomplish is quite simple: open a wikitext editor
on some data that comes from the network and that is stored, let's say,
in a custom object.
Using
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(...,
"org.eclipse.mylyn.wikitext.ui.editor.markupEditor"); doesn't seem a
good idea beacuse apparently it accepts only FileEditorInput inputs.
WikitextSourceEditor seems and AFAIU, I should extend it, setting a
custom document provider that will create documents from my custom
objects, register it in plugin.xml and call it with openEditor.
Could you please tell me if this is correct or if I am missing anything?
Are there examples about applications using Wikitext on custom
not-necessarily-file-stored data?
Thanks,
Fabio
|
|
|
|
Re: Wikitext question [message #987131 is a reply to message #926700] |
Fri, 23 November 2012 12:21  |
Eclipse User |
|
|
|
WikiTextSourceEditor is what you're looking for if you'd like to open an
editor using an IEditorInput. You should extend it and register your
class using the Eclipse org.eclipse.ui.editors extension point.
Unfortunately there are no examples of its use.
If you're interested in embedding a wikitext source editor somewhere
(ie: not using an IEditorInput) then you should have a look at
org.eclipse.mylyn.wikitext.tasks.ui.editor.MarkupTaskEditorExtension
which does this for the Mylyn task editor.
David
On 9/28/2012 3:37 PM, Fabio Mancinelli wrote:
> Hi everybody,
>
> I am banging the head against this so I will ask to the experts for advice.
>
> What I would like to accomplish is quite simple: open a wikitext editor
> on some data that comes from the network and that is stored, let's say,
> in a custom object.
>
> Using
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(...,
> "org.eclipse.mylyn.wikitext.ui.editor.markupEditor"); doesn't seem a
> good idea beacuse apparently it accepts only FileEditorInput inputs.
>
> WikitextSourceEditor seems and AFAIU, I should extend it, setting a
> custom document provider that will create documents from my custom
> objects, register it in plugin.xml and call it with openEditor.
>
> Could you please tell me if this is correct or if I am missing anything?
>
> Are there examples about applications using Wikitext on custom
> not-necessarily-file-stored data?
>
> Thanks,
> Fabio
>
|
|
|
Powered by
FUDForum. Page generated in 0.23442 seconds