Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » What is the workflow to update a model generated from xsd schema
What is the workflow to update a model generated from xsd schema [message #418548] Fri, 18 April 2008 08:27 Go to next message
Sébastien  Gandon is currently offline Sébastien GandonFriend
Messages: 184
Registered: July 2009
Senior Member
Hello,
I have an ecore model generated from a schema (I also genereted a schema
to ecore map) and then generated the model classes and edit plugin.
I changed the schema to add an attribute.

How do I change the ecore model ?
The only way I found was to do it by hand (not error prone...)

What is the use of the xsd2ecore map ?
I do not find any way to update it, I had to edit the xml file instead.

When I generated the edit plugin the plugin.properties was not update
with me new property strings, why ?

Thanks for any lead.

SeB.
Re: What is the workflow to update a model generated from xsd schema [message #418596 is a reply to message #418548] Mon, 21 April 2008 20:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
SeB,

It's like this post was back dated...

From the popup on the *.genmodel resource or the "Generator" menubar
item of the opened *.genmodel you can invoke "Reload..." This will
allow you to walk through the wizard steps again and will update your
..ecore model while preserving the .genmodel's various settings. The
plugin.properties should be updated to include any new properties needed
by the code? You're invoking generate from the root GenModel and not
from one of the child GenPackage's aren't you?


SeB.fr wrote:
> Hello,
> I have an ecore model generated from a schema (I also genereted a
> schema to ecore map) and then generated the model classes and edit
> plugin.
> I changed the schema to add an attribute.
>
> How do I change the ecore model ?
> The only way I found was to do it by hand (not error prone...)
>
> What is the use of the xsd2ecore map ?
> I do not find any way to update it, I had to edit the xml file instead.
>
> When I generated the edit plugin the plugin.properties was not update
> with me new property strings, why ?
>
> Thanks for any lead.
>
> SeB.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: What is the workflow to update a model generated from xsd schema [message #418613 is a reply to message #418596] Tue, 22 April 2008 07:36 Go to previous messageGo to next message
Sébastien  Gandon is currently offline Sébastien GandonFriend
Messages: 184
Registered: July 2009
Senior Member
Thanks Ed,

I am sorry that some of my questions seem to be basic, documentation on
EMF (and generally on Eclipse) are difficult to find, they are spreaded
around and it is hard to find stuff. and very anoying to spend time to
look around for information and not find them.
That is why I find this forum very useful and people like you making the
difference, thanks a lot.

The problem with update the plugin.properties was solved, the file was
read-only and there again I had not hint when generating that the file
could not be updated.

Thanks for the "Reload...", may be the name of this action should be
change because it does not imply (by it's name) that the wizard will be
show and the ecore model may be rebuilt.

SeB.


Ed Merks wrote:

> SeB,

> It's like this post was back dated...

> From the popup on the *.genmodel resource or the "Generator" menubar
> item of the opened *.genmodel you can invoke "Reload..." This will
> allow you to walk through the wizard steps again and will update your
> ..ecore model while preserving the .genmodel's various settings. The
> plugin.properties should be updated to include any new properties needed
> by the code? You're invoking generate from the root GenModel and not
> from one of the child GenPackage's aren't you?


> SeB.fr wrote:
>> Hello,
>> I have an ecore model generated from a schema (I also genereted a
>> schema to ecore map) and then generated the model classes and edit
>> plugin.
>> I changed the schema to add an attribute.
>>
>> How do I change the ecore model ?
>> The only way I found was to do it by hand (not error prone...)
>>
>> What is the use of the xsd2ecore map ?
>> I do not find any way to update it, I had to edit the xml file instead.
>>
>> When I generated the edit plugin the plugin.properties was not update
>> with me new property strings, why ?
>>
>> Thanks for any lead.
>>
>> SeB.
>>
Re: What is the workflow to update a model generated from xsd schema [message #418618 is a reply to message #418613] Tue, 22 April 2008 11:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040607000307090209090504
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

SeB,

Comments below.

SeB.fr wrote:
> Thanks Ed,
>
> I am sorry that some of my questions seem to be basic, documentation
> on EMF (and generally on Eclipse) are difficult to find, they are
> spreaded around and it is hard to find stuff. and very anoying to
> spend time to look around for information and not find them.
The problem is there's either so little documentation you can't find
anything, or there's lots of it, and it's hard to find what you want
among all the information. And of course each person is looking for
something different. And lastly, very few people, when they've spent a
lot of time finding something or discovering some cool technique bother
to add to the FAQ or writing a recipe so that the next guy has an easier
time and can expand the knowledge base.
> That is why I find this forum very useful and people like you making
> the difference, thanks a lot.
It's always nice to have direct questions answered. I should do a
better job updating the FAQ.

2.44 How do I update my Ecore and GenModel after the originating
model has changed?
< http://wiki.eclipse.org/EMF/FAQ#How_do_I_update_my_Ecore_and _GenModel_after_the_originating_model_has_changed.3F>

>
> The problem with update the plugin.properties was solved, the file was
> read-only and there again I had not hint when generating that the file
> could not be updated.
Is your repository service making them read only? The generator does
use validate edit in an attempt to make the resource writeable, and a
repository service that supports check-out or locking could exploit
that. If not, how do your resources end up being read only?
>
> Thanks for the "Reload...", may be the name of this action should be
> change because it does not imply (by it's name) that the wizard will
> be show and the ecore model may be rebuilt.
It's been that way for a long time, so I'd be reluctant to change it and
have folks wonder where their familiar menu item has gone.
>
> SeB.
>
>
> Ed Merks wrote:
>
>> SeB,
>
>> It's like this post was back dated...
>
>> From the popup on the *.genmodel resource or the "Generator" menubar
>> item of the opened *.genmodel you can invoke "Reload..." This will
>> allow you to walk through the wizard steps again and will update your
>> ..ecore model while preserving the .genmodel's various settings.
>> The plugin.properties should be updated to include any new properties
>> needed by the code? You're invoking generate from the root GenModel
>> and not from one of the child GenPackage's aren't you?
>
>
>> SeB.fr wrote:
>>> Hello,
>>> I have an ecore model generated from a schema (I also genereted a
>>> schema to ecore map) and then generated the model classes and edit
>>> plugin.
>>> I changed the schema to add an attribute.
>>>
>>> How do I change the ecore model ?
>>> The only way I found was to do it by hand (not error prone...)
>>>
>>> What is the use of the xsd2ecore map ?
>>> I do not find any way to update it, I had to edit the xml file instead.
>>>
>>> When I generated the edit plugin the plugin.properties was not
>>> update with me new property strings, why ?
>>>
>>> Thanks for any lead.
>>>
>>> SeB.
>>>
>
>


--------------040607000307090209090504
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
SeB,<br>
<br>
Comments below.<br>
<br>
SeB.fr wrote:
<blockquote
cite="mid:e96116ed16ae9545e13e2cb13966b603$1@www.eclipse.org"
type="cite">Thanks Ed,
<br>
<br>
I am sorry that some of my questions seem to be basic, documentation on
EMF (and generally on Eclipse) are difficult to find, they are spreaded
around and it is hard to find stuff. and very anoying to spend time to
look around for information and not find them.
<br>
</blockquote>
The problem is there's either so little documentation you can't find
anything, or there's lots of it, and it's hard to find what you want
among all the information.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: What is the workflow to update a model generated from xsd schema [message #418631 is a reply to message #418618] Tue, 22 April 2008 14:48 Go to previous messageGo to next message
Sébastien  Gandon is currently offline Sébastien GandonFriend
Messages: 184
Registered: July 2009
Senior Member
I Ed,

Your are doing a great job helping us people out there.
About my repository service, we use an external Configuration managment
software (Telelogic Synergy) that is not integrated into eclipse (too bad)
that is why we have trouble with editing, generating files with eclipse.

SeB.
Ed Merks wrote:

> SeB,

> Comments below.

> SeB.fr wrote:
>> Thanks Ed,
>>
>> I am sorry that some of my questions seem to be basic, documentation
>> on EMF (and generally on Eclipse) are difficult to find, they are
>> spreaded around and it is hard to find stuff. and very anoying to
>> spend time to look around for information and not find them.
> The problem is there's either so little documentation you can't find
> anything, or there's lots of it, and it's hard to find what you want
> among all the information. And of course each person is looking for
> something different. And lastly, very few people, when they've spent a
> lot of time finding something or discovering some cool technique bother
> to add to the FAQ or writing a recipe so that the next guy has an easier
> time and can expand the knowledge base.
>> That is why I find this forum very useful and people like you making
>> the difference, thanks a lot.
> It's always nice to have direct questions answered. I should do a
> better job updating the FAQ.

> 2.44 How do I update my Ecore and GenModel after the originating
> model has changed?
>
< http://wiki.eclipse.org/EMF/FAQ#How_do_I_update_my_Ecore_and _GenModel_after_the_originating_model_has_changed.3F>

>>
>> The problem with update the plugin.properties was solved, the file was
>> read-only and there again I had not hint when generating that the file
>> could not be updated.
> Is your repository service making them read only? The generator does
> use validate edit in an attempt to make the resource writeable, and a
> repository service that supports check-out or locking could exploit
> that. If not, how do your resources end up being read only?
>>
>> Thanks for the "Reload...", may be the name of this action should be
>> change because it does not imply (by it's name) that the wizard will
>> be show and the ecore model may be rebuilt.
> It's been that way for a long time, so I'd be reluctant to change it and
> have folks wonder where their familiar menu item has gone.
>>
>> SeB.
>>
>>
>> Ed Merks wrote:
>>
>>> SeB,
>>
>>> It's like this post was back dated...
>>
>>> From the popup on the *.genmodel resource or the "Generator" menubar
>>> item of the opened *.genmodel you can invoke "Reload..." This will
>>> allow you to walk through the wizard steps again and will update your
>>> ..ecore model while preserving the .genmodel's various settings.
>>> The plugin.properties should be updated to include any new properties
>>> needed by the code? You're invoking generate from the root GenModel
>>> and not from one of the child GenPackage's aren't you?
>>
>>
>>> SeB.fr wrote:
>>>> Hello,
>>>> I have an ecore model generated from a schema (I also genereted a
>>>> schema to ecore map) and then generated the model classes and edit
>>>> plugin.
>>>> I changed the schema to add an attribute.
>>>>
>>>> How do I change the ecore model ?
>>>> The only way I found was to do it by hand (not error prone...)
>>>>
>>>> What is the use of the xsd2ecore map ?
>>>> I do not find any way to update it, I had to edit the xml file instead.
>>>>
>>>> When I generated the edit plugin the plugin.properties was not
>>>> update with me new property strings, why ?
>>>>
>>>> Thanks for any lead.
>>>>
>>>> SeB.
>>>>
>>
>>
Re: What is the workflow to update a model generated from xsd schema [message #418640 is a reply to message #418631] Tue, 22 April 2008 15:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
SeB,

I think IBM just bought Telelogic. Maybe that will help with providing
better Eclipse integration. Of course there's the whole Jazz initiative
too...

Maybe we should be warning the user when a read-only resource prevents
the generator from producing all its results...


SeB.fr wrote:
> I Ed,
>
> Your are doing a great job helping us people out there.
> About my repository service, we use an external Configuration
> managment software (Telelogic Synergy) that is not integrated into
> eclipse (too bad) that is why we have trouble with editing, generating
> files with eclipse.
>
> SeB.
> Ed Merks wrote:
>
>> SeB,
>
>> Comments below.
>
>> SeB.fr wrote:
>>> Thanks Ed,
>>>
>>> I am sorry that some of my questions seem to be basic, documentation
>>> on EMF (and generally on Eclipse) are difficult to find, they are
>>> spreaded around and it is hard to find stuff. and very anoying to
>>> spend time to look around for information and not find them.
>> The problem is there's either so little documentation you can't find
>> anything, or there's lots of it, and it's hard to find what you want
>> among all the information. And of course each person is looking for
>> something different. And lastly, very few people, when they've spent
>> a lot of time finding something or discovering some cool technique
>> bother to add to the FAQ or writing a recipe so that the next guy has
>> an easier time and can expand the knowledge base.
>>> That is why I find this forum very useful and people like you making
>>> the difference, thanks a lot.
>> It's always nice to have direct questions answered. I should do a
>> better job updating the FAQ.
>
>> 2.44 How do I update my Ecore and GenModel after the originating
>> model has changed?
>>
> < http://wiki.eclipse.org/EMF/FAQ#How_do_I_update_my_Ecore_and _GenModel_after_the_originating_model_has_changed.3F>
>
>
>>>
>>> The problem with update the plugin.properties was solved, the file
>>> was read-only and there again I had not hint when generating that
>>> the file could not be updated.
>> Is your repository service making them read only? The generator does
>> use validate edit in an attempt to make the resource writeable, and a
>> repository service that supports check-out or locking could exploit
>> that. If not, how do your resources end up being read only?
>>>
>>> Thanks for the "Reload...", may be the name of this action should be
>>> change because it does not imply (by it's name) that the wizard will
>>> be show and the ecore model may be rebuilt.
>> It's been that way for a long time, so I'd be reluctant to change it
>> and have folks wonder where their familiar menu item has gone.
>>>
>>> SeB.
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>> SeB,
>>>
>>>> It's like this post was back dated...
>>>
>>>> From the popup on the *.genmodel resource or the "Generator"
>>>> menubar item of the opened *.genmodel you can invoke "Reload..."
>>>> This will allow you to walk through the wizard steps again and will
>>>> update your ..ecore model while preserving the .genmodel's various
>>>> settings. The plugin.properties should be updated to include any
>>>> new properties needed by the code? You're invoking generate from
>>>> the root GenModel and not from one of the child GenPackage's aren't
>>>> you?
>>>
>>>
>>>> SeB.fr wrote:
>>>>> Hello,
>>>>> I have an ecore model generated from a schema (I also genereted a
>>>>> schema to ecore map) and then generated the model classes and edit
>>>>> plugin.
>>>>> I changed the schema to add an attribute.
>>>>>
>>>>> How do I change the ecore model ?
>>>>> The only way I found was to do it by hand (not error prone...)
>>>>>
>>>>> What is the use of the xsd2ecore map ?
>>>>> I do not find any way to update it, I had to edit the xml file
>>>>> instead.
>>>>>
>>>>> When I generated the edit plugin the plugin.properties was not
>>>>> update with me new property strings, why ?
>>>>>
>>>>> Thanks for any lead.
>>>>>
>>>>> SeB.
>>>>>
>>>
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: What is the workflow to update a model generated from xsd schema [message #418655 is a reply to message #418640] Wed, 23 April 2008 07:34 Go to previous messageGo to next message
Sébastien  Gandon is currently offline Sébastien GandonFriend
Messages: 184
Registered: July 2009
Senior Member
Ed,
I think users should defenetly be warned when something goes unexpected.

SeB.
Re: What is the workflow to update a model generated from xsd schema [message #418658 is a reply to message #418655] Wed, 23 April 2008 10:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
SeB,

It seems to me the real problem is lack of validate edit support for
your source code control system; it sounds like it will be a major pain
to have to figure what files all need to be checked out based on a
dialog coming up telling you what files couldn't be updated... Perhaps
the GenModel's redirection pattern will help with that. Any files that
need to be regenerated but can't be written will generate to a
redirected new file name. Would that help make things easier? I don't
imagine having a dialog come up with a list of file names will be all
that useful...


SeB.fr wrote:
> Ed,
> I think users should defenetly be warned when something goes unexpected.
>
> SeB.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: What is the workflow to update a model generated from xsd schema [message #418682 is a reply to message #418658] Wed, 23 April 2008 21:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.gandon.name

I Ed,
when we check back in source code in our Synergy database, the files
become read-only.
What would be great during generationg would be to override if the users
decides it or being warned that something could not be updated if
overwrite is not possible.
Actually I just discovered the genmodel attribute in Template&Merge called
"Force Overwrite" that probably does what I need.
The only import thing left is just to warned the user when some action he
asked for did not perform quiet as expected.

SeB.

Ed Merks wrote:

> SeB,

> It seems to me the real problem is lack of validate edit support for
> your source code control system; it sounds like it will be a major pain
> to have to figure what files all need to be checked out based on a
> dialog coming up telling you what files couldn't be updated... Perhaps
> the GenModel's redirection pattern will help with that. Any files that
> need to be regenerated but can't be written will generate to a
> redirected new file name. Would that help make things easier? I don't
> imagine having a dialog come up with a list of file names will be all
> that useful...


> SeB.fr wrote:
>> Ed,
>> I think users should defenetly be warned when something goes unexpected.
>>
>> SeB.
>>
Re: What is the workflow to update a model generated from xsd schema [message #418683 is a reply to message #418682] Wed, 23 April 2008 22:05 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
SeB,

Open a bugzilla and we'll look into that.


ekaii wrote:
> I Ed,
> when we check back in source code in our Synergy database, the files
> become read-only.
> What would be great during generationg would be to override if the
> users decides it or being warned that something could not be updated
> if overwrite is not possible.
> Actually I just discovered the genmodel attribute in Template&Merge
> called "Force Overwrite" that probably does what I need.
> The only import thing left is just to warned the user when some action
> he asked for did not perform quiet as expected.
>
> SeB.
>
> Ed Merks wrote:
>
>> SeB,
>
>> It seems to me the real problem is lack of validate edit support for
>> your source code control system; it sounds like it will be a major
>> pain to have to figure what files all need to be checked out based on
>> a dialog coming up telling you what files couldn't be updated...
>> Perhaps the GenModel's redirection pattern will help with that. Any
>> files that need to be regenerated but can't be written will generate
>> to a redirected new file name. Would that help make things easier?
>> I don't imagine having a dialog come up with a list of file names
>> will be all that useful...
>
>
>> SeB.fr wrote:
>>> Ed,
>>> I think users should defenetly be warned when something goes
>>> unexpected.
>>>
>>> SeB.
>>>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Modifying a static ecore model via the EMF dynamic API
Next Topic:Relative references to XMLTypePackage types in ecore
Goto Forum:
  


Current Time: Thu Mar 28 21:05:25 GMT 2024

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

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

Back to the top