diff options
| author | Lars Vogel | 2020-06-19 08:21:58 +0000 |
|---|---|---|
| committer | Lars Vogel | 2020-06-19 13:59:35 +0000 |
| commit | 6193cb48054fbc1614c3ef8d55ee5558b5604995 (patch) | |
| tree | bed255031e1a107ec2fa09caa66f59cba96dfe7f | |
| parent | f2f326c7a8c0d4712333736521c74ae7b0501cc0 (diff) | |
| download | eclipse.platform.ui-6193cb48054fbc1614c3ef8d55ee5558b5604995.tar.gz eclipse.platform.ui-6193cb48054fbc1614c3ef8d55ee5558b5604995.tar.xz eclipse.platform.ui-6193cb48054fbc1614c3ef8d55ee5558b5604995.zip | |
Bug 564400 - Allow to restart via the notification after theme switch
Change-Id: I572271ce255ca2bf4f6131430eb3834252b600fa
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java index bd4426d9aad..f4a716cef76 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java @@ -19,6 +19,7 @@ package org.eclipse.ui.internal.dialogs; import static org.eclipse.jface.viewers.LabelProvider.createTextProvider; +import static org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter; import static org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants.ATT_COLOR_AND_FONT_ID; import static org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants.ATT_OS_VERSION; import static org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants.ATT_THEME_ASSOCIATION; @@ -67,6 +68,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferenceConstants; import org.eclipse.ui.IWorkbenchPreferencePage; @@ -526,8 +528,9 @@ public class ViewsPreferencePage extends PreferencePage implements IWorkbenchPre protected void createContentArea(Composite parent) { parent.setLayout(new RowLayout()); - Label label = new Label(parent, SWT.WRAP); - label.setText(WorkbenchMessages.ThemeChangeWarningText); + Link link = new Link(parent, SWT.WRAP); + link.setText(WorkbenchMessages.ThemeChangeWarningText); + link.addSelectionListener(widgetSelectedAdapter(e -> PlatformUI.getWorkbench().restart(true))); } } diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties index 3201b2a3474..ccd6d77cd02 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties @@ -494,7 +494,7 @@ OpenPerspectiveDialogAction_tooltip=Open Perspective PreferencePage_noDescription = (No description available) PreferencePageParameterValues_pageLabelSeparator = \ >\ ThemingEnabled = E&nable theming (requires restart) -ThemeChangeWarningText = A restart is required for the theme change to take full effect. +ThemeChangeWarningText = A <a>restart</a> is required for the theme change to take full effect. ThemeChangeWarningTitle = Theme change # --- Workbench ----- WorkbenchPreference_openMode=Open mode |
