public void refreshData(final PreparedFragmentedContent fragmentedContent) {
    myPresentationState = new PresentationState();
    myFragmentedContent = fragmentedContent;

    boolean navigationEnabled = !myFragmentedContent.isOneSide();
    myNextDiff.setEnabled(navigationEnabled);
    myPreviousDiff.setEnabled(navigationEnabled);

    adjustPanelData((DiffPanelImpl) myHorizontal);
    adjustPanelData((DiffPanelImpl) myVertical);

    DiffPanel currentPanel = getCurrentPanel();
    FragmentedDiffPanelState state =
        (FragmentedDiffPanelState) ((DiffPanelImpl) currentPanel).getDiffPanelState();
    myTitleLabel.setText(titleText((DiffPanelImpl) currentPanel));
    myLeftLines = state.getLeftLines();
    myRightLines = state.getRightLines();

    FragmentedEditorHighlighter bh = fragmentedContent.getBeforeHighlighter();
    if (bh != null) {
      ((EditorEx) ((DiffPanelImpl) currentPanel).getEditor1()).setHighlighter(bh);
    }
    FragmentedEditorHighlighter ah = fragmentedContent.getAfterHighlighter();
    if (ah != null) {
      ((EditorEx) ((DiffPanelImpl) currentPanel).getEditor2()).setHighlighter(ah);
    }
    if (((DiffPanelImpl) currentPanel).getEditor1() != null) {
      highlightTodo(true, fragmentedContent.getBeforeTodoRanges());
    }
    if (((DiffPanelImpl) currentPanel).getEditor2() != null) {
      highlightTodo(false, fragmentedContent.getAfterTodoRanges());
    }
    ensurePresentation();
    softWraps(myConfiguration.SOFT_WRAPS_IN_SHORT_DIFF);
  }
 private void updateLabels() {
   // TODO: Move from JavaDoc to somewhere more appropriate place.
   ElementLocationUtil.customizeElementLabel(myElements[myIndex], myLocationLabel);
   //noinspection AutoBoxing
   myCountLabel.setText(CodeInsightBundle.message("n.of.m", myIndex + 1, myElements.length));
 }
 public void setTitle(String filePath) {
   myTitleLabel.setText(filePath);
 }