本文整理匯總了Java中com.intellij.openapi.extensions.PluginId.getId方法的典型用法代碼示例。如果您正苦於以下問題:Java PluginId.getId方法的具體用法?Java PluginId.getId怎麽用?Java PluginId.getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.openapi.extensions.PluginId
的用法示例。
在下文中一共展示了PluginId.getId方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createPluginNode
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
@Nullable
public static PluginNode createPluginNode(@Nullable String host, @NotNull PluginDownloader downloader) {
IdeaPluginDescriptor descriptor = downloader.getDescriptor();
if (descriptor instanceof PluginNode) {
return (PluginNode)descriptor;
}
PluginNode node = new PluginNode(PluginId.getId(downloader.getPluginId()));
node.setName(downloader.getPluginName());
node.setVersion(downloader.getPluginVersion());
node.setRepositoryName(host);
node.setDownloadUrl(downloader.myPluginUrl);
node.setDepends(downloader.getDepends(), null);
node.setDescription(downloader.getDescription());
return node;
}
示例2: isPluginActive
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
public static boolean isPluginActive(final String id) {
final PluginId pluginId = PluginId.getId(id);
if (pluginId == null) {
return false;
}
final IdeaPluginDescriptor plugin = PluginManager.getPlugin(pluginId);
if (plugin == null) {
return false;
}
return plugin.isEnabled();
}
示例3: getCorePluginSubmitter
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
@Nullable
private static ErrorReportSubmitter getCorePluginSubmitter(ErrorReportSubmitter[] reporters) {
for (ErrorReportSubmitter reporter : reporters) {
final PluginDescriptor descriptor = reporter.getPluginDescriptor();
if (descriptor == null || PluginId.getId(PluginManagerCore.CORE_PLUGIN_ID) == descriptor.getPluginId()) {
return reporter;
}
}
return null;
}
示例4: registerExtensionPoint
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
public static <T> ExtensionPointImpl<T> registerExtensionPoint(
ExtensionsAreaImpl extensionsArea, ExtensionPointName<T> name, Class<T> type) {
PluginDescriptor pluginDescriptor =
new DefaultPluginDescriptor(PluginId.getId(type.getName()), type.getClassLoader());
extensionsArea.registerExtensionPoint(name.getName(), type.getName(), pluginDescriptor);
return extensionsArea.getExtensionPoint(name.getName());
}
示例5: setName
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
public void setName(String name) {
if (id == null) {
id = PluginId.getId(name);
}
this.name = name;
}
示例6: setId
import com.intellij.openapi.extensions.PluginId; //導入方法依賴的package包/類
public void setId(String id) {
this.id = PluginId.getId(id);
}