本文整理匯總了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());
}
}
}
}
}