DevEpos / eclipse-adt-plugins

Add-ons for ABAP Development Tools in Eclipse
MIT License
3 stars 2 forks source link

[CDS Analyzer] Undesired loading of lazy content during tree filtering with Text Field #8

Closed stockbal closed 1 year ago

stockbal commented 1 year ago

Due to the lazy loading character in "Top-Down" and "Where-Used" the control FilterableTree in the ui base needs to be adjusted as expandAll in the treeviewer will just expand all nodes without considering the fact that the content is not yet loaded.

https://github.com/DevEpos/eclipse-adt-plugins/blob/e74637e520c34883435ff79eccccd8c3414d3e2c/core/com.devepos.adt.base.ui/src/com/devepos/adt/base/ui/tree/FilterableTree.java#L54

https://github.com/DevEpos/eclipse-adt-plugins/blob/e74637e520c34883435ff79eccccd8c3414d3e2c/core/com.devepos.adt.base.ui/src/com/devepos/adt/base/ui/tree/FilterableTree.java#L62

https://github.com/DevEpos/eclipse-adt-plugins/blob/e74637e520c34883435ff79eccccd8c3414d3e2c/core/com.devepos.adt.base.ui/src/com/devepos/adt/base/ui/tree/FilterableTree.java#L88

A possible solution could be to use the method setExpandPreCheckFilters in the TreeViewer class and overwriting the method isObjectExpandable. To keep the class FilterableTree class clean it would be an idea to also overwrite the method expandAll

e.g.

@override
public void expandAll() {
  setExpandPreCheckFilters(true);
  super.expandAll();
  setExpandPreCheckFilters(false);
}