void (@NotNull FileEditorState state) { if (state instanceof MyFileEditorState compositeState) { if (compositeState.getFirstState() != null) { myEditor.setState(compositeState.getFirstState()); } if (compositeState.getSecondState() != null) { myPreview.setState(compositeState.getSecondState()); } if (compositeState.getSplitLayout() != null) { myLayout = compositeState.getSplitLayout(); invalidateLayout(); } } }