[210481] Impossible to read error/warning description in status bar
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
index ca6fc96..db45945 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
@@ -66,6 +66,7 @@
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.information.InformationPresenter;
+import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher;
import org.eclipse.jface.text.source.ICharacterPairMatcher;
import org.eclipse.jface.text.source.ISourceViewer;
@@ -1097,6 +1098,8 @@
private ILabelProvider fStatusLineLabelProvider;
+ private boolean fSelectionChangedFromGoto = false;
+
/**
* Creates a new Structured Text Editor.
*/
@@ -3349,8 +3352,21 @@
}
}
}
+
+ public Annotation gotoAnnotation(boolean forward) {
+ Annotation result = super.gotoAnnotation(forward);
+ if(result != null)
+ fSelectionChangedFromGoto = true;
+ return result;
+ }
void updateStatusLine(ISelection selection) {
+ // Bug 210481 - Don't update the status line if the selection
+ // was caused by go to navigation
+ if(fSelectionChangedFromGoto) {
+ fSelectionChangedFromGoto = false;
+ return;
+ }
IStatusLineManager statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
if (fStatusLineLabelProvider != null && statusLineManager != null) {
String text = null;
diff --git a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
index 497bbe0..70df292 100644
--- a/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
+++ b/bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2004, 2008 IBM Corporation and others. All rights reserved. This
* program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and
* is available at http://www.eclipse.org/legal/epl-v10.html
@@ -443,14 +443,6 @@
if (getActivePage() != fSourcePageIndex) {
getTextEditor().getSelectionProvider().setSelection(event.getSelection());
}
- if (fDesignViewer.equals(event.getSource())) {
- try {
- updateStatusLine(event.getSelection());
- }
- catch (Exception exception) {
- Logger.logException(exception);
- }
- }
}
});
}
@@ -464,6 +456,8 @@
if (getActivePage() != fSourcePageIndex) {
getTextEditor().getSelectionProvider().setSelection(event.getSelection());
}
+ /* Bug 210481 - Removed call to updateStatusLine because this is already
+ * handled by the selection in the source page */
}
});
}