|
16 | 16 |
|
17 | 17 | package com.jetbrains.python.impl.codeInsight.imports; |
18 | 18 |
|
19 | | -import jakarta.annotation.Nonnull; |
20 | | - |
21 | | -import consulo.language.editor.intention.HighPriorityAction; |
22 | | -import consulo.language.editor.intention.HintAction; |
| 19 | +import consulo.codeEditor.Editor; |
23 | 20 | import consulo.language.editor.inspection.LocalQuickFix; |
24 | 21 | import consulo.language.editor.inspection.ProblemDescriptor; |
25 | | -import consulo.codeEditor.Editor; |
26 | | -import consulo.project.Project; |
| 22 | +import consulo.language.editor.intention.HighPriorityAction; |
| 23 | +import consulo.language.editor.intention.HintAction; |
27 | 24 | import consulo.language.psi.PsiFile; |
28 | 25 | import consulo.language.util.IncorrectOperationException; |
| 26 | +import consulo.localize.LocalizeValue; |
| 27 | +import consulo.project.Project; |
| 28 | +import jakarta.annotation.Nonnull; |
29 | 29 |
|
30 | 30 | /** |
31 | 31 | * @author yole |
32 | 32 | */ |
33 | 33 | public class AutoImportHintAction implements LocalQuickFix, HintAction, HighPriorityAction { |
34 | | - private final AutoImportQuickFix myDelegate; |
35 | | - |
36 | | - public AutoImportHintAction(AutoImportQuickFix delegate) { |
37 | | - myDelegate = delegate; |
38 | | - } |
| 34 | + private final AutoImportQuickFix myDelegate; |
39 | 35 |
|
40 | | - @Override |
41 | | - public boolean showHint(@Nonnull Editor editor) { |
42 | | - return myDelegate.showHint(editor); |
43 | | - } |
| 36 | + public AutoImportHintAction(AutoImportQuickFix delegate) { |
| 37 | + myDelegate = delegate; |
| 38 | + } |
44 | 39 |
|
45 | | - @Nonnull |
46 | | - @Override |
47 | | - public String getText() { |
48 | | - return myDelegate.getText(); |
49 | | - } |
| 40 | + @Override |
| 41 | + public boolean showHint(@Nonnull Editor editor) { |
| 42 | + return myDelegate.showHint(editor); |
| 43 | + } |
50 | 44 |
|
51 | | - @Override |
52 | | - public boolean isAvailable(@Nonnull Project project, Editor editor, PsiFile file) { |
53 | | - return myDelegate.isAvailable(); |
54 | | - } |
| 45 | + @Nonnull |
| 46 | + @Override |
| 47 | + public LocalizeValue getText() { |
| 48 | + return myDelegate.getText(); |
| 49 | + } |
55 | 50 |
|
56 | | - @Override |
57 | | - public void invoke(@Nonnull Project project, Editor editor, PsiFile file) throws IncorrectOperationException |
58 | | - { |
59 | | - myDelegate.invoke(file); |
60 | | - } |
| 51 | + @Override |
| 52 | + public boolean isAvailable(@Nonnull Project project, Editor editor, PsiFile file) { |
| 53 | + return myDelegate.isAvailable(); |
| 54 | + } |
61 | 55 |
|
62 | | - @Override |
63 | | - public boolean startInWriteAction() { |
64 | | - return false; |
65 | | - } |
| 56 | + @Override |
| 57 | + public void invoke(@Nonnull Project project, Editor editor, PsiFile file) throws IncorrectOperationException { |
| 58 | + myDelegate.invoke(file); |
| 59 | + } |
66 | 60 |
|
67 | | - @Nonnull |
68 | | - @Override |
69 | | - public String getName() { |
70 | | - return myDelegate.getName(); |
71 | | - } |
| 61 | + @Override |
| 62 | + public boolean startInWriteAction() { |
| 63 | + return false; |
| 64 | + } |
72 | 65 |
|
73 | | - @Nonnull |
74 | | - @Override |
75 | | - public String getFamilyName() { |
76 | | - return myDelegate.getFamilyName(); |
77 | | - } |
| 66 | + @Nonnull |
| 67 | + @Override |
| 68 | + public LocalizeValue getName() { |
| 69 | + return myDelegate.getName(); |
| 70 | + } |
78 | 71 |
|
79 | | - @Override |
80 | | - public void applyFix(@Nonnull Project project, @Nonnull ProblemDescriptor descriptor) { |
81 | | - myDelegate.applyFix(project, descriptor); |
82 | | - } |
| 72 | + @Override |
| 73 | + public void applyFix(@Nonnull Project project, @Nonnull ProblemDescriptor descriptor) { |
| 74 | + myDelegate.applyFix(project, descriptor); |
| 75 | + } |
83 | 76 | } |
0 commit comments