>Migrating from Mylyn 2.0 to Mylyn 3.0

>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.

Advertisements
This entry was posted in eclipse, mantis, mylyn. Bookmark the permalink.

One Response to >Migrating from Mylyn 2.0 to Mylyn 3.0

  1. Mik Kersten says:

    >It’s good to hear that you’re nearly done and that this took under two weeks. We would like to bring that time down further for others. It would be very helpful if you could document any of your additional experiences in the Integrator Reference for others to reuse.Regarding your specific points:1) Very good point that warranted its own blog post.2) I think that we should consider this as a theme for Mylyn 3.1 or 3.2. While I our current approach for optimizing the data structures around Java APIs makes sense for plug-in developers, I would like to see us create a generic XML connector that would allow repositories to publish an XML format that Mylyn could consume without requiring a new connector to be written. We’ve chatted about this during our weekly calls numerous times, and it would be great if you could file a bug on it.3) We *really* wanted to get rid of the deprecated APIs, and they actually serve no real utility in the current implementation. Note that none of the connectors use them. Also note that with some rare and minor exceptions, use of internals is limited to single APIs (e.g. ..mylyn.context.ui uses ..mylyn.context.core internals, ..mylyn.tasks.ui uses ..mylyn.tasks.core internals, but connectors and bridges do not use internals of either). We were going to remove all of the deprecated classes, but decided that doing so in June was too late in case had accidentally made use of them. They will all be removed for 3.1.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s