Which languages supported by Umbrello use templates?
Ralf Habacker
ralf.habacker at freenet.de
Thu Aug 6 16:15:10 BST 2020
Am 06.08.20 um 13:48 schrieb Robert Hairgrove:
> 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...}
yes, you can limit your change to the c++ language by using the function
mentioned below
/**
* Get the language for import and code generation.
*/
Uml::ProgrammingLanguage::Enum UMLApp::activeLanguage() const
e.g. by calling
UMLApp::app()->activeLanguage()
Regards
Ralf
More information about the umbrello-devel
mailing list