Search in sources :

Example 6 with Promise

use of elemental2.promise.Promise in project kie-wb-common by kiegroup.

the class DMNUnmarshaller method unmarshall.

private Promise<Graph> unmarshall(final Metadata metadata, final JSITDefinitions dmnDefinitions, final Map<JSITImport, JSITDefinitions> importDefinitions, final Map<JSITImport, PMMLDocumentMetadata> pmmlDocuments) {
    final Map<String, HasComponentWidths> hasComponentWidthsMap = new HashMap<>();
    final BiConsumer<String, HasComponentWidths> hasComponentWidthsConsumer = (uuid, hcw) -> {
        if (Objects.nonNull(uuid)) {
            hasComponentWidthsMap.put(uuid, hcw);
        }
    };
    // Check before the DRG creation ('ensureDRGElementExists').
    final boolean isDMNDIPresent = Optional.ofNullable(dmnDefinitions.getDMNDI()).isPresent();
    ensureDRGElementExists(dmnDefinitions);
    final Definitions wbDefinitions = DefinitionsConverter.wbFromDMN(dmnDefinitions, importDefinitions, pmmlDocuments);
    final List<NodeEntry> nodeEntries = modelToStunnerConverter.makeNodes(dmnDefinitions, importDefinitions, isDMNDIPresent, hasComponentWidthsConsumer);
    final List<JSITDecisionService> dmnDecisionServices = getDecisionServices(nodeEntries);
    // Ensure all locations are updated to relative for Stunner
    nodeEntries.forEach(e -> PointUtils.convertToRelativeBounds(e.getNode()));
    final Map<String, Diagram> stunnerDiagramsById = new HashMap<>();
    final Map<String, DMNDiagramElement> dmnDiagramsById = new HashMap<>();
    for (final DMNDiagramElement dmnDiagramElement : wbDefinitions.getDiagramElements()) {
        final String dmnDiagramId = dmnDiagramElement.getId().getValue();
        final Diagram value = factoryManager.newDiagram(dmnDiagramId, BindableAdapterUtils.getDefinitionSetId(DMNDefinitionSet.class), metadata);
        stunnerDiagramsById.put(dmnDiagramId, value);
        dmnDiagramsById.put(dmnDiagramId, dmnDiagramElement);
    }
    final DMNDiagramsSessionState state = dmnDiagramsSession.setState(metadata, stunnerDiagramsById, dmnDiagramsById);
    nodeEntries.forEach(nodeEntry -> {
        final String diagramId = nodeEntry.getDiagramId();
        final Graph graph = stunnerDiagramsById.get(diagramId).getGraph();
        graph.addNode(nodeEntry.getNode());
    });
    final Graph drgGraph = state.getDRGDiagram().getGraph();
    loadImportedItemDefinitions(wbDefinitions, importDefinitions);
    for (final Diagram value : stunnerDiagramsById.values()) {
        final Node<?, ?> dmnDiagramRoot = DMNGraphUtils.findDMNDiagramRoot(value.getGraph());
        ((View<DMNDiagram>) dmnDiagramRoot.getContent()).getDefinition().setDefinitions(wbDefinitions);
        nodeEntries.forEach(nodeEntry -> {
            if (Objects.equals(stunnerDiagramsById.get(nodeEntry.getDiagramId()), value)) {
                connectRootWithChild(dmnDiagramRoot, nodeEntry.getNode());
            }
        });
    }
    // Only connect Nodes to the Diagram that are not referenced by DecisionServices
    final List<String> references = new ArrayList<>();
    final List<JSITDecisionService> lstDecisionServices = new ArrayList<>(dmnDecisionServices);
    for (int iDS = 0; iDS < lstDecisionServices.size(); iDS++) {
        final JSITDecisionService jsiDecisionService = Js.uncheckedCast(lstDecisionServices.get(iDS));
        final List<JSITDMNElementReference> jsiEncapsulatedDecisions = jsiDecisionService.getEncapsulatedDecision();
        if (Objects.nonNull(jsiEncapsulatedDecisions)) {
            for (int i = 0; i < jsiEncapsulatedDecisions.size(); i++) {
                final JSITDMNElementReference jsiEncapsulatedDecision = Js.uncheckedCast(jsiEncapsulatedDecisions.get(i));
                references.add(jsiEncapsulatedDecision.getHref());
            }
        }
        final List<JSITDMNElementReference> jsiOutputDecisions = jsiDecisionService.getOutputDecision();
        if (Objects.nonNull(jsiOutputDecisions)) {
            for (int i = 0; i < jsiOutputDecisions.size(); i++) {
                final JSITDMNElementReference jsiOutputDecision = Js.uncheckedCast(jsiOutputDecisions.get(i));
                references.add(jsiOutputDecision.getHref());
            }
        }
    }
    // Copy ComponentWidths information
    final List<JSITComponentsWidthsExtension> extensions = findComponentsWidthsExtensions(dmnDefinitions.getDMNDI().getDMNDiagram());
    extensions.forEach(componentsWidthsExtension -> {
        // can be imported from another diagram but the extension is not imported or present in this diagram.
        if (Objects.nonNull(componentsWidthsExtension.getComponentWidths())) {
            hasComponentWidthsMap.entrySet().forEach(es -> {
                final List<JSITComponentWidths> jsiComponentWidths = componentsWidthsExtension.getComponentWidths();
                for (int i = 0; i < jsiComponentWidths.size(); i++) {
                    final JSITComponentWidths jsiWidths = Js.uncheckedCast(jsiComponentWidths.get(i));
                    if (Objects.equals(jsiWidths.getDmnElementRef(), es.getKey())) {
                        final List<Double> widths = es.getValue().getComponentWidths();
                        if (Objects.nonNull(jsiWidths.getWidth())) {
                            widths.clear();
                            for (int w = 0; w < jsiWidths.getWidth().size(); w++) {
                                final double width = jsiWidths.getWidth().get(w).doubleValue();
                                widths.add(width);
                            }
                        }
                    }
                }
            });
        }
    });
    return promises.resolve(drgGraph);
}
Also used : JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) Edge(org.kie.workbench.common.stunner.core.graph.Edge) UUID(org.kie.workbench.common.stunner.core.util.UUID) EdgeImpl(org.kie.workbench.common.stunner.core.graph.impl.EdgeImpl) Map(java.util.Map) DMNDiagramElementsUtils(org.kie.workbench.common.dmn.client.marshaller.common.DMNDiagramElementsUtils) JSITDMNElementReference(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElementReference) FactoryManager(org.kie.workbench.common.stunner.core.api.FactoryManager) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) HasComponentWidths(org.kie.workbench.common.dmn.api.definition.HasComponentWidths) Child(org.kie.workbench.common.stunner.core.graph.content.relationship.Child) ItemDefinition(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition) DMNDiagram(org.kie.workbench.common.dmn.api.definition.model.DMNDiagram) Collectors(java.util.stream.Collectors) JSITComponentWidths(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentWidths) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Objects(java.util.Objects) JSITDecisionService(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionService) List(java.util.List) DMNDiagramsSession(org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramsSession) DMNGraphUtils(org.kie.workbench.common.dmn.client.marshaller.common.DMNGraphUtils) PostConstruct(javax.annotation.PostConstruct) Optional(java.util.Optional) ApplicationScoped(javax.enterprise.context.ApplicationScoped) DMNDiagramElement(org.kie.workbench.common.dmn.api.definition.model.DMNDiagramElement) Node(org.kie.workbench.common.stunner.core.graph.Node) PMMLDocumentMetadata(org.kie.workbench.common.dmn.api.editors.included.PMMLDocumentMetadata) JSIDiagramElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.di.JSIDiagramElement) DMNDefinitionSet(org.kie.workbench.common.dmn.api.DMNDefinitionSet) Promises(org.uberfire.client.promise.Promises) HashMap(java.util.HashMap) Promise(elemental2.promise.Promise) View(org.kie.workbench.common.stunner.core.graph.content.view.View) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) Js(jsinterop.base.Js) NodeEntry(org.kie.workbench.common.dmn.client.marshaller.unmarshall.nodes.NodeEntry) DMNMarshallerImportsClientHelper(org.kie.workbench.common.dmn.client.marshaller.included.DMNMarshallerImportsClientHelper) BiConsumer(java.util.function.BiConsumer) NodeEntriesFactory(org.kie.workbench.common.dmn.client.marshaller.unmarshall.nodes.NodeEntriesFactory) JSITDefinitions(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions) BindableAdapterUtils(org.kie.workbench.common.stunner.core.definition.adapter.binding.BindableAdapterUtils) MainJs(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.MainJs) DMNDiagramsSessionState(org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramsSessionState) JSITItemDefinition(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITItemDefinition) DefinitionsConverter(org.kie.workbench.common.dmn.client.marshaller.converters.DefinitionsConverter) PointUtils(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils) DMNModelInstrumentedBase(org.kie.workbench.common.dmn.api.definition.model.DMNModelInstrumentedBase) Graph(org.kie.workbench.common.stunner.core.graph.Graph) JsUtils(org.kie.workbench.common.dmn.webapp.kogito.marshaller.mapper.JsUtils) ItemDefinitionPropertyConverter(org.kie.workbench.common.dmn.client.marshaller.converters.ItemDefinitionPropertyConverter) JSITImport(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITImport) JSITComponentsWidthsExtension(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentsWidthsExtension) JSITComponentsWidthsExtension(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentsWidthsExtension) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) HasComponentWidths(org.kie.workbench.common.dmn.api.definition.HasComponentWidths) JSITDecisionService(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionService) DMNDiagramElement(org.kie.workbench.common.dmn.api.definition.model.DMNDiagramElement) DMNDiagramsSessionState(org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramsSessionState) JSITComponentWidths(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentWidths) JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) DMNDiagram(org.kie.workbench.common.dmn.api.definition.model.DMNDiagram) Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) JSITDefinitions(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions) JSITDMNElementReference(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElementReference) DMNDefinitionSet(org.kie.workbench.common.dmn.api.DMNDefinitionSet) JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) DMNDiagram(org.kie.workbench.common.dmn.api.definition.model.DMNDiagram) Graph(org.kie.workbench.common.stunner.core.graph.Graph) NodeEntry(org.kie.workbench.common.dmn.client.marshaller.unmarshall.nodes.NodeEntry)

