class FileExplorerPresenter implements GuvnorStructureContextChangeHandler,
                   GuvnorStructureContextBranchChangeHandler {

    @OnStartup
    public void reset() {

        view.reset();

        guvnorStructureContext.getRepositories(new Callback<Collection<Repository>>() {
            @Override
            public void callback(final Collection<Repository> response) {
                for (final Repository root : response) {
                    if (repositories.containsKey(root.getAlias())) {
                        view.removeRepository(root);
                    }
                    view.addNewRepository(root,
                                          guvnorStructureContext.getCurrentBranch(root.getAlias()));
                    repositories.put(root.getAlias(),
                                     root);
                }
            }
        });
    }

    public  FileExplorerPresenter();
    @Inject public  FileExplorerPresenter(final FileExplorerView view,
                                 final GuvnorStructureContext guvnorStructureContext);

}