1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fix for 154350

This commit is contained in:
David Daoust 2006-08-18 17:44:10 +00:00
parent 13fff05bbc
commit 1d508cd878

View file

@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.ui.editor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EmptyStackException;
import java.util.Iterator;
import java.util.List;
import java.util.Stack;
@ -504,6 +505,7 @@ public class CSourceViewerDecorationSupport
}
} else if (statement instanceof IASTPreprocessorEndifStatement) {
IASTPreprocessorEndifStatement endifStmt = (IASTPreprocessorEndifStatement)statement;
try {
boolean wasInInactiveCode = ((Boolean)inactiveCodeStack.pop()).booleanValue();
if (inInactiveCode && !wasInInactiveCode) {
IASTNodeLocation nodeLocation = endifStmt.getNodeLocations()[0];
@ -512,6 +514,8 @@ public class CSourceViewerDecorationSupport
}
inInactiveCode = wasInInactiveCode;
}
catch( EmptyStackException e) {}
}
}
if (inInactiveCode) {
// handle dangling #if?