@finos/legend-application-studio 19.1.0 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application/LegendStudioApplicationConfig.d.ts +6 -0
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +7 -0
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/EditorComponentTestUtils.d.ts +1 -1
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +23 -50
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/EmbeddedQueryBuilder.d.ts +0 -1
- package/lib/components/EmbeddedQueryBuilder.d.ts.map +1 -1
- package/lib/components/LegendStudioApplication.d.ts +0 -1
- package/lib/components/LegendStudioApplication.d.ts.map +1 -1
- package/lib/components/editor/StatusBar.d.ts +0 -1
- package/lib/components/editor/StatusBar.d.ts.map +1 -1
- package/lib/components/editor/StatusBar.js +10 -3
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts +0 -1
- package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -1
- package/lib/components/editor/aux-panel/AuxiliaryPanel.js +11 -3
- package/lib/components/editor/aux-panel/AuxiliaryPanel.js.map +1 -1
- package/lib/components/editor/aux-panel/Console.d.ts +0 -1
- package/lib/components/editor/aux-panel/Console.d.ts.map +1 -1
- package/lib/components/editor/aux-panel/Console.js +2 -1
- package/lib/components/editor/aux-panel/Console.js.map +1 -1
- package/lib/components/editor/aux-panel/DevTool.d.ts +0 -1
- package/lib/components/editor/aux-panel/DevTool.d.ts.map +1 -1
- package/lib/components/editor/aux-panel/DevTool.js +4 -7
- package/lib/components/editor/aux-panel/DevTool.js.map +1 -1
- package/lib/components/editor/aux-panel/Problems.d.ts +19 -0
- package/lib/components/editor/aux-panel/Problems.d.ts.map +1 -0
- package/lib/components/editor/aux-panel/Problems.js +48 -0
- package/lib/components/editor/aux-panel/Problems.js.map +1 -0
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts +0 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts +0 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +36 -25
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.d.ts +0 -1
- package/lib/components/editor/edit-panel/ModelImporter.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/RuntimeEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +16 -16
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +4 -4
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +20 -6
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts +0 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts +0 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/ClassMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/FlatDataPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/OperationSetImplementationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/PropertyMappingsEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/PurePropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/RelationalPropertyMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +2 -2
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/NewServiceModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/EnumerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/ProfileEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/PropertyEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts +0 -1
- package/lib/components/editor/edit-panel/uml-editor/UMLEditor.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts +0 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts +0 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +3 -3
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/LocalChanges.d.ts +0 -1
- package/lib/components/editor/side-bar/LocalChanges.d.ts.map +1 -1
- package/lib/components/editor/side-bar/ProjectOverview.d.ts +0 -1
- package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
- package/lib/components/editor/side-bar/ProjectOverview.js +3 -3
- package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
- package/lib/components/editor/side-bar/SideBar.d.ts +0 -1
- package/lib/components/editor/side-bar/SideBar.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceSyncConflictResolver.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceUpdateConflictResolver.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts +0 -1
- package/lib/components/editor/side-bar/WorkspaceUpdater.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts +0 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/shared/DiffView.d.ts +0 -1
- package/lib/components/shared/DiffView.d.ts.map +1 -1
- package/lib/components/shared/DiffView.js +2 -2
- package/lib/components/shared/DiffView.js.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts +0 -1
- package/lib/components/workspace-review/WorkspaceReviewPanel.d.ts.map +1 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts +0 -1
- package/lib/components/workspace-review/WorkspaceReviewSideBar.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.d.ts +0 -1
- package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts +0 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/ChangeDetectionState.d.ts +2 -0
- package/lib/stores/ChangeDetectionState.d.ts.map +1 -1
- package/lib/stores/ChangeDetectionState.js +12 -6
- package/lib/stores/ChangeDetectionState.js.map +1 -1
- package/lib/stores/EditorConfig.d.ts +2 -1
- package/lib/stores/EditorConfig.d.ts.map +1 -1
- package/lib/stores/EditorConfig.js +1 -0
- package/lib/stores/EditorConfig.js.map +1 -1
- package/lib/stores/EditorGraphState.d.ts +17 -16
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +152 -94
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorSDLCState.d.ts +6 -6
- package/lib/stores/EditorSDLCState.d.ts.map +1 -1
- package/lib/stores/EditorSDLCState.js +52 -27
- package/lib/stores/EditorSDLCState.js.map +1 -1
- package/lib/stores/EditorStore.js +1 -1
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.js +1 -1
- package/lib/stores/EmbeddedQueryBuilderState.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +14 -5
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor/StandardEditorMode.d.ts.map +1 -1
- package/lib/stores/editor/StandardEditorMode.js +2 -2
- package/lib/stores/editor/StandardEditorMode.js.map +1 -1
- package/lib/stores/editor-state/FileGenerationState.d.ts +3 -3
- package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/FileGenerationState.js +9 -5
- package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
- package/lib/stores/editor-state/GrammarTextEditorState.d.ts +6 -4
- package/lib/stores/editor-state/GrammarTextEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/GrammarTextEditorState.js +14 -8
- package/lib/stores/editor-state/GrammarTextEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts +0 -1
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.js +0 -5
- package/lib/stores/editor-state/element-editor-state/ClassEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +0 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +0 -3
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts +2 -2
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js +5 -4
- package/lib/stores/editor-state/element-editor-state/ElementFileGenerationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts +0 -1
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js +0 -4
- package/lib/stores/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +0 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js +0 -6
- package/lib/stores/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +6 -6
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +24 -14
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts +6 -6
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +30 -15
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts +4 -4
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +54 -44
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.d.ts +13 -13
- package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.js +71 -63
- package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
- package/lib/stores/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/ProjectOverviewState.js +19 -4
- package/lib/stores/sidebar-state/ProjectOverviewState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkflowManagerState.d.ts +8 -8
- package/lib/stores/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkflowManagerState.js +15 -11
- package/lib/stores/sidebar-state/WorkflowManagerState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts +3 -3
- package/lib/stores/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceReviewState.js +21 -6
- package/lib/stores/sidebar-state/WorkspaceReviewState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts +2 -2
- package/lib/stores/sidebar-state/WorkspaceSyncState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceSyncState.js +9 -7
- package/lib/stores/sidebar-state/WorkspaceSyncState.js.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts +2 -2
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js +8 -4
- package/lib/stores/sidebar-state/WorkspaceUpdaterState.js.map +1 -1
- package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts +2 -2
- package/lib/stores/workspace-review/WorkspaceReviewStore.d.ts.map +1 -1
- package/lib/stores/workspace-review/WorkspaceReviewStore.js +27 -10
- package/lib/stores/workspace-review/WorkspaceReviewStore.js.map +1 -1
- package/package.json +15 -15
- package/src/application/LegendStudioApplicationConfig.ts +7 -0
- package/src/components/EditorComponentTestUtils.tsx +64 -60
- package/src/components/editor/StatusBar.tsx +38 -3
- package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +32 -10
- package/src/components/editor/aux-panel/Console.tsx +4 -3
- package/src/components/editor/aux-panel/DevTool.tsx +47 -79
- package/src/components/editor/aux-panel/Problems.tsx +103 -0
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +48 -36
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +61 -61
- package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +21 -25
- package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +23 -23
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +2 -1
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +19 -22
- package/src/components/editor/side-bar/Explorer.tsx +5 -3
- package/src/components/editor/side-bar/ProjectOverview.tsx +5 -3
- package/src/components/shared/DiffView.tsx +2 -2
- package/src/stores/ChangeDetectionState.ts +17 -8
- package/src/stores/EditorConfig.ts +1 -0
- package/src/stores/EditorGraphState.ts +223 -136
- package/src/stores/EditorSDLCState.ts +65 -30
- package/src/stores/EditorStore.ts +1 -1
- package/src/stores/EmbeddedQueryBuilderState.ts +1 -1
- package/src/stores/editor/NewElementState.ts +24 -5
- package/src/stores/editor/StandardEditorMode.ts +4 -2
- package/src/stores/editor-state/FileGenerationState.ts +19 -8
- package/src/stores/editor-state/GrammarTextEditorState.ts +18 -10
- package/src/stores/editor-state/element-editor-state/ClassEditorState.ts +0 -12
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +0 -4
- package/src/stores/editor-state/element-editor-state/ElementFileGenerationState.ts +8 -6
- package/src/stores/editor-state/element-editor-state/FunctionEditorState.ts +0 -5
- package/src/stores/editor-state/element-editor-state/mapping/MappingEditorState.ts +0 -11
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +29 -15
- package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +37 -23
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +4 -3
- package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +63 -48
- package/src/stores/project-viewer/ProjectViewerStore.ts +5 -3
- package/src/stores/sidebar-state/LocalChangesState.ts +130 -115
- package/src/stores/sidebar-state/ProjectOverviewState.ts +19 -4
- package/src/stores/sidebar-state/WorkflowManagerState.ts +28 -31
- package/src/stores/sidebar-state/WorkspaceReviewState.ts +24 -8
- package/src/stores/sidebar-state/WorkspaceSyncState.ts +11 -16
- package/src/stores/sidebar-state/WorkspaceUpdaterState.ts +11 -7
- package/src/stores/workspace-review/WorkspaceReviewStore.ts +39 -12
- package/tsconfig.json +1 -0
|
@@ -14,7 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
action,
|
|
19
|
+
computed,
|
|
20
|
+
flow,
|
|
21
|
+
flowResult,
|
|
22
|
+
makeObservable,
|
|
23
|
+
observable,
|
|
24
|
+
} from 'mobx';
|
|
18
25
|
import { CHANGE_DETECTION_EVENT } from './ChangeDetectionEvent.js';
|
|
19
26
|
import { GRAPH_EDITOR_MODE, AUX_PANEL_MODE } from './EditorConfig.js';
|
|
20
27
|
import {
|
|
@@ -52,7 +59,6 @@ import {
|
|
|
52
59
|
ProjectDependencyInfo,
|
|
53
60
|
} from '@finos/legend-server-depot';
|
|
54
61
|
import {
|
|
55
|
-
type PackageableElement,
|
|
56
62
|
GRAPH_MANAGER_EVENT,
|
|
57
63
|
CompilationError,
|
|
58
64
|
EngineError,
|
|
@@ -78,9 +84,13 @@ import {
|
|
|
78
84
|
DependencyGraphBuilderError,
|
|
79
85
|
GraphDataDeserializationError,
|
|
80
86
|
GraphBuilderError,
|
|
81
|
-
type GraphBuilderReport,
|
|
82
87
|
GraphManagerTelemetry,
|
|
83
88
|
DataElement,
|
|
89
|
+
type PackageableElement,
|
|
90
|
+
type GraphBuilderReport,
|
|
91
|
+
type CompilationWarning,
|
|
92
|
+
type TextCompilationResult,
|
|
93
|
+
type CompilationResult,
|
|
84
94
|
} from '@finos/legend-graph';
|
|
85
95
|
import {
|
|
86
96
|
ActionAlertActionType,
|
|
@@ -94,7 +104,6 @@ import { graph_dispose } from './shared/modifier/GraphModifierHelper.js';
|
|
|
94
104
|
import { PACKAGEABLE_ELEMENT_TYPE } from './shared/ModelClassifierUtils.js';
|
|
95
105
|
import { GlobalTestRunnerState } from './sidebar-state/testable/GlobalTestRunnerState.js';
|
|
96
106
|
import { LEGEND_STUDIO_APP_EVENT } from './LegendStudioAppEvent.js';
|
|
97
|
-
import type { LambdaEditorState } from '@finos/legend-query-builder';
|
|
98
107
|
|
|
99
108
|
export enum GraphBuilderStatus {
|
|
100
109
|
SUCCEEDED = 'SUCCEEDED',
|
|
@@ -115,9 +124,12 @@ export interface GraphBuilderResult {
|
|
|
115
124
|
error?: Error;
|
|
116
125
|
}
|
|
117
126
|
|
|
127
|
+
export type Problem = CompilationWarning | EngineError;
|
|
128
|
+
|
|
118
129
|
export class EditorGraphState {
|
|
119
|
-
editorStore: EditorStore;
|
|
120
|
-
graphGenerationState: GraphGenerationState;
|
|
130
|
+
readonly editorStore: EditorStore;
|
|
131
|
+
readonly graphGenerationState: GraphGenerationState;
|
|
132
|
+
|
|
121
133
|
isInitializingGraph = false;
|
|
122
134
|
isRunningGlobalCompile = false;
|
|
123
135
|
isRunningGlobalGenerate = false;
|
|
@@ -125,33 +137,64 @@ export class EditorGraphState {
|
|
|
125
137
|
isUpdatingGraph = false; // critical synchronous update to refresh the graph
|
|
126
138
|
isUpdatingApplication = false; // including graph update and async operations such as change detection
|
|
127
139
|
|
|
140
|
+
warnings: CompilationWarning[] = [];
|
|
141
|
+
error: EngineError | undefined;
|
|
142
|
+
private mostRecentTextModeCompilationGraphHash: string | undefined;
|
|
143
|
+
private mostRecentFormModeCompilationGraphHash: string | undefined;
|
|
144
|
+
|
|
145
|
+
enableStrictMode = false;
|
|
146
|
+
|
|
128
147
|
constructor(editorStore: EditorStore) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
148
|
+
makeObservable<
|
|
149
|
+
EditorGraphState,
|
|
150
|
+
| 'updateGraphAndApplication'
|
|
151
|
+
| 'mostRecentFormModeCompilationGraphHash'
|
|
152
|
+
| 'mostRecentTextModeCompilationGraphHash'
|
|
153
|
+
>(this, {
|
|
154
|
+
isInitializingGraph: observable,
|
|
155
|
+
isRunningGlobalCompile: observable,
|
|
156
|
+
isRunningGlobalGenerate: observable,
|
|
157
|
+
isApplicationLeavingTextMode: observable,
|
|
158
|
+
isUpdatingGraph: observable,
|
|
159
|
+
isUpdatingApplication: observable,
|
|
160
|
+
warnings: observable,
|
|
161
|
+
error: observable,
|
|
162
|
+
mostRecentFormModeCompilationGraphHash: observable,
|
|
163
|
+
mostRecentTextModeCompilationGraphHash: observable,
|
|
164
|
+
enableStrictMode: observable,
|
|
165
|
+
problems: computed,
|
|
166
|
+
areProblemsStale: computed,
|
|
167
|
+
isApplicationUpdateOperationIsRunning: computed,
|
|
168
|
+
clearProblems: action,
|
|
169
|
+
setEnableStrictMode: action,
|
|
170
|
+
buildGraph: flow,
|
|
171
|
+
loadEntityChangesToGraph: flow,
|
|
172
|
+
globalCompileInFormMode: flow,
|
|
173
|
+
globalCompileInTextMode: flow,
|
|
174
|
+
leaveTextMode: flow,
|
|
175
|
+
updateGraphAndApplication: flow,
|
|
176
|
+
updateGenerationGraphAndApplication: flow,
|
|
135
177
|
});
|
|
136
178
|
|
|
137
179
|
this.editorStore = editorStore;
|
|
138
180
|
this.graphGenerationState = new GraphGenerationState(this.editorStore);
|
|
181
|
+
this.enableStrictMode =
|
|
182
|
+
editorStore.applicationStore.config.options.enableGraphBuilderStrictMode;
|
|
139
183
|
}
|
|
140
184
|
|
|
141
|
-
get
|
|
142
|
-
return (
|
|
143
|
-
Boolean(this.editorStore.grammarTextEditorState.error) ||
|
|
144
|
-
this.editorStore.openedEditorStates
|
|
145
|
-
.filter(filterByType(ElementEditorState))
|
|
146
|
-
.some((editorState) => editorState.hasCompilationError)
|
|
147
|
-
);
|
|
185
|
+
get problems(): Problem[] {
|
|
186
|
+
return [this.error, ...this.warnings].filter(isNonNullable);
|
|
148
187
|
}
|
|
149
188
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
189
|
+
get areProblemsStale(): boolean {
|
|
190
|
+
return (
|
|
191
|
+
(this.editorStore.isInFormMode &&
|
|
192
|
+
this.mostRecentFormModeCompilationGraphHash !==
|
|
193
|
+
this.editorStore.changeDetectionState.currentGraphHash) ||
|
|
194
|
+
(this.editorStore.isInGrammarTextMode &&
|
|
195
|
+
this.mostRecentTextModeCompilationGraphHash !==
|
|
196
|
+
this.editorStore.grammarTextEditorState.currentTextGraphHash)
|
|
197
|
+
);
|
|
155
198
|
}
|
|
156
199
|
|
|
157
200
|
get isApplicationUpdateOperationIsRunning(): boolean {
|
|
@@ -198,6 +241,64 @@ export class EditorGraphState {
|
|
|
198
241
|
return false;
|
|
199
242
|
}
|
|
200
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Get entitiy changes to prepare for syncing
|
|
246
|
+
*/
|
|
247
|
+
computeLocalEntityChanges(): EntityChange[] {
|
|
248
|
+
const baseHashesIndex = this.editorStore.isInConflictResolutionMode
|
|
249
|
+
? this.editorStore.changeDetectionState
|
|
250
|
+
.conflictResolutionHeadRevisionState.entityHashesIndex
|
|
251
|
+
: this.editorStore.changeDetectionState.workspaceLocalLatestRevisionState
|
|
252
|
+
.entityHashesIndex;
|
|
253
|
+
const originalPaths = new Set(Array.from(baseHashesIndex.keys()));
|
|
254
|
+
const entityChanges: EntityChange[] = [];
|
|
255
|
+
this.editorStore.graphManagerState.graph.allOwnElements.forEach(
|
|
256
|
+
(element) => {
|
|
257
|
+
const elementPath = element.path;
|
|
258
|
+
if (baseHashesIndex.get(elementPath) !== element.hashCode) {
|
|
259
|
+
const entity =
|
|
260
|
+
this.editorStore.graphManagerState.graphManager.elementToEntity(
|
|
261
|
+
element,
|
|
262
|
+
{
|
|
263
|
+
pruneSourceInformation: true,
|
|
264
|
+
},
|
|
265
|
+
);
|
|
266
|
+
entityChanges.push({
|
|
267
|
+
classifierPath: entity.classifierPath,
|
|
268
|
+
entityPath: element.path,
|
|
269
|
+
content: entity.content,
|
|
270
|
+
type:
|
|
271
|
+
baseHashesIndex.get(elementPath) !== undefined
|
|
272
|
+
? EntityChangeType.MODIFY
|
|
273
|
+
: EntityChangeType.CREATE,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
originalPaths.delete(elementPath);
|
|
277
|
+
},
|
|
278
|
+
);
|
|
279
|
+
Array.from(originalPaths).forEach((path) => {
|
|
280
|
+
entityChanges.push({
|
|
281
|
+
type: EntityChangeType.DELETE,
|
|
282
|
+
entityPath: path,
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
return entityChanges;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
clearProblems(): void {
|
|
289
|
+
this.error = undefined;
|
|
290
|
+
this.editorStore.openedEditorStates
|
|
291
|
+
.filter(filterByType(ElementEditorState))
|
|
292
|
+
.forEach((editorState) => editorState.clearCompilationError());
|
|
293
|
+
this.mostRecentFormModeCompilationGraphHash = undefined;
|
|
294
|
+
this.mostRecentTextModeCompilationGraphHash = undefined;
|
|
295
|
+
this.warnings = [];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
setEnableStrictMode(val: boolean): void {
|
|
299
|
+
this.enableStrictMode = val;
|
|
300
|
+
}
|
|
301
|
+
|
|
201
302
|
*buildGraph(entities: Entity[]): GeneratorFn<GraphBuilderResult> {
|
|
202
303
|
try {
|
|
203
304
|
this.isInitializingGraph = true;
|
|
@@ -242,6 +343,7 @@ export class EditorGraphState {
|
|
|
242
343
|
TEMPORARY__preserveSectionIndex:
|
|
243
344
|
this.editorStore.applicationStore.config.options
|
|
244
345
|
.TEMPORARY__preserveSectionIndex,
|
|
346
|
+
strict: this.enableStrictMode,
|
|
245
347
|
},
|
|
246
348
|
)) as GraphBuilderReport;
|
|
247
349
|
|
|
@@ -380,50 +482,6 @@ export class EditorGraphState {
|
|
|
380
482
|
this.editorStore.openState(this.editorStore.modelImporterState);
|
|
381
483
|
}
|
|
382
484
|
|
|
383
|
-
/**
|
|
384
|
-
* Get entitiy changes to prepare for syncing
|
|
385
|
-
*/
|
|
386
|
-
computeLocalEntityChanges(): EntityChange[] {
|
|
387
|
-
const baseHashesIndex = this.editorStore.isInConflictResolutionMode
|
|
388
|
-
? this.editorStore.changeDetectionState
|
|
389
|
-
.conflictResolutionHeadRevisionState.entityHashesIndex
|
|
390
|
-
: this.editorStore.changeDetectionState.workspaceLocalLatestRevisionState
|
|
391
|
-
.entityHashesIndex;
|
|
392
|
-
const originalPaths = new Set(Array.from(baseHashesIndex.keys()));
|
|
393
|
-
const entityChanges: EntityChange[] = [];
|
|
394
|
-
this.editorStore.graphManagerState.graph.allOwnElements.forEach(
|
|
395
|
-
(element) => {
|
|
396
|
-
const elementPath = element.path;
|
|
397
|
-
if (baseHashesIndex.get(elementPath) !== element.hashCode) {
|
|
398
|
-
const entity =
|
|
399
|
-
this.editorStore.graphManagerState.graphManager.elementToEntity(
|
|
400
|
-
element,
|
|
401
|
-
{
|
|
402
|
-
pruneSourceInformation: true,
|
|
403
|
-
},
|
|
404
|
-
);
|
|
405
|
-
entityChanges.push({
|
|
406
|
-
classifierPath: entity.classifierPath,
|
|
407
|
-
entityPath: element.path,
|
|
408
|
-
content: entity.content,
|
|
409
|
-
type:
|
|
410
|
-
baseHashesIndex.get(elementPath) !== undefined
|
|
411
|
-
? EntityChangeType.MODIFY
|
|
412
|
-
: EntityChangeType.CREATE,
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
originalPaths.delete(elementPath);
|
|
416
|
-
},
|
|
417
|
-
);
|
|
418
|
-
Array.from(originalPaths).forEach((path) => {
|
|
419
|
-
entityChanges.push({
|
|
420
|
-
type: EntityChangeType.DELETE,
|
|
421
|
-
entityPath: path,
|
|
422
|
-
});
|
|
423
|
-
});
|
|
424
|
-
return entityChanges;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
485
|
/**
|
|
428
486
|
* Loads entity changes to graph and updates application.
|
|
429
487
|
*/
|
|
@@ -454,8 +512,8 @@ export class EditorGraphState {
|
|
|
454
512
|
}
|
|
455
513
|
|
|
456
514
|
// TODO: when we support showing multiple notifications, we can take this options out as the only users of this
|
|
457
|
-
// is delete element flow, where we want to say `re-compiling graph after deletion`, but because compilation
|
|
458
|
-
//
|
|
515
|
+
// is delete element flow, where we want to say `re-compiling graph after deletion`, but because sometimes, compilation
|
|
516
|
+
// is so fast, the message flashes, so we want to combine with the message in this method
|
|
459
517
|
*globalCompileInFormMode(options?: {
|
|
460
518
|
message?: string;
|
|
461
519
|
disableNotificationOnSuccess?: boolean;
|
|
@@ -465,30 +523,50 @@ export class EditorGraphState {
|
|
|
465
523
|
this.editorStore.isInFormMode,
|
|
466
524
|
'Editor must be in form mode to call this method',
|
|
467
525
|
);
|
|
526
|
+
|
|
468
527
|
if (this.checkIfApplicationUpdateOperationIsRunning()) {
|
|
469
528
|
return FormModeCompilationOutcome.SKIPPED;
|
|
470
529
|
}
|
|
471
|
-
|
|
530
|
+
|
|
531
|
+
const currentGraphHash =
|
|
532
|
+
this.editorStore.changeDetectionState.currentGraphHash;
|
|
533
|
+
|
|
472
534
|
try {
|
|
473
|
-
this.
|
|
535
|
+
this.isRunningGlobalCompile = true;
|
|
536
|
+
this.clearProblems();
|
|
474
537
|
if (options?.openConsole) {
|
|
475
538
|
this.editorStore.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);
|
|
476
539
|
}
|
|
540
|
+
|
|
477
541
|
// NOTE: here we always keep the source information while compiling in form mode
|
|
478
542
|
// so that the form parts where the user interacted with (i.e. where the lamdbas source
|
|
479
543
|
// information are populated), can reveal compilation error. If compilation errors
|
|
480
544
|
// show up in other parts, the user will get redirected to text-mode
|
|
481
|
-
|
|
482
|
-
this.editorStore.graphManagerState.
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
545
|
+
const compilationResult =
|
|
546
|
+
(yield this.editorStore.graphManagerState.graphManager.compileGraph(
|
|
547
|
+
this.editorStore.graphManagerState.graph,
|
|
548
|
+
{
|
|
549
|
+
keepSourceInformation: true,
|
|
550
|
+
},
|
|
551
|
+
)) as CompilationResult;
|
|
552
|
+
|
|
553
|
+
this.warnings = compilationResult.warnings ?? [];
|
|
554
|
+
this.mostRecentFormModeCompilationGraphHash = currentGraphHash;
|
|
555
|
+
|
|
487
556
|
if (!options?.disableNotificationOnSuccess) {
|
|
488
|
-
this.
|
|
489
|
-
|
|
490
|
-
|
|
557
|
+
if (this.warnings.length) {
|
|
558
|
+
this.editorStore.applicationStore.notifyWarning(
|
|
559
|
+
`Compilation suceeded with warnings`,
|
|
560
|
+
);
|
|
561
|
+
} else {
|
|
562
|
+
if (!options?.disableNotificationOnSuccess) {
|
|
563
|
+
this.editorStore.applicationStore.notifySuccess(
|
|
564
|
+
'Compiled successfully',
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
491
568
|
}
|
|
569
|
+
|
|
492
570
|
return FormModeCompilationOutcome.SUCCEEDED;
|
|
493
571
|
} catch (error) {
|
|
494
572
|
assertErrorThrown(error);
|
|
@@ -499,6 +577,7 @@ export class EditorGraphState {
|
|
|
499
577
|
LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
|
|
500
578
|
error,
|
|
501
579
|
);
|
|
580
|
+
this.mostRecentFormModeCompilationGraphHash = currentGraphHash;
|
|
502
581
|
let fallbackToTextModeForDebugging = true;
|
|
503
582
|
// if compilation failed, we try to reveal the error in form mode,
|
|
504
583
|
// if even this fail, we will fall back to show it in text mode
|
|
@@ -560,6 +639,7 @@ export class EditorGraphState {
|
|
|
560
639
|
);
|
|
561
640
|
return FormModeCompilationOutcome.FAILED_AND_FALLBACK_TO_TEXT_MODE;
|
|
562
641
|
} else {
|
|
642
|
+
this.error = error;
|
|
563
643
|
this.editorStore.applicationStore.notifyWarning(
|
|
564
644
|
`Compilation failed: ${error.message}`,
|
|
565
645
|
);
|
|
@@ -582,41 +662,61 @@ export class EditorGraphState {
|
|
|
582
662
|
this.editorStore.isInGrammarTextMode,
|
|
583
663
|
'Editor must be in text mode to call this method',
|
|
584
664
|
);
|
|
665
|
+
|
|
585
666
|
if (
|
|
586
667
|
!options?.ignoreBlocking &&
|
|
587
668
|
this.checkIfApplicationUpdateOperationIsRunning()
|
|
588
669
|
) {
|
|
589
670
|
return;
|
|
590
671
|
}
|
|
672
|
+
|
|
673
|
+
const currentGraphHash =
|
|
674
|
+
this.editorStore.grammarTextEditorState.currentTextGraphHash;
|
|
675
|
+
|
|
591
676
|
try {
|
|
592
677
|
this.isRunningGlobalCompile = true;
|
|
593
|
-
this.
|
|
678
|
+
this.clearProblems();
|
|
594
679
|
if (options?.openConsole) {
|
|
595
680
|
this.editorStore.setActiveAuxPanelMode(AUX_PANEL_MODE.CONSOLE);
|
|
596
681
|
}
|
|
597
|
-
|
|
682
|
+
|
|
683
|
+
const compilationResult =
|
|
598
684
|
(yield this.editorStore.graphManagerState.graphManager.compileText(
|
|
599
685
|
this.editorStore.grammarTextEditorState.graphGrammarText,
|
|
600
686
|
this.editorStore.graphManagerState.graph,
|
|
601
|
-
)) as
|
|
687
|
+
)) as TextCompilationResult;
|
|
688
|
+
|
|
689
|
+
const entities = compilationResult.entities;
|
|
690
|
+
this.mostRecentTextModeCompilationGraphHash = currentGraphHash;
|
|
691
|
+
this.warnings = compilationResult.warnings ?? [];
|
|
602
692
|
|
|
603
693
|
if (!options?.disableNotificationOnSuccess) {
|
|
604
|
-
this.
|
|
605
|
-
|
|
606
|
-
|
|
694
|
+
if (this.warnings.length) {
|
|
695
|
+
this.editorStore.applicationStore.notifyWarning(
|
|
696
|
+
`Compilation suceeded with warnings`,
|
|
697
|
+
);
|
|
698
|
+
} else {
|
|
699
|
+
if (!options?.disableNotificationOnSuccess) {
|
|
700
|
+
this.editorStore.applicationStore.notifySuccess(
|
|
701
|
+
'Compiled successfully',
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
607
705
|
}
|
|
608
706
|
|
|
609
707
|
yield flowResult(this.updateGraphAndApplication(entities));
|
|
610
708
|
} catch (error) {
|
|
611
709
|
assertErrorThrown(error);
|
|
710
|
+
this.mostRecentTextModeCompilationGraphHash = currentGraphHash;
|
|
612
711
|
if (error instanceof EngineError) {
|
|
613
|
-
this.
|
|
712
|
+
this.error = error;
|
|
713
|
+
if (error.sourceInformation) {
|
|
714
|
+
this.editorStore.grammarTextEditorState.setForcedCursorPosition({
|
|
715
|
+
lineNumber: error.sourceInformation.startLine,
|
|
716
|
+
column: error.sourceInformation.startColumn,
|
|
717
|
+
});
|
|
718
|
+
}
|
|
614
719
|
}
|
|
615
|
-
this.editorStore.applicationStore.log.error(
|
|
616
|
-
LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
|
|
617
|
-
'Compilation failed:',
|
|
618
|
-
error,
|
|
619
|
-
);
|
|
620
720
|
if (
|
|
621
721
|
!this.editorStore.applicationStore.notification ||
|
|
622
722
|
!options?.suppressCompilationFailureMessage
|
|
@@ -640,13 +740,13 @@ export class EditorGraphState {
|
|
|
640
740
|
}
|
|
641
741
|
try {
|
|
642
742
|
this.isApplicationLeavingTextMode = true;
|
|
643
|
-
this.
|
|
743
|
+
this.clearProblems();
|
|
644
744
|
this.editorStore.applicationStore.setBlockingAlert({
|
|
645
745
|
message: 'Compiling graph before leaving text mode...',
|
|
646
746
|
showLoading: true,
|
|
647
747
|
});
|
|
648
748
|
try {
|
|
649
|
-
const
|
|
749
|
+
const compilationResult =
|
|
650
750
|
(yield this.editorStore.graphManagerState.graphManager.compileText(
|
|
651
751
|
this.editorStore.grammarTextEditorState.graphGrammarText,
|
|
652
752
|
this.editorStore.graphManagerState.graph,
|
|
@@ -657,12 +757,18 @@ export class EditorGraphState {
|
|
|
657
757
|
onError: () =>
|
|
658
758
|
this.editorStore.applicationStore.setBlockingAlert(undefined),
|
|
659
759
|
},
|
|
660
|
-
)) as
|
|
760
|
+
)) as TextCompilationResult;
|
|
761
|
+
|
|
762
|
+
this.warnings = compilationResult.warnings ?? [];
|
|
661
763
|
this.editorStore.applicationStore.setBlockingAlert({
|
|
662
764
|
message: 'Leaving text mode and rebuilding graph...',
|
|
663
765
|
showLoading: true,
|
|
664
766
|
});
|
|
665
|
-
yield flowResult(
|
|
767
|
+
yield flowResult(
|
|
768
|
+
this.updateGraphAndApplication(compilationResult.entities),
|
|
769
|
+
);
|
|
770
|
+
this.mostRecentFormModeCompilationGraphHash =
|
|
771
|
+
this.editorStore.changeDetectionState.getCurrentGraphHash();
|
|
666
772
|
this.editorStore.grammarTextEditorState.setGraphGrammarText('');
|
|
667
773
|
this.editorStore.grammarTextEditorState.resetCurrentElementLabelRegexString();
|
|
668
774
|
this.editorStore.setGraphEditMode(GRAPH_EDITOR_MODE.FORM);
|
|
@@ -671,8 +777,13 @@ export class EditorGraphState {
|
|
|
671
777
|
}
|
|
672
778
|
} catch (error) {
|
|
673
779
|
assertErrorThrown(error);
|
|
674
|
-
|
|
675
|
-
this.editorStore.
|
|
780
|
+
this.mostRecentFormModeCompilationGraphHash =
|
|
781
|
+
this.editorStore.changeDetectionState.getCurrentGraphHash();
|
|
782
|
+
if (error instanceof EngineError && error.sourceInformation) {
|
|
783
|
+
this.editorStore.grammarTextEditorState.setForcedCursorPosition({
|
|
784
|
+
lineNumber: error.sourceInformation.startLine,
|
|
785
|
+
column: error.sourceInformation.startColumn,
|
|
786
|
+
});
|
|
676
787
|
}
|
|
677
788
|
this.editorStore.applicationStore.log.error(
|
|
678
789
|
LogEvent.create(GRAPH_MANAGER_EVENT.COMPILATION_FAILURE),
|
|
@@ -721,30 +832,6 @@ export class EditorGraphState {
|
|
|
721
832
|
}
|
|
722
833
|
}
|
|
723
834
|
|
|
724
|
-
/**
|
|
725
|
-
* This function is used in lambda editor in form mode when user try to do an action that involves the lambda being edited, it takes an action
|
|
726
|
-
* and proceeds with a parsing check for the current lambda before executing the action. This prevents case where user quickly type something
|
|
727
|
-
* that does not parse and hit compile or generate right away.
|
|
728
|
-
*/
|
|
729
|
-
*checkLambdaParsingError(
|
|
730
|
-
lambdaHolderElement: LambdaEditorState,
|
|
731
|
-
checkParsingError: boolean,
|
|
732
|
-
onSuccess: () => Promise<void>,
|
|
733
|
-
): GeneratorFn<void> {
|
|
734
|
-
this.clearCompilationError();
|
|
735
|
-
lambdaHolderElement.clearErrors();
|
|
736
|
-
if (checkParsingError) {
|
|
737
|
-
yield flowResult(
|
|
738
|
-
lambdaHolderElement.convertLambdaGrammarStringToObject(),
|
|
739
|
-
);
|
|
740
|
-
// abort action if parser error occurred
|
|
741
|
-
if (lambdaHolderElement.parserError) {
|
|
742
|
-
return;
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
yield onSuccess();
|
|
746
|
-
}
|
|
747
|
-
|
|
748
835
|
/**
|
|
749
836
|
* NOTE: IMPORTANT! This method is both a savior and a sinner. It helps reprocessing the graph state to use a new graph
|
|
750
837
|
* built from the new model context data, it resets the graph properly. The bane here is that resetting the graph properly is
|
|
@@ -856,6 +943,7 @@ export class EditorGraphState {
|
|
|
856
943
|
TEMPORARY__preserveSectionIndex:
|
|
857
944
|
this.editorStore.applicationStore.config.options
|
|
858
945
|
.TEMPORARY__preserveSectionIndex,
|
|
946
|
+
strict: this.enableStrictMode,
|
|
859
947
|
},
|
|
860
948
|
);
|
|
861
949
|
|
|
@@ -1023,28 +1111,27 @@ export class EditorGraphState {
|
|
|
1023
1111
|
}
|
|
1024
1112
|
}
|
|
1025
1113
|
|
|
1026
|
-
|
|
1114
|
+
async getIndexedDependencyEntities(): Promise<Map<string, Entity[]>> {
|
|
1027
1115
|
const dependencyEntitiesIndex = new Map<string, Entity[]>();
|
|
1028
1116
|
const currentConfiguration =
|
|
1029
1117
|
this.editorStore.projectConfigurationEditorState
|
|
1030
1118
|
.currentProjectConfiguration;
|
|
1031
1119
|
try {
|
|
1032
1120
|
if (currentConfiguration.projectDependencies.length) {
|
|
1033
|
-
const dependencyCoordinates =
|
|
1034
|
-
this.buildProjectDependencyCoordinates(
|
|
1121
|
+
const dependencyCoordinates =
|
|
1122
|
+
await this.buildProjectDependencyCoordinates(
|
|
1035
1123
|
currentConfiguration.projectDependencies,
|
|
1036
|
-
)
|
|
1037
|
-
)) as ProjectDependencyCoordinates[];
|
|
1124
|
+
);
|
|
1038
1125
|
// NOTE: if A@v1 is transitive dependencies of 2 or more
|
|
1039
1126
|
// direct dependencies, metadata server will take care of deduplication
|
|
1040
1127
|
const dependencyEntitiesJson =
|
|
1041
|
-
|
|
1128
|
+
await this.editorStore.depotServerClient.collectDependencyEntities(
|
|
1042
1129
|
dependencyCoordinates.map((e) =>
|
|
1043
1130
|
ProjectDependencyCoordinates.serialization.toJson(e),
|
|
1044
1131
|
),
|
|
1045
1132
|
true,
|
|
1046
1133
|
true,
|
|
1047
|
-
)
|
|
1134
|
+
);
|
|
1048
1135
|
const dependencyEntities = dependencyEntitiesJson.map((e) =>
|
|
1049
1136
|
ProjectVersionEntities.serialization.fromJson(e),
|
|
1050
1137
|
);
|
|
@@ -1080,11 +1167,11 @@ export class EditorGraphState {
|
|
|
1080
1167
|
let dependencyInfo: ProjectDependencyInfo | undefined;
|
|
1081
1168
|
try {
|
|
1082
1169
|
const dependencyTree =
|
|
1083
|
-
|
|
1170
|
+
await this.editorStore.depotServerClient.analyzeDependencyTree(
|
|
1084
1171
|
dependencyCoordinates.map((e) =>
|
|
1085
1172
|
ProjectDependencyCoordinates.serialization.toJson(e),
|
|
1086
1173
|
),
|
|
1087
|
-
)
|
|
1174
|
+
);
|
|
1088
1175
|
dependencyInfo =
|
|
1089
1176
|
ProjectDependencyInfo.serialization.fromJson(dependencyTree);
|
|
1090
1177
|
} catch (error) {
|
|
@@ -1130,10 +1217,10 @@ export class EditorGraphState {
|
|
|
1130
1217
|
return dependencyEntitiesIndex;
|
|
1131
1218
|
}
|
|
1132
1219
|
|
|
1133
|
-
|
|
1220
|
+
async buildProjectDependencyCoordinates(
|
|
1134
1221
|
projectDependencies: ProjectDependency[],
|
|
1135
|
-
):
|
|
1136
|
-
return
|
|
1222
|
+
): Promise<ProjectDependencyCoordinates[]> {
|
|
1223
|
+
return Promise.all(
|
|
1137
1224
|
projectDependencies.map((dep) => {
|
|
1138
1225
|
// legacyDependencies
|
|
1139
1226
|
// We do this for backward compatible reasons as we expect current dependency ids to be in the format of {groupId}:{artifactId}.
|
|
@@ -1178,7 +1265,7 @@ export class EditorGraphState {
|
|
|
1178
1265
|
);
|
|
1179
1266
|
}
|
|
1180
1267
|
}),
|
|
1181
|
-
)
|
|
1268
|
+
);
|
|
1182
1269
|
}
|
|
1183
1270
|
|
|
1184
1271
|
// -------------------------------------------------- UTILITIES -----------------------------------------------------
|