Skip to content

Limited options for Design Context Menu #120

@MarcelduPreez

Description

@MarcelduPreez

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:

  1. To hide the same actions as are found on the Windowbuilder toolbar, i.e. the Test and Refresh actions
  2. 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
image

When the toolbar preference is set to false
image

When the object specific preference is set to false
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions