Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
jim liu is currently offline jim liu
Messages: 37
Registered: February 2011
Location: shanghai
Member
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


java eclipse Search
http://javafind.appspot.com/
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
Sopot Cela is currently offline Sopot Cela
Messages: 589
Registered: December 2010
Senior Member

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
syed mehtab is currently offline syed mehtab
Messages: 1
Registered: July 2012
Junior Member
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
Daniel Rolka is currently offline Daniel Rolka
Messages: 4
Registered: March 2013
Junior Member
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 message
Mateusz Malinowski is currently offline Mateusz Malinowski
Messages: 19
Registered: March 2013
Junior Member
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.
Previous Topic:MainMenu isn't persisted
Next Topic:FileDialog broken in Kepler ?
Goto Forum:
  


Current Time: Fri Apr 18 19:35:23 EDT 2014

Powered by FUDForum. Page generated in 0.01508 seconds