Bug 1885 - [View Mgmt] IPerspective.showView should offer activation choice (1GA0WNI)
Summary: [View Mgmt] IPerspective.showView should offer activation choice (1GA0WNI)
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All Windows All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Kevin Haaland CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2001-10-10 22:21 EDT by Dejan Glozic CLA
Modified: 2002-09-03 16:51 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dejan Glozic CLA 2001-10-10 22:21:32 EDT
The IPerspective has a method showView(String viewId) that will:

- open view if not open
- bring it to front if stacked
- activate and transfer focus

This is proper behaviour is most cases, but it is wrong for property sheet. 
Views that depend on property sheet normally provide 'Properties' action on
the pop-up menu for the selected object. Performing the action should ensure
that property sheet is visible. However, if showView is used,
property sheet will be activated, and as a result it will loose the input object.
In this case, proper behaviour would be:

- open Properties if not open
- bring it to front if stacked
- hook to the currently active part and ask for property source
- DO NOT ACTIVATE

I suggest adding another 'showView' method with the following signature:

showView(String viewId, boolean activate)

You can copy the current implementation to this method and
change the implementation of 'showView(String viewId)' to be

public IViewPart showView(String viewId) {
   return showView(viewId, true);
}

This would ensure backward compatibility and also handle
property sheet case.




NOTES:
Comment 1 Kevin Haaland CLA 2001-11-22 06:29:43 EST
Deferring until development resources become available to consider this 
enhancement. 
Comment 2 Randy Giffen CLA 2002-08-06 15:47:30 EDT
Reopened for investigation.

The case seems suspicious. Activating the property sheet does not change its 
input, otherwise expanding/editing a property would never work.
Comment 3 Dejan Glozic CLA 2002-08-06 15:55:26 EDT
This is probably not the case any more but was at the time the defect was 
opened.
Comment 4 Kevin Haaland CLA 2002-09-03 16:51:07 EDT
Closing.