Bug 245290 - The Aspect decorations in AJDoc should be modified to improve readability
Summary: The Aspect decorations in AJDoc should be modified to improve readability
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: AJDoc (show other bugs)
Version: 1.6.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-26 14:03 EDT by Jason Naylor CLA
Modified: 2013-06-24 11:06 EDT (History)
3 users (show)

See Also:


Attachments
An example of the readability problems. (54.44 KB, image/png)
2008-08-26 14:03 EDT, Jason Naylor CLA
no flags Details
The proposed changes for the advice detail section (23.43 KB, image/png)
2008-08-26 17:26 EDT, Jason Naylor CLA
no flags Details
Patch with improved decorations (23.12 KB, patch)
2008-09-10 20:08 EDT, Arturo Salazar CLA
no flags Details | Diff
Update to patch fixing a problem with relative links. (25.78 KB, patch)
2008-09-11 17:34 EDT, Arturo Salazar CLA
no flags Details | Diff
Updated Fix (26.15 KB, patch)
2008-11-18 18:06 EST, Arturo Salazar CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Naylor CLA 2008-08-26 14:03:14 EDT
Created attachment 110977 [details]
An example of the readability problems.

Build ID: I20080617-2000

Steps To Reproduce:
1. Load a project with a pointcut that advises a large number of methods (several hundred would do)
2. Run AJDoc
3. View the resulting page, see how the 'Advises:' text is not even on the screen for the majority of the links to the advised methods.


More information:
I propose two changes to fix the readability and usability of these AJDocs.  First place the label for the AspectJ sections above the list (like standard Javadoc sections) to avoid the confusion that could be caused by the side label.  Second strip the package from the links leaving only the class name and method name to reduce the clutter.
Comment 1 Andrew Eisenberg CLA 2008-08-26 14:22:52 EDT
I agree...that is pretty nasty looking.  I like your idea, but I am just concerned that not seeing the package can be disorienting.  I think the package should go somewhere. Two suggestions:

1. separate sections for each group of advised locations by package.  make the package name the header for the section.  (would look nice in the example you show, but I am unsure how it would look for smaller examples)

2. use the title attribute in the <a> tag.  Put the fully qualified name in the title.  This way, the package would appear when hovered over.
Comment 2 Jason Naylor CLA 2008-08-26 17:26:08 EDT
Created attachment 111007 [details]
The proposed changes for the advice detail section

This png shows our proposed changes to the advises section.  (The shown advice is on the constructor).  We are also considering sorting the list alphabetically.
Comment 3 Jason Naylor CLA 2008-08-26 18:28:22 EDT
(In reply to comment #1)
> I agree...that is pretty nasty looking.  I like your idea, but I am just
> concerned that not seeing the package can be disorienting.  I think the package
> should go somewhere. Two suggestions:
> 
> 1. separate sections for each group of advised locations by package.  make the
> package name the header for the section.  (would look nice in the example you
> show, but I am unsure how it would look for smaller examples)
> 
> 2. use the title attribute in the <a> tag.  Put the fully qualified name in the
> title.  This way, the package would appear when hovered over.

I like idea number 2.  This would keep the layout short and give the information in a more obvious manner. (Right now you could see this in the status bar, but not at the cursor position)

Another thing we are considering is moving the Aspect summaries to the top of the Aspect after any Aspect level javadocs to match the layout of normal javadocs.

We would also like to move the 'Advises: ' part of the advice section to the end.  Right now it comes before any comments on the advice. 

Comment 4 Jason Naylor CLA 2008-08-28 18:45:56 EDT
There are some other formatting things we would like to change if we may.  

1. There is an inconsistency in the naming of the headers.  For declared annotations it is 'Annotated By:' and all the Inter-Type declarations have 'Declared By:' but for declare parents it says 'Aspect declarations:'.  We would like to change 'Aspect declarations:' to 'Parents declared by:' or something else that is more consistent and less confusing.

2. We would like to change the links in the 'Annotated By:' and 'Parents declared by:' sections so that they are more readable and informative.  For instance this is what it looks like for us now:

'com.cdmtech.icodes.item.subscription.aspects.SubscriptionAspect.declare @type: com.cdmtech.icodes.cargo.gentypes.Cargo : @Subscribable'

We would like to change it to 'SubscriptionAspect : @Subscribable' and make the SubscriptionAspect link to the aspect page, and the @Subscribable link to the Subscribable annotation page. Similarly the declare parents would result in an 'AspectClassName : implements|extends InterfaceName' with corresponding links.  The 'declare @type' and 'declare parents' are implied by the section, and the package would be placed in the link title so it could be viewed by hovering.
Comment 5 Arturo Salazar CLA 2008-09-10 20:08:35 EDT
Created attachment 112275 [details]
Patch with improved decorations
Comment 6 Arturo Salazar CLA 2008-09-11 17:34:35 EDT
Created attachment 112359 [details]
Update to patch fixing a problem with relative links.
Comment 7 Arturo Salazar CLA 2008-11-18 18:06:58 EST
Created attachment 118209 [details]
Updated Fix

Updated patch to work with changes to HtmlDecorator.java since the last patch I made.
Comment 8 Andrew Clement CLA 2013-06-24 11:06:44 EDT
unsetting the target field which is currently set for something already released