-
Notifications
You must be signed in to change notification settings - Fork 32
Description
We need the ability to hide the options from the context menu that are not used and could cause problems with our existing implementations. I.e. we need to be able to only show the basic actions in the context menu such as the Cut, Copy, Paste and Delete actions.
Solution description: I have added preferences to the DesignContextMenuProvider class in the buildContextMenu method. These preferences are not available to the user but can be set by using the InstanceScope. The default for these preferences are set to true and therefore will always show all the actions as previously defined unless the developer incorporating windowbuilder into their product sets the preferences to false.
The two preferences are:
- To hide the same actions as are found on the Windowbuilder toolbar, i.e. the Test and Refresh actions
- To hide object specific actions that vary depending on which object the context menu is invoked
Following are screenshots of the context menu:
When preferences are set to true

When the toolbar preference is set to false

When the object specific preference is set to false

When both are set to false and only the basic actions remain
