IDEA-98746 Annoying editor tab tooltips

Step 1: new setting has been added (Editor -> Editor Tabs -> Show tabs tooltip)
This commit is contained in:
Vassiliy
2014-03-06 18:18:50 +04:00
parent e50b96064d
commit 90d07400e1
5 changed files with 24 additions and 4 deletions
@@ -114,6 +114,7 @@ public class UISettings implements PersistentStateComponent<UISettings>, 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;
@@ -3,12 +3,12 @@
<grid id="27dc6" binding="myRootPanel" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="476"/>
<xy x="20" y="20" width="500" height="527"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="ed507" layout-manager="GridLayoutManager" row-count="6" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="ed507" layout-manager="GridLayoutManager" row-count="7" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="9" fill="3" indent="0" use-parent-layout="false"/>
@@ -69,7 +69,9 @@
</component>
<component id="e9bec" class="javax.swing.JCheckBox" binding="myCbModifiedTabsMarkedWithAsterisk">
<constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="239" height="20"/>
</grid>
</constraints>
<properties>
<text resource-bundle="messages/ApplicationBundle" key="checkbox.mark.modified.tabs.with.asterisk"/>
@@ -91,6 +93,14 @@
<text value="Show directory in editor tabs for non-unique filenames"/>
</properties>
</component>
<component id="9c802" class="javax.swing.JCheckBox" binding="myShowTabsTooltipsCheckBox" default-binding="true">
<constraints>
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/ApplicationBundle" key="checkbox.show.tabs.tooltips"/>
</properties>
</component>
</children>
</grid>
<vspacer id="651b4">
@@ -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;
@@ -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);
}
}
@@ -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