Files
kotlin-fork/compiler/testData/psi/DocCommentsBinding.txt
T
Pavel V. Talanov 07d35d305e Create import list psi element even if no directives are present
Fix a problem where deleting last import directive via "optimize imports" could lead to incorrect psi structure resulting in CCE, see EA-64291
New imports are inserted at the head (after package directive if present) of the file (before any comments) if no imports were present
Add test for inserting import to file where a first statement is a comment
Drop code dealing with non-existing import list in ImportInsertHelperImpl
AbstractQuickFixTest: check for unexpected actions before changes to the file are made as it relies on the first line having specific format
2015-06-08 20:51:04 +03:00

183 lines
5.8 KiB
Plaintext
Vendored

JetFile: DocCommentsBinding.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
CLASS
KDoc
PsiElement(KDOC_START)('/**')
PsiWhiteSpace('\n ')
KDOC_SECTION
PsiElement(KDOC_LEADING_ASTERISK)('*')
PsiElement(KDOC_TEXT)(' Doc comment for A')
PsiWhiteSpace('\n ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n')
PsiComment(EOL_COMMENT)('// some comment')
PsiWhiteSpace('\n')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('A')
PRIMARY_CONSTRUCTOR
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiWhiteSpace('\n ')
VALUE_PARAMETER
KDoc
PsiElement(KDOC_START)('/**')
PsiWhiteSpace('\n ')
KDOC_SECTION
PsiElement(KDOC_LEADING_ASTERISK)('*')
PsiElement(KDOC_TEXT)(' Doc comment for val-parameter')
PsiWhiteSpace('\n ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n ')
PsiComment(BLOCK_COMMENT)('/*var*/')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('p')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiWhiteSpace('\n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
FUN
KDoc
PsiElement(KDOC_START)('/**')
PsiWhiteSpace('\n ')
KDOC_SECTION
PsiElement(KDOC_LEADING_ASTERISK)('*')
PsiElement(KDOC_TEXT)(' Doc comment for function')
PsiWhiteSpace('\n ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
FUN
KDoc
PsiElement(KDOC_START)('/**')
PsiWhiteSpace('\n ')
KDOC_SECTION
PsiElement(KDOC_LEADING_ASTERISK)('*')
PsiElement(KDOC_TEXT)(' Doc comment for local function')
PsiWhiteSpace('\n ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('localFoo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace(' ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
CLASS
KDoc
PsiElement(KDOC_START)('/**')
PsiWhiteSpace('\n ')
KDOC_SECTION
PsiElement(KDOC_LEADING_ASTERISK)('*')
PsiElement(KDOC_TEXT)(' Doc comment for local class')
PsiWhiteSpace('\n ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n ')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('LocalClass')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
PROPERTY
KDoc
PsiElement(KDOC_START)('/**')
PsiWhiteSpace('\n ')
KDOC_SECTION
PsiElement(KDOC_LEADING_ASTERISK)('*')
PsiElement(KDOC_TEXT)(' Doc comment for property')
PsiWhiteSpace('\n ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n ')
PsiElement(var)('var')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('property')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiWhiteSpace('\n ')
PROPERTY_ACCESSOR
KDoc
PsiElement(KDOC_START)('/**')
KDOC_SECTION
PsiElement(KDOC_TEXT)(' Doc comment for getter ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n ')
PsiElement(get)('get')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PROPERTY_ACCESSOR
KDoc
PsiElement(KDOC_START)('/**')
KDOC_SECTION
PsiElement(KDOC_TEXT)(' Doc comment for setter ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n ')
PsiElement(set)('set')
PsiElement(LPAR)('(')
VALUE_PARAMETER_LIST
VALUE_PARAMETER
PsiElement(IDENTIFIER)('value')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
CLASS
KDoc
PsiElement(KDOC_START)('/**')
PsiWhiteSpace('\n ')
KDOC_SECTION
PsiElement(KDOC_LEADING_ASTERISK)('*')
PsiElement(KDOC_TEXT)(' Doc comment for B')
PsiWhiteSpace('\n ')
PsiElement(KDOC_END)('*/')
PsiWhiteSpace('\n')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('B')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n\n')
PsiElement(RBRACE)('}')