This could be done this way: for k=1:length(edtList) To know which one points to what, you can query the getLongName property: > edtList(1).getLongNameīut if you will have to control individual files, I find it easier to build a structure with field names corresponding to the file names. You could close a single file already but you need to know which index is the file you want to target. (I have 3 opened file in my editor for this example).įrom now on, each of these object controls an individual file. This return a vector of .MatlabEditor object. ![]() If you want control of individual editor tab/window, you can retrieve the list of the editor objects, then apply methods on them individually: edtList = %// get a list of all the opened editor Now in this version, each file opened is actually an instance of an editor object. Prompt to save if necessary.Į %// Close all editor windows, WITHOUT SAVE!! You can use one of the 2 methods available: %// Close all editor windows. ![]() The main editor service can still be accessed with the same command as before: edtSvc = %// get the main editor service īut this only return the handle of the service, not individual editor.Īs answered by Daniel, you can close the full service from there, which will close all the editors at once. As you noticed, newer versions of Matlab do not return the same type of Java object for the editor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |