Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Rohrbach2011-02-07 14:00:27 -0500
committerRandy Rohrbach2011-02-07 14:00:27 -0500
commit00d8b333468de2b6bd6ea186f84830b069cd7a06 (patch)
tree6d01b1c703cdc30de5f611bcb0260990da04ebba
parent6a72764db6dd150821197fdf041aa1fcd3aa7071 (diff)
downloadorg.eclipse.cdt-00d8b333468de2b6bd6ea186f84830b069cd7a06.tar.gz
org.eclipse.cdt-00d8b333468de2b6bd6ea186f84830b069cd7a06.tar.xz
org.eclipse.cdt-00d8b333468de2b6bd6ea186f84830b069cd7a06.zip
Bug - 330468
Corrects the lack of removal of the "x" error when the expression has been corrected. It also makes sure we do not go back to the last expression under certain conditions when it should not. Randy 781-364-2226
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java31
1 files changed, 24 insertions, 7 deletions
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java
index 48f04c4d7d..f136cd651d 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java
@@ -12,6 +12,7 @@
package org.eclipse.cdt.debug.ui.memory.memorybrowser;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
@@ -38,8 +39,10 @@ public class GoToAddressBarWidget {
private Composite fComposite;
protected static int ID_GO_NEW_TAB = 2000;
-
- /**
+
+ private IStatus expressionStatus = new Status(Status.OK, MemoryBrowserPlugin.PLUGIN_ID, null);
+
+ /**
* @param parent
* @return
*/
@@ -68,8 +71,8 @@ public class GoToAddressBarWidget {
return fComposite;
}
-
- private Text createExpressionField(Composite parent) {
+
+ private Text createExpressionField(Composite parent){
Text expression = new Text(parent, SWT.SINGLE | SWT.BORDER);
expression.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
@@ -103,8 +106,11 @@ public class GoToAddressBarWidget {
fEmptyExpression.show();
else
fEmptyExpression.hide();
-
- fWrongExpression.hide();
+
+ if (expressionStatus.isOK())
+ fWrongExpression.hide();
+ else
+ fWrongExpression.show();
}
public int getHeight()
@@ -143,5 +149,16 @@ public class GoToAddressBarWidget {
fWrongExpression.setDescriptionText(message.getMessage());
fWrongExpression.show();
}
+
+ expressionStatus = message;
}
-} \ No newline at end of file
+
+ /**
+ * Return the expression status
+ * @return expression status
+ */
+ public IStatus getExpressionStatus()
+ {
+ return expressionStatus;
+ }
+}

Back to the top