When I make A and B visible at least one time, i can instantiate this class without problem, but when those classes were never been visible, i got the message : "no actual value was found for the argument" for the Injected classes. I figured out that this comes when the class wasn't instantiated and never got inserted on context, but even when i force the instantiation, i got the error.

I don't know if I make myself clear but I would like to know what process the framework do to insert the class on context, or if there is something i'm doing wrong.

Thanks.]]>Rafael Fogel2013-01-17T12:53:50-00:00Re: RCP: Cannot inject invisible partshttps://www.eclipse.org/forums/index.php/mv/msg/449609/1001943/#msg_1001943
E4 Dependency Injection]]>Joseph Carroll2013-01-17T15:35:48-00:00Re: RCP: Cannot inject invisible partshttps://www.eclipse.org/forums/index.php/mv/msg/449609/1001976/#msg_1001976
Classes annotated with @Creatable will be automatically created by the injector if an instance was not present in the injection context. The automatically-generated instance is not stored in the context.

Without those notes, I can't do it. How do you suggest I access this class? ( assuming I won't just instantiate like a pojo )
]]>Rafael Fogel2013-01-18T13:07:51-00:00Re: RCP: Cannot inject invisible partshttps://www.eclipse.org/forums/index.php/mv/msg/449609/1002366/#msg_1002366
The 'one time visible' situation may happen because when you try to force the creation through @Creatable the contribution object is not created. Usually it is not a good idea to force the creation of parts when they are not visible yet, though it depends on the case. If you want to do some form of processing on the part you can register a listener (IEventBroker) on part creation and do your stuff there, and let the renderer (LazyStackRenderer) decide when to instantiate the part.

That said, @Creatable is used to do a CIF.make on a class and @Singleton is used to prevent multiple instances in a given scope.]]>Sopot Cela2013-01-18T13:23:57-00:00Re: RCP: Cannot inject invisible partshttps://www.eclipse.org/forums/index.php/mv/msg/449609/1002499/#msg_1002499
Rafael Fogel2013-01-18T17:59:30-00:00