Shortcut for open searching panel of editor name?
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
Hi, I want to ask, if there is shortcut for the bottom in following picture, the I could find the wanted editor name? If there is not, could I set a costumer shortcut for this?

Risposte (2)
Image Analyst
il 10 Nov 2019
0 voti
Yes there is. There is some api call to get the names of the editor tabs. I don't have it on this computer but I'll see if I can get it when I get to my other computer. I got the code from Yair Altman.
4 Commenti
Xiaodi Jin
il 14 Nov 2019
Hi, I try to find it from Altman's homepage, but did find that. Could you tell me once you get access to your code?
Image Analyst
il 14 Nov 2019
Not sure I have it anymore. Here is what I do have. But be careful:
% Close all existing editor tabs.
% desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
% jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
% we get a com.mathworks.mde.desk.MLMultipleClientFrame object
% editors=desktop.getGroupMembers('Editor')
% % So here's the workaround for Matlab 6:
% openDocs = com.mathworks.ide.editor.EditorApplication
%
% ed = com.mathworks.ide.editor.EditorApplication
Xiaodi Jin
il 14 Nov 2019
Hi thanks for your answer.
I'm a littel confused about the attached code. What should exactly do with that?
- Copy code and save them in the matlab path folder.
- Uncomment them.
After that, how could I a shortcut for quick search editor name?
kind regards,
Xiaodi
Image Analyst
il 15 Nov 2019
I don't know. You're on your own (unless you want to contact Yair). I don't even know exactly what you want.
Walter Roberson
il 15 Nov 2019
I am not clear as to what you want, but it might possibly help to know that
editors = matlab.desktop.editor.getAll;
This is an array of Document . Each one has a property named Filename that can be examined to determine whether it is the desired session. Once you have determined the proper index, you can use the makeActive method on it, such as
editors(2).makeActive
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!