You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AjdeCoreMessageHandlerAdapter.java 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /********************************************************************
  2. * Copyright (c) 2007 Contributors. All rights reserved.
  3. * This program and the accompanying materials are made available
  4. * under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution and is available at
  6. * http://eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: IBM Corporation - initial API and implementation
  9. * Helen Hawkins - initial version (bug 148190)
  10. *******************************************************************/
  11. package org.aspectj.ajde.core.internal;
  12. import org.aspectj.ajde.core.IBuildMessageHandler;
  13. import org.aspectj.bridge.AbortException;
  14. import org.aspectj.bridge.IMessage;
  15. import org.aspectj.bridge.IMessageHandler;
  16. import org.aspectj.bridge.IMessage.Kind;
  17. /**
  18. * Enables the messages from the compiler/weaver to be passed on
  19. * to the tool's implementation so they can handle it as they wish
  20. */
  21. public class AjdeCoreMessageHandlerAdapter implements IMessageHandler {
  22. private IBuildMessageHandler handler;
  23. public AjdeCoreMessageHandlerAdapter(IBuildMessageHandler messageHandler) {
  24. this.handler = messageHandler;
  25. }
  26. public void dontIgnore(Kind kind) {
  27. handler.dontIgnore(kind);
  28. }
  29. public boolean handleMessage(IMessage message) throws AbortException {
  30. return handler.handleMessage(message);
  31. }
  32. public void ignore(Kind kind) {
  33. handler.ignore(kind);
  34. }
  35. public boolean isIgnoring(Kind kind) {
  36. return handler.isIgnoring(kind);
  37. }
  38. }