public void replaceScope(NamedScope newScope) {
      NamedScope[] currentScopes = myHolder.getEditableScopes();
      if (myIndex < currentScopes.length) {
        currentScopes[myIndex] = newScope;
        myHolder.setScopes(currentScopes);
      }
    }
public void replaceScope(NamedScope newScope)