Search in sources :

Example 11 with Promise

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

the class KieTextEditorPresenter 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(versionRecordManager.getCurrentPath(), getRenameValidator()).addRename(getSaveAndRename()).addDelete(versionRecordManager.getPathToLatest(), assetUpdateValidator);
            }
            addDownloadMenuItem(fileMenuBuilder);
            fileMenuBuilder.addNewTopLevelMenu(versionRecordManager.buildMenu()).addNewTopLevelMenu(alertsButtonMenuItemBuilder.build());
            return promises.resolve();
        });
    }
    return promises.resolve();
}
Also used : ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) WorkbenchPartTitleDecoration(org.uberfire.client.annotations.WorkbenchPartTitleDecoration) PlaceManager(org.uberfire.client.mvp.PlaceManager) 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) IsWidget(com.google.gwt.user.client.ui.IsWidget) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject) HasBusyIndicatorDefaultErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback) AceEditorMode(org.uberfire.ext.widgets.common.client.ace.AceEditorMode) BusyIndicatorView(org.uberfire.ext.widgets.common.client.common.BusyIndicatorView) DefaultEditorContent(org.kie.workbench.common.screens.defaulteditor.service.DefaultEditorContent) 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) TextResourceType(org.uberfire.ext.widgets.core.client.editors.texteditor.TextResourceType) PlaceRequest(org.uberfire.mvp.PlaceRequest) WorkbenchMenu(org.uberfire.client.annotations.WorkbenchMenu) Consumer(java.util.function.Consumer) DefaultEditorService(org.kie.workbench.common.screens.defaulteditor.service.DefaultEditorService) 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) PostConstruct(javax.annotation.PostConstruct) OnClose(org.uberfire.lifecycle.OnClose) DefaultFileNameValidator(org.uberfire.ext.editor.commons.client.validation.DefaultFileNameValidator) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject)

Example 12 with Promise

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

the class AbstractProjectDiagramEditor method makeMenuBar.

