| Hi, 
 I am make an Eclipse builder plugin that does some action when a project is compiled succesfully.
 
 I have a couple of questions about an Eclipse builder as following:
 
 1.
 In order to associate my builder with a project, I made an additional java files that toggles the nature by adding a command in the menu shown when you right click the project name. This is how I trigger and disable my builder.
 However, this is not the way that I want. I want to trigger my builder just by running my plugin.
 
 Is there any way that I can associate my builder with a project in such way? For example, when you run my builder, I want you to be able to build your project with my builder, without doing any special action.
 
 2.
 My builder should do some action only when a project is compiled successfully. Therefore, my builder has to be aware whether the project has compile errors after build.
 
 Below is how I wrote the builder.
 try {
 monitor.beginTask("Incremental build starting", 1);
 getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
 monitor.done();
 } catch (CoreException e) {//compile error occured}
 
 I thought that build(...) method throws an CoreException when build fails. (meaning when there is a compile error) However, even if there is an obvious compile error in the project, build(...) method does not throw any CoreException in my builder.
 Could you tell me how I can catch the existence of compile errors in my builder?
 
 Thank you very much.
 
 MJ
 
 
 Get news, entertainment and everything you care about at Live.com. Check it out!
 |