Or we find a way to depend on xwiki-core 1.5 in
shared-tests but I
don't see how it could be possible before 1.5M1 release...
On Wed, May 28, 2008 at 11:18 AM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
On Wed, May 28, 2008 at 10:56 AM, Vincent Massol
<vincent(a)massol.net> wrote:
On May 28, 2008, at 10:51 AM, Thomas Mortagne wrote:
> Yes it is set in 2 places because one is needed for tests and the
> other for running. I wanted to set it in shared-tests but I can't
> because shared-tests depends on core 1.4 so it has no access to
> Utils.setComponentManager....
This means it's not set in the right place. It shouldn't be set in 2
places IMO.
The ComponentManager is set in two places in the context too for the
same reasons but as I said one of the place is the shared-tests
initialization where Utils.setComponentManager can't be used...
I don't see any existing common place which works for XWikiAction and
shared-tests. The other solution is to call getComponentManager with
or without the XWikiContext depends on the place and initialize
Utils's ComponentManager in XWiki.initXWiki like it was at first.
At the very least , before we find the solution (I guess I'll have to
look into it...), you should heavily comment it.
In general we must comment every place we're doing something fishy or
not easy to understand.
Thanks
-Vincent
> On Wed, May 28, 2008 at 9:15 AM, Vincent Massol <vincent(a)massol.net>
> wrote:
>> Thomas, does this mean it's now set in 2 places?
>>
>> If so I think that's not correct.
>>
>> Thanks
>> -Vincent
>>
>> On May 27, 2008, at 10:58 PM, tmortagne (SVN) wrote:
>>
>>> Author: tmortagne
>>> Date: 2008-05-27 22:58:40 +0200 (Tue, 27 May 2008)
>>> New Revision: 9956
>>>
>>> Modified:
>>> xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
>>> XWiki.java
>>> Log:
>>> XWIKI-2367: Makes ComponentManager getable without the XWikiContext
>>> * Reset ComponentManager in XWiki.initXWiki as shared-test can't
>>> call Utils.setComponentManager
>>>
>>> Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/
>>> xpn/
>>> xwiki/XWiki.java
>>> ===================================================================
>>> --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/
>>> xwiki/
>>> XWiki.java 2008-05-27 19:37:05 UTC (rev 9955)
>>> +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/
>>> xwiki/
>>> XWiki.java 2008-05-27 20:58:40 UTC (rev 9956)
>>> @@ -737,6 +737,11 @@
>>> public void initXWiki(XWikiConfig config, XWikiContext context,
>>> XWikiEngineContext engine_context, boolean noupdate) throws
>>> XWikiException
>>> {
>>> + // Statically store the component manager in {@link Utils}
>>> to be able to access it without
>>> + // the context.
>>> + Utils.setComponentManager((ComponentManager) context
>>> + .get(ComponentManager.class.getName()));
>>> +
>>> setEngineContext(engine_context);
>>> context.setWiki(this);
>> _______________________________________________
>> devs mailing list
>> devs(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/devs
>>
>
>
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne