Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » how to share View in Multi Perspective
icon12.gif  how to share View in Multi Perspective [message #1007099] Mon, 04 February 2013 08:07 Go to next message
Eclipse UserFriend
I use Application.e4xmi to define UI.
I have a View defined two times by Part in two perspective.
When change Pespective,the View content changed.
What I want is ,when perspective changed,view content not changed.
Any suggestion?thanks
Re: how to share View in Multi Perspective [message #1007288 is a reply to message #1007099] Tue, 05 February 2013 06:40 Go to previous messageGo to next message
Eclipse UserFriend
I'm not sure I understood. You want an area (MArea?) not to move when you change perspectives? Much like the place where eclipse ide places the editors (java,xml etc)?
Re: how to share View in Multi Perspective [message #1065494 is a reply to message #1007099] Wed, 26 June 2013 02:15 Go to previous messageGo to next message
Eclipse UserFriend
I am too facing a similar problem as jim.
I am looking for a way to share a part(or view) across multiple perspectives in a e4 RCP application, till now I did not find any tutorial or example explaining about shared elements. Can anyone please explain briefly about how to share elements in e4.

@jim did u find a solution to your problem ?
Re: how to share View in Multi Perspective [message #1065969 is a reply to message #1065494] Fri, 28 June 2013 10:14 Go to previous messageGo to next message
Eclipse UserFriend
What about adding the parts to the MWindow.getSharedElements() collection? I haven't checked it, but it can solve the issue

Daniel
Re: how to share View in Multi Perspective [message #1066571 is a reply to message #1007099] Wed, 03 July 2013 04:35 Go to previous messageGo to next message
Eclipse UserFriend
Daniel is right.

As far as I understand, if the part is declared in each perspective, then it is created multiple times, but if you declare it in sharedElements, then you can use PlaceHolders in any perspective and set reference to this single part. In this case, there is always only one instance of the part (well, unless you close all placeholders, then this part is destroyed, but still can be created when you open it again).

Note: if you create a new perspective in different plugin and you put there a placeholder and you want to set reference to the part from sharedElements of the main app, you might not find there anything. I can't remember what was the problem, I believe there is some issue with the "find", that it only search within current plugin, while it should seatch also withing plugins, on which current project depends. Anyway, what I do, is to create a separate addon in which I manually set references to the placeholder.

You you still need some example, I may try to prepare one for you within next few days.
Re: how to share View in Multi Perspective [message #1376458 is a reply to message #1066571] Fri, 23 May 2014 08:25 Go to previous messageGo to next message
Eclipse UserFriend
Hello Mateusz,

If you have an example to have a single view instance in multiple perspective, can you post it?
I have tried to implement it without success...

Thanks for you help!
Best regards

Guillaume
Re: how to share View in Multi Perspective [message #1384004 is a reply to message #1376458] Tue, 27 May 2014 15:34 Go to previous messageGo to next message
Eclipse UserFriend
Hi Guillaume!

I created a small example with two perspectives and single part. You may notice that text which you type, will appear in both perspectives, as they have placeholders which hold reference to single part implementation.
I hope this helps you!

Cheers,
Mateusz
Re: how to share View in Multi Perspective [message #1384879 is a reply to message #1384004] Mon, 02 June 2014 14:00 Go to previous message
Eclipse UserFriend

There's some magic to re-establishing the reference from an MPlaceholder to its MPart; use the *same* id. If you create an MPlaceholder and leave its ref as 'null' but give it the id of the mpart then the renderer will establish the reference 'on demand'...
Previous Topic:How to dynamically fill a parameter to a popup menu
Next Topic:CSS & Layouts
Goto Forum:
  


Current Time: Wed Jul 23 13:27:48 EDT 2025

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

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

Back to the top