From 1cc6bcf4d19e9a6e2d48b968458d5efa964ca487 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Thu, 17 Apr 2003 12:59:26 +0000 Subject: [PATCH] Correct bug 36624 The old parser was failing. --- .../cdt/internal/core/model/TranslationUnit.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java index 610200fb66d..3b869a9a3ee 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java @@ -302,12 +302,14 @@ public class TranslationUnit extends Openable implements ITranslationUnit { TranslationUnitInfo unitInfo = (TranslationUnitInfo) info; // generate structure - newElements = null; - newElements = this.parse(); + Map mapping = this.parse(); // this is temporary until the New Model Builder is implemented - if(newElements == null) - getNewElements(newElements, this); + if(mapping == null) { + getNewElements(newElements, this); + } else { + newElements.putAll(mapping); + } /////////////////////////////////////////////////////////////// if (isWorkingCopy()) {