Commit Graph
104 Commits
Author SHA1 Message Date
Anna.Kozlova 78b9442d20 extract method: sanitize parameter types (IDEA-166319) 2017-01-09 18:15:16 +01:00
Anna.Kozlova cbc1dadaae fix testdata 2016-12-29 10:43:30 +01:00
Anna.Kozlova 17f92bdc32 extract method: don't mark final if used in anonymous but effectively final in java 8 (IDEA-165642) 2016-12-19 19:17:24 +01:00
Anna.Kozlova d3134b026b extract method: don't skip variables used in left side of assignments (IDEA-165386) 2016-12-13 17:46:28 +01:00
Bas Leijdekkers cbab61f15b fix annotation matching in duplicates finder 2016-11-21 17:09:15 +01:00
Anna Kozlova de96e70e27 extract method: fix complete normally custom check (IDEA-161592) 2016-09-23 19:22:20 +03:00
Yaroslav Lepenkin b7a5f1eceb [Extract Method] generate method with newline between braces, since otherwise with enabled "Keep simple methods in one line" formatter will keep extracted method in one line 2016-09-16 14:00:00 +03:00
Pavel Dolgov 1a3605e4cb Java control flow: Don't allow extracting method if there's a potential side effect on the local variables in the case of exception thrown (IDEA-79444, IDEA-159916) 2016-08-24 15:24:43 +03:00
Anna Kozlova 16cbb8b787 extract method with folded parameter: resolve names conflict (IDEA-156943) 2016-08-15 20:17:11 +03:00
Alexey Kudravtsev db48c64473 use mockJdk18 by default in LightCodeInsightTestCase; remove dependency on swing/net classes in some tests 2016-07-20 15:47:18 +03:00
Bas Leijdekkers 78b84acd0f consider local variables with or without final modifier equal in duplicates finder 2016-06-23 14:51:18 +02:00
Anna Kozlova a664f8b8d6 extract method: ensure call arguments are not changed during body substitution 2016-06-20 10:29:14 +03:00
Anna Kozlova b88bc552ec extract method: ensure folded replacement uses correct names, ensure invalid elements are skipped (IDEA-157519) 2016-06-16 16:20:44 +03:00
Bas Leijdekkers 3894dc0f7a IDEA-130024 (False warning 'if statement with identical branches') 2016-06-15 19:00:19 +03:00
Bas Leijdekkers cbabaaa0c0 detect more duplicates 2016-06-14 10:20:39 +03:00
Anna Kozlova c831b8cd3c extract method: disable folding if array is used for writing (IDEA-156818) 2016-05-30 20:01:09 +03:00
Anna.Kozlova 9b9a8d4051 extract method: shorten qualified names for new return type (IDEA-155518) 2016-05-04 13:47:03 +02:00
Anna.Kozlova b7eddbbbc3 extract method: fold parameters after array acces was detected (IDEA-155094) 2016-04-22 19:31:27 +02:00
Anna.Kozlova 1a9c4c2f19 extract method: when context was changed ensure that static method is not qualified with this 2016-04-13 21:11:02 +02:00
Anna.Kozlova 1e754b5579 extract method: strip this/super from field qualifiers when method was made static (IDEA-153692) 2016-04-01 11:38:39 +02:00
Anna Kozlova 5673683e95 extract method suggester: unique parameter names (IDEA-152334); update output variables when suggester replaces the initial method 2016-03-01 15:22:35 +01:00
Anna Kozlova cc02620e6d extract method: don't include predefined 0 into exit points when try/finally is processed (IDEA-146332) 2015-10-14 11:12:33 +02:00
Anna Kozlova db53e6d20b extract method: stop at lambda body during exceptions collecting (IDEA-144938) 2015-09-09 19:24:30 +03:00
Anna Kozlova 87e70fa5cb replace duplicates on extract method with signature change: use folded values if present (IDEA-143613) 2015-08-14 19:37:45 +02:00
Anna Kozlova c7dfe22f31 extract method: enable duplicates inside inner classes called methods from outer (IDEA-143504) 2015-08-11 06:43:04 -07:00
Anna Kozlova 4684772197 extract method: include method prams when extracting from lambda body (IDEA-142163) 2015-07-02 17:13:33 +03:00
Anna Kozlova f2cddf7201 extract method: don't skip vars from the exit statements if nullable checks would be added (IDEA-141562) 2015-06-17 20:12:16 +03:00
Anna Kozlova b044c4fcee extract method: do not pass redundant parameters if extracting from lambda body (IDEA-139292) 2015-04-16 20:30:35 +02:00
Anna Kozlova be5e054e6a extract method params suggester: cleanup initial params if they are not used anymore 2015-03-18 17:46:02 +01:00
Anna Kozlova 5435a357c6 extract method: check duplicates/used vars also in unreachable code
(cherry picked from commit 42249fe8f0cead1a0023aa9edfb23fc52a95c268)
2015-03-11 20:33:25 +01:00
Anna Kozlova 3251ee29da extract method with last declaration statement fixed (EA-64510 - IOE: PsiJavaCodeReferenceElementImpl.cannotBindError) 2015-02-25 20:34:37 +01:00
Anna Kozlova 6482dfe733 do not return lambda parameter type as denotable in RefactoringUtil (IDEA-136617) 2015-02-17 14:58:56 +01:00
Anna Kozlova fb9a5e8ff7 extract method parameters suggester: change method copy context so calls inside method body could be resolved (aClass..getTypeParameterList() passed inside MethodElement.copyElement && aClass.processDeclarations implementations together cause that method calls to same class members can't be resolved); teach DuplicatesFinder to work on non-physical elements with correct context 2015-01-12 21:13:33 +01:00
Anna Kozlova 5ecb541855 extract method: skip parenthesis as they are skipped by control flow (IDEA-134904) 2015-01-02 12:05:47 +01:00
Anna Kozlova afc3e23260 extract method: disable make static when extracting from default method; ensure static extracting from constant in interface (IDEA-134636) 2014-12-23 11:42:42 +01:00
Anna Kozlova fc4434d241 extract method: use target class context to check nullability 2014-12-09 17:06:19 +01:00
Anna Kozlova 5a5ed0fe42 extract method: allow to fold parameters if calls to fields are involved 2014-12-08 16:19:28 +01:00
Anna Kozlova f7316391ce extract method: exclude return statements without value from occurrence analyzing; do not suggest artificial return type if return statements break control flow 2014-12-05 19:21:40 +01:00
Anna Kozlova 72529af659 extract method: suggest Object as return value if extract from incomplete expression (IDEA-69722) 2014-12-05 17:35:39 +01:00
Anna Kozlova ea292f0319 extract method: new signature detector: add unused parameters to method calls as refs to initial vars 2014-12-05 17:35:36 +01:00
Anna Kozlova 5e2fa7be19 extract method: new signature detector (IDEA-66281); initial 2014-12-05 13:48:57 +01:00
Anna Kozlova 37841f9d73 extract method: resolve conflicts during params rename (IDEABKL-3749) 2014-12-05 13:48:55 +01:00
Anna Kozlova e2e8384516 extract method: suggest non-void return type if final field is assigned inside (IDEA-93737) 2014-12-04 13:43:01 +01:00
Anna Kozlova e13047d703 extract method: suggest return type by unique variable defined in extracted code (IDEA-108296) 2014-12-04 10:57:19 +01:00
Anna Kozlova c460d82d7c extract method: allow to extract from fragment with different exit points which all are @NotNull 2014-12-03 17:26:32 +01:00
Anna Kozlova 460771192f extract method: make static and pass fields as parameters if possible (IDEA-112230) 2014-12-03 14:27:46 +01:00
Anna Kozlova c6110f2cfa extract method: allow to choose return type from hierarchy (IDEA-79995) 2014-12-02 19:34:40 +01:00
Anna Kozlova d168336f86 testdata for (IDEA-108664) 2014-12-02 16:43:57 +01:00
Anna Kozlova f50575a468 extract method: suggested names for folded params should be unique (IDEA-120974) 2014-12-01 20:54:14 +01:00
Anna Kozlova 4ea62b333e extract method: copy parameters annotations to the extracted method when applicable (IDEA-40617) 2014-12-01 20:54:13 +01:00