Eclipse预提交钩子来执行任意逻辑

时间:2015-07-16 20:29:34

标签: eclipse svn pre-commit-hook

eclipse是否支持在脚本或java类中执行逻辑的预提交检查?具体来说,我需要逻辑在提交到SVN之前在源文件中搜索printlnTODO等语句。

如果你编程,你知道我在说什么......: - )

public void submitOrder(Order order){
    if(order.valid()){
       println("hi!")
       orderProcessor.validatePayment(order)
       println("hi2")
       ...
    }else{
       println("logging to journal...")   //TODO remove this later
       journal.log(INVALID_ORDER, order)
       println("after journal")

       println("really throwing exception now!")
       throw new InvalidOrderException(order)
    }
}

0 个答案:

没有答案