Book a Demo

Author Topic: Code Generation - Notes/Comments Problems  (Read 2646 times)

fares1

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Code Generation - Notes/Comments Problems
« on: March 20, 2003, 02:10:35 pm »
I've been having some problems with code generation from C++ classes I've created.

I've written some stub code into some class-notes (to use as my "includes") and in class-operations-behavior section (to use as stub code such as "return foo;" and "foo = newval;" for getters/setters.

Problems as follows:
1. I have changed the "C++ Specification", "Comment String - Start/End" and changed the default "/*" and "*/" to a {space}/blank... in hopes that I could write some stub code into these notes and have them available in the classes.  I wind up with an "* " {asterisk+space} being placed before each line of note/behavior.

2. Quite often when I edit class-operation(s) and edit/add to the behavior details, it does NOT automatically update in the onscreen viewing of the model (when these attributes are turn visible)... even when I explicitly hit "save"... sometimes they appear in the visual display, sometimes not... when they do not appear visually (but I can open the operation and see the changes!), the source code generated matches the visual view of the class operations/operation-behavior and NOT what has actually been edited/entered for the class-operation(s).  What's up?  How do I get the "visual" model to update?  They only way I've found is to save current class diagram, click-on/load another, and then go back to the previous diagram and the "visual" classes are properly updated and then I am able to generate accurate code from my classes.

3. "//" in my operation-behavior VS. "/*" & "*/" in my class-notes - what's up with that?  I can (theoretically) change the "/*" & "*/" (caveat in item 1 above), but can't find where to address the use of "//".  Can I change this?

Obviously my goal here is two-fold... Generating stub-code for operations/includes for classes , and having complete control over how Comments/notes/behavior is "commented" in the source code generated.

I've tried some "work arounds" such as placing something like "CODE:" in front of all of my stub-code... then using global search-replace with {blank}, but items 1-3 above make this very problematic and not consistent.  I can always place a "//" in font of lines that I actually WANT generated as comments, if I was able to remove/control this AUTO-COMMENTING.  

Are there some files that control this (i.e. where I could change the default "//" or the default "* " to {blank}?  Or just some other area of the program that holds this information?

Hope that I've explained this well enough and that someone can offer some advice.  

Thanks again for the excellent/informative forums!
-Doug
P.S. Should item 2 above be posted as a "bug"?
« Last Edit: March 20, 2003, 02:12:33 pm by fares1 »
"Whoever fights monsters should see to it that in the process he does not become a monster and when you look long into an abyss, the abyss also looks into you."