public static IEnumerable <string> GetAplicableKeywords( INTriplesFile file, TreeTextRange referenceRange, NTriplesCodeCompletionContext context) { var list = new List <string>(); var node = file.FindNodeAt(referenceRange); if (node == null) { return(list); } var isTopLevel = IsTopLevel(node); var kind = GetKind(node); if (isTopLevel && (kind == IdentifierKind.Subject || kind == IdentifierKind.Other)) { list.AddRange(DirectiveKeywords); list.AddRange(MetaKeywords); } if (kind != IdentifierKind.Subject) { list.AddRange(PredicateKeywords); list.Add(OfPredicateKeyword1); list.Add(OfPredicateKeyword2); } list.AddRange(ObjectLiteralKeywords); return(list); }
private static ICollection <INTriplesSymbol> Build(INTriplesFile file) { var ret = new NTriplesCacheBuilder(file); file.ProcessDescendants(ret); return(ret.GetSymbols()); }
public override IEnumerable <string> VisitSecretFile(INTriplesFile psiFile, FormattingStageContext context) { if (!this.myIsGenerated) { return(base.VisitSecretFile(psiFile, context)); } return(base.VisitSecretFile(psiFile, context)); }
protected bool IsSupported(IPsiSourceFile sourceFile) { if (sourceFile == null || !sourceFile.IsValid()) { return(false); } INTriplesFile file = GetNTriplesFile(sourceFile); return(file != null && file.Language.Is <NTriplesLanguage>()); }
private NTriplesCacheBuilder(INTriplesFile file) { this.file = file; }