@Override
protected Promise<Void> makeMenuBar() {
    if (!menuBarInitialized) {
        menuSessionItems.populateMenu(fileMenuBuilder);
        makeAdditionalStunnerMenus(fileMenuBuilder);
        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(versionRecordManager.getCurrentPath(), assetUpdateValidator).addRename(getSaveAndRename()).addDelete(versionRecordManager.getPathToLatest(), assetUpdateValidator);
                }
                addDownloadMenuItem(fileMenuBuilder);
                fileMenuBuilder.addNewTopLevelMenu(versionRecordManager.buildMenu()).addNewTopLevelMenu(alertsButtonMenuItemBuilder.build());
                menuBarInitialized = true;
                return promises.resolve();
            });
        }
    }
    return promises.resolve();
}
Also used : ValidationUtils(org.kie.workbench.common.stunner.core.validation.impl.ValidationUtils) StunnerProjectClientConstants(org.kie.workbench.common.stunner.project.client.resources.i18n.StunnerProjectClientConstants) ChangeTitleWidgetEvent(org.uberfire.client.workbench.events.ChangeTitleWidgetEvent) ClientResourceType(org.uberfire.client.workbench.type.ClientResourceType) PathPlaceRequest(org.uberfire.mvp.impl.PathPlaceRequest) NotificationEvent(org.uberfire.workbench.events.NotificationEvent) ClientRuntimeError(org.kie.workbench.common.stunner.core.client.service.ClientRuntimeError) SaveAndRenameCommandBuilder(org.uberfire.ext.editor.commons.client.menu.common.SaveAndRenameCommandBuilder) KieEditorView(org.kie.workbench.common.widgets.metadata.client.KieEditorView) SessionPresenter(org.kie.workbench.common.stunner.client.widgets.presenters.session.SessionPresenter) ClientTranslationService(org.kie.workbench.common.stunner.core.client.i18n.ClientTranslationService) DocumentationView(org.kie.workbench.common.stunner.core.documentation.DocumentationView) DiagramElementViolation(org.kie.workbench.common.stunner.core.validation.DiagramElementViolation) ProjectDiagram(org.kie.workbench.common.stunner.project.diagram.ProjectDiagram) ProjectMessagesListener(org.kie.workbench.common.stunner.project.client.screens.ProjectMessagesListener) Observes(javax.enterprise.event.Observes) DefinitionManager(org.kie.workbench.common.stunner.core.api.DefinitionManager) IsWidget(com.google.gwt.user.client.ui.IsWidget) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject) BaseEditorView(org.uberfire.ext.editor.commons.client.BaseEditorView) OnSessionErrorEvent(org.kie.workbench.common.stunner.core.client.session.event.OnSessionErrorEvent) Collection(java.util.Collection) Violation(org.kie.workbench.common.stunner.core.validation.Violation) ClientProjectDiagramService(org.kie.workbench.common.stunner.project.client.service.ClientProjectDiagramService) YesNoCancelPopup(org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup) RemoteCallback(org.jboss.errai.common.client.api.RemoteCallback) ClientSession(org.kie.workbench.common.stunner.core.client.session.ClientSession) SupportsSaveAndRename(org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename) Logger(java.util.logging.Logger) PlaceRequest(org.uberfire.mvp.PlaceRequest) Objects(java.util.Objects) KieEditor(org.kie.workbench.common.widgets.metadata.client.KieEditor) ObservablePath(org.uberfire.backend.vfs.ObservablePath) Caller(org.jboss.errai.common.client.api.Caller) Annotation(java.lang.annotation.Annotation) PostConstruct(javax.annotation.PostConstruct) Optional(java.util.Optional) ProvidesResize(com.google.gwt.user.client.ui.ProvidesResize) ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) RequiresResize(com.google.gwt.user.client.ui.RequiresResize) Promise(elemental2.promise.Promise) Supplier(java.util.function.Supplier) Level(java.util.logging.Level) ClientSessionCommand(org.kie.workbench.common.stunner.core.client.session.command.ClientSessionCommand) RuleViolation(org.kie.workbench.common.stunner.core.rule.RuleViolation) CommonConstants(org.kie.workbench.common.widgets.client.resources.i18n.CommonConstants) ProjectMetadata(org.kie.workbench.common.stunner.project.diagram.ProjectMetadata) ServiceCallback(org.kie.workbench.common.stunner.core.client.service.ServiceCallback) Path(org.uberfire.backend.vfs.Path) Command(org.uberfire.mvp.Command) Event(javax.enterprise.event.Event) OnDiagramFocusEvent(org.kie.workbench.common.stunner.project.client.editor.event.OnDiagramFocusEvent) StunnerWidgetsConstants(org.kie.workbench.common.stunner.client.widgets.resources.i18n.StunnerWidgetsConstants) StunnerEditor(org.kie.workbench.common.stunner.client.widgets.editor.StunnerEditor) DocumentationPage(org.kie.workbench.common.stunner.core.documentation.DocumentationPage) OnDiagramLoseFocusEvent(org.kie.workbench.common.stunner.project.client.editor.event.OnDiagramLoseFocusEvent) FileMenuBuilder(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder) ProjectDiagramResourceService(org.kie.workbench.common.stunner.project.service.ProjectDiagramResourceService) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject)

Example 13 with Promise

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

the class DMNMarshallerImportsClientHelper method loadNodes.

