Hi,
I've added a editor action with key binding to compile the File in the current editor.
org.eclipse.cdt.managedbuilder.internal.core.GeneratedMakefileBuilder.invokeInternalBuilder
was my blue print.
BTW I've seen, that following call in the blue print is wrong (I think):
int status = stepBuilder.build( consoleOutStream, epmOutputStream,
new SubProgressMonitor(monitor, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
epmOutputStream is the stream of the ErrorParserManager an consoleOutStream the stream of the console.
With our toolchain we've the problem, that for the compile errors no problem markers are generated, when the command "Build selected File(s)" is executed. Now I think they are not on the err stream and thus are not scanned by the ErrorParserManager. In
my editor I've changed the call to
int status = stepBuilder.build( epmOutputStream, epmOutputStream,
new SubProgressMonitor(monitor, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
and the problem markers are generated.
Is it a bug or a feature?
The code snippet is from CDT 6.0.2 (what we use). CDT 7.1 doesn't generate problem markers, too.
Cheers,
Harald