| View previous topic :: View next topic |
| Author |
Message |
marton_sigmond
Joined: 13 Nov 2007 Posts: 10 Location: Hungary
|
Posted: Wed Nov 14, 2007 12:33 pm Post subject: read-only source - limited modeling capability |
|
|
Hi,
when the source code of a Java class is read-only, dependencies, associations, etc. cannot be added to it in the model.
However this can be a serious limitation in several cases.
For example:
- Understanding my model is much easier if I add several standard Java classes to it, and show the relations between them (i.e. showing the relation between the java.util.logging.Logger and the java.util.logging.Handler can be essential in the model of an extended logging framework).
Please extend eUML2 accordingly.
Thanks,
Marton |
|
| Back to top |
|
 |
marton_sigmond
Joined: 13 Nov 2007 Posts: 10 Location: Hungary
|
Posted: Wed Nov 14, 2007 3:20 pm Post subject: |
|
|
Another example:
You have a class that implements java.awt.event.ActionListener, and you add it to a javax.swing.JButton (addActionListener method).
Now, if you would like to model this, it would be impossible, because what you need is a unidirectional association that points from JButton to ActionListener.
Or a weaker solution would be to point the unidirectional association from JButton to YourActionListenerClass, but this also cannot be done.
Marton |
|
| Back to top |
|
 |
Antoine soyatec
Joined: 06 Sep 2006 Posts: 188
|
Posted: Fri Nov 16, 2007 10:34 am Post subject: |
|
|
Hi Marton,
I didn't clearly understand your problem.
You can't change the model if the underlying classes are read only or binary, the diagram is always synchronized with the java code. So if eUML2 can't modify the underlying classes, it won't change the model, this is the expected behaviour.
About the example: eUML2 doesn't analyse in details classes from libraries since it would be too costly. So you can't display the association from JButton to ActionListener. But this no problem to create an association from a source class to a binary class, obviously the association will be unidirectional.
Best regards,
Antoine |
|
| Back to top |
|
 |
marton_sigmond
Joined: 13 Nov 2007 Posts: 10 Location: Hungary
|
Posted: Fri Nov 16, 2007 12:06 pm Post subject: |
|
|
Antoine,
it is very common, that you want to show part of the environment in which your classes work.
Example: demonstrating how your classes and Swing cooperate.
1) Read-only & binary classes cannot be changed, so just simply store the association in the model itself.
2) Of course analyzing the libraries would be to expensive, I never expected that. But please trust developers, that they know the external libraries well enough, and let them place elements into the model.
Thanks a lot,
Marton |
|
| Back to top |
|
 |
|