public AstType CreateShortType(ICompilation compilation, CSharpUnresolvedFile parsedFile, TextLocation loc, IType fullType) { var csResolver = parsedFile.GetResolver(compilation, loc); var builder = new ICSharpCode.NRefactory.PlayScript.Refactoring.TypeSystemAstBuilder(csResolver); return(builder.ConvertType(fullType)); }
public AstType CreateShortType(IType fullType) { var parsedFile = Document.ParsedDocument.ParsedFile as CSharpUnresolvedFile; var csResolver = parsedFile.GetResolver(Document.Compilation, Document.Editor.Caret.Location); var builder = new ICSharpCode.NRefactory.PlayScript.Refactoring.TypeSystemAstBuilder(csResolver); return(builder.ConvertType(fullType)); }
public string GetShortType(string ns, string name, int typeArguments = 0) { if (Document == null || Document.ParsedDocument == null) { return(ns + "." + name); } var typeDef = new GetClassTypeReference(ns, name, typeArguments).Resolve(Document.Compilation.TypeResolveContext); if (typeDef == null) { return(ns + "." + name); } var file = Document.ParsedDocument.ParsedFile as CSharpUnresolvedFile; var csResolver = file.GetResolver(Document.Compilation, Document.Editor.Caret.Location); var builder = new ICSharpCode.NRefactory.PlayScript.Refactoring.TypeSystemAstBuilder(csResolver); return(OutputNode(Document, builder.ConvertType(typeDef))); }
public AstType CreateShortType (ICompilation compilation, CSharpUnresolvedFile parsedFile, TextLocation loc, IType fullType) { var csResolver = parsedFile.GetResolver (compilation, loc); var builder = new ICSharpCode.NRefactory.PlayScript.Refactoring.TypeSystemAstBuilder (csResolver); return builder.ConvertType (fullType); }
public string GetShortType (string ns, string name, int typeArguments = 0) { if (Document.ParsedDocument == null) return ns + "." + name; var typeDef = new GetClassTypeReference (ns, name, typeArguments).Resolve (Document.Compilation.TypeResolveContext); if (typeDef == null) return ns + "." + name; var file = Document.ParsedDocument.ParsedFile as CSharpUnresolvedFile; var csResolver = file.GetResolver (Document.Compilation, Document.Editor.Caret.Location); var builder = new ICSharpCode.NRefactory.PlayScript.Refactoring.TypeSystemAstBuilder (csResolver); return OutputNode (Document, builder.ConvertType (typeDef)); }