Ejemplo n.º 1
0
 public virtual void CompletionAddControlStructures(ICompletionListBuilder items)
 {
     AddControlStructure <IfBlock>("if", items);
     if (this.Prev is IfBlock || this.Prev is ElseBlock)
     {
         AddControlStructure <ElseBlock>("else", items);
     }
     AddControlStructure <WhileBlock>("while", items);
     AddControlStructure <DoWhileBlock>("do", items);
     AddControlStructure <ForBlock>("for", items);
     AddControlStructure <ForeachBlock>("foreach", items);
     AddControlStructure <LockBlock>("lock", items);
     AddControlStructure <TryBlock>("try", items);
     if (this.Prev is TryBlock || this.Prev is CatchBlock)
     {
         AddControlStructure <CatchBlock>("catch", items);
         AddControlStructure <FinallyBlock>("finally", items);
     }
     AddControlStructure <UsingStatementBlock>("using", items);
     if (this.Next == null && ClassNavigator.FindContainingControlStructure(this) != null)
     {
         AddControlStructure <BreakStatement>("break", items);
         AddControlStructure <ContinueStatement>("continue", items);
     }
 }
Ejemplo n.º 2
0
 private ContainerBlock FindNearestControlStructureParent()
 {
     return(ClassNavigator.FindContainingControlStructure(this));
 }