|
|
@ -41,7 +41,7 @@ namespace ICSharpCode.AvalonEdit.AddIn |
|
|
|
|
|
|
|
|
|
|
|
if (file.FileName != null) { |
|
|
|
if (file.FileName != null) { |
|
|
|
string filetype = Path.GetExtension(file.FileName); |
|
|
|
string filetype = Path.GetExtension(file.FileName); |
|
|
|
if (!ProjectService.GetFileFilters().Any(f => f.ContainsExtension(filetype))) |
|
|
|
if (!IsKnownFileExtension(filetype)) |
|
|
|
filetype = ".?"; |
|
|
|
filetype = ".?"; |
|
|
|
trackedFeature = AnalyticsMonitorService.TrackFeature(typeof(AvalonEditViewContent), "open" + filetype.ToLowerInvariant()); |
|
|
|
trackedFeature = AnalyticsMonitorService.TrackFeature(typeof(AvalonEditViewContent), "open" + filetype.ToLowerInvariant()); |
|
|
|
} |
|
|
|
} |
|
|
@ -55,6 +55,12 @@ namespace ICSharpCode.AvalonEdit.AddIn |
|
|
|
codeEditor.TextCopied += codeEditor_TextCopied; |
|
|
|
codeEditor.TextCopied += codeEditor_TextCopied; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool IsKnownFileExtension(string filetype) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return ProjectService.GetFileFilters().Any(f => f.ContainsExtension(filetype)) || |
|
|
|
|
|
|
|
IconService.HasImageForFile(filetype); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void codeEditor_Document_UndoStack_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) |
|
|
|
void codeEditor_Document_UndoStack_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!isLoading) |
|
|
|
if (!isLoading) |
|
|
|