Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Declare parents in concrete aspect?
Declare parents in concrete aspect? [message #596304] Tue, 14 August 2007 14:21
Martin Frey is currently offline Martin FreyFriend
Messages: 2
Registered: July 2009
Junior Member
to make a long story short i have two aspects. A abstract, B concrete of A.
A defines a general PropertyChangeSupport handler but it should not define
which classes should get woven at loadtime. Thats why the concrete aspect B
is there to define this.
I don't know why this shouldnt work. Since other concrete aspects work
perfectly. Are there some known issues regarding the "declare parents"

If i define the declare parents directly in BeanChangeDefinitions all works
as expected. But i want to be able to use this aspect for multiple plugins.
So i dont want to use a concrete aspect to define the within package stuff.

Did someone solve this problem already?

regards Martin

Here's the code of the two aspects.
public abstract aspect BeanChangeDefinitions {
// Add PropertyChangeSupport variable
private PropertyChangeSupport

public void
PropertyChangeNotifier.addPropertyChangeListener(PropertyCha ngeListener
listener) {
public void PropertyChangeNotifier.addPropertyChangeListener(String
propertyName, PropertyChangeListener listener) {
propertyChangeSupport.addPropertyChangeListener(propertyName ,
public void
PropertyChangeNotifier.removePropertyChangeListener(Property ChangeListener
listener) {
propertyChangeSupport.removePropertyChangeListener(listener) ;
public void PropertyChangeNotifier.removePropertyChangeListener(String
propertyName, PropertyChangeListener listener) {
propertyChangeSupport.removePropertyChangeListener(propertyN ame,listener);
public void PropertyChangeNotifier.firePropertyChange(String
propertyName,Object oldValue, Object newValue) {
public void PropertyChangeNotifier.createPropertyChangeSupport() {
propertyChangeSupport = new PropertyChangeSupport(this);

private pointcut createBean() : execution(new(..)) && withinBean();
private pointcut propertyChange() : set(* *) && !set(static * *) &&
public abstract pointcut withinBean();
after() : propertyChange() {
String sigName = thisJoinPoint.getSignature().getName();
Object newValue = thisJoinPoint.getArgs()[0];
PropertyChangeNotifier bean = (PropertyChangeNotifier)
bean.firePropertyChange(sigName, "", newValue);
after() : createBean() {
PropertyChangeNotifier bean = (PropertyChangeNotifier)

public aspect ConcreteBeanChangeDefinitions extends BeanChangeDefinitions {
declare parents : models.* implements PropertyChangeNotifier;
public pointcut withinBean() : within(models.*);
Previous Topic:Another internal NPE
Next Topic:Declare parents in concrete aspect?
Goto Forum:

Current Time: Tue Sep 25 08:43:13 GMT 2018

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

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

Back to the top