reuse PyBundle.BUNDLE

GitOrigin-RevId: 346d30441938bf4e2110bd19194c584815ee528e
This commit is contained in:
Sergey Ignatov
2020-01-05 21:34:39 +03:00
committed by intellij-monorepo-bot
parent 66ed1db795
commit 07544a9018
3 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
public class PyBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.PyBundle";
@NonNls public static final String BUNDLE = "messages.PyBundle";
public static final PyBundle INSTANCE = new PyBundle();
private PyBundle() { super(BUNDLE); }

View File

@@ -12,7 +12,7 @@ import com.jetbrains.python.psi.PyFromImportStatement
import com.jetbrains.python.psi.PyStatement
import org.jetbrains.annotations.PropertyKey
abstract class PyConvertImportIntentionAction(@PropertyKey(resourceBundle = "messages.PyBundle") intentionText: String) : PyBaseIntentionAction() {
abstract class PyConvertImportIntentionAction(@PropertyKey(resourceBundle = PyBundle.BUNDLE) intentionText: String) : PyBaseIntentionAction() {
init {
text = PyBundle.message(intentionText)

View File

@@ -79,7 +79,7 @@ class PyInlineFunctionProcessor(project: Project,
return showConflicts(conflicts, filtered.toTypedArray())
}
private fun handleUsageError(element: PsiElement, @PropertyKey(resourceBundle = "messages.PyBundle") error: String, conflicts: MultiMap<PsiElement, String>): Boolean {
private fun handleUsageError(element: PsiElement, @PropertyKey(resourceBundle = PyBundle.BUNDLE) error: String, conflicts: MultiMap<PsiElement, String>): Boolean {
val errorText = PyBundle.message(error, myFunction.name)
if (myInlineThis) {
// shortcut for inlining single reference: show error hint instead of modal dialog