@@ -28,8 +28,7 @@ public class MainViewModel : ViewModelBase
28
28
private FolderTreeRoot m_root ;
29
29
private ProgressToken m_backgroundRefreshProgress ;
30
30
private bool m_isCSharp = Settings . Instance . IsCSharp ;
31
- private bool m_isCppNoHeaders = Settings . Instance . IsCppNoHeaders ;
32
- private bool m_isCppWithHeaders = Settings . Instance . IsCppWithHeaders ;
31
+ private bool m_isCpp = Settings . Instance . IsCpp ;
33
32
private bool m_includeMarkdown = Settings . Instance . IncludeMarkdown ;
34
33
private bool m_excludeImports = Settings . Instance . ExcludeImports ;
35
34
private bool m_useFullPaths = Settings . Instance . UseFullPaths ;
@@ -66,32 +65,19 @@ public bool IsCSharp
66
65
}
67
66
}
68
67
69
- public bool IsCppNoHeaders
68
+ public bool IsCpp
70
69
{
71
- get => m_isCppNoHeaders ;
70
+ get => m_isCpp ;
72
71
set
73
72
{
74
- if ( SetField ( ref m_isCppNoHeaders , value ) )
73
+ if ( SetField ( ref m_isCpp , value ) )
75
74
{
76
- Settings . Instance . IsCppNoHeaders = value ;
75
+ Settings . Instance . IsCpp = value ;
77
76
InvalidatePreviewStats ( ) ;
78
77
}
79
78
}
80
79
}
81
-
82
- public bool IsCppWithHeaders
83
- {
84
- get => m_isCppWithHeaders ;
85
- set
86
- {
87
- if ( SetField ( ref m_isCppWithHeaders , value ) )
88
- {
89
- Settings . Instance . IsCppWithHeaders = value ;
90
- InvalidatePreviewStats ( ) ;
91
- }
92
- }
93
- }
94
-
80
+
95
81
public bool IsPython
96
82
{
97
83
get => m_isPython ;
@@ -221,9 +207,9 @@ public async Task RunIngest()
221
207
return ; // Nothing to do.
222
208
223
209
string [ ] filterExtensions ;
224
- if ( IsCppNoHeaders )
210
+ if ( IsCpp )
225
211
filterExtensions = [ ".cpp" ] ;
226
- else if ( IsCppWithHeaders )
212
+ else if ( IsCpp )
227
213
filterExtensions = [ ".cpp" , ".h" ] ;
228
214
else if ( IsPython )
229
215
filterExtensions = [ ".py" ] ;
@@ -267,12 +253,10 @@ private IngestOptions GetIngestOptions()
267
253
if ( IsCSharp )
268
254
{
269
255
options . FilePatterns . Add ( "*.cs" ) ;
270
- } else if ( IsCppNoHeaders )
271
- {
272
- options . FilePatterns . Add ( "*.cpp" ) ;
273
- } else if ( IsCppWithHeaders )
256
+ } else if ( IsCpp )
274
257
{
275
- options . FilePatterns . Add ( "*.h" ) ;
258
+ if ( ! ExcludeImports )
259
+ options . FilePatterns . Add ( "*.h" ) ;
276
260
options . FilePatterns . Add ( "*.cpp" ) ;
277
261
}
278
262
0 commit comments