Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] workbench job equivalent?

Hi Todd,

I've investigated this. To me it looks like an issue in JFace:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=274554

Feel free to comment and/or add yourself to the CC field there.

Kind regards,
Elias.

On Tue, Apr 28, 2009 at 11:04 AM, Todd Lee <Todd.Lee@xxxxxxxxxx> wrote:

Hi Elias,

Thanks for your reply. As requested, I've posted the stack trace below.

The culprit seems to be the null status line that I mentioned earlier. Is there anything that I need to do in the swtapplication to initialize the status line? Note that I've created my application using my viewpart extensions directly in my submodules (rather than the method used in the example with the 'Controller' abstraction) - not sure if that would make a difference here.

In the mean time, I've been going through the example client app. I came across the UIProcess example, so I'm going to investigate that implementation a bit more.

Thanks,
Todd

java.lang.NullPointerException
       at org.eclipse.jface.action.StatusLineManager$1.setCanceled(StatusLineManager.java:188)
       at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:368)
       at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
       at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
       at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
       at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2577)
       at com.signaklara.device.commands.AutoSyncDeviceConnectionHandler.execute(AutoSyncDeviceConnectionHandler.java:163)
       at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
       at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
       at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
       at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
       at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
       at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:743)
       at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:729)
       at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:719)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393)
       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357)
       at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209)
       at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499)
       at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492)
       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
       at org.eclipse.riena.navigation.ui.swt.application.SwtApplication.createView(SwtApplication.java:62)
       at org.eclipse.riena.navigation.ui.application.AbstractApplication.start(AbstractApplication.java:66)
       at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556)
       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511)
       at org.eclipse.equinox.launcher.Main.run(Main.java:1284)
       at org.eclipse.equinox.launcher.Main.main(Main.java:1260)

-----Original Message-----
From: riena-dev-bounces@xxxxxxxxxxx on behalf of Elias Volanakis
Sent: Tue 4/28/2009 10:43 AM
To: Riena Developers list
Subject: Re: [riena-dev] workbench job equivalent?

HI Todd,

could you please post a stack trace? (or a standalone example reproducing this)

I haven't researched it in depth, but I would expect the code you
posted to work without changes in Riena. If the exception originates
from Riena I would consider it a bug.

In general the usual mechanisms for background work, like Jobs and
IRunnableWithProgress should work fine with Riena. We also have our
own abstraction called UIProcess. You'll find an example in
UIProcessDemoSubModuleController. I'm not extremely familiar with it,
maybe somebody else from the team can tell more...

Kind regards,
Elias.

On Mon, Apr 27, 2009 at 12:26 PM, Todd Lee <Todd.Lee@xxxxxxxxxx> wrote:
> I'm fairly new to RCP development, and have been working on a small
> standalone client application for use by our customers.
>
> As this is a tool designed for 'non-technical' users, we're trying to get
> away from the IDE feel of typical RCPs (we ship a separate product for
> technical users on the eclipse platform) so I was very excited to come
> across the Riena project, as it's exactly what our project management is
> looking for
> (they're going to be even happy with your plan to roll out detached views J
> )
>
>
>
> So as I work towards porting my existing RCP, I've run into a snag. My
> contributed viewparts and commands seem to show up as expected in the new
> navigation paradigm, but the handler (extends AbstractHandler, implements
> IHandler) that I have contributed to handle a command isn't working. The
> command wraps a potentially long-running task (it updates the model which
> serves as the input to the table view) in a workbench job with a progress
> monitor as shown below:
>
>
>
> <snip>
>
>             // get the workbench view and window handles
>
>             final IWorkbenchPart part =
> HandlerUtil.getActivePartChecked(event);
>
>             final IWorkbenchWindow win = HandlerUtil
>
>                     .getActiveWorkbenchWindowChecked(event);
>
>
>
>             // wrap the workbench job in a try/catch block
>
>             try {
>
>                 win.run(true, true, new IRunnableWithProgress() {
>
>
>
>                     public void run(IProgressMonitor monitor)
>
>                             throws InvocationTargetException,
>
>                             InterruptedException {
>
>
>
> </snip>
>
>
>
> Stepping through, it seems that creating the new IRunnableWithProgress
> bails, because the call to ModalContext.run() encounters an error with the
> progress monitor. The monitor used is a StatusLineManager, and it seems that
> the underlying statusLine is null. Now in my RCP, I initialized the status
> line in the ApplicationWorkbenchWindowAdvisor, do I have to do something
> similar to get things working with Riena?
>
>
>
> As an aside, I'm wondering if this is the best way to handle long-running
> tasks that update UI components in Riena? Is there another method that you'd
> recommend? I've read over the getting started docs regarding injection of
> services etc. but I haven't seen anything specifically related to local
> task/job management for a simple client app, so I'm defaulting to the
> 'workbench way'. Alternate suggestions are welcome.
>
>
>
> Thanks,
>
> Todd
>
>
>
> Todd Lee
>
> Member of Technical Staff
>
> Software Tools Development
>
> Medical Division
>
> ON Semiconductor
>
> todd.lee@xxxxxxxxxx
>
> +1 519 884-9696 ext. 2242
>
> http://onsemi.com
>
>
>
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev
>
>



--
Elias Volanakis | Technical Lead | EclipseSource Portland
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | http://eclipsesource.com
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev


_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev




--
Elias Volanakis | Technical Lead | EclipseSource Portland
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | http://eclipsesource.com



Back to the top