diff options
author | Lluis Sanchez Gual <lluis@xamarin.com> | 2015-04-20 19:07:51 +0300 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2015-04-20 19:07:51 +0300 |
commit | 95408b1a41b31b645f3a8c3323ab7d3ca4bff26b (patch) | |
tree | f8f137cddcb9a40499d303be95722fd2c6081bce /main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/AbstractParameterDataProvider.cs | |
parent | b70e4e04b4e41b8ec28d7e4b220b401ecf467e7a (diff) | |
parent | de043d330a8bf5855d4d983c804cd36727cb2406 (diff) |
Merge remote-tracking branch 'origin/roslyn' into new-project-model
Diffstat (limited to 'main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/AbstractParameterDataProvider.cs')
-rw-r--r-- | main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/AbstractParameterDataProvider.cs | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/AbstractParameterDataProvider.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/AbstractParameterDataProvider.cs index d505a33737..8cde44cca3 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/AbstractParameterDataProvider.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/AbstractParameterDataProvider.cs @@ -35,7 +35,7 @@ using MonoDevelop.Ide.CodeCompletion; namespace MonoDevelop.CSharp.Completion { - abstract class AbstractParameterDataProvider : ParameterDataProvider + abstract class AbstractParameterDataProvider : ParameterHintingData { protected CSharpCompletionTextEditorExtension ext; @@ -49,28 +49,29 @@ namespace MonoDevelop.CSharp.Completion TypeSystemAstBuilder builder; protected string GetShortType (IType type) { - if (builder == null) { - var ctx = ext.CSharpUnresolvedFile.GetTypeResolveContext (ext.UnresolvedFileCompilation, ext.Document.Editor.Caret.Location); - var state = new CSharpResolver (ctx); - builder = new TypeSystemAstBuilder (state); - var dt = state.CurrentTypeDefinition; - var declaring = ctx.CurrentTypeDefinition != null ? ctx.CurrentTypeDefinition.DeclaringTypeDefinition : null; - if (declaring != null) { - while (dt != null) { - if (dt.Equals (declaring)) { - builder.AlwaysUseShortTypeNames = true; - break; - } - dt = dt.DeclaringTypeDefinition; - } - } - } - try { - return GLib.Markup.EscapeText (builder.ConvertType(type).ToString (ext.FormattingPolicy.CreateOptions ())); - } catch (Exception e) { - LoggingService.LogError ("Exception while getting short type.", e); - return ""; - } + return type.Name; +// if (builder == null) { +// var ctx = ext.CSharpUnresolvedFile.GetTypeResolveContext (ext.UnresolvedFileCompilation, ext.Document.Editor.Caret.Location); +// var state = new CSharpResolver (ctx); +// builder = new TypeSystemAstBuilder (state); +// var dt = state.CurrentTypeDefinition; +// var declaring = ctx.CurrentTypeDefinition != null ? ctx.CurrentTypeDefinition.DeclaringTypeDefinition : null; +// if (declaring != null) { +// while (dt != null) { +// if (dt.Equals (declaring)) { +// builder.AlwaysUseShortTypeNames = true; +// break; +// } +// dt = dt.DeclaringTypeDefinition; +// } +// } +// } +// try { +// return GLib.Markup.EscapeText (builder.ConvertType(type).ToString (ext.FormattingPolicy.CreateOptions ())); +// } catch (Exception e) { +// LoggingService.LogError ("Exception while getting short type.", e); +// return ""; +// } } protected string GetParameterString (IParameter parameter) |