[umbrello] [Bug 73847] support for UML tagged values

Oliver Kellogg bugzilla_noreply at kde.org
Mon Dec 21 23:36:53 GMT 2020


--- Comment #27 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit c7fdfefc7df721f2f167e1b52bae9e07f68cb439 by Oliver Kellogg.
Committed on 12/10/2020 at 21:28.
Pushed by okellogg into branch 'master'.

Create branch work/73847-tagged-uml from master at 9817ffc :

- New namespace PrimitiveTypes encapsulates basic element of the
  support for UML primitive types:
  - enum Enum lists the available primitive types plus a final value
    Reserved which is used for determining the number of values.
  - Integer constant n_types acts as synonym for Reserved.
  - Functions toString convert an Enum or equivalent integer value
    to the corresponding string.
  - Function fromString converts a string to the corresponding Enum.
    If the string doe not correspond to an Enum value then the value
    Reserved is returned.
  - Function fromInt converts an integer position number to the Enum
    value at that position.
- At ProgrammingLanguage::Enum value `Reserved' document that this is
  now used for selecting the UML Primitive Types.

- Implement the functions in new namespace PrimitiveTypes.
- In namespace ProgrammingLanguage function toString return "none"
  for the Reserved value.

- Class AttributeDef defines a stereotype attribute.
- Type AttributeDefs is a QVector of AttributeDef.
  This is the type used by the new protected member m_attrDefs.
- Function clearAttributeDefs clears m_attrDefs.
- Function setAttributeDefs sets m_attrDefs.
- Function getAttributeDefs() returns m_attrDefs.
- Function load1 loads m_attrDefs from XMI.
- Function saveToXMI1 is extended to save m_attrDefs to XMI.

- In function isCommonDataType case (gen == 0) return true to reflect
  the fact that UML primitive types are common types.

- Dialog for specifying up to N_STEREOATTRS stereotype attributes.
  A stereotype attribute has a name and type.
  The type can be chosen from among the UML Primitive Types.

- Extend function contextMenuEvent so that if the user clicks on an
  existing stereotype row then a StereoAttributeDialog is opened
  which permits to define the attributes for the selected stereotype.

- In function setupActiveLanguageBox while-loop, include
  Uml::ProgrammingLanguage::Reserved in the range covered by
- In function updateCodeGenerationPolicyTab, do not call
  CodeGenFactory::newCodeGenPolicyExt(pl) if pl is

- In function loadExtensionsFromXMI1 decoding of tag "codegeneration",
  the cgelement attribute "language" may now assume the value "none"
  to denote that the UML primitive types are selected. In this case do
  not attempt setting a code generator.
- In function addDefaultDatatypes, if UMLApp::app()->generator() returns
  null on entry then this causes the UML primitive types to be created.

- In private slots declare void setLang_none().
- At declaration of m_langAct increase array size by 1 to accomodate
  the action for Uml::ProgrammingLanguage::Reserved.

- In function initActions(),
  - call setProgLangAction for associating Uml::ProgrammingLanguage::
    Reserved with the action "setLang_none";
  - connect m_langAct[Uml::ProgrammingLanguage::Reserved] trigger with
    the setLang_none slot.
- In function setGenerator :
  - Remove early actions / early return on
    (pl == Uml::ProgrammingLanguage::Reserved).
  - If pl is Uml::ProgrammingLanguage::Reserved then avoid allocating
    and calling functions on m_codegen. The only actions taken in this
    case are: Set m_activeLanguage, call updateLangSelectMenu(pl),
    call slotAddDefaultDatatypes().
- Define added slot setLang_none to call
- In function updateLangSelectMenu include Uml::ProgrammingLanguage::
  Reserved in the range covered by for-loop variable `i'.

- In for-loop constructing the "set-language-" options include
  Uml::ProgrammingLanguage::Reserved in the iteration in order to
  construct "set-language-none".
- In for-loop listing the supported languages for option "--languages"
  include Uml::ProgrammingLanguage::Reserved in the iteration.

- Add member m_TaggedValues of type QStringList.

umbrello/uml1model/umlobject.cpp   WORK IN PROGRESS
- In function save1 add saving of m_TaggedValues (if non empty).
  This creates a new subelement, <UML:ModelElement.taggedValues> in
  which the <UML:TaggedValue> elements are embedded.
- In function loadFromXMI1 add loading of subelement
  <UML:ModelElement.taggedValues> with nested elements

- On setting libdialogs_SRCS include new file

- In menu "code" submenu "active_lang_menu" add action "setLang_none".

- Increase XMI_FILE_VERSION to "1.6.20" due to added <UML:Attribute>
  subelements of <UML:Stereotype>.

M  +1    -0    umbrello/CMakeLists.txt
M  +52   -1    umbrello/basictypes.cpp
M  +23   -1    umbrello/basictypes.h
M  +4    -2    umbrello/codegenwizard/codegenoptionspage.cpp
A  +124  -0    umbrello/dialogs/stereoattributedialog.cpp     [License: GPL
A  +53   -0    umbrello/dialogs/stereoattributedialog.h     [License: GPL
M  +2    -2    umbrello/main.cpp
M  +1    -1    umbrello/model_utils.cpp
M  +22   -1    umbrello/stereotypeswindow.cpp
M  +1    -0    umbrello/umbrelloui.rc.cmake
M  +16   -13   umbrello/uml.cpp
M  +2    -1    umbrello/uml.h
M  +79   -0    umbrello/uml1model/stereotype.cpp
M  +19   -0    umbrello/uml1model/stereotype.h
M  +43   -1    umbrello/uml1model/umlobject.cpp
M  +5    -0    umbrello/uml1model/umlobject.h
M  +11   -8    umbrello/umldoc.cpp
M  +1    -1    umbrello/version.h


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

More information about the umbrello-devel mailing list