Skip to content

Commit 96a5d2b

Browse files
Hide excluded files by default (#149)
* Hide excluded files by default All files that start with . are excluded files, which will no longer be displayed in the project view. When testing this in Sherlock Platform, I had to delete the $root/config directory, otherwise it always picked up the project-default.xml file there which contained the old defaults. Tested by: - Delete config dir, invalidate all caches - Create new project - (Cmd|Ctrl)+S to save project - Verify that .idea folder is not shown in project view * Add comments around Sherlock-specific changes
1 parent 43f7771 commit 96a5d2b

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

platform/lang-impl/src/com/intellij/ide/projectView/ProjectViewSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
public interface ProjectViewSettings extends ViewSettings {
1010
default boolean isShowExcludedFiles() {
11-
return true;
11+
// Sherlock: Default behavior is to not show excluded files.
12+
return false;
13+
// Sherlock: Default behavior is to not show excluded files.
1214
}
1315

1416
default boolean isShowVisibilityIcons() {
@@ -39,7 +41,9 @@ final class Immutable extends ViewSettings.Immutable implements ProjectViewSetti
3941

4042
public Immutable(ProjectViewSettings settings) {
4143
super(settings);
42-
myShowExcludedFiles = settings == null || settings.isShowExcludedFiles();
44+
// Sherlock: Default behavior is to not show excluded files.
45+
myShowExcludedFiles = settings != null && settings.isShowExcludedFiles();
46+
// Sherlock: Default behavior is to not show excluded files.
4347
myShowVisibilityIcons = settings != null && settings.isShowVisibilityIcons();
4448
myUseFileNestingRules = settings == null || settings.isUseFileNestingRules();
4549
}

platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewSharedSettings.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ class ProjectViewSharedSettings : PersistentStateComponent<ProjectViewSharedSett
2222
var sortKey: NodeSortKey = ProjectViewSettings.Immutable.DEFAULT.sortKey
2323
var showModules: Boolean = true
2424
var flattenModules: Boolean = false
25-
var showExcludedFiles: Boolean = true
25+
// Sherlock: Default behavior is to not show excluded files.
26+
var showExcludedFiles: Boolean = false
27+
// Sherlock: Default behavior is to not show excluded files.
2628
var showVisibilityIcons: Boolean = false
2729
var showLibraryContents: Boolean = true
2830
var showScratchesAndConsoles: Boolean = true

platform/util/resources/misc/registry.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ ide.editor.tabs.fadeout.width.description=Size of semi-transparent fadeout area
155155
ide.editor.tabs.visible.in.presentation.mode=false
156156
ide.editor.tabs.visible.in.presentation.mode.description=Keep editor tabs visible even if Presentation mode is ON
157157

158-
ide.hide.excluded.files=false
158+
# Sherlock: Default behavior is to not show excluded files.
159+
ide.hide.excluded.files=true
160+
# Sherlock: Default behavior is to not show excluded files.
159161
ide.hide.excluded.files.restartRequired=true
160162
ide.hide.excluded.files.description=Do not show excluded files in Project View and exclude them from VCS
161163

0 commit comments

Comments
 (0)