From 6a40f67a52975d05582ae62ba068feb0d06ef5d7 Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Fri, 15 Apr 2005 20:21:31 +0000 Subject: [PATCH] Bug 90889 - Added content assist support for the condition in an if statement. --- .../core/dom/parser/AbstractGNUSourceCodeParser.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java index 282f93ed143..96f7506744c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java @@ -1869,6 +1869,14 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { IASTExpression condition = null; try { condition = condition(); + if (LT(1) == IToken.tEOC) { + // Completing in the condition + result = createIfStatement(); + result.setCondition(condition); + condition.setParent(result); + condition.setPropertyInParent(IASTIfStatement.CONDITION); + return result; + } consume(IToken.tRPAREN); } catch (BacktrackException b) { IASTProblem p = failParse(b);