[Uml-devel] Code generator

Syam S. syam at emirates.net.ae
Fri Sep 27 11:22:05 UTC 2002


Hi,
The code generator, when generating code, is converting file names to lower 
case. So it does not work correctly for Java classes since Java class names 
are case sensitive and Java file names must be same as the class names. Also, 
for Java classes, the package names must be included in the file names to 
create correct path.

>From the codegenerator.cpp ...

QString CodeGenerator::findFileName(UMLConcept *c, QString ext)
{
   ...
   ...

  //else, determine the "natural" file name
  // For Java: lower() removed and getPackage() added
  QString name = c->getPackage() + "." + c->GetName();
  // Convert all "." to "/" : Platform-specific path separator
  name.replace(QRegExp("\\."),"/"); // Simple hack!
  ...
  ...







More information about the umbrello-devel mailing list