if (!isVisible(existing.getModifiers(),
existing.getDeclaringType().resolve(getWorld()),
this)) {
+ // if they intended to override it but it is not visible, give them a nicer message
+ if (existing.isAbstract() && conflictingSignature(existing,toAdd)) {
+ getWorld().showMessage(
+ IMessage.ERROR,
+ WeaverMessages.format(WeaverMessages.POINTCUT_NOT_VISIBLE,
+ existing.getDeclaringType().getName() + "." + existing.getName()+"()", this.getName()),
+ toAdd.getSourceLocation(),null);
+ j.remove();
+ }
continue;
}
if (conflictingSignature(existing, toAdd)) {
public static final String THIS_OR_TARGET_IN_DECLARE = "thisOrTargetInDeclare";
public static final String ABSTRACT_POINTCUT = "abstractPointcut";
public static final String POINCUT_NOT_CONCRETE = "abstractPointcutNotMadeConcrete";
+ public static final String POINTCUT_NOT_VISIBLE = "pointcutNotVisible";
public static final String CONFLICTING_INHERITED_POINTCUTS = "conflictingInheritedPointcuts";
public static final String CIRCULAR_POINTCUT = "circularPointcutDeclaration";
public static final String CANT_FIND_POINTCUT = "cantFindPointcut";
circularPointcutDeclaration=circular pointcut declaration involving: {0}
cantFindPointcut=can''t find pointcut ''{0}'' on {1}
exactTypePatternRequired=exact type pattern required
+pointcutNotVisible=pointcut ''{0}'' is not visible from type ''{1}'' - cannot override
cantBindType=can''t bind type name ''{0}''
wildcardTypePatternNotAllowed=wildcard type pattern not allowed, must use type name
fieldCantBeVoid=fields cannot have a void type