Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » ISaveablePart2 and Perspective
ISaveablePart2 and Perspective [message #467059] Fri, 27 April 2007 14:02 Go to next message
Eclipse UserFriend
hi guys,

I run into an issue with Eclipse 3.2.2 view implementing ISaveablePart2
when there are multiple perspectives. Here's the case: 1 have a view which
implements ISavablePart2, which means user will be prompted when the 'X'
is clicked and my application has 2 perspectives (called p1 & p2). When
the application starts up, it will be loaded into one of the perspective,
for now, let say it's p1 and view is created as well. and it gets switched
to p2. With p2 as the active perspective, the 'X' on the view is clicked.
What happen at this point is a dialog comes up asking user whether to
close the view and the perspective gets switched back to p1. After a
little investigation i found the following code in
EditorManager.saveAll(1147 to 1153):

if (part instanceof IViewPart) {
Perspective perspective =
page .getFirstPerspectiveWithView((IViewPart) part);
if (perspective != null) {
page.setPerspective(perspective.getDesc());
}
}

so, according to the snippet above, before the confirmation dialog is
pop, it will always switch back to the least recently used perspective. It
uses the WorkbechPage.persList.usedList, and this list keeps tracks of
recent used perspective, and the last one on the list is the the most
recent one and the first one is the least recently used. So my question
is, is this a bug? or, there's something i did incorrectly?

thanks in advance.
Re: ISaveablePart2 and Perspective [message #467229 is a reply to message #467059] Tue, 01 May 2007 15:45 Go to previous messageGo to next message
Eclipse UserFriend
did anyone come across this well? is this a bug?
Re: ISaveablePart2 and Perspective [message #467711 is a reply to message #467059] Thu, 10 May 2007 08:40 Go to previous message
Eclipse UserFriend
I'd open a bug at https://bugs.eclipse.org/bugs/ against Eclipse
Platform UI with your usecase.

PW
Previous Topic:XML TreeViewer - can't get the labels
Next Topic:Dynamic menu
Goto Forum:
  


Current Time: Sat May 24 07:14:59 EDT 2025

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

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

Back to the top