private Promise<List<DMNIncludedNode>> loadNodes(final Map<String, JSITDefinitions> existingDefinitions, final DMNIncludedModel model, final List<DMNIncludedNode> result) {
    String filePath = "";
    for (final Map.Entry<String, JSITDefinitions> entry : existingDefinitions.entrySet()) {
        filePath = entry.getKey();
        final JSITDefinitions definitions = Js.uncheckedCast(entry.getValue());
        if (Objects.equals(model.getNamespace(), definitions.getNamespace())) {
            break;
        }
    }
    if (isEmpty(filePath)) {
        return promises.resolve();
    }
    final String path = filePath;
    return dmnImportsContentService.loadFile(path).then(content -> promises.create((success, fail) -> dmnImportsService.getDRGElements(content, new ServiceCallback<List<DRGElement>>() {

        @Override
        public void onSuccess(final List<DRGElement> drgElements) {
            final List<DMNIncludedNode> nodes = drgElements.stream().map(node -> includedModelFactory.makeDMNIncludeNode(path, model, node)).collect(Collectors.toList());
            result.addAll(nodes);
            success.onInvoke(nodes);
        }

        @Override
        public void onError(final ClientRuntimeError error) {
            LOGGER.log(Level.SEVERE, error.getMessage());
            fail.onInvoke(error);
        }
    })));
}
Also used : JSITInvocable(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocable) Arrays(java.util.Arrays) Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) PMMLDocumentMetadata(org.kie.workbench.common.dmn.api.editors.included.PMMLDocumentMetadata) JSITDMNElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElement) Promises(org.uberfire.client.promise.Promises) JSITInputData(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInputData) BuiltInTypeUtils.isBuiltInType(org.kie.workbench.common.dmn.api.editors.types.BuiltInTypeUtils.isBuiltInType) HashMap(java.util.HashMap) JSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecision) Promise(elemental2.promise.Promise) ClientRuntimeError(org.kie.workbench.common.stunner.core.client.service.ClientRuntimeError) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) Inject(javax.inject.Inject) Js(jsinterop.base.Js) Map(java.util.Map) JSITDRGElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement) JSITDefinitions(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions) ServiceCallback(org.kie.workbench.common.stunner.core.client.service.ServiceCallback) DMNMarshallerImportsHelper(org.kie.workbench.common.dmn.api.marshalling.DMNMarshallerImportsHelper) JSITItemDefinition(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITItemDefinition) StringUtils.isEmpty(org.kie.workbench.common.stunner.core.util.StringUtils.isEmpty) DMNIncludedNode(org.kie.workbench.common.dmn.api.editors.included.DMNIncludedNode) PMMLIncludedModel(org.kie.workbench.common.dmn.api.editors.included.PMMLIncludedModel) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) JSITInformationItem(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInformationItem) ItemDefinition(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition) Logger(java.util.logging.Logger) Collectors(java.util.stream.Collectors) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Objects(java.util.Objects) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement) FileUtils(org.kie.workbench.common.stunner.core.util.FileUtils) List(java.util.List) ImportedItemDefinitionPropertyConverter(org.kie.workbench.common.dmn.client.marshaller.converters.ImportedItemDefinitionPropertyConverter) JSITImport(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITImport) DMNImportTypes(org.kie.workbench.common.dmn.api.editors.included.DMNImportTypes) ImportedItemDefinitionPropertyConverter.withNamespace(org.kie.workbench.common.dmn.client.marshaller.converters.ImportedItemDefinitionPropertyConverter.withNamespace) Optional(java.util.Optional) DMNIncludedModel(org.kie.workbench.common.dmn.api.editors.included.DMNIncludedModel) IncludedModel(org.kie.workbench.common.dmn.api.editors.included.IncludedModel) QName(javax.xml.namespace.QName) Comparator(java.util.Comparator) Collections(java.util.Collections) ClientRuntimeError(org.kie.workbench.common.stunner.core.client.service.ClientRuntimeError) ArrayList(java.util.ArrayList) List(java.util.List) HashMap(java.util.HashMap) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) JSITDefinitions(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions) JSITDRGElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement)

Example 14 with Promise

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

the class DataModelerScreenPresenter method makeMenuBar.

