|
Does anybody know a possibility to access and change the context menu of the Matlab Editor's document bar?
I'd like to add a button like the 'alphabetize' button for a customized sorting routine.
The menu can be found by rightclick on the document bar itself or by the editor's menu bar (Desktop->Document Bar).
I tried to access the javahandle of the menu and change its properties with findjobj and some hints from undocumented matlab, but couldn't find the right properties.
This is the code I used so far:
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
% findjobj(jEditor)
jh_db = findjobj(jEditor,'class','com.mathworks.widgets.desk.DTDesktopMenu$DocumentBarMenu')
I'm really new to java programming and have no clue how to go on.
-Matthias
|