Skip to main content
summaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorAlvaro Sanchez-Leon2015-08-10 20:30:54 +0000
committerAlvaro Sanchez-Leon2015-08-12 17:27:34 +0000
commit22e7d3a7babbda68c04b6bfd6c8645be1204196b (patch)
tree9a043dea8d29d7e7d80fae8a7c3ca36f4547e5d0 /dsf
parentfbee145ff0eddb72ca95b3d86d3bfc0d2ddb60ec (diff)
downloadorg.eclipse.cdt-22e7d3a7babbda68c04b6bfd6c8645be1204196b.tar.gz
org.eclipse.cdt-22e7d3a7babbda68c04b6bfd6c8645be1204196b.tar.xz
org.eclipse.cdt-22e7d3a7babbda68c04b6bfd6c8645be1204196b.zip
Bug 474612 - Number format detail Shall report Error details of selected
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.java3
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.properties3
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java17
3 files changed, 20 insertions, 3 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.java
index 9757b2602b5..31178a59e2d 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2015 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
@@ -22,6 +22,7 @@ public class MessagesForNumberFormatDetailPane extends NLS {
public static String NumberFormatDetailPane_Spaces_label;
public static String NumberFormatDetailPane_CarriageReturn_label;
public static String NumberFormatDetailPane_DotDotDot_label;
+ public static String NumberFormatDetailPane__End_parentheses;
static {
// initialize resource bundle
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.properties b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.properties
index 8f8aec8b0fc..17b2cceebaf 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.properties
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/MessagesForNumberFormatDetailPane.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2006, 2009 IBM Corporation and others.
+# Copyright (c) 2006, 2015 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
@@ -14,3 +14,4 @@ NumberFormatDetailPane_Name_label=Name :
NumberFormatDetailPane_Spaces_label=\t
NumberFormatDetailPane_CarriageReturn_label=\n
NumberFormatDetailPane_DotDotDot_label=...
+NumberFormatDetailPane__End_parentheses=)
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
index dbdead74feb..97149c4d86b 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
@@ -254,6 +254,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
public static String SPACES = MessagesForNumberFormatDetailPane.NumberFormatDetailPane_Spaces_label;
public static String CRLF = MessagesForNumberFormatDetailPane.NumberFormatDetailPane_CarriageReturn_label;
public static String DOTS = MessagesForNumberFormatDetailPane.NumberFormatDetailPane_DotDotDot_label;
+ public static String PARENTHESES = MessagesForNumberFormatDetailPane.NumberFormatDetailPane__End_parentheses;
/**
* Job to compute the details for a selection
@@ -353,7 +354,21 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
@Override
protected void handleErrorOrWarning() {
- detailComputed(null, getStatus().getMessage());
+ String rootMessage = new String(getStatus().getMessage()).trim();
+ // Provide a detail Error message to the user
+ StringBuilder finalResult = new StringBuilder(rootMessage);
+ IStatus[] statuses = getStatus().getChildren();
+ if (statuses != null) {
+ for (int i=0; i < statuses.length; i++) {
+ String childMessage = statuses[i].getMessage().trim();
+ // Avoid root message duplication
+ if (!childMessage.equals(rootMessage)) {
+ finalResult.append(CRLF + CRLF + (i+1) + PARENTHESES + childMessage);
+ }
+ }
+ }
+
+ detailComputed(null, finalResult.toString());
};
})
});

Back to the top