Summary: | umbrello design bug in advanced code generators | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Jozko Mrkvicka <kde> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adunstan, ajuc, ch.nolte, franke.daniel, greatbunzinni, g_greg, henrik.steffien, kaplun, krissn |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Jozko Mrkvicka
2004-07-08 17:23:44 UTC
*** Bug 81068 has been marked as a duplicate of this bug. *** Yes. I had given the related bug 81068 a shot but found that the changes required are non trivial. Initial stab at removing the siamese twinnage between policy and generator CVS commit by okellogg: Fix the fix. M +2 -0 uml.cpp 1.132 M +1 -10 codegenerators/cppcodegenerationpolicy.cpp 1.13 CVS commit by okellogg: For architectural sanity, remove CodeGenerationPolicy classes' dependency on CodeGenerator classes. M +15 -4 codegenerationpolicy.cpp 1.11 M +3 -6 codegenerationpolicy.h 1.8 M +2 -2 codegenerator.cpp 1.64 M +1 -1 uml.cpp 1.131 M +35 -32 codegenerators/cppcodegenerationpolicy.cpp 1.12 M +2 -14 codegenerators/cppcodegenerationpolicy.h 1.6 M +15 -3 codegenerators/cppcodegenerationpolicypage.cpp 1.9 M +1 -1 codegenerators/cppcodegenerator.cpp 1.30 M +24 -29 codegenerators/javacodegenerationpolicy.cpp 1.10 M +2 -14 codegenerators/javacodegenerationpolicy.h 1.6 M +17 -5 codegenerators/javacodegenerationpolicypage.cpp 1.7 M +3 -3 codegenerators/javacodegenerator.cpp 1.24 *** Bug 97189 has been marked as a duplicate of this bug. *** I'm running Umbrello 1.5.2 and there are lots of options in the "code generation options" part of the "code generation wizard" dialog which are ignored. For example, the "comment verbosity" options are always on independent of the checkboxes state and the "Package is a namespace" option from "language options" is always off, independent of the checkbox state. SVN commit 535733 by okellogg: Further preparations for merging CodeGenerationPolicy into CodeGenerator. CCBUG:84739 M +87 -38 codegenerationpolicy.cpp M +44 -16 codegenerationpolicy.h M +2 -3 codegenerator.cpp M +2 -1 codegenerator.h M +7 -25 codegenerators/cppcodegenerationpolicy.cpp M +1 -14 codegenerators/cppcodegenerationpolicy.h M +9 -31 codegenerators/javacodegenerationpolicy.cpp M +1 -19 codegenerators/javacodegenerationpolicy.h M +2 -2 codegenerators/perlwriter.cpp M +6 -31 codegenerators/rubycodegenerationpolicy.cpp M +0 -21 codegenerators/rubycodegenerationpolicy.h M +9 -15 codegenerators/simplecodegenerator.cpp M +3 -10 codegenerators/simplecodegenerator.h SVN commit 536092 by okellogg: Further preparations for merging CodeGenerationPolicy into CodeGenerator CCBUG:84739 M +2 -2 codeblock.h M +2 -2 codeclassfield.h M +3 -2 codeclassfielddeclarationblock.h M +7 -24 codedocument.cpp M +2 -12 codedocument.h M +7 -8 codegenerators/codegenfactory.cpp M +5 -6 codegenerators/codegenfactory.h M +14 -11 codegenerators/cppcodedocumentation.cpp M +3 -2 codegenerators/cppheadercodedocument.cpp M +3 -2 codegenerators/javacodeaccessormethod.cpp M +5 -2 codegenerators/javacodeclassfielddeclarationblock.cpp M +4 -1 codegenerators/rubycodeaccessormethod.cpp M +5 -7 codegenerators/rubycodeclassfielddeclarationblock.cpp M +6 -3 textblock.cpp M +23 -22 uml.cpp M +11 -2 uml.h M +9 -0 umldoc.cpp I managed to fix the problem - not by merging CodeGenerationPolicy into CodeGenerator but by turning it into a standalone class (of which no other classes inherit) that only deals with the programming language independent policies (newlineEndingChars etc.) The {Cpp,Java,Ruby}CodeGenerationPolicy classes now inherit from a new interface class, CodeGenPolicyExt, which has just a few pure virtual methods and no state. However I will have to wait with committing this large changeset because of the KDE 3.5.3 tag freeze. (I.e. unfortunately the fix isn't making it into Umbrello-1.5.3) I was a bit too optimistic - work on this problem has revealed more and deeper problems. For the Umbrello-1.5.3 release, I recommend deselecting the "Use new code generators" option in the General Settings menu (except if you're adventurous and want to help solve these issues.) *** Bug 130067 has been marked as a duplicate of this bug. *** *** Bug 130471 has been marked as a duplicate of this bug. *** *** Bug 130530 has been marked as a duplicate of this bug. *** *** Bug 130720 has been marked as a duplicate of this bug. *** SVN commit 563016 by okellogg: Disabling newcodegen for the time being to avoid a slew of redundant bug reports. Notes to assignee of #84739: 1) To work on the bug, #define the symbol BUG84739_FIXED. 2) Make sure all PRs marked duplicate of #84739 pass. CCBUG:84739 M +3 -0 dialogs/settingsdlg.cpp M +4 -0 uml.cpp --- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/settingsdlg.cpp #563015:563016 @@ -115,6 +115,9 @@ m_GeneralWidgets.newcodegenCB = new QCheckBox( i18n("Use new C++/Java/Ruby generators"), m_GeneralWidgets.miscGB ); m_GeneralWidgets.newcodegenCB -> setChecked( m_pOptionState->generalState.newcodegen ); +#ifndef BUG84739_FIXED + m_GeneralWidgets.newcodegenCB->setEnabled(false); +#endif miscLayout -> addWidget( m_GeneralWidgets.newcodegenCB, 1, 0 ); m_GeneralWidgets.angularLinesCB = new QCheckBox( i18n("Use angular association lines"), m_GeneralWidgets.miscGB ); --- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.cpp #563015:563016 @@ -1077,7 +1077,11 @@ false #endif ); +#if defined (BUG84739_FIXED) m_optionState.generalState.newcodegen = m_config -> readBoolEntry("newcodegen", false); +#else + m_optionState.generalState.newcodegen = false; +#endif m_optionState.generalState.angularlines = m_config->readBoolEntry("angularlines", false); m_optionState.generalState.autosave = m_config -> readBoolEntry( "autosave", true ); m_optionState.generalState.time = m_config -> readNumEntry( "time", 0 ); //old autosavetime value kept for compatibility *** Bug 131528 has been marked as a duplicate of this bug. *** *** Bug 131866 has been marked as a duplicate of this bug. *** *** Bug 133911 has been marked as a duplicate of this bug. *** *** Bug 135154 has been marked as a duplicate of this bug. *** SVN commit 644781 by okellogg: It looks as though the bug fixed by commit 644749 may have been causing the problems with the advanced code generators, too. I'm experimentally lifting the BUG84739 barrier. If you feel adventurous and want to help improving Umbrello then go to the Setting->Configure Umbrello menu and enable "Use new C++/Java/Ruby generators". Is the advanced-codegen configuration back to stable? Please send reports to CCBUG:84739 M +0 -3 dialogs/settingsdlg.cpp M +0 -4 uml.cpp --- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/settingsdlg.cpp #644780:644781 @@ -115,9 +115,6 @@ m_GeneralWidgets.newcodegenCB = new QCheckBox( i18n("Use new C++/Java/Ruby generators"), m_GeneralWidgets.miscGB ); m_GeneralWidgets.newcodegenCB -> setChecked( m_pOptionState->generalState.newcodegen ); -#ifndef BUG84739_FIXED - m_GeneralWidgets.newcodegenCB->setEnabled(false); -#endif miscLayout -> addWidget( m_GeneralWidgets.newcodegenCB, 1, 0 ); m_GeneralWidgets.angularLinesCB = new QCheckBox( i18n("Use angular association lines"), m_GeneralWidgets.miscGB ); --- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.cpp #644780:644781 @@ -1097,11 +1097,7 @@ Settings::OptionState& optionState = Settings::getOptionState(); optionState.generalState.undo = m_config -> readBoolEntry( "undo", true ); optionState.generalState.tabdiagrams = m_config -> readBoolEntry("tabdiagrams", false); -#if defined (BUG84739_FIXED) optionState.generalState.newcodegen = m_config -> readBoolEntry("newcodegen", false); -#else - optionState.generalState.newcodegen = false; -#endif optionState.generalState.angularlines = m_config->readBoolEntry("angularlines", false); optionState.generalState.autosave = m_config -> readBoolEntry( "autosave", true ); optionState.generalState.time = m_config -> readNumEntry( "time", 0 ); //old autosavetime value kept for compatibility Fixed by commit 644749. |