[umbrello-devel] [umbrello] [Bug 336933] Ada is generated only for one class per package

Oliver Kellogg okellogg at users.sourceforge.net
Tue Jul 1 16:33:25 UTC 2014


https://bugs.kde.org/show_bug.cgi?id=336933

Oliver Kellogg <okellogg at users.sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |http://commits.kde.org/umbr
                   |                            |ello/3b6386203c827fd6593769
                   |                            |2c5a4fdf9f8457ef2a

--- Comment #1 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 3b6386203c827fd65937692c5a4fdf9f8457ef2a by Oliver Kellogg.
Committed on 01/07/2014 at 16:33.
Pushed by okellogg into branch 'master'.

umbrello/uml.cpp
- In function setGenerator() revert part of commit ea25b64 which returns
  preexisting m_codegen if (m_codegen->language() == pl).

umbrello/codegenerators/codegenerator.{h,cpp}
- New virtual function finalizeRun() with empty default implementation can
  be reimplemented by concrete code generators to perform additional
  cleanups or other actions that can only be performed once all code has
  been written. The function is called in writeCodeToFile() after return
  from writeListedCodeDocsToFile().

umbrello/codegenerators/simplecodegenerator.cpp
- In function writeCodeToFile(), utilize writeCodeToFile(concepts) for
  minimizing code duplication.
- In function writeCodeToFile(UMLClassifierList&),
  - do not writeClass(c) if Model_Utils::isCommonDataType(c->name());
  - call finalizeRun() after foreach loop over `concepts'.

umbrello/codegenerators/ada/adawriter.{h,cpp}
- Add `static' on declaration of functions isOOClass() and packageName().
- New function declareClass() factors trunk of Ada declaration which is
  common to partial (public) and full (private) view.
- Reimplement function finalizeRun() from CodeGenerator: Cumulative
  generation of the private part is moved from writeClass() to here.
- New member m_pkgsGenerated is required for closing opened files in
  finalizeRun().
- New member m_classesGenerated is required for ensuring that order of code
  generation is consistent with order of dependencies among classifiers in
  the package.

umbrello/codegenerators/ada/adawriter.cpp function writeClass()
- Return immediately without further action if `c' is already present in
  m_classesGenerated.
- If `pkg' is found in m_pkgsGenerated then do not open file / write
  initial declarations but instead use the value() of the PackageFileMap::
  iterator found for `file'.
- If `pkg' is found in m_pkgsGenerated then:
  - Open file and write initial declarations; in loop over `imports', do not
    write "with" if packageName(con) does not match `pkg'.
  - Assign `file' into m_pkgsGenerated[pkg].
- Before declaring the Ada type mapped from `c', loop over
  c->getSuperClasses() and ensure that superclasses in same package are
  written beforehand.
- Move all aggregation/composition/attribute handling to finalizeRun().

umbrello/codegenerators/ada/adawriter.cpp function reservedKeywords()
- Add Ada2005 reserved word "interface".

M  +247  -184  umbrello/codegenerators/ada/adawriter.cpp
M  +24   -2    umbrello/codegenerators/ada/adawriter.h
M  +15   -0    umbrello/codegenerators/codegenerator.cpp
M  +2    -0    umbrello/codegenerators/codegenerator.h
M  +4    -6    umbrello/codegenerators/simplecodegenerator.cpp
M  +4    -5    umbrello/uml.cpp

http://commits.kde.org/umbrello/3b6386203c827fd65937692c5a4fdf9f8457ef2a

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list