mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
TreeUi: unhandled index not ready warning on update node descriptor
This commit is contained in:
@@ -780,8 +780,14 @@ public class AbstractTreeUi {
|
||||
}
|
||||
|
||||
private boolean _update(NodeDescriptor nodeDescriptor) {
|
||||
nodeDescriptor.setUpdateCount(nodeDescriptor.getUpdateCount() + 1);
|
||||
return getBuilder().updateNodeDescriptor(nodeDescriptor);
|
||||
try {
|
||||
nodeDescriptor.setUpdateCount(nodeDescriptor.getUpdateCount() + 1);
|
||||
return getBuilder().updateNodeDescriptor(nodeDescriptor);
|
||||
}
|
||||
catch (IndexNotReadyException e) {
|
||||
warnOnIndexNotReady();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void assertIsDispatchThread() {
|
||||
@@ -1283,10 +1289,7 @@ public class AbstractTreeUi {
|
||||
passOne = getTreeStructure().getChildElements(element);
|
||||
}
|
||||
catch (IndexNotReadyException e) {
|
||||
if (!myWasEverIndexNotReady) {
|
||||
myWasEverIndexNotReady = true;
|
||||
LOG.warn("Tree is not dumb-mode-aware; treeBuilder=" + getBuilder() + " treeStructure=" + getTreeStructure());
|
||||
}
|
||||
warnOnIndexNotReady();
|
||||
return ArrayUtil.EMPTY_OBJECT_ARRAY;
|
||||
}
|
||||
|
||||
@@ -1315,6 +1318,13 @@ public class AbstractTreeUi {
|
||||
return passOne;
|
||||
}
|
||||
|
||||
private void warnOnIndexNotReady() {
|
||||
if (!myWasEverIndexNotReady) {
|
||||
myWasEverIndexNotReady = true;
|
||||
LOG.warn("Tree is not dumb-mode-aware; treeBuilder=" + getBuilder() + " treeStructure=" + getTreeStructure());
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNodesToInsert(final ArrayList<TreeNode> nodesToInsert,
|
||||
TreeUpdatePass pass,
|
||||
boolean canSmartExpand,
|
||||
|
||||
Reference in New Issue
Block a user