Rank: 31909 based on 0 downloads (last 30 days) and 0 files submitted
photo

Julien

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Julien View all
Updated File Comments Rating
22 Jan 2012 KML Toolbox v1.4 (plot anything to Google Earth) Create KML files and view them in Google Earth. Supports 3D models, contours, overlays, and more... Author: Rafael Oliveira

The object oriented version of the google earth toolbox. Wonderful! Thank you so much for sharing...

18 Jan 2012 MagicListener MagicListener object Author: Benoit Charles

Works like a charm ! Simple, useful and efficient, thank you...

20 Jul 2009 EditorMacro - assign a macro to a keyboard key-stroke in the Matlab Editor and Command Window EditorMacro assigns a macro or action to requested key-binding in the Matlab Editor & Command Window Author: Yair Altman

Excellent work indeed, thank you very much for sharing this very useful and powerful function.
For users which would be interested in modifying selected text and not inserting new text at caret position, you can use the jEditorPane methods "getSelectedText" and "replaceSelection".
For example, if you want to transform selected text in current editor to upper case characters, you can do as follow :
---------------------------------------------------------------------------
function Upper_Macro(hDocument,eventData)
% Get Selected text in current editor
selectedText = char(hDocument.getSelectedText);
if isempty(selectedText)
    return;
end
% Modify selected text to upper case character
modifiedText = upper(selectedText);
% Update selection in current editor
hDocument.replaceSelection(modifiedText);
---------------------------------------------------------------------------
And simply run in the command window :
>>macros = EditorMacro('ctrl-u',@Upper_Macro,'run');
---------------------------------------------------------------------------
Thank you again Yair !

Contact us at files@mathworks.com