开发者

Intercept Build Request in Eclipse - Before Compilation

开发者 https://www.devze.com 2023-03-15 23:03 出处:网络
I was wondering in Eclipse if it\'s possible to intercept when a user hits save or \'ctrl + s\' via some sort of listener. What I want to do is determine when a file in a project changes and receive t

I was wondering in Eclipse if it's possible to intercept when a user hits save or 'ctrl + s' via some sort of listener. What I want to do is determine when a file in a project changes and receive this notification before the file is actually compiled, so that I can update a property in the class. Afterwards, I would like the file to be compiled as per normal. Is this at all possible? Similar to the idea of a database 开发者_高级运维trigger I suppose.


I would look at org.eclipse.jdt.core.compilationParticipant. From the description:

This extension point allows clients to participate in the compilation process by receiving notifications at various stages of build and reconcile, via a org.eclipse.jdt.core.compiler.CompilationParticipant.

0

精彩评论

暂无评论...
验证码 换一张
取 消