简体   繁体   中英

Create plug-in that creates a snapshot of the source code currently opened on editor - Eclipse CDT

I need to create a plug-in for Eclipse CDT that sends a "snapshot" of the source code of the currently opened editor each time the code is "built".

I am already capable of doing it each time the user presses a custom button created by me, but it would be great if it could be done when the "standard" "build" action is performed.

Do i need no create a plug-in of the type "builder"?

I am using Eclipse 4.4.0...

Can someone help me?! (Sorry for some english mistakes... :( )

One solution would be to create your own custom "Builder". Instead of actually building the code, it would invoke the functionality you already have.

For information on how to use the eclipse build system, please have a look here: https://wiki.eclipse.org/Eclipse/FAQ/How_do_I_implement_an_Eclipse_builder%3F .

Also, this website goes into more details about building in eclipse: https://www.eclipse.org/articles/Article-Builders/builders.htm . However, I think that the first one should do.

As a side note, this works with any kind of eclipse project (JDT and CDT). The build described there is common to all flavours.

Hope it helps, -Caius

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM