temp revert usage of new API to make sure the Python plugin compiles against EAP 128.18

This commit is contained in:
Dmitry Jemerov
2013-02-28 14:02:58 +01:00
parent d5aac1eff8
commit 53abb4e61a
2 changed files with 9 additions and 6 deletions
@@ -44,10 +44,12 @@ public class AddIgnoredIdentifierQuickFix implements LocalQuickFix, LowPriorityA
@Override
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
final PsiElement context = descriptor.getPsiElement();
InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile();
profile.modifyToolSettings(PyUnresolvedReferencesInspection.SHORT_NAME_KEY, context, new Consumer<PyUnresolvedReferencesInspection>() {
InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile(context);
profile.modifyProfile(new Consumer<ModifiableModel>() {
@Override
public void consume(PyUnresolvedReferencesInspection inspection) {
public void consume(ModifiableModel model) {
PyUnresolvedReferencesInspection inspection =
(PyUnresolvedReferencesInspection)model.getUnwrappedTool(PyUnresolvedReferencesInspection.class.getSimpleName(), context);
String name = myIdentifier.toString();
if (myIgnoreAllAttributes) {
name += END_WILDCARD;
@@ -4,6 +4,7 @@ import com.intellij.codeHighlighting.HighlightDisplayLevel;
import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.codeInspection.InspectionProfile;
import com.intellij.codeInspection.ModifiableModel;
import com.intellij.codeInspection.ex.CustomEditInspectionToolsSettingsAction;
import com.intellij.execution.process.ProcessOutput;
import com.intellij.lang.annotation.Annotation;
@@ -233,10 +234,10 @@ public class Pep8ExternalAnnotator extends ExternalAnnotator<Pep8ExternalAnnotat
@Override
public void invoke(@NotNull Project project, Editor editor, final PsiFile file) throws IncorrectOperationException {
InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile();
profile.modifyToolSettings(PyPep8Inspection.KEY, file, new Consumer<PyPep8Inspection>() {
InspectionProjectProfileManager.getInstance(project).getInspectionProfile(file).modifyProfile(new Consumer<ModifiableModel>() {
@Override
public void consume(PyPep8Inspection tool) {
public void consume(ModifiableModel model) {
PyPep8Inspection tool = (PyPep8Inspection)model.getUnwrappedTool(PyPep8Inspection.INSPECTION_SHORT_NAME, file);
tool.ignoredErrors.add(myCode);
}
});