use of org.eclipse.ui.texteditor.spelling.SpellingEngineDescriptor in project eclipse.platform.text by eclipse.
the class SpellingConfigurationBlock method canPerformOk.
@Override
public boolean canPerformOk() {
SpellingEngineDescriptor desc = EditorsUI.getSpellingService().getActiveSpellingEngineDescriptor(fStore);
// $NON-NLS-1$
String id = desc != null ? desc.getId() : "";
final ISpellingPreferenceBlock block = fProviderPreferences.get(id);
if (block == null)
return true;
final Boolean[] result = new Boolean[] { Boolean.TRUE };
ISafeRunnable runnable = new ISafeRunnable() {
@Override
public void run() throws Exception {
result[0] = Boolean.valueOf(block.canPerformOk());
}
@Override
public void handleException(Throwable x) {
}
};
SafeRunner.run(runnable);
return result[0].booleanValue();
}
Aggregations