IDEA-69459 Flex: show suggestion "Create method" on Alt+Enter for "(A as B).method()" casting

This commit is contained in:
Maxim.Mossienko
2011-05-12 12:08:27 +04:00
parent 30fc60f43c
commit 3244f117ef
2 changed files with 13 additions and 4 deletions
@@ -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();
}