com.intellij.psi.PsiInvalidElementAccessException#com.jetbrains.php.lang.PhpFileType源码实例Demo

下面列出了com.intellij.psi.PsiInvalidElementAccessException#com.jetbrains.php.lang.PhpFileType 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

public void testTypesForFunctionWithClassString() {
    assertPhpReferenceResolveTo(PhpFileType.INSTANCE,
        "<?php\n instantiator(\\Foobar\\Foobar::class)->get<caret>Foo();\n",
        PlatformPatterns.psiElement(Method.class).withName("getFoo")
    );

    assertPhpReferenceResolveTo(PhpFileType.INSTANCE,
        "<?php\n instantiator2('', \\Foobar\\Foobar::class, '')->get<caret>Foo();\n",
        PlatformPatterns.psiElement(Method.class).withName("getFoo")
    );

    assertPhpReferenceNotResolveTo(PhpFileType.INSTANCE,
        "<?php\n instantiator2('', '', \\Foobar\\Foobar::class)->get<caret>Foo();\n",
        PlatformPatterns.psiElement(Method.class).withName("getFoo")
    );
}
 
/**
 * @param templateFile        Name of the generated file
 * @param destinationPath     Relative path to the target file system entry
 * @param extensionDefinition Extension definition containing all relevant metadata
 * @param context             Template Context variables
 * @param project             Project in context
 */
public static PsiElement fromTemplate(@NotNull String templateFile, @NotNull String destinationPath, @NotNull String destinationFileName, @NotNull TYPO3ExtensionDefinition extensionDefinition, @NotNull Map<String, String> context, Project project) {
    String template = readTemplateToString(templateFile, context);

    VirtualFile targetDirectory = getOrCreateDestinationPath(extensionDefinition.getRootDirectory(), destinationPath);

    LanguageFileType fileType = FileTypes.PLAIN_TEXT;
    if (templateFile.endsWith(".php")) {
        fileType = PhpFileType.INSTANCE;
    }

    PsiFile fileFromText = PsiFileFactory.getInstance(project).createFileFromText(destinationFileName, fileType, template);
    CodeStyleManager.getInstance(project).reformat(fileFromText);
    return PsiDirectoryFactory
            .getInstance(project)
            .createDirectory(targetDirectory)
            .add(fileFromText);
}
 
/**
 * @param templateFile           Name of the generated file
 * @param destinationPath        Relative path to the target file system entry
 * @param extensionRootDirectory Extension definition containing all relevant metadata
 * @param context                Template Context variables
 * @param project                Project in context
 */
public static PsiElement fromTemplate(@NotNull String templateFile, @NotNull String destinationPath, @NotNull String destinationFileName, @NotNull PsiDirectory extensionRootDirectory, @NotNull Map<String, String> context, Project project) {
    String template = readTemplateToString(templateFile, context);

    VirtualFile targetDirectory = getOrCreateDestinationPath(extensionRootDirectory.getVirtualFile(), destinationPath);

    LanguageFileType fileType = FileTypes.PLAIN_TEXT;
    if (templateFile.endsWith(".php")) {
        fileType = PhpFileType.INSTANCE;
    }

    PsiFile fileFromText = PsiFileFactory.getInstance(project).createFileFromText(destinationFileName, fileType, template);
    CodeStyleManager.getInstance(project).reformat(fileFromText);
    return PsiDirectoryFactory
            .getInstance(project)
            .createDirectory(targetDirectory)
            .add(fileFromText);
}
 
public void testRouteGroups() {
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n" +
            "Route::group(['namespace' => 'Group'], function() {\n" +
            "    Route::get('/', '<caret>');\n" +
            "});",
        "[email protected]"
    );

    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n" +
            "Route::group(['namespace' => 'Group'], function() {\n" +
            "    Route::get('/', '[email protected]<caret>');\n" +
            "});",
        PlatformPatterns.psiElement(Method.class).withParent(
            PlatformPatterns.psiElement(PhpClass.class).withName("GroupController")
        )
    );
}
 
