public override ResolveResultWithInfo ResolveWithoutCache() { ISymbolTable table = GetReferenceSymbolTable(true); IList <DeclaredElementInstance> elements = new List <DeclaredElementInstance>(); { IList <ISymbolInfo> infos = table.GetSymbolInfos(GetName()); foreach (ISymbolInfo info in infos) { var element = new DeclaredElementInstance(info.GetDeclaredElement(), EmptySubstitution.INSTANCE); elements.Add(element); } } if (elements.Count == 0) { var ruleName = myOwner as RuleName; if (PsiTreeUtil.HasParent <InterfacesDefinition>(myOwner) && (ruleName != null)) { elements = new List <DeclaredElementInstance> { new DeclaredElementInstance(new UnresolvedRuleInterfacesDeclaredElement(ruleName.GetSourceFile(), GetName(), myOwner.GetPsiServices())) }; } } return(new ResolveResultWithInfo(ResolveResultFactory.CreateResolveResultFinaly(elements), ResolveErrorType.OK)); }
public override ResolveResultWithInfo ResolveWithoutCache() { ISymbolTable table = this.GetReferenceSymbolTable(true); IList <DeclaredElementInstance> elements = new List <DeclaredElementInstance>(); { IList <ISymbolInfo> infos = table.GetSymbolInfos(this.GetName()); foreach (ISymbolInfo info in infos) { var element = new DeclaredElementInstance(info.GetDeclaredElement(), EmptySubstitution.INSTANCE); elements.Add(element); } } if (elements.Count == 0) { var ruleName = this.myOwner as Prefix; // Unresolved namespaces creation if (ruleName != null) { elements = new List <DeclaredElementInstance> { new DeclaredElementInstance( new UnresolvedNamespacePrefixDeclaredElement( ruleName.GetSourceFile(), this.GetName(), this.myOwner.GetPsiServices())) }; } } return(new ResolveResultWithInfo(ResolveResultFactory.CreateResolveResultFinaly(elements), ResolveErrorType.OK)); }
public override ResolveResultWithInfo ResolveWithoutCache() { ISymbolTable table = GetReferenceSymbolTable(true); IList <DeclaredElementInstance> elements = new List <DeclaredElementInstance>(); { IList <ISymbolInfo> infos = table.GetSymbolInfos(GetName()); foreach (ISymbolInfo info in infos) { var element = new DeclaredElementInstance(info.GetDeclaredElement(), EmptySubstitution.INSTANCE); elements.Add(element); } } return(new ResolveResultWithInfo(ResolveResultFactory.CreateResolveResultFinaly(elements), ResolveErrorType.OK)); }
public override ResolveResultWithInfo ResolveWithoutCache() { return(new ResolveResultWithInfo( ResolveResultFactory.CreateResolveResultFinaly(new List <DeclaredElementInstance>()), ResolveErrorType.OK)); }