Community
Participate
Working Groups
Understanding how aspect's application differs between releases is an important feature, to avoid any runtime surprises due to incorrectly modified pointcuts, renamed/moved fields/methods violating assumptions made by pointcut developers, etc. Providing a "diff" tool that let's developer compare how aspects and classes interact will be tremendously useful for AspectJ adoption. Here is expected of such a tool: 1. Ability to save static structure at any time under user-specified name. This will allow users to save structures with name such as "beta" "release 1", "release 2" etc. 2. Ability to specify two static structures to "diff". This will allow user to compare "what's new" and "what's different" between any two releases/snapshots.
Thanks for raising this Ramnivas. I prototyped a subset of this a long time ago, with a simple view which listed what had changed in the of set of advised elements between the just finished build, and the build prior to that. There didn't seem to be much demand for it at the time so it fell by the wayside. Also Mik's pointcut navigator prototype shows the changes in the context of the full tree of advised elements, using bold and gray text decorators. Another possibility would be to show these changes in the visualiser, with a new provider. As well as being able to save out the structure for later comparisons, I think we also need the ability to filter out the changes originating from selected aspects - e.g. when someone adds a new method, and a tracing aspect starts advising it, is probably not that interesting. So basically we need more design discussions, then we can develop a new prototype for further evaluation.
The first version of this is now in! Please visit the following page to see how to use it: http://www.eclipse.org/ajdt/90490/
This looks great!! Very elegant solution. I was wondering if a TableTree would help group things naturally, but it seems like clicking on the "Source" column provides an easy way of seeing what happened to each member of interest.
Looks really cool! I just wonder if this content can reside in some existing view. For example in synchronize view (similar to "Compare with..." actions). By the way, how about capturing these maps incrementally? Then, perhaps it could be somehow integrated with local history facility.
One more cosmetic thing. It would be nicer if new "Compare with" actions would be under common "Compare with..." menu.
Thanks for the feedback! In response to the above comments: #3: TableTree doesn't seem to work with TableCursor to provide keyboard navigation of individual cells rather than complete rows. Use of TreeColumn might be good, but that's 3.1 only so we're avoiding it for now (until we branch) #4 and #5: I did look into the existing Compare With routines, but they present the results in a textual diff view as an editor, which didn't seem to quite fit as these crosscutting diffs don't have a defined order. To fit under the same menu, we would have to replace the existing "Each other" submenu with our own, which I'm not sure is possible - I'll take a look. Also, work on adding a relationships filter to the view is underway (under bug 95724).
Wonderful! Thank you very much! Some feedback: - It seems that the Crosscutting Comparison view is updated only after full builds. Correct? - Can the "Save Crosscutting Map..." be added to pop up menu on project node in left-hand side tree view? (On a related note, perhaps this menu along with other AspectJ menus could be moved as submenus under, say, "AspectJ" menu).
Glad you like it :) If comparing against the current build, it should update after any build - in fact is doesn't know whether the build is full or incremental. Actually it currently updates after builds of *other* projects, which is obviously unnecessary. If the editor markers and/or cross references view show a change in the crosscutting relationships, that change should show in this new view - if not, there's a bug. Good idea about the menu - it makes senses to put it on the package explorer context menu, and then that probably means we have enough entries for an AspectJ submenu.
(In reply to comment #6) > Thanks for the feedback! In response to the above comments: > #4 and #5: I did look into the existing Compare With routines, but they present > the results in a textual diff view as an editor, which didn't seem to quite fit > as these crosscutting diffs don't have a defined order. Actually I meant Synchronize view itself, which is just a tree widget and differences are shown in a text label + decorations. Then complete details about selected diff could be shown in properties view. This would allow to save some screen estate and reuse existing view, but price would be those fancy icons. > To fit under the same > menu, we would have to replace the existing "Each other" submenu with our own, > which I'm not sure is possible - I'll take a look. It is possible. You can contribute your own actions for any given resource type to Compare With menu. For example http://andrei.gmxhome.de/images/bco_compare2.gif and here its plugin manifest http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/asm/eclipse/plugin/plugin.xml?rev=HEAD&content-type=text/vnd.viewcvs-markup
Thanks for the above info. After some discussion we've put the compare actions under a "AspectJ Tools" submenu for now, for consistency with the other actions we've moved under "AspectJ Tools", such as "save crosscutting map" and the "include/exclude from build config". I've also fixed a bug in the comparison routine, and when comparing two ajmap files it now always compares the older one against the newer one. I've also improved the sizing of the table columns, to fit the available space in the view.
A seperate AspectJ menu seems like a nice clear way to go, since the AspectJ functionality will be new to a lot of people so it helps for it to stand out some...
Implemented for AJDT 1.2.1 and 1.3.0. Please raise new bugs for any problems or further enhancements to this new functionality.