Revision e41cdd18
Added by Lutz Suhrbier almost 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
32 | 32 |
import org.eclipse.jface.window.ApplicationWindow; |
33 | 33 |
import org.eclipse.swt.graphics.Color; |
34 | 34 |
import org.eclipse.swt.graphics.Font; |
35 |
import org.eclipse.swt.widgets.Display; |
|
36 | 35 |
import org.eclipse.swt.widgets.Shell; |
37 | 36 |
import org.eclipse.ui.IEditorPart; |
38 | 37 |
import org.eclipse.ui.IViewPart; |
... | ... | |
52 | 51 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
53 | 52 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
54 | 53 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
54 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
55 | 55 |
import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer; |
56 | 56 |
import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart; |
57 | 57 |
import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart; |
... | ... | |
300 | 300 |
*/ |
301 | 301 |
public static void informationDialog(final String title, |
302 | 302 |
final String message) { |
303 |
Display.getDefault().asyncExec(new Runnable() { |
|
303 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
304 | 304 |
|
305 | 305 |
public void run() { |
306 | 306 |
MessageDialog.openInformation(getShell(), title, message); |
... | ... | |
322 | 322 |
*/ |
323 | 323 |
public static void warningDialog(final String title, final Object source, |
324 | 324 |
final String message) { |
325 |
Display.getDefault().asyncExec(new Runnable() { |
|
325 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
326 | 326 |
|
327 | 327 |
public void run() { |
328 | 328 |
MessageDialog.openWarning(getShell(), title, message); |
... | ... | |
351 | 351 |
*/ |
352 | 352 |
public static void errorDialog(final String title, final Object source, |
353 | 353 |
final String message, final Throwable t) { |
354 |
Display.getDefault().asyncExec(new Runnable() { |
|
354 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
355 | 355 |
|
356 | 356 |
public void run() { |
357 | 357 |
MessageDialog.openError(getShell(), title, message + getCauseRecursively(t)); |
... | ... | |
389 | 389 |
*/ |
390 | 390 |
public static void errorDialog(final String title, final Object source, |
391 | 391 |
final IStatus status) { |
392 |
Display.getDefault().asyncExec(new Runnable() { |
|
392 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
393 | 393 |
|
394 | 394 |
public void run() { |
395 | 395 |
MessageDialog.openError(getShell(), title, status.getMessage()); |
... | ... | |
524 | 524 |
* a {@link java.lang.String} object. |
525 | 525 |
*/ |
526 | 526 |
public static void setStatusLine(final String message) { |
527 |
Display.getDefault().asyncExec(new Runnable() { |
|
527 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
528 | 528 |
|
529 | 529 |
public void run() { |
530 | 530 |
statusLineManager.setMessage(message); |
Also available in: Unified diff
Replaced any Display.getDefault() & Display,getCurrent() by DisplayProxy.getDefault() which is implemented in fragment store.rcp or store.rap respectively