Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework import / export menus #332

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/java/org/mastodon/mamut/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import static org.mastodon.app.MastodonIcons.TAGS_ICON_MEDIUM;
import static org.mastodon.app.MastodonIcons.TRACKSCHEME_ICON_MEDIUM;
import static org.mastodon.app.ui.ViewMenuBuilder.item;
import static org.mastodon.app.ui.ViewMenuBuilder.menu;
import static org.mastodon.app.ui.ViewMenuBuilder.separator;
import static org.mastodon.mamut.MamutMenuBuilder.fileMenu;

Expand Down Expand Up @@ -320,6 +321,9 @@ public static void addMenus( final ViewMenu menu, final ActionMap actionMap )
item( ProjectActions.SAVE_PROJECT ),
item( ProjectActions.SAVE_PROJECT_AS ),
separator(),
menu( "Import" ),
menu( "Export" ),
separator(),
item( ProjectActions.FIX_DATASET_PATH ),
separator(),
// item( ProjectActions.IMPORT_TGMM ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -45,6 +45,7 @@
import org.mastodon.app.MastodonIcons;
import org.mastodon.app.ui.ViewMenuBuilder;
import org.mastodon.mamut.KeyConfigScopes;
import org.mastodon.mamut.MamutMenuBuilder;
import org.mastodon.mamut.ProjectModel;
import org.mastodon.mamut.io.importer.trackmate.MamutExporter;
import org.mastodon.mamut.plugin.MamutPlugin;
Expand Down Expand Up @@ -92,8 +93,8 @@ public Map< String, String > getMenuTexts()
@Override
public List< ViewMenuBuilder.MenuItem > getMenuItems()
{
return Arrays.asList(
menu( "Plugins", menu( "Exports", item( EXPORT_MAMUT ) ) ) );
return Collections.singletonList(
MamutMenuBuilder.fileMenu( menu( "Export", item( EXPORT_MAMUT ) ) ) );
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -43,6 +43,7 @@
import org.mastodon.app.MastodonIcons;
import org.mastodon.app.ui.ViewMenuBuilder;
import org.mastodon.mamut.KeyConfigScopes;
import org.mastodon.mamut.MamutMenuBuilder;
import org.mastodon.mamut.ProjectModel;
import org.mastodon.mamut.plugin.MamutPlugin;
import org.mastodon.ui.keymap.KeyConfigContexts;
Expand Down Expand Up @@ -91,8 +92,8 @@ public Map< String, String > getMenuTexts()
@Override
public List< ViewMenuBuilder.MenuItem > getMenuItems()
{
return Arrays.asList(
menu( "Plugins", menu( "Imports", item( IMPORT_GRAPHML ) ) ) );
return Collections.singletonList(
MamutMenuBuilder.fileMenu( menu( "Import", item( IMPORT_GRAPHML ) ) ) );
}

@Override
Expand Down
Loading