diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-12-01 10:20:35 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-12-01 10:20:35 +0400 |
commit | e397f88ca1002c52701ab2b95db44106a8df8f9f (patch) | |
tree | 096237dfda36f4e0423cf828bf5d99f6159e6371 /main/src/addins/MonoDevelop.SourceEditor2 | |
parent | 55990368eccbc8b19947053a572878af46e74d0b (diff) |
[SourceEditor] Updated nrefactory API changes.
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2')
3 files changed, 4 insertions, 22 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs index 3e160d7c60..27372cfc8c 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs @@ -449,15 +449,6 @@ namespace MonoDevelop.SourceEditor return null; } - public ITypeResolveContext ITypeResolveContext { - get { - var doc = IdeApp.Workbench.ActiveDocument; - if (doc != null) - return doc.TypeResolveContext; - return null; - } - } - internal ParsedDocument ParsedDocument { get { var doc = IdeApp.Workbench.ActiveDocument; @@ -489,7 +480,7 @@ namespace MonoDevelop.SourceEditor oldOffset = offset; if (textEditorResolverProvider != null) { - this.resolveResult = textEditorResolverProvider.GetLanguageItem (this.ITypeResolveContext, GetTextEditorData (), offset, out region); + this.resolveResult = textEditorResolverProvider.GetLanguageItem (GetTextEditorData (), offset, out region); } else { region = DomRegion.Empty; this.resolveResult = null; @@ -520,7 +511,7 @@ namespace MonoDevelop.SourceEditor oldOffset = offset; if (textEditorResolverProvider != null) { - this.resolveResult = textEditorResolverProvider.GetLanguageItem (this.ITypeResolveContext, GetTextEditorData (), offset, expression); + this.resolveResult = textEditorResolverProvider.GetLanguageItem (GetTextEditorData (), offset, expression); } else { this.resolveResult = null; } @@ -531,7 +522,7 @@ namespace MonoDevelop.SourceEditor public string GetExpression (int offset) { if (textEditorResolverProvider != null) - return textEditorResolverProvider.GetExpression (this.ITypeResolveContext, GetTextEditorData (), offset); + return textEditorResolverProvider.GetExpression (GetTextEditorData (), offset); return string.Empty; } diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs index 9cf39ca6d1..255dd38683 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/LanguageItemWindow.cs @@ -46,11 +46,10 @@ namespace MonoDevelop.SourceEditor public LanguageItemWindow (ExtensibleTextEditor ed, Gdk.ModifierType modifierState, ResolveResult result, string errorInformations, IParsedFile unit) { - ITypeResolveContext dom = ed.ITypeResolveContext; Ambience ambience = AmbienceService.GetAmbience (ed.Document.MimeType); string tooltip = null; if (result != null && ed.TextEditorResolverProvider != null) { - tooltip = ed.TextEditorResolverProvider.CreateTooltip (dom, unit, result, errorInformations, ambience, modifierState); + tooltip = ed.TextEditorResolverProvider.CreateTooltip (unit, result, errorInformations, ambience, modifierState); // TODO: Type sysetm conversion. (btw. this isn't required because the analyzer should provide semantic error messages.) // if (result.ResolveErrors.Count > 0) { // StringBuilder sb = new StringBuilder (); diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs index 758a346445..96cba481f4 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs @@ -692,14 +692,6 @@ namespace MonoDevelop.SourceEditor } - public ITypeResolveContext GetParserContext () - { - //Project project = IdeApp.ProjectOperations.CurrentSelectedProject; - if (Project != null) - return TypeSystemService.GetContext (Project); - return new ICSharpCode.NRefactory.TypeSystem.Implementation.SimpleProjectContent (); - } - public Ambience GetAmbience () { string file = this.IsUntitled ? this.UntitledName : this.ContentName; |