I don't know about the UML spec, but in the "UML Reference Manual" book by Rumbaugh,
Jacobson, and Booch, it says on page 250, "A dependency is a relationship between two
elements in which a change to one element (the supplier) may affect or supply
information needed by the other element (the client)". IMO your local variable depends
on the external class definition.
What we have chosen to do here, is not model all of the classes from 3rd party
libraries, but to only model classes we create. Therefore, we have to manually update
the source code to include/import headers delivered with the compiler. Otherwise your
model would be not be manageable.
> ----------
> From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Friday, July 13, 2001 6:18 PM
> To: [EMAIL PROTECTED]
> Subject: RE: (ROSE) How to show association to local class variable withou
>tgenerating extraneous Java code
>
> Again, my question is "why should all local variables and method arguments be
>modeled as dependencies, not associations."? Nothing in the UML that I can tell
>dictates this. If the reason is solely because the tool wants me to do it that way,
>then the tool is broken and should be fixed. You are correct, if I model this as a
>dependency, then Rose does behave this way. But it is my belief, and will be until
>someone can prove to me otherwise via the UML specification, that what I am
>describing is an association, and Rose ought to support me doing it this way.
>
> -----Original Message-----
> From: Gilliam, Jeffrey F. [ mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 13, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: (ROSE) How to show association to local class variable
> withou tgenerating extraneous Java code
>
>
>
> I disagree with this method. I don't know about Java, but in C++ all local variables
>and method arguments should be modeled as dependencies, not associations. This will
>cause Rose to include the header, but not create a member variable. I assume Java
>should make the same decision and create an import statement and not create a member
>variable for a dependency.
>
> > ----------
> > From: Sai Pulugurtha[SMTP:[EMAIL PROTECTED]]
> > Reply To: Sai Pulugurtha
> > Sent: Friday, July 13, 2001 2:34 PM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: RE: (ROSE) How to show association to local class variable withou
>tgenerating extraneous Java code
> >
> > Yes, UML allows it to be an association and so does Rose (I have C++). You have to
>"double-click" on the association and modify code generation properties to not
>generate member variable and also not to generate get and set methods.
>
> >
> > Thanks,
> > Sai
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED]]On
>Behalf Of [EMAIL PROTECTED]
> > Sent: Friday, July 13, 2001 1:01 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: (ROSE) How to show association to local class variable withou
>tgenerating extraneous Java code
> >
> >
> >
> > Why should I not model this as an association. I don't see where the UML spec
>tells me I shouldn't. In fact, from what I can tell, this is in fact a true UML
>association. Where does UML make the distinction that the reference must be
>maintainted constantly?
>
> >
> > The problem I have with static classes is the same - if I draw an association from
>a Sender to a Receiver that happens to be a static class, Rose insists on creating an
>instance variable. And again, I don't see where UML tells me I should not make this
>an association. In fact, in the target scope discussion for an association end, one
>of the structural properties is defined as "target scope", which defines whether the
>links relate objects or entire classes.>
>
> >
> > Several of the Rose folks are pretty active on this forum. Come on folks, help me
>out here. What am I missing?
> >
> > -----Original Message-----
> > From: Ilya Zvyagin [ mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 12, 2001 9:38 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: (ROSE) How to show association to local class variable
> > without generating extraneous Java code >
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > Date: 12 > ���� 2001 �. 15:34
> > Subject: (ROSE) How to show association to local class variable without
> > generating extraneous Java code
> >
> >
> > >variable as opposed to an instance variable. I want the model to show that
> > >Sender sends messages to Receiver, so I think I want to create an
> > >association between Sender and Receiver. But I have two problems when I
> >
> > You SHOULD NOT create this association if two classes instances don't have
> > this references constantly, every time. The association between them meens
> > exactly what is generated and what you don't want to have.
> >
> > >forward engineer:
> > >1) Rose insists on creating an instance variable for the Receiver class
> > >object, which I don't want since I've got the reference in a local
> > variable.
> >
> > I've explained.
> >
> > >2) Rose doesn't add an import for the class if it is in another package.
> >
> > To make imports, you should creat an dependency link between two classes,
> > from Sender ( the client ) to Receiver ( the server ).
> >
> > >The only good way I've found to force Rose to include the import is to
> > >create a dependency to the Receiver class.
> >
> > I did not read :-))
> > But in this case Sender depends on Receiver, this fact SHOULD be reflected
> > in the
> > model as DEPENDENCY link.
> >
> > >On a similar note, I have the same problem showing associations to static>
> > >classes (i.e., classes that only have static methods and never get
> > >instantiated).
> >
> > I fear I don't understand what you mean. What's wrong thith them ?
> >
> > --------------------
> > Ilya Zvyagin, First Container Terminal of SPb Sea Port
> > e-mail: [EMAIL PROTECTED] - personal, [EMAIL PROTECTED] - business.
> > ICQ UID: 29427861(MasterZIV)
> >
> >
> >
> ************************************************************************
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
>http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> *************************************************************************
>
>
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************