Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Why is it possible to inject E4Workbench.CLEAR_PERSISTED_STATE
Why is it possible to inject E4Workbench.CLEAR_PERSISTED_STATE [message #1034351] Fri, 05 April 2013 06:32 Go to next message
Alex Kipling is currently offline Alex Kipling
Messages: 246
Registered: July 2012
Senior Member
I saw, that I can inject the run configurations arguments:
    @Inject
    @Named(E4Workbench.CLEAR_PERSISTED_STATE)
    private boolean clearPersistedState;




  • Which code is responsible for retrieving the arguments and putting them into the context?
  • Is it a general e4 approach, that arguments can be inserted?


Re: Why is it possible to inject E4Workbench.CLEAR_PERSISTED_STATE [message #1034362 is a reply to message #1034351] Fri, 05 April 2013 06:50 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5020
Registered: July 2009
Senior Member
The E4Workbench-Class reads this values and puts it into the
IEclipseContext but this is just done so that the resource-handler can
get access to this information via DI.

Generally we are NOT pushing all application arguments into the
IEclipseContext but we are pushing IApplicationContext IIRC so you can
get access to them through this.

Tom

On 05.04.13 12:32, Alex Kipling wrote:
> I saw, that I can inject the run configurations arguments:
>
> @Inject
> @Named(E4Workbench.CLEAR_PERSISTED_STATE)
> private boolean clearPersistedState;
>
>
>
>
> Which code is responsible for retrieving the arguments and putting them
> into the context?
> Is it a general e4 approach, that arguments can be inserted?
>
>
>
Re: Why is it possible to inject E4Workbench.CLEAR_PERSISTED_STATE [message #1034405 is a reply to message #1034362] Fri, 05 April 2013 07:53 Go to previous messageGo to next message
Alex Kipling is currently offline Alex Kipling
Messages: 246
Registered: July 2012
Senior Member
Sorry Tom, but I can't see where in E4Workbench.class the CLEAR_PERSISTED_STATE is inserted into the context..
Re: Why is it possible to inject E4Workbench.CLEAR_PERSISTED_STATE [message #1034415 is a reply to message #1034405] Fri, 05 April 2013 08:01 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5020
Registered: July 2009
Senior Member
Well because I was wrong it is in E4Application

Tom

On 05.04.13 13:53, Alex Kipling wrote:
> Sorry Tom, but I can't see where in E4Workbench.class the
> CLEAR_PERSISTED_STATE is inserted into the context..
Previous Topic:Context menu not visible, at least sometimes
Next Topic:Lifecycles ProcessAdditions - getting the MWindow
Goto Forum:
  


Current Time: Fri Apr 25 02:41:43 EDT 2014

Powered by FUDForum. Page generated in 0.02212 seconds