mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 08:05:24 +02:00
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>
This commit is contained in:
parent
2bb6839c1a
commit
b94a0b5e0c
1 changed files with 7 additions and 0 deletions
|
@ -15,7 +15,9 @@
|
||||||
package org.eclipse.cdt.internal.ui.text.c.hover;
|
package org.eclipse.cdt.internal.ui.text.c.hover;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
|
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
|
||||||
import org.eclipse.cdt.core.dom.ast.IMacroBinding;
|
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.IPath;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
import org.eclipse.jface.action.IContributionItem;
|
||||||
import org.eclipse.jface.action.ToolBarManager;
|
import org.eclipse.jface.action.ToolBarManager;
|
||||||
import org.eclipse.jface.dialogs.IDialogSettings;
|
import org.eclipse.jface.dialogs.IDialogSettings;
|
||||||
import org.eclipse.jface.layout.PixelConverter;
|
import org.eclipse.jface.layout.PixelConverter;
|
||||||
|
@ -343,6 +346,10 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
|
||||||
getShell().setSize(new Point(stringLengthInPixel, pt.y));
|
getShell().setSize(new Point(stringLengthInPixel, pt.y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Optional.ofNullable(getToolBarManager()).ifPresent(mgr -> {
|
||||||
|
Arrays.stream(mgr.getItems()).forEach(IContributionItem::update);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillToolBar() {
|
private void fillToolBar() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue