mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
35 lines
1.4 KiB
Java
35 lines
1.4 KiB
Java
package com.intellij.codeInsight;
|
|
|
|
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.openapi.editor.ex.DocumentEx;
|
|
import com.intellij.testFramework.PlatformTestCase;
|
|
|
|
/**
|
|
* @author mike
|
|
*/
|
|
@PlatformTestCase.WrapInCommand
|
|
public class GenerateJavadocTest extends CodeInsightTestCase {
|
|
public void test1() throws Exception { doTest(); }
|
|
public void test2() throws Exception { doTest(); }
|
|
public void test3() throws Exception { doTest(); }
|
|
public void testIdeadev2328() throws Exception { doTest(); }
|
|
public void testIdeadev2328_2() throws Exception { doTest(); }
|
|
|
|
private void doTest() throws Exception {
|
|
String name = getTestName(false);
|
|
configureByFile("/codeInsight/generateJavadoc/before" + name + ".java");
|
|
performAction();
|
|
checkResultByFile("/codeInsight/generateJavadoc/after" + name + ".java", true);
|
|
}
|
|
|
|
private void performAction() {
|
|
EditorActionManager actionManager = EditorActionManager.getInstance();
|
|
EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_ENTER);
|
|
actionHandler.execute(myEditor, DataManager.getInstance().getDataContext());
|
|
((DocumentEx)myEditor.getDocument()).stripTrailingSpaces(false);
|
|
}
|
|
}
|