private AntBuilder createAntBuilder() { AntBuilder ant = new AntBuilder(); Object obj = ant.getAntProject().getBuildListeners().elementAt(0); if (obj instanceof BuildLogger) { BuildLogger logger = (BuildLogger)obj; logger.setEmacsMode(true); } return ant; }
/** * Lazily initialize the AntBuilder, so we can pick up the log impl correctly. */ private AntBuilder getAnt() { if (this.ant == null) { AntBuilder ant = new AntBuilder(); BuildLogger logger = (BuildLogger) ant.getAntProject().getBuildListeners().get(0); logger.setEmacsMode(true); this.ant = ant; } return this.ant; }
private AntBuilder createAntBuilder() { AntBuilder ant = new AntBuilder(); Object obj = ant.getAntProject().getBuildListeners().elementAt(0); if (obj instanceof BuildLogger) { BuildLogger logger = (BuildLogger)obj; logger.setEmacsMode(true); } return ant; }
private AntBuilder createAntBuilder() { AntBuilder ant = new AntBuilder(); Object obj = ant.getAntProject().getBuildListeners().elementAt(0); if (obj instanceof BuildLogger) { BuildLogger logger = (BuildLogger)obj; logger.setEmacsMode(true); } return ant; }
/** * Create an object for a {@link MagicContext} entry. */ 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); }
private AntBuilder createAntBuilder() { AntBuilder ant = new AntBuilder(); Object obj = ant.getAntProject().getBuildListeners().elementAt(0); if (obj instanceof BuildLogger) { BuildLogger logger = (BuildLogger)obj; logger.setEmacsMode(true); } return ant; }
private AntBuilder createAntBuilder() { AntBuilder ant = new AntBuilder(); Object obj = ant.getAntProject().getBuildListeners().elementAt(0); if (obj instanceof BuildLogger) { BuildLogger logger = (BuildLogger)obj; logger.setEmacsMode(true); } return ant; }
private AntBuilder createAntBuilder() { AntBuilder ant = new AntBuilder(); Object obj = ant.getAntProject().getBuildListeners().elementAt(0); if (obj instanceof BuildLogger) { BuildLogger logger = (BuildLogger)obj; logger.setEmacsMode(true); } return ant; }
/** * Create an object for a {@link MagicContext} entry. */ 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); }