mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-85100 Deleting wrapped lines with Ctrl+Y doen't work properly with "soft wrapped" lines
More tests have been checked and added
This commit is contained in:
+1
-3
@@ -36,9 +36,7 @@ import javax.swing.border.Border;
|
||||
import java.awt.*;
|
||||
|
||||
/** Routines to handle field attributes not covered by CommonAttributes. */
|
||||
public final class FieldAttributes
|
||||
extends ItemAttributes
|
||||
{
|
||||
public final class FieldAttributes extends ItemAttributes {
|
||||
|
||||
// ------------------------------ FIELDS ------------------------------
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ package com.wrq.rearranger;
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
|
||||
import com.wrq.rearranger.settings.RearrangerSettings
|
||||
import com.wrq.rearranger.settings.attributeGroups.ClassAttributes
|
||||
import com.wrq.rearranger.settings.attributeGroups.FieldAttributes
|
||||
import com.wrq.rearranger.settings.attributeGroups.MethodAttributes
|
||||
import org.jetbrains.annotations.NotNull
|
||||
@@ -82,33 +83,23 @@ class RearrangerTest extends LightCodeInsightFixtureTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
// public final void testClassRearrangement() throws Exception {
|
||||
// configureByFile("/com/wrq/rearranger/RearrangementTest.java");
|
||||
// final PsiFile file = getFile();
|
||||
// final Document doc = PsiDocumentManager.getInstance(getProject()).getDocument(file);
|
||||
// final ClassAttributes ca = new ClassAttributes();
|
||||
// ca.getPlAttr().setPlPackage(true);
|
||||
// rs.addClass(ca, 0);
|
||||
// final RearrangerActionHandler rah = new RearrangerActionHandler();
|
||||
// rah.rearrangeDocument(getProject(), file, rs, doc);
|
||||
// super.checkResultByFile("/com/wrq/rearranger/RearrangementResult5.java");
|
||||
// }
|
||||
//
|
||||
// public final void testPSFRearrangement() throws Exception {
|
||||
// configureByFile("/com/wrq/rearranger/RearrangementTest2.java");
|
||||
// final PsiFile file = getFile();
|
||||
// final Document doc = PsiDocumentManager.getInstance(getProject()).getDocument(file);
|
||||
// final FieldAttributes fa;
|
||||
// fa = new FieldAttributes();
|
||||
// fa.getPlAttr().setPlPublic(true);
|
||||
// fa.getfAttr().setValue(true);
|
||||
// fa.getStAttr().setValue(true);
|
||||
// rs.addItem(fa, 0);
|
||||
// final RearrangerActionHandler rah = new RearrangerActionHandler();
|
||||
// rah.rearrangeDocument(getProject(), file, rs, doc);
|
||||
// super.checkResultByFile("/com/wrq/rearranger/RearrangementResult6.java");
|
||||
// }
|
||||
//
|
||||
public final void testClassRearrangement() throws Exception {
|
||||
doTest('RearrangementTest', 'RearrangementResult5') {
|
||||
def attributes = new ClassAttributes()
|
||||
attributes.protectionLevelAttributes.plPackage = true
|
||||
mySettings.addClass(attributes, 0)
|
||||
}
|
||||
}
|
||||
|
||||
public final void testPSFRearrangement() throws Exception {
|
||||
doTest('RearrangementTest2', 'RearrangementResult6') {
|
||||
def attributes = new FieldAttributes()
|
||||
attributes.finalAttribute.value = true
|
||||
attributes.staticAttribute.value = true
|
||||
mySettings.addItem(attributes, 0)
|
||||
}
|
||||
}
|
||||
|
||||
// public final void testAnonClassInit() throws Exception {
|
||||
// configureByFile("/com/wrq/rearranger/RearrangementTest7.java");
|
||||
// final PsiFile file = getFile();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
public class Test {
|
||||
public static final String sillyField = "";
|
||||
public static final String sillyField2 = "";
|
||||
private String wibble;
|
||||
protected String wobble;
|
||||
public String hitandmiss;
|
||||
private String wibble;
|
||||
protected String wobble;
|
||||
public String hitandmiss;
|
||||
public static int hithere;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
public class Test {
|
||||
private String wibble;
|
||||
protected String wobble;
|
||||
public static final String sillyField = "";
|
||||
public String hitandmiss;
|
||||
public static final String sillyField = "";
|
||||
public String hitandmiss;
|
||||
public static int hithere;
|
||||
public static final String sillyField2 = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user