Bug 55458 - [EditorMgmt] Editor workbook needs to indicate when it is inactive
Summary: [EditorMgmt] Editor workbook needs to indicate when it is inactive
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
: 54875 55506 59166 (view as bug list)
Depends on:
Blocks: 57715 59948
  Show dependency tree
 
Reported: 2004-03-20 15:31 EST by Nick Edgar CLA
Modified: 2004-07-06 09:30 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2004-03-20 15:31:30 EST
build I20040318

When a view is active, the editor workbook still looks active.
Previously in 2.1 and M7, the selected editor's tab would lose the gradient
(though it would still be indicated as selected, using a white background).

This is an important cue.  You're in a fundamentally different mode when in a
view vs. an editor.  One obvious difference is how keybindings work.  I've had
several "loss of context" experiences lately where I've wanted to do Ctlr+O or
Ctrl+Shift+B, and they don't have any effect.  I then have to figure out that my
focus was in a view, not the editor.
Comment 1 Nick Edgar CLA 2004-03-20 15:32:18 EST
I think this should be an M8 candidate.
Comment 2 Kim Horne CLA 2004-03-20 22:14:58 EST
*** Bug 54875 has been marked as a duplicate of this bug. ***
Comment 3 Kim Horne CLA 2004-03-22 09:08:00 EST
*** Bug 55506 has been marked as a duplicate of this bug. ***
Comment 4 Chris McLaren CLA 2004-03-24 14:16:30 EST
i have changed this to ensure that for the 'third state', the editor looks
'inactive' instead of 'active'. this should be a big improvement until we can
reintroduce the 3rd state properly.
Comment 5 Michael Van Meekeren CLA 2004-04-20 13:40:58 EDT
*** Bug 59166 has been marked as a duplicate of this bug. ***
Comment 6 Kim Horne CLA 2004-04-29 09:14:44 EDT
Stefan, can you provide any insight as to where in the presentation logic this
would best reside?  Would it reside lower in EditorWorkbook?
Comment 7 Michael Van Meekeren CLA 2004-04-29 09:19:54 EDT
NOTE, views should also have a third state, it occured to me that when the 
whole shell (i.e. WorkbenchWindow) loses focus to another one, the tabs on the 
views should appear in the COLOR_TITLE_INACTIVE_* style to match the shells 
title bar.


so we have editors with a third state where they are the active editor but not 
the part that has focus at the moment, and then whether it is an editor or a 
view the active part should have the INACTIVE colors when the shell is not in 
focus.
Comment 8 Gunnar Wagenknecht CLA 2004-04-29 09:51:21 EDT
For me it looks like this is best implemented below the presentation to have a 
clean concept for all presentations. The StackPresentation#setActive(boolean) 
needs to be changed to StackPresentation#setActive(int) for passing different 
states into it.

The old 2.1 style implementation of EditorWorkbook has such a method with the 
following states:

ACTIVE_FOCUS
ACTIVE_NOFOCUS
INACTIVE

Internally it checks for:

WINDOW_SHELL_ACTIVE
WINDOW_SHELL_INACTIVE

if the passed in state is ACTIVE_FOCUS.

Comment 9 Gunnar Wagenknecht CLA 2004-04-29 10:54:48 EDT
I also noticed that EditorPane#shellActivated/shellDeactivated is commented 
out. Maybe this can be used to inform the StackPresentation about state 
changes when the shell changes state. (The calling shell listener is 
registered in WorkbenchWindow#trackShellActivation).
Comment 10 Nick Edgar CLA 2004-04-29 11:03:08 EDT
Yes, the workbench should respond when the shell is deactivated, and Gunnar's
comments are accurate.  This is a regression.  But this is also independent of
the editor workbook's "3rd state".
Comment 11 Kim Horne CLA 2004-05-03 16:00:42 EDT
Bouncing to Stefan for required presentation UI.  Please bounce back when you're
finished.
Comment 12 Stefan Xenos CLA 2004-05-04 02:57:27 EDT
Gunnar's suggestion in comment 8 sounds reasonable.

The new API has been added to head. A new StackPresentation.setActive(int) has
been added, and StackPresentation.setActive(boolean) has been deprecated.

There are now 3 states, but the 3rd state is currently only used by editors.

If views or editors want to change their appearance based on shell activation,
they can use a Shell listener (no additional states will be added for this). 

Note: when Kim first suggested this, I expressed some concerns about detached
views... however, I now believe that this will not be a problem. The shell
listener should work fine for all cases.

Also note: there are still unresolved activation bugs which may cause problems
with the 3rd state. If you ever observe an invalid state (nothing showing focus,
two things active, no active editor, etc.) please file a bug.

Bouncing back to Kim
Comment 13 Kim Horne CLA 2004-05-04 15:07:09 EDT
Fix in HEAD.
Comment 14 Kim Horne CLA 2004-05-18 13:17:03 EDT
Verified against 200405180816
Comment 15 Kim Horne CLA 2004-07-06 09:30:10 EDT
Closing to keep a tidy house.  Pardon the spam.