[MultiPageEditorPart] Is there any mechanizm to synchronized EditorPart? [message #448788] |
Tue, 02 May 2006 09:30  |
Eclipse User |
|
|
|
Originally posted by: energumen.op.pl
Hi,
I have MultiPageEditorPart (m), two EditorPart(a and b), and IEditorInput
(i).
When I change content into one EditorPart I want see this change in second
EditorPart(before I saving change).
Is there any standard machanizm to do this? I see multipage editor exaple in
Eclipse,
and there all chnage are put to second EditorPart into setActivePage. But
there wasn't any common object to keep
actual data state.
My EditorParts read data from IEditorInput, how can I implementing correct
exchange mechanizm?
Maybe I should alwas put data from last active EditorPart to next into
setActivePage?
Thanks
MB
|
|
|
Re: [MultiPageEditorPart] Is there any mechanizm to synchronized EditorPart? [message #448789 is a reply to message #448788] |
Tue, 02 May 2006 09:59  |
Eclipse User |
|
|
|
Check out how text editors work.
When given an IEditorInput, they go to an IDocumentProvider, which
returns them an IDocument (the content model). The same IEditorInput
will return the same underlying IDocument model.
You could use a similar pattern, or investigate if there's a way to use
IDocumentProvider and IDocument. If you're investigating, start with
TextEditor.
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 0.03523 seconds