Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 1885

Summary: [View Mgmt] IPerspective.showView should offer activation choice (1GA0WNI)
Product: [Eclipse Project] Platform Reporter: Dejan Glozic <dejan>
Component: UIAssignee: Kevin Haaland <Kevin_Haaland>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 Keywords: investigate
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: Windows All   
Whiteboard:

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.