[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [riena-dev] how to update statusline with riena
|
Hi yao,
Riena has it's own status line. You can access it like shown below.
Look at org.eclipse.riena.example.client.controllers.StatuslineSubModuleController
for a longer example.
Not sure where the best place for background updates would be. The
code below will not work in the activator. Maybe somebody else here
has a suggestion for that.
ApplicationController ac
= (ApplicationController)
getNavigationNode().getParentOfType(IApplicationNode.class)
.getNavigationNodeController();
ac.getStatusline().setMessage("Hello World!");
Kind regards,
Elias.
PS: I've created http://bugs.eclipse.org/299796 with a request to
provide a getStatusline() method.
2010/1/15 yao_163 <steelyao@xxxxxxx>:
> Hi,all
>
> I'm deleloping a C/S system with eclipse riena architecture.
>
> There is a retuirement that the desk client system has a background thread
> to access the backend server,and to refresh some data on statusline.
>
>
> I use such code in the Activator ,
>
> I see the output message on the console ,but the statusline isn't updated.
>
> How could I implement this requirement with riena?
>
> Does someone help me ?
>
> Thanks!
>
>
>
> Job job = new Job("mytest job") {
>
> @Override
> protected IStatus run(IProgressMonitor monitor) {
> try {
> System.out.println("------------run as back ground---");
> if(PlatformUI.isWorkbenchRunning()){
> final IWorkbench workbench = PlatformUI.getWorkbench();
> if (workbench != null) {
> final Display display = workbench.getDisplay();
> display.asyncExec(new Runnable() {
>
> public void run() {
> IWorkbenchWindow wbWin
> =workbench.getActiveWorkbenchWindow();
> IWorkbenchPage wbPage = wbWin.getActivePage();
>
> IViewPart[] views = wbPage.getViews();
>
> IViewSite viewSite = views[1].getViewSite();
> IActionBars ab = viewSite.getActionBars();
> IStatusLineManager sl = ab .getStatusLineManager();
>
>
> sl.setMessage("hello");
>
>
> }
> });
> }
> }
> return Status.OK_STATUS;
> } finally {
> schedule(2000);
> }
> }
> };
> job.setPriority(Job.SHORT);
> job.schedule();
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev
>
>
--
Elias Volanakis | Technical Lead | http://eclipsesource.com
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | @evolanakis