Example 7 with Promise

use of elemental2.promise.Promise in project kie-wb-common by kiegroup.

the class SettingsScreenPresenter method setupSection.

Promise<Object> setupSection(final SpaceScreenModel model, final Section<SpaceScreenModel> section) {
    return section.setup(model).then(i -> {
        sectionManager.resetDirtyIndicator(section);
        return promises.resolve();
    }).catch_(e -> {
        sectionManager.remove(section);
        notificationEvent.fire(new NotificationEvent(getSectionSetupErrorMessage(section), WARNING));
        return promises.resolve();
    });
}
Also used : HasBusyIndicator(org.uberfire.ext.widgets.common.client.common.HasBusyIndicator) SectionManager(org.kie.workbench.common.screens.library.client.settings.util.sections.SectionManager) Promises(org.uberfire.client.promise.Promises) SpaceSettings(org.kie.workbench.common.screens.library.client.screens.organizationalunit.settings.annotation.SpaceSettings) NotificationEvent(org.uberfire.workbench.events.NotificationEvent) Promise(elemental2.promise.Promise) Supplier(java.util.function.Supplier) SettingsSectionChange(org.kie.workbench.common.screens.library.client.settings.SettingsSectionChange) ArrayList(java.util.ArrayList) SettingsSectionChangeType(org.kie.workbench.common.screens.library.client.settings.SettingsSectionChangeType) Inject(javax.inject.Inject) ERROR(org.uberfire.workbench.events.NotificationEvent.NotificationType.ERROR) HTMLElement(elemental2.dom.HTMLElement) Observes(javax.enterprise.event.Observes) SettingsSections(org.kie.workbench.common.screens.library.client.settings.sections.SettingsSections) OrganizationalUnitController(org.guvnor.structure.client.security.OrganizationalUnitController) Event(javax.enterprise.event.Event) OrganizationalUnit(org.guvnor.structure.organizationalunit.OrganizationalUnit) LibraryConstants(org.kie.workbench.common.screens.library.client.resources.i18n.LibraryConstants) BusyIndicatorView(org.uberfire.ext.widgets.common.client.common.BusyIndicatorView) TranslationService(org.jboss.errai.ui.client.local.spi.TranslationService) WARNING(org.uberfire.workbench.events.NotificationEvent.NotificationType.WARNING) WorkspaceProjectContext(org.guvnor.common.services.project.client.context.WorkspaceProjectContext) SpaceScreenModel(org.kie.workbench.common.screens.library.api.settings.SpaceScreenModel) List(java.util.List) Collectors.toList(java.util.stream.Collectors.toList) Stream(java.util.stream.Stream) Dependent(javax.enterprise.context.Dependent) SUCCESS(org.uberfire.workbench.events.NotificationEvent.NotificationType.SUCCESS) PostConstruct(javax.annotation.PostConstruct) Section(org.kie.workbench.common.screens.library.client.settings.util.sections.Section) UberElement(org.uberfire.client.mvp.UberElement) NotificationEvent(org.uberfire.workbench.events.NotificationEvent)

