Bug 17800 - [Contributions] Switching perspectives causes needless flash in the tool bar
Summary: [Contributions] Switching perspectives causes needless flash in the tool bar
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 2.1 RC2   Edit
Assignee: Lynne Kues CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on: 32855
Blocks:
  Show dependency tree
 
Reported: 2002-05-24 15:16 EDT by Randy Giffen CLA
Modified: 2003-03-03 11:59 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Giffen CLA 2002-05-24 15:16:13 EDT
F1

1) Open a java editor
2) Switch to another perspective
3) Switch back

Note that the action sets associated with the java editor are removed then 
readded. When switching editors we calculate and action set delta and do the 
minimum required change, we should do the same when switching perspectives.
Comment 1 Randy Giffen CLA 2002-05-24 15:30:42 EDT
Similar happens when closing a java editor and another java editor becomes 
active. This is tricky to optimize in our current WorkbenchPage framework but 
it may be worth a second look.
Comment 2 Kevin Haaland CLA 2002-05-27 19:13:48 EDT
Toolbar also flashes horribly when clicking between views and editor. 
e.g. packages view and java editor. 
Comment 3 Randy Giffen CLA 2002-05-28 09:20:40 EDT
The flash when switching between a view and the editor is only happening with 
cool bars turned on. 
Comment 4 Lynne Kues CLA 2002-05-28 09:33:53 EDT
Flashing between views and editors is addressed in PR [Bug 16797] Extra toolbar 
flash when moving to/from an editor.
Comment 5 Simon Arsenault CLA 2002-09-05 09:44:57 EDT
When switching between 2 perspective, lots of changes happen in the window 
(views come and go, layout change, menu change, toolbar change, shortcut bar 
changes, etc). It would be nice to minimize the toolbar flash, but given all 
the other flashing going on, it's not too critical at the moment.
Comment 6 Nick Edgar CLA 2002-11-20 11:27:07 EST
Should also investigate other flashiness.
Comment 7 Simon Arsenault CLA 2002-12-11 13:03:23 EST
Not going to happen for M4
Comment 8 Simon Arsenault CLA 2003-01-07 11:11:32 EST
If I do the following:
  - open a new window with a resource perspective
  - save that perspective as Resource2
  - open the Resource perspective (in the same window so now both Resource and 
Resource2 perspective are in the shortcut bar)
  - open a java file in Resource perspective
  - switch between perspective.
Notice the toolbar stays constant, but the menu bar flashes. Need to 
investigate whether we can avoid the menu bar changes.

Aside from that, the other flash problems seem to be taken care of.
Comment 9 Simon Arsenault CLA 2003-02-04 15:29:13 EST
Not much more that we can do to avoid the menu flash. Hence, we have asked SWT 
to provide a setRedraw() method on Menu to avoid redrawing the menu on each 
add/remove item - this causes flash when multiple items being added/removed.
Comment 10 Nick Edgar CLA 2003-02-20 12:32:08 EST
To verify SWT changes to menubar redraw.
Comment 11 Simon Arsenault CLA 2003-02-20 15:09:08 EST
This looks good on Windows 2000 and GTK. There is no more menu flashing. On 
Motif, the menu redraw is not great but acceptable - SWT says this is a 
platform limitation.

However, the toolbar is flashing now. This may be because of the toolbar work 
that Lynne has been doing (contributing actions to another action set cool 
item). Moving to Lynne to investigate.
Comment 12 Lynne Kues CLA 2003-02-20 15:33:37 EST
Just tried an inner eclipse with the coolbar changes and I do not see any flash 
in the coolbar.  I tried the above scenario.  Is there some other scenario to 
try Simon?
Comment 13 Lynne Kues CLA 2003-02-24 18:19:37 EST
Nick/Simon what flash are you talking about?  The above scenario does not cause 
flash.  The only flash I see is when switching between a *.java editor and a 
*.class file editor (i.e., give focus to each one).  Is this what you are 
talking about?  If so, this is an SWT bug.
Comment 14 Lynne Kues CLA 2003-02-24 18:31:33 EST
Opened SWT bug report [Bug 32855] for flash that occurs when item removed/added 
to the end.

SWT bug report [Bug 17994] already exists for the gripper flash that occurs 
when items are removed/added.
Comment 15 Simon Arsenault CLA 2003-02-25 09:48:11 EST
Did you try the steps in comment 8? What you see when switching between the two 
perspective is tool items being removed and then readded. A few weeks ago, 
there you did not see any changes when switching between perspective.
Comment 16 Lynne Kues CLA 2003-02-25 11:19:15 EST
For comment 8, if I have an editor opened, I notice flash.  This is most likely 
being caused by [Bug 32855]. 

If I have no editors opened, I see a slight flash once in awhile.  
CoolBarManager>>update is being called in this scenario, but it is NOT doing 
anything to the coolbar (i.e., no items are added/removed).  So something else 
is causing the slight flash.  When looking into this, I noticed that the code 
path this scenario takes causes updateActionBars to be called 3 times.  If you 
have an editor opened it is called 5 times.
Comment 17 Lynne Kues CLA 2003-02-28 15:52:43 EST
The only thing left to do here is have SWT bug 32855 fixed.
Comment 18 Lynne Kues CLA 2003-03-03 11:59:31 EST
This is better based on the fix for the first problem in 32855.