Bug 142093 - Ada code generator always generates methods abstract even if abstract box not checked
Summary: Ada code generator always generates methods abstract even if abstract box not...
Status: RESOLVED WORKSFORME
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-23 06:08 UTC by Mark Gardinier
Modified: 2007-03-01 07:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
xml and generated code (2.15 KB, application/x-bzip2)
2007-02-23 06:09 UTC, Mark Gardinier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Gardinier 2007-02-23 06:08:37 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Fedora RPMs
Compiler:          n/a n/a
OS:                Linux

1.  Create a class
2.  Add a method
3.  Generate Ada code
4.  The proecedure will be generated abstract even though the abstract box not checked.

Hey Oliver, thanks alot for all the fixes you've been supplying.  I'm still hoping I can use Umbrello for the research project I'm working on.  The modeling works well but its imperative the code is generated from the model.
Comment 1 Mark Gardinier 2007-02-23 06:09:23 UTC
Created attachment 19784 [details]
xml and generated code
Comment 2 Oliver Kellogg 2007-02-23 07:39:50 UTC
SVN commit 636438 by okellogg:

writeOperation(): Evaluate UMLObject::m_bAbstract on generating abstractness.
BUG:142093


 M  +2 -0      ChangeLog  
 M  +3 -3      umbrello/codegenerators/adawriter.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #636437:636438
@@ -19,6 +19,8 @@
 * C++ code generator does not correctly define namespaces (141876)
 * Ada code generator generates "withs" in both directions for certain
   associations (141956)
+* Ada code generator always generates methods abstract even if abstract box
+  not checked (142093)
 
 Version 1.5.61
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/adawriter.cpp #636437:636438
@@ -516,9 +516,9 @@
         ada << ")";
     if (! use_procedure)
         ada << " return " << rettype;
-    ada << " is abstract;" << m_endl << m_endl;
-    // TBH, we make the methods abstract here because we don't have the means
-    // for generating meaningful implementations.
+    if (op->getAbstract())
+        ada << " is abstract";
+    ada << ";" << m_endl << m_endl;
 }
 
 QStringList AdaWriter::defaultDatatypes() {
Comment 3 Mark Gardinier 2007-02-27 17:45:57 UTC
Did I do something wrong or miss something?  I downloaded the lastest adawriter.cpp (636438).  I got the following error when rebuilding Umbrello:

adawriter.cpp:73: error: prototype for 'QString AdaWriter::className(UMLClassifier*, bool)' does not match any in class 'AdaWriter'
adawriter.h:96: error: candidates are: QString AdaWriter::className(UMLPackage*, bool)
adawriter.h:34: error:                 virtual const char* AdaWriter::className() const
adawriter.cpp:93: error: no 'QString AdaWriter::packageName(UMLPackage*)' member function declared in class 'AdaWriter'
make: *** [adawriter.lo] Error 1

Thanks.
Comment 4 Oliver Kellogg 2007-02-27 19:03:49 UTC
> I downloaded the lastest adawriter.cpp (636438)

Are you downloading individual files?
That's not very safe. Please do an svn checkout and make sure to
always "svn up" your entire umbrello.

> adawriter.h:96: error: candidates are: QString
>                 AdaWriter::className(UMLPackage*, bool)

Not so: The current adawriter.h:96 (633739) reads

  QString className(UMLClassifier *c, bool inOwnScope = true);
Comment 5 Mark Gardinier 2007-02-27 21:28:32 UTC
Ah.  Thanks.  Yes I was downloading individual files.  I haven't used SVN before but I guess its time to learn.

Thanks.
Comment 6 Oliver Kellogg 2007-02-27 23:03:50 UTC
> I haven't used SVN before but I guess its time to learn.

I made a script that automatically checks out all the required parts
from branches/KDE/3.5/kdesdk,

  http://uml.sourceforge.net/checkout_and_build_umbrello.sh

Or, follow the instructions at

  http://uml.sourceforge.net/install.php#source-code

Hope this helps.
Comment 7 Ferenc Veres 2007-02-28 14:49:47 UTC
The SVN link on the install page looks outdated. (Links to CVS instructions, is that still valid?) I spent a lot of time on finding the right page, which contains path to 3.5 repositories too. I can't find it anymore, but if you know it, would be great to add to install instuctions. :-) That page does not even mention anonsvn.kde.org, while the other one requires password I think. The .sh looks very good, thanks! (Still a link to the right help page on kde.org would be great.)

And there are tons of links to WebSVN from everywhere, but there are no checkout instuctions on the websvn pages, looks useless. :-) (But the request for this should be posted somewhere else I guess. E.g. we can browse the nice files we want, but have no clue how to get them. Really annoying. ;-) )

Thanks for the .sh!
Comment 8 Oliver Kellogg 2007-02-28 19:48:05 UTC
> The SVN link on the install page looks outdated.

Well, the link
 http://developer.kde.org/documentation/tutorials/subversion/
is still valid - but you're right, the instructions on the install page
were outdated - fixed now.
Comment 9 Oliver Kellogg 2007-03-01 07:20:09 UTC
> http://developer.kde.org/documentation/tutorials/subversion/ 

You are of course right - that page is outdated too.
The current one is 
http://techbase.kde.org/Getting_Started/Sources/Using_Subversion_with_KDE
I again fixed this on the install page.