The API of mastodon core components changed with the recent Mastodon releases (1.0.0-beta-27 and beta-28). This PR updates mastodon-git to be compatible with these changes.
Overview of the code changes
In many places classes MamutAppModel and WindowManager where replaced with ProjectModel.
Mastodon-git requires the ability to reload the currently open Mastodon project from disk. In the past this was implemented with a simple call to windowManager.getProjectManager().openWithDialog( project );. But this API was changed in beta-27. The projectmanager no longer exists. The open method is now a static method of the ProjectLoader an can not any longer be used to reload the project. The new "reload from disk" approach: is to use the projectModel.getModel().loadRaw(...) method. See: https://github.com/mastodon-sc/mastodon-git/blob/76233bf26719e09a4d642b7653c46357f32ed46b/src/main/java/org/mastodon/mamut/collaboration/utils/ReloadFromDiskUtils.java#L25-L31
This new approach has the advantage that the AppModel/ProjectModel remains the same. And now BDV/TrackScheme windows remain open. But there is a bug in mastodon-collection which must be fixed for this to work.
Unit tests where added to make sure that mastodon-git still works after all the changes. See MastodonGitRepositoryTest
Two bugs where found when implementing the unit tests, these are now fixed.
"Reset to remote banch" didn't work after creating and pushing a new branch.
Conflict tags sets are now automatically removed, when merging two branches finishes without conflicts.
There is a class ModelAsserts, which allows to compare to Mastodon Models. This class is used in the new unit tests.
There is a class CopyModelUtils. Which was used in the unit test but is no longer required. I still want to keep it, because I know it can be useful.
Fixes #3
The API of mastodon core components changed with the recent Mastodon releases (1.0.0-beta-27 and beta-28). This PR updates mastodon-git to be compatible with these changes.
Overview of the code changes
MamutAppModel
andWindowManager
where replaced withProjectModel
.windowManager.getProjectManager().openWithDialog( project );
. But this API was changed in beta-27. The projectmanager no longer exists. The open method is now a static method of theProjectLoader
an can not any longer be used to reload the project. The new "reload from disk" approach: is to use theprojectModel.getModel().loadRaw(...)
method. See: https://github.com/mastodon-sc/mastodon-git/blob/76233bf26719e09a4d642b7653c46357f32ed46b/src/main/java/org/mastodon/mamut/collaboration/utils/ReloadFromDiskUtils.java#L25-L31 This new approach has the advantage that the AppModel/ProjectModel remains the same. And now BDV/TrackScheme windows remain open. But there is a bug in mastodon-collection which must be fixed for this to work.MastodonGitRepositoryTest
ModelAsserts
, which allows to compare to MastodonModel
s. This class is used in the new unit tests.CopyModelUtils
. Which was used in the unit test but is no longer required. I still want to keep it, because I know it can be useful.