Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Problema class nested
Problema class nested [message #599755] Fri, 13 March 2009 18:24
Hitalo is currently offline HitaloFriend
Messages: 4
Registered: July 2009
Junior Member
public class StandardDrawingView ...{

....


protected void handleMouseEventException(Throwable t) {
JOptionPane.showMessageDialog(
this,
t.getClass().getName() + " - " + t.getMessage(),
"Error",
JOptionPane.ERROR_MESSAGE);
t.printStackTrace();
}

public class DrawingViewMouseListener extends MouseAdapter {
/**
* Handles mouse down events. The event is delegated to the
* currently active tool.
*/
public void mousePressed(MouseEvent e) {
try {
//throw Throwable
}
catch (Throwable t) {
handleMouseEventException(t);
}

}

}

...

}

AEW,

the problem is:
my aim is: extract the exception handler to aspect's without changing
the original code of the application. But I'm not able to make this
scenario above. I can not get the reference class StandardDrawingView to
use the method handleMouseEventException (t) in the treatment of exccacao.
Is there any way to do this?
Take the reference class DrawingViewMouseListener is easy, just use TARGET
or THIS. The problem is to take the class most external
StandardDrawingView.

Since already thank ...public class StandardDrawingView ...{

....


protected void handleMouseEventException(Throwable t) {
JOptionPane.showMessageDialog(
this,
t.getClass().getName() + " - " + t.getMessage(),
"Error",
JOptionPane.ERROR_MESSAGE);
t.printStackTrace();
}

public class DrawingViewMouseListener extends MouseAdapter {
/**
* Handles mouse down events. The event is delegated to the
* currently active tool.
*/
public void mousePressed(MouseEvent e) {
try {
//throw Throwable
}
catch (Throwable t) {
handleMouseEventException(t);
}

}

}

...

}

AEW,

the problem is:
my aim is: extract the exception handler to aspect's without changing
the original code of the application. But I'm not able to make this
scenario above. I can not get the reference class StandardDrawingView to
use the method handleMouseEventException (t) in the treatment of exccacao.
Is there any way to do this?
Take the reference class DrawingViewMouseListener is easy, just use TARGET
or THIS. The problem is to take the class most external
StandardDrawingView.

Since already thank ...
Previous Topic:ITDed method refers to missing type
Next Topic:No advice markers or cross references
Goto Forum:
  


Current Time: Tue Sep 24 10:16:03 GMT 2024

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

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

Back to the top