convert to local: restore comments once (IDEA-192268ˆ)

This commit is contained in:
Anna Kozlova
2018-05-18 20:16:28 +03:00
parent 2fa2c62140
commit e524d46129
3 changed files with 6 additions and 2 deletions
@@ -121,8 +121,6 @@ public class FieldCanBeLocalInspection extends FieldCanBeLocalInspectionBase {
@Override
protected void beforeDelete(@NotNull Project project, @NotNull PsiField variable, @NotNull PsiElement newDeclaration) {
final PsiDocComment docComment = variable.getDocComment();
if (docComment != null) moveDocCommentToDeclaration(project, docComment, newDeclaration);
}
@NotNull
@@ -3,6 +3,9 @@ class TestFieldConversion
{
public void someMethod(int s) {
/**
* doc1
*/
int someInt = 0;
switch (s) {
case 1:
@@ -1,6 +1,9 @@
// "Convert to local" "true"
class TestFieldConversion
{
/**
* doc1
*/
private int som<caret>eInt = 0;
public void someMethod(int s) {