void (@NotNull AnActionEvent e, boolean isSelected) { final VirtualFile[] selectedFiles = getSelectedFiles(); assert selectedFiles.length != 0; for (VirtualFile selectedFile : selectedFiles) { boolean wasSelected = hasRoot(selectedFile, myEditor); if (isSelected) { if (!wasSelected) { final VirtualFilePointer root = VirtualFilePointerManager.getInstance().create(selectedFile, myDisposable, DUMMY_LISTENER); addRoot(root, myEditor); } } else { if (wasSelected) { removeRoot(selectedFile, myEditor, myModel); } } } }