Пример #1
0
 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);
     }
 }
Пример #2
0
 private void VisitEmptyBlock(EmptyBlock block)
 {
     if (block.Prev != null && block.Next != null)
     {
         NewLine();
     }
 }
Пример #3
0
 public MoreThan3TextBlocksCondition(EmptyBlock parent)
 {
     Parent = parent;
 }