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
55 lines
1.5 KiB
Plaintext
Vendored
55 lines
1.5 KiB
Plaintext
Vendored
JetFile: TraitConstructor.kt
|
|
PACKAGE_DIRECTIVE
|
|
<empty list>
|
|
IMPORT_LIST
|
|
<empty list>
|
|
CLASS
|
|
PsiElement(interface)('interface')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('TestTrait')
|
|
PRIMARY_CONSTRUCTOR
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(val)('val')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('Int')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiElement(var)('var')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('b')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('String')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('c')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('Double')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace('\n')
|
|
CLASS
|
|
PsiElement(interface)('interface')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('TestTrait')
|
|
PRIMARY_CONSTRUCTOR
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
PsiElement(RPAR)(')')
|