From eddfc3e3967453b1250140039326539d9451cc24 Mon Sep 17 00:00:00 2001 From: Jean-Yves Tinevez Date: Wed, 12 Jun 2024 15:24:31 +0200 Subject: [PATCH] Declare the new view commands in the command finder. --- src/main/java/org/mastodon/mamut/MainWindow.java | 1 + src/main/java/org/mastodon/mamut/views/bdv/MamutViewBdv.java | 1 + .../java/org/mastodon/mamut/views/grapher/MamutViewGrapher.java | 1 + src/main/java/org/mastodon/mamut/views/table/MamutViewTable.java | 1 + .../mamut/views/trackscheme/MamutBranchViewTrackScheme.java | 1 + .../mastodon/mamut/views/trackscheme/MamutViewTrackScheme.java | 1 + 6 files changed, 6 insertions(+) diff --git a/src/main/java/org/mastodon/mamut/MainWindow.java b/src/main/java/org/mastodon/mamut/MainWindow.java index d2f1ae7fa..1f5d48572 100644 --- a/src/main/java/org/mastodon/mamut/MainWindow.java +++ b/src/main/java/org/mastodon/mamut/MainWindow.java @@ -226,6 +226,7 @@ public void windowClosing( final WindowEvent e ) CommandFinder.build() .context( appModel.getContext() ) .inputTriggerConfig( appModel.getKeymap().getConfig() ) + .descriptionProvider( appModel.getWindowManager().getViewFactories().getCommandDescriptions() ) .keyConfigContext( KeyConfigContexts.MASTODON ) .register( appModel.getModelActions() ) .register( appModel.getProjectActions() ) diff --git a/src/main/java/org/mastodon/mamut/views/bdv/MamutViewBdv.java b/src/main/java/org/mastodon/mamut/views/bdv/MamutViewBdv.java index 7f526ab1f..09ffe67ba 100644 --- a/src/main/java/org/mastodon/mamut/views/bdv/MamutViewBdv.java +++ b/src/main/java/org/mastodon/mamut/views/bdv/MamutViewBdv.java @@ -284,6 +284,7 @@ public MamutViewBdv( final ProjectModel appModel ) .context( appModel.getContext() ) .inputTriggerConfig( appModel.getKeymap().getConfig() ) .keyConfigContexts( keyConfigContexts ) + .descriptionProvider( appModel.getWindowManager().getViewFactories().getCommandDescriptions() ) .register( viewActions ) .register( appModel.getModelActions() ) .register( appModel.getProjectActions() ) diff --git a/src/main/java/org/mastodon/mamut/views/grapher/MamutViewGrapher.java b/src/main/java/org/mastodon/mamut/views/grapher/MamutViewGrapher.java index 3f47ea282..e48c091c5 100644 --- a/src/main/java/org/mastodon/mamut/views/grapher/MamutViewGrapher.java +++ b/src/main/java/org/mastodon/mamut/views/grapher/MamutViewGrapher.java @@ -70,6 +70,7 @@ public class MamutViewGrapher extends MamutView< DataGraph< Spot, Link >, DataVe .context( appModel.getContext() ) .inputTriggerConfig( appModel.getKeymap().getConfig() ) .keyConfigContexts( keyConfigContexts ) + .descriptionProvider( appModel.getWindowManager().getViewFactories().getCommandDescriptions() ) .register( viewActions ) .register( appModel.getModelActions() ) .register( appModel.getProjectActions() ) diff --git a/src/main/java/org/mastodon/mamut/views/table/MamutViewTable.java b/src/main/java/org/mastodon/mamut/views/table/MamutViewTable.java index e9efae521..8c57956cf 100644 --- a/src/main/java/org/mastodon/mamut/views/table/MamutViewTable.java +++ b/src/main/java/org/mastodon/mamut/views/table/MamutViewTable.java @@ -188,6 +188,7 @@ protected MamutViewTable( final ProjectModel projectModel, final boolean selecti .context( appModel.getContext() ) .inputTriggerConfig( appModel.getKeymap().getConfig() ) .keyConfigContexts( keyConfigContexts ) + .descriptionProvider( appModel.getWindowManager().getViewFactories().getCommandDescriptions() ) .register( viewActions ) .register( appModel.getModelActions() ) .register( appModel.getProjectActions() ) diff --git a/src/main/java/org/mastodon/mamut/views/trackscheme/MamutBranchViewTrackScheme.java b/src/main/java/org/mastodon/mamut/views/trackscheme/MamutBranchViewTrackScheme.java index 88a8a95a6..4b7bbd7d6 100644 --- a/src/main/java/org/mastodon/mamut/views/trackscheme/MamutBranchViewTrackScheme.java +++ b/src/main/java/org/mastodon/mamut/views/trackscheme/MamutBranchViewTrackScheme.java @@ -216,6 +216,7 @@ protected MamutBranchViewTrackScheme( final CommandFinder cf = CommandFinder.build() .context( appModel.getContext() ) .inputTriggerConfig( appModel.getKeymap().getConfig() ) + .descriptionProvider( appModel.getWindowManager().getViewFactories().getCommandDescriptions() ) .keyConfigContexts( keyConfigContexts ) .register( viewActions ) .register( appModel.getModelActions() ) diff --git a/src/main/java/org/mastodon/mamut/views/trackscheme/MamutViewTrackScheme.java b/src/main/java/org/mastodon/mamut/views/trackscheme/MamutViewTrackScheme.java index 1d262639a..318072f40 100644 --- a/src/main/java/org/mastodon/mamut/views/trackscheme/MamutViewTrackScheme.java +++ b/src/main/java/org/mastodon/mamut/views/trackscheme/MamutViewTrackScheme.java @@ -207,6 +207,7 @@ public MamutViewTrackScheme( final ProjectModel appModel ) .context( appModel.getContext() ) .inputTriggerConfig( appModel.getKeymap().getConfig() ) .keyConfigContexts( keyConfigContexts ) + .descriptionProvider( appModel.getWindowManager().getViewFactories().getCommandDescriptions() ) .register( viewActions ) .register( appModel.getModelActions() ) .register( appModel.getProjectActions() )