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

Bug 188010 - add completion of macros in named type specifier context.

This commit is contained in:
Doug Schaefer 2007-05-22 14:22:40 +00:00
parent b3f954998a
commit ad30578896

View file

@ -27,6 +27,7 @@ import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
import org.eclipse.cdt.core.dom.ast.IASTFunctionStyleMacroParameter;
import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorFunctionStyleMacroDefinition;
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
import org.eclipse.cdt.core.dom.ast.IBinding;
@ -99,7 +100,8 @@ public class DOMCompletionProposalComputer extends ParsingBasedProposalComputer
IASTCompletionContext astContext = names[i].getCompletionContext();
if (astContext == null) {
continue;
} else if (astContext instanceof IASTIdExpression) {
} else if (astContext instanceof IASTIdExpression
|| astContext instanceof IASTNamedTypeSpecifier) {
// handle macros only if there is a prefix
handleMacros = prefix.length() > 0;
}