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 81083 - Property sheet loses the context node in some conditions
Summary: Property sheet loses the context node in some conditions
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks: 80994
  Show dependency tree
 
Reported: 2006-07-25 15:14 UTC by Nikita Krjukov
Modified: 2008-12-22 19:40 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (2.21 KB, patch)
2006-07-27 10:19 UTC, Stanislav Aubrecht
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Krjukov 2006-07-25 15:14:14 UTC
I have a problem in my BPEL project 
http://enterprise.netbeans.org/index.html
The NPE happend frequently. See the issue #80994

Steps to reproduce:
- create a node with 2 properties: 
   - simple text property editable in line.
   - property with a customizer which uses the property editor extending the 
org.openide.explorer.propertysheet.ExPropertyEditor. The property has to 
contain a customizer button "...". 
   - add check that the method PropertyEnv.getNodes() returns not empty array 
and array contains not nule objects. For example, you can put a java assert 
clause there.

- compile and show this node in the property sheet someway.

- put focus to the first (simple text) property so the inline editor is 
activated.

- press the customizer call button at the second property. 

The property sheet loses the context node and stop providing it with the 
PropertyEnv.getNodes() method and it happans here:

org.openide.explorer.propertysheet.SheetCellEditor
   public boolean stopCellEditing() {

           } finally {
               setInplaceEditor(null);
               reusableEnv.clear();    <<<<<<<<<  THIS LINE (line: # 404)
               inStopCellEditing = false;
           }
Comment 1 Stanislav Aubrecht 2006-07-26 09:42:21 UTC
this is hardly a P1 bug...
Comment 2 Michael Frisino 2006-07-26 19:34:46 UTC
Hi Stanislav

I think that there is a disconnect in communication here. 

Unless there is a disconnect, I object to the quick dismissal and downgrade
without further explanation or consideration. I hope there is a disconnect and
that this matter can be resolved easily.

I am resetting to P1 because according to our QE we have a strong P1 bug that
according to Nikita is directly caused by this bug. Please read bug 80994 and
tell us what priority you think that should have? Bear in mind, that bug results
in frequent user visible NPE's on simple property sheet access. If this bug here
is directly responsible for bug 80994 and there is no workaround to improve bug
80994, then this bug should have the same priority as 80994. Do you agree with that?

Ok, here is what I hope is happening. I hope that Nikita is wrong and that his
NPEs are actually not directly dependent on this bug. Or that he is not doing
the right thing to work around this bug. Perhaps this is why Stanislav is so
quick to downgrade and dismiss this bug. I hope, Stanislav, that you do not
believe that this bug described here could cause the behavior described in bug
80994? Is that what you think? 

Or perhaps you are aware of an easy way to avoid the behavior described in bug
80994 that would not require a fix for this bug? We would really appreciate your
thoughtful response here, since bug 80994 is quite visible to our users and QE.






Comment 3 Stanislav Aubrecht 2006-07-27 10:11:49 UTC
sorry, i didn't notice this issue depends on another p1 bug

(btw, i haven't seen such a polite 'fix it right now' comment in ages :))
Comment 4 Stanislav Aubrecht 2006-07-27 10:19:32 UTC
Created attachment 32257 [details]
proposed patch
Comment 5 Stanislav Aubrecht 2006-07-27 10:20:17 UTC
nikita, pls try the attached patch and let me know if it works for you.
also, do you want this fixed in release5.5?
Comment 6 Michael Frisino 2006-07-27 11:02:16 UTC
Stas, thanks for very quick turnaround. I am glad politeness is effective.
Nikita or Praveen Savur will test your patch. 

Yes, we would definitely like the fix to be in 5.5, assuming it is not a high
risk for regressions.

We will give you more info soon. Thanks again.
Comment 7 Praveen Savur 2006-07-27 19:03:51 UTC
 saubrecht,
   I verified that the patch fixes the issue and works for us.



Comment 8 Stanislav Aubrecht 2006-07-28 09:46:25 UTC
fixed in trunk

Checking in explorer/src/org/openide/explorer/propertysheet/PropertySheet.java;
/cvs/openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java,v
 <--  PropertySheet.java
new revision: 1.12; previous revision: 1.11
done
Checking in explorer/src/org/openide/explorer/propertysheet/SheetCellEditor.java;
/cvs/openide/explorer/src/org/openide/explorer/propertysheet/SheetCellEditor.java,v
 <--  SheetCellEditor.java
new revision: 1.5; previous revision: 1.4
done
Comment 9 Michael Frisino 2006-07-28 09:48:15 UTC
Thanks Stas.
Comment 10 Stanislav Aubrecht 2006-07-31 11:55:15 UTC
fixed in release55 branch

Checking in SheetCellEditor.java;
/cvs/openide/explorer/src/org/openide/explorer/propertysheet/SheetCellEditor.java,v
 <--  SheetCellEditor.java
new revision: 1.1.14.1.2.2; previous revision: 1.1.14.1.2.1
done
Checking in PropertySheet.java;
/cvs/openide/explorer/src/org/openide/explorer/propertysheet/PropertySheet.java,v
 <--  PropertySheet.java
new revision: 1.1.14.2.2.2; previous revision: 1.1.14.2.2.1
done