@@ -21,7 +21,6 @@ import { ClientActionForwarder } from '../actions/client-action-handler';
2121import { CommandStack , DefaultCommandStack } from '../command/command-stack' ;
2222import { UndoRedoActionHandler } from '../command/undo-redo-action-handler' ;
2323import { DiagramConfiguration } from '../diagram/diagram-configuration' ;
24- import { RequestTypeHintsActionHandler } from '../diagram/request-type-hints-action-handler' ;
2524import { CommandPaletteActionProvider } from '../features/contextactions/command-palette-action-provider' ;
2625import { ContextActionsProvider } from '../features/contextactions/context-actions-provider' ;
2726import { ContextActionsProviderRegistry } from '../features/contextactions/context-actions-provider-registry' ;
@@ -57,6 +56,9 @@ import { ResolveNavigationTargetsActionHandler } from '../features/navigation/re
5756import { PopupModelFactory } from '../features/popup/popup-model-factory' ;
5857import { RequestPopupModelActionHandler } from '../features/popup/request-popup-model-action-handler' ;
5958import { DefaultProgressService , ProgressService } from '../features/progress/progress-service' ;
59+ import { EdgeCreationChecker } from '../features/type-hints/edge-creation-checker' ;
60+ import { RequestCheckEdgeActionHandler } from '../features/type-hints/request-check-edge-action-handler' ;
61+ import { RequestTypeHintsActionHandler } from '../features/type-hints/request-type-hints-action-handler' ;
6062import { ModelValidator } from '../features/validation/model-validator' ;
6163import { RequestMarkersHandler } from '../features/validation/request-markers-handler' ;
6264import { CompoundOperationHandler } from '../operations/compound-operation-handler' ;
@@ -121,6 +123,7 @@ import {
121123 * - {@link ClientSessionInitializer} as {@link ClassMultiBinding<ClientSessionInitializer>}
122124 * - {@link PopupModelFactory} as optional binding
123125 * - {@link LayoutEngine} as optional binding
126+ * - {@link EdgeCreationChecker} as optional binding
124127 */
125128
126129export abstract class DiagramModule extends GLSPModule {
@@ -172,7 +175,7 @@ export abstract class DiagramModule extends GLSPModule {
172175 applyBindingTarget ( context , CommandStack , this . bindCommandStack ( ) ) . inSingletonScope ( ) ;
173176
174177 // Navigation
175- applyOptionalBindingTarget ( context , NavigationTargetResolver , this . bindNavigationTargetResolver ( ) ) ;
178+ applyOptionalBindingTarget ( context , NavigationTargetResolver , this . bindNavigationTargetResolver ( ) ) ?. inSingletonScope ( ) ;
176179 this . configureMultiBinding ( new MultiBinding < NavigationTargetProvider > ( NavigationTargetProviders ) , binding =>
177180 this . configureNavigationTargetProviders ( binding )
178181 ) ;
@@ -189,8 +192,9 @@ export abstract class DiagramModule extends GLSPModule {
189192 this . configureClientSessionInitializers ( binding )
190193 ) ;
191194 applyBindingTarget ( context , ProgressService , this . bindProgressService ( ) ) . inSingletonScope ( ) ;
192- applyOptionalBindingTarget ( context , PopupModelFactory , this . bindPopupModelFactory ( ) ) ;
193- applyOptionalBindingTarget ( context , LayoutEngine , this . bindLayoutEngine ?.( ) ) ;
195+ applyOptionalBindingTarget ( context , PopupModelFactory , this . bindPopupModelFactory ( ) ) ?. inSingletonScope ( ) ;
196+ applyOptionalBindingTarget ( context , LayoutEngine , this . bindLayoutEngine ( ) ) ?. inSingletonScope ( ) ;
197+ applyOptionalBindingTarget ( context , EdgeCreationChecker , this . bindEdgeCreationChecker ( ) ) ?. inSingletonScope ( ) ;
194198 }
195199
196200 configureClientSessionInitializers ( binding : MultiBinding < ClientSessionInitializer > ) : void {
@@ -203,6 +207,7 @@ export abstract class DiagramModule extends GLSPModule {
203207 binding . add ( RequestContextActionsHandler ) ;
204208 binding . add ( RequestTypeHintsActionHandler ) ;
205209 binding . add ( OperationActionHandler ) ;
210+ binding . add ( RequestCheckEdgeActionHandler ) ;
206211 binding . add ( RequestMarkersHandler ) ;
207212 binding . add ( RequestPopupModelActionHandler ) ;
208213 binding . add ( RequestEditValidationHandler ) ;
@@ -331,16 +336,19 @@ export abstract class DiagramModule extends GLSPModule {
331336 protected bindModelValidator ( ) : BindingTarget < ModelValidator > | undefined {
332337 return undefined ;
333338 }
339+
334340 protected bindLabelEditValidator ( ) : BindingTarget < LabelEditValidator > | undefined {
335341 return undefined ;
336342 }
337343
338344 protected bindToolPaletteItemProvider ( ) : BindingTarget < ToolPaletteItemProvider > | undefined {
339345 return DefaultToolPaletteItemProvider ;
340346 }
347+
341348 protected bindCommandPaletteActionProvider ( ) : BindingTarget < CommandPaletteActionProvider > | undefined {
342349 return undefined ;
343350 }
351+
344352 protected bindContextMenuItemProvider ( ) : BindingTarget < ContextMenuItemProvider > | undefined {
345353 return undefined ;
346354 }
@@ -352,7 +360,12 @@ export abstract class DiagramModule extends GLSPModule {
352360 protected bindPopupModelFactory ( ) : BindingTarget < PopupModelFactory > | undefined {
353361 return undefined ;
354362 }
363+
355364 protected bindLayoutEngine ( ) : BindingTarget < LayoutEngine > | undefined {
356365 return undefined ;
357366 }
367+
368+ protected bindEdgeCreationChecker ( ) : BindingTarget < EdgeCreationChecker > | undefined {
369+ return undefined ;
370+ }
358371}
0 commit comments