Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorFelix Morgner2019-02-18 08:41:57 -0500
committerJonah Graham2019-03-04 11:17:23 -0500
commit659432f7e208d41461421200a098d19b15a0dbcc (patch)
tree1cbc64bd6e8cac09a15bfdacc5889270a2b56868 /core
parent97e18b4b3108d02fadac3b7892b76999cc600d24 (diff)
downloadorg.eclipse.cdt-659432f7e208d41461421200a098d19b15a0dbcc.tar.gz
org.eclipse.cdt-659432f7e208d41461421200a098d19b15a0dbcc.tar.xz
org.eclipse.cdt-659432f7e208d41461421200a098d19b15a0dbcc.zip
Bug 544535: Buttons in "Explore Macro Expansion" are not active
Refresh the toolbar buttons after registering the command handlers, to make sure that they are active. Change-Id: Ibee71a54fff7be0325257d25247e4e73f8b09b2e Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=544535 Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF
index c13fbb4bdd..30b6fc52ed 100644
--- a/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF
+++ b/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.ui; singleton:=true
-Bundle-Version: 6.4.100.qualifier
+Bundle-Version: 6.4.200.qualifier
Bundle-Activator: org.eclipse.cdt.ui.CUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
index a522470430..becd410e82 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
@@ -15,7 +15,9 @@
package org.eclipse.cdt.internal.ui.text.c.hover;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
+import java.util.Optional;
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.core.dom.ast.IMacroBinding;
@@ -43,6 +45,7 @@ import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.PixelConverter;
@@ -343,6 +346,10 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
getShell().setSize(new Point(stringLengthInPixel, pt.y));
}
}
+
+ Optional.ofNullable(getToolBarManager()).ifPresent(mgr -> {
+ Arrays.stream(mgr.getItems()).forEach(IContributionItem::update);
+ });
}
private void fillToolBar() {

Back to the top