1. Create a script in your favorite text editor:
First add metadata, e.g.:
- Code: Select all
/*
* Key: M1+M3+y
* Menu: Synchronize > Save and Upload Current File
* Kudos: <your name here>
* License: EPL 1.0
* DOM: http://localhost/com.aptana.ide.syncing
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
*/
then write a main function e.g.:
- Code: Select all
function main(){
editors.activeEditor.save();
sync.uploadCurrentEditor();
}
2. To avoid the error message "Can't find any scripts on clipboard - make sure you include the Jabberwocky-inspired markers at the beginning and ending of the script" you have to add two lines. One before the whole stuff:
- Code: Select all
--- Came wiffling through the eclipsey wood ---
- Code: Select all
--- And burbled as it ran! ---
So the whole script looks similar like this:
- Code: Select all
--- Came wiffling through the eclipsey wood ---
/*
* Key: M1+M3+y
* Menu: Synchronize > Save and Upload Current File
* Kudos: <your name here>
* License: EPL 1.0
* DOM: http://localhost/com.aptana.ide.syncing
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
*/
function main(){
editors.activeEditor.save();
sync.uploadCurrentEditor();
}
--- And burbled as it ran! ---
You can now copy the whole code to the clipboard and then select Scripts->Paste new script from the menu in Aptana.
So you can avoid, to add a new folder to each projects workspace (which is not useful, if you create a single workspace for each project).
The above script let you save and upload the current file in the editor with a simple shortcut: STRG + ALT + y
Hope this helps,
Nico
