
Undocumented Secrets of MATLAB
®
-Java Programming508
% Alternative #2:
openFiles = jDesktop.getWindowRegistry.getClosers.toArray.cell;
editorFilenames = cellfun(@(c)c.getTitle.char,openFiles,'uniform',false);
% Alternative #3:
jEditorServices = com.mathworks.mlservices.MLEditorServices;
openFiles = jEditorServices.getEditorApplication.getOpenEditors.toArray;
editorFilenames = arrayfun(@(c)c.getLongName.char,openFiles,'uniform',false);
In MATLAB R2009b to R2010b, we can also use the built-in editorservices package,
62
which is basically just a MATLAB wrapper for MLEditorServices:
% In Matlab R2009b, editorservices is a predefined built-in package ...