Has someone any idea how to add a menu to the Matlab Editor? Or how to add a button to the Toolbar of the Matlab Editor? Many thanks.
jDesktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = jDesktop.getFrameContainingGroup('Editor');
menu = javax.swing.JMenu('SCM');
item = javax.swing.JMenuItem('Check-in/Add');
hitem = handle(item,'CallbackProperties');
The problem I have now is that the menu is not persistent i.e. disappears when another file is selected. Now I don't know which Editor Callback I shall best overwrite to get the menu created. I've tried 'FocusGainedCallback' but I have to leave the Editor Window to get the menu created. I would like the menu being created if I switch between files in the Editor.
Maybe creating a listener but this is quite a lot for my java undocumented skills. Hope someone may have a solution ready?