This commit is contained in:
Konstantin Bulenkov
2014-08-02 21:02:00 +02:00
parent ed5d012399
commit bb8c124ab7
2 changed files with 4 additions and 4 deletions
@@ -44,7 +44,7 @@ import java.util.List;
*/
public class JBEditorTabs extends JBTabsImpl {
public static final String TABS_ALPHABETICAL_KEY = "tabs.alphabetical";
static final String TABS_CHORTEN_TITLE_IF_NEED = "tabs.shorten.title.if.need";
static final String TABS_SHORTEN_TITLE_IF_NEED = "tabs.shorten.title.if.need";
private JBEditorTabsPainter myDarkPainter = new DarculaEditorTabsPainter();
private JBEditorTabsPainter myDefaultPainter = new DefaultEditorTabsPainter();
@@ -64,7 +64,7 @@ public class JBEditorTabs extends JBTabsImpl {
@Override
protected TabLabel createTabLabel(TabInfo info) {
TabLabel label = super.createTabLabel(info);
label.putClientProperty(TABS_CHORTEN_TITLE_IF_NEED, Boolean.TRUE);
label.putClientProperty(TABS_SHORTEN_TITLE_IF_NEED, Boolean.TRUE);
return label;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -319,7 +319,7 @@ public class TabLabel extends JPanel {
public void setText(final SimpleColoredText text) {
myInfo.setTitleIsShortened(false);
if (text != null && text.getTexts().size() == 1 && Boolean.TRUE == getClientProperty(JBEditorTabs.TABS_CHORTEN_TITLE_IF_NEED)) {
if (text != null && text.getTexts().size() == 1 && Boolean.TRUE == getClientProperty(JBEditorTabs.TABS_SHORTEN_TITLE_IF_NEED)) {
String title = text.getTexts().get(0);
if (title.length() > UISettings.getInstance().EDITOR_TAB_TITLE_LIMIT) {
SimpleTextAttributes attributes = text.getAttributes().get(0);