@Override
protected Promise<Void> makeMenuBar() {
    if (!workbenchContext.getActiveWorkspaceProject().isPresent()) {
        return promises.resolve();
    }
    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(() -> onCopy()).addRename(() -> onSafeRename()).addDelete(() -> onSafeDelete());
        }
        addDownloadMenuItem(fileMenuBuilder);
        fileMenuBuilder.addValidate(getValidateCommand()).addNewTopLevelMenu(versionRecordManager.buildMenu()).addNewTopLevelMenu(alertsButtonMenuItemBuilder.build());
        return promises.resolve();
    });
}
Also used : WorkbenchPartTitleDecoration(org.uberfire.client.annotations.WorkbenchPartTitleDecoration) LockRequiredEvent(org.uberfire.client.mvp.LockRequiredEvent) ValidationMessage(org.guvnor.common.services.shared.validation.model.ValidationMessage) AuthorizationManager(org.uberfire.security.authz.AuthorizationManager) DataModelSaved(org.kie.workbench.common.screens.datamodeller.events.DataModelSaved) NotificationEvent(org.uberfire.workbench.events.NotificationEvent) PublishBaseEvent(org.guvnor.messageconsole.events.PublishBaseEvent) KieEditorView(org.kie.workbench.common.widgets.metadata.client.KieEditorView) SystemMessage(org.guvnor.messageconsole.events.SystemMessage) ButtonType(org.gwtbootstrap3.client.ui.constants.ButtonType) DataModelerWorkbenchContext(org.kie.workbench.common.screens.datamodeller.client.context.DataModelerWorkbenchContext) Observes(javax.enterprise.event.Observes) DataObjectChangeEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectChangeEvent) ShowAssetUsagesDisplayer(org.kie.workbench.common.services.refactoring.client.usages.ShowAssetUsagesDisplayer) SessionInfo(org.uberfire.rpc.SessionInfo) IsWidget(com.google.gwt.user.client.ui.IsWidget) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject) DataModelerError(org.kie.workbench.common.screens.datamodeller.model.DataModelerError) EditJavaSourceWidget(org.kie.workbench.common.screens.javaeditor.client.widget.EditJavaSourceWidget) DataObjectDeletedEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectDeletedEvent) DataObjectFieldDeletedEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectFieldDeletedEvent) DataObjectFieldChangeEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectFieldChangeEvent) DataModelStatusChangeEvent(org.kie.workbench.common.screens.datamodeller.events.DataModelStatusChangeEvent) DataObjectSelectedEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectSelectedEvent) 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) TypeInfoResult(org.kie.workbench.common.screens.datamodeller.model.TypeInfoResult) DataModelerService(org.kie.workbench.common.screens.datamodeller.service.DataModelerService) PlaceRequest(org.uberfire.mvp.PlaceRequest) JavaTypeInfo(org.kie.workbench.common.services.datamodeller.core.JavaTypeInfo) WorkbenchMenu(org.uberfire.client.annotations.WorkbenchMenu) List(java.util.List) DataModelerWorkbenchFocusEvent(org.kie.workbench.common.screens.datamodeller.client.context.DataModelerWorkbenchFocusEvent) KieEditor(org.kie.workbench.common.widgets.metadata.client.KieEditor) ObservablePath(org.uberfire.backend.vfs.ObservablePath) Caller(org.jboss.errai.common.client.api.Caller) ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) ObjectProperty(org.kie.workbench.common.services.datamodeller.core.ObjectProperty) GenerationResult(org.kie.workbench.common.screens.datamodeller.model.GenerationResult) Constants(org.kie.workbench.common.screens.datamodeller.client.resources.i18n.Constants) FileNameAndCommitMessage(org.uberfire.ext.editor.commons.client.file.FileNameAndCommitMessage) DataObjectCreatedEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectCreatedEvent) ValidatorService(org.kie.workbench.common.screens.datamodeller.client.validation.ValidatorService) OnFocus(org.uberfire.lifecycle.OnFocus) DataModelerEvent(org.kie.workbench.common.screens.datamodeller.events.DataModelerEvent) UnpublishMessagesEvent(org.guvnor.messageconsole.events.UnpublishMessagesEvent) Promise(elemental2.promise.Promise) Inject(javax.inject.Inject) DataObjectFieldSelectedEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectFieldSelectedEvent) EditorModelContent(org.kie.workbench.common.screens.datamodeller.model.EditorModelContent) ResourceType(org.kie.workbench.common.services.refactoring.service.ResourceType) WorkbenchPartTitle(org.uberfire.client.annotations.WorkbenchPartTitle) DataModel(org.kie.workbench.common.services.datamodeller.core.DataModel) Path(org.uberfire.backend.vfs.Path) OnStartup(org.uberfire.lifecycle.OnStartup) Command(org.uberfire.mvp.Command) Event(javax.enterprise.event.Event) CopyPopUpPresenter(org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpPresenter) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) DataModelerFeatures(org.kie.workbench.common.screens.datamodeller.security.DataModelerFeatures) ValidationService(org.kie.workbench.common.services.shared.validation.ValidationService) OnMayClose(org.uberfire.lifecycle.OnMayClose) DataObjectFieldCreatedEvent(org.kie.workbench.common.screens.datamodeller.events.DataObjectFieldCreatedEvent) ValidationPopup(org.kie.workbench.common.widgets.client.popups.validation.ValidationPopup) CommandWithFileNameAndCommitMessage(org.uberfire.ext.editor.commons.client.file.CommandWithFileNameAndCommitMessage) Consumer(java.util.function.Consumer) DataModelerUtils(org.kie.workbench.common.screens.datamodeller.client.util.DataModelerUtils) JavaAssetUpdateValidator(org.kie.workbench.common.widgets.metadata.client.validation.JavaAssetUpdateValidator) PageImpl(org.uberfire.client.views.pfly.multipage.PageImpl) Message(org.jboss.errai.bus.client.api.messaging.Message) PublishBatchMessagesEvent(org.guvnor.messageconsole.events.PublishBatchMessagesEvent) Dependent(javax.enterprise.context.Dependent) CommonConstants(org.uberfire.ext.widgets.common.client.resources.i18n.CommonConstants) WorkbenchPartView(org.uberfire.client.annotations.WorkbenchPartView) OnClose(org.uberfire.lifecycle.OnClose) JavaResourceType(org.kie.workbench.common.screens.javaeditor.client.type.JavaResourceType) JavaTypeInfoImpl(org.kie.workbench.common.services.datamodeller.core.impl.JavaTypeInfoImpl) WorkbenchEditor(org.uberfire.client.annotations.WorkbenchEditor) CommandErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.CommandErrorCallback) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject)

