mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 23:06:24 +07:00
Support prefix/suffix in I18nizeConcatenationQuickFix
GitOrigin-RevId: a54811c30c971076905ffb16ff83d72828ec492f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
16cd8ebe10
commit
7ba3528859
+1
-1
@@ -72,7 +72,7 @@ public class I18nizeConcatenationQuickFix extends I18nizeQuickFix {
|
||||
final List<PsiExpression> args = new ArrayList<>();
|
||||
String formatString = getValueString(concatenation, args);
|
||||
|
||||
return new JavaI18nizeQuickFixDialog(project, context, literalExpression, formatString, null, true, true) {
|
||||
return new JavaI18nizeQuickFixDialog(project, context, literalExpression, formatString, getCustomization(formatString), true, true) {
|
||||
@Override
|
||||
@Nullable
|
||||
protected String getTemplateName() {
|
||||
|
||||
@@ -162,10 +162,12 @@ public class I18nizeQuickFix implements LocalQuickFix, I18nQuickFixHandler, High
|
||||
TextRange intersection = literalRange.intersection(mySelectionRange);
|
||||
value = literalExpression.getText().substring(intersection.getStartOffset() - literalRange.getStartOffset(), intersection.getEndOffset() - literalRange.getStartOffset());
|
||||
}
|
||||
DialogCustomization customization = new DialogCustomization(
|
||||
null, true, false, null, getSuggestedName(value));
|
||||
return new JavaI18nizeQuickFixDialog(project, context, literalExpression, value,
|
||||
customization, true, true);
|
||||
return new JavaI18nizeQuickFixDialog(project, context, literalExpression, value, getCustomization(value), true, true);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
I18nizeQuickFixDialog.DialogCustomization getCustomization(String value) {
|
||||
return new DialogCustomization(null, true, false, null, getSuggestedName(value));
|
||||
}
|
||||
|
||||
private String getSuggestedName(String value) {
|
||||
|
||||
Reference in New Issue
Block a user