views:

411

answers:

1

Hey,

I've recently started working with Aptana and Eclipse Monkey. What I want to do now is to create a script that saves a file then uploads it to a FTP.

Problem is that Eclipse Monkey is VERY poorly documented and Google returned only unrelated results.

I've made it upload the file, but I need the script to save the file before uploading.

sync.uploadCurrentEditor();

Do you know any resource for Eclipse Monkey with methods,etc ?

+1  A: 

Hey Brayn,

Check this out, it has the solution for your problem:

http://forums.aptana.com/viewtopic.php?t=5216

Edit; to be more specific; You need to add the following line into the meta-data piece at the top, so the script knows the reference 'editors':

* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript

After you've done that, you need to add the following line right before the sync. stuff;

editors.activeEditor.save();

That's it :)