Page 1 of 1

Wie füge ich mit MagicDraw OpenAPI eine neue Schaltfläche zur Hauptmenüleiste hinzu?

Posted: 15 Jan 2025, 15:30
by Guest
Ich arbeite mit der MagicDraw OpenAPI und möchte der Hauptmenüleiste von MagicDraw rechts neben der Schaltfläche „Hilfe“ eine neue Schaltfläche mit dem Namen „TEST“ hinzufügen (siehe Abbildung unten).
Image

Hier sind nützliche Ressourcen
  • online doc
  • javadoc
Hier ist mein aktuelles Codebeispiel:

Code: Select all

public class Main extends Plugin{
public void init()
{
initialized = true;
NMAction action = new MyAction("test", "TEST");
MainMenuConfiguration configurator = new MainMenuConfiguration((MyAction) action);
ActionsConfiguratorsManager.getInstance().addMainMenuConfigurator(configurator);
}
}
public class MainMenuConfiguration implements AMConfigurator {
public void configure(ActionsManager actionsManager) {
ActionsCategory newCategory = new ActionsCategory("idTest", "TEST");
ActionsManager newManager = new ActionsManager();
newManager.addCategory(newCategory);

}
}