public void onContentChangedIn(EditorSource source) {
    myDiffUpdater.contentRemoved(source);
    final EditorEx editor = source.getEditor();
    if (myIsHorizontal && source.getSide() == FragmentSide.SIDE1 && editor != null) {
      editor.setVerticalScrollbarOrientation(EditorEx.VERTICAL_SCROLLBAR_LEFT);
    }
    DiffSideView viewSide = getSideView(source.getSide());
    viewSide.setEditorSource(getProject(), source);
    Disposer.dispose(myScrollSupport);
    if (editor == null) {
      if (!myDisposed) {
        rediff();
      }
      return;
    }

    final MouseListener mouseListener =
        PopupHandler.installUnknownPopupHandler(
            editor.getContentComponent(),
            new MergeActionGroup(this, source.getSide()),
            ActionManager.getInstance());
    myDiffUpdater.contentAdded(source);
    editor.getSettings().setLineNumbersShown(true);
    editor.getSettings().setFoldingOutlineShown(false);
    editor.getFoldingModel().setFoldingEnabled(false);
    ((EditorMarkupModel) editor.getMarkupModel()).setErrorStripeVisible(true);

    Editor editor1 = getEditor(FragmentSide.SIDE1);
    Editor editor2 = getEditor(FragmentSide.SIDE2);
    if (editor1 != null && editor2 != null && myIsSyncScroll) {
      myScrollSupport.install(new EditingSides[] {this});
    }

    final VisibleAreaListener visibleAreaListener = mySplitter.getVisibleAreaListener();
    final ScrollingModel scrollingModel = editor.getScrollingModel();
    if (visibleAreaListener != null) {
      scrollingModel.addVisibleAreaListener(visibleAreaListener);
      scrollingModel.addVisibleAreaListener(myVisibleAreaListener);
    }
    myFontSizeSynchronizer.synchronize(editor);
    source.addDisposable(
        new Disposable() {
          public void dispose() {
            myFontSizeSynchronizer.stopSynchronize(editor);
          }
        });
    source.addDisposable(
        new Disposable() {
          public void dispose() {
            if (visibleAreaListener != null) {
              scrollingModel.removeVisibleAreaListener(visibleAreaListener);
              scrollingModel.removeVisibleAreaListener(myVisibleAreaListener);
            }
            editor.getContentComponent().removeMouseListener(mouseListener);
          }
        });
  }
 public void dispose() {
   myDisposed = true;
   myDiffUpdater.dispose();
   Disposer.dispose(myScrollSupport);
   Disposer.dispose(myData);
   myPanel.cancelScrollEditors();
   JComponent component = myPanel.getBottomComponent();
   if (component instanceof Disposable) {
     Disposer.dispose((Disposable) component);
   }
   myPanel.setBottomComponent(null);
   myPanel.setDataProvider(null);
   myPanel.setScrollingPanel(null);
 }