protected void AddAssemblyLink(IAssemblySymbol assemblySymbol) { var name = assemblySymbol.Identity.Name; var navInfo = _libraryManager.LibraryService.NavInfoFactory.CreateForAssembly(assemblySymbol); _description.AddDescriptionText3(name, VSOBDESCRIPTIONSECTION.OBDS_TYPE, navInfo); }
public override void FillDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); FunctionScopeNode funcScope = ScopeNode as FunctionScopeNode; if (funcScope != null) { description.AddDescriptionText3("def ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); var def = funcScope.Definition; GetFunctionDescription(def, (text, kind, arg) => { description.AddDescriptionText3(text, kind, arg); }); description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); if (def.Body.Documentation != null) { description.AddDescriptionText3(" " + def.Body.Documentation, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } } else { var classScope = ScopeNode as ClassScopeNode; if (classScope != null) { FillClassDescription(description, classScope); } else { var assign = ScopeNode as AssignmentScopeNode; if (assign != null) { description.AddDescriptionText3("field ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(assign.Name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); description.AddDescriptionText3("\n", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); } } } }
protected void AddAssemblyLink(IAssemblySymbol assemblySymbol) { var name = assemblySymbol.Identity.Name; var navInfo = _libraryManager.GetAssemblyNavInfo(assemblySymbol); _description.AddDescriptionText3(name, VSOBDESCRIPTIONSECTION.OBDS_TYPE, navInfo); }
protected override void buildDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 obDescription) { obDescription.ClearDescriptionText(); foreach (var element in description) { obDescription.AddDescriptionText3(element.Item1, element.Item2, null); } }
protected virtual void buildDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { ThreadHelper.JoinableTaskFactory.Run(async delegate { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); description.ClearDescriptionText(); description.AddDescriptionText3(name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); }); }
public override void FillDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); // TODO: //FunctionScopeNode funcScope = ScopeNode as FunctionScopeNode; //if (funcScope != null) { // description.AddDescriptionText3("def ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); // var def = funcScope.Definition; // GetFunctionDescription(def, (text, kind, arg) => { // description.AddDescriptionText3(text, kind, arg); // }); // description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); // if (def.Body.Documentation != null) { // description.AddDescriptionText3(" " + def.Body.Documentation, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); // } //} else { description.AddDescriptionText3("class ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(ScopeNode.Name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); // } }
public override void FillDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); // TODO: //FunctionScopeNode funcScope = ScopeNode as FunctionScopeNode; //if (funcScope != null) { // description.AddDescriptionText3("def ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); // var def = funcScope.Definition; // GetFunctionDescription(def, (text, kind, arg) => { // description.AddDescriptionText3(text, kind, arg); // }); // description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); // if (def.Body.Documentation != null) { // description.AddDescriptionText3(" " + def.Body.Documentation, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); // } //} else { description.AddDescriptionText3("class ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(ScopeNode.Name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); // } }
int IVsSimpleObjectList2.FillDescription2(uint index, uint grfOptions, IVsObjectBrowserDescription3 pobDesc) { pobDesc.ClearDescriptionText(); SQObjectLibraryNode node; if (GetChild(index, out node) && node._declaration != null) { pobDesc.AddDescriptionText3(node._declaration.GetDescription(), VSOBDESCRIPTIONSECTION.OBDS_NAME, null); return(VSConstants.S_OK); } else { return(VSConstants.S_FALSE); } }
protected override void buildDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 obDescription) { ThreadHelper.JoinableTaskFactory.Run(async delegate { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); obDescription.ClearDescriptionText(); try { foreach (var element in description) { obDescription.AddDescriptionText3(element.Item1, element.Item2, null); } } catch { } }); }
private static void FillClassDescription(IVsObjectBrowserDescription3 description, ClassScopeNode classScope) { description.AddDescriptionText3("class ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(classScope.Name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); var classDef = classScope.Definition; if (classDef.Bases.Count > 0) { description.AddDescriptionText3("(", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); bool comma = false; foreach (var baseClass in classDef.Bases) { if (comma) { description.AddDescriptionText3(", ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } string baseStr = FormatExpression(baseClass.Expression); if (baseStr != null) { description.AddDescriptionText3(baseStr, VSOBDESCRIPTIONSECTION.OBDS_TYPE, null); } comma = true; } description.AddDescriptionText3(")", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } description.AddDescriptionText3("\n", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); if (!String.IsNullOrWhiteSpace(classDef.Body.Documentation)) { description.AddDescriptionText3(" " + classDef.Body.Documentation, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } }
public override void FillDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); FunctionScopeNode funcScope = ScopeNode as FunctionScopeNode; if (funcScope != null) { description.AddDescriptionText3("def ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); var def = funcScope.Definition; GetFunctionDescription(def, (text, kind, arg) => { description.AddDescriptionText3(text, kind, arg); }); description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); if (def.Body.Documentation != null) { description.AddDescriptionText3(" " + def.Body.Documentation, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } } else { var classScope = ScopeNode as ClassScopeNode; if (classScope != null) { FillClassDescription(description, classScope); } else { var assign = ScopeNode as AssignmentScopeNode; if (assign != null) { description.AddDescriptionText3("field ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(assign.Name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); description.AddDescriptionText3("\n", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); } } } }
public override void FillDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); foreach (var value in _value.Values) { foreach (var desc in value.description) { VSOBDESCRIPTIONSECTION kind; switch (desc.kind) { case "enddecl": kind = VSOBDESCRIPTIONSECTION.OBDS_ENDDECL; break; case "name": kind = VSOBDESCRIPTIONSECTION.OBDS_NAME; break; case "param": kind = VSOBDESCRIPTIONSECTION.OBDS_PARAM; break; case "comma": kind = VSOBDESCRIPTIONSECTION.OBDS_COMMA; break; default: kind = VSOBDESCRIPTIONSECTION.OBDS_MISC; break; } description.AddDescriptionText3(desc.text, kind, null); } } }
public virtual void FillDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); description.AddDescriptionText3(_name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); }
protected virtual void FillDescription(_VSOBJDESCOPTIONS flagsArg, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); description.AddDescriptionText3(symbolText, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); }
protected virtual void buildDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); description.AddDescriptionText3(name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); }
protected virtual void FillDescription(_VSOBJDESCOPTIONS flagsArg, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); description.AddDescriptionText3(symbolText, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); }
private static void FillClassDescription(IVsObjectBrowserDescription3 description, ClassScopeNode classScope) { description.AddDescriptionText3("class ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(classScope.Name, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); var classDef = classScope.Definition; if (classDef.Bases.Count > 0) { description.AddDescriptionText3("(", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); bool comma = false; foreach (var baseClass in classDef.Bases) { if (comma) { description.AddDescriptionText3(", ", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } string baseStr = FormatExpression(baseClass.Expression); if (baseStr != null) { description.AddDescriptionText3(baseStr, VSOBDESCRIPTIONSECTION.OBDS_TYPE, null); } comma = true; } description.AddDescriptionText3(")", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } description.AddDescriptionText3("\n", VSOBDESCRIPTIONSECTION.OBDS_MISC, null); description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); if (!String.IsNullOrWhiteSpace(classDef.Body.Documentation)) { description.AddDescriptionText3(" " + classDef.Body.Documentation, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } }
public override void FillDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); foreach (var value in _value.Values) { foreach (var desc in value.description) { VSOBDESCRIPTIONSECTION kind; switch (desc.kind) { case "enddecl": kind = VSOBDESCRIPTIONSECTION.OBDS_ENDDECL; break; case "name": kind = VSOBDESCRIPTIONSECTION.OBDS_NAME; break; case "param": kind = VSOBDESCRIPTIONSECTION.OBDS_PARAM; break; case "comma": kind = VSOBDESCRIPTIONSECTION.OBDS_COMMA; break; default: kind = VSOBDESCRIPTIONSECTION.OBDS_MISC; break; } description.AddDescriptionText3(desc.text, kind, null); } } }
protected override void buildDescription(_VSOBJDESCOPTIONS flags, IVsObjectBrowserDescription3 description) { description.ClearDescriptionText(); // string descText = this.Name; // string namesp = ""; string className = ""; if (member != null) { if (member.Parent != null) { if (member.Parent is IXType) { namesp = ((IXType)member.Parent).Namespace; className = ((IXType)member.Parent).Name; } } // string modifier = ""; string access = ""; if ((member is XTypeDefinition) && (member.Kind != Kind.Namespace)) { modifier = getModifierString(((XTypeDefinition)member).Modifiers); access = getAccessString(((XTypeDefinition)member).Visibility); } else if ((member is XMemberDefinition) && ((member.Kind != Kind.Function) && (member.Kind != Kind.Procedure))) { modifier = getModifierString(((XMemberDefinition)member).Modifiers); access = getAccessString(((XMemberDefinition)member).Visibility); } // if (!String.IsNullOrEmpty(modifier)) { description.AddDescriptionText3(modifier, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } // if (!String.IsNullOrEmpty(access)) { description.AddDescriptionText3(access, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } // descText = member.Kind.DisplayName().ToUpper() + " "; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); descText = member.Name; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_NAME, null); // Parameters ? if (this.NodeType == LibraryNodeType.Members) { if (((XMemberDefinition)member).HasParameters) { descText = "("; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); // int paramNum = 1; foreach (XVariable param in ((XMemberDefinition)member).Parameters) { descText = param.Name + " AS "; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_PARAM, null); descText = param.TypeName; // IVsNavInfo navInfo = buildNavInfo(member.File, param.TypeName); // description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_TYPE, navInfo); // Need a comma ? if (paramNum < ((XMemberDefinition)member).ParameterCount) { paramNum++; descText = ","; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_COMMA, null); } } descText = ")"; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); } } if (member.Kind.HasReturnType()) { descText = " AS "; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); descText = member.TypeName; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_TYPE, null); } // if ((member.Parent is XTypeDefinition) && (member.Parent.Kind == Kind.Class)) { descText = " CLASS "; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_MISC, null); descText = className; description.AddDescriptionText3(descText, VSOBDESCRIPTIONSECTION.OBDS_TYPE, null); } // description.AddDescriptionText3(null, VSOBDESCRIPTIONSECTION.OBDS_ENDDECL, null); } }