code: public Object createMagicContextValue(final MagicContext magic) {
      checkNotNull(magic);
  
      switch (magic) {
        // Create the AntBuilder instance, normalizing its output to match mavens
        case ANT_BUILDER: {
          AntBuilder ant = new AntBuilder();
          // TODO: Do we need to root the ant-project or otherwise augment the configuration?
  
          Object obj = ant.getAntProject().getBuildListeners().elementAt(0);
          if (obj instanceof BuildLogger) {
            BuildLogger logger = (BuildLogger) obj;
            logger.setEmacsMode(true);
          }
          return ant;
        }
      }
  
      throw new Error("Unsupported magic context: " + magic);
    }
docs: Create an object for a {@link MagicContext} entry.