public void testPhpTypeForMethods() {
    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "/** @var $f \\Foo\\Bar */\n" +
        "$f->foo('datetime')->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );

    // Same method name but different class and parameter index
    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "/** @var $f \\Foo\\Baz */\n" +
        "$f->foo('', 'datetime')->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );

    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "/** @var $f \\Foo\\Bar */\n" +
        "$f->foo(\\Foo\\Bar::DATETIME)->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );
}
 
public void testIssue305_class() {
    myFixture.copyFileToProject("classes.php");

    assertPhpReferenceResolveTo(PhpFileType.INSTANCE,
        "<?php\n" +
            "class Foo {\n" +
            "  /** @var \\TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface */" +
            "  protected $objectManager;\n" +
            "  public function foo() {\n" +
            "    $dataMapper = $this->objectManager->get(\\TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper::class);\n" +
            "    $dataMapper->ma<caret>p();" +
            "  }\n" +
            "}",
        PlatformPatterns.psiElement(Method.class).withName("map")
    );
}
 
public void testTypeHintVariableCompletionExtendsListWithStrippedWordList() {
    Collection<String[]> providers = Arrays.asList(
        new String[] {"FooBarInterface", "fooBar"},
        new String[] {"FooBarInterface", "bar"},
        new String[] {"FooBarAbstract", "fooBar"},
        new String[] {"FooAbstract", "foo"}
    );

    for (String[] provider : providers) {
        assertCompletionContains(
            PhpFileType.INSTANCE,
            String.format("<?php function f(%s $<caret>);", provider[0]),
            "$" + provider[1]
        );
    }
}
 
public void testCompletion() {
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n" +
            "app('<caret>')",
        "foo"
    );

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n" +
            "\\App::make('<caret>')",
        "foo"
    );

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n" +
            "/** @var $f \\Illuminate\\Contracts\\Container\\Container */" +
            "$f->make('<caret>')",
        "foo"
    );
}
 
public void testRouteNameReferencesAsMethod() {
    Collection<String[]> providers = new ArrayList<String[]>() {{
        add(new String[] {"Illuminate\\Routing\\UrlGenerator", "route"});
        add(new String[] {"Illuminate\\Contracts\\Routing\\UrlGenerator", "route"});
        add(new String[] {"Collective\\Html\\HtmlBuilder", "linkRoute"});
        add(new String[] {"Tests\\Feature\\ExampleTest", "visitRoute"});
    }};

    for (String[] provider : providers) {
        assertCompletionContains(PhpFileType.INSTANCE, String.format("<?php\n" +
                "/** @var $r \\%s */\n" +
                "$r->%s('<caret>')"
                , provider[0], provider[1]),
            "profile"
        );

        assertNavigationMatch(PhpFileType.INSTANCE, String.format("<?php\n" +
                "/** @var $r \\%s */\n" +
                "$r->%s('profile<caret>')"
                , provider[0], provider[1]),
            PlatformPatterns.psiElement().inFile(PlatformPatterns.psiFile().withName("routes.php"))
        );
    }
}
 
public void testTypeHintVariableCompletionExtendsListWithStrippedWordList() {
    Collection<String[]> providers = Arrays.asList(
        new String[] {"FooBarInterface", "fooBar"},
        new String[] {"FooBarInterface", "bar"},
        new String[] {"FooBarAbstract", "fooBar"},
        new String[] {"FooAbstract", "foo"}
    );

    for (String[] provider : providers) {
        assertCompletionContains(
            PhpFileType.INSTANCE,
            String.format("<?php function f(%s $<caret>);", provider[0]),
            "$" + provider[1]
        );
    }
}
 
源代码11 项目: idea-php-toolbox   文件: PhpMatcherTest.java
public void testVariadicSignatureRegistrarMatcher() {
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n _variadic('<caret>')", "foo");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n _variadic(null, '<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n _variadic('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n _variadic('<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n _variadic('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n new \\Foo\\Variadic('<caret>')", "foo");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n new \\Foo\\Variadic(null, '<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n new \\Foo\\Variadic('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n /** @var $f \\Foo\\Variadic */\n $f->getFoo('<caret>')", "foo");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n /** @var $f \\Foo\\Variadic */\n $f->getFoo(null, '<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n /** @var $f \\Foo\\Variadic */\n $f->getFoo('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));
}
 
