- [ x] I verified I can reproduce this issue against Eclipse 4.41.0
Steps to reproduce
- Create an RCP client that provides an UI element based on the org.eclipse.ui.window.preferences command to show all preferences
- Using the org.eclipse.ui.preferencePages extension point define a top-level property page (content irrelevant, can be empty)
- Using the org.eclipse.ui.preferencePages extension point define another top-level property page (content irrelevant, can be empty)
- Using the org.eclipse.ui.preferencePages extension point define a child property page (content irrelevant, can be empty) of the second top-level preference page
- Define a PropertyTester that tests for a particular named Application context variable (In the following "X")
- Define using the org.eclipse.core.expressions.definition extension point an expression using a "with" element based on that property tester variable "X" and the property tester created above.
- Use the org.eclipse.ui.activities extension point to define a specific activity with an enabledWhen element based on above created expression reference.
- Provide a UI element (e.g. main menu entry) of check style with a handler whose effect is to toggle between two different values of the specifically named application context variable "X".
- Use the org.eclipse.ui.activities extension point to define an activityPatternBinding to the id of the first top-level property page
- Use the org.eclipse.ui.activities extension point to define an activityPatternBinding to the id of the child-level property page (The third one above)
- Start the RCP client and show the workspace preferences (via the org.eclipse.ui.window.preferences command)
- The use the second UI element to toggle the value of the application context variable "X"
- Show again the workspace preferences (via the org.eclipse.ui.window.preferences command)
I expected: At the first invocation both the first top-level and the child-level property pages are not visible (filtered by activity constraints) and after toggling the value of the application context variable "X" I expected both the first top-level and the child-level property pages are visible (No longer filtered by activity constraints)
But got: The second invocation only makes the child-level property page, but not the top-level property page
Tested under this environment:
- OS & version: Window 11
- Eclipse IDE/Platform version (as shown in Help > About): 2026-09 (4.41.0)
Community
- [ x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.)
Analysis of the problem
The surprising behaviour seems to be caused by the fact that the workspace preferences evaluates its top-level property pages only once: here, while all other pages are freshly created on demand.
We stumbled across this problem recently when we introduced a separate "application mode" in our programs and attempted to do what the description above does. I'm happy to help working on a solution, but would like to get feedback where to move the fresh top-level addition.
Steps to reproduce
I expected: At the first invocation both the first top-level and the child-level property pages are not visible (filtered by activity constraints) and after toggling the value of the application context variable "X" I expected both the first top-level and the child-level property pages are visible (No longer filtered by activity constraints)
But got: The second invocation only makes the child-level property page, but not the top-level property page
Tested under this environment:
Community
Analysis of the problem
The surprising behaviour seems to be caused by the fact that the workspace preferences evaluates its top-level property pages only once: here, while all other pages are freshly created on demand.
We stumbled across this problem recently when we introduced a separate "application mode" in our programs and attempted to do what the description above does. I'm happy to help working on a solution, but would like to get feedback where to move the fresh top-level addition.