mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
[java] better message when trying to extract constant of variable accessed for writing
GitOrigin-RevId: deb515ab12422a30908578f9cdb367c902354942
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bf6fdd2607
commit
29d7aea7d4
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.refactoring.introduceField;
|
||||
|
||||
import com.intellij.codeInsight.highlighting.HighlightManager;
|
||||
@@ -119,7 +119,7 @@ public class IntroduceConstantHandler extends BaseExpressionToFieldHandler imple
|
||||
for (PsiExpression occurrence : occurrences) {
|
||||
if (RefactoringUtil.isAssignmentLHS(occurrence)) {
|
||||
String message =
|
||||
RefactoringBundle.getCannotRefactorMessage(JavaRefactoringBundle.message("introduce.constant.used.for.write.cannot.refactor.message"));
|
||||
RefactoringBundle.getCannotRefactorMessage(JavaRefactoringBundle.message("variable.is.accessed.for.writing", occurrence.getText()));
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, message, getRefactoringNameText(), getHelpID());
|
||||
highlightError(project, editor, occurrence);
|
||||
return null;
|
||||
|
||||
@@ -390,7 +390,6 @@ introduce.constant.enum.cb=Extract as &enum constant
|
||||
introduce.constant.field.of.type=Constant (static final field) of &type:
|
||||
introduce.constant.introduce.to.class=Extract to &class (fully qualified name)\:
|
||||
introduce.constant.move.to.another.class.checkbox=&Move to another class
|
||||
introduce.constant.used.for.write.cannot.refactor.message=Selected expression is used for write
|
||||
introduce.field.field.of.type=Field of &type:
|
||||
introduce.field.static.field.of.type=Static field of &type:
|
||||
introduce.functional.variable.pass.fields.checkbox=Pass &fields as params
|
||||
|
||||
Reference in New Issue
Block a user