Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » 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: Fri Nov 28 10:05:11 GMT 2014

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

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