Advertisement

09.13.2008 at 11:04AM PDT, ID: 23729088
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

SWT Display is not running event when working with Abbot SWT

Asked by aquasw in Eclipse, Quality Assurance

Tags: ,

We're trying to create automated testing for our Eclipse RCP application with Abbot.SWT plugin. We're able to send and run one command though XML-RPC but then the server hangs. Running it in debugger shows that there is a function in the server which waits for the event to complete - this is done by queueing another event to the display and waiting for this event to be executed.

From some reason, the event don't get executed in our RCP application. When running a standard Eclipse installation - it works but when starting our RCP application, we see that the asyncExec() does not run the code. The application functions as usual - Any idea what are we missing here?
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
public void waitForIdle() {
		checkThread();
 
		// Queue up an asyncExec to set a flag when it runs. Because the Display
		// runs them in FIFO
		// order, ours will not run until everything that was previously in the
		// queue has run and
		// completed.
		final boolean[] done = new boolean[1];
		getDisplay().asyncExec(new Runnable() {
			public void run() {
				done[0] = true;
			}
		});
 
		// Wait for the asyncExec to complete. If it times out we will assume it
		// means that the
		// display thread is hung so we will do a System.exit().
		final long limit = System.currentTimeMillis() + WAIT_IDLE_TIMEOUT;
		while (!done[0]) {
			try {
				Thread.sleep(WAIT_IDLE_INTERVAL);
			} catch (InterruptedException exception) {
				// Empty block intended.
			}
			if (System.currentTimeMillis() > limit)
				throw new WaitTimedOutError();
		}
 
	}
[+][-]09.20.2008 at 08:02AM PDT, ID: 22529958

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Eclipse, Quality Assurance
Tags: Eclipse, Java
Sign Up Now!
Solution Provided By: mbodewes
Participating Experts: 1
Solution Grade: B
 
 
[+][-]09.22.2008 at 06:24AM PDT, ID: 22539696

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628