Example 8 with Promise

use of elemental2.promise.Promise in project kie-wb-common by kiegroup.

the class SettingsPresenter method setupSection.

Promise<Object> setupSection(final ProjectScreenModel model, final Section<ProjectScreenModel> section) {
    return section.setup(model).then(i -> {
        sectionManager.resetDirtyIndicator(section);
        return promises.resolve();
    }).catch_(e -> {
        sectionManager.remove(section);
        notificationEvent.fire(new NotificationEvent(getSectionSetupErrorMessage(section), WARNING));
        return promises.resolve();
    });
}
Also used : ConcurrentChangePopup.newConcurrentUpdate(org.uberfire.ext.widgets.common.client.common.ConcurrentChangePopup.newConcurrentUpdate) HasBusyIndicator(org.uberfire.ext.widgets.common.client.common.HasBusyIndicator) SectionManager(org.kie.workbench.common.screens.library.client.settings.util.sections.SectionManager) Promises(org.uberfire.client.promise.Promises) ManagedInstance(org.jboss.errai.ioc.client.api.ManagedInstance) SavePopUpPresenter(org.uberfire.ext.editor.commons.client.file.popups.SavePopUpPresenter) NotificationEvent(org.uberfire.workbench.events.NotificationEvent) Promise(elemental2.promise.Promise) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ERROR(org.uberfire.workbench.events.NotificationEvent.NotificationType.ERROR) HTMLElement(elemental2.dom.HTMLElement) Observes(javax.enterprise.event.Observes) SettingsSections(org.kie.workbench.common.screens.library.client.settings.sections.SettingsSections) ProjectScreenService(org.kie.workbench.common.screens.projecteditor.service.ProjectScreenService) Customizable(org.uberfire.annotations.Customizable) Event(javax.enterprise.event.Event) ProjectScreenModel(org.kie.workbench.common.screens.projecteditor.model.ProjectScreenModel) WARNING(org.uberfire.workbench.events.NotificationEvent.NotificationType.WARNING) WorkspaceProjectContext(org.guvnor.common.services.project.client.context.WorkspaceProjectContext) List(java.util.List) DeploymentMode(org.guvnor.common.services.project.service.DeploymentMode) Collectors.toList(java.util.stream.Collectors.toList) Stream(java.util.stream.Stream) GAVAlreadyExistsException(org.guvnor.common.services.project.service.GAVAlreadyExistsException) Dependent(javax.enterprise.context.Dependent) ConflictingRepositoriesPopup(org.guvnor.common.services.project.client.repositories.ConflictingRepositoriesPopup) ObservablePath(org.uberfire.backend.vfs.ObservablePath) SUCCESS(org.uberfire.workbench.events.NotificationEvent.NotificationType.SUCCESS) Caller(org.jboss.errai.common.client.api.Caller) PostConstruct(javax.annotation.PostConstruct) ProjectController(org.guvnor.common.services.project.client.security.ProjectController) Section(org.kie.workbench.common.screens.library.client.settings.util.sections.Section) UberElemental(org.uberfire.client.mvp.UberElemental) NotificationEvent(org.uberfire.workbench.events.NotificationEvent)

