on IDEA-CR-11779: don't use HIDE_KNOWN_EXTENSION_IN_TABS in UniqueVFilePathBuilderImpl

virtualFile.getPresentableName() uses HIDE_KNOWN_EXTENSION_IN_TABS, but getName() doesn't
This commit is contained in:
Sergey Ignatov
2016-06-27 19:04:32 +03:00
parent 41765b58a8
commit ec513529e6
2 changed files with 4 additions and 4 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -42,7 +42,7 @@ public class UniqueNameEditorTabTitleProvider implements EditorTabTitleProvider
return uniqueName.equals(file.getName()) ? null : uniqueName;
}
public static <T> String getEditorTabText(String result, String separator, boolean hideKnownExtensionInTabs) {
public static String getEditorTabText(String result, String separator, boolean hideKnownExtensionInTabs) {
if (hideKnownExtensionInTabs) {
String withoutExtension = FileUtil.getNameWithoutExtension(result);
if (StringUtil.isNotEmpty(withoutExtension) && !withoutExtension.endsWith(separator)) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2016 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.
@@ -100,7 +100,7 @@ public class UniqueVFilePathBuilderImpl extends UniqueVFilePathBuilder {
}
return uniqueNameBuilderForShortName.getShortPath(file);
}
return file.getPresentableName();
return file.getName();
}
@Nullable