Skip to content

Commit a95f444

Browse files
committed
Note about option to dynamically hide the context menu in perspective
switcher While this is a very small development without this new entry it would be very hard for users to find out about this option.
1 parent 307db08 commit a95f444

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

news/4.37/platform_isv.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,25 @@ To use them in your own product, or install it in a custom Eclipse IDE setup, yo
1414

1515
See [Support Launching with a Terminal Console](platform.md#support-launching-with-a-terminal-console) for a use case.
1616

17+
### Perspective Switcher Menu Can Now Be Hidden Programmatically
18+
19+
It is now possible to dynamically hide the context menu in the perspective switcher using the application model API.
20+
This enables Eclipse RCP apps using 3.x API to enable and disable the menu at runtime.
21+
22+
Example usage:
23+
```java
24+
Display.getDefault().asyncExec(() -> {
25+
List<MToolControl> elements = modelService.findElements(window, "PerspectiveSwitcher", MToolControl.class, null,
26+
EModelService.IN_TRIM);
27+
if (elements != null && !elements.isEmpty()) {
28+
elements.get(0).getTags().add("NoMenu");
29+
}
30+
});
31+
```
32+
1733
<!--
1834
---
1935
## SWT Changes
2036
-->
37+
38+

0 commit comments

Comments
 (0)