String (@NotNull CompletionInitializationContext context, PsiFile file) { if (context.getCompletionType() != CompletionType.BASIC) return null; int offset = context.getStartOffset(); if (PsiTreeUtil.findElementOfClassAtOffset(file, offset - 1, PsiReferenceParameterList.class, false) != null) { return CompletionInitializationContext.DUMMY_IDENTIFIER_TRIMMED; } if (semicolonNeeded(file, offset)) { return CompletionInitializationContext.DUMMY_IDENTIFIER_TRIMMED + ";"; } PsiElement leaf = file.findElementAt(offset); if (leaf instanceof PsiIdentifier || leaf instanceof PsiKeyword) { return CompletionInitializationContext.DUMMY_IDENTIFIER_TRIMMED; } return null; }