Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2019-09-28 04:37:26 +0000
committerMarc-André Laperle2019-10-04 03:16:18 +0000
commita71a413500e2e2c29a6384bd2a375b2144582f21 (patch)
tree1e2544f7f9cf5c6b51a3b5c8f429ed8ef54e304d
parent4e16631f30de08444342b0ad6622cfcf3cd39fd4 (diff)
downloadorg.eclipse.cdt-a71a413500e2e2c29a6384bd2a375b2144582f21.tar.gz
org.eclipse.cdt-a71a413500e2e2c29a6384bd2a375b2144582f21.tar.xz
org.eclipse.cdt-a71a413500e2e2c29a6384bd2a375b2144582f21.zip
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>
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java
index 0e92b496b0f..3f7f95087ee 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/settings/providers/LanguageSettingsProviderTab.java
@@ -40,6 +40,7 @@ import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -1075,7 +1076,9 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
optionsPageMap.clear();
for (ILanguageSettingsProvider provider : presentedProviders) {
- createOptionsPage(provider);
+ SafeRunner.run(() -> {
+ createOptionsPage(provider);
+ });
}
displaySelectedOptionPage();

Back to the top