use of org.eclipse.jface.util.SafeRunnable in project polymap4-core by Polymap4.
the class NavigatorContentServiceLabelProvider method fireLabelProviderChanged.
/**
* Fires a label provider changed event to all registered listeners
* Only listeners registered at the time this method is called are notified.
*
* @param event a label provider changed event
*
* @see ILabelProviderListener#labelProviderChanged
*/
protected void fireLabelProviderChanged(final LabelProviderChangedEvent event) {
Object[] theListeners = getListeners();
for (int i = 0; i < theListeners.length; ++i) {
final ILabelProviderListener l = (ILabelProviderListener) theListeners[i];
SafeRunner.run(new SafeRunnable() {
public void run() {
l.labelProviderChanged(event);
}
});
}
}
use of org.eclipse.jface.util.SafeRunnable in project nebula.widgets.nattable by eclipse.
the class RowPostSelectionProvider method firePostSelectionChanged.
protected void firePostSelectionChanged(final SelectionChangedEvent event) {
Object[] listeners = this.postSelectionChangedListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
@Override
public void run() {
l.selectionChanged(event);
}
});
}
}
use of org.eclipse.jface.util.SafeRunnable in project egit by eclipse.
the class GitChangeSetLabelProvider method fireLabelProviderChanged.
private void fireLabelProviderChanged(final LabelProviderChangedEvent event) {
for (Object o : listeners.getListeners()) {
final ILabelProviderListener l = (ILabelProviderListener) o;
SafeRunnable.run(new SafeRunnable() {
@Override
public void run() {
l.labelProviderChanged(event);
}
});
}
}
use of org.eclipse.jface.util.SafeRunnable in project egit by eclipse.
the class CreateBranchPage method getBranchNameSuggestionFromProvider.
private String getBranchNameSuggestionFromProvider() {
final AtomicReference<String> ref = new AtomicReference<>();
final IBranchNameProvider branchNameProvider = getBranchNameProvider();
if (branchNameProvider != null)
SafeRunner.run(new SafeRunnable() {
@Override
public void run() throws Exception {
ref.set(branchNameProvider.getBranchNameSuggestion());
}
});
return ref.get();
}
use of org.eclipse.jface.util.SafeRunnable in project archi by archimatetool.
the class LocalClipboard method fireClipboardChanged.
private void fireClipboardChanged(Object contents) {
for (Object element : getListeners()) {
final ILocalClipboardListener l = (ILocalClipboardListener) element;
SafeRunner.run(new SafeRunnable() {
@Override
public void run() {
l.clipBoardChanged(contents);
}
});
}
}
Aggregations