This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 209978 - no any messages in status bar after Save or Save All
Summary: no any messages in status bar after Save or Save All
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.2
Hardware: PC Solaris
: P1 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2012-03-23 07:57 UTC by soldatov
Modified: 2012-03-27 16:58 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2012-03-23 07:57:51 UTC
Scenario:
- Open file in editor
- Modify file
- Push Save or Save All
==> no any messages in status bar

for me (automatic GUI tests) it is very bad. I expect "File saved." message.
Comment 1 Vladimir Voskresensky 2012-03-23 10:17:45 UTC
it's a recent regression
Comment 2 soldatov 2012-03-23 12:20:10 UTC
no any messages in other cases also. Latest changes makes NetBeans untestable.

For example:
- load C/C++ project into debugger
- set line breakpoint
- push Continue
==> no any messages in status bar
Comment 3 Vladimir Voskresensky 2012-03-26 09:51:02 UTC
Jan, debugger messages are cleared due to recent changes in HintsUI's
http://hg.netbeans.org/cnd-main/rev/1bf5ad396d51
when breakpoint is hit => debugger prints message, but HintsUI immediately
erase it
Comment 4 Vladimir Voskresensky 2012-03-26 09:52:59 UTC
Save All is erased by the same reason
Comment 5 Vladimir Voskresensky 2012-03-26 09:56:15 UTC
another eraser is ExtDefaultKeyTypedAction
open C++ Quote sample
go to file quote.cc
press Ctrl+Shift+A => no message in status bar, because it is erased by BaseAction.updateComponent:
                // Clear status bar text
                if (!recording && (updateMask & CLEAR_STATUS_TEXT) != 0) {
                    Utilities.clearStatusText(target);
                }

(if press switch/source header button on editor's toolbar => message is visible)

I do not see changes in this code, but not clear why ExtDefaultKeyTypedAction is invoked at all. Our editors are Typing Hooks API based
Comment 6 Jan Lahoda 2012-03-26 11:24:09 UTC
I made the feature much more polite, in particular:
-it does nothing if neither the caret location nor the error message changed from the last computed state (helps in the Save case)
-it does not clear random messages from the status line - if it has nothing to display, it only clears its own messages (helps for the debugger case, at least in simple cases)
-it uses importance StatusDisplayer.IMPORTANCE_ERROR_HIGHLIGHT, which seems to be specifically designed for this kind of feature

Nonetheless: if the feature has something to display, it does so, and the message will overwrite anything written with lower importance. So if you see a problem with messages in status line overwritten by hints, please make sure you are invoking StatusDisplay.setStatusText(String, int) with a appropriate importance (i.e. higher than IMPORTANCE_ERROR_HIGHLIGHT). I am sorry, but I see no other way out except disabling the "show current error in status line" feature, which could be very unfortunate.

http://hg.netbeans.org/jet-main/rev/36e27ee4d32b
http://hg.netbeans.org/jet-main/rev/e542fdcf513b
Comment 7 Jan Lahoda 2012-03-26 11:25:25 UTC
I forgot: please let me know if the above changes helped.
Comment 8 Vladimir Voskresensky 2012-03-26 11:49:37 UTC
As about importance level: We use setStatusText with one parameter which passes 0 as importance level. Does it mean that it will be always overwritten?
anyway, thanks for quick fixes, we will check as soon as they are pushed into cnd-main (hopefully soon today)
Comment 9 Vladimir Voskresensky 2012-03-26 11:51:43 UTC
http://bertram.netbeans.org:8080/job/jet-main/lastCompletedBuild/testReport/ has two failing tests. Can someone fix them to allow jet-main -> silver succeed? 
Thanks!
Comment 10 Jan Lahoda 2012-03-26 12:01:19 UTC
(In reply to comment #8)
> As about importance level: We use setStatusText with one parameter which passes
> 0 as importance level. Does it mean that it will be always overwritten?

These will be overwritten by messages with higher (or equal) importance. Unfortunately, StatusDisplayer does not allow to go "under" the default importance level (0).
Comment 11 Vladimir Voskresensky 2012-03-27 09:52:50 UTC
It helped. Tests are passed. thanks
Comment 12 Vladimir Voskresensky 2012-03-27 09:52:58 UTC
v
Comment 13 Quality Engineering 2012-03-27 16:58:00 UTC
Integrated into 'main-golden', will be available in build *201203271056* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/36e27ee4d32b
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #209978: fixing some impolite behavior of the "show current error in status line" feature:
-using IMPORTANCE_ERROR_HIGHLIGHT as importance of the text
-only recomputing the warning if the caret location really changes from the last computed state
-only clearing messages printed by this feature, not messages written by the others (only for the global status line).