com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplatesUtils Java Examples

The following examples show how to use com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplatesUtils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NewExpressionTemplate.java    From HakunaMatataIntelliJPlugin with Apache License 2.0 5 votes vote down vote up
public NewExpressionTemplate() {
    super(
            "newInstanceReplacement",
            "new Type()",
            JavaPostfixTemplatesUtils.selectorTopmost()
    );
}
 
Example #2
Source File: EmptyStringTemplate.java    From HakunaMatataIntelliJPlugin with Apache License 2.0 5 votes vote down vote up
public EmptyStringTemplate() {
    super(
            "emptyCheck",
            "TextUtils.isEmpty(expr)",
            JavaPostfixTemplatesUtils.selectorTopmost(JavaPostfixTemplatesUtils.IS_NOT_PRIMITIVE)
    );
}
 
Example #3
Source File: AbstractRichStringBasedPostfixTemplate.java    From HakunaMatataIntelliJPlugin with Apache License 2.0 4 votes vote down vote up
protected AbstractRichStringBasedPostfixTemplate(@NotNull String name,
                                                 @NotNull String example,
                                                 @NotNull Condition<PsiElement> typeChecker) {
    super(name, example, JavaPostfixTemplatesUtils.selectorAllExpressionsWithCurrentOffset(typeChecker));
}
 
Example #4
Source File: AbstractRichStringBasedPostfixTemplate.java    From android-postfix-plugin with Apache License 2.0 4 votes vote down vote up
protected AbstractRichStringBasedPostfixTemplate(@NotNull String name,
                                                 @NotNull String example,
                                                 @NotNull Condition<PsiElement> typeChecker) {
    super(name, example, JavaPostfixTemplatesUtils.selectorAllExpressionsWithCurrentOffset(typeChecker));
}
 
Example #5
Source File: LombokVarValPostfixTemplate.java    From lombok-intellij-plugin with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
LombokVarValPostfixTemplate(String name, String example, String selectedTypeFQN) {
  super(null, name, example,
    JavaPostfixTemplatesUtils.selectorAllExpressionsWithCurrentOffset(JavaPostfixTemplatesUtils.IS_NON_VOID),
    null);
  this.selectedTypeFQN = selectedTypeFQN;
}