Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » import statement from userRegion are disappearing
import statement from userRegion are disappearing [message #43459] Wed, 19 March 2008 18:32 Go to next message
Eclipse User
Originally posted by: confmb.capgroup.com

When regenerating Java classes.

The import statement in the class are regenerated - and the import
statements specific to userRegion code are removed.

Is it possible to maintain the userRegion import statement in the class
while regenerating?

Thank you,

PS: Meanwhile I can always put fully qualified name in the user code. I
just would like to know if this is expected behavior or not.

Thank you for letting me know,

Frederic
Re: import statement from userRegion are disappearing [message #43765 is a reply to message #43459] Wed, 26 March 2008 14:30 Go to previous message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Frederic:

c:userRegion doesn't have any such magic. You could include another user
region for custom imports, but the Java tools don't know anything about
this, and users would have to remember to inspect their code and move any
new imports into that region. IMHO, this is a recipe for user frustration.

This is why JMerge is so useful. It merges on language structures, and so
can handle such things with ease.

Apart from generating inserting the <java:merge/> tag and the @generated
javadoc tag on the fields, class, methods you want to update, there really
isn't much to using JMerge.

Paul

"Frederic" <confmb@capgroup.com> wrote in message
news:5b5caca1294d4f5322cce32566357c45$1@www.eclipse.org...
> When regenerating Java classes.
>
> The import statement in the class are regenerated - and the import
> statements specific to userRegion code are removed.
>
> Is it possible to maintain the userRegion import statement in the class
> while regenerating?
>
> Thank you,
>
> PS: Meanwhile I can always put fully qualified name in the user code. I
> just would like to know if this is expected behavior or not.
> Thank you for letting me know,
>
> Frederic
>
>
Previous Topic:c:set with xpath expression value
Next Topic:UML Activities and Jet
Goto Forum:
  


Current Time: Thu Sep 18 19:55:29 GMT 2014

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

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