Search in sources :

Example 1 with AssetDetailEvent

use of org.kie.workbench.common.screens.library.client.events.AssetDetailEvent in project kie-wb-common by kiegroup.

the class LibraryPlaces method onNewResourceCreated.

public void onNewResourceCreated(@Observes final NewResourceSuccessEvent newResourceSuccessEvent) {
    if (isLibraryPerspectiveOpen()) {
        assetDetailEvent.fire(new AssetDetailEvent(projectContext.getActiveWorkspaceProject().orElseThrow(() -> new IllegalStateException("Cannot fire asset detail event without an active project.")), newResourceSuccessEvent.getPath()));
        placeManager.closePlace(LibraryPlaces.ADD_ASSET_SCREEN);
    }
}
Also used : AssetDetailEvent(org.kie.workbench.common.screens.library.client.events.AssetDetailEvent)

Aggregations

AssetDetailEvent (org.kie.workbench.common.screens.library.client.events.AssetDetailEvent)1