Which languages supported by Umbrello use templates?
Robert Hairgrove
code at roberthairgrove.com
Thu Aug 6 12:48:16 BST 2020
I am trying to figure out what to do about this bug:
https://bugs.kde.org/show_bug.cgi?id=425009
There is an attachment on that site which I cannot upload to the mailing
list, of course. But it shows what I am talking about.
My first idea here would be merely to modify the function
UMLTemplate::toString() and strip out any occurrances of the package
scope using the separator token "::", or whatever it is depending on the
language, which can be queried by calling
UMLApp::activeLanguageScopeSeparator(). If an attribute or operation
parameter has a class type of "std::string", for example, we wouldn't
want to remove the "std::" prefix because this is an ordinary class. So
removing it in the ClassifierWidget::drawMembers() function is a little
bit too late for such things. I could put this inside a guard, like
e.g.: if (lang==C++) {strip out path} ... else {proceed normally...}
Hopefully, the change would be limited to this one function and no
header files would be touched.
But Umbrello must accommodate a number of different programming
languages, not just C++. Can anyone tell me whether there might be
other programming languages where the package path in the template scope
is desirable, or even necessary? Unfortunately, my repertoire of
languages using templates is limited to C++, although I think that they
have recently been added to Java?
And does anyone see any potential problems if I implement this change in
this manner?
More information about the umbrello-devel
mailing list