Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCustom figures creation
https://www.eclipse.org/forums/index.php/mv/msg/235000/715561/#msg_715561
I am trying to come with a special feature, that once my palette is loaded with specific buttons. I can than create item by selecting one of the buttons and droping it to canvas (regular functionality). However I am trying to find the best way of how to modify the creation code, so i can create several 'figures' under on button. Lets say I have a function and child port element. And now i want to be able to create one function with several ports only after one click in the palette. Is the FunctionEditPart the right place to proceed with the modifications? And should I use the addFixedChild with PortEditPart passed or should I use the ViewProvider...?
Anyone ever done this before?
Thanks in advance for help. ]]>janpojer2011-08-14T13:39:26-00:00Re: Custom figures creation
https://www.eclipse.org/forums/index.php/mv/msg/235000/715686/#msg_715686
are the ports contained in the element you want to create (in the semantic model)? If yes you can simply use the FeatureSeqInitializer in gmfmap. The rest will be done by GMF.
Ralph]]>Ralph Gerbig2011-08-15T07:59:22-00:00Re: Custom figures creation
https://www.eclipse.org/forums/index.php/mv/msg/235000/715816/#msg_715816
Are FeatureSeqInitializer still good match?
Jan]]>janpojer2011-08-15T16:24:52-00:00Re: Custom figures creation
https://www.eclipse.org/forums/index.php/mv/msg/235000/715839/#msg_715839
Any idea, why is that?
Thanks a lot...]]>janpojer2011-08-15T17:48:11-00:00Re: Custom figures creation
https://www.eclipse.org/forums/index.php/mv/msg/235000/715977/#msg_715977
a second not that nice way from my point of view is to extend the default setup method in the ElementInitializer which can be found in the provider package of your generated pulgin. The method is called something like MetaModelElementName_0000 If you decide for this solution it would make sense to use a custom template but we can discuss this later.
Ralph]]>Ralph Gerbig2011-08-16T06:42:11-00:00Re: Custom figures creation
https://www.eclipse.org/forums/index.php/mv/msg/235000/716087/#msg_716087
yes, thats exactly what i did with the desired result. With the only problem that it disrespect my preset layout settings in form of EAST/WEST side. Any idea why is that?
The complete idea is to load external resource (created by another emf editor) - can for that purpose somehow use Resource manager? and on change of this resource update my palette (with items from external resource) and on clicking items from customized palette launch adjusted initializers.