[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Practicalities of GMF

Tobias,

It's good advice because it's scary to work without version control. The merging generator is nice because it only overwrites files that actually change, so when you regenerate, you can determine exactly what's been touched and needs to be checked in.

Martin,

Another good pattern to use, when possible, is to rename a method foo, to fooGen and then call fooGen for your specialized foo method. This way fooGen will still be regenerated and your override of it will be preserved. It's effectively like creating a derived class and putting your override in there...


Tobias wrote:
One more remark: If possible, you should use some kind of version control system, such as CVS or SVN. And if this is not part of your working infrastructure, you should set up one on your local machine. Sometimes it just happens that you forget to change a @generated tag to @generated NOT, which can not only cost you hours of work, but worse: you will most likely not even notice that the code has been overwritten, at least not immediately. Synchronizing your projects with a SVN, e.g. using Subclipse, you can see which files have been changed, and how, when regenerating the code.

Regards,
Tobias


Martin schrieb:
Hi,

I'm new to GMF and I am trying to understand how to organise things so that I don't overwrite my work. For instance, what if I want to add an element or attribute to my model, can I go back and regenerate all my files without wasting all the work I have done to set them up? Or say I want to make changes to the graphical model, how can I do this using GMF without overwriting any changes that I have made to my code?

Of is GMF just something intended to be used once, then all subsequent changes are made to the code?

The other issue is that I am generating a RCP application. The application works but I am having trouble dealing with the complexity, as I understand things Eclipse does this by dividing things into smaller plugins, having used GMF to create an RCP application can I then switch to just editing the models as a plugin?

Martin