Search in sources :

Example 1 with KtValueArgumentList

use of org.jetbrains.kotlin.psi.KtValueArgumentList in project kotlin by JetBrains.

the class KtAnnotationEntryElementType method createStub.

@Override
public KotlinAnnotationEntryStub createStub(@NotNull KtAnnotationEntry psi, StubElement parentStub) {
    Name shortName = KtPsiUtil.getShortName(psi);
    String resultName = shortName != null ? shortName.asString() : psi.getText();
    KtValueArgumentList valueArgumentList = psi.getValueArgumentList();
    boolean hasValueArguments = valueArgumentList != null && !valueArgumentList.getArguments().isEmpty();
    return new KotlinAnnotationEntryStubImpl(parentStub, StringRef.fromString(resultName), hasValueArguments);
}
Also used : KotlinAnnotationEntryStubImpl(org.jetbrains.kotlin.psi.stubs.impl.KotlinAnnotationEntryStubImpl) KtValueArgumentList(org.jetbrains.kotlin.psi.KtValueArgumentList) Name(org.jetbrains.kotlin.name.Name)

Aggregations

Name (org.jetbrains.kotlin.name.Name)1 KtValueArgumentList (org.jetbrains.kotlin.psi.KtValueArgumentList)1 KotlinAnnotationEntryStubImpl (org.jetbrains.kotlin.psi.stubs.impl.KotlinAnnotationEntryStubImpl)1