Example 15 with Promise

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

the class GlobalsEditorPresenter 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(versionRecordManager.getCurrentPath(), assetUpdateValidator).addRename(getSaveAndRename()).addDelete(this::onDelete);
            }
            addDownloadMenuItem(fileMenuBuilder);
            fileMenuBuilder.addValidate(getValidateCommand()).addNewTopLevelMenu(versionRecordManager.buildMenu()).addNewTopLevelMenu(alertsButtonMenuItemBuilder.build());
            return promises.resolve();
        });
    }
    return promises.resolve();
}
Also used : ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) WorkbenchPartTitleDecoration(org.uberfire.client.annotations.WorkbenchPartTitleDecoration) ValidationMessage(org.guvnor.common.services.shared.validation.model.ValidationMessage) 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) GlobalsModel(org.drools.workbench.screens.globals.model.GlobalsModel) 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) Command(org.uberfire.mvp.Command) ValidationService(org.kie.workbench.common.services.shared.validation.ValidationService) 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) ValidationPopup(org.kie.workbench.common.widgets.client.popups.validation.ValidationPopup) WorkbenchMenu(org.uberfire.client.annotations.WorkbenchMenu) Consumer(java.util.function.Consumer) GlobalResourceType(org.drools.workbench.screens.globals.client.type.GlobalResourceType) List(java.util.List) KieEditor(org.kie.workbench.common.widgets.metadata.client.KieEditor) ObservablePath(org.uberfire.backend.vfs.ObservablePath) Caller(org.jboss.errai.common.client.api.Caller) WorkbenchPartView(org.uberfire.client.annotations.WorkbenchPartView) OnClose(org.uberfire.lifecycle.OnClose) WorkbenchEditor(org.uberfire.client.annotations.WorkbenchEditor) GlobalsEditorContent(org.drools.workbench.screens.globals.model.GlobalsEditorContent) GlobalsEditorService(org.drools.workbench.screens.globals.service.GlobalsEditorService) CommandErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.CommandErrorCallback) 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