From matlab it is possible to get a (java) reference to the matlab editor using these commands:
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
Thanks to Undocumented Matlab
Does anyone know how to get a reference to the Command Window?
It is impossible to obtain it the same way as the group titles do not include 'Command Window'
cl = desktop.getGroupTitles()
cl =
java.lang.String[]:
'Editor'
'Figures'
'Web Browser'
'Variables'
'Comparison Tool'
'Help'
'Time Series Plots'
'Scopes'