本文整理汇总了Java中com.intellij.ide.ClassUtilCore类的典型用法代码示例。如果您正苦于以下问题:Java ClassUtilCore类的具体用法?Java ClassUtilCore怎么用?Java ClassUtilCore使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClassUtilCore类属于com.intellij.ide包,在下文中一共展示了ClassUtilCore类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadDescriptors
import com.intellij.ide.ClassUtilCore; //导入依赖的package包/类
@NotNull
public static IdeaPluginDescriptorImpl[] loadDescriptors(@Nullable StartupProgress progress, @NotNull List<String> errors) {
if (ClassUtilCore.isLoadingOfExternalPluginsDisabled()) {
return IdeaPluginDescriptorImpl.EMPTY_ARRAY;
}
final List<IdeaPluginDescriptorImpl> result = new ArrayList<IdeaPluginDescriptorImpl>();
int pluginsCount = countPlugins(PathManager.getPluginsPath()) + countPlugins(PathManager.getPreInstalledPluginsPath());
loadDescriptors(PathManager.getPluginsPath(), result, progress, pluginsCount);
Application application = ApplicationManager.getApplication();
boolean fromSources = false;
if (application == null || !application.isUnitTestMode()) {
int size = result.size();
loadDescriptors(PathManager.getPreInstalledPluginsPath(), result, progress, pluginsCount);
fromSources = size == result.size();
}
loadDescriptorsFromProperty(result);
loadDescriptorsFromClassPath(result, getClassLoaderUrls(), fromSources ? progress : null);
return topoSortPlugins(result, errors);
}
示例2: initPlugins
import com.intellij.ide.ClassUtilCore; //导入依赖的package包/类
private static void initPlugins(@Nullable StartupProgress progress) {
long start = System.currentTimeMillis();
try {
initializePlugins(progress);
}
catch (RuntimeException e) {
getLogger().error(e);
throw e;
}
getLogger().info(ourPlugins.length + " plugins initialized in " + (System.currentTimeMillis() - start) + " ms");
logPlugins();
ClassUtilCore.clearJarURLCache();
}
示例3: loadDescriptors
import com.intellij.ide.ClassUtilCore; //导入依赖的package包/类
public static IdeaPluginDescriptorImpl[] loadDescriptors(@Nullable StartupProgress progress) {
if (ClassUtilCore.isLoadingOfExternalPluginsDisabled()) {
return IdeaPluginDescriptorImpl.EMPTY_ARRAY;
}
final List<IdeaPluginDescriptorImpl> result = new ArrayList<IdeaPluginDescriptorImpl>();
int pluginsCount = countPlugins(PathManager.getPluginsPath()) + countPlugins(PathManager.getPreinstalledPluginsPath());
loadDescriptors(PathManager.getPluginsPath(), result, progress, pluginsCount);
Application application = ApplicationManager.getApplication();
boolean fromSources = false;
if (application == null || !application.isUnitTestMode()) {
int size = result.size();
loadDescriptors(PathManager.getPreinstalledPluginsPath(), result, progress, pluginsCount);
fromSources = size == result.size();
}
loadDescriptorsFromProperty(result);
loadDescriptorsFromClassPath(result, fromSources ? progress : null);
IdeaPluginDescriptorImpl[] pluginDescriptors = result.toArray(new IdeaPluginDescriptorImpl[result.size()]);
try {
Arrays.sort(pluginDescriptors, new PluginDescriptorComparator(pluginDescriptors));
}
catch (Exception e) {
prepareLoadingPluginsErrorMessage(IdeBundle.message("error.plugins.were.not.loaded", e.getMessage()));
getLogger().info(e);
return findCorePlugin(pluginDescriptors);
}
return pluginDescriptors;
}
示例4: initPlugins
import com.intellij.ide.ClassUtilCore; //导入依赖的package包/类
public static void initPlugins(@Nullable StartupProgress progress) {
long start = System.currentTimeMillis();
try {
initializePlugins(progress);
}
catch (RuntimeException e) {
getLogger().error(e);
throw e;
}
getLogger().info(ourPlugins.length + " plugins initialized in " + (System.currentTimeMillis() - start) + " ms");
logPlugins();
ClassUtilCore.clearJarURLCache();
}