mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-88299 Copy line location (reference to the line)
This commit is contained in:
+13
-1
@@ -6,7 +6,8 @@ import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
|
||||
public class CopyReferenceTest extends LightCodeInsightFixtureTestCase {
|
||||
@NonNls private static final String BASE_PATH = "/codeInsight/copyReference";
|
||||
@@ -48,6 +49,17 @@ public class CopyReferenceTest extends LightCodeInsightFixtureTestCase {
|
||||
myFixture.checkResultByFile(name + "_after.java");
|
||||
}
|
||||
|
||||
public void testCopyLineNumber() {
|
||||
myFixture.configureByText 'a.java', '''
|
||||
<caret>class Foo {
|
||||
}'''
|
||||
def path = FileUtil.toSystemDependentName(myFixture.file.virtualFile.path)
|
||||
performCopy()
|
||||
myFixture.configureByText 'a.txt', ''
|
||||
performPaste()
|
||||
myFixture.checkResult "$path:2"
|
||||
}
|
||||
|
||||
private void doTest() throws Exception {
|
||||
String name = getTestName(false);
|
||||
myFixture.configureByFile(name + ".java");
|
||||
Reference in New Issue
Block a user