Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » RCP freezes up
RCP freezes up [message #465399] Wed, 28 March 2007 19:26
Eclipse UserFriend
Originally posted by: dray.cse.unl.edu

I am running a new thread in the fillstatusLine to get data from an
external lib. Even though I am using a separate thread , RCP freezes up
for a few seconds and then starts working normally. Is there a way to
totally run the thread in the background so that the RCP does not freeze
at all . I also tried Job instead of using a thread but got the same
result.
This is the code I am using in the fillStatusLine.

new Thread(new Runnable() {
public void run() {
if (FIRMConnector.connect()) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
statusLine.setErrorMessage(null, null);
statusLine.setMessage(VegDriPlugin.getImage(Images.CONNECTED _ICON),
"Connected");
}
});
} else {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
statusLine.setErrorMessage(VegDriPlugin.getImage(Images.DISC ONNECTED_ICON),
"Disconnected");
newAction.setEnabled(false);
executeAction.setEnabled(false);
aggregateAction.setEnabled(false);
importAction.setEnabled(false);
}
});
}
}
}).start();


I am also saving the state of the window overriding the initialize method.
Here is the code:

@Override
public void initialize(IWorkbenchConfigurer configurer) {
configurer.setExitOnLastWindowClose(true);
configurer.setSaveAndRestore(true);
}
This is also causing the hourglass to appear for a few seconds.
How can I have this also done in the background?
Any suggestions will be very helpful.
Thanks.
Previous Topic:TreeViewer Label Provider
Next Topic:BIRT and RCP Integration
Goto Forum:
  


Current Time: Sun Oct 13 11:51:55 GMT 2024

Powered by FUDForum. Page generated in 0.03699 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top