Book a Demo

Author Topic: Bug in Code Generation with qualified types?  (Read 5349 times)

Andreas_G

  • EA User
  • **
  • Posts: 125
  • Karma: +0/-0
  • And that's the way the cookie crumbles.
    • View Profile
Bug in Code Generation with qualified types?
« on: September 30, 2005, 03:04:55 am »
Hi all,

I think I found a bug in code generation of qualified type names:

I have the following situation:


When I trie to generate code for MyClass.

It generates the qualified name for "String" from the Root1 package.
Code: [Select]
void Operation(Root1Package1::String param)

How can I define, which of the both String types should be used while code generation.

I thought (or hoped) EA will use the class which is nearer.

Is it a bug, did I do something wrong, or is there a workaround?

bye
Andreas
bye
Andreas

thomaskilian

  • Guest
Re: Bug in Code Generation with qualified types?
« Reply #1 on: September 30, 2005, 05:25:35 am »
Try temporarily renaming one of the string classes to distinguish it in the dropdown. Then rename back. Just a guess...

Andreas_G

  • EA User
  • **
  • Posts: 125
  • Karma: +0/-0
  • And that's the way the cookie crumbles.
    • View Profile
Re: Bug in Code Generation with qualified types?
« Reply #2 on: September 30, 2005, 06:47:45 am »
Thanks Thomas,

anyhow it seems to work now!

Don't know why. I renamed the "String", rebuild the code, and it looks like, that EA did not know any "String". Then I've restarted EA, and in the class the parameter type was changend to type "Renamed_String"  :o. I changed type back to "String", genrerate my code, and the parameter has the correct qualified type  :). I renamed back the "Renamed_String" to "String", made a restart of EA, and tested code generation again. An it's still working  :D

Till this experience, I thought EA remembers only the parameter type as string and detects the real type while generating the code. But it seems I'm wrong!
bye
Andreas

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Bug in Code Generation with qualified types?
« Reply #3 on: October 03, 2005, 04:23:48 pm »
Quote
Till this experience, I thought EA remembers only the parameter type as string and detects the real type while generating the code. But it seems I'm wrong!


You definately were.  EA stores the classifier of each parameter type, method return type and attribute type.  If you look next to the combo box for the type for each of these you'll find a '...' button.  Click on it to select the classifier for that type.  You can also do this in the inplace (or in diagram) editor.  Either use the context menu to select 'Insert Classifier...' or press Ctrl+Space.

Andreas_G

  • EA User
  • **
  • Posts: 125
  • Karma: +0/-0
  • And that's the way the cookie crumbles.
    • View Profile
Re: Bug in Code Generation with qualified types?
« Reply #4 on: October 04, 2005, 01:43:47 am »
Hmm... how, it's possible to overlook this button?!
Was it realy there before?  ::)
bye
Andreas

thomaskilian

  • Guest
Re: Bug in Code Generation with qualified types?
« Reply #5 on: October 04, 2005, 02:15:05 am »
... ever since :)

Andreas_G

  • EA User
  • **
  • Posts: 125
  • Karma: +0/-0
  • And that's the way the cookie crumbles.
    • View Profile
Re: Bug in Code Generation with qualified types?
« Reply #6 on: October 04, 2005, 02:27:20 am »
I think Sparx has access to my computer, and put in my absence a new version on it.

That's the only solution!  ;)
« Last Edit: October 04, 2005, 02:27:40 am by glaubitz »
bye
Andreas

AshK

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: Bug in Code Generation with qualified types?
« Reply #7 on: October 04, 2005, 10:55:05 pm »
Shhh.... ;)
The Sparx Team
[email protected]