use of com.intellij.openapi.extensions.PluginId in project intellij-community by JetBrains.
the class InstalledPluginsManagerMain method isPluginStateChanged.
private boolean isPluginStateChanged(final IdeaPluginDescriptor pluginDescriptor, final List<String> disabledPlugins) {
final PluginId pluginId = pluginDescriptor.getPluginId();
final boolean enabledInTable = ((InstalledPluginsTableModel) pluginsModel).isEnabled(pluginId);
if (pluginDescriptor.isEnabled() != enabledInTable) {
if (enabledInTable && !disabledPlugins.contains(pluginId.getIdString())) {
//was disabled automatically on startup
return false;
}
return true;
}
return false;
}
use of com.intellij.openapi.extensions.PluginId in project intellij-community by JetBrains.
the class InstalledPluginsState method onPluginInstall.
/**
* Should be called whenever a new plugin is installed or an existing one is updated.
*/
public void onPluginInstall(@NotNull IdeaPluginDescriptor descriptor) {
PluginId id = descriptor.getPluginId();
boolean existing = PluginManager.isPluginInstalled(id);
synchronized (myLock) {
myOutdatedPlugins.remove(id.getIdString());
if (existing) {
myUpdatedPlugins.put(id, descriptor);
} else {
myInstalledPlugins.put(id, descriptor);
}
}
}
use of com.intellij.openapi.extensions.PluginId in project intellij-community by JetBrains.
the class InstalledPluginsTableModel method appendOrUpdateDescriptor.
public void appendOrUpdateDescriptor(@NotNull IdeaPluginDescriptor descriptor) {
PluginId id = descriptor.getPluginId();
if (!PluginManager.isPluginInstalled(id)) {
List<IdeaPluginDescriptor> list = isPluginDescriptorAccepted(descriptor) ? view : filtered;
int i = list.indexOf(descriptor);
if (i < 0) {
list.add(descriptor);
} else {
list.set(i, descriptor);
}
setEnabled(descriptor, true);
fireTableDataChanged();
}
}
use of com.intellij.openapi.extensions.PluginId in project intellij-community by JetBrains.
the class InstalledPluginsTableModel method setEnabled.
private void setEnabled(IdeaPluginDescriptor ideaPluginDescriptor, boolean enabled) {
final Collection<String> disabledPlugins = PluginManagerCore.getDisabledPlugins();
final PluginId pluginId = ideaPluginDescriptor.getPluginId();
if (!enabled && !disabledPlugins.contains(pluginId.toString())) {
myEnabled.put(pluginId, null);
} else {
myEnabled.put(pluginId, enabled);
}
}
use of com.intellij.openapi.extensions.PluginId in project intellij-community by JetBrains.
the class InstalledPluginsTableModel method enableRows.
public void enableRows(IdeaPluginDescriptor[] ideaPluginDescriptors, Boolean value) {
for (IdeaPluginDescriptor ideaPluginDescriptor : ideaPluginDescriptors) {
final PluginId currentPluginId = ideaPluginDescriptor.getPluginId();
final Boolean enabled = myEnabled.get(currentPluginId) == null ? Boolean.FALSE : value;
myEnabled.put(currentPluginId, enabled);
}
updatePluginDependencies();
warnAboutMissedDependencies(value, ideaPluginDescriptors);
hideNotApplicablePlugins(value, ideaPluginDescriptors);
}
Aggregations