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 39796 - [36cat] Tools | Options -- change in property value ignored after Close
Summary: [36cat] Tools | Options -- change in property value ignored after Close
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords:
: 37584 39846 40319 40702 41076 41134 42355 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-09 13:07 UTC by Jan Chalupa
Modified: 2008-12-23 14:28 UTC (History)
6 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 Jan Chalupa 2004-02-09 13:07:33 UTC
Originally reported by a NB 3.6 beta user.
Reproduce successfully on Win NT 4.0 + J2SE 1.4.2_01.

Steps to reproduce:

1. Open Tools | Options
2. Change some property value (e.g. Editing |
Editor Settings | Java Editor | Font Size), don't
leave the property editor
3. Push Close
4. The change in property value is ignored, user
must leave the property editor (e.g using the Tab
key) to make the change persistent
Comment 1 mcbofh 2004-02-09 13:11:47 UTC
Also noted on 
SunOS espresso 5.10 s10_49 i86pc i386 i86pc
java full version "1.4.2_03-b02"

Comment 2 _ tboudreau 2004-02-09 14:09:30 UTC
As discussed, this is more of a complex issue than it seems, and is different from the 
design and behavior of the new property sheet for about a year.  It is worth thinking about 
whether it should be changed (there is a line switch, I netbeans.ps.commitOnFocusLoss 
which turns this on), but we would have to reconsider some other aspects of the design 
(behavior when a bad value is entered, what to do with illegal input, what to do if a foreign 
dialog pops up while the user has a partially entered value, etc.)
Comment 3 llturro 2004-02-09 14:44:10 UTC
Changing a value and then selecting a different element will also
leave the old value. This seems more odd if you take into account that
moving to a different attribute YES means you accepted the value.
Where is then the difference between moving to a different element
than to a diffrent property?
Comment 4 Lukas Hasik 2004-02-09 16:21:21 UTC
from my point of view it seems to be reasonable to _confirm_ entered
value by ENTER or by TAB. You have to confirm the value in other apps too.
I strongly agree with Tim's comment, what will we do with
"unconfirmed" inputs, how can we be sure that it's valid input when we
don't know when property editing phase is finished ...
Comment 5 _ tboudreau 2004-02-09 19:10:33 UTC
Lluis, could you clarify your comment?  The *only* way to update the value from the 
property sheet (without using an inline editor) is by an expicit gesture (pressing enter to 
confirm the new value). 
Comment 6 _ tboudreau 2004-02-11 14:21:44 UTC
*** Issue 39846 has been marked as a duplicate of this issue. ***
Comment 7 _ pcw 2004-02-13 22:24:47 UTC
I'd like to add a comment.  This bug (IMHO) makes it more difficult
to, for example, edit GridBagLayout's in the form editor.  In 3.5.1, I
could quickly jump around controls and make changes in sheet to their
settings, by entering numbers in one hand and switching properties via
the mouse with the other.  Now, with this behavior, I have to hit
enter after each entry.  This easily triples or quadruples the amount
of time it takes me to make quick changes in this way.  Focus change
to another field should have been enough to commit the value (assuming
it is valid).
Comment 8 _ tboudreau 2004-02-13 23:32:33 UTC
Adding Dusan to cc.  It looks like there's considerable demand for commit-on-focus-lost 
behavior.  Right now it's enablable via a startup line switch, but is much less tested and 
may have problems.

Dusan, let's talk next week - we *could* make this change for 3.6, though it's *very* late 
in the game to do it.  Honza, we would need to do pretty thorough excercising of the 
property sheet by QA to make sure everything was copacetic - it's changing some behavior 
that's very central to the way the property sheet works.

In the mean time - for those who want to try it without having to press enter, you can 
enable it by appending the following to your ide.cfg file (in $NB_HOME/bin):
-J-Dnetbeans.ps.commitOnFocusLoss=true  

Those who are lobbying for this to become the default:  Please try this switch and report 
any problems with it as comments on this issue.
Comment 9 Jan Chalupa 2004-02-16 16:55:07 UTC
Tim, please go ahead and switch the default. We'll test and see what
the feedback will be. I prefer to make the change now, because we
still have time to revert the default in case of any problems. That
would be much harder to do later.
Comment 10 Milan Kubec 2004-02-16 19:59:51 UTC
My 2 cents - IMHO changing focus shouldn't be the way how user would
normally confirm changing value of some property. It should require
explicit gesture from user (enter, tab), not just changing focus.
Especially in java which is running in huge number of window managers,
which work with focus differently, e.g. consider focus follow mouse
setting (I don't want to even think about it :). I'd vote for having
this feature switchable by property and only interested people could
use it, but not being as default.
Comment 11 Jan Chalupa 2004-02-17 14:59:08 UTC
Hmm, I'm afraid Milan's point is valid. I didn't think about various
window managers and the 'focus follows mouse' behavior. We'll need to
spend more time on this after 3.6.

Tim, please revert the yesterday's change. The
netbeans.ps.commitOnFocusLoss property should be set to 'false' by
default. Thanks.
Comment 12 _ tboudreau 2004-02-17 15:29:25 UTC
FWIW, focus-follows-mouse shouldn't be a big problem with such a change - the value 
would be taken if the mouse moves outside the property sheet, but as long as it is inside 
it, the editor should stay focused.

This is the sort of thing that led us to require an explicit gesture, but it may be worth 
leaving on - 99% of users do not use focus-follows-mouse, and the 1% that do are 
probably savvy enough to use a line switch.  That could be put in the release notes.  I think 
maybe we should let it stay as is and collect more data.  Honza, can you live with that?
Comment 13 Lukas Hasik 2004-02-17 16:18:41 UTC
hmmm, so what ? What'll be default value ? true/false ? I'd like to
know before tommorow q-build.

And one scenario (i tested with command line switch):
user expects commit on focus lost, and it works nice, but what about
SDI ? Try change value of some property in its own Properties window
and switch to different window (Editor).
I'd expect that the new value is propagated but it isn't. When you
switch back to Properties you will see that the focus is still in
property value  textfield. A little bit confusing...

I think that status when user has to confirm value is normal and is
common in others programs too.
Comment 14 Jan Chalupa 2004-02-17 17:02:11 UTC
Tim, I don't have any data on the percentage of users preferring one
or the other. I heard from both camps lately and both have some valid
arguments. The rule of thumb should be if we don't know what is the
right solution, let's stick with the one we've been using so far (ok,
until yesterday), because it's far more tested and most people are
already used to it.

Tim, please revert the change asap. Thanks.
Comment 15 _ tboudreau 2004-02-20 16:13:08 UTC
*** Issue 40319 has been marked as a duplicate of this issue. ***
Comment 16 _ tboudreau 2004-03-10 17:25:25 UTC
*** Issue 40702 has been marked as a duplicate of this issue. ***
Comment 17 Tomas Pavek 2004-03-18 09:06:34 UTC
*** Issue 41076 has been marked as a duplicate of this issue. ***
Comment 18 Lukas Hasik 2004-03-22 14:05:03 UTC
*** Issue 41134 has been marked as a duplicate of this issue. ***
Comment 19 _ tboudreau 2004-04-23 09:06:04 UTC
*** Issue 42355 has been marked as a duplicate of this issue. ***
Comment 20 Jan Benway 2004-08-24 20:01:37 UTC
This change really needs to be made. Not that we had property changes
being committed on focus loss until 3.5.1, and did not get complaints
at that time (so far as I know). Note that there are 6 bugs marked as
duplicates of this one.
Comment 21 Jan Chalupa 2004-08-24 21:37:33 UTC
I agree. Any recommendations what should happen when the focus moves
while the entered value is invalid? I don't think it has been fully
resolved yet.
Comment 22 Jan Benway 2004-08-24 21:44:05 UTC
I think it should do the same thing  it does when you tab out and it
is invalid -- generally pops up an alert. I can see that this may be
sometimes unexpected, but not sure what the other options are. 
Comment 23 _ tboudreau 2004-08-24 23:39:53 UTC
Honza, would QA be able to test it with the commit on focus loss
lineswitch turned on?
Comment 24 Jan Chalupa 2004-08-25 07:36:24 UTC
Yes. Is the -J-Dnetbeans.ps.commitOnFocusLoss=true option still
supposed to work?
Comment 25 _ tboudreau 2004-08-25 10:35:49 UTC
Yup.
Comment 26 Jaromir Uhrik 2004-08-25 16:52:41 UTC
I tested today with the switch -J-Dnetbeans.ps.commitOnFocusLoss=true.
I have no new findings. The SDI mode still doesn't accept the switch.
The MDI mode is usefull, but I am not used to this approach of
properties changing. I will work with this switch for next few days to
find some potential problems.
Comment 27 _ tboudreau 2004-08-25 23:25:53 UTC
Probably the biggest hurdle is going to be legacy property editors (the IMT had some, and 
I'm dealing with a P1 caused by the workarounds for it now), which assumed that if the 
value of a property was null, but getTags() returned non null, that what should be shown is 
getTags[0].  This practically guarantees that simply setting focus to such an editor will set 
the value to getTags()[0], which may be undesirable.  Simple example would be ColorEditor 
with null for a color - when you focus the editor, it becomes "white".  Pressing escape will 
set it to null, but anything else will change the value.  That may be livable.

My main regret is rewriting the propertysheet to be compatible with the old one - three 
generations of APIs, 5-6 non normative hints to change behavior * 4 possible interfaces 
implemented on top of those (of which a property editor can implement one or more), one 
of which allows about 4 additional hints to property 
editor behavior...do the math and consider the combinatorics...the possibilities of 
implementing this all in a perfectly compatible way...well, when you've got 20 years to 
spare it's not a problem.  We're not going to be corner-case-free - we're not now.

Probably best to fix this, understand that there will be corner cases and put out the fires 
as we find them.  There will be some either way, most will not be severe, and no worse 
than the current situation.
Comment 28 Jan Chalupa 2004-08-27 15:58:25 UTC
I won't pretend I understand everything you wrote in your last
comment, Tim.

A simple question: Do you see any reasons why the commit-on-focus-lost
change shouldn't be integrated right now? Do you know of any issues
users are likely to be unhappy about? What are they? IMT? Any
particular area you would still want testers to look at?
Comment 29 _ tboudreau 2004-08-27 17:25:47 UTC
I can probably flip the bit next week.  I'll need to go through all
the property editor unit tests and flip the bit back for them, since
they will fail with the new behavior.  Sorry for rambling in my last
post on this.

The main problem case is where, you start with a value that is null. 
You click the editor.  It is a combo (a Color that starts out null
will do this).  The only way to get the null back is to press Esc - if
you just shift focus away, the value that is getTags()[0] will become
the value of the property.  I think that's the only serious issue, and
there are not many editors with such pathological behavior;  the IMT
is gone also.
Comment 30 Michael Frisino 2004-09-07 18:55:39 UTC
Is it normal issuezilla procedure to revise "summary" descriptions?
Given that this is a general IDE wide Human Interface issue, it seems
a bit subtle to have this discussion subsumed under a summary "Tools |
Options ...". Perhaps if it were retitled "Property Editor commit
policy discrepancy" or something sufficiently descriptive of the
widespread impact of this feature, there would not be so many duplicat
bugs being entered.
Comment 31 Michael Frisino 2004-09-07 19:31:33 UTC
Its funny how differently QA prioritizations are. In Studio land this
is listed as a P2 Bug based on seeming regressive behavior compared to
prior versions, here it is listed as a P3 RFE.
Comment 32 _ tboudreau 2004-09-08 10:21:51 UTC
> Its funny how differently QA prioritizations are. In Studio land this
> is listed as a P2 Bug based on seeming regressive behavior compared to
> prior versions

Mike, it was a design decision in writing the new property sheet that an affirmative gesture 
should be required before any property value is written.  This issue is considering 
revisiting that decision.  That is why it is categorized and prioritized as it is.

I strongly suspect an equal number of users will complain if we change it to behave the 
other way - there is no right answer for everyone here.
Comment 33 jrojcek 2004-09-10 23:13:00 UTC
This is clearly a defect and should be fixed for promoD. If the current state was a design 
decision then it was not correct. The reasons are following:

* the user wants to commit the change if she/he changed the value in Tools|Options and 
then clicked the close button
* the user wants to commit the change if she/he changed the value in the property sheet 
when designing a GUI form and then clicked into the form designer
* all other IDEs (I checked our major competitors) change the value in such case
* no IDE reverts the value in such case
* there is no difference from user point of view between using the Tab key and clicking out 
of the property sheet field using the mouse - both mean the same thing: "I am done with 
editing and want to keep the value!". The same is true when the user uses a mnemonic to 
move the focus to a different widget out of the property sheet.
* it should work exactly the same way as the in-place rename in the explorer tree
Comment 34 Marian Mirilovic 2004-09-12 09:42:20 UTC
Thanks Jano,
so new question rises:

Do you want fix this for Beta 2 ?

Comment 35 _ tboudreau 2004-09-12 15:28:25 UTC
I will need to update a large number of unit tests to make them not fail with this setting - 
(though I suppose I could just flip the bit on the beta branch).  When would this be needed 
by?
Comment 36 jrojcek 2004-09-12 19:59:37 UTC
It should be fixed ideally for Beta2.
Comment 37 Marian Mirilovic 2004-09-13 06:54:43 UTC
Ok, so Tim code freeze for Beta 2 is this Wednesday!
Comment 38 _ tboudreau 2004-09-13 17:22:55 UTC
Flipped the bit in trunk and beta 2 branch
Comment 39 Michael Frisino 2004-09-13 18:19:32 UTC
Tim,

What is the bit that you are flipping, so that we can backport this to
our 3.6 snapshot? Thanks
Comment 40 _ tboudreau 2004-09-13 22:50:42 UTC
org.openide.explorer.propertysheet.PropUtils - look for commitOnFocusLoss, and invert 
the Boolean.getBoolean() logic.
Comment 41 Jan Chalupa 2004-11-21 23:15:09 UTC
*** Issue 37584 has been marked as a duplicate of this issue. ***
Comment 42 Jaromir Uhrik 2005-01-31 10:03:19 UTC
Marking as VERIFIED.
Comment 43 Quality Engineering 2008-12-23 14:28:33 UTC
This issue had *2 votes* before move to platform component