mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 345834 - Enumerators disappear from outline after reconciling the editor
Patch by Patrick Hofer
This commit is contained in:
parent
30e80b53b2
commit
f87a7ad4e3
1 changed files with 6 additions and 5 deletions
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -592,10 +592,6 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
||||||
|
|
||||||
// add to parent
|
// add to parent
|
||||||
parent.addChild(element);
|
parent.addChild(element);
|
||||||
final IASTEnumerator[] enumerators= enumSpecifier.getEnumerators();
|
|
||||||
for (final IASTEnumerator enumerator : enumerators) {
|
|
||||||
createEnumerator(element, enumerator);
|
|
||||||
}
|
|
||||||
EnumerationInfo info= (EnumerationInfo) getElementInfo(element);
|
EnumerationInfo info= (EnumerationInfo) getElementInfo(element);
|
||||||
// set enumeration position
|
// set enumeration position
|
||||||
if (astEnumName != null && enumName.length() > 0) {
|
if (astEnumName != null && enumName.length() > 0) {
|
||||||
|
@ -604,6 +600,11 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
||||||
final IASTFileLocation enumLocation= enumSpecifier.getFileLocation();
|
final IASTFileLocation enumLocation= enumSpecifier.getFileLocation();
|
||||||
info.setIdPos(enumLocation.getNodeOffset(), type.length());
|
info.setIdPos(enumLocation.getNodeOffset(), type.length());
|
||||||
}
|
}
|
||||||
|
// add enumerators
|
||||||
|
final IASTEnumerator[] enumerators= enumSpecifier.getEnumerators();
|
||||||
|
for (final IASTEnumerator enumerator : enumerators) {
|
||||||
|
createEnumerator(element, enumerator);
|
||||||
|
}
|
||||||
setBodyPosition(info, enumSpecifier);
|
setBodyPosition(info, enumSpecifier);
|
||||||
info.setTypeName(type);
|
info.setTypeName(type);
|
||||||
return element;
|
return element;
|
||||||
|
|
Loading…
Add table
Reference in a new issue