Bug 50928

Summary: Provide UI for advice execution ordering at join points
Product: [Tools] AspectJ Reporter: Mik Kersten <mik.kersten>
Component: IDEAssignee: Mik Kersten <mik.kersten>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 CC: aclement, adrian.colyer, eh-ajdev, eric, holger, ramnivas
Version: 1.2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Mock-up that shows precedence order and the relevant declare none

Description Mik Kersten CLA 2004-01-29 19:59:25 EST
The tools need to show advice execution ordering at a join point.  The first 
attachment is a mockup that shows an idea of how this could look in the 
document outline.  Wes also suggested exposing: 
- whether a call to proceed() exists
- exceptions that could get thrown
Comment 1 Mik Kersten CLA 2004-01-29 20:00:40 EST
Created attachment 7638 [details]
Mock-up that shows precedence order and the relevant declare
Comment 2 Wes Isberg CLA 2004-01-29 21:27:32 EST
On displaying precedence...

Since the ordering can be determined by n>1 declare-precedence and
implicit-precedence, showing that graphically seems unwieldy.  But one might
want to ask of a join point (with a context menu), what determines the order? 
This to me is almost a JQuery-like function.  Of course it would be interesting
to see the reverse, where I order the advice and the precedence declarations
change.  

Also, where the order is arbitrary, you'd proposed to have those in a particular
equivalence class aligned vertically.  A clue for that is to use a single set of
braces.  I.e.,

not 

  |
  |-p
  |-a
  |-t

but

  |
  | |---
  | |  p
  |-|  a
  | |  t
  | |---
  |
or 

  |
  |-q
  |--[p, a, t]
  |
Comment 3 Eric Bodden CLA 2004-01-30 12:37:48 EST
Should not the debug.before() advice actually be under Coordinator.before() 
since Debug has declared precedence over Coordinator? Or am I missing something?
Comment 4 Mik Kersten CLA 2004-01-30 13:03:43 EST
Eric: in the figure the precedence is intended to reflect that all advice in 
Debug has precedence (i.e. runs before) the advice in Coordinator.  That was 
what I was trying to get across with the two "before"s.  To make the figure 
more complete I should change the two other advice to be both be in Debug 
(after, and afterReturning).  The point I was trying to get across is that 
some of the ordering comes from the language semantics while other ordering 
comes from declare statements.  It can also come from ordering in the file.  I 
wonder if that should be indicated visually somehow--right now it seems like 
the declare statement defines all of the ordering.  

Wes hits this point on the head and suggests a context menu and query-style 
mechanism.  I'm still shying away from query-style UIs, but will try to come 
up with a way of indicating this additional information.  That idea of 
changing the order of advide and having that "refactor" the declare precedence 
is also quite cool.

For our records here's a link to documentation on advice precedence:

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-
home/doc/progguide/semantics-advice.html#d0e5867 
Comment 5 Mik Kersten CLA 2004-04-02 12:46:50 EST
AOSD feedback from Erik Hilsdale.  Erik, I'm adding you to this report to 
solicit your fabulous feedback on future iterations of this view.  

To consider: if A throws an exception, does B catch it?  
- A before
  - jp shadow
- B after throwing