Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

read-only source - limited modeling capability

 
Post new topic   Reply to topic     Forum Index -> Feature discussion
View previous topic :: View next topic  
Author Message
marton_sigmond



Joined: 13 Nov 2007
Posts: 10
Location: Hungary

PostPosted: Wed Nov 14, 2007 12:33 pm    Post subject: read-only source - limited modeling capability Reply with quote

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
    View user's profile Send private message
    marton_sigmond



    Joined: 13 Nov 2007
    Posts: 10
    Location: Hungary

    PostPosted: Wed Nov 14, 2007 3:20 pm    Post subject: Reply with quote

    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
    View user's profile Send private message
    Antoine
    soyatec


    Joined: 06 Sep 2006
    Posts: 188

    PostPosted: Fri Nov 16, 2007 10:34 am    Post subject: Reply with quote

    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
    View user's profile Send private message
    marton_sigmond



    Joined: 13 Nov 2007
    Posts: 10
    Location: Hungary

    PostPosted: Fri Nov 16, 2007 12:06 pm    Post subject: Reply with quote

    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
    View user's profile Send private message
    Display posts from previous:   
    Post new topic   Reply to topic     Forum Index -> Feature discussion All times are GMT
    Page 1 of 1

     
    Jump to:  
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum