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 248637 - Detail panel gets updated with latest changed value even though selection is still on a another property
Summary: Detail panel gets updated with latest changed value even though selection is ...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Property Editors (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-14 08:04 UTC by jmborer
Modified: 2014-11-21 15:11 UTC (History)
0 users

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 jmborer 2014-11-14 08:04:02 UTC
Today I notice a behaviour of the properties view I wasn't expecting.

When I click on a BeanTreeView's node, the properties view gets updated with a tab title using the same value as the displayed node name and all properties get set. I then click on a property. In the description area, the value name and descriptions of the prop I just clicked appear. 

Now, a background thread updates the display name of the node and even if my mouse selection is still focused on a property of the properties view, the description area gets updated with the display name on the node just updated.

I looked at PropertySheet code and found the following:

                Runnable runnable = new Runnable() {
                    public void run() {
                        //the following must run in EDT to avoid deadlocks, see #91371
                        if (isDescriptionVisible() &&
                            (Node.PROP_DISPLAY_NAME.equals(nm) || Node.PROP_SHORT_DESCRIPTION.equals(nm))) {
                            
                            //XXX SHOULD NOT BE FIRED TO NODELISTENERS
                            Node n = (Node) evt.getSource();
                            if (currNode == n) {
                                String description = (String) n.getValue("nodeDescription"); //NOI18N
                                psheet.setDescription(n.getDisplayName(), (description == null) ? n.getShortDescription() : description);
                                table.setBeanName(n.getDisplayName());
                            }
                        }
                    }
                };

This is called when the display name changes even though the selection/focus is still on another property. So displayed description is no longer in sync with current work focus.

Is this expected? 

From the user point of view I would say no, because I don't want to loose my description information while I am focusing on a given property. So its seems more as a bug as an expected feature.
Comment 1 Stanislav Aubrecht 2014-11-21 15:11:45 UTC
Can you please provide some simple module to reproduce the issue?