Package org.apache.tools.ant.gui.event

Examples of org.apache.tools.ant.gui.event.AntBuildEvent


        public boolean eventPosted(EventObject event) {
            if(event instanceof ProjectSelectedEvent) {
                return true;
            }

            AntBuildEvent buildEvent = (AntBuildEvent) event;
            Style style = null;
            String text = null;

            switch(buildEvent.getType().getValue()) {
              case BuildEventType.BUILD_STARTED_VAL:

              case BuildEventType.BUILD_FINISHED_VAL:
                  text = buildEvent.getType().toString() +
                      " (" + new Date().toString() + ")";
                  style = _styles.getHeadingStyle();
                  break;
              case BuildEventType.TARGET_STARTED_VAL:
                  text = buildEvent.getEvent().getTarget().getName() + ":";
                  style = _styles.getSubheadingStyle();
                  break;
              case BuildEventType.TARGET_FINISHED_VAL:
              case BuildEventType.TASK_STARTED_VAL:
              case BuildEventType.TASK_FINISHED_VAL:
                  break;
              case BuildEventType.MESSAGE_LOGGED_VAL:
                  // Filter out events that are below our
                  // selected filterint level.
                  LogLevelEnum level =
                      (LogLevelEnum) _logLevel.getSelectedItem();
                  int priority = buildEvent.getEvent().getPriority();
                  if(priority <= level.getValue()) {
                      text = buildEvent.toString();
                      style = _styles.getStyle(LogLevelEnum.fromInt(priority));
                  }
                  break;
            }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.gui.event.AntBuildEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.