Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TEXO] Allowed chars in EPackage name
[TEXO] Allowed chars in EPackage name [message #684302] Wed, 15 June 2011 11:43 Go to next message
gdelprete is currently offline gdelpreteFriend
Messages: 10
Registered: June 2011
Junior Member
Hello,

which are the allowed chars in the name feature of a EPackage?

We used to have names woth dot-separated elements ("org.test.mytest"); this worked until about 1 month ago, but now Texo rejects it with "The name 'org.test.mytest' is not well formed".

Was this changed each EPackage should really model only one component in a fully qualified Java package name (that is, to support nesting EPackages)?

[Updated on: Wed, 15 June 2011 11:43]

Report message to a moderator

Re: [TEXO] Allowed chars in EPackage name [message #685077 is a reply to message #684302] Thu, 16 June 2011 19:13 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
The answer is a bit later because your question posted on the web forum is not synced with the newsgroup it seems.

I added validation of the ecore model to the code generation, the validation is done before the code generation starts.

I encountered this issue myself (that names with dots are not allowed) and it can be annoying. Can you enter a bugzilla for it?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT&component=Texo

then I can take a look at it.

gr. Martin
Re: [TEXO] Allowed chars in EPackage name [message #685777 is a reply to message #685077] Sun, 19 June 2011 21:19 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
I was doing another change (orphan-removal was not generated in the orm.xml) and have made a change which should hopefully also solve your issue with the name check.

Can you retry with the latest build?

gr. Martin
Re: [TEXO] Allowed chars in EPackage name [message #685854 is a reply to message #685777] Mon, 20 June 2011 11:45 Go to previous messageGo to next message
gdelprete is currently offline gdelpreteFriend
Messages: 10
Registered: June 2011
Junior Member
Hi,

I did not notice your replies until today... I was sure I checked the Post Notification checkbox. Oh, well.

Today I updated my eclipse plugins to the latest version (right now Texo is at 0.1.0.v201106191954 -- tell me if it's ok), however, I tried regenerating the code and it still complains about dots in the EPackage's name feature.

Or should I get a nightly build?

Regards,
Gabriele

Re: [TEXO] Allowed chars in EPackage name [message #685976 is a reply to message #685854] Tue, 21 June 2011 08:30 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Yes this build is fine, so I guess it is not yet solved. Can you enter a bugzilla? Then I will take a look at it.

gr. Martin
Re: [TEXO] Allowed chars in EPackage name [message #686035 is a reply to message #685976] Tue, 21 June 2011 13:16 Go to previous messageGo to next message
gdelprete is currently offline gdelpreteFriend
Messages: 10
Registered: June 2011
Junior Member
Done, it's bug #349942.

Bye,
Gabriele
Re: [TEXO] Allowed chars in EPackage name [message #719122 is a reply to message #684302] Fri, 26 August 2011 06:51 Go to previous messageGo to next message
gdelprete is currently offline gdelpreteFriend
Messages: 10
Registered: June 2011
Junior Member
I've seen the bug was closed as invalid and it was decided not to allow dots in the EPackage name. This is fine for me.

Please note, however, that it you create an Ecore model from an XSD file, the package name will be generated as a fully qualified name with dots. It's probably better now to change the algorithm for EPackage name generation for the XSD->Ecore case so that it it is consistent to what Texo expects when generating che code.
Re: [TEXO] Allowed chars in EPackage name [message #719123 is a reply to message #719122] Fri, 26 August 2011 06:53 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hmm I have not thought about that, I will ask Ed what the EMF approach is here.

gr. Martin

On 08/26/2011 08:51 AM, gdelprete wrote:
> I've seen the bug was closed as invalid and it was decided not to allow dots in the EPackage name. This is fine for me.
>
> Please note, however, that it you create an Ecore model from an XSD file, the package name will be generated as a fully
> qualified name with dots. It's probably better now to change the algorithm for EPackage name generation for the
> XSD->Ecore case so that it it is consistent to what Texo expects when generating che code.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [TEXO] Allowed chars in EPackage name [message #719308 is a reply to message #719123] Fri, 26 August 2011 16:15 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Martin,

The package name isn't allowed to contain dots, but the XSDEcoreBuilder
passed the data base to the importer in that form, which then strips it
out so it can set the GenPackage.basePackage from that. With the work
on Xcore I'm looking at better ways to capture this information, i.e.,
an annotation with the GenModel's nsURI as the source and a basePackage
key. Given that approach, it will be better for the XSDEcoreBuilder to
use that approach as well (though I suppose changing the builder could
break existing clients, so I'm not sure how best to address that concern
too).


On 25/08/2011 11:53 PM, Martin Taal wrote:
> Hmm I have not thought about that, I will ask Ed what the EMF approach
> is here.
>
> gr. Martin
>
> On 08/26/2011 08:51 AM, gdelprete wrote:
>> I've seen the bug was closed as invalid and it was decided not to
>> allow dots in the EPackage name. This is fine for me.
>>
>> Please note, however, that it you create an Ecore model from an XSD
>> file, the package name will be generated as a fully
>> qualified name with dots. It's probably better now to change the
>> algorithm for EPackage name generation for the
>> XSD->Ecore case so that it it is consistent to what Texo expects when
>> generating che code.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Problem/question using the createFromString and createToString functions
Next Topic:[EMFClient] Disable creation of specific child in navigator & editor
Goto Forum:
  


Current Time: Fri Mar 29 08:44:31 GMT 2024

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

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

Back to the top