public static IdeaPluginDescriptorImpl[] loadDescriptors() {
if (ClassloaderUtil.isLoadingOfExternalPluginsDisabled()) {
return IdeaPluginDescriptorImpl.EMPTY_ARRAY;
}
final List<IdeaPluginDescriptorImpl> result = new ArrayList<IdeaPluginDescriptorImpl>();
<BUG>loadDescriptors(PathManager.getPluginsPath(), result);
if (!ApplicationManager.getApplication().isUnitTestMode()) {
</BUG>
loadDescriptors(PathManager.getPreinstalledPluginsPath(), result);
}

public static IdeaPluginDescriptorImpl[] loadDescriptors() {
if (ClassloaderUtil.isLoadingOfExternalPluginsDisabled()) {
return IdeaPluginDescriptorImpl.EMPTY_ARRAY;
}
final List<IdeaPluginDescriptorImpl> result = new ArrayList<IdeaPluginDescriptorImpl>();
loadDescriptors(PathManager.getPluginsPath(), result);
Application application = ApplicationManager.getApplication();
if (application == null || !application.isUnitTestMode()) {
loadDescriptors(PathManager.getPreinstalledPluginsPath(), result);
}
