Luis Sergio Oliveira wrote:
Michiel van der Wulp wrote:
Dear All,
Please help me with the following: I am mentoring Marcos for the
GSoC, and
he has prepared some code that he wants my approval for.
I do not have enough time, nor the experience with the profiles
subsystem to
do this properly myself.
Is the code in his branch ready for committing in main?
See
http://argouml.tigris.org/svn/argouml/branches/gsoc2008_maurelio1234_profiles/profile/
and in the issue:
http://argouml.tigris.org/issues/show_bug.cgi?id=5029
Hi Michiel,
I have just checkedout. The code should receive a merge from the
trunk, since the profiles *.xmi files changed place recently (last
week I think).
The following files have this problem:
CoreProfileReference.java
FileModelLoader.java
Profile.java
ProfileModelLoader.java
ReaderModelLoader.java
ResourceModelLoader.java
StreamModelLoader.java
URLModelLoader.java
UserDefinedProfile.java
ZipModelLoader.java
I'll try to send more meaningful feedback tomorrow.
So, the code in plugin subdirectory is the new stuff. Here go some comments:
Where are the automated tests?
The XML processing is a bit better (see PluginProfileLoaderImpl.java)
than the one devised for ProfileConfigurations (see
ProfileConfigurationFilePersister.java), but, I would like to see it
less hard coded, meaning, we could define a XML schema, generate parsing
code from there and parse and validate the XML files containing the
profile definitions.
In a project I worked before, castor did a great work at this, enabling
the generation of the java code from a XML schema and validation of the
XML files against the schema.
The code has no documentation for many of the public methods, so, it
won't obey to the coding style guidelines.
How are the FormatingStrategy and the DefaultTypeStrategy intended to be
implemented in the plugin variant of the profiles?
As a generic comment, I see the usage of a new XML file format as
negative. We already have the XMI format. UML is an extensible modeling
language and it allows tagged values to be associated to stereotypes.
Thus, we may associate a figure file to a specific stereotype using a
tagged value in the stereotype (see FigNodeStrategy). We may define
values for three Tag Definitions - DefaultAttributeType,
DefaultParameterType and DefaultReturnType - in the model that is the a
profile, and, where the types are defined, or, being the profile
dependent on another profile where the types are defined.
How about critics, couldn't we also place them in a XMI file? If they
are stored as OCL we sure can. If they are saved as a scripting
language, these could be placed in a special tagged value, closely
associated to some class or DataType for which they are meaningful.
Defining FormatingStrategies could be done in the same way as critics,
i.e., by placing code in the XMI file which would have to follow a
specific convention...
This would allow users of ArgoUML to use ArgoUML to extend ArgoUML by
defining profiles which would have the same functionality as the module
(or plugin) profiles and the module profile developers would use also
ArgoUML for the same task. Even the PluginProfileModule class could go
away if we follow the idea of /design by convention/ and specify that
there is a mechanism in the ArgoUML core that checks the modules to look
for profiles in a specific directory of the jar.
With this approach we would be eating more of our own dog food, which is
always a good thing if we want to make sure that in the end our software
works.
PS: I'll add this generic comment to the issue. Sorry for only now
providing feedback on this...
PS: its funny, I thought that SVN checkout of a branch would give me a
full copy of the repository... How do you work with this this way?
I did:
svn co
http://argouml.tigris.org/svn/argouml/branches/gsoc2008_maurelio1234_profiles/profile
argouml-marcus-profiles --username euluis --password xxx
Thanks Christian for enlightening me.
Regards,
Luis
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]