/** * Returns the image descriptor for the given modifiers. * * @param data * The {@link ExceptionSensorData} data object where to check for the exception event * type. * @return The image descriptor. */ public static ImageDescriptor getImageDescriptor(ExceptionSensorData data) { if (null != data) { ExceptionEvent event = data.getExceptionEvent(); if (ExceptionEvent.CREATED.equals(event)) { return OVERLAY_ERROR; } else if (ExceptionEvent.HANDLED.equals(event)) { return OVERLAY_PRIORITY; } else if (ExceptionEvent.PASSED.equals(event)) { return OVERLAY_UP; } else if (ExceptionEvent.RETHROWN.equals(event)) { return OVERLAY_ERROR; } else if (ExceptionEvent.UNREGISTERED_PASSED.equals(event)) { return OVERLAY_UP; } } return ImageDescriptor.getMissingImageDescriptor(); }
return false; } else if (!exceptionEvent.equals(other.exceptionEvent)) { return false;
@Override public boolean matches(Object object) { if (!ExceptionSensorData.class.isInstance(object)) { return false; } ExceptionSensorData otherExceptionSensorData = (ExceptionSensorData) object; if ((null != exceptionSensorData.getCause()) && !exceptionSensorData.getCause().equals(otherExceptionSensorData.getCause())) { return false; } if ((null != exceptionSensorData.getErrorMessage()) && !exceptionSensorData.getErrorMessage().equals(otherExceptionSensorData.getErrorMessage())) { return false; } if (!exceptionSensorData.getExceptionEvent().equals(otherExceptionSensorData.getExceptionEvent())) { return false; } if ((null != exceptionSensorData.getThrowableType()) && !exceptionSensorData.getThrowableType().equals(otherExceptionSensorData.getThrowableType())) { return false; } if (exceptionSensorData.getThrowableIdentityHashCode() != otherExceptionSensorData.getThrowableIdentityHashCode()) { return false; } return true; }
if (!rawMode && (data instanceof AggregatedExceptionSensorData)) { return new StyledString(NumberFormatter.formatLong(((AggregatedExceptionSensorData) data).getCreated())); } else if (ExceptionEvent.CREATED.equals(data.getExceptionEvent())) { return new StyledString("Yes"); } else { if (!rawMode && (data instanceof AggregatedExceptionSensorData)) { return new StyledString(NumberFormatter.formatLong(((AggregatedExceptionSensorData) data).getPassed())); } else if (ExceptionEvent.PASSED.equals(data.getExceptionEvent())) { return new StyledString("Yes"); } else { if (!rawMode && (data instanceof AggregatedExceptionSensorData)) { return new StyledString(NumberFormatter.formatLong(((AggregatedExceptionSensorData) data).getHandled())); } else if (ExceptionEvent.HANDLED.equals(data.getExceptionEvent())) { return new StyledString("Yes"); } else {