|
Re: Per-package customisation of generated class names? [message #667586 is a reply to message #667581] |
Fri, 29 April 2011 16:57 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Trev,
I suppose if you generate them using different GenModels you could use
the name patterns. Otherwise you can use ecore:name annotations on the
specific types that collide.
Trev wrote:
> I am generating a model from an XSD schema which imports multiple
> namespaces, with multiple complex types which happen to have the same
> localname as other complex types (in different namespaces).
>
> At the XSD level there are no collisions, thanks to namespaces. At
> the Java
> classloader level there are no collisions, thanks to packages. But at
> the
> Java source code level there are collisions which prevent the use of
> import
> statements for more than one class with the same localname.
>
> I would like to be able to specify a prefix (or suffix or pattern) for
> class
> name generation within each package.
>
> The GenPackage's Prefix property is almost what I want: the only
> problem is
> that it only affects "several package-related classes, including package,
> factory, switch, and adapter factory" but those are not the classes
> that are
> giving me collisions.
>
> The GenModel's InterfaceNamePattern and ClassNamePattern also are almost
> what I want: the only problem is that I haven't found a way to specify
> different patterns for different packages.
>
> Is there a way to do what I want?
>
> Thanks,
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03041 seconds