Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Add MPart in all MPerspective in eclipse Juno(Add MPart in all MPerspective in eclipse Juno)
Add MPart in all MPerspective in eclipse Juno [message #1011716] Wed, 20 February 2013 05:42
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

I'm creating one RCP in Eclipse 4.2. In my RCP I have 3 perspective.
I'm creating one part at run-time and adding it in perspective like following.
EPartService partService;
MApplication application;

Mpart part = .... ;


List<MPartStack> stacks = modelService.findElements(application, null, MPartStack.class, null);
partService.showPart(part, PartState.ACTIVATE);

But the problem is its added view in current opened perspective so if you switch perspective to other this view will not be shown there which is correct because i'm just add it to 1st stack.
But My requirement is it should be added in every perspective so if i switch to other perspective it should be there.

I'm getting List of MPerspective like following:
MWindow l = application.getChildren().get(0);
MPerspectiveStack stack = (MPerspectiveStack) l.getChildren().get(0);
List<MPerspective> perspectiveList = stack.getChildren();

But don't know how to add it.

So how to add Part in each perspective.?
And is there is better way to find Perspective list apart from what i'm doing.

Previous Topic:Common Navigator Framework - lazy loading?
Next Topic:How Can i Reach Dynamicly Created Text ?
Goto Forum:

Current Time: Tue Dec 07 12:17:27 GMT 2021

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

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

Back to the top