diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml
index 87bc1e45c5f..edf577c6c46 100644
--- a/core/org.eclipse.cdt.ui/plugin.xml
+++ b/core/org.eclipse.cdt.ui/plugin.xml
@@ -1480,7 +1480,12 @@
contextId="org.eclipse.cdt.ui.macroExpansionHoverScope"
commandId="org.eclipse.cdt.ui.hover.forwardMacroExpansion"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
-
+ getStepCount()) {
fIndex= 0;
@@ -220,7 +272,7 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
showExpansion();
}
- protected void backward() {
+ protected final void backward() {
--fIndex;
if (fIndex < 0) {
fIndex= fixIndex(getStepCount());
@@ -266,7 +318,7 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
* @see org.eclipse.cdt.internal.ui.text.AbstractCompareViewerInformationControl#getId()
*/
protected String getId() {
- return "org.eclipse.cdt.ui.text.hover.CMacroExpansionExploration"; //$NON-NLS-1$
+ return "org.eclipse.cdt.ui.text.hover.CMacroExpansionExploration0"; //$NON-NLS-1$
}
/*
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionInput.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionInput.java
index 52efaee65d4..9cb6eb6dead 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionInput.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionInput.java
@@ -89,7 +89,7 @@ public class CMacroExpansionInput {
final int startOffset = location.getNodeOffset();
if (startOffset <= fOffset) {
int endOffset= startOffset + location.getNodeLength();
- if (endOffset >= fEndOffset) {
+ if (endOffset >= fEndOffset || node instanceof IASTTranslationUnit) {
if (startOffset > fBestOffset || endOffset < fBestEndOffset) {
fBestMatch= node;
fBestOffset= startOffset;