mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
+2
-2
@@ -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)) {
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user