Browse Source

Fix recently introduced bug when opening files with other than C#/VB content.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6188 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Martin Koníček 15 years ago
parent
commit
b67dfce2bb
  1. 9
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/EditorASTProvider.cs

9
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/EditorASTProvider.cs

@ -84,7 +84,14 @@ namespace ICSharpCode.SharpDevelop.Refactoring
{ {
if (editor == null || editor.Language == null) if (editor == null || editor.Language == null)
return null; return null;
return new NRefactoryResolver(editor.Language.Properties); try
{
return new NRefactoryResolver(editor.Language.Properties);
}
catch(NotSupportedException)
{
return null;
}
} }
SupportedLanguage? GetEditorLanguage(ITextEditor editor) SupportedLanguage? GetEditorLanguage(ITextEditor editor)

Loading…
Cancel
Save