kalessil / yii2inspections

MIT License
31 stars 3 forks source link

[fixed] Triggers auto-complete popup when a semi-colon is typed #19

Closed nvlad closed 7 years ago

nvlad commented 7 years ago

https://github.com/nvlad/yii2support/issues/2

I`m use next code

@Override
public boolean invokeAutoPopup(@NotNull PsiElement position, char typeChar) {
    if (typeChar == '\'' || typeChar == '"') {
        if (position instanceof LeafPsiElement && (position.getText().equals("$category") || position.getText().equals("$message"))) {
            return true;
        }
        if (position.getNextSibling() instanceof ParameterList || position.getParent() instanceof MethodReference) {
            return true;
        }
    }

    return false;
}
kalessil commented 7 years ago

@nvlad, I can not reproduce this. Would you please provide a code fragment/step by step instructions?

I checked the solution from you, but didn't get the root case...

nvlad commented 7 years ago

image

type Yii::t('yii', '(not set)') and add semi-colon after

kalessil commented 7 years ago

Confirmed, thank you for details.