Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2011-05-16 03:16:48 -0400
committerAnton Leherbauer2011-05-16 03:16:48 -0400
commitf87a7ad4e3aeebb4d37bcbebccf2f50a0b17ea89 (patch)
treede1c07481eda9c0520c9d922a9833d52e37bdad7
parent30e80b53b2f29e476d01f3ca5bed628a22949ddc (diff)
downloadorg.eclipse.cdt-f87a7ad4e3aeebb4d37bcbebccf2f50a0b17ea89.tar.gz
org.eclipse.cdt-f87a7ad4e3aeebb4d37bcbebccf2f50a0b17ea89.tar.xz
org.eclipse.cdt-f87a7ad4e3aeebb4d37bcbebccf2f50a0b17ea89.zip
Bug 345834 - Enumerators disappear from outline after reconciling the editor
Patch by Patrick Hofer
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
index d82be49c88..b5a07055e5 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelBuilder2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2011 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -592,10 +592,6 @@ public class CModelBuilder2 implements IContributedModelBuilder {
// add to parent
parent.addChild(element);
- final IASTEnumerator[] enumerators= enumSpecifier.getEnumerators();
- for (final IASTEnumerator enumerator : enumerators) {
- createEnumerator(element, enumerator);
- }
EnumerationInfo info= (EnumerationInfo) getElementInfo(element);
// set enumeration position
if (astEnumName != null && enumName.length() > 0) {
@@ -604,6 +600,11 @@ public class CModelBuilder2 implements IContributedModelBuilder {
final IASTFileLocation enumLocation= enumSpecifier.getFileLocation();
info.setIdPos(enumLocation.getNodeOffset(), type.length());
}
+ // add enumerators
+ final IASTEnumerator[] enumerators= enumSpecifier.getEnumerators();
+ for (final IASTEnumerator enumerator : enumerators) {
+ createEnumerator(element, enumerator);
+ }
setBodyPosition(info, enumSpecifier);
info.setTypeName(type);
return element;

Back to the top