@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    final MavenDomDependency dep = getDependency(file, editor);

    final VirtualFile[] files;
    if (myFileChooser == null) {
      final FileChooserDescriptor descriptor = new FileChooserDescriptor(true, false, true, true, false, false);
      final PsiFile currentValue = dep != null ? dep.getSystemPath().getValue() : null;
      final VirtualFile toSelect = currentValue == null ? null : currentValue.getVirtualFile();
      files = FileChooser.chooseFiles(descriptor, project, toSelect);
    }
    else {
      files = myFileChooser.get();
    }
    if (files == null || files.length == 0) return;

    final PsiFile selectedFile = PsiManager.getInstance(project).findFile(files[0]);
    if (selectedFile == null) return;

    if (dep != null) {
      if (!FileModificationService.getInstance().prepareFileForWrite(file)) return;
      WriteCommandAction.writeCommandAction(project).run(() -> dep.getSystemPath().setValue(selectedFile));
    }
  }
@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file)