Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Figure for diagram root element (Package4ViewFactory in uml2tools )
Figure for diagram root element (Package4ViewFactory in uml2tools ) [message #194754] Fri, 27 June 2008 07:46 Go to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

Hi !
I am back with some questions. Hope one of you can help me.

I have created a sub-diagram relative to a metaclass A. I want to have a
figure in background like when we double-clik on a package in uml2tools
and have an editor with a figure on top-left displaying the name of the
package and an imports compartment.

I searched and found different methods : customize the creation wizard,
override decorateView method in the class extending DiagramViewwFactory
or createFigure() in the metaclassAEditPart. I tried them but it did not
work or I did ont understand how to do it.
My problem is that i want it representing the semanticElement at the root
of the diagram.

So I tried to understand how they did it in uml2tools. I found that it is
the Package4viewFactory that is responsible of what I want to do. It calls
2 getViewService with the EditPart of the package name and the EditPart
of the package imports as parameters. I did not understand all the stuff
but anyway.
It is called after the openEditor method in OpenDiagramEditPolicy.

Note: the eclipse debugger bugs at the line calling the openEditor method
and after some minutes pops-up at the decorateView where I placed a
breakpoint. I cliked on the step-over button only.It is weird no ?


Sorry, it is a long message but i tried to explain my problem in detail.If
someone can give me a hint on how it is done or explain i will be extremly
thankfull.

Thanks in advance
Re: Figure for diagram root element (Package4ViewFactory in uml2tools ) [message #194793 is a reply to message #194754] Fri, 27 June 2008 12:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

I have another question. I found that in the gmfgen the node corresponding
to Package4EditPart have an attribute inner class view map with substitute
with canvas element == true.

Does someone know from where this "substitute with canvas element"
attribute comes? Did they modify gmfgen.ecore?

Thx in advance
Re: Figure for diagram root element (Package4ViewFactory in uml2tools ) [message #195172 is a reply to message #194793] Tue, 01 July 2008 13:44 Go to previous message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

I found that they used customized gmfgen metamodel and custom templates so
I can't use their approach.

However, for the small thingie representing the package on top-right I
think the clue its the getViewService method.

If i manage to do it this way I will post how.

regards
Previous Topic:Parent assigned viewmap ??
Next Topic:how to disable "create **Connection to"?
Goto Forum:
  


Current Time: Fri Apr 26 22:52:27 GMT 2024

Powered by FUDForum. Page generated in 0.02570 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top