Java Code Examples for org.eclipse.swt.widgets.Display.wake()

The following are Jave code examples for showing how to use wake() of the org.eclipse.swt.widgets.Display class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: gw4e.project   File: ExecutionContextSelectionUIPage.java   Source Code and License Vote up 5 votes
private void loadAncestor(IFile file) {
	Display display = Display.getCurrent();
	Runnable longJob = new Runnable() {
		public void run() {
			display.syncExec(new Runnable() {
				public void run() {
					ancestors = JDTManager.findAvailableExecutionContextAncestors(file);
				}
			});
			display.wake();
		}
	};
	BusyIndicator.showWhile(display, longJob);

}
 
Example 2
Project: gw4e.project   File: JUnitGW4ETestUIPage.java   Source Code and License Vote up 5 votes
/**
 * 
 */
private void loadVertices() {
	Display display = Display.getCurrent();
	Runnable longJob = new Runnable() {
		public void run() {
			display.syncExec(new Runnable() {
				public void run() {
					IFile ifile = ResourceManager.toIFile(selection);
					String modelFileName = null;

					try {
						modelFileName = ResourceManager.getAbsolutePath(ifile);
						context = GraphWalkerFacade.getContext(modelFileName);
						updateUI();
					} catch (Exception e) {
						ResourceManager.logException(e);
						JUnitGW4ETestUIPage.this.setErrorMessage(
								"Unable to load the graph model. See error logs in the Error View.");
						return;
					}

					comboReachedVertexViewer.setInput(_loadVertices(context));
				}
			});
			display.wake();
		}
	};
	BusyIndicator.showWhile(display, longJob);
}
 
Example 3
Project: gw4e.project   File: GeneratorChoiceComposite.java   Source Code and License Vote up 5 votes
private void loadAncestor(IFile file) {
	Display display = Display.getCurrent();
	Runnable longJob = new Runnable() {
		public void run() {
			display.syncExec(new Runnable() {
				public void run() {
					ancestors = JDTManager.findAvailableExecutionContextAncestors(file);
				}
			});
			display.wake();
		}
	};
	BusyIndicator.showWhile(display, longJob);
	 
}
 
Example 4
Project: gw4e.project   File: BuildPoliciesCheckboxTableViewer.java   Source Code and License Vote up 5 votes
/**
 * 
 */
public void loadBuildPolicies() {
	Display display = Display.getCurrent();
	Runnable longJob = new Runnable() {
		public void run() {
			display.syncExec(new Runnable() {
				public void run() {
					List<BuildPolicy> policies;
					try {
						if (file!=null) {
							policies = BuildPolicyManager.getBuildPolicies(file, false);
						} else {
							policies = new ArrayList<BuildPolicy>();
						}
					} catch (Exception e) {
						// DialogManager.displayErrorMessage(MessageUtil.getString("error"), e.getMessage(),e);
						// throw new RuntimeException(e);
						policies = new ArrayList<BuildPolicy>();
					}
					BuildPolicy[] input = policies.stream().filter(item -> !item.hasTimeDuratioStopCondition())
							.toArray(BuildPolicy[]::new);
					setInput(input);
				}
			});
			display.wake();
		}
	};
	BusyIndicator.showWhile(display, longJob);
}