Hi Andy
It doesn't matter if it's a Clean (complete rebuild) og incremental, it
keeps complaining.
However I've noticed that if I uncomment the lines that gives me errors
in AbstractEventHandler, then I have to perform a Clean twice to remove
all errors about IEvent implementing classes doesn't provide an
implementation of IEventHandler's isHandled()/setHandled(). So
something is wrong with incremental compilation.
/Jepe
Andy Clement wrote:
Does the error disappear by any chance if you press the
'Build' button - rather than doing an incremental build.
Andy.
On 06/03/06, Jeppe Cramon <
jeppe@xxxxxxxxx> wrote:
Hi
When I fired up my Eclipse today I all of the sudden got the following
compilation error from an Aspect project that has been working without
problems for a long time. To my knowledge I haven't upgraded the AJDT
since the last time the project worked.
My colleague has the same projects running in Eclipse 3.1 with AJDT 1.3
and he hasn't got any compilation errors.
I tried to upgrade to the latest version of the AJDT plugin for Eclipse
3.1 (1.3.1.20060225062130
)
but I still have the same errors (see below).
Does anyone have a clue to what's wrong... Have I made a mistake which
has suddenly be spotted since an upgrade in AJDT or is it AJDT that's
faulty?
Below is the AbstractEventHandler.aj content. I get this compilation
errors for the following lines:
Error:
------
intertype declaration from
com.myproject.eventbroker.AbstractEventHandler conflicts with intertype
declaration: boolean com.myproject.eventbroker.IEventHandling.handled
from com.myproject.eventbroker.AbstractEventHandler
Lines affected:
--------------
private boolean IEventHandling.handled = false;
public boolean IEventHandling.isHandled() {
return this.handled;
}
public void IEventHandling.setHandled(boolean handled) {
this.handled = handled;
}
AbstractEventHandler.aj:
-------------------------
public abstract aspect AbstractEventHandler<Event extends IEvent>
{
// ------ IDT for IEventHandling ------
declare parents : IEvent extends IEventHandling;
private boolean IEventHandling.handled = false;
public boolean IEventHandling.isHandled() {
return this.handled;
}
public void IEventHandling.setHandled(boolean handled) {
this.handled = handled;
}
// ------ Aspect variables -----
/**
* The Event Broker that sub aspects should use to publish events
to the EventBroker system
*/
private IEventBroker eventBrokerClient;
/**
* The Event Broker that sub aspects should use to publish events
to the EventBroker system
*/
public void setEventBrokerClient(IEventBroker eventBrokerClient) {
this.eventBrokerClient = eventBrokerClient;
}
pointcut publishEventCall(Event event) : execution(void
IEventBroker.publishEvent(IEvent))
&& args(Event) && args(event);
before(IEvent event) : publishEventCall(event) {
handleEvent((Event)event, eventBrokerClient);
IEventHandling eventHandling = (IEventHandling)event;
eventHandling.setHandled(true);
}
/**
* Implement this method in your sub aspect to provide Event
specific event handling
* @param event The event to handle
* @param broker The Event broker to use if you wish to issue new
Events as part of the processing of the event parameter
*/
protected abstract void handleEvent(Event event, IEventBroker
broker) throws EventException;
}
IEventHandling.java:
---------------------
public interface IEventHandling {
boolean isHandled();
void setHandled(boolean handled);
}
IEvent.java:
------------
public interface IEvent extends Serializable {
}
Best regards
Jeppe
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
|