mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
temp revert usage of new API to make sure the Python plugin compiles against EAP 128.18
This commit is contained in:
+5
-3
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user