diff --git a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java index 881f68d837f8..658d893cc33e 100644 --- a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java +++ b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java @@ -114,6 +114,7 @@ public class UISettings implements PersistentStateComponent, Exporta public boolean PRESENTATION_MODE = false; public int PRESENTATION_MODE_FONT_SIZE = 24; public boolean MARK_MODIFIED_TABS_WITH_ASTERISK = false; + public boolean SHOW_TABS_TOOLTIPS = true; public boolean SHOW_DIRECTORY_FOR_NON_UNIQUE_FILENAMES = false; private final EventListenerList myListenerList; diff --git a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form index 4825e02f9db7..9872c7c624aa 100644 --- a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form +++ b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form @@ -3,12 +3,12 @@ - + - + @@ -69,7 +69,9 @@ - + + + @@ -91,6 +93,14 @@ + + + + + + + + diff --git a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java index cbb57dbb1081..4e1de817255a 100644 --- a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java +++ b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java @@ -41,6 +41,7 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { private JRadioButton myActivateLeftEditorOnCloseRadio; private JRadioButton myActivateMRUEditorOnCloseRadio; private JCheckBox myCbModifiedTabsMarkedWithAsterisk; + private JCheckBox myShowTabsTooltipsCheckBox; private JCheckBox myShowCloseButtonOnCheckBox; private JCheckBox myShowDirectoryInTabCheckBox; private JRadioButton myActivateRightNeighbouringTabRadioButton; @@ -71,12 +72,14 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { myHideKnownExtensions.setEnabled(false); myScrollTabLayoutInEditorCheckBox.setEnabled(false); myCbModifiedTabsMarkedWithAsterisk.setEnabled(false); + myShowTabsTooltipsCheckBox.setEnabled(false); myShowCloseButtonOnCheckBox.setEnabled(false); myShowDirectoryInTabCheckBox.setEnabled(false); } else { myHideKnownExtensions.setEnabled(true); myScrollTabLayoutInEditorCheckBox.setEnabled(true); myCbModifiedTabsMarkedWithAsterisk.setEnabled(true); + myShowTabsTooltipsCheckBox.setEnabled(true); myShowCloseButtonOnCheckBox.setEnabled(true); myShowDirectoryInTabCheckBox.setEnabled(true); } @@ -110,6 +113,7 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { UISettings uiSettings=UISettings.getInstance(); myCbModifiedTabsMarkedWithAsterisk.setSelected(uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK); + myShowTabsTooltipsCheckBox.setSelected(uiSettings.SHOW_TABS_TOOLTIPS); myScrollTabLayoutInEditorCheckBox.setSelected(uiSettings.SCROLL_TAB_LAYOUT_IN_EDITOR); myEditorTabPlacement.setSelectedItem(uiSettings.EDITOR_TAB_PLACEMENT); myHideKnownExtensions.setSelected(uiSettings.HIDE_KNOWN_EXTENSION_IN_TABS); @@ -141,6 +145,9 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { boolean uiSettingsChanged = uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK != myCbModifiedTabsMarkedWithAsterisk.isSelected(); uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK = myCbModifiedTabsMarkedWithAsterisk.isSelected(); + if (isModified(myShowTabsTooltipsCheckBox, uiSettings.SHOW_TABS_TOOLTIPS)) uiSettingsChanged = true; + uiSettings.SHOW_TABS_TOOLTIPS = myShowTabsTooltipsCheckBox.isSelected(); + if (isModified(myScrollTabLayoutInEditorCheckBox, uiSettings.SCROLL_TAB_LAYOUT_IN_EDITOR)) uiSettingsChanged = true; uiSettings.SCROLL_TAB_LAYOUT_IN_EDITOR = myScrollTabLayoutInEditorCheckBox.isSelected(); @@ -182,6 +189,7 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { public boolean isModified() { final UISettings uiSettings = UISettings.getInstance(); boolean isModified = isModified(myCbModifiedTabsMarkedWithAsterisk, uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK); + isModified |= isModified(myShowTabsTooltipsCheckBox, uiSettings.SHOW_TABS_TOOLTIPS); isModified |= isModified(myEditorTabLimitField, uiSettings.EDITOR_TAB_LIMIT); int tabPlacement = ((Integer)myEditorTabPlacement.getSelectedItem()).intValue(); isModified |= tabPlacement != uiSettings.EDITOR_TAB_PLACEMENT; diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java index 7819584e3990..a142a908cb22 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java @@ -852,7 +852,7 @@ public class EditorWindow { final int index = findEditorIndex(findFileComposite(file)); if (index != -1) { setTitleAt(index, EditorTabbedContainer.calcTabTitle(getManager().getProject(), file)); - setToolTipTextAt(index, getManager().getFileTooltipText(file)); + setToolTipTextAt(index, UISettings.getInstance().SHOW_TABS_TOOLTIPS ? getManager().getFileTooltipText(file) : null); } } diff --git a/platform/platform-resources-en/src/messages/ApplicationBundle.properties b/platform/platform-resources-en/src/messages/ApplicationBundle.properties index a7c02e6cba90..9088b59dd45e 100644 --- a/platform/platform-resources-en/src/messages/ApplicationBundle.properties +++ b/platform/platform-resources-en/src/messages/ApplicationBundle.properties @@ -338,6 +338,7 @@ checkbox.right.margin=Show right margin (configured in Code Style options) checkbox.use.block.caret=Use block caret checkbox.caret.blinking.ms=Caret blinking (ms): checkbox.mark.modified.tabs.with.asterisk=Mark modified tabs with asterisk +checkbox.show.tabs.tooltips=Show tabs tooltips group.code.folding=Code Folding checkbox.collapse.xml.tags=XML tags checkbox.collapse.html.style.attribute=HTML 'style' attribute