[xwiki-users] List all registered macros
How can I get a list of all *registered* macros?I know how to get a list of the XWiki.WikiMacroClass with the * Query Generator <http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Generator> * extension, but it will not show if the macro is properly registered or not.I also want to get the attributes of a registered macros such as source document or built in, language... -- View this message in context: http://xwiki.475771.n2.nabble.com/List-all-registered-macros-tp7593652.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, XWiki/WikiMacros will list all the existing wiki macro on a wiki, but not sure it this covers all your need. Thanks, Caty On Tue, Jan 13, 2015 at 1:10 PM, ICLED <[email protected]> wrote:
How can I get a list of all *registered* macros?I know how to get a list of the XWiki.WikiMacroClass with the * Query Generator <http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Generator> * extension, but it will not show if the macro is properly registered or not.I also want to get the attributes of a registered macros such as source document or built in, language...
-- View this message in context: http://xwiki.475771.n2.nabble.com/List-all-registered-macros-tp7593652.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi ICLED, See http://extensions.xwiki.org/xwiki/bin/view/Extension/List+All+Macros Thanks -Vincent On 14 Jan 2015 at 10:35:30, Ecaterina Moraru (Valica) ([email protected](mailto:[email protected])) wrote:
Hi,
XWiki/WikiMacros will list all the existing wiki macro on a wiki, but not sure it this covers all your need.
Thanks, Caty
On Tue, Jan 13, 2015 at 1:10 PM, ICLED wrote:
How can I get a list of all *registered* macros?I know how to get a list of the XWiki.WikiMacroClass with the * Query Generator * extension, but it will not show if the macro is properly registered or not.I also want to get the attributes of a registered macros such as source document or built in, language...
-- View this message in context: http://xwiki.475771.n2.nabble.com/List-all-registered-macros-tp7593652.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Vincent, thanks to point me to this entry in the extensions. BTW I made a search with "list macros" and drew a blank, "all macros" and "list all" would have given me my answer! I played around with your snipet, I found most of the attibutes I want, but I don't know how to get the source document full name (wiki:space.doc) or a reference to the document's object. I also want to know thw scope of the macro; global, local to the wiki or the user. Any way to get the source document full name (wiki:space.doc) or (better) a reference to the document's object? The rationale behind this, is that I must migrate a XWIKI from 5.2.1 to current, and the WIKI is in a very poor condition, so there is a lot of cleaning&repair work to do. {{groovy}} import org.xwiki.rendering.macro.Macro println "| Name | Id | Description | DefaultCategory | Priority | InlineMode |" services.component.componentManager.getInstanceList(Macro.class).each() { def descriptor = it.descriptor println "| ${descriptor.name} | ${descriptor.getId()} | ${descriptor.description} | ${descriptor.getDefaultCategory()} | ${it.getPriority()} | ${it.supportsInlineMode()} |" } {{/groovy}} -- View this message in context: http://xwiki.475771.n2.nabble.com/List-all-registered-macros-tp7593652p75936... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Ecaterina Moraru (Valica) -
ICLED -
vincent@massol.net