Hi, (I'm new here and I'm working on my examwork which includes a plugin for eclipse) Is it possible to get a IASTTranslationUnit without having to parse a c file oneself? I suspect the file already is parsed and that the IASTTranslationUnit is there somewhere for me just to get? as the colorhighlighting and the codecompletion is already there and working in eclipse.
ReturnTypeVisitor visitor = new ReturnTypeVisitor(fileLocation.getFilename(), functionName);
CDOM cDOM = CDOM.getInstance(); Vector<FileLocation> fileLocations = null; try { IASTTranslationUnit transUnit = cDOM.getTranslationUnit(file); // do I have to do this or can I get it from the editor or elsewhere? some examplecode is refereing to "workingCopy" which has similiar functionality.. or where should one turn?
transUnit.accept(visitor); fileLocations = visitor.getLocations(); } catch(IASTServiceProvider.UnsupportedDialectException e) { } return fileLocations; ... ...