From: Robert L. <rle...@sb...> - 2004-01-17 14:08:58
|
Leif Johnson wrote: > Hi all - >=20 > I'm having organization thoughts about the ccmtools. Here they are, > numbered for easy reference : >=20 > 1. We should move the library-type .jar files (MDR/*.jar) into the > directory with the other .jar files (lib/). Ok. Maybe we can replace the MDR-library and make our own MOF-JMI-generator? >=20 > 2. We should move all of our metamodel .java files into the > Metamodel/ directory, so the subdirs of that directory will be > BaseIDL, ComponentIDL, OCL, etc. Can we do this ? No. The OCL metamodel (source: ccmtools/MDR/MOF/OCL.src.zip jar: ccmtools/MDR/oclmetamodel.jar) has the Java package name "oclmetamodel". The MDR-tools cannot handle package names like "ccmtools/Metamodel/OCL". This is one reason, why we should replace the MDR tools. >=20 > 3a. Why don't we make an OCLParser directory and put the OCL*.g files > in there, along with any needed support files from OCL/utils ? > Then we could build that directory just like the IDL3Parser > directory, and not have to keep the > OCL{Parser|Lexer|TokenTypes}.java files in CVS.=20 I put the parser source into the "utils" package, because of circular class dependencies. I will try to separate the parser code from the utils package. >=20 > 3b. It looks like we can do the same thing with the uml2idl directory > ; put it in a UMLParser directory, and generate lots of it > automatically during the build process. >=20 > In fact, if we build the UMLParser directory first, then we could > use that part of the library to generate the necessary files for > the OCLParser directory. Then we could just keep the OCL.xml and > OCL.dtd files in CVS. Ooops. I think, you mixed up UML and OCL: *) The OCL parser reads OCL-statements from plain text files. No XML. It uses the OCL metamodel, which uses the MDR tools. The file ccmtools/MDR/MOF/OCL.xml is needed at runtime by the MDR tools. The file ccmtools/MDR/MOF/OCL.MagicDraw.xml.zip could be used to create ccmtools/MDR/oclmetamodel.jar But it is difficult to add this step to the normal build process of the ccmtools. *) The uml2idl converter creates OCL and IDL text files from UML. The UML model is stored in XMI (XML) files. It uses the uml_parser package, which was created by dtd2java. None of these packages uses any other ccmtools package or is used by any ccmtools package. It is easy to rename the package uml_parser into UMLParser. Summary: *) "dtd2java" needs 'antlr.jar' and is needed to generate "uml_parser" *) "uml_parser" needs only Java 1.4 *) "uml2idl" needs "uml_parser" and creates IDL and OCL files *) "OCL" needs "oclmetamodel" and 'antlr.jar' *) "oclmetamodel" needs 'MDR/mdr01.jar' and 'MDR/MOF/OCL.xml' The best things to do would be: *) add dtd2java, uml_parser and uml2idl to the normal build process (or maybe move it from the ccmtools tree into its own source tree?) *) make our own MOF-JMI-generator =3D> no need for MDR tools or extra = jar-files =3D> create an independent package "ccmtools/Metamodel/OCL" bye -- -- Robert Lechner, rle...@sb... -- |