mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
catching PCE for pasthrough trees
This commit is contained in:
@@ -881,26 +881,31 @@ public class AbstractTreeUi {
|
||||
|
||||
//todo: to make real callback
|
||||
public ActionCallback queueUpdate(Object element) {
|
||||
AbstractTreeUpdater updater = getUpdater();
|
||||
if (updater == null) {
|
||||
try {
|
||||
AbstractTreeUpdater updater = getUpdater();
|
||||
if (updater == null) {
|
||||
return new ActionCallback.Rejected();
|
||||
}
|
||||
|
||||
final ActionCallback result = new ActionCallback();
|
||||
DefaultMutableTreeNode node = getNodeForElement(element, false);
|
||||
if (node != null) {
|
||||
addSubtreeToUpdate(node);
|
||||
}
|
||||
else {
|
||||
addSubtreeToUpdate(getRootNode());
|
||||
}
|
||||
|
||||
updater.runAfterUpdate(new Runnable() {
|
||||
public void run() {
|
||||
result.setDone();
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
return new ActionCallback.Rejected();
|
||||
}
|
||||
|
||||
final ActionCallback result = new ActionCallback();
|
||||
DefaultMutableTreeNode node = getNodeForElement(element, false);
|
||||
if (node != null) {
|
||||
addSubtreeToUpdate(node);
|
||||
}
|
||||
else {
|
||||
addSubtreeToUpdate(getRootNode());
|
||||
}
|
||||
|
||||
updater.runAfterUpdate(new Runnable() {
|
||||
public void run() {
|
||||
result.setDone();
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public void doUpdateFromRoot() {
|
||||
|
||||
Reference in New Issue
Block a user