public void appendOrUpdateDescriptor(IdeaPluginDescriptor descriptor) { final PluginId descrId = descriptor.getPluginId(); final IdeaPluginDescriptor existing = PluginManager.getPlugin(descrId); if (existing != null) { updateExistingPlugin(descriptor, existing); } else { myInstalled.add(descriptor); view.add(descriptor); setEnabled(descriptor, true); fireTableDataChanged(); } }
private void reset(final List<IdeaPluginDescriptor> list) { for (IdeaPluginDescriptor ideaPluginDescriptor : list) { setEnabled(ideaPluginDescriptor); } updatePluginDependencies(); final Runnable runnable = new Runnable() { public void run() { ProgressManager.getInstance() .run( new Task.Backgroundable(null, "Load custom plugin repositories data...") { @Override public void run(@NotNull ProgressIndicator indicator) { updateRepositoryPlugins(); } }); } }; SwingUtilities.invokeLater(runnable); }
public void updatePluginsList(List<IdeaPluginDescriptor> list) { // For each downloadable plugin we need to know whether its counterpart // is already installed, and if yes compare the difference in versions: // availability of newer versions will be indicated separately. for (IdeaPluginDescriptor descr : list) { PluginId descrId = descr.getPluginId(); IdeaPluginDescriptor existing = PluginManager.getPlugin(descrId); if (existing != null) { if (descr instanceof PluginNode) { updateExistingPluginInfo(descr, existing); } else { view.add(descr); setEnabled(descr); } } } for (IdeaPluginDescriptor descriptor : myInstalled) { if (!view.contains(descriptor)) { view.add(descriptor); } } fireTableDataChanged(); }
private void setEnabled(IdeaPluginDescriptor ideaPluginDescriptor) { setEnabled(ideaPluginDescriptor, ideaPluginDescriptor.isEnabled()); }