Saving model to other format [message #187606] |
Sun, 18 May 2008 19:53  |
Eclipse User |
|
|
|
Hi,
I´m actually needing is to save the model in another format (it´s a plain
text format, not XML) and also to be able to reconstract the model parsing
files with this format.
I thought of keepnig the defaut EMF xml format (not to have any problems
with the generated code for the designer), and having a separate file with
the format I need.
Following this article:
http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html, I
now have a multipage editor that shows the designer in one tab and the plain
text file in the other.
Now my problem is what´s the best way to keep these both files in sync?
Syncronizing files in the Save command is not enought, as both files can be
changes before the saving. Regenerating the opposite file when the other
changes, could be quite unperformant.
Is there a way to extend the editingDomain in some way to help with this?
Any help or idea will be appreciated! :-)
Thank you!
|
|
|
Re: Saving model to other format [message #187698 is a reply to message #187606] |
Mon, 19 May 2008 08:36  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Matias,
There are no trivial solutions to keeping a source view (of any kind)
and a model parsed from that source in sync. You generally would need
some type of mechanism for doing incremental updates in both directions
(like WTP's Structured Source Editor does with it's DOM).
Matias Bonaventura wrote:
> Hi,
>
> I´m actually needing is to save the model in another format (it´s a
> plain text format, not XML) and also to be able to reconstract the
> model parsing files with this format.
>
> I thought of keepnig the defaut EMF xml format (not to have any
> problems with the generated code for the designer), and having a
> separate file with the format I need.
> Following this article:
> http://www.eclipse.org/articles/article.php?file=Article-Int egrating-EMF-GMF-Editors/index.html,
> I now have a multipage editor that shows the designer in one tab and
> the plain text file in the other.
>
> Now my problem is what´s the best way to keep these both files in sync?
> Syncronizing files in the Save command is not enought, as both files
> can be changes before the saving. Regenerating the opposite file when
> the other changes, could be quite unperformant.
> Is there a way to extend the editingDomain in some way to help with this?
>
> Any help or idea will be appreciated! :-)
>
>
> Thank you!
|
|
|
Powered by
FUDForum. Page generated in 0.09616 seconds