[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology.gmt] Re: oaw: beginner questions
|
Sven Efftinge a écrit :
> You don't need to store such informations, just define an extension
> (containing your expression) and invoke it each time you need the
> information.
> If you are worrying about performance use the 'cached' keyword. It
> garantees that the expression is only evaluated once for each Class
> instance.
>
> regards,
> Sven
Well, in my .uml2 file, associations are siblings of classes or
interfaces. Each association (2 ends) affect 2 class/interface. And I
create one java file for each class/interface.
Then if I parse associations after parsing classes and interfaces, I
don't know how to open the wanted file for each association-end and then
add information inside it (FILE only creates a new file it seems).
So what I did was to parse associations first, store information and
then fetch it when the class/interface computed is part of an
association-end. That way I can add association information in correct
java file.
If you have a better solution I'll be glad to hear it. :)