源代码12 项目: idea-php-toolbox   文件: PhpMatcherTest.java
public void testVariadicSignatureRegistrarMatcher() {
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n _variadic('<caret>')", "foo");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n _variadic(null, '<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n _variadic('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n _variadic('<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n _variadic('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n new \\Foo\\Variadic('<caret>')", "foo");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n new \\Foo\\Variadic(null, '<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n new \\Foo\\Variadic('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n /** @var $f \\Foo\\Variadic */\n $f->getFoo('<caret>')", "foo");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n /** @var $f \\Foo\\Variadic */\n $f->getFoo(null, '<caret>')", "foo");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n /** @var $f \\Foo\\Variadic */\n $f->getFoo('foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));
}
 
public void testConfigReferences() {
    assertCompletionContains(
        PhpFileType.INSTANCE,
        "<?php\n" + "config('<caret>');",
        "simple.test", "simple.folder.subKey", "sim-ple.test", "app.sub.test"
    );

    assertNavigationMatch(
        PhpFileType.INSTANCE,
        "<?php\n" + "config('simple.test');",
        PlatformPatterns.psiElement(StringLiteralExpression.class).inFile(PlatformPatterns.psiFile().withName("simple.php"))
    );

    assertNavigationMatch(
            PhpFileType.INSTANCE,
            "<?php\n" + "config('app.sub.test');",
            PlatformPatterns.psiElement(StringLiteralExpression.class).inFile(PlatformPatterns.psiFile().withName("sub.php"))
    );
}
 
public void testPhpTypeForStaticMethods() {
    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "\\Foo\\Bar::app('datetime')->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );

    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "\\Foo\\Bar::app(\\Foo\\Bar::DATETIME)->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );
}
 
源代码15 项目: idea-php-toolbox   文件: ClassProviderTest.java
/**
 * @see ClassInterfaceProvider
 */
public void testClassInterfaceProvider() {
    // @TODO: some tests disabled because of: WI-35795

    // assertCompletionContains(PhpFileType.INSTANCE,  "<?php date('DateT<caret>')", "DateTime");
    // assertCompletionContains(PhpFileType.INSTANCE,  "<?php date_2('Iterato<caret>')", "Iterator");
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php date_2('Iterator<caret>')", PlatformPatterns.psiElement(PhpClass.class));

    // LookupElementPresentation element = getCompletionLookupElement(PhpFileType.INSTANCE, "<?php date_2('Iterato<caret>')", "Iterator");
    // assertNotNull(element.getIcon());
}
 
源代码16 项目: Thinkphp5-Plugin   文件: ModelReference.java
@NotNull
        @Override
        public Collection<PsiElement> getPsiTargets(StringLiteralExpression psiElement) {
//            return super.getPsiTargets(psiElement, offset, editor);
            final Set<PsiElement> targets = new HashSet<>();

            String contents = psiElement.getContents();
            if (StringUtils.isBlank(contents)) {
                return targets;
            }

            //判断是否有模块名
            String curTpModuleName = Util.getCurTpModuleName(getElement())+"/";
            String content2="";
            if(!contents.startsWith(curTpModuleName)){
                content2=curTpModuleName+contents;
            }

            //忽略大小写
            Collection<String> allKeys = FileBasedIndex.getInstance().getAllKeys(key, getElement().getProject());

            contents = Util.getKeyWithCase(allKeys, contents);
            if(!allKeys.contains(contents))
                contents = Util.getKeyWithCase(allKeys, content2);

            FileBasedIndex.getInstance().getFilesWithKey(key, new HashSet<>(Collections.singletonList(contents)),
                    new Processor<VirtualFile>() {
                        @Override
                        public boolean process(VirtualFile virtualFile) {
                            if (virtualFile != null) {
                                PsiFile psiFileTarget = PsiManager.getInstance(ModelReference.ModelProvider.this.getProject()).findFile(virtualFile);
                                targets.add(psiFileTarget);
                            }
                            return true;
                        }
                    }, GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.allScope(getProject()), PhpFileType.INSTANCE));

            return targets;
        }
 
