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()) {