Example 9 with Promise

use of elemental2.promise.Promise in project kie-wb-common by kiegroup.

the class ProjectImportsScreenPresenter method makeMenuBar.

@Override
protected Promise<Void> makeMenuBar() {
    if (workbenchContext.getActiveWorkspaceProject().isPresent()) {
        final WorkspaceProject activeProject = workbenchContext.getActiveWorkspaceProject().get();
        return projectController.canUpdateProject(activeProject).then(canUpdateProject -> {
            if (canUpdateProject) {
                final ParameterizedCommand<Boolean> onSave = withComments -> {
                    saveWithComments = withComments;
                    saveAction();
                };
                this.fileMenuBuilder.addSave(versionRecordManager.newSaveMenuItem(onSave)).addCopy(versionRecordManager.getCurrentPath(), getRenameValidator()).addRename(getSaveAndRename()).addDelete(versionRecordManager.getPathToLatest(), getRenameValidator());
            }
            addDownloadMenuItem(fileMenuBuilder);
            fileMenuBuilder.addNewTopLevelMenu(versionRecordManager.buildMenu()).addNewTopLevelMenu(alertsButtonMenuItemBuilder.build());
            return promises.resolve();
        });
    }
    return promises.resolve();
}
Also used : ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) ProjectImportsResourceType(org.kie.workbench.common.screens.projectimportsscreen.client.type.ProjectImportsResourceType) NotificationEvent(org.uberfire.workbench.events.NotificationEvent) Promise(elemental2.promise.Promise) Metadata(org.guvnor.common.services.shared.metadata.model.Metadata) Supplier(java.util.function.Supplier) Inject(javax.inject.Inject) WorkbenchPartTitle(org.uberfire.client.annotations.WorkbenchPartTitle) CommonConstants(org.kie.workbench.common.widgets.client.resources.i18n.CommonConstants) IsWidget(com.google.gwt.user.client.ui.IsWidget) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject) Path(org.uberfire.backend.vfs.Path) HasBusyIndicatorDefaultErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback) OnStartup(org.uberfire.lifecycle.OnStartup) ProjectImports(org.guvnor.common.services.project.model.ProjectImports) Menus(org.uberfire.workbench.model.menu.Menus) OnMayClose(org.uberfire.lifecycle.OnMayClose) RemoteCallback(org.jboss.errai.common.client.api.RemoteCallback) SupportsSaveAndRename(org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename) PlaceRequest(org.uberfire.mvp.PlaceRequest) WorkbenchMenu(org.uberfire.client.annotations.WorkbenchMenu) Consumer(java.util.function.Consumer) KieEditor(org.kie.workbench.common.widgets.metadata.client.KieEditor) ObservablePath(org.uberfire.backend.vfs.ObservablePath) Others(org.uberfire.workbench.category.Others) Caller(org.jboss.errai.common.client.api.Caller) ProjectImportsService(org.kie.workbench.common.services.shared.project.ProjectImportsService) WorkbenchPartView(org.uberfire.client.annotations.WorkbenchPartView) ProjectImportsContent(org.kie.workbench.common.services.shared.project.ProjectImportsContent) OnClose(org.uberfire.lifecycle.OnClose) WorkbenchEditor(org.uberfire.client.annotations.WorkbenchEditor) ProjectConfigScreenConstants(org.kie.workbench.common.screens.projectimportsscreen.client.resources.i18n.ProjectConfigScreenConstants) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject)

