public void setEditedBlock(JBlock b) {
        if(b==editing) return ;
        if(editing!=null)
            finnishEdit();
        editing=(startBlock)b;
        fields.clear();
        fieldsPane.removeAll();
        name.setText(editing.name);
        silent.setSelected(editing.silent);
        displayName.setSelected(editing.displayName);
        String l[][]=editing.getFields();
        for(String f[]:l){
            Field field=new Field(this);
            field.name.setText(f[0]);
            for(ComboText c: types){
                if(c.getValue().equals(f[1])){
                    field.type.setSelectedItem(c);
                    break;
                }
            }
            fields.add(field);
        }
        makeList();
    }