Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Status-Line not updating ??
Status-Line not updating ?? [message #444174] Fri, 10 February 2006 06:07 Go to next message
Eclipse User
Originally posted by: eclipse.newsgroups.anegma.com

Hello,

in my current RCP application project I'm making usage of the status
line where I want to display the server connection status. To do that I
created a StatusLineManager that checks regulary in a thread for changes
of the connection. Now I've the problem that the text in status line
does not beeing updated even if I change the text. Therefore I use this
method in my manager:


private void setStatusText(String text, boolean error) {
if (error) {
statusLineManager.setErrorMessage(text);
} else {
statusLineManager.setMessage(text);
}
statusLineManager.update(true);
}

Accordingly to the document of the update method the status line should
be updated immediately but it doesn't?

Anyone knows what going on with that status line?
I didn't add any StatusLineContributionItem's cause I just only need the
pure text display of the status line.

Thanks,
Gunnar
Re: Status-Line not updating ?? [message #444248 is a reply to message #444174] Sat, 11 February 2006 01:01 Go to previous messageGo to next message
Rohit Khariwal is currently offline Rohit Khariwal
Messages: 114
Registered: July 2009
Senior Member
if you need to access the statusline from the view use:
getViewSite().getActionBars().getStatusLineManager().setMess age(msg);

don't forgot to write
configurer.setShowStatusLine(true);
in the preWindowOpen() method of the ApplicationWorkbechWindowAdivisor
Re: Status-Line not updating ?? [message #444262 is a reply to message #444248] Mon, 13 February 2006 04:18 Go to previous messageGo to next message
Eclipse User
Originally posted by: eclipse.newsgroups.anegma.com

Yes, I know but that's now my problem. I 've access to the
StatusLineManger but I don't know why he's not updating the elements
that it controls after changes with setMessage() or setErrorMessage().


Rohit schrieb:
> if you need to access the statusline from the view use:
> getViewSite().getActionBars().getStatusLineManager().setMess age(msg);
>
> don't forgot to write
> configurer.setShowStatusLine(true);
> in the preWindowOpen() method of the ApplicationWorkbechWindowAdivisor
Re: Status-Line not updating ?? [message #444268 is a reply to message #444262] Mon, 13 February 2006 07:32 Go to previous messageGo to next message
Rohit Khariwal is currently offline Rohit Khariwal
Messages: 114
Registered: July 2009
Senior Member
hi write this after the setmessage()

getViewSite().getActionBars().getStatusLineManager().update( true);
Re: Status-Line not updating ?? [message #444273 is a reply to message #444262] Mon, 13 February 2006 07:32 Go to previous messageGo to next message
Rohit Khariwal is currently offline Rohit Khariwal
Messages: 114
Registered: July 2009
Senior Member
hi write this after the setmessage()

getViewSite().getActionBars().getStatusLineManager().update( true);
Re: Status-Line not updating ?? [message #444340 is a reply to message #444273] Tue, 14 February 2006 04:37 Go to previous messageGo to next message
Eclipse User
Originally posted by: nico.bruehl.siemens.com

Hi, :)

I have a similar problem.

my perspective is split into three parts:
layout.addStandaloneView(OutlookBarView.ID, false, IPageLayout.LEFT, 0.15f, editorArea);
layout.addStandaloneView(EmptyOne.ID, false, IPageLayout.BOTTOM, 0.90f, OutlookBarView.ID);
IFolderLayout folder = layout.createFolder("messages", IPageLayout.RIGHT, 0.85f, editorArea);
folder.addPlaceholder(StartView.ID + ":*");
folder.addView(StartView.ID);

I'm using the statusline to display a date filter, the user can enable or disable.
My problem is, when I start the program everything works fine, i can select a date, set the date and use the filter.
Now, if i open a new View, the statusLine is reset and it shows the initalizing state (that is disabled) but should keep the datefilter information that was set in the statusline before.
The other thing is, when I click in the different views, different dates are displayed - very strange, though :">

Does every view has its own statusline or can one use one and the same for all?


Another little problem is, I would like to add a separator that displays a vertical line in the statusline. I tried using the jface separator but when I add it with e.g.:
slm.appendToGroup("BEGIN_GROUP", new Separator());
it is neither displayed in the statusline nor throws any exception. So, what am I doing wrong?


Could anyone help me solving those problems please ? :)

Thanks,
Nico
Re: Status-Line not updating ?? [message #444341 is a reply to message #444340] Tue, 14 February 2006 04:46 Go to previous messageGo to next message
Eclipse User
Originally posted by: nico.bruehl.siemens.com

ok, got the first thing to work... so there is only this problem with the separator left :)

anyone? :)
Re: Status-Line not updating ?? [message #444348 is a reply to message #444341] Tue, 14 February 2006 07:05 Go to previous messageGo to next message
Rohit Khariwal is currently offline Rohit Khariwal
Messages: 114
Registered: July 2009
Senior Member
u can use alternate option of creating the label seperator
new Label(parent,SWT.SEPERATER)


Please give your solution also whenever u got for your problem. so it will help all the members
Re: Status-Line not updating ?? [message #444415 is a reply to message #444348] Thu, 16 February 2006 02:56 Go to previous message
Eclipse User
Originally posted by: nico.bruehl.siemens.com

> u can use alternate option of creating the label
> seperator
> new Label(parent,SWT.SEPERATER)
>
>
> Please give your solution also whenever u got for
> your problem. so it will help all the members

I have a button in the statusLine, with which you can enable/disable the filter and open a new shell in which you can specify a filter setting etc.
The problem was that I initalize the slm in the workbenchwindowadvisor, so everytime I use the "update()" method the initial state is recreated - so, if the initial state was enabled the button is alse re-enabled although it should have been disabled.

I solved it the following way:
Since I have a "runtime"-userclass that stores some of the user settings on run time, I just set a boolean in it.
So everytime the button is enabled or disabled the boolean is changed. Now, everytime after the statusLineManager is updated, I have to make a call for the boolean and set the button state to that state it is supposed to be :)

a bit complicated but it works, though :)

btw, Thanks for the hint with the separator label - works fine for me :)

nico
Previous Topic:How does eclipse find the JRE Location
Next Topic:how to config RCP Application in run configuration wizard
Goto Forum:
  


Current Time: Thu Jul 24 13:48:26 EDT 2014

Powered by FUDForum. Page generated in 0.02912 seconds