Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] Fwd: AspectJ AJDT, multiproject problems / continuing, i pressed return mymistake

Hi Marco,

The implementation of AJDT itself uses abstract and concrete aspects
across projects (core and ui), so it is definitely possible.

Assuming your abstract and concrete aspects are in different packages,
then this is a visibility issue - the pointcuts need to be "protected"
or "public". It does look like the compiler error when this isn't the
case is rather misleading.

Regards,

Matt.

On 31/03/06, Marco Mistroni <mmistroni@xxxxxxxxx> wrote:
>
>
> ---------- Forwarded message ----------
> From: Marco Mistroni <mmistroni@xxxxxxxxx>
> Date: Mar 31, 2006 2:27 PM
> Subject: AspectJ AJDT, multiproject problems
> To: AspectJ Development Tools developer discussions <ajdt-dev@xxxxxxxxxxx>
>
> hello all,
>  i  m experiencing problems in defining abstract aspects in different
> projects
>
> i have following project (both AJ projects)
>
> Common
>
> EJB
>
> in Common, i have defined an AbstractTestAspect which contains an abstract
> pointcut
>
> in  EJB, i have defined an EJBTestAspect which extends AbstractTestAspect
> and contains 'implementation' of abstract pointcut
>
>
> but whenever i compile EJB project, i got an error saying that the
> EJBTestAspect does not provide a concrete pointcut for the pointcut defined
> in AbstractTestAspect
>
> Common project is a dependency fo EJB project, so i have not set any
> AspectPath or aspectInPath.
>
> i managed in the past to write an abstract and a concrete aspect, but only
> when they were in the same project
>
>
> is this a bug, or a limitiation of AJDT?
>
> or am  i missing something?
>
> here's a sample
>
>
> public  abstract aspect BaseOwnerViewAspect {
>
>
>     abstract pointcut getOwners();
>
>
>
>     /**
>      * @return true if the ownerRef passed as input
>      *            parameter belongs to CurrentUser's
>      *         owner list. false otherwise
>      */
>     protected static boolean isAllowedOwner(String ownerRef) {
>         ... some logic here....
>     }
>
> }
>
>
>
> public aspect EJBOwnerViewAspect extends BaseOwnerViewAspect {
>     pointcut getOwners() :
>               call (*  com.myejb.*.getOwners(..));
>      }
> }
>
>
>
>
>
>
>
>
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>
>
>


Back to the top