void () { if (documentOfPagesModel.getPagesAmount() > 0) { pagesCash.add(documentOfPagesModel.getLastPage()); runCaretAndSelectionListeningTransparentCommand( () -> documentOfPagesModel.removeLastPage(dataProvider.getProject())); } }