Ok: I see how you can rebind key sequences in Eclipse. It's
good to be able to do this and to know that there is an existing binding. Maybe
what would be more valuable would be an easy way to enable natural AspectJ
keyboard bindings. However, I believe that having a new perspective would be
the natural way to do this. I definitely like having Ctrl+Shift+T open aspect
types.
F3 works within an aspect for me for types, methods, and
pointcuts. However, there are several other cases where I'd like it to work. I
believe that making it work for these will require binding to an
AspectJ-specific command. Here are some cases I found with a little testing in
my code, where F3 doesn't work:
- Aspect type used in Java class
(even with .aj extension)
- Method defined in aspect type
used in Java class
- ITD used in Java class or
aspect
- Type declaring an ITD for inner
interface defined in an aspect (it jumps to the top-level aspect, not the
nested type). It does work in the ITD implementation body (*)
- ITD method used inside ITD in
an aspect
- Inner type used inside itself
- Type used inside type pattern
or method signature
- Method used in method signature
I can raise bugs for these if you like…
E.g.,
public aspect StatsJmxManagement {
public static class
PerfStatsBeanImpl implements DynamicMBean {
…
private static CompositeType makeChildRowType() {
return new CompositeType(PerfStatsImpl.class .getName(), … // F3 on PerfStatsImpl fails
}
…
}
public Object PerfStatsImpl.getMBean() { // F3 on
PerfStatsImpl jumps to aspect
try {
if
(!useCompositeBean) {
return getDefaultMBean();
// ITD method – F3 fails
}
String operationName = getOperationName();
if (operationName
== null ) {
logWarn("Unexpected
null bean for operation: " + operationName);
return null ;
}
return new PerfStatsBeanImpl( this , operationName); // F3 on type works here
…
// F3 on ManagedBean
fails in both cases and it fails on getDefaultMBean too
declare error: call(*
ManagedBean.getDefaultMBean()) && ! withincode (* ManagedBean+.*(..)): …
To: AspectJ Development Tools developer discussions
Subject: Re:
[ajdt-dev] AspectJ Perspective?