Community
Participate
Working Groups
Support opening a Gerrit review task editor 'Change-Id: XXX' lines This would allow a Gerrit task editor to be easily opened from the EGit commit viewer
Created attachment 201762 [details] Patch to open Change-Id links
Thanks for the patch! With the changes for bug 350679 we should be able to simplify the implementation. TaskHyperlink should now work out of the box with change-id hashes. Can you update the patch accordingly and add a test case for the parsing? You can take a look at TracHyperlinkUtilTest for an example. I am not sure that this will work for the EGit commit editor though. I think we will need to provide a way to associate the commit editor (i.e. the git repository) with the gerrit task repository first.
Thanks for the pointers Steffen, can the unit test go in the org.eclipse.mylyn.gerrit.tests ? It looks like it currently is a fragment on top of gerrit core.
Good question. I assume we will need separate test bundles for UI and core in this case. I have pushed a org.eclipse.mylyn.gerrit.ui.tests bundle. Can you try if that works for you?
Works for me, attaching an updated patch with unit tests.
Created attachment 201825 [details] Hyperlink patch Patch with unit tests
Created attachment 201826 [details] patch
Great! I have pushed the patch in ac3cfb505c2045f8a6b2ea22c0344c8fe573cf1b.
Created attachment 203112 [details] screenshot
I have changed the hyperlink detector to recognize any short and long Gerrit id in text. That enables linking to other changes in comments, e.g. "see I0123abcd". Kevin, I don't know if this breaks the commit viewer. If it does we can also split the original hyperlink detector logic into a separate class or revert the change if does not make sense. I pushed it here: http://review.mylyn.org/#change,32
Created attachment 203171 [details] screenshot