diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2013-11-25 11:02:53 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2013-11-25 11:02:53 +0400 |
commit | 732f2921530e95db2fc05896928e830bfc2f65fd (patch) | |
tree | f9981d8847d05b6da5feba2baa1beaaed5b4b13d /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content | |
parent | 14524b05385e0b2fe0e20a9549db27733245a9ab (diff) |
Fixed 'Bug 16411 - Xamarin Studio Error
pop-up:TargetInvocationException'.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs index d75369dabb..87562cd44b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs @@ -266,13 +266,17 @@ namespace MonoDevelop.Ide.Gui.Content cpos = Editor.Caret.Offset; wlen = 0; } - - var ctx = CompletionWidget.CreateCodeCompletionContext (cpos); - ctx.TriggerWordLength = wlen; - completionList = Document.Editor.IsSomethingSelected ? ShowCodeSurroundingsCommand (ctx) : ShowCodeTemplatesCommand (ctx); + try { + var ctx = CompletionWidget.CreateCodeCompletionContext (cpos); + ctx.TriggerWordLength = wlen; + completionList = Document.Editor.IsSomethingSelected ? ShowCodeSurroundingsCommand (ctx) : ShowCodeTemplatesCommand (ctx); - info.Bypass = completionList == null; - info.Text = Document.Editor.IsSomethingSelected ? GettextCatalog.GetString ("_Surround With...") : GettextCatalog.GetString ("I_nsert Template..."); + info.Bypass = completionList == null; + info.Text = Document.Editor.IsSomethingSelected ? GettextCatalog.GetString ("_Surround With...") : GettextCatalog.GetString ("I_nsert Template..."); + } catch (Exception e) { + LoggingService.LogError ("Error while update show code templates window", e); + info.Bypass = true; + } } |