use of com.intellij.openapi.extensions.impl.ExtensionsAreaImpl in project intellij-community by JetBrains.
the class Extensions method cleanRootArea.
@TestOnly
public static void cleanRootArea(@NotNull Disposable parentDisposable) {
final ExtensionsAreaImpl oldRootArea = (ExtensionsAreaImpl) getRootArea();
final ExtensionsAreaImpl newArea = createRootArea();
ourRootArea = newArea;
oldRootArea.notifyAreaReplaced();
Disposer.register(parentDisposable, new Disposable() {
@Override
public void dispose() {
ourRootArea = oldRootArea;
newArea.notifyAreaReplaced();
}
});
}
use of com.intellij.openapi.extensions.impl.ExtensionsAreaImpl in project intellij-community by JetBrains.
the class Extensions method createRootArea.
@NotNull
private static ExtensionsAreaImpl createRootArea() {
ExtensionsAreaImpl rootArea = new ExtensionsAreaImpl(null, null, null, ourLogger);
rootArea.registerExtensionPoint(AREA_LISTENER_EXTENSION_POINT.getName(), AreaListener.class.getName());
return rootArea;
}
use of com.intellij.openapi.extensions.impl.ExtensionsAreaImpl in project intellij-community by JetBrains.
the class Extensions method instantiateArea.
public static void instantiateArea(@NonNls @NotNull String areaClass, @NotNull AreaInstance areaInstance, @Nullable("null means root") AreaInstance parentAreaInstance) {
AreaClassConfiguration configuration = ourAreaClass2Configuration.get(areaClass);
if (configuration == null) {
throw new IllegalArgumentException("Area class is not registered: " + areaClass);
}
ExtensionsArea parentArea = getArea(parentAreaInstance);
if (!equals(parentArea.getAreaClass(), configuration.getParentClassName())) {
throw new IllegalArgumentException("Wrong parent area. Expected class: " + configuration.getParentClassName() + " actual class: " + parentArea.getAreaClass());
}
ExtensionsAreaImpl area = new ExtensionsAreaImpl(areaClass, areaInstance, parentArea.getPicoContainer(), ourLogger);
if (ourAreaInstance2area.put(areaInstance, area) != null) {
throw new IllegalArgumentException("Area already instantiated for: " + areaInstance);
}
for (AreaListener listener : getAreaListeners()) {
listener.areaCreated(areaClass, areaInstance);
}
}
Aggregations