void (@NotNull AnActionEvent e) { VirtualFile baseFile = getContentFile(myBaseSide); VirtualFile targetFile = getContentFile(myBaseSide.other()); boolean enabled = baseFile != null && targetFile != null && targetFile.isWritable(); e.getPresentation().setEnabledAndVisible(enabled); }