Ok, I used "@ProcessAdditions" to work with UI before its rendered :

@ProcessAdditions
void processAdditions(MApplication app, EModelService modelService) {
    MTrimmedWindow mainMTrimmedWindow = (MTrimmedWindow)
modelService.find("my_trimmed_window_id", app);
    mainMTrimmedWindow.setLabel("my_label");
}

Everything works well now, but I think that this concept of injection is
not really intuitive... And difficult to set up without precise example.

Thank you Eric and Marc for your help !

Nicolas.


2013/10/25 Marc Teufel <[email protected]>

> StartupLifeCycleHandler is what you need, it seems.
>
> Here you find a lot of interesting information and more links:
> http://www.toedter.com/blog/?p=896
>
> Cheerio, Marc.
>
>
> 2013/10/25 Nicolas Sarazin <[email protected]>
>
>> Thank you for the tip !
>>
>> My authentification is done by a splash. And, at the moment, workbench
>> has not be created yet.
>>
>> How can I reproduce the Eclipse 3 plan like
>> "ApplicationWorkbenchWindowAdvisor -> preWindowOpen" to configure my window
>> before its opening ?
>>
>> Thank you in advance,
>>
>> Nicolas.
>>
>>
>>
>> 2013/10/24 Eric Moffatt <[email protected]>
>>
>>> Nicolas, in e4 land you are likely best off to get hold of the UI
>>> Model's MWindow for your shell and just set its 'label' (the shell should
>>> then update automatically).
>>>
>>> Try this:
>>>
>>> MWindow winModel =
>>> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(MWindow.class);
>>> winModel.setLabel("whatever you want");
>>>
>>> Eric
>>>
>>> [image: Inactive hide details for Nicolas Sarazin ---10/24/2013 11:02:01
>>> AM---Hello, After the authentification of a user on my applica]Nicolas
>>> Sarazin ---10/24/2013 11:02:01 AM---Hello, After the authentification of a
>>> user on my application, I try to change the
>>>
>>>
>>>
>>>    From:
>>>
>>>
>>> Nicolas Sarazin <[email protected]>
>>>
>>>    To:
>>>
>>>
>>> E4 Project developer mailing list <[email protected]>,
>>>
>>>    Date:
>>>
>>>
>>> 10/24/2013 11:02 AM
>>>
>>>    Subject:
>>>
>>>
>>> [e4-dev] Modify window's title dynamically
>>>
>>>    Sent by:
>>>
>>>
>>> [email protected]
>>> ------------------------------
>>>
>>>
>>>
>>> Hello,
>>>
>>> After the authentification of a user on my application, I try to change
>>> the title of the main window by adding his name and his first name, but
>>> unsuccessfully at the moment...
>>>
>>> I know how to make it with Eclipse 3, but not with Eclipse 4.
>>>
>>> Can you give me a solution or a track allowing me to change window's
>>> title please ?
>>>
>>> Thank you in advance,
>>>
>>> Nicolas._______________________________________________
>>> e4-dev mailing list
>>> [email protected]
>>> https://dev.eclipse.org/mailman/listinfo/e4-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> e4-dev mailing list
>>> [email protected]
>>> https://dev.eclipse.org/mailman/listinfo/e4-dev
>>>
>>>
>>
>> _______________________________________________
>> e4-dev mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/e4-dev
>>
>>
>
>
> --
> Mail: [email protected]
> Web: http://www.teufel.net
>
> _______________________________________________
> e4-dev mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/e4-dev
>
>

<<graycol.gif>>

<<ecblank.gif>>

_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to