Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Parts nested within of a SWT Widget?
Parts nested within of a SWT Widget? [message #991173] Mon, 17 December 2012 10:35 Go to next message
Eclipse UserFriend
Is it possible to nest Model elements (Parts) within of SWT widgets?

The background of the question: I have my own SWT Widget, which provides the container for my application. Inside of this Widget I would add some parts.
Re: Parts nested within of a SWT Widget? [message #991180 is a reply to message #991173] Mon, 17 December 2012 10:47 Go to previous messageGo to next message
Eclipse UserFriend
Well, as a part is a POJO, you can reuse it wherever you want. But I guess then it wouldn't be a part anymore in terms of the application model. Wink
Re: Parts nested within of a SWT Widget? [message #991293 is a reply to message #991173] Tue, 18 December 2012 06:57 Go to previous messageGo to next message
Eclipse UserFriend
Ok, maybe I should reformulate my question:

I have a hierarchy of parts.

part1
-> part2
--> part3
--> part4
--> part5

I have some custom behaviour for the part2. For now I have an SWT Widget, which behaves like that.

Is it possible to implement an own part container?
One which would layout parts,
which could be added to the model.
With other words - is it possible to turn an SWT Widget into a PartContainer?

[Updated on: Tue, 18 December 2012 06:57] by Moderator

Re: Parts nested within of a SWT Widget? [message #991294 is a reply to message #991293] Tue, 18 December 2012 07:00 Go to previous messageGo to next message
Eclipse UserFriend
There is a class (renderer class) which transforms a MPart into a SWT composite (ContributedPartRenderer). Override that? http://www.vogella.com/articles/Eclipse4Renderer/article.html It's not trivial but you have unlimited power.
Re: Parts nested within of a SWT Widget? [message #991362 is a reply to message #991294] Tue, 18 December 2012 12:36 Go to previous messageGo to next message
Eclipse UserFriend
And will it be possible to use my own containers inside the e4 Application Model editor? Where do the Modelconteiners inside the Editor come from?
Re: Parts nested within of a SWT Widget? [message #991386 is a reply to message #991362] Tue, 18 December 2012 15:39 Go to previous messageGo to next message
Eclipse UserFriend
Modelconteiners? You mean those elements in the tree on the left?

You of course can extend the model, provide your own MMyFancyPartStack or MCustomPart and provide a renderer for it to tell the framework how to translate the model into a widget. If you want editor support in the tooling for your new model element you can supply an extension to tell the e4 editor how to edit it.

For the first and second you can find tutorials online. For the editor support I implemented a sample one here https://github.com/semanticsoft/vaaclipse/pull/4
Re: Parts nested within of a SWT Widget? [message #991490 is a reply to message #991386] Wed, 19 December 2012 08:26 Go to previous message
Eclipse UserFriend
Thnk you very much!
Previous Topic:Tab placement always remove most used window
Next Topic:Menu Contribution multiple Parent-Ids possible?
Goto Forum:
  


Current Time: Tue Jul 22 18:02:05 EDT 2025

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

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

Back to the top