[json] IJPL-159354 Specify action text via its id

GitOrigin-RevId: 4b9bab676afd8512f71d07501d791709c9aeb1d7
This commit is contained in:
Nikita Katkov
2024-07-31 15:26:46 +02:00
committed by intellij-monorepo-bot
parent 8c6ed6f7ee
commit 8d2c779293
3 changed files with 3 additions and 6 deletions

View File

@@ -13,15 +13,12 @@
<a href="https://json-schema.org/overview/what-is-jsonschema">JSON Schema</a> languages
]]></description>
<actions>
<actions resource-bundle="messages.JsonBundle">
<action id="JsonCopyPointer" class="com.intellij.json.editor.JsonCopyPointerAction">
<add-to-group group-id="CutCopyPasteGroup" anchor="after" relative-to-action="CopyReference"/>
<add-to-group group-id="EditorTabPopupMenu" anchor="after" relative-to-action="CopyReference"/>
<add-to-group group-id="EditorPopupMenu" anchor="after" relative-to-action="Copy.Paste.Special"/>
</action>
</actions>
<actions resource-bundle="messages.JsonBundle">
<action id="ConsoleView.ShowAsJsonAction" class="com.intellij.json.actions.ShowAsJsonAction">
<add-to-group group-id="ConsoleEditorPopupMenu" anchor="after" relative-to-action="ConsoleView.FoldLinesLikeThis"/>
</action>

View File

@@ -96,7 +96,7 @@ action.DumbAware.JsonSchemaMappingsConfigurable.text.add=Add
action.DumbAware.JsonSchemaMappingsConfigurable.description.add=Add
filetype.json.description=JSON
filetype.json_lines.description=JSON lines
copy.json.pointer=Copy JSON Pointer
action.JsonCopyPointer.text=Copy JSON Pointer
cannot.sort.properties=Cannot Sort Properties
file.is.readonly=File is readonly
not.applicable.in.batch.mode=Not Applicable in Batch Mode

View File

@@ -28,7 +28,7 @@ public final class JsonCopyPointerAction extends CopyReferenceAction {
@Override
public void update(@NotNull AnActionEvent e) {
super.update(e);
e.getPresentation().setText(JsonBundle.message("copy.json.pointer"));
e.getPresentation().setText(JsonBundle.message("action.JsonCopyPointer.text"));
DataContext dataContext = e.getDataContext();
Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
VirtualFile file = editor == null ? null : FileDocumentManager.getInstance().getFile(editor.getDocument());