Home » Modeling » UML2 Tools » How do I model the Package description in component diagram?
|
Re: How do I model the Package description in component diagram? [message #476372 is a reply to message #476370] |
Wed, 08 April 2009 15:56 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Ralf,
> If I try to open the componentDiagram.gmfmap Eclipse complaints about
> UML.ecore doesn't exist (despite I have installed the GMF SDK and all
> files are there).
Now we use the following configuration:
-Current sources of UML2Tools from CVS;
-Most dependencies(Eclipse SDK, EMF Query, EMF transaction, EMF validation,
GEF, GMF, UML2) -- Galileo M6 version,
OCL and QVT -- Galileo M5 version;
-You also have to check out several GMF plugins (use PSF from https://bugs.eclipse.org/bugs/attachment.cgi?id=131279).
The GMF plugins should be taken by state of 11th of February 2009;
-Make sure you have "org.eclipse.uml2.diagram.codegen" and "org.eclipse.uml2.diagram.codegen.edit"
plugins in your workspace.
For more information about how to generate UML2Tools reference http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams
page.
> Can you please give me a hint how I can create the package symbol in
> the
> upper left corner for every new diagram?
This is one of our 'know-how'. Open componentDiagram.gmfgen file, find GenTopLevelNode
Package2EditPart -- it represents the DiagramHeader, you will see Aux Secondary
Diagram Node element under it. This 'Aux Secondary Diagram Node' means that
the editpart should be shown as a diagram header. If you add such element
to the editpart in your *.gmfgen file and invoke 'Generate UML2Tools' action,
all the code needed to show header will be generated. You can find a little
bit more information on this topic at http://www.eclipsecon.org/2008/sub/attachments/Bitter_GMF_or _How_We_did_UML_with_GMF.pdf
Best wishes,
Tanya.
|
|
|
Re: How do I model the Package description in component diagram? [message #476373 is a reply to message #476372] |
Thu, 09 April 2009 08:46 |
Ralf Heydenreich Messages: 235 Registered: July 2009 |
Senior Member |
|
|
Tatiana Fesenko schrieb:
> Hello Ralf,
>
>> If I try to open the componentDiagram.gmfmap Eclipse complaints about
>> UML.ecore doesn't exist (despite I have installed the GMF SDK and all
>> files are there).
>
> Now we use the following configuration:
> -Current sources of UML2Tools from CVS;
> -Most dependencies(Eclipse SDK, EMF Query, EMF transaction, EMF
> validation, GEF, GMF, UML2) -- Galileo M6 version,
> OCL and QVT -- Galileo M5 version;
> -You also have to check out several GMF plugins (use PSF from
> https://bugs.eclipse.org/bugs/attachment.cgi?id=131279). The GMF plugins
> should be taken by state of 11th of February 2009;
> -Make sure you have "org.eclipse.uml2.diagram.codegen" and
> "org.eclipse.uml2.diagram.codegen.edit" plugins in your workspace.
>
> For more information about how to generate UML2Tools reference
> http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams page.
>
>> Can you please give me a hint how I can create the package symbol in
>> the
>> upper left corner for every new diagram?
>
> This is one of our 'know-how'. Open componentDiagram.gmfgen file, find
> GenTopLevelNode Package2EditPart -- it represents the DiagramHeader, you
> will see Aux Secondary Diagram Node element under it. This 'Aux
> Secondary Diagram Node' means that the editpart should be shown as a
> diagram header. If you add such element to the editpart in your *.gmfgen
> file and invoke 'Generate UML2Tools' action, all the code needed to show
> header will be generated. You can find a little bit more information on
> this topic at
> http://www.eclipsecon.org/2008/sub/attachments/Bitter_GMF_or _How_We_did_UML_with_GMF.pdf
>
>
> Best wishes,
> Tanya.
>
>
Thanks for your answer, I will try it. Package2EditPart was one of the
classes I inspected. What is not clearly at the moment: how can I
achieve that the figure is displayed initially at opening the diagram?
Greetings,
Ralf.
|
|
|
Re: How do I model the Package description in component diagram? [message #476374 is a reply to message #476373] |
Thu, 09 April 2009 09:56 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hi Ralf,
In order to add such header to your own diagram you have to:
1) Create a mapping in your *.gmfmap file. It should look like TopNodeReference
<Package/SecondaryPackageNode> in componentDiagram.gmfmap.
2) Add "Aux Secondary Diagram Node" child to the appropriate TopLevelNode
in *.gmfgen file.
3) Generate code using 'Generate UML2Tools diagrams' action.
How it works?
DiagramHeader is almost a usual GraphicalEditPart. It's EditPart because
it has its graphical presentation on the diagram and it references an element
from domain model. That's why you have to create a mapping in *.gmfmap file.
On the other hand, it has unusual behavior -- it is always displayed on the
diagram, it represents the element of the diagram one more time, its position
is always fixed, it cannot be selected and so on. It is achived by changes
in VisualIDRegistry, DiagramUpdater, ViewFactory and NodeEditPart. As UML2Tools
has such DiagramHeader in many diagram editors, we decided to generate all
required code. We decided to mark such nodes with "Aux Secondary Diagram
Node" element. We also extended xPand templates in order to generate proper
VisualIdRegistry, DiagramUpdater, ViewFactory and EditPart. If you are interested
in details of implementation you can take a look at DiagramHeader.qvto file
from org.eclipse.uml2.diagram.def/dynamic-templates and search for references
of 'isDiagramHeader' operation.
I hope it made thing clear,
Tanya.
> Tatiana Fesenko schrieb:
>
>> Hello Ralf,
>>
>>> If I try to open the componentDiagram.gmfmap Eclipse complaints
>>> about UML.ecore doesn't exist (despite I have installed the GMF SDK
>>> and all files are there).
>>>
>> Now we use the following configuration:
>> -Current sources of UML2Tools from CVS;
>> -Most dependencies(Eclipse SDK, EMF Query, EMF transaction, EMF
>> validation, GEF, GMF, UML2) -- Galileo M6 version,
>> OCL and QVT -- Galileo M5 version;
>> -You also have to check out several GMF plugins (use PSF from
>> https://bugs.eclipse.org/bugs/attachment.cgi?id=131279). The GMF
>> plugins
>> should be taken by state of 11th of February 2009;
>> -Make sure you have "org.eclipse.uml2.diagram.codegen" and
>> "org.eclipse.uml2.diagram.codegen.edit" plugins in your workspace.
>> For more information about how to generate UML2Tools reference
>> http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams
>> page.
>>
>>> Can you please give me a hint how I can create the package symbol in
>>> the
>>> upper left corner for every new diagram?
>> This is one of our 'know-how'. Open componentDiagram.gmfgen file,
>> find GenTopLevelNode Package2EditPart -- it represents the
>> DiagramHeader, you will see Aux Secondary Diagram Node element under
>> it. This 'Aux Secondary Diagram Node' means that the editpart should
>> be shown as a diagram header. If you add such element to the editpart
>> in your *.gmfgen file and invoke 'Generate UML2Tools' action, all the
>> code needed to show header will be generated. You can find a little
>> bit more information on this topic at
>> http://www.eclipsecon.org/2008/sub/attachments/Bitter_GMF_or _How_We_d
>> id_UML_with_GMF.pdf
>>
>> Best wishes,
>> Tanya.
> Thanks for your answer, I will try it. Package2EditPart was one of the
> classes I inspected. What is not clearly at the moment: how can I
> achieve that the figure is displayed initially at opening the diagram?
>
> Greetings,
> Ralf.
|
|
|
Re: How do I model the Package description in component diagram? [message #623636 is a reply to message #476370] |
Wed, 08 April 2009 15:56 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hello Ralf,
> If I try to open the componentDiagram.gmfmap Eclipse complaints about
> UML.ecore doesn't exist (despite I have installed the GMF SDK and all
> files are there).
Now we use the following configuration:
-Current sources of UML2Tools from CVS;
-Most dependencies(Eclipse SDK, EMF Query, EMF transaction, EMF validation,
GEF, GMF, UML2) -- Galileo M6 version,
OCL and QVT -- Galileo M5 version;
-You also have to check out several GMF plugins (use PSF from https://bugs.eclipse.org/bugs/attachment.cgi?id=131279).
The GMF plugins should be taken by state of 11th of February 2009;
-Make sure you have "org.eclipse.uml2.diagram.codegen" and "org.eclipse.uml2.diagram.codegen.edit"
plugins in your workspace.
For more information about how to generate UML2Tools reference http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams
page.
> Can you please give me a hint how I can create the package symbol in
> the
> upper left corner for every new diagram?
This is one of our 'know-how'. Open componentDiagram.gmfgen file, find GenTopLevelNode
Package2EditPart -- it represents the DiagramHeader, you will see Aux Secondary
Diagram Node element under it. This 'Aux Secondary Diagram Node' means that
the editpart should be shown as a diagram header. If you add such element
to the editpart in your *.gmfgen file and invoke 'Generate UML2Tools' action,
all the code needed to show header will be generated. You can find a little
bit more information on this topic at http://www.eclipsecon.org/2008/sub/attachments/Bitter_GMF_or _How_We_did_UML_with_GMF.pdf
Best wishes,
Tanya.
|
|
|
Re: How do I model the Package description in component diagram? [message #623637 is a reply to message #476372] |
Thu, 09 April 2009 08:46 |
Ralf Heydenreich Messages: 235 Registered: July 2009 |
Senior Member |
|
|
Tatiana Fesenko schrieb:
> Hello Ralf,
>
>> If I try to open the componentDiagram.gmfmap Eclipse complaints about
>> UML.ecore doesn't exist (despite I have installed the GMF SDK and all
>> files are there).
>
> Now we use the following configuration:
> -Current sources of UML2Tools from CVS;
> -Most dependencies(Eclipse SDK, EMF Query, EMF transaction, EMF
> validation, GEF, GMF, UML2) -- Galileo M6 version,
> OCL and QVT -- Galileo M5 version;
> -You also have to check out several GMF plugins (use PSF from
> https://bugs.eclipse.org/bugs/attachment.cgi?id=131279). The GMF plugins
> should be taken by state of 11th of February 2009;
> -Make sure you have "org.eclipse.uml2.diagram.codegen" and
> "org.eclipse.uml2.diagram.codegen.edit" plugins in your workspace.
>
> For more information about how to generate UML2Tools reference
> http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams page.
>
>> Can you please give me a hint how I can create the package symbol in
>> the
>> upper left corner for every new diagram?
>
> This is one of our 'know-how'. Open componentDiagram.gmfgen file, find
> GenTopLevelNode Package2EditPart -- it represents the DiagramHeader, you
> will see Aux Secondary Diagram Node element under it. This 'Aux
> Secondary Diagram Node' means that the editpart should be shown as a
> diagram header. If you add such element to the editpart in your *.gmfgen
> file and invoke 'Generate UML2Tools' action, all the code needed to show
> header will be generated. You can find a little bit more information on
> this topic at
> http://www.eclipsecon.org/2008/sub/attachments/Bitter_GMF_or _How_We_did_UML_with_GMF.pdf
>
>
> Best wishes,
> Tanya.
>
>
Thanks for your answer, I will try it. Package2EditPart was one of the
classes I inspected. What is not clearly at the moment: how can I
achieve that the figure is displayed initially at opening the diagram?
Greetings,
Ralf.
|
|
|
Re: How do I model the Package description in component diagram? [message #623638 is a reply to message #476373] |
Thu, 09 April 2009 09:56 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
Hi Ralf,
In order to add such header to your own diagram you have to:
1) Create a mapping in your *.gmfmap file. It should look like TopNodeReference
<Package/SecondaryPackageNode> in componentDiagram.gmfmap.
2) Add "Aux Secondary Diagram Node" child to the appropriate TopLevelNode
in *.gmfgen file.
3) Generate code using 'Generate UML2Tools diagrams' action.
How it works?
DiagramHeader is almost a usual GraphicalEditPart. It's EditPart because
it has its graphical presentation on the diagram and it references an element
from domain model. That's why you have to create a mapping in *.gmfmap file.
On the other hand, it has unusual behavior -- it is always displayed on the
diagram, it represents the element of the diagram one more time, its position
is always fixed, it cannot be selected and so on. It is achived by changes
in VisualIDRegistry, DiagramUpdater, ViewFactory and NodeEditPart. As UML2Tools
has such DiagramHeader in many diagram editors, we decided to generate all
required code. We decided to mark such nodes with "Aux Secondary Diagram
Node" element. We also extended xPand templates in order to generate proper
VisualIdRegistry, DiagramUpdater, ViewFactory and EditPart. If you are interested
in details of implementation you can take a look at DiagramHeader.qvto file
from org.eclipse.uml2.diagram.def/dynamic-templates and search for references
of 'isDiagramHeader' operation.
I hope it made thing clear,
Tanya.
> Tatiana Fesenko schrieb:
>
>> Hello Ralf,
>>
>>> If I try to open the componentDiagram.gmfmap Eclipse complaints
>>> about UML.ecore doesn't exist (despite I have installed the GMF SDK
>>> and all files are there).
>>>
>> Now we use the following configuration:
>> -Current sources of UML2Tools from CVS;
>> -Most dependencies(Eclipse SDK, EMF Query, EMF transaction, EMF
>> validation, GEF, GMF, UML2) -- Galileo M6 version,
>> OCL and QVT -- Galileo M5 version;
>> -You also have to check out several GMF plugins (use PSF from
>> https://bugs.eclipse.org/bugs/attachment.cgi?id=131279). The GMF
>> plugins
>> should be taken by state of 11th of February 2009;
>> -Make sure you have "org.eclipse.uml2.diagram.codegen" and
>> "org.eclipse.uml2.diagram.codegen.edit" plugins in your workspace.
>> For more information about how to generate UML2Tools reference
>> http://wiki.eclipse.org/MDT-UML2Tools_How_To_Regenerage_Diag rams
>> page.
>>
>>> Can you please give me a hint how I can create the package symbol in
>>> the
>>> upper left corner for every new diagram?
>> This is one of our 'know-how'. Open componentDiagram.gmfgen file,
>> find GenTopLevelNode Package2EditPart -- it represents the
>> DiagramHeader, you will see Aux Secondary Diagram Node element under
>> it. This 'Aux Secondary Diagram Node' means that the editpart should
>> be shown as a diagram header. If you add such element to the editpart
>> in your *.gmfgen file and invoke 'Generate UML2Tools' action, all the
>> code needed to show header will be generated. You can find a little
>> bit more information on this topic at
>> http://www.eclipsecon.org/2008/sub/attachments/Bitter_GMF_or _How_We_d
>> id_UML_with_GMF.pdf
>>
>> Best wishes,
>> Tanya.
> Thanks for your answer, I will try it. Package2EditPart was one of the
> classes I inspected. What is not clearly at the moment: how can I
> achieve that the figure is displayed initially at opening the diagram?
>
> Greetings,
> Ralf.
|
|
|
Goto Forum:
Current Time: Tue Apr 23 17:27:14 GMT 2024
Powered by FUDForum. Page generated in 0.03194 seconds
|