Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Name Collision in Package and its elements
Name Collision in Package and its elements [message #1767289] Tue, 04 July 2017 13:09 Go to next message
Ran Wei is currently offline Ran WeiFriend
Messages: 86
Registered: September 2012
Location: York, UK
Member
Hi,

Recently I ran into a problem which I believe was caused by name collision.

I have a package named Artefact and within this package I have a class called ArtefactPackage (and it needs to be called this). When I generate model codes there are many compilation errors, which I believe was caused by the fact that ArtefactPackage is generated for the Package but Java confuses this with the ArtefactPackage element in the Package.

Is there a way to avoid this, please?

Cheers,
Will


Research Associate
Department of Computer Science
University of York
Re: Name Collision in Package and its elements [message #1767292 is a reply to message #1767289] Tue, 04 July 2017 13:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6112
Registered: July 2009
Senior Member
Hi

genmodel has quite a few naming options. You can tweak the prefix. You can arrange for the 'meta' classes to be in a distinct Java package so that you really can have two ArtefactPackage classes.

Regards

Ed Willink
Re: Name Collision in Package and its elements [message #1767372 is a reply to message #1767292] Wed, 05 July 2017 11:05 Go to previous message
Ran Wei is currently offline Ran WeiFriend
Messages: 86
Registered: September 2012
Location: York, UK
Member
Hi Ed,

Thanks very much! I have found a way around the problem.

Cheers,
Will


Research Associate
Department of Computer Science
University of York
Previous Topic:How to know the name of a class (metadata) in a composition relationhip?
Next Topic:Does EMF supports merge multi-model instance into one, which are based on the same meta-model
Goto Forum:
  


Current Time: Tue Nov 20 05:22:17 GMT 2018

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

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

Back to the top