Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Multipage editor
Multipage editor [message #670012] Thu, 12 May 2011 12:21 Go to next message
Andrey  is currently offline Andrey Friend
Messages: 4
Registered: April 2011
Junior Member
I have following sitution.
Multipage editor.
xml file as an input for multipage editor.
First page is Managed form(implements IFormPage), that represent xml file as a table and allow to change some of its part.
Second page is simple text xml editor, that allows to change xml.

I need to synchronize modifications done in text editor and 'gui editor'.

Whenever I change something in text editor, gui editor has to be updated and vice versa.

gui editor - managed form - consist of a few parts, one of which only allow input data modification.
As mentioned This section is table with customized content provider.

My current thoughts of how to organize this:
on MultipageEditor doSave() callback :
- somehow inform gui editor that input has been changed.
- managed form should consequently inform all editable parts that input data has changed.
- each editable part has to update its table viewer , and tableviewer consequently has to call refresh method
- somehow inform xml editor that input has been changed
- editor has to update input data.

I don't like how I see it.There is definetely some flaw in my logic. There has to be another way to organize things.
How exactly should I inform gui form and xml editor?

I would appreciate any tips and advice or links( I might have missed some crucial material that would have helped me out).
Re: Multipage editor [message #670023 is a reply to message #670012] Thu, 12 May 2011 12:55 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You need some kind of model, or shared representation, that can notify you of changes. A common implementation I've seen says the XML is the model, and uses org.eclipse.jface.text.source.SourceViewer as the implementation of the XML page. It fires a number of notification events when the source is changed, that would allow you to update your form fields.

Then your form page needs to update the XML source when a field loses focus.

PW


Previous Topic:How to remove popup menus for a perspective
Next Topic:[CNF] Selection, switching model & IElementComparer
Goto Forum:
  


Current Time: Thu Apr 25 04:35:35 GMT 2024

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

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

Back to the top