use of com.intellij.openapi.components.ComponentConfig in project intellij-community by JetBrains.
the class ComponentManagerImpl method getComponentConfigs.
@NotNull
private List<ComponentConfig> getComponentConfigs(final ProgressIndicator indicator) {
ArrayList<ComponentConfig> componentConfigs = new ArrayList<>();
boolean isDefaultProject = this instanceof Project && ((Project) this).isDefault();
boolean headless = ApplicationManager.getApplication().isHeadlessEnvironment();
for (IdeaPluginDescriptor plugin : PluginManagerCore.getPlugins((message, progress) -> indicator.setFraction(progress))) {
if (PluginManagerCore.shouldSkipPlugin(plugin)) {
continue;
}
ComponentConfig[] configs = getMyComponentConfigsFromDescriptor(plugin);
componentConfigs.ensureCapacity(componentConfigs.size() + configs.length);
for (ComponentConfig config : configs) {
if ((!isDefaultProject || config.isLoadForDefaultProject()) && isComponentSuitable(config.options) && config.prepareClasses(headless)) {
config.pluginDescriptor = plugin;
componentConfigs.add(config);
}
}
}
return componentConfigs;
}
use of com.intellij.openapi.components.ComponentConfig in project intellij-community by JetBrains.
the class ComponentManagerImpl method init.
protected final void init(@Nullable ProgressIndicator indicator, @Nullable Runnable componentsRegistered) {
List<ComponentConfig> componentConfigs = getComponentConfigs(indicator);
for (ComponentConfig config : componentConfigs) {
registerComponents(config);
}
myComponentConfigCount = componentConfigs.size();
if (componentsRegistered != null) {
componentsRegistered.run();
}
createComponents(indicator);
myComponentsCreated = true;
}
Aggregations