Example usage for org.aspectj.bridge IMessage getDeclared

List of usage examples for org.aspectj.bridge IMessage getDeclared

Introduction

In this page you can find the example usage for org.aspectj.bridge IMessage getDeclared.

Prototype

boolean getDeclared();

Source Link

Document

Caller can verify if this message came about because of a DEOW

Usage

From source file:org.eclipse.ajdt.internal.ui.ajde.UIMessageHandler.java

License:Open Source License

public boolean handleMessage(IMessage message) {
    IMessage.Kind kind = message.getKind();
    if (kind == IMessage.ABORT || message.getThrown() != null) {
        // an exception has been thrown by AspectJ, therefore
        // want to create an error dialog containing the information
        // and display it to the user
        AJDTErrorHandler.handleInternalError(UIMessages.ajErrorDialogTitle, message.getMessage(),
                message.getThrown());/*from w w  w.j  a va  2 s  .co  m*/
        return true;
    }
    if (isIgnoring(kind)) {
        return true;
    }
    if (message.getSourceLocation() == null) {
        AJLog.log(AJLog.COMPILER_MESSAGES, message.getMessage()); //$NON-NLS-1$
        problems.add(new ProblemTracker(message.getMessage(), null, message.getKind()));
    } else {
        if (DebugTracing.DEBUG_COMPILER_MESSAGES) {
            // avoid constructing log string if trace is not active
            AJLog.log(AJLog.COMPILER_MESSAGES, "addSourcelineTask message=" //$NON-NLS-1$
                    + message.getMessage() + " file=" //$NON-NLS-1$
                    + message.getSourceLocation().getSourceFile().getPath() + " line=" //$NON-NLS-1$
                    + message.getSourceLocation().getLine());
        } else {
            AJLog.log(AJLog.COMPILER_MESSAGES, message.getMessage());
        }
        problems.add(new ProblemTracker(message.getMessage(), message.getSourceLocation(), message.getKind(),
                message.getDeclared(), message.getExtraSourceLocations(), message.getID(),
                message.getSourceStart(), message.getSourceEnd(), message.getThrown()));
    }
    return true;
}