Hi,
Question:
For wiki macros are we going to provide string property where the user can enter the category in object edit mode? To make this a select (combo box) we would need an wiki macro authoring application(?). But for the moment I think a single string property would do. WDYT?
Why wouldn't you be able to have a combo box in an object? All you need to do is to store the list of categories in a StaticList in the XClass that defines macro XObjects and the combo box will be generated automatically in Object edition mode (or maybe I'm missing something?)
Since macros can define new categories (via getCategory() method) and since they can be overwritten in xwiki.properties file, we do not know what exact macro categories are there in the system. Also, a wiki macro should be able to define it's own category as well. So a static list will not suffice here IMHO. Thanks. - Asiri
Guillaume
Thanks.
- Asiri
Having multiple categories for macros doesn't bring that much value and it's not really needed in the short term.
Guillaume
Few issues with this approach arises with
MacroManager::getCategories()
&
MacroManager::getMacrosForCategory() method implementations. Since we have dynamic macro registrations (wiki macros), each of these methods will have to build the response by going through all the macros in the system.
+1 for this as a first implementation and no it's not a problem, it's just mean loop the macros and compare the category string with the provided String, it does not cost much in JAVA.
- Asiri
Imho, getCategory() should return a simple string that is an id of
a
category defined and stored in a "registry" The problem is how could a macro put a category inside this registry?
Maybe at initialization time it could do store new categories in the registry (if it wants to do so) so that a subsequent call to getCategory would return an existing id.
The registry could also be populated by default with a set of "standard" categories (maybe defined in some wiki pages).
-Fabio _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs