Commit Graph
37 Commits
Author SHA1 Message Date
Anna.Kozlova b6f6bae31a invert if: ensure outer if becomes braces when nested if has no else brunch (IDEA-206882) 2019-02-07 16:49:03 +01:00
Anna.Kozlova cc6b79a309 preserve comments: invert if (IDEA-205835) 2019-01-22 18:48:18 +01:00
Anna.Kozlova 8a6f1cb404 invert if: don't reformat when if was removed completely 2019-01-04 10:15:31 +01:00
Anna.Kozlova 338f87ab95 invert if: don't include single rBrace in block
found by property testing
2018-11-09 13:51:51 +01:00
Anna.Kozlova 4831eed1ce preserve comments: invert if with comment after then branch 2018-10-10 18:18:09 +02:00
Anna.Kozlova 4f4012fecf preserve comments: invert if in case when else branch become empty 2018-10-10 18:18:09 +02:00
Tagir Valeev c09250da45 CommentTracker#replaceAndRestoreComments: try to keep comments after the statement (not move them to the front) 2018-10-08 14:09:24 +07:00
Anna Kozlova 3634a7117c invert if: avoid duplicated comments (IDEA-197988) 2018-08-28 14:30:55 +03:00
Anna Kozlova d0862e4163 invert if: don't leave trailing continue stmts (IDEA-197986) 2018-08-28 14:30:55 +03:00
Anna.Kozlova d7e2efc0c0 invert if: fix parent ifStatement (IDEA-191327) 2018-07-10 16:49:02 +02:00
Roman.Ivanov 5076e08145 set SPACE_BEFORE_COLON_IN_FOREACH true by default, fix tests 2018-06-26 12:04:00 +07:00
Pavel Dolgov cac4bf41ff Java: Don't offer "Invert If Condition" if the code structure is broken (IDEA-177291) 2018-06-07 15:22:27 +03:00
Roman.Ivanov 5858ba478c fix tests for foreach formatting 2018-06-05 11:31:17 +07:00
Anna Kozlova 6c127367b9 fix psi invalidation on invert if condition (IDEA-192532) 2018-05-24 15:29:41 +03:00
Tagir Valeev 5a4f85ff35 CommentTracker#makeRangeUnchanged; more comment fixes for InvertIfCondition 2018-03-15 12:38:58 +07:00
Tagir Valeev adf14b7ded InvertIfConditionAction: better comment handling 2018-03-12 15:55:14 +07:00
Bas Leijdekkers a4a30a9c0c don't drop comment inside condition on inverting if 2018-02-04 23:32:20 +01:00
Anna Kozlova 0ebca9cff2 invert if: check precedence and keep parenthesis accordingly (IDEA-175062)
replace duplicated negation utility
2018-01-03 14:18:52 +01:00
Anna.Kozlova 0bd1694079 preserve comments in invert if (IDEA-182500) 2017-11-22 19:42:58 +01:00
Tagir Valeev e7d2193a56 InvertIfConditionAction: preserve comments after last statement
Fixes IDEA-153371 invert 'if' condition deletes comment lines
2017-09-29 15:20:51 +07:00
peter adbd75d086 disable "invert if condition" on invalid negation 2017-07-12 16:50:37 +02:00
Anna.Kozlova 8bd81c1d4c invert if: don't insert continue outside while loop (IDEA-175283) 2017-07-03 16:53:16 +02:00
Anna Kozlova 9e12271bd3 invert if: fix psi replacement (IDEA-174966) 2017-06-26 17:07:29 +03:00
Tagir Valeev 3da23def83 InvertIfCondition: some fixes for non-compilable code 2017-04-10 12:09:51 +07:00
Anna.Kozlova 02d25ac5f6 invert if: pass context to resolve to correct inner/local class (IDEA-169396) 2017-03-15 20:07:06 +01:00
Pavel Dolgov 1b5600e2c4 Java: Fixed the intention "Invert 'if' condition" in the case of nested 'if' without braces (IDEA-167957) 2017-02-20 14:36:31 +03:00
Anna Kozlova b2b09c29ee preserve comments on invert if (IDEA-159847) 2016-08-15 21:36:41 +03:00
Bas Leijdekkers facac1bd48 fix invert if followed by break bugs (IDEA-38798 & IDEA-112313) 2015-02-02 19:38:41 +01:00
Bas Leijdekkers 7f73e1895d don't insert unneeded parentheses on "invert if" 2015-01-27 08:53:27 +01:00
Dmitry Avdeev d304ec4ede Invert 'if': sentence capitalization 2014-12-06 10:57:22 +03:00
Anna Kozlova ba0cba456e invert if: stop at lambda level (IDEA-133023) 2014-11-17 20:14:42 +01:00
Anna Kozlova 35b276b733 invert if: preserve parenthesis when not safe to delete (IDEA-107783) 2013-05-24 16:57:26 +04:00
anna 1b33b6b621 invert if: do not forget continue; if if is not the "last statement" (IDEA-19457) 2013-05-08 18:35:11 +02:00
anna 9a66dcbd8c invert condition: wrap with parenthesis according to precedence order (IDEA-98952) 2013-01-15 12:49:03 +01:00
anna 9010b36338 invert if: do not skip returns as they may contain valuable info (IDEA-61892) 2010-12-22 22:25:20 +03:00
Roman Shevchenko f91d736dd4 Java parser switched to new version 2010-10-20 15:30:45 +04:00
Alexey Kudravtsev 2718da9fc7 more java tests moved to community 2010-06-25 12:46:40 +04:00