Book a Demo

Author Topic: C# reverse engineer and using alias  (Read 8023 times)

Yves

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
C# reverse engineer and using alias
« on: July 24, 2008, 11:18:45 pm »
When I use the reverse engineer functionality for a source containing and C# using clause with alias

using MyAlias = MyNamespace.SubNamespace;

the alias is not translated during the reverse operation and my class is mapped to the MyAlias namespace and not MyNamespace.SubNamespace namespace

 :-?

any idea ?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: C# reverse engineer and using alias
« Reply #1 on: July 25, 2008, 01:50:08 am »
Hi Yves,

I'm not sure how to do this. My guess is that there might be a tagged value or a stereotype involved.

I suggest you whip up a short piece of code in C# that includes a using clause with an alias, just as you describe. Then reverse it into EA. Take a look at what results, and remember to check the tagged values window. You can also export the resulting package and compare the XMI to an export of a package without the alias.

Please let us know what you find.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: C# reverse engineer and using alias
« Reply #2 on: July 25, 2008, 08:37:34 am »
EA currently doesn't do anything with C# namespace aliases.  Up until now the only problem this has caused was with EA not being able to link correctly.

You can send a report directly to Sparx Systems, but I don't have any workaround at the moment.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: C# reverse engineer and using alias
« Reply #3 on: July 25, 2008, 09:00:07 am »
Yves,

Why not make a feature request as well. Click the Feature Request link below the Support link near the bottom of any forum page, and fill out the form.

I think this would be an excellent enhancement for EA.

David
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: C# reverse engineer and using alias
« Reply #4 on: July 25, 2008, 12:44:23 pm »
Quote
Yves,

Why not make a feature request as well. Click the Feature Request link below the Support link near the bottom of any forum page, and fill out the form.

I think this would be an excellent enhancement for EA.

David
Yes please,

I use namespace aliases a LOT!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Yves

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: C# reverse engineer and using alias
« Reply #5 on: August 02, 2008, 06:27:25 pm »
Thanks for your answers.

As David said, I'll make a feature request

Yves