>Migrating the Mantis Connector to Mylyn 3.0
I’m one of the maintainers on the Mylyn Mantis project, a mylyn connector for the Mantis Bugtracker. With the advent of Mylyn 3.0 coming with Ganymede I needed to revist the connector to see what would be involved to convert our existing 2.x connector over. It has been an interesting adventure, and here are a few thoughts:
1. I appreciate the refactoring of the API. I feel it should have occurred sooner in development process, and not in the last 3 months. The main reason is that during the conversion there was very little or no javadoc for the new api, and few examples until just in the last week.
2. I’m an XML architect by day, and it is sad to see that XML is not being used at it’s best in the repository and tasks storage. In particulare there is no XML Schema, no use of XML namespaces to separate what is part of the core Mylyn Meta Data, and what is contributed by a connector. Also, the interface has become to generic in the way meta data is created. I personally prefer more descriptive interfaces, as opposed to a generic DOM type interface like createAttribute(MantisAttributeMapper.Attribute.RESOLUTION). A command like setResoultion or getResolutions is preferable.
3. Too many of the deprecated api are left in place, and existing internal code is leveraging the deprecated API. Again, I think this could have been avoided if work started several months ahead of time.
These are minor issues, as overall I do think the new refactoring of the API will greatly ease the implementation of Task Editors. In particular the ability for the attributes to automatically be created with the correct GUI interface is very nice. It eliminates the need in most cases to create a custom Attribute UI compared to Mylyn 2.x. The standard layout should fit most needs, and having a common interface is a good thing. Also the ability to add additional parts is a benefit. In particular for the Mantis task editor we have addition Long Rich Text editors for Additional Information and Steps to Reproduce. Adding these was as simple as creating the necessary Part Descriptor and adding it to the MantisTaskEditorPage.
As for my conversion. I’ve got it about 95% converted, in a little under two weeks. Most of that time was spent trying to figure out the API. Our Plugin should be available in a few weeks after Mylyn 3.0 is out with the latest Ganymede packages.