use of org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock in project eclipse.platform.text by eclipse.
the class SpellingConfigurationBlock method performOk.
@Override
public void performOk() {
for (Iterator<ISpellingPreferenceBlock> it = fProviderPreferences.values().iterator(); it.hasNext(); ) {
final ISpellingPreferenceBlock block = it.next();
ISafeRunnable runnable = new ISafeRunnable() {
@Override
public void run() throws Exception {
block.performOk();
}
@Override
public void handleException(Throwable x) {
}
};
SafeRunner.run(runnable);
}
}
use of org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock in project eclipse.platform.text by eclipse.
the class SpellingConfigurationBlock method updateCheckboxDependencies.
private void updateCheckboxDependencies() {
final boolean enabled = fEnablementCheckbox.getSelection();
if (fComboGroup != null)
setEnabled(fComboGroup, enabled);
SpellingEngineDescriptor desc = EditorsUI.getSpellingService().getActiveSpellingEngineDescriptor(fStore);
// $NON-NLS-1$
String id = desc != null ? desc.getId() : "";
final ISpellingPreferenceBlock preferenceBlock = fProviderPreferences.get(id);
if (preferenceBlock != null) {
ISafeRunnable runnable = new ISafeRunnable() {
@Override
public void run() throws Exception {
preferenceBlock.setEnabled(enabled);
}
@Override
public void handleException(Throwable x) {
}
};
SafeRunner.run(runnable);
}
}
use of org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock in project eclipse.platform.text by eclipse.
the class SpellingConfigurationBlock method dispose.
@Override
public void dispose() {
for (Iterator<ISpellingPreferenceBlock> it = fProviderPreferences.values().iterator(); it.hasNext(); ) {
final ISpellingPreferenceBlock block = it.next();
ISafeRunnable runnable = new ISafeRunnable() {
@Override
public void run() throws Exception {
block.dispose();
}
@Override
public void handleException(Throwable x) {
}
};
SafeRunner.run(runnable);
}
}
use of org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock in project eclipse.platform.text by eclipse.
the class SpellingConfigurationBlock method performDefaults.
@Override
public void performDefaults() {
restoreFromPreferences();
for (Iterator<ISpellingPreferenceBlock> it = fProviderPreferences.values().iterator(); it.hasNext(); ) {
final ISpellingPreferenceBlock block = it.next();
ISafeRunnable runnable = new ISafeRunnable() {
@Override
public void run() throws Exception {
block.performDefaults();
}
@Override
public void handleException(Throwable x) {
}
};
SafeRunner.run(runnable);
}
}
use of org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock 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