-
Notifications
You must be signed in to change notification settings - Fork 188
Make TreeItem.getExpanded consistent across platforms #2834 #2836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
f83432e to
84bda53
Compare
…m#2834 When the children of a previously expanded TreeItem are removed, the call to getExpanded() should continue to return "true". On both Linux and MacOS, this property is not persisted and therefore stored in a local variable. But on Linux, a call to getExpanded() still returns the result from a call to the GTK API. To harmonize the behavior between the different operating systems, following changes are done: 1) The call to getExpanded() now always returns the local variable, similar to how it's done for MacOS. 2) The call to setExpanded() doesn't modify the tree item if it is already expanded or a leaf node. Closes eclipse-platform#2834
|
I've tested this with eclipse-platform/eclipse.platform.ui#3527 and now the issue also disappears on Linux. From my side this is done and any feedback is greatly appreciated. |
|
Here is the feedback from Gemini CLI: The Pull Request #2836: Make TreeItem.getExpanded consistent across platforms aims to harmonize the behavior of TreeItem Here is an analysis of the changes: Summary Key Changes
Assessment
Overall, the change looks correct and safe, improving cross-platform consistency for TreeItem state management. |
|
@ptziegler : many thanks for fix & testing. Let merge this ASAP, to get as much coverage as possible. |
|
Verified on my RHEL 9.6 & platform UI patch, everything works as expected. |
When the children of a previously expanded TreeItem are removed, the call to getExpanded() should continue to return "true". On both Linux and MacOS, this property is not persisted and therefore stored in a local variable. But on Linux, a call to getExpanded() still returns the result from a call to the GTK API.
To harmonize the behavior between the different operating systems, following changes are done:
The call to getExpanded() now always returns the local variable, similar to how it's done for MacOS.
The call to setExpanded() doesn't modify the tree item if it is already expanded or a leaf node.