package edu.cmu.cs.diamond.opendiamond;

import edu.cmu.cs.diamond.opendiamond.glue.groupidArray;

public class NameScope extends Scope {
    private final String name;

    NameScope(String name, groupidArray gids, int size) {
        super(gids, size);
        this.name = name;
    }
    
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("scope: " + name + " [");
        for (int i = 0; i < gidsSize; i++) {
            sb.append(" " + gids.getitem(i));
        }
        sb.append(" ]");
        return sb.toString();
    }

    @Override
    public String getName() {
        return name;
    }
}

@@ -284,13 +284,9 @@
   %7D%0A
-    
 %0A
+
     
@@ -396,135 +396,53 @@
 + %22 
-%5B%22);%0A        for (int i = 0; i %3C gidsSize; i++) %7B%0A            sb.append(%22 %22 + gids.getitem(i));%0A        %7D%0A        sb.append(%22 %5D
+(gids: %22%0A                + getGidsSize() + %22)
 %22);%0A

improve scope toString