mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
Follow up to 253690, fix creation of parser logs.
This commit is contained in:
parent
0603e8472d
commit
d60c8570b9
1 changed files with 7 additions and 0 deletions
|
@ -55,6 +55,7 @@ import org.eclipse.cdt.core.index.IIndex;
|
|||
import org.eclipse.cdt.core.index.IIndexFile;
|
||||
import org.eclipse.cdt.core.index.IIndexFileLocation;
|
||||
import org.eclipse.cdt.core.index.IIndexInclude;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
|
@ -62,6 +63,7 @@ import org.eclipse.cdt.core.parser.ExtendedScannerInfo;
|
|||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
||||
import org.eclipse.cdt.internal.core.model.ASTCache;
|
||||
import org.eclipse.cdt.internal.core.model.TranslationUnit;
|
||||
|
@ -188,6 +190,11 @@ public class CreateParserLogAction implements IObjectActionDelegate {
|
|||
}
|
||||
|
||||
private void createLog(final PrintStream out, final ITranslationUnit tu, IProgressMonitor pm) {
|
||||
try {
|
||||
tu.open(pm);
|
||||
} catch (CModelException e) {
|
||||
CUIPlugin.log(e);
|
||||
}
|
||||
ASTProvider.getASTProvider().runOnAST(tu, ASTProvider.WAIT_IF_OPEN, pm, new ASTCache.ASTRunnable() {
|
||||
public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException {
|
||||
if (ast != null)
|
||||
|
|
Loading…
Add table
Reference in a new issue