Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Newbiew question: subclassing an aspect belonging to another package
Newbiew question: subclassing an aspect belonging to another package [message #590607] Sat, 22 October 2005 20:57
Mario Scalas is currently offline Mario ScalasFriend
Messages: 32
Registered: July 2009
Hi all,
I'm writing an RCP application and I intend to use aspects to perform some
common tasks among my application views. The one I'm working on now is
ensuring the thread safety in SWT calls ala [1].

I've implemented a generic SwtThreadSafety aspect with some abstract
pointcuts (to be implemented by specific clients). The first clients for
this aspect are a bunch of application views with receive events and need
to update the UI. So far so good: the right join points are captured and
all works ok.

I want the generic SwtThreadSafety aspect to be part of "ui" java package
while the views (and their ad-hoc aspect) belong to the "ui.views" package.

==== Generic aspect ====

package core.ui;

import org.eclipse.ui.PlatformUI;

public abstract aspect SwtThreadSafety {
// Abstract pointcuts and a few around advices

==== Views aspect ====

package ui.views;

// Note that this import is marked as "cannot be resolved" :|
import core.ui.SwtThreadSafety;

public aspect ViewsThreadSafety extends SwtThreadSafety {
// Pointcuts definitition

The import is not resolved and SwtThreadSafety is not recognized as a type.
Both files are named with the .aj extension.

If I put both of them in the same package, all works ok.

[Sorry for the dumb question] Where am I wrong? :S


[1] Swing thread safery aspect from AspectJ in action, chap. 9
Previous Topic:Can't download 3.1 AspectJ 5 version
Next Topic:Newbiew question: subclassing an aspect belonging to another package
Goto Forum:

Current Time: Wed May 23 01:40:47 GMT 2018

Powered by FUDForum. Page generated in 0.01637 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top