Book a Demo

Author Topic: How do I change the language of a class?  (Read 2832 times)

henrikbe

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
How do I change the language of a class?
« on: August 26, 2010, 06:25:44 pm »
Hello,

I have a quite simple question, at least I think this should be simple. I have a class element "A" in my class diagram, which (for some reason) was set to language C++ when I created it. So when I generated source code for the class, it made the file "A.h". But now I need this class to be coded in Java. How can I change the language of the class?

Obviously, I tried to double-click the class in the diagram, and change the "Language" from "C++" to "Java". Now, when I tried to generate code for the class (marked all my classes and pressed shift+F11/selected Code Generation -> Generate Selected Elements), EA complains with the following error message:

There was an error parsing C:\test\A.h on line 16.
Unexpected symbol: :
Code generation failed.


So EA seems to still think this class should be connected to the file "A.h", even though I've told it to use Java... (BTW why does it even try to read the file? I asked it to generate code, not to synchronize..)

So, how do I tell EA to stop worrying about that A.h-file and create java code instead?

beginner

  • Guest
Re: How do I change the language of a class?
« Reply #1 on: August 26, 2010, 06:37:29 pm »
Delete it from disk?

b.

henrikbe

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: How do I change the language of a class?
« Reply #2 on: August 26, 2010, 06:53:02 pm »
Thank you, I'll try that. Anyway I got around the problem by generating code for one class at a time.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile