Hello Andreas!
The question on how to make the transition is the question on how long we
support the MDR implementation.
Another think you need to notice is that the functions that are in the
org.eclipse.uml2.uml.UMLFactory belong to several different diagrams and in
ArgoUML and also in the model subsystem, we have separated that into the one
class for each diagram i.e. the *Factory classes.
It looks like the org.eclipse.uml2.uml.UMLFactory is very similar to a part
of the functions from the *Factory classes. They use methods called
create<ElementType> without argouments to create an unrelated element. If we
want, we could then use the UMLFactory as the base class for these. We could
even have the same factory to implement several factory interfaces.
Like this:
package org.argouml.model.euml;
public class BigFactoryImpl extends UMLFactory implements
ClassDiagramFactory, UseCaseFactory, StatechartDiagramsFactory, ... {
// For each required create methods that is not in UMLFactory:
xxx create<whatever>() { }
// For each required build method:
xxx build<whatever>(x, y, z) { }
}
in EUMLModelImplementation:
BigFactoryImpl bf = new BigFactoryImpl();
ClassDiagramFactory getClassDiagramFactory() { return bf; }
UseCaseFactory getUseCaseFactory() { return bf; }
StatechartDiagramsFactory getStatecharetDiagramsFactory() { return bf; }
...
If there are benefits from this, or not, I am not ready to say. That depends
on how much work it is to implement the create<xxx> function and how well
they fit between the UMLFactory and the *Factory classes. On the other hand,
I think that especially when changing the structure of the model as the
upgrade to UML2 does, it is easier to have all create methods in a single
class and not organize them per diagram as we have done in the ArgoUML model
subsystem. But upgrading the model is supposed to be done seldom and
implementing code that uses the model is supposed to be done alot so perhaps
it is beneficial to the interfaces split in a lot of small files. I guess we
will always have different opinions on what is the best way to do this.
/Linus
2009/5/26 Andreas Rueckert <[email protected]>
> Hi!
>
> The current euml UmlFactory implements
> org.argouml.model.UmlFactory
> , but not
> org.eclipse.uml2.uml.UMLFactory
> (
> http://download.eclipse.org/modeling/mdt/uml2/javadoc/3.0.0/org/eclipse/uml2/uml/UMLFactory.html
> )
> , which limits the functionality a bit.
> I'm uncertain, how we could make a smooth transition here. Give up on the
> Argo factory?
> Or extend the Argo factory to the point, where it includes all the Eclipse
> methods? But this would mean,
> we'd have to implements lots of new methods in the MDR version, which is a
> waste of time?
> Or let the euml version implement both interfaces and just use the eclipse
> methods then?
>
> Ciao,
> Andreas
> --
> Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate +
> Telefonanschluss für nur 17,95 Euro/mtl.!*
> http://portal.gmx.net/de/go/dsl02
>
> ------------------------------------------------------
>
> http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2354025
>
> To unsubscribe from this discussion, e-mail: [
> [email protected]].
> To be allowed to post to the list contact the mailing list moderator,
> email: [[email protected]]
>
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2355819
To unsubscribe from this discussion, e-mail:
[[email protected]].
To be allowed to post to the list contact the mailing list moderator, email:
[[email protected]]