Example 10 with Promise

use of elemental2.promise.Promise in project kie-wb-common by kiegroup.

the class FormEditorPresenter method makeMenuBar.

@Override
protected Promise<Void> makeMenuBar() {
    if (workbenchContext.getActiveWorkspaceProject().isPresent()) {
        final WorkspaceProject activeProject = workbenchContext.getActiveWorkspaceProject().get();
        return projectController.canUpdateProject(activeProject).then(canUpdateProject -> {
            if (canUpdateProject) {
                final ParameterizedCommand<Boolean> onSave = withComments -> {
                    saveWithComments = withComments;
                    saveAction();
                };
                fileMenuBuilder.addSave(versionRecordManager.newSaveMenuItem(onSave)).addCopy(this::safeCopy).addRename(this::safeRename).addDelete(this::safeDelete);
            }
            addDownloadMenuItem(fileMenuBuilder);
            fileMenuBuilder.addNewTopLevelMenu(versionRecordManager.buildMenu()).addNewTopLevelMenu(alertsButtonMenuItemBuilder.build());
            return promises.resolve();
        });
    }
    return promises.resolve();
}
Also used : FormEditorSyncPaletteEvent(org.kie.workbench.common.forms.editor.client.editor.events.FormEditorSyncPaletteEvent) FormEditorConstants(org.kie.workbench.common.forms.editor.client.resources.i18n.FormEditorConstants) ManagedInstance(org.jboss.errai.ioc.client.api.ManagedInstance) FormModelerContent(org.kie.workbench.common.forms.editor.model.FormModelerContent) FieldDefinition(org.kie.workbench.common.forms.model.FieldDefinition) NotificationEvent(org.uberfire.workbench.events.NotificationEvent) LayoutComponent(org.uberfire.ext.layout.editor.api.editor.LayoutComponent) FormEditorFieldGroupsProvider(org.kie.workbench.common.forms.editor.client.editor.groupProviders.FormEditorFieldGroupsProvider) KieEditorView(org.kie.workbench.common.widgets.metadata.client.KieEditorView) PreDestroy(javax.annotation.PreDestroy) UpdatedLockStatusEvent(org.uberfire.client.mvp.UpdatedLockStatusEvent) LayoutDragComponentPalette(org.uberfire.ext.layout.editor.client.api.LayoutDragComponentPalette) EditorFieldLayoutComponent(org.kie.workbench.common.forms.editor.client.editor.rendering.EditorFieldLayoutComponent) Observes(javax.enterprise.event.Observes) ShowAssetUsagesDisplayer(org.kie.workbench.common.services.refactoring.client.usages.ShowAssetUsagesDisplayer) IsWidget(com.google.gwt.user.client.ui.IsWidget) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject) LayoutEditorElement(org.uberfire.ext.layout.editor.client.api.LayoutEditorElement) DefaultErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.DefaultErrorCallback) ChangesNotificationDisplayer(org.kie.workbench.common.forms.editor.client.editor.changes.ChangesNotificationDisplayer) ErrorMessageDisplayer(org.kie.workbench.common.forms.editor.client.editor.errorMessage.ErrorMessageDisplayer) MetadataService(org.guvnor.common.services.shared.metadata.MetadataService) Collection(java.util.Collection) FieldLayoutComponent(org.kie.workbench.common.forms.dynamic.client.rendering.FieldLayoutComponent) RenamePopUpPresenter(org.uberfire.ext.editor.commons.client.file.popups.RenamePopUpPresenter) Menus(org.uberfire.workbench.model.menu.Menus) RemoteCallback(org.jboss.errai.common.client.api.RemoteCallback) Collectors(java.util.stream.Collectors) PlaceRequest(org.uberfire.mvp.PlaceRequest) WorkbenchMenu(org.uberfire.client.annotations.WorkbenchMenu) Objects(java.util.Objects) List(java.util.List) LayoutEditorLostFocusEvent(org.kie.workbench.common.workbench.client.events.LayoutEditorLostFocusEvent) KieEditor(org.kie.workbench.common.widgets.metadata.client.KieEditor) ObservablePath(org.uberfire.backend.vfs.ObservablePath) Caller(org.jboss.errai.common.client.api.Caller) ComponentColumn(org.uberfire.ext.layout.editor.client.components.columns.ComponentColumn) LayoutEditorFocusEvent(org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent) ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) FormModelerContentError(org.kie.workbench.common.forms.editor.model.FormModelerContentError) LayoutEditor(org.uberfire.ext.layout.editor.client.api.LayoutEditor) FileNameAndCommitMessage(org.uberfire.ext.editor.commons.client.file.FileNameAndCommitMessage) OnFocus(org.uberfire.lifecycle.OnFocus) Promise(elemental2.promise.Promise) FormDefinitionResourceType(org.kie.workbench.common.forms.editor.client.type.FormDefinitionResourceType) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) ResourceType(org.kie.workbench.common.services.refactoring.service.ResourceType) HTMLLayoutDragComponent(org.uberfire.ext.plugin.client.perspective.editor.layout.editor.HTMLLayoutDragComponent) WorkbenchPartTitle(org.uberfire.client.annotations.WorkbenchPartTitle) FileNameUtil(org.uberfire.workbench.type.FileNameUtil) FormDefinition(org.kie.workbench.common.forms.model.FormDefinition) ComponentRemovedEvent(org.uberfire.ext.layout.editor.client.api.ComponentRemovedEvent) FormEditorService(org.kie.workbench.common.forms.editor.service.shared.FormEditorService) Path(org.uberfire.backend.vfs.Path) HasBusyIndicatorDefaultErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback) OnStartup(org.uberfire.lifecycle.OnStartup) Command(org.uberfire.mvp.Command) Event(javax.enterprise.event.Event) BusyIndicatorView(org.uberfire.ext.widgets.common.client.common.BusyIndicatorView) Iterator(java.util.Iterator) TranslationService(org.jboss.errai.ui.client.local.spi.TranslationService) LayoutEditorElementSelectEvent(org.uberfire.ext.layout.editor.client.event.LayoutEditorElementSelectEvent) CopyPopUpPresenter(org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpPresenter) OnMayClose(org.uberfire.lifecycle.OnMayClose) CommandWithFileNameAndCommitMessage(org.uberfire.ext.editor.commons.client.file.CommandWithFileNameAndCommitMessage) Consumer(java.util.function.Consumer) Message(org.jboss.errai.bus.client.api.messaging.Message) Dependent(javax.enterprise.context.Dependent) LayoutTemplate(org.uberfire.ext.layout.editor.api.editor.LayoutTemplate) LayoutEditorPropertiesPresenter(org.uberfire.ext.layout.editor.client.widgets.LayoutEditorPropertiesPresenter) LayoutDragComponent(org.uberfire.ext.layout.editor.client.api.LayoutDragComponent) WorkbenchPartView(org.uberfire.client.annotations.WorkbenchPartView) WorkbenchEditor(org.uberfire.client.annotations.WorkbenchEditor) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject)

Aggregations

Promise (elemental2.promise.Promise)15 Inject (javax.inject.Inject)12 List (java.util.List)10 Caller (org.jboss.errai.common.client.api.Caller)10 Supplier (java.util.function.Supplier)9 ArrayList (java.util.ArrayList)8 Event (javax.enterprise.event.Event)8 ObservablePath (org.uberfire.backend.vfs.ObservablePath)8 NotificationEvent (org.uberfire.workbench.events.NotificationEvent)8 IsWidget (com.google.gwt.user.client.ui.IsWidget)7 PostConstruct (javax.annotation.PostConstruct)7 Observes (javax.enterprise.event.Observes)7 WorkspaceProject (org.guvnor.common.services.project.model.WorkspaceProject)7 RemoteCallback (org.jboss.errai.common.client.api.RemoteCallback)7 Promises (org.uberfire.client.promise.Promises)7 Consumer (java.util.function.Consumer)6 Dependent (javax.enterprise.context.Dependent)6 KieEditor (org.kie.workbench.common.widgets.metadata.client.KieEditor)6 ParameterizedCommand (org.uberfire.mvp.ParameterizedCommand)6 PlaceRequest (org.uberfire.mvp.PlaceRequest)6