diff options
Diffstat (limited to 'main/src/addins/AspNet/Commands/AddViewDialog.cs')
-rw-r--r-- | main/src/addins/AspNet/Commands/AddViewDialog.cs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/main/src/addins/AspNet/Commands/AddViewDialog.cs b/main/src/addins/AspNet/Commands/AddViewDialog.cs index 752fc51522..8525483503 100644 --- a/main/src/addins/AspNet/Commands/AddViewDialog.cs +++ b/main/src/addins/AspNet/Commands/AddViewDialog.cs @@ -29,15 +29,17 @@ using System.IO; using System.Collections.Generic; using PP = System.IO.Path; -using MonoDevelop.Ide; +using Gtk; +using ICSharpCode.NRefactory6.CSharp; +using Microsoft.CodeAnalysis; using MonoDevelop.Core; -using ICSharpCode.NRefactory.TypeSystem; +using MonoDevelop.Ide; using MonoDevelop.Ide.TypeSystem; using MonoDevelop.AspNet.Projects; -using MonoDevelop.AspNet.WebForms.Dom; using MonoDevelop.AspNet.WebForms; using Gtk; using MonoDevelop.Projects; +using MonoDevelop.AspNet.WebForms.Dom; namespace MonoDevelop.AspNet.Commands { @@ -366,7 +368,7 @@ namespace MonoDevelop.AspNet.Commands if (!File.Exists (realPath)) return; - var pd = TypeSystemService.ParseFile (project, realPath) as WebFormsParsedDocument; + var pd = TypeSystemService.ParseFile (project, realPath).Result as WebFormsParsedDocument; if (pd != null) { try { @@ -470,22 +472,18 @@ namespace MonoDevelop.AspNet.Commands class TypeDataProvider
{
- public List<ITypeDefinition> TypesList { get; private set; }
+ public List<INamedTypeSymbol> TypesList { get; private set; }
public List<string> TypeNamesList { get; private set; }
- Ambience ambience;
public TypeDataProvider (MonoDevelop.Projects.DotNetProject project)
{
- TypeNamesList = new List<string> ();
- var ctx = TypeSystemService.GetCompilation (project);
- TypesList = new List<ITypeDefinition> (ctx.MainAssembly.GetAllTypeDefinitions ());
- this.ambience = AmbienceService.GetAmbience (project.LanguageName);
+ TypeNamesList = new List<string> (); + var ctx = TypeSystemService.GetCompilationAsync (project).Result; + TypesList = new List<INamedTypeSymbol> (ctx.GetAllTypesInMainAssembly ());
foreach (var typeDef in TypesList) {
- TypeNamesList.Add (ambience.GetString ((IEntity)typeDef, OutputFlags.IncludeGenerics | OutputFlags.UseFullName | OutputFlags.IncludeMarkup));
+ TypeNamesList.Add (Ambience.EscapeText (typeDef.ToDisplayString (SymbolDisplayFormat.CSharpErrorMessageFormat))); }
}
} } } - - |