mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-69459 Flex: show suggestion "Create method" on Alt+Enter for "(A as B).method()" casting
This commit is contained in:
+10
-4
@@ -23,6 +23,7 @@ import com.intellij.lang.Commenter;
|
||||
import com.intellij.lang.LanguageCommenters;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -61,7 +62,7 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase
|
||||
final String relativePath = quickFixTestCase.getBasePath() + "/" + BEFORE_PREFIX + testName;
|
||||
final String testFullPath = quickFixTestCase.getTestDataPath().replace(File.separatorChar, '/') + relativePath;
|
||||
final File testFile = new File(testFullPath);
|
||||
CommandProcessor.getInstance().executeCommand(getProject(), new Runnable() {
|
||||
CommandProcessor.getInstance().executeCommand(quickFixTestCase.getProject(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
@@ -263,17 +264,22 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase
|
||||
|
||||
@Override
|
||||
public void configureFromFileText(String name, String contents) throws IOException {
|
||||
LightCodeInsightTestCase.configureFromFileText(name, contents);
|
||||
LightQuickFixTestCase.configureFromFileText(name, contents);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiFile getFile() {
|
||||
return LightCodeInsightTestCase.getFile();
|
||||
return LightQuickFixTestCase.getFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Project getProject() {
|
||||
return LightQuickFixTestCase.getProject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bringRealEditorBack() {
|
||||
LightCodeInsightTestCase.bringRealEditorBack();
|
||||
LightQuickFixTestCase.bringRealEditorBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.psi.PsiFile;
|
||||
|
||||
@@ -57,4 +58,6 @@ public interface QuickFixTestCase {
|
||||
void configureFromFileText(String name, String contents) throws Throwable;
|
||||
|
||||
PsiFile getFile();
|
||||
|
||||
Project getProject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user