Commit Graph

4134 Commits

Author SHA1 Message Date
Anna Kozlova
b0ccbdebcf exception inference: don't check non-applicable methods (IDEA-178762) 2017-09-12 21:05:35 +03:00
Tagir Valeev
6e87cb9bfd RefactoringUtil#ensureCodeBlock enhanced and used in Surround with try-catch
Fixes IDEA-178781 "Surround with try-catch" QuickFix for "Unhandled exception" in a field initializer
Enables stream-to-loop in field initializer
Fixes stream-to-loop in for initializer
Disables stream-to-loop in for update
2017-09-12 13:34:43 +07:00
Tagir Valeev
94a5fea51d IDEA-178774 Unroll loop intention action 2017-09-12 09:25:51 +07:00
Anna Kozlova
e129868d33 unused: search for main in inner classes (IDEA-178721) 2017-09-11 19:02:58 +03:00
Anna Kozlova
5fa4775cf1 unresolved qualifiers in ref expressions chain (follow IDEA-CR-24382) 2017-09-11 13:35:36 +03:00
Tagir Valeev
a2dfaa56dc SimplifyForEachInspection: compilation fix added for non-final var
Adds another alternative to IDEA-177104
2017-09-07 15:47:38 +07:00
Daniil Ovchinnikov
e08521fb91 [jvm-lang] update Java-to-Java Create Method from usage tests 2017-09-06 21:24:13 +03:00
Anna Kozlova
8032558bec highlighting: don't check static methods for unrelated inheritance (IDEA-178539)
in class case, static methods must have signatures with different erasures, for interfaces, static methods
2017-09-06 19:42:01 +03:00
Anna Kozlova
955a6160cd resolve references by qualified class name when qualifiers can't be resolved
javac ignores problems caused by files located in wrong directories, IDEA reports them: try to search class by FQName when failed to resolve normally (IDEA-178376; IDEA-176179)
2017-09-06 19:42:00 +03:00
Daniil Ovchinnikov
87fa214435 [java] add tests for "Create abstract method" 2017-09-06 19:02:21 +03:00
Daniil Ovchinnikov
dce477391d [jvm-lang] disable Create Field from Java method calls 2017-09-06 15:33:11 +03:00
Dmitry Batkovich
bb7ddafd90 Merge remote-tracking branch 'origin/master' 2017-09-06 11:10:17 +03:00
Dmitry Batkovich
2e90c5f426 Merge branch 'db/java-property-index' 2017-09-06 10:54:45 +03:00
Anna Kozlova
18d71a7378 make type parameter implements interface: don't insert any methods in code 2017-09-06 10:53:09 +03:00
Dmitry Batkovich
86829cac3e java property index 2017-09-06 10:40:47 +03:00
Daniil Ovchinnikov
e5cb361156 GuessTypeParameters: explicitly set type element to the expected type 2017-09-05 21:13:29 +03:00
Anna Kozlova
79b43cdbcd error if inner class of generic outer extends throwable (IDEA-178490) 2017-09-05 15:54:41 +03:00
Anna Kozlova
ed9b3db88f create local from usage: check containing code block (IDEA-178443) 2017-09-05 12:00:19 +03:00
Anna Kozlova
b23c6b026b can complete normally: break inside switch (IDEA-178304)
break inside switch when switch is selected should not lead to abnormal completion
2017-09-04 12:28:22 +03:00
Roman Shevchenko
dc4697fc32 [tests] test case for IDEA-177643 2017-09-01 20:04:17 +03:00
Roman Shevchenko
390f56aab0 Merge remote-tracking branch 'origin/master' 2017-09-01 15:11:05 +03:00
Roman Ivanov
9938f0d0e7 fix tests 2017-09-01 17:26:19 +07:00
Roman Ivanov
029b97749b extract simplify forEach inspection: IDEA-CR-24052 2017-09-01 17:26:19 +07:00
Roman Shevchenko
f1a2c0b8e1 Cleanup (sane testdata file name; formatting) 2017-09-01 13:01:53 +03:00
Roman Ivanov
c3b4d6f849 support return in forEach replacement 2017-09-01 12:37:18 +07:00
Roman Ivanov
5acdc9ccdc add tests 2017-09-01 12:07:23 +07:00
peter
ee3d96da1a IDEA-177895 Completion items with type casts derived from control flow are not suggested for 'this' 2017-08-31 17:39:08 +02:00
Anna Kozlova
90924b2043 align message according to javac (IDEA-178211) 2017-08-30 19:53:27 +03:00
Tagir Valeev
8e9216b907 Fix IDEA-178248 WrapWithAdapterMethodCallFix exception on unresolved code 2017-08-30 16:38:53 +07:00
Tagir Valeev
ca9fffa746 IDEA-178242 Extract Set from comparison chain: find duplicates within class 2017-08-30 14:29:54 +07:00
Tagir Valeev
d3e36561f4 IDEA-174813 Intention to replace multiple enum comparisons with EnumSet.contains()
ExtractSetFromComparisonChainAction enhanced to support enums and support == comparisons
2017-08-29 17:40:32 +07:00
Daniil Ovchinnikov
c7b4b47dc9 [jvm-lang] update Java-to-Java Create Field from usage tests 2017-08-28 13:33:38 +03:00
Tagir Valeev
02a917ed17 HighlightVisitorImpl: add standard quick-fixes for lambda return value 2017-08-28 17:30:01 +07:00
Tagir Valeev
791c182306 AdjustFunctionContextFix: suggest to change method accepting lambda/methodRef
Fixes cases 1, 2 from IDEA-174219 Add quick-fixes for incompilable Stream API call chains when using primitive streams
2017-08-28 14:55:00 +07:00
Tagir Valeev
661388f0c2 WrapWithAdapterMethodCallFix replaces individual cases
WrapArrayToArraysAsListFix, WrapLongWithMathToIntExactFix, WrapStringWithFileFix are united into WrapWithAdapterMethodCallFix. Also Paths.get(), Collections.singleton(), Collections.singletonList(), Arrays.stream() wrappers added

