Bug 141875 - Make language options from Advanced Code Generators generally available
Summary: Make language options from Advanced Code Generators generally available
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-18 18:58 UTC by Brad Markel
Modified: 2007-03-20 21:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Markel 2007-02-18 18:58:03 UTC
Version:           1.5.61 (using KDE 3.5.5, Kubuntu (edgy) 4:3.5.5-0ubuntu3.1)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17-10-generic

As of 1.5.61 compiled from source, the language options dialog box shows "No options available" for any selected language.  Confirmed also against the 20070217 nightly build of the kdesdk.
Comment 1 Oliver Kellogg 2007-02-19 22:11:31 UTC
Right now, those language options are tied to the advanced code generators.
However, bug 84739 is blocking their use.
IMHO, it would make sense to make these options available for use
with the old code generators.
Comment 2 Oliver Kellogg 2007-03-19 19:57:45 UTC
Implementing for CPPWriter (C++)
Comment 3 Oliver Kellogg 2007-03-19 21:23:17 UTC
SVN commit 644364 by okellogg:

Switch CPPWriter to usage of CodeGenerationPolicy and CPPCodeGenerationPolicy.
For some bug, the code generation option settings do not become effective at all.
Up next: Hunt down and fix that bug.
CCBUG:141875


 M  +20 -4     codegenfactory.cpp  
 M  +1 -5      cppcodegenerationpolicy.cpp  
 M  +102 -125  cppwriter.cpp  
 M  +4 -37     cppwriter.h  
Comment 4 Oliver Kellogg 2007-03-20 21:46:01 UTC
SVN commit 644749 by okellogg:

CodeGenerationPolicyPage constructor 3rd arg should have been CodeGenPolicyExt*,
 this fixes the bug that the code generation option settings were not becoming
 effective, and also fixes a crash related to the codegen settings dialog.
BUG:141875


 M  +1 -0      ChangeLog  
 M  +1 -1      umbrello/codegenerationpolicy.cpp  
 M  +1 -1      umbrello/codegenerators/cppcodegenerationpolicypage.cpp  
 M  +1 -1      umbrello/codegenerators/javacodegenerationpolicypage.cpp  
 M  +1 -1      umbrello/codegenerators/rubycodegenerationpolicypage.cpp  
 M  +1 -1      umbrello/dialogs/codegenerationpolicypage.cpp  
 M  +3 -3      umbrello/dialogs/codegenerationpolicypage.h  
 M  +1 -1      umbrello/dialogs/defaultcodegenpolicypage.cpp  
 M  +2 -2      umbrello/dialogs/defaultcodegenpolicypage.h  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #644748:644749
@@ -20,6 +20,7 @@
 * Ada95 Code Generation Errors for Aggregation (141644)
 * Unable to delete multiplicity information or label from an association
   (141813)
+* Reinstate code generation options for C++ (141875)
 * C++ code generator does not correctly define namespaces (141876)
 * Ada code generator generates "withs" in both directions for certain
   associations (141956)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerationpolicy.cpp #644748:644749
@@ -402,7 +402,7 @@
  * @return dialog object
  */
 CodeGenerationPolicyPage * CodeGenerationPolicy::createPage ( QWidget *pWidget, const char *name ) {
-    return new CodeGenerationPolicyPage ( pWidget, name, this );
+    return new CodeGenerationPolicyPage ( pWidget, name, 0 );
 }
 
 // Other methods
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp #644748:644749
@@ -27,7 +27,7 @@
 #include "../uml.h"
 
 CPPCodeGenerationPolicyPage::CPPCodeGenerationPolicyPage( QWidget *parent, const char *name, CPPCodeGenerationPolicy * policy )
