protected override bool TryGetItemByName(string name, out EnvDTE.CodeElement element) { if (name != null) { // When searching by name it may or may not be the fully qualified named, // but we need the fully qualified name for comparison. var node = LookupNode(); var semanticModel = FileCodeModel.GetSemanticModel(); name = CodeModelService.GetFullyQualifiedName(name, node.SpanStart, semanticModel); } foreach (var child in GetBaseTypes()) { var childName = child.GetEscapedFullName(); if (childName == name) { var projectId = FileCodeModel.GetProjectId(); element = CodeModelService.CreateCodeType(this.State, projectId, child); return(true); } } element = null; return(false); }