Hi,
The import statements are handled at the component view
level. As Marc
said,
the component view represents the file system. This is
the reason why it is taken care
of at that
level.
Drawing a
dependency between your classes in the class diagram will have no
effect.
You
need to draw a dependency between the components (mapped to the
classes)
or use
the java specification for the components (import field).
Hope
this helps.
Thanks,
Francois
-----Original Message-----
From: Heide Marc [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 18, 2002 9:24 AM
To: Wonne Keysers
Cc: [EMAIL PROTECTED]
Subject: RE: (ROSE) Rose Java Code GenerationHi!There is no need to have same structure in logical and component(=filesystem) view.So your model is correct as it is. To generate imports for classes from otherpackages just drag the class you want to import in the class diagram anddraw a <dependancy> relationship to this class. Afterwards you can removethe imported classes from the diagramm to prevent a 'pollution' of your diagram.Attention: not with <Ctrl-D>, of cause just with <Del> ;o)Now Rose should generate an import for this class.hope this helpsMarc-----Original Message-----
From: Wonne Keysers [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 12, 2002 3:43 PM
To: 'Synnestvedt, Raida'
Cc: [EMAIL PROTECTED]
Subject: RE: (ROSE) Rose Java Code GenerationHi,Thanks for the example.There is an important difference with our model.The logical view does not represent the Java package structure in our model.Instead, it's something like Logical View::DesignView::Layer::package.In our Component View the structure is company.project.package.component,which is of course the same as in the Java code.Isn't there a workaround to keep this kind of model structure?Code generation does work like this, except that 'extends', 'import', 'throws' and 'implements' statements areshowing the structure of the Logical View (DesignView.Layer.package.Class)instead of the one from the Component View after generating the Java Code.Regards,Wonne Keysersps: It was a Rational consultant which proposed this kind of model structure...-----Oorspronkelijk bericht-----
Van: Synnestvedt, Raida [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag 11 januari 2002 22:21
Aan: 'Keysers, Wonne'; '[EMAIL PROTECTED]'
Onderwerp: RE: (ROSE) Rose Java Code GenerationHi Wonne,Are you using an IDE for java code generation?I tried to generate code in a model where the package java.util is loaded first, the import statement shows as: java.util.Date.Try to generate code for class B inside NewPackage in the attached model and let me know.Best Regards
Raida
Raida Synnestvedt
Rational Rose Technical Support Engineer
Rational WW Customer Service
Support: 1-800-433-5444, Sales/Licensing: 1-800-728-1212
Support http://www.rational.com/support/
Technotes http://www.rational.com/support/technotes/-----Original Message-----
From: Keysers, Wonne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 1:47 AM
To: '[EMAIL PROTECTED]'
Subject: (ROSE) Rose Java Code GenerationHi all,
When performing Java Code generation in Rose (2001A),
no import statement is created for basic classes like 'java.util.Date'.
Instead the whole package structure ('java.util.') is used in the
generated code. (e.g. for parameters of methods, etc...)
I would like to have this in just the opposite way: an import of 'java.util.Date' and just using 'Date' within the actual Java Coding.How can I achieve this?
Thanks in advance!
Wonne Keysers
