Skip to main content

Please review - tree refresh deletion support

3 replies [Last post]
Joined: 2004-12-13

This should add support for deletion of nodes when doing a tree refresh. I believe this will also fix the array index out of bound exception.

First diff adds the support, second one fixes a NPE that always occurred right after the refresh.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-12-13

Basically the refresh system was updated to track changes for each node when it is updated. The main trick is to make sure Swing stays updated.

The most common problem is that automatic tree refreshes from swing will cause exceptions if the underlying model changes.

Joined: 2006-07-13

Here's a few minor things I saw in review:


In TreeNode updateDirectory(File f)

The javadoc:
* @return Returns index of tree node updated/created.

Looks like it is returning the TreeNode, not the index of.

Other than this, code changes in this file for the Tree-Refresh issue seemed to read like what they were intended to do.

I didn't have any comments on other files related to the Refresh NPE. Just from reading the code, everything looks reasonable.

Sorry for the rather superficial review, but at least it is another set of eyes on the problem.

Kevin L

Joined: 2004-12-13

Thanks. Javadoc updated. All integrated to trunk.

Also includes fix to make the build-examples target dependent on the jar target.