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,

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


Back to the top