public static void AddAttributes(EmptyBlock self) { LanguageService ls = LanguageService.Get(self); if (ls == null) { return; } if (!(self.Next is ITypeDeclaration) && !(self.Next is IClassLevel)) { return; } foreach (var attributeType in ls.GetAttributeTypes()) { var name = attributeType.Name.Replace("Attribute", ""); CreateBlocksItem item = new CreateBlocksItem( name, () => new AttributeBlock() { Text = name } ); item.Picture = Icons.TypeClass; self.Completion.Items.Add(item); } }
public void RecacheCompletion() { LanguageService service = LanguageService.Get(this); if (service != null) { service.CacheUsing(this); } }
public IEnumerable <string> GetNamespaces(string ns) { LanguageService service = LanguageService.Get(this); if (service != null) { return(service.GetNamespaces(ns)); } return(Strings.EmptyArray); }
public void FillTypes(CustomItemsRequestEventArgs e) { LanguageService ls = LanguageService.Get(this); ClassOrStructBlock parentClass = ClassNavigator.FindContainingClassOrStruct(this); if (ls != null) { ls.FillTypeItems(parentClass, e.Items); } e.ShouldCallFillItems = false; e.ShowOnlyCustomItems = true; }
public void Reparse() { LanguageService ls = LanguageService.Get(this); if (ls != null && ls.Parser != null) { StatementInfo = ls.Parser.ParseStatement(this.Text); } else { StatementInfo = null; } }
protected override void FillItems(CustomItemsRequestEventArgs e) { LanguageService ls = LanguageService.Get(this); ClassOrStructBlock parentClass = ClassNavigator.FindContainingClassOrStruct(this); if (ls != null && parentClass != null) { IEnumerable <TextPictureInfo> types = ls.GetTypeList(parentClass); foreach (TextPictureInfo t in types) { AddEmptyItem(t.Text, t.Picture, e.Items); } } }
public override void FillItems(CustomItemsRequestEventArgs e) { LanguageService ls = LanguageService.Get(this); ClassOrStructBlock parent = ClassNavigator.FindContainingClassOrStruct(this); if (ls != null && parent != null) { ListSet <TextPictureInfo> result = new ListSet <TextPictureInfo>(); AddItems(e.Items, ItemStrings); ls.FillTypeList(parent, result); foreach (TextPictureInfo s in result) { CompletionListItem item = CreateItem(s.Text); if (item.ShouldShow(this.Completion)) { item.Picture = s.Picture; e.Items.Add(item); } } } }