Skip to content

Remove the need to ever provide a MenuManager #20

@CosimoTiger

Description

@CosimoTiger

Reasoning

Having to always provide a MenuManager argument during opening of Menus feels repetitive, redundant even. Typically there will be a single MenuManager implementation per plugin project, usually the default one.

Implementation details

Use the singleton pattern with public static getters and setters.

  1. We can retain the open methods that accept a custom MenuManager, which will keep the same old functionalities while adding a new one that makes programming easier for developers.
  2. Define one statically available singleton implementation that needs to be set, and can then be called by each menu in the open methods that don't receive a custom MenuManager.

Metadata

Metadata

Assignees

Labels

user storyMutually similar features from an end user's perspective

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions