mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
33 lines
1.2 KiB
Java
33 lines
1.2 KiB
Java
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
|
package com.intellij.codeInsight;
|
|
|
|
import com.intellij.JavaTestUtil;
|
|
import com.intellij.ide.DataManager;
|
|
import com.intellij.openapi.actionSystem.IdeActions;
|
|
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
|
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
|
|
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public class JavaSplitLineActionTest extends LightPlatformCodeInsightTestCase {
|
|
@Override
|
|
protected @NotNull String getTestDataPath() {
|
|
return JavaTestUtil.getJavaTestDataPath();
|
|
}
|
|
|
|
public void testMethodCall() {
|
|
String path = "/codeInsight/splitLineAction/";
|
|
|
|
configureByFile(path + "methodCall_before.java");
|
|
performAction();
|
|
checkResultByFile(path + "methodCall_after.java");
|
|
}
|
|
|
|
private void performAction() {
|
|
EditorActionManager actionManager = EditorActionManager.getInstance();
|
|
EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_SPLIT);
|
|
|
|
actionHandler.execute(getEditor(), null, DataManager.getInstance().getDataContext());
|
|
}
|
|
}
|