mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Use SafeRunner in LanguageSettingsProviderTab
If an option page contributed by an extension throws an exception, then none of the other pages get created. It is better to use a SafeRunner when in such case where plugins could break other things than its own functionality. Change-Id: I531c966be8ef6460a838b3d10bc61dcbdbe627b0 Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This commit is contained in:
parent
4e16631f30
commit
a71a413500
1 changed files with 4 additions and 1 deletions
|
@ -40,6 +40,7 @@ import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||||
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.SafeRunner;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.viewers.ArrayContentProvider;
|
import org.eclipse.jface.viewers.ArrayContentProvider;
|
||||||
|
@ -1075,7 +1076,9 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
optionsPageMap.clear();
|
optionsPageMap.clear();
|
||||||
for (ILanguageSettingsProvider provider : presentedProviders) {
|
for (ILanguageSettingsProvider provider : presentedProviders) {
|
||||||
createOptionsPage(provider);
|
SafeRunner.run(() -> {
|
||||||
|
createOptionsPage(provider);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
displaySelectedOptionPage();
|
displaySelectedOptionPage();
|
||||||
|
|
Loading…
Add table
Reference in a new issue