class ExplorerMenu {

    public void onArchiveActiveRepository() {
        final Optional<Branch> defaultBranch = context.getActiveWorkspaceProject()
                                                      .map(proj -> proj.getRepository())
                                                      .orElseThrow(() -> new IllegalStateException("Cannot check for default branch without an active project."))
                                                      .getDefaultBranch();
        if (defaultBranch.isPresent()) {
            view.archive(defaultBranch.get().getPath());
        }
    }

    public  ExplorerMenu();
    @Inject public  ExplorerMenu(final ExplorerMenuView view,
                        final ActiveContextOptions activeOptions,
                        final WorkspaceProjectContext projectContext);

}