-  : CodeGenerationPolicyPage(parent, name, UMLApp::app()->getCommonPolicy())
+  : CodeGenerationPolicyPage(parent, name, policy)
 {
     CodeGenerationPolicy *common = UMLApp::app()->getCommonPolicy();
     form = new CPPCodeGenerationForm(this);
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp #644748:644749
@@ -27,7 +27,7 @@
 #include "../uml.h"
 
 JavaCodeGenerationPolicyPage::JavaCodeGenerationPolicyPage( QWidget *parent, const char *name, JavaCodeGenerationPolicy * policy )
-  : CodeGenerationPolicyPage(parent, name, UMLApp::app()->getCommonPolicy())
+  : CodeGenerationPolicyPage(parent, name, policy)
 {
     CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
     form = new JavaCodeGenerationFormBase(this);
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp #644748:644749
@@ -29,7 +29,7 @@
 #include "../uml.h"
 
 RubyCodeGenerationPolicyPage::RubyCodeGenerationPolicyPage( QWidget *parent, const char *name, RubyCodeGenerationPolicy * policy )
-        :CodeGenerationPolicyPage(parent, name, UMLApp::app()->getCommonPolicy())
+  : CodeGenerationPolicyPage(parent, name, policy)
 {
     CodeGenerationPolicy *common = UMLApp::app()->getCommonPolicy();
     form = new RubyCodeGenerationFormBase(this);
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp #644748:644749
@@ -21,7 +21,7 @@
 /** This is the page which comes up IF there is no special options for the
  * code generator.
  */
-CodeGenerationPolicyPage::CodeGenerationPolicyPage( QWidget *parent, const char *name, CodeGenerationPolicy * policy )
+CodeGenerationPolicyPage::CodeGenerationPolicyPage( QWidget *parent, const char *name, CodeGenPolicyExt * policy )
         :CodeGenerationPolicyBase(parent,name)
 {
     m_parentPolicy = policy;
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/codegenerationpolicypage.h #644748:644749
@@ -23,7 +23,7 @@
 #include <qwidget.h>
 #include "codegenerationpolicybase.h"
 
-class CodeGenerationPolicy;
+class CodeGenPolicyExt;
 
 /**
  * @author Brian Thomas
@@ -32,7 +32,7 @@
 class CodeGenerationPolicyPage : public CodeGenerationPolicyBase  {
     Q_OBJECT
 public:
-    CodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, CodeGenerationPolicy * policy = 0);
+    CodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, CodeGenPolicyExt * policy = 0);
 
     virtual ~CodeGenerationPolicyPage();
 
@@ -40,7 +40,7 @@
 
 protected:
 
-    CodeGenerationPolicy * m_parentPolicy;
+    CodeGenPolicyExt * m_parentPolicy;
 
 private:
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp #644748:644749
@@ -24,7 +24,7 @@
 /** This is the page which comes up IF there is no special options for the
  * code generator.
  */
-DefaultCodeGenPolicyPage::DefaultCodeGenPolicyPage ( QWidget *parent, const char *name, CodeGenerationPolicy * policy )
+DefaultCodeGenPolicyPage::DefaultCodeGenPolicyPage ( QWidget *parent, const char *name, CodeGenPolicyExt * policy )
         :CodeGenerationPolicyPage(parent,name,policy)
 {
     textLabel = new QLabel(parent,"textLabel");
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h #644748:644749
@@ -19,7 +19,7 @@
 class QHBoxLayout;
 class QGridLayout;
 class QLabel;
-class CodeGenerationPolicy;
+class CodeGenePolicyExt;
 
 class DefaultCodeGenPolicyPage : public CodeGenerationPolicyPage
 {
@@ -27,7 +27,7 @@
 
 public:
 
-    DefaultCodeGenPolicyPage( QWidget* parent = 0, const char* name = 0, CodeGenerationPolicy * policy =0);
+    DefaultCodeGenPolicyPage( QWidget* parent = 0, const char* name = 0, CodeGenPolicyExt * policy =0);
 
     ~DefaultCodeGenPolicyPage();
 
Comment 5 Oliver Kellogg 2007-03-20 21:51:26 UTC
I don't have time right now for hooking up the codegen options with
the other programming languages bug commit 644364 shows the pattern.
(In fact, this might be considered a Junior Job.)