Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342417

Summary: Custom Package Handling
Product: [Modeling] EMFT Reporter: Mark Hoffmann <m.hoffmann>
Component: TexoAssignee: Martin Taal <mtaal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mark Hoffmann CLA 2011-04-11 05:54:14 EDT
Build Identifier: 20110218-0911

Hi Martin,
I find the package handling difficult, if I want to generate my Texo code into custom packages.
My Ecore uses as package 'test'. My GenModel has as base package property e.g. 'de.test'. So all my EMF model code will be generated into the package 'de.test'

Now I want to use texo. If I want to generate Texo POJO's in the package 'de.test.texo' I have to set in the model editor:
1. the 'package path'
2. the 'model classes package path'
3. for each class, enum the 'qualified class name'
4. in the model file, because it is not possible in the editor:
 - type, objectType, itemType for the correct references to classes

Isn't it possible to use the 'package path' property as prefix like the 'base package' property in the GenModel? This would mean the same behaviour like in the genmodel code generation. 

With kind regards,
Mark

Reproducible: Always
Comment 1 Mark Hoffmann CLA 2011-04-11 07:54:01 EDT
This would mean to edit just one property instead of many.

Regards, Mark
Comment 2 Martin Taal CLA 2011-04-23 18:15:34 EDT
Hi Mark,
It took a while before I looked at this.

The EClass and EEnum annotations have a simpleClassName eFeature you can set this and then packagePath (from the epackage) will be pre-pended. Leave the qualifiedClassName attribute empty.
Afaics just setting the package path in the annotations model does what you want.

Let me know if I am wrong (and re-open the issue), thanks!

gr. Martin
Comment 3 Mark Hoffmann CLA 2011-04-26 07:39:46 EDT
Hi Martin,

you are right. Everything is fine.
I don't know what I did wrong.

Regards,
Mark