class DiffItemPresenter {

    public void setup(final ChangeRequestDiff changeRequestDiff,
                      final boolean warnConflict) {

        diff = changeRequestDiff;
        diffMode = resolveDiffMode(diff);

        final String resolveDiffFilename = resolveDiffFilename(diff.getChangeType(),
                                                               diff.getOldFilePath().getFileName(),
                                                               diff.getNewFilePath().getFileName());

        prepareDiff(diff,
                    resolveDiffFilename,
                    warnConflict);

        view.expandCollapsibleContainer(open);

        if (open && !canClose) {
            view.removeCollapseLink();
        }

        ready = true;
    }

    @Inject public  DiffItemPresenter(final View view,
                             final ResourceTypeManagerCache resourceTypeManagerCache,
                             final PlaceManager placeManager,
                             final TranslationService ts);

}