Retrieving Eclipse CDT Messages from Compiler -
can retrieve eclipse cdt compiler problem messages (iproblem interface) can jdt? purpose access them within standalone java application.
compilationunit cu = … message[] messages = cu.getmessages(); iproblem[] problems = cu.getproblems();
it seems there java classes in cdt api have been removed in cdt 8.
this in unit test:
final imarker[] markers = newproject.findmarkers( icmodelmarker.c_model_problem_marker, true, iresource.depth_infinite);
note newproject can iresource - project, folder or file. can try itranslationunit::getunderlyingresource obtain resource cdt model. note underlying resource may null - e.g. when file in editor external workspace.
update on non-workspace files:
cdt runs make externally , parses output extract messages. unlike jdt java compiler living in eclipse process used. looks need create custom launcher make, capture output , somehow use cdt facilities parse output. responsible generating error markers (or devising other way of keeping information). cannot estimate how hard pass custom output through cdt error parser...
Comments
Post a Comment