public void testCompletionContains() {
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n" +
        "class MySubscriber implements \\Enlight\\Event\\SubscriberInterface\n" +
        "{\n" +
        "   public static function getSubscribedEvents()\n" +
        "   {\n" +
        "       return [\n" +
        "           '<caret>' => 'foobar',\n" +
        "       ];\n" +
        "   }\n" +
        "}",
        "Enlight_Bootstrap_AfterInitResource_foo.datetime", "Enlight_Bootstrap_AfterRegisterResource_foo.datetime", "Enlight_Bootstrap_InitResource_foo.datetime"
    );
}
 
public void testPhpViewFactory() {
    assertCompletionContains(
        PhpFileType.INSTANCE,
        "<?php /** @var $x \\Illuminate\\View\\Factory */\n $x->make('<caret>')')",
        "test_view"
    );

    assertNavigationMatch(            PhpFileType.INSTANCE,
        "<?php /** @var $x \\Illuminate\\View\\Factory */\n $x->make('test<caret>_view')')",
        PlatformPatterns.psiElement()
    );
}
 
源代码19 项目: idea-php-toolbox   文件: PhpMatcherTest.java
public void testThatParameterIndexStartsByZero() {
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n parameter('', '<caret>')", "bar", "car");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n parameter(null, '<caret>')", "bar", "foo");

    assertCompletionNotContains(PhpFileType.INSTANCE, "<?php\n parameter('', '', '<caret>')", "bar", "car");
    assertCompletionNotContains(PhpFileType.INSTANCE, "<?php\n parameter('<caret>'', '')", "bar", "car");

    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n parameter('', 'foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n parameter(null, 'foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));

    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n/** @var $f \\Foo\\Parameter */\n$f->getFoo('', '<caret>')", "bar", "foo");
    assertCompletionContains(PhpFileType.INSTANCE, "<?php\n/** @var $f \\Foo\\Parameter */\n$f->getFoo(null, '<caret>')", "bar", "foo");

    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n/** @var $f \\Foo\\Parameter */\n$f->getFoo(null, 'foo<caret>')", PlatformPatterns.psiElement(Method.class).withName("format"));
}
 
public void testThatNavigationContainsTranslation() {
    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n" +
        "/** @var $t \\Illuminate\\Translation\\Translator **/ \n" +
        "$t->get('messa<caret>ges.foo');\n"
    );

    assertNavigationMatch(PhpFileType.INSTANCE, "<?php\n" +
        "/** @var $t \\Illuminate\\Translation\\Translator **/ \n" +
        "$t->get('admin/mess<caret>ages.foo');\n"
    );
}
 
public void testPhpTypeForFunctions() {
    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "car('', 'datetime')->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );

    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "car('', \\Foo\\Bar::DATETIME)->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );
}
 
public ToolboxCompletionContributor() {

        extend(CompletionType.BASIC, PlatformPatterns.psiElement(), new CompletionProvider<CompletionParameters>() {
            @Override
            protected void addCompletions(@NotNull CompletionParameters completionParameters, ProcessingContext processingContext, @NotNull CompletionResultSet completionResultSet) {

                PsiElement position = completionParameters.getPosition();

                FileType fileType = position.getContainingFile().getFileType();
                if(!(fileType instanceof PhpFileType) && !(fileType instanceof TwigFileType)) {
                    return;
                }

                Map<PhpToolboxProviderInterface, Set<JsonRegistrar>> providers = RegistrarMatchUtil.getProviders(position);
                if(providers.size() == 0) {
                    return;
                }

                PhpToolboxCompletionContributorParameter parameter = null;
                for (Map.Entry<PhpToolboxProviderInterface, Set<JsonRegistrar>> provider : providers.entrySet()) {

                    if(parameter == null) {
                        parameter = new PhpToolboxCompletionContributorParameter(
                            completionParameters,
                            processingContext,
                            completionResultSet,
                            provider.getValue()
                        );
                    }

                    completionResultSet.addAllElements(provider.getKey().getLookupElements(parameter));
                }

            }
        });

    }
 
