/*
   * (non-Javadoc)
   *
   * @see org.eclipse.ui.editors.text.DefaultEncodingSupport#initialize(org.eclipse
   * .ui.texteditor.StatusTextEditor)
   */
  public void initialize(StatusTextEditor textEditor) {
    super.initialize(textEditor);
    fStatusTextEditor = textEditor;

    IEncodingSupport encodingSupportDelegate = getEncodingSupportDelegate();
    if (encodingSupportDelegate instanceof DefaultEncodingSupport) {
      ((DefaultEncodingSupport) encodingSupportDelegate).initialize(textEditor);
    }
  }
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.ui.editors.text.DefaultEncodingSupport#dispose()
   */
  public void dispose() {
    super.dispose();

    if (fSupportDelegate instanceof DefaultEncodingSupport) {
      ((DefaultEncodingSupport) fSupportDelegate).dispose();
    }
    fSupportDelegate = null;
    fStatusTextEditor = null;
  }
  void reinitialize(String[] configurationPoints) {
    if (fSupportDelegate instanceof DefaultEncodingSupport) {
      ((DefaultEncodingSupport) fSupportDelegate).dispose();
    }
    fSupportDelegate = null;

    fConfigurationPoints = configurationPoints;

    IEncodingSupport encodingSupportDelegate = getEncodingSupportDelegate();
    if (encodingSupportDelegate instanceof DefaultEncodingSupport) {
      ((DefaultEncodingSupport) encodingSupportDelegate).initialize(fStatusTextEditor);
    }
  }
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.ui.editors.text.DefaultEncodingSupport#setEncoding (java.lang.String, boolean)
   */
  protected void setEncoding(String encoding, boolean overwrite) {
    super.setEncoding(encoding, overwrite);

    IEncodingSupport delegate = getEncodingSupportDelegate();
    if (delegate != null && overwrite) {
      delegate.setEncoding(encoding);
    }
  }