Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » Run external program on save
Run external program on save [message #1416873] Tue, 30 April 2013 15:01 Go to next message
Deepankar Jain is currently offline Deepankar JainFriend
Messages: 10
Registered: April 2013
Junior Member
Hello,

First off, thank you very much for this plug-in. I find it very useful!

Would it be possible to add the ability to run an external program (such as a shell script) on save? I have a script that trims trailing whitespace and coverts tabs to spaces (might be introduced by other contributors). It would be great if I could run this script whenever I save a Lua file. I did some googling and the only other way to accomplish this is to define a builder that run the script. However, that's less than ideal because it's a more complicated solution.

Thanks in advance!

DJ
Re: Run external program on save [message #1416874 is a reply to message #1416873] Tue, 30 April 2013 16:14 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
hi,

Thanks for your feedback :d.

It seems your real need is to clean your code on save (convert spaces-tabs, remove white space ...)
If you want to do that there is a plugin which does this kind of stuff, I never test it with LDT but I suppose it works. If you want to test it : http://andrei.gmxhome.de/anyedit/

For action on save, I don't know an other solution than add a builder on your project. It's a bit complicated but this is a generic feature available for all 'eclipse project'.
The documentation to add a builder is http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-96_non_ant_pjs.htm&cp=0_1_2_2_0.

But we think about that when we will plan the next features :).
Re: Run external program on save [message #1416875 is a reply to message #1416874] Tue, 30 April 2013 16:31 Go to previous message
Deepankar Jain is currently offline Deepankar JainFriend
Messages: 10
Registered: April 2013
Junior Member
Thanks for the tip about AnyEdit, Simon! That definitely fits the bill and it works well with the LDT.

Cheers!
Previous Topic:LDT - How to stop the file tab, showing the full path text?
Next Topic:Re: Run external program on save
Goto Forum:
  


Current Time: Thu Oct 31 23:54:13 GMT 2024

Powered by FUDForum. Page generated in 0.02726 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top