MATLAB: Is there a way to re-title the Matlab Editor window

editor

Sometimes, I have multiple Matlab instances open and within each of those, an undocked Matlab Editor window. It would be helpful to me if I could change the title bar of each editor window to something other than "Editor" so that I could label them more distinctively, and know at a glance which Matlab instance I am working in. Does anyone know if there is a way to accomplish this?

Best Answer

Method 3:
Maybe change background color of each MATLAB instance so you can differ them.
Edit:
I have found a solution that barely works, but it's useless. The issue happens when there are changes made to file and then the filename is back to how it used to be, but with an asterisk added.
Regarding the listeners removal, it's only temporary and valid for the window that this code is evaluated in. If you undock or reopen the file, editor will have the default listeners.
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
winListeners = desktop.getSelected.getTopLevelAncestor.getWindowListeners;
desktop.getSelected.getTopLevelAncestor.removeWindowListener(winListeners(2)); % when the window is minimised, and brought back again, the name returns, therefore this listener is removed
desktop.getSelected.getTopLevelAncestor.setTitle('My undocked file');