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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -