Bug 226248 - NullPointerException at javax.swing.plaf.basic.BasicTreeUI.completeEditing
NullPointerException at javax.swing.plaf.basic.BasicTreeUI.completeEditing
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Directory Chooser
7.3
All All
: P3 with 1 vote (vote)
: TBD
Assigned To: Ondrej Vrabec
issues@platform
EXCEPTIONS_REPORT
:
: 231345 233364 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-18 06:02 UTC by bht
Modified: 2013-08-03 02:07 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (3.38 KB, text/plain)
2013-02-18 06:02 UTC, bht
Details
stacktrace (7.11 KB, text/plain)
2013-07-25 05:21 UTC, drazisil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2013-02-18 06:02:31 UTC
This bug was originally marked as duplicate of bug 205559, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201301300001)
VM: Java HotSpot(TM) Client VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_13-b20
OS: Windows XP

User Comments:
dheffelfinger: deleting a file from the "projects" view.

bht: Deleted a java class, still another one left in the same package




Stacktrace: 
java.lang.NullPointerException
   at javax.swing.plaf.basic.BasicTreeUI.completeEditing(BasicTreeUI.java:2073)
   at javax.swing.plaf.basic.BasicTreeUI$Handler.editingStopped(BasicTreeUI.java:3690)
   at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:141)
   at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:368)
   at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:233)
   at javax.swing.tree.DefaultTreeCellEditor.stopCellEditing(DefaultTreeCellEditor.java:305)
Comment 1 bht 2013-02-18 06:02:32 UTC
Created attachment 131511 [details]
stacktrace
Comment 2 Ondrej Vrabec 2013-06-28 10:57:47 UTC
*** Bug 231345 has been marked as a duplicate of this bug. ***
Comment 3 drazisil 2013-07-25 05:21:48 UTC
Created attachment 137753 [details]
stacktrace

Trying to select folder for new project
Comment 4 Ondrej Vrabec 2013-07-25 07:33:51 UTC
*** Bug 233364 has been marked as a duplicate of this bug. ***
Comment 5 Stanislav Aubrecht 2013-08-01 09:20:51 UTC
This looks more like a bug in NetBeans dir chooser - it tries to edit a tree node but the tree layout caches isn't refreshed yet.

The patch below may help:

# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: D:\hg\core-main
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: o.n.swing.dirchooser/src/org/netbeans/swing/dirchooser/DirectoryChooserUI.java
--- o.n.swing.dirchooser/src/org/netbeans/swing/dirchooser/DirectoryChooserUI.java Base (BASE)
+++ o.n.swing.dirchooser/src/org/netbeans/swing/dirchooser/DirectoryChooserUI.java Locally Modified (Based On LOCAL)
@@ -1699,7 +1699,12 @@
                         try {
                             newFolderNode = new DirectoryNode(fileChooser.getFileSystemView().createNewFolder(selectedNode.getFile()));
                             model.insertNodeInto(newFolderNode, selectedNode, selectedNode.getChildCount());
+                            SwingUtilities.invokeLater( new Runnable() {
+                                @Override
+                                public void run() {
                             applyEdit(newFolderNode);
+                                }
+                            });
                         } catch (IOException ex) {
                             Exceptions.printStackTrace(ex);
                         }
Comment 6 Ondrej Vrabec 2013-08-02 10:04:43 UTC
fix: http://hg.netbeans.org/core-main/rev/d25d137ca8eb
Comment 7 Quality Engineering 2013-08-03 02:07:38 UTC
Integrated into 'main-silver', will be available in build *201308022300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d25d137ca8eb
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #226248 - NullPointerException at javax.swing.plaf.basic.BasicTreeUI.completeEditing


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo