Combines two or more neighboring conditionals with identical bodies into a single conditional statement and vice versa. This Refactoring allows you to switch between nested or cascading conditionals and the single conditional with the complex logical expression where each condition is combined with others by the logical AND (&&) or OR (||) operation respectively.
The Combine Conditionals Refactoring is available in the following cases.
The Split Conditional Refactoring is available when the caret is on an if keyword provided that the conditional expression is a complex logical expression where each condition is combined with others by the logical AND (&&) or OR (||) operation.
Place the caret on the if keyword of any of the identical conditions.
The blinking cursor shows the caret's position at which the Refactoring is available.
After execution, the Refactoring combines the conditions into one using the logical OR operation.