Fixes IDEA-175129 Suggest to wrap a value with `Collections.singleton*()`
2017-08-25 14:33:41 +07:00
Dmitry Batrak
758974a85a IDEA-177226 'Join lines' between two block comments works bad 2017-08-24 20:17:19 +03:00
Tagir Valeev
2e611b4917 StreamToLoopInspection: reuse variable of inexact type (IDEA-167414) 2017-08-24 15:25:19 +07:00
Roman Ivanov
aaee667ca7 add nested stream filter recognition 2017-08-24 11:35:17 +07:00
Tagir Valeev
6d7d4c9a53 ReplaceWithTernaryOperatorFix: method reference scenario as separate class
Review ID: IDEA-CR-23763
2017-08-23 15:06:04 +07:00
Anna.Kozlova
18c13320a2 since api: check annotation pairs (IDEA-177856) 2017-08-21 19:10:14 +02:00
Anna Kozlova
50ca349572 completion for <>: overloaded constructors (IDEA-177256)
provide arguments compatible with the first constructor to reduce cases where diamonds can't be applicable
2017-08-19 13:58:27 +02:00
Anna Kozlova
90148e6425 completion: don't ignore Object substitution (IDEA-177259) 2017-08-19 13:58:26 +02:00
Anna.Kozlova
07fa74c8b5 inference: restore captured wildcard from fresh type parameter (IDEA-165871; IDEA-176592)
register return type constrain replaces wildcard parametrization with fresh variables aka custom capture conversion. When the specification would deal with these fresh type parameters further, IDEA expects them like PsiCapturedWildcards. Let's restore captured wildcards when inference failed to add any new constraints for fresh variables but initial upper bound of captured wildcard
2017-08-18 19:07:17 +02:00
Tagir Valeev
009ceae493 IDEA-177602 'Move assignment to field declaration' doesn't work if rhs contains field reference 2017-08-18 12:23:33 +07:00
Maxim.Mossienko
21414754cd test for indexing anonymous class in libraries 2017-08-17 20:58:44 +02:00
Maxim.Mossienko
ea442fa7dd cleanup: avoid warning about config data changed after loading 2017-08-17 20:58:44 +02:00
Tagir Valeev
f73a5572c0 Fix IDEA-177647 Convert String to StringBuilder intention produces wrong code 2017-08-17 17:52:16 +07:00
Tagir Valeev
86874d0883 Fix IDEA-177668 "Replace stream chain with loop" exception on unresolved collection type 2017-08-17 16:36:34 +07:00
Roman Ivanov
ef335f6a88 fix codegen for natural order: IDEA-CR-23874 2017-08-17 16:13:48 +07:00
Roman Ivanov
f9f85c0832 improve codegen in simple case 2017-08-17 16:13:47 +07:00