From a7a5a3c9b8fa40edcb6d1773849fbada46935184 Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Thu, 2 Feb 2017 18:55:42 +0300 Subject: [PATCH] IDEA-164993 Support for macOS special character (emoji) insertion popover a better fix for ActionsTreeTest - define action text only in one place --- .../ide/actions/MacEmojiAndSymbolsInputAction.java | 11 ++++++----- .../src/messages/ActionsBundle.properties | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/actions/MacEmojiAndSymbolsInputAction.java b/platform/platform-impl/src/com/intellij/ide/actions/MacEmojiAndSymbolsInputAction.java index 639d743066d8..c10f43e5fd61 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/MacEmojiAndSymbolsInputAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/MacEmojiAndSymbolsInputAction.java @@ -16,19 +16,20 @@ package com.intellij.ide.actions; import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.util.SystemInfo; import com.intellij.ui.mac.foundation.Foundation; import com.intellij.ui.mac.foundation.ID; public class MacEmojiAndSymbolsInputAction extends DumbAwareAction { + public MacEmojiAndSymbolsInputAction() { + // it's not currently possible to use &, when text is set in resource bundle + getTemplatePresentation().setText("Emoji & Symbols", false); + } + @Override public void update(AnActionEvent e) { - Presentation presentation = e.getPresentation(); - presentation.setEnabledAndVisible(SystemInfo.isMac); - // it's not currently possible to use &, when text is set in resource bundle - presentation.setText("Emoji & Symbols", false); + e.getPresentation().setEnabledAndVisible(SystemInfo.isMac); } @Override diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index 8ed33523d3e6..165569c91132 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -1577,5 +1577,4 @@ action.ToggleDistractionFreeMode.exit=Exit Distraction Free Mode action.TogglePresentationMode.exit=Exit Presentation Mode action.TogglePresentationMode.enter=Enter Presentation Mode -action.EmojiAndSymbols.text=Emoji and Symbols action.EmojiAndSymbols.description=Input special characters using macOS system palette \ No newline at end of file