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: 139
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.
@Inject
EPartService partService;
@Inject
MApplication application;

...
Mpart part = .... ;

...

List<MPartStack> stacks = modelService.findElements(application, null, MPartStack.class, null);
stacks.get(0).getChildren().add(part);
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.

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


Current Time: Fri Dec 19 15:16:40 GMT 2014

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

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