@NbBundle.Messages("AddPluginsPanel.validate.empty=Plugin name is empty.")
  public void runVagrantPluginInstall() {
    try {
      String plugin = getPlugin();
      if (StringUtils.isEmpty(plugin)) {
        showDialog();
        VagrantUtils.showWarnigDialog(Bundle.AddPluginsPanel_validate_empty());
        return;
      }

      Vagrant vagrant = Vagrant.getDefault();
      Future<Integer> result =
          vagrant.plugin(Vagrant.PLUGIN.INSTALL, Collections.singletonList(plugin));
      try {
        result.get();
      } catch (InterruptedException ex) {
        Exceptions.printStackTrace(ex);
      } catch (ExecutionException ex) {
        Exceptions.printStackTrace(ex);
      }
      installedPlugins.add(plugin);
      setPluginsTable();
    } catch (InvalidVagrantExecutableException ex) {
      VagrantUtils.showWarnigDialog(ex.getMessage());
    }
  }
 private void setInstalledPlugins() {
   try {
     Vagrant vagrant = Vagrant.getDefault();
     List<String> pluginList = vagrant.getPluginList();
     installedPlugins.clear();
     for (String plugin : pluginList) {
       installedPlugins.add(plugin.replaceAll("\\(.+\\)", "").trim()); // NOI18N
     }
   } catch (InvalidVagrantExecutableException ex) {
     VagrantUtils.showWarnigDialog(ex.getMessage());
   }
 }
 @NbBundle.Messages("AddPluignsPanel.invalid.plugin.url=Plugin url is invalid.")
 private void availablePluginsListMouseClicked(
     java.awt.event.MouseEvent evt) { // GEN-FIRST:event_availablePluginsListMouseClicked
   int clickCount = evt.getClickCount();
   if (clickCount == 1) {
     changePlugin();
   } else if (clickCount == 2) {
     int selectedIndex = availablePluginsList.getSelectedIndex();
     VagrantPluginItem item = filteredPlugins.get(selectedIndex);
     try {
       HtmlBrowser.URLDisplayer.getDefault().showURL(new URL(item.getUrl())); // NOI18N
     } catch (MalformedURLException ex) {
       VagrantUtils.showWarnigDialog(Bundle.AddPluignsPanel_invalid_plugin_url());
     }
   }
 } // GEN-LAST:event_availablePluginsListMouseClicked