Hi Sorry for wrong message. I am calling some code from handlers, and eclipse jobs.
Actually I am porting my code to E4 platform, one that uses .e4xmi file have an a below problems:- 1. I do not want to pass Shell to all my classes. I have some old code: display = PlatformUI.getWorkbench().getDisplay() in some non-ui classes. That code is not working in E4 2. Similarly PlatformUI.getWorkbench().restart() is not working 3. The non-ui code is getting called at many places and that shows progress dialogs. Message i get is workbench is not created Please help regards Ahmad On Mon, Oct 24, 2011 at 4:02 PM, Tom Schindl <[email protected]> wrote: > So you are working with the Compat-Layer because without that you won't > have an Application? > > On Mon, 24 Oct 2011 14:17:33 +0530, Parvez Ahmad <[email protected]> > wrote: >> No i create a job and schedule it. >> The eclipse job starts by a call in Application.java >> >> On Mon, Oct 24, 2011 at 2:00 PM, Tom Schindl >> <[email protected]> wrote: >>> So you do it through a LifecycleHandler? >>> >>> Tom >>> >>> On Mon, 24 Oct 2011 13:57:38 +0530, Parvez Ahmad <[email protected]> >>> wrote: >>>> I create an eclipse job at the application startup. Just wanted to >>>> show some progress dialogs there >>>> >>>> On Mon, Oct 24, 2011 at 1:46 PM, Tom Schindl >>>> <[email protected]> wrote: >>>>> How do you launch the background job? Are you doing it through a >>>>> command/handler? >>>>> >>>>> Tom >>>>> >>>>> On Mon, 17 Oct 2011 20:09:18 +0530, Parvez Ahmad <[email protected]> >>>>> wrote: >>>>>> Right. >>>>>> In eclipse 3.7 we had PlatformUI.getWorkbench, since workbench does >>> not >>>>>> exist in E4, how should i get the Shell . >>>>>> I want to actually show a progress dialog in E4 >>>>>> >>>>>> >>>>>> On Mon, Oct 17, 2011 at 8:06 PM, Eric Moffatt <[email protected]> >>>>> wrote: >>>>>> >>>>>>> >>>>>>> Remy, I think you meant..."Shell shell = (Shell) >>>>>>> window.get*Widget*();"... >>>>>>> >>>>>>> Just pointing this out to avoid the inevitable "where's 'getShell' > ?" >>>>>>> questions...;-), >>>>>>> Eric >>>>>>> >>>>>>> >>>>>>> From: Remy Suen/Ottawa/IBM@IBMCA To: E4 Project developer mailing >>>>>>> list >>>>> < >>>>>>> [email protected]> Date: 10/17/2011 09:30 AM Subject: Re: [e4-dev] >>> E4 >>>>>>> product export problems Sent by: [email protected] >>>>>>> ------------------------------ >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sun, Oct 16, 2011 at 6:46 AM, Parvez Ahmad <[email protected]> >>>>> wrote: >>>>>>> > Dear all great men, >>>>>>> >>>>>>> Please don't forget there are females in the Eclipse community. :) >>>>>>> >>>>>>> > 1) I want to show a message box using below code. >>>>>>> > My code is not getting called from a COMMAND/Handler, but is a >>>>>>> > code(from another project in workspace) that is getting injected >>>>>>> > using dependency injection. >>>>>>> > So how to get the shell in E4, in below case:- >>>>>>> > MessageDialog.openInformation(shell , "About",""); >>>>>>> >>>>>>> I'm not sure about your second problem, but if you want a shell > then >>>>> you >>>>>>> should be able to inject it. >>>>>>> >>>>>>> @Execute >>>>>>> void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) { >>>>>>> /* ... */ >>>>>>> } >>>>>>> >>>>>>> @Execute >>>>>>> void execute(MWindow window) { >>>>>>> Shell shell = (Shell) window.getShell(); >>>>>>> /* ... */ >>>>>>> } >>>>>>> >>>>>>> Regards, >>>>>>> Remy >>>>>>> >>>>>>> ---------- >>>>>>> Remy Suen >>>>>>> Eclipse Platform/UI Committer >>>>>>> IBM Ottawa >>>>>>> 1-613-356-5162_______________________________________________ >>>>>>> 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 >>>>> >>>> _______________________________________________ >>>> 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 > _______________________________________________ > 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
