ViewerState (@NotNull FrameDiffTool frameTool) { DiffViewer viewer = frameTool.createComponent(myContext, myActiveRequest); for (DiffExtension extension : DiffExtension.EP_NAME.getExtensions()) { try { extension.onViewerCreated(viewer, myContext, myActiveRequest); } catch (Throwable e) { LOG.error(e); } } DiffViewerWrapper wrapper = myActiveRequest.getUserData(DiffViewerWrapper.KEY); if (wrapper == null) { return new DefaultState(viewer, frameTool); } else { return new WrapperState(viewer, frameTool, wrapper); } }