本文整理汇总了Java中com.intellij.ide.plugins.PluginManager.isIncompatible方法的典型用法代码示例。如果您正苦于以下问题:Java PluginManager.isIncompatible方法的具体用法?Java PluginManager.isIncompatible怎么用?Java PluginManager.isIncompatible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ide.plugins.PluginManager
的用法示例。
在下文中一共展示了PluginManager.isIncompatible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateExistingPluginInfo
import com.intellij.ide.plugins.PluginManager; //导入方法依赖的package包/类
public void updateExistingPluginInfo(IdeaPluginDescriptor descr, IdeaPluginDescriptor existing) {
int state = StringUtil.compareVersionNumbers(descr.getVersion(), existing.getVersion());
final PluginId pluginId = existing.getPluginId();
final Set<PluginId> installedPlugins = InstalledPluginsState.getInstance().getInstalledPlugins();
if (!installedPlugins.contains(pluginId) && !((IdeaPluginDescriptorImpl)existing).isDeleted()) {
installedPlugins.add(pluginId);
}
if (state > 0 && !PluginManager.isIncompatible(descr) && !myUpdatedPlugins.contains(descr.getPluginId())) {
myNewVersions.add(pluginId);
myOutdatedPlugins.add(pluginId);
}
else {
myOutdatedPlugins.remove(pluginId);
if (myNewVersions.remove(pluginId)) {
myUpdatedPlugins.add(pluginId);
}
}
}
示例2: update
import com.intellij.ide.plugins.PluginManager; //导入方法依赖的package包/类
public static void update(@Nullable List<IdeaPluginDescriptor> list) {
ourLoadedPluginDescriptors = ContainerUtil.isEmpty(list) ? null : list;
if (list != null) {
InstalledPluginsState pluginsState = InstalledPluginsState.getInstance();
for (IdeaPluginDescriptor newPluginDescriptor : list) {
final IdeaPluginDescriptor installed = PluginManager.getPlugin(newPluginDescriptor.getPluginId());
if (installed != null) {
int state = StringUtil.compareVersionNumbers(newPluginDescriptor.getVersion(), installed.getVersion());
if (state > 0 &&
!PluginManager.isIncompatible(newPluginDescriptor) &&
!pluginsState.getUpdatedPlugins().contains(newPluginDescriptor.getPluginId())) {
pluginsState.getOutdatedPlugins().add(newPluginDescriptor.getPluginId());
}
}
}
}
}