diff --git a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.java b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.java index a2c59ba26..d03c9bac4 100644 --- a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.java +++ b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.java @@ -34,6 +34,7 @@ public final class TMUIMessages extends NLS { public static String TextMatePreferencePage_LanguageConfigurationRelatedLink; public static String TextMatePreferencePage_TaskTagsRelatedLink; public static String TextMatePreferencePage_ThemeRelatedLink; + public static String TextMatePreferencePage_ShowTextMateTokenInfoHover; // Grammar preferences page public static String GrammarPreferencePage_title; diff --git a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.properties b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.properties index 0ece72564..87d611d5f 100644 --- a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.properties +++ b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/TMUIMessages.properties @@ -21,6 +21,7 @@ TextMatePreferencePage_GrammarRelatedLink=See ''{0}'' for associating edi TextMatePreferencePage_LanguageConfigurationRelatedLink=See ''{0}'' for associating editors with language configurations. TextMatePreferencePage_TaskTagsRelatedLink=See ''{0}'' for task tags configuration. TextMatePreferencePage_ThemeRelatedLink=See ''{0}'' for associating editors with themes. +TextMatePreferencePage_ShowTextMateTokenInfoHover=Show TextMate token info in hovers. GrammarPreferencePage_title=TextMate grammars GrammarPreferencePage_description=Register, configure or remove TextMate grammars: diff --git a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/preferences/TextMatePreferencePage.java b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/preferences/TextMatePreferencePage.java index a545b6139..109d8681a 100644 --- a/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/preferences/TextMatePreferencePage.java +++ b/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/internal/preferences/TextMatePreferencePage.java @@ -34,7 +34,7 @@ */ public final class TextMatePreferencePage extends AbstractPreferencePage { - private Button enableTMScopeHover = lazyNonNull(); + private Button enableTMScopeHoverButton = lazyNonNull(); public TextMatePreferencePage() { super(null, null); @@ -50,9 +50,9 @@ protected Control createContents(final @NonNullByDefault({}) Composite parent) { new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL) .setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); - enableTMScopeHover = new Button(composite, SWT.CHECK); - enableTMScopeHover.setText("Show TextMate scope name in hovers."); - enableTMScopeHover.setSelection(PreferenceHelper.isTMScopeHoverEnabled()); + enableTMScopeHoverButton = new Button(composite, SWT.CHECK); + enableTMScopeHoverButton.setText(TMUIMessages.TextMatePreferencePage_ShowTextMateTokenInfoHover); + enableTMScopeHoverButton.setSelection(PreferenceHelper.isTMScopeHoverEnabled()); applyDialogFont(composite); return composite; @@ -90,13 +90,13 @@ public void init(final @NonNullByDefault({}) IWorkbench workbench) { @Override protected void performDefaults() { - enableTMScopeHover.setSelection(PreferenceHelper.isTMScopeHoverEnabled()); + enableTMScopeHoverButton.setSelection(PreferenceHelper.isTMScopeHoverEnabled()); } @Override public boolean performOk() { try { - PreferenceHelper.saveTMScopeHoverEnabled(enableTMScopeHover.getSelection()); + PreferenceHelper.saveTMScopeHoverEnabled(enableTMScopeHoverButton.getSelection()); } catch (final BackingStoreException ex) { TMUIPlugin.logError(ex); return false;