org.eclipse.jface.viewers.AbstractTableViewer Java Examples
The following examples show how to use
org.eclipse.jface.viewers.AbstractTableViewer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LazyCommonViewerContentProvider.java From elexis-3-core with Eclipse Public License 1.0 | 6 votes |
protected void asyncReload(){ Job job = Job.create(getJobName(), new ICoreRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException{ loadedElements = getElements(null); Display.getDefault().asyncExec(() -> { // virtual table ... AbstractTableViewer viewer = (AbstractTableViewer) commonViewer.getViewerWidget(); if (viewer != null && !viewer.getControl().isDisposed()) { viewer.setItemCount(loadedElements.length); } // trigger viewer refresh commonViewer.notify(Message.update); }); } }); job.setPriority(Job.SHORT); job.schedule(); }