Commit Graph

36 Commits

Author SHA1 Message Date
Tagir Valeev
9c6aeba5b4 [java] More tests for preview; minor fixes
GitOrigin-RevId: 7f72c5f68ab821e728eb0d5152f0910f48035046
2022-07-22 11:54:00 +00:00
Ilyas Selimov
b014f71140 IDEA-290391 - quickfix for qualified enum constants inside switch + static import fix is available for enhanced switch
GitOrigin-RevId: dca0a0918832a1814473886f45edc31e8fa3e6f7
2022-03-30 15:23:11 +00:00
Peter Gromov
457c7b42b6 java: disable AddOnDemandStaticImportAction on broken code where it'd break stub-text consistency otherwise
GitOrigin-RevId: 705892a1471eff7797a1fe2abfcbd320849dd76e
2020-08-03 13:00:08 +00:00
Bas Leijdekkers
311f965f20 on demand static import -> on-demand static import (IDEA-221475)
GitOrigin-RevId: 3cdbe9a8fbad5b785934f8f6280e4140cb8aa75c
2019-10-03 16:04:14 +00:00
Anna.Kozlova
7cd6f23717 disable on-demand static import inside import statements (IDEA-196022) 2018-07-26 13:50:13 +02:00
peter
9a96704d9a "add on demand static import": avoid stub/text inconsistency on unnamed references 2018-05-23 18:07:58 +02:00
Anna.Kozlova
10e023e75e disable on-demand static import for non-static members (IDEA-191774) 2018-05-15 15:33:42 +02:00
Tagir Valeev
43b86a988e CodeEditUtil#removeChildren: fixed nextLeaf determination
Before when removing more than one element, nextLeaf was invalid as well. The invalidation check below did not work as parent might still exist (element might be relinked to dummy file)

Fixes IDEA-187531 "Add on demand static import" with intervening comment and an empty line breaks code
2018-03-03 15:47:21 +07:00
Tagir Valeev
aa89c3b6fa CommentTracker: do not add a comment as a first child of PsiElement
Fixes IDEA-187526 "Add static import" with an intervening comment leads to exception
2018-03-02 16:22:19 +07:00
Anna.Kozlova
8703c07861 disable add on demand static import for method reference qualifiers
IDEA-186826
2018-02-16 16:01:55 +01:00
Tagir Valeev
4be91bbc65 Fixed imports in testdata. 2018-02-04 17:21:33 +07:00
Tagir Valeev
5bfb15ec8c CommentTracker: do not add comments at the beginning of reference qualifier: add it to the parent element instead 2018-02-04 16:34:23 +07:00
Tagir Valeev
b3a46c4960 AddOnDemandStaticImport: test-case with nested calls and comments
Review ID: IDEA-CR-28752
2018-01-25 16:33:34 +07:00
Tagir Valeev
eeb1483ed0 AddOnDemandStaticImportAction: handle comments 2018-01-25 12:05:05 +07:00
peter
6c171f8e54 fix yet another PSI internals exception while updating "add on demand static import" intention 2017-07-22 08:08:18 +02:00
peter
82ae0d4e0b disable "add on demand static import" on invalid code 2017-07-17 15:50:33 +02:00
Anna Kozlova
4311ffcd29 add on demand static import: proceed with type arguments (IDEA-174965)
otherwise unused imports could be inserted and the references won't be collapsed inside <>
2017-06-26 16:11:56 +03:00
Anna Kozlova
b6482f44a1 add static import: use existing import name (IDEA-174647) 2017-06-20 11:32:03 +03:00
Anna Kozlova
9132043620 add single static import: allow second single static import if it doesn't produce ambiguity or hiding of on-demand import (IDEA-155031) 2016-06-07 10:57:34 +03:00
Anna.Kozlova
b5e7d766a1 add static import: remove qualifier in case of inheritance (IDEA-155419) 2016-05-12 21:06:35 +02:00
Yaroslav Lepenkin
6731485cb8 Reformat with context on postponed formatting: fixed java test data 2015-07-07 17:24:09 +03:00
Anna Kozlova
d5ee2ec744 testdata fixed 2014-05-26 22:21:20 +04:00
Bas Leijdekkers
54fccb5efd IDEA-121828 (Add single member static import intention should be available on incomplete code) 2014-03-07 16:54:19 +01:00
Bas Leijdekkers
6d2515cf2f fix IDEA-112499 for single member static imports 2014-03-07 16:54:18 +01:00
Bas Leijdekkers
811fdf58e0 fix IDEA-112499 for on demand imports 2014-03-07 16:54:18 +01:00
Bas Leijdekkers
b52ec5f33f IDEA-121784 (Add on demand static import intention not available when single-member static import present) 2014-03-07 16:54:17 +01:00
Bas Leijdekkers
557cca9d2d IDEA-108072 (Don't suggest to add on-demand static import for the current class) 2014-03-06 19:16:12 +01:00
anna
ada232f63e ignore static imports for method references (IDEA-92590) 2012-10-08 19:21:59 +02:00
anna
c0a54042f2 disable on demand static import for private classes (IDEA-74951) 2011-11-23 14:11:30 +01:00
anna
df6d79ce8a add single static import on type elements, e.g. inside annotations, type elements (IDEA-22130) 2011-08-26 13:34:31 +02:00
anna
6794da37dd add single static import: check method base class beforehand (IDEA-12607 ) 2011-08-26 13:34:30 +02:00
anna
6f31251be4 disable add single static import when on demand exists (IDEA-62321) 2011-08-24 12:06:00 +02:00
anna
e62afe784d add on demand imports for code references, e.g. allow to collapse nested class creation (IDEA-65357 ) 2011-06-15 15:36:56 +04:00
anna
81a7191b28 add single member static import: do not remove qualifier when members with the same name exist in the hierarchy 2011-06-07 15:03:49 +04:00
anna
d335d09f46 allow on demand static import over non resolved method (IDEA-68936) 2011-06-07 15:03:49 +04:00
Alexey Kudravtsev
2718da9fc7 more java tests moved to community 2010-06-25 12:46:40 +04:00