Eclipse:On Save执行程序 [英] Eclipse: On Save execute a program

查看:100
本文介绍了Eclipse:On Save执行程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我碰到了一个基于ruby的CSS模板引擎的 LESS Leaner CSS 。这个想法听起来很整洁,但实际上我们需要编译程序来获取CSS。这是麻烦的,因为我们在使用CSS和每次编辑我们不想编译时进行太多更改。



在Eclipse中有保存操作,但只处理格式更改。



是否有在Eclipse中保存文件,调用或触发编译的方法?



在Vi或Emacs中轻松执行此操作。

解决方案

我想您所需要的是为您的项目定义一个自定义构建器。这样,您可以在某些文件更改时运行程序或Ant脚本。



右键单击项目 - >属性 - >构建器 - >新建


I have recently come across the LESS Leaner CSS a template engine for CSS based on ruby. The idea sounded neat, but in practice we need to compile the program to get CSS. This is cumbersome as we make too many changes while working on CSS and for every edit we don't want to compile.

In Eclipse, there are "Save-Actions" but it handles only formatting changes.

Is there a way on saving the file in Eclipse, to call or trigger the compilation?

Its easy to do this in Vi or Emacs.

解决方案

I think all you need is to define a custom Builder for your project. That way, you can run a program or an ant script whenever certain files change.

Right click on the project -> Properties -> Builders -> New

这篇关于Eclipse:On Save执行程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