Commit Graph

4 Commits

Author SHA1 Message Date
Roman Golyshev 2c12d26d28 KT-18538 Unwrap fake override in ShortenReferences
- Fake override prevents reference shortener from shortening of static
methods declared in the class bases when they are located not in
direct parent of the class (for example, in grand-
or grand-grand-parent)
- The completion uses descriptor with unwrapped fake override when it
performs the insertion. It leads to inserting the name of the base which
actually contains the static method instead of the direct parent class.
Now, when reference shortener compares unwrapped descriptors, this
problem should be fixed during insertion handling
2020-06-01 08:59:37 +00:00
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
Valentin Kipyatkov a8d737bf87 One more test for import nested classes setting 2015-04-13 13:41:43 +03:00
Alexey Sedunov d2e6aa2aa5 Allow to shorten class member references 2014-02-27 17:00:24 +04:00