code: protected final synchronized String replaceMacro(String macroName, String text, String replacement,
  			ReplacementType type, boolean enableWarning, File sourceFile, int sourceLine) {
  		if (replacement != null && !EMPTY_STRING.equals(replacement)) {
  			final Pattern p = buildMacroPattern(macroName);
  			final Matcher m = p.matcher(text);
  			return m.replaceAll(Matcher.quoteReplacement(replacement));
  		}
  		if (enableWarning) {
  			getBuildContext().addMessage(
  					sourceFile,
  					sourceLine, 1,
  					"cannot replace empty macro $" + macroName + "$", //$NON-NLS-1$ //$NON-NLS-2$
  					BuildContext.SEVERITY_WARNING, null);
  		}
  		return text;
  	}
docs: Utility function that replace the macros by the replacement text in the given text.
  
  @param macroName
  is the name of the macro to replace.
  @param text
  is the text in which the replacement should occur
  @param replacement
  is the replacement text.
  @param type
  is the type of replacement to be done.
  @param enableWarning
  indicates if the warnings should be output or not.
  @param sourceFile
  is the filename in which the replacement is done.
  @param sourceLine
  is the line at which the replacement is done.
  @return the result of the replacement