public static HybridCollection <IPsiSourceFile> GetSourceFiles(IUriIdentifierDeclaredElement declaredElement) { var cache = declaredElement.GetSolution().GetComponent <NTriplesCache>(); return(new HybridCollection <IPsiSourceFile>( cache.GetFilesContainingUri(declaredElement.GetNamespace(), declaredElement.GetLocalName()))); }
/*public bool ChangeName { get; set; } * * public string NewName * { * get { return this.myNewName; } * set * { * this.ChangeName = true; * this.myNewName = value; * } * }*/ public static IList <IDeclaration> GetDeclarations(IUriIdentifierDeclaredElement declaredElement) { var result = new List <IDeclaration>(); foreach (var sourceFile in GetSourceFiles(declaredElement)) { result.AddRange(GetDeclarationsIn(sourceFile, declaredElement)); } return(result); }
public UriIdentifierDeclaredElement( IFile file, string @namespace, string localName, IdentifierInfo info, IPsiServices services, bool filterDeclarations = false, IUriIdentifierDeclaredElement parent = null) { this.myFile = file; this.ns = @namespace; this.localName = localName; this.myName = localName; this.myNewName = localName; this.myServices = services; this.filterDeclarations = filterDeclarations; this.parent = parent; this.info = info; }
public static IList <IDeclaration> GetDeclarationsIn( IPsiSourceFile sourceFile, IUriIdentifierDeclaredElement declaredElement) { var psiFile = sourceFile.GetPsiFile <NTriplesLanguage>(new DocumentRange(sourceFile.Document, 0)) as NTriplesFile; if (psiFile == null) { return(EmptyList <IDeclaration> .InstanceList); } var uri = declaredElement.GetUri(); if (string.IsNullOrEmpty(uri)) { return(EmptyList <IDeclaration> .InstanceList); } var uriIdentifiers = psiFile.GetUriIdentifiers(uri); return(uriIdentifiers); }
public static HybridCollection<IPsiSourceFile> GetSourceFiles(IUriIdentifierDeclaredElement declaredElement) { var cache = declaredElement.GetSolution().GetComponent<NTriplesCache>(); return new HybridCollection<IPsiSourceFile>( cache.GetFilesContainingUri(declaredElement.GetNamespace(), declaredElement.GetLocalName())); }
public static IList<IDeclaration> GetDeclarationsIn( IPsiSourceFile sourceFile, IUriIdentifierDeclaredElement declaredElement) { var psiFile = sourceFile.GetPsiFile<NTriplesLanguage>(new DocumentRange(sourceFile.Document, 0)) as NTriplesFile; if (psiFile == null) { return EmptyList<IDeclaration>.InstanceList; } var uri = declaredElement.GetUri(); if (string.IsNullOrEmpty(uri)) { return EmptyList<IDeclaration>.InstanceList; } var uriIdentifiers = psiFile.GetUriIdentifiers(uri); return uriIdentifiers; }
/*public bool ChangeName { get; set; } public string NewName { get { return this.myNewName; } set { this.ChangeName = true; this.myNewName = value; } }*/ public static IList<IDeclaration> GetDeclarations(IUriIdentifierDeclaredElement declaredElement) { var result = new List<IDeclaration>(); foreach (var sourceFile in GetSourceFiles(declaredElement)) { result.AddRange(GetDeclarationsIn(sourceFile, declaredElement)); } return result; }
public static bool IsImportantSubject(IUriIdentifierDeclaredElement uriIdentifier) { return uriIdentifier.GetInfo().IsClassDeclaration; }
public static bool IsImportantSubject(IUriIdentifierDeclaredElement uriIdentifier) { return(uriIdentifier.GetInfo().IsClassDeclaration); }