public void testTypeForArrayAccessMultiContainer() throws Exception {

        assertSignatureEquals(PhpFileType.INSTANCE, ArrayAccessExpression.class,
                "<?php " +
                        "$app = new \\Silex\\Application(); " +
                        "$app['service1']['ser<caret>vice2'];",
                "#Š#C\\Silex\\Application[service1][service2]"
        );
    }
 
public void testContainerCompletionInsideApostrophes() throws Exception {

        assertCompletionContains(PhpFileType.INSTANCE,
                "<?php " +
                        "$app = new \\Silex\\Application(); " +
                        "$app['<caret>'];",
                "container1", "parameter"
        );
    }
 
public void testTypeForArrayAccessContainer() throws Exception {

        assertSignatureEquals(PhpFileType.INSTANCE, ArrayAccessExpression.class,
                "<?php " +
                        "$app = new \\Silex\\Application(); " +
                        "$a<caret>pp['service1'];",
                "#Š#C\\Silex\\Application[service1]"
        );
    }
 
private void configureSignalSlotConnect(String classParameters, String methodParameter) {
    myFixture.configureByText(PhpFileType.INSTANCE, "<?php\n" +
        "/** @var \\TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher $signalSlotDispatcher */\n" +
        "$signalSlotDispatcher = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher::class);\n" +
        "$signalSlotDispatcher->connect(\n" +
        "    \\TYPO3\\CMS\\Extensionmanager\\Utility\\InstallUtility::class,  // Signal class name\n" +
        "    'foo',                                                           // Signal name\n" +
        "    " + classParameters + ",                                         // Slot class name\n" +
        "    " + methodParameter + "                                          // Slot name\n" +
        ");"
    );
}
 
public void testPhpTypeForStaticMethods() {
    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "\\Foo\\Bar::app('datetime')->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );

    assertPhpReferenceResolveTo(PhpFileType.INSTANCE, "<?php\n" +
        "\\Foo\\Bar::app(\\Foo\\Bar::DATETIME)->for<caret>mat()",
        PlatformPatterns.psiElement(Method.class).withName("format")
    );
}
 
public void testContainerReference() throws Exception {

        assertReferenceContains(PhpFileType.INSTANCE,
                "<?php " +
                        "$app = new \\Silex\\Application(); " +
                        "$app['servic<caret>e'];",
                "\\Sorien\\Service1"
        );
    }
 
public void testResourceReferenceHasVariants() {
    myFixture.addFileToProject("foo/ext_emconf.php", "");
    myFixture.addFileToProject("foo/bar.txt", "");

    myFixture.configureByText(PhpFileType.INSTANCE, "<?php \n" +
            "'EXT:foo/ext_emconf.php<caret>';");

    PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()).getParent();

    ResourceReference target = null;
    PsiReference[] references = elementAtCaret.getReferences();
    for (PsiReference ref : references) {
        if (ref instanceof ResourceReference) {
            target = (ResourceReference) ref;
        }
    }

    if (target != null) {
        for (Object o : target.getVariants()) {
            if (o instanceof ResourceLookupElement && ((ResourceLookupElement) o).getLookupString().contains("EXT:foo/bar.txt")) {
                return;
            }
        }
    }

    fail("No resource reference.");
}
 
public void testTypeForTypedParameterExtendMethodTwoParameters() throws Exception {

        assertSignatureEquals(PhpFileType.INSTANCE, com.jetbrains.php.lang.psi.elements.Parameter.class,
                "<?php " +
                        "$app = new \\Silex\\Application(); " +
                        "$app[''] = $app->extend('service2', function ($class, MyPimpleType $a<caret>pplication) {});",
                null
        );
    }