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:
parent
b3f954998a
commit
ad30578896
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue