[SourceKit] Implement a new SourceKit request to generate the interface for a given type. rdar://27306890 (#3586)

This patch allows SourceKit to generate the interface for a given type specified by its mangled name.
Type interface is refined decl printing with type parameters localized and unusable members hidden.

Required field:
   "key.request": "source.request.editor.open.interface.swifttype"
   "key.usr": the mangled name of the given type.
This commit is contained in:
Xi Ge
2016-07-18 18:05:47 -07:00
committed by GitHub
parent 53a3a65d2c
commit 2a860100a5
10 changed files with 245 additions and 23 deletions

View File

@@ -49,10 +49,10 @@ Optional<StringRef>
findGroupNameForUSR(ModuleDecl *M, StringRef USR);
bool printTypeInterface(ModuleDecl *M, Type Ty, ASTPrinter &Printer,
std::string &Error);
std::string &TypeName, std::string &Error);
bool printTypeInterface(ModuleDecl *M, StringRef TypeUSR, ASTPrinter &Printer,
std::string &Error);
std::string &TyepName, std::string &Error);
void printModuleInterface(ModuleDecl *M, Optional<StringRef> Group,
ModuleTraversalOptions TraversalOptions,