com.togethersoft.openapi.ide.macro
Interface IdeMacroProvider


public interface IdeMacroProvider

Implementation of this interface you should register with IdeMacroExpander if you wish to provide your own set of macros.
IdeMacroProvider instance is created by IdeMacroProvider factory each time a string containing macros is expanded. This is required for the macros that should be collected from the string and expanded at the same time (for example PROMPT macro provided by tool launcher).

Author:
TogetherSoft

Method Summary
 voidexpand(IdeContext context, String macro, java.util.HashMap parameters)
          Expands a macro identified by its name in the given context.
 voidexpand(IdeContext context, String macro)
          Expand macro without parameters
 Object[]getResult()
          Returns results of all macro expansions performed with this provider
 String[]getSupportedMacros()
          Returns array containing supported macros

Method Detail

expand

public void expand(IdeContext context, String macro, java.util.HashMap parameters)
throws InvalidContextError
Expands a macro identified by its name in the given context. Parameters to this macro are passed in HashMap as key-value pairs.

expand

public void expand(IdeContext context, String macro)
throws InvalidContextError
Expand macro without parameters

getResult

public Object[] getResult()
Returns results of all macro expansions performed with this provider

getSupportedMacros

public String[] getSupportedMacros()
Returns array containing supported macros