From d7c3c84c7854f60fa9d20dd9eea4df32daaaadc7 Mon Sep 17 00:00:00 2001 From: Pavel Dolgov Date: Fri, 20 Jan 2017 13:17:24 +0300 Subject: [PATCH] Java: Edited documentation for "Unwrap 'else' branch" intention (IDEA-165428) --- .../UnwrapElseBranchAction/after.java.template | 10 ++++++---- .../UnwrapElseBranchAction/before.java.template | 12 +++++++----- .../UnwrapElseBranchAction/description.html | 3 ++- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/after.java.template b/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/after.java.template index e22f335eada3..3ee456bb9203 100644 --- a/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/after.java.template +++ b/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/after.java.template @@ -1,6 +1,8 @@ -void f(boolean b) { - if (b) { - System.out.println("When true"); +public class X { + void f(boolean b) { + if (b) { + System.out.println("When true"); + } + System.out.println("Otherwise"); } - System.out.println("Otherwise"); } \ No newline at end of file diff --git a/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/before.java.template b/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/before.java.template index e5566d292f52..f5c2118026e9 100644 --- a/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/before.java.template +++ b/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/before.java.template @@ -1,7 +1,9 @@ -void f(boolean b) { - if (b) { - System.out.println("When true"); - } else { - System.out.println("Otherwise"); +public class X { + void f(boolean b) { + if (b) { + System.out.println("When true"); + } else { + System.out.println("Otherwise"); + } } } \ No newline at end of file diff --git a/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/description.html b/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/description.html index 8975ddf056bd..0543c5b2eb70 100644 --- a/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/description.html +++ b/resources-en/src/intentionDescriptions/UnwrapElseBranchAction/description.html @@ -1,5 +1,6 @@ -This intention moves the code of the else branch after the if statement. +This intention moves the code of the else branch after the if statement.
+Note that it changes the code semantics.