本文整理匯總了Java中com.intellij.openapi.extensions.PluginId.getIdString方法的典型用法代碼示例。如果您正苦於以下問題:Java PluginId.getIdString方法的具體用法?Java PluginId.getIdString怎麽用?Java PluginId.getIdString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.openapi.extensions.PluginId
的用法示例。
在下文中一共展示了PluginId.getIdString方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onDescriptorDownload
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
/**
* Should be called whenever a list of plugins is loaded from a repository to check if there is an updated version.
*/
public void onDescriptorDownload(@NotNull IdeaPluginDescriptor descriptor) {
PluginId id = descriptor.getPluginId();
IdeaPluginDescriptor existing = PluginManager.getPlugin(id);
if (existing == null || (existing.isBundled() && !existing.allowBundledUpdate()) || wasUpdated(id)) {
return;
}
boolean supersedes = !PluginManagerCore.isIncompatible(descriptor) &&
(PluginDownloader.compareVersionsSkipBrokenAndIncompatible(existing, descriptor.getVersion()) > 0);
String idString = id.getIdString();
synchronized (myLock) {
if (supersedes) {
myOutdatedPlugins.add(idString);
}
else {
myOutdatedPlugins.remove(idString);
}
}
}
示例2: getPluginInfo
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
@NonNls
private static String getPluginInfo(@Nullable PluginId id) {
if (id != null) {
final IdeaPluginDescriptor plugin = PluginManager.getPlugin(id);
if (plugin != null) {
String name = plugin.getName();
if (name == null) {
name = id.getIdString();
}
return " Plugin: " + name;
}
}
return "";
}
示例3: Plugin
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
public Plugin(PluginId pluginId, String pluginName, boolean bundled) {
myPluginId = pluginId.getIdString();
myBundled = bundled;
myPluginName = pluginName;
}
示例4: getPath
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
@NotNull
private String getPath(@NotNull PluginId pluginId, @NotNull String path) {
return ScratchFileService.getInstance().getRootPath(this) + "/" + pluginId.getIdString() + (StringUtil.isEmpty(path) ? "" : "/" + path);
}