07d35d305e
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
196 lines
5.7 KiB
Plaintext
Vendored
196 lines
5.7 KiB
Plaintext
Vendored
JetFile: MutableArray.kt
|
|
PACKAGE_DIRECTIVE
|
|
<empty list>
|
|
IMPORT_LIST
|
|
<empty list>
|
|
CLASS
|
|
KDoc
|
|
PsiElement(KDOC_START)('/**')
|
|
PsiWhiteSpace('\n ')
|
|
KDOC_SECTION
|
|
PsiElement(KDOC_TEXT)('These declarations are "shallow" in the sense that they are not really compiled, only the type-checker uses them')
|
|
PsiWhiteSpace('\n')
|
|
PsiElement(KDOC_END)('*/')
|
|
PsiWhiteSpace('\n\n')
|
|
MODIFIER_LIST
|
|
PsiElement(open)('open')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(class)('class')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('ReadOnlyArray')
|
|
TYPE_PARAMETER_LIST
|
|
PsiElement(LT)('<')
|
|
TYPE_PARAMETER
|
|
MODIFIER_LIST
|
|
PsiElement(out)('out')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(GT)('>')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
DELEGATION_SPECIFIER_LIST
|
|
DELEGATOR_SUPER_CLASS
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('ISized')
|
|
PsiWhiteSpace(' ')
|
|
CLASS_BODY
|
|
PsiElement(LBRACE)('{')
|
|
PsiWhiteSpace('\n ')
|
|
FUN
|
|
MODIFIER_LIST
|
|
ANNOTATION
|
|
PsiElement(LBRACKET)('[')
|
|
ANNOTATION_ENTRY
|
|
CONSTRUCTOR_CALLEE
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('operator')
|
|
PsiElement(RBRACKET)(']')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(fun)('fun')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('get')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('index')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('Int')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiWhiteSpace('\n')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n\n')
|
|
CLASS
|
|
MODIFIER_LIST
|
|
PsiElement(open)('open')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(class)('class')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('WriteOnlyArray')
|
|
TYPE_PARAMETER_LIST
|
|
PsiElement(LT)('<')
|
|
TYPE_PARAMETER
|
|
MODIFIER_LIST
|
|
PsiElement(in)('in')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(GT)('>')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
DELEGATION_SPECIFIER_LIST
|
|
DELEGATOR_SUPER_CLASS
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('ISized')
|
|
PsiWhiteSpace(' ')
|
|
CLASS_BODY
|
|
PsiElement(LBRACE)('{')
|
|
PsiWhiteSpace(' ')
|
|
PsiComment(EOL_COMMENT)('// This is needed to keep IIterator's <T> covariant')
|
|
PsiWhiteSpace('\n ')
|
|
FUN
|
|
MODIFIER_LIST
|
|
ANNOTATION
|
|
PsiElement(LBRACKET)('[')
|
|
ANNOTATION_ENTRY
|
|
CONSTRUCTOR_CALLEE
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('operator')
|
|
PsiElement(RBRACKET)(']')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(fun)('fun')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('set')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('index')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('Int')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('value')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace('\n')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n\n')
|
|
CLASS
|
|
PsiElement(class)('class')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('MutableArray')
|
|
TYPE_PARAMETER_LIST
|
|
PsiElement(LT)('<')
|
|
TYPE_PARAMETER
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(GT)('>')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
DELEGATION_SPECIFIER_LIST
|
|
DELEGATOR_SUPER_CLASS
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('ReadOnlyArray')
|
|
TYPE_ARGUMENT_LIST
|
|
PsiElement(LT)('<')
|
|
TYPE_PROJECTION
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(GT)('>')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
DELEGATOR_SUPER_CLASS
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('WriteOnlyArray')
|
|
TYPE_ARGUMENT_LIST
|
|
PsiElement(LT)('<')
|
|
TYPE_PROJECTION
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(GT)('>')
|
|
PsiWhiteSpace(' ')
|
|
CLASS_BODY
|
|
PsiElement(LBRACE)('{')
|
|
PsiComment(BLOCK_COMMENT)('/*...*/')
|
|
PsiElement(RBRACE)('}')
|