Old:

1. allow to use SarosPluginContext
2. instantiate all components in the context

New:

1. instantiate all components in the context
2. allow to use SarosPluginContext

But it is still questionable on how this was done in IntelliJ.

So it was like: create the context, while the context is created ask 
Pico to instantiate even more classes.



On 04.02.2016 20:59, Zieris, Franz wrote:
> OK, looks like we are narrowing down on problem no. 2 (see here [1] for all
> four).
>
> Stefan wrote in Gerrit #3004:
>
>> I guess that some of the components of the context tries to
>> access SarosPluginContext (why ?) which is not initialized yet.
> Stefan then wrote:
>
>> Seems I guessed right [...]
>>
>> de.fu_berlin.inf.dpp.intellij.ui.actions.AbstractSarosAction.<init>
>>      (AbstractSarosAction.java:48)
>>      at
>> de.fu_berlin.inf.dpp.intellij.ui.actions.FollowModeAction.<init>
>>      (FollowModeAction.java:80)
>> [...]
> Indeed, the FollowModeAction is created as a component [2], instantiated 
> through
> "sarosContext.initialize()" which in turn leads to the failing call [3].
>
> Two questions here:
> First, is there any reason to treat FollowModeAction (and LeaveSessionAction 
> for
> that matter) as components? I think this was a mistake made in commit 7e89c9d
> back in June 2014 [4], when SarosIntelliJContextFactory was created as a poor
> copy of SarosEclipseContextFactory, which certainly did *not* contain 
> references
> to these action classes [5].
> So, the solution seems clear to me: Delete both action classes from the 
> context.
>
> However, these two lines were commented out until b2e685f [6] in November 
> 2014.
> So, secondly, it's totally unclear to me how for last year these two lines 
> could
> *not* have the crashing effect they had now.
> Shouldn't Saros/I have crashed on every start?
> I mean, since b2e68f5 until recently, this call was made ...
>
>> // Make sure that all components in the container are
>> // instantiated
>> sarosContext.getComponents(Object.class);
> ... which should have instantiated all classes references in the container,
> including both actions, right?
>
> Stefan's change was essentially something like this:
>
> - sarosContext.getComponents(Object.class);
> + sarosContext.getComponents();
>
> Can anyone explain that difference between [7] and [8]?
>
> Franz
>
> [1] http://article.gmane.org/gmane.comp.ide.eclipse.saros.devel/1747
> [2] 
> https://github.com/saros-project/saros/blob/master/de.fu_berlin.inf.dpp.intellij/src/de/fu_berlin/inf/dpp/intellij/context/SarosIntellijContextFactory.java#L98
> [3] 
> https://github.com/saros-project/saros/blob/master/de.fu_berlin.inf.dpp.intellij/src/de/fu_berlin/inf/dpp/intellij/ui/actions/AbstractSarosAction.java#L48
>
> [4] 
> https://github.com/saros-project/saros/commit/7e89c9d#diff-096f3021be7e7e528c122dde74a559eaR75
> [5] 
> https://github.com/saros-project/saros/blob/7e89c9d/de.fu_berlin.inf.dpp/src/de/fu_berlin/inf/dpp/SarosEclipseContextFactory.java
> [6] 
> https://github.com/saros-project/saros/commit/b2e685f#diff-096f3021be7e7e528c122dde74a559eaR95
>
> [7] 
> http://picocontainer.com/javadoc/core/org/picocontainer/PicoContainer.html#getComponents%28%29
> [8] 
> http://picocontainer.com/javadoc/core/org/picocontainer/PicoContainer.html#getComponents%28java.lang.Class%29


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

Reply via email to