Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java31
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java9
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java19
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java3
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java1
6 files changed, 56 insertions, 13 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java
index a97d7aadb..289034ff9 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/StyledStringBuffer.java
@@ -38,6 +38,12 @@ class StyledStringBuffer {
RGB fg;
}
+ private boolean full_error_reports;
+
+ void enableFullErrorReports(boolean full_error_reports) {
+ this.full_error_reports = full_error_reports;
+ }
+
StyledStringBuffer append(int pos, int font, RGB bg, RGB fg) {
Style x = new Style();
x.pos = pos;
@@ -103,16 +109,23 @@ class StyledStringBuffer {
StyledStringBuffer append(Throwable x, RGB color) {
if (x == null) return this;
- String[] a = ("Exception: " + TCFModel.getErrorMessage(x, true)).split("\n");
- for (String s : a) {
- int i = s.indexOf(':');
- if (i >= 0) {
- append(s.substring(0, i + 1), SWT.BOLD, null, color);
- append(s.substring(i + 1), SWT.ITALIC, null, color);
- }
- else {
- append(s, SWT.ITALIC, null, color);
+ if (full_error_reports) {
+ String[] a = ("Exception: " + TCFModel.getErrorMessage(x, true)).split("\n");
+ for (String s : a) {
+ int i = s.indexOf(':');
+ if (i >= 0) {
+ append(s.substring(0, i + 1), SWT.BOLD, null, color);
+ append(s.substring(i + 1), SWT.ITALIC, null, color);
+ }
+ else {
+ append(s, SWT.ITALIC, null, color);
+ }
+ bf.append('\n');
}
+ }
+ else {
+ append("Exception: ", SWT.BOLD, null, color);
+ append(TCFModel.getErrorMessage(x, false), SWT.ITALIC, null, color);
bf.append('\n');
}
return this;
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java
index add791d2f..cf97edd91 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDetailPane.java
@@ -241,9 +241,12 @@ public class TCFDetailPane implements IDetailPane, IPropertyChangeListener {
private StyledStringBuffer getDetailText(ArrayList<TCFNode> nodes, Runnable done) {
StyledStringBuffer bf = new StyledStringBuffer();
- for (TCFNode n : nodes) {
- if (n instanceof IDetailsProvider) {
- if (!((IDetailsProvider)n).getDetailText(bf, done)) return null;
+ if (nodes.size() > 0) {
+ bf.enableFullErrorReports(nodes.get(0).model.getShowFullErrorReports());
+ for (TCFNode n : nodes) {
+ if (n instanceof IDetailsProvider) {
+ if (!((IDetailsProvider)n).getDetailText(bf, done)) return null;
+ }
}
}
return bf;
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
index b2274c526..5d679b3ce 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
@@ -224,6 +224,7 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
private boolean show_function_arg_values;
private boolean delay_children_list_updates;
private boolean auto_children_list_updates;
+ private boolean show_full_error_reports;
private final Map<String,String> action_results = new HashMap<String,String>();
private final HashMap<String,TCFAction> active_actions = new HashMap<String,TCFAction>();
@@ -721,6 +722,7 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
show_function_arg_values = prefs.getBoolean(TCFPreferences.PREF_STACK_FRAME_ARG_VALUES);
auto_children_list_updates = prefs.getBoolean(TCFPreferences.PREF_AUTO_CHILDREN_LIST_UPDATES);
delay_children_list_updates = prefs.getBoolean(TCFPreferences.PREF_DELAY_CHILDREN_LIST_UPDATES);
+ show_full_error_reports = prefs.getBoolean(TCFPreferences.PREF_FULL_ERROR_REPORTS);
Protocol.invokeLater(new Runnable() {
public void run() {
for (TCFNode n : id2node.values()) {
@@ -943,6 +945,10 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
return delay_children_list_updates;
}
+ public boolean getShowFullErrorReports() {
+ return show_full_error_reports;
+ }
+
void onProxyInstalled(TCFModelProxy mp) {
IPresentationContext pc = mp.getPresentationContext();
model_proxies.add(mp);
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java
index 53970d194..8cd1dea6c 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFDebugPreferencePage.java
@@ -41,6 +41,7 @@ public class TCFDebugPreferencePage extends FieldEditorPreferencePage implements
createPerformanceGroup(parent);
createStackTraceGroup(parent);
+ createMiscGroup(parent);
}
private void createPerformanceGroup(Composite parent) {
@@ -163,4 +164,22 @@ public class TCFDebugPreferencePage extends FieldEditorPreferencePage implements
group.setLayout(layout);
}
+
+ private void createMiscGroup(Composite parent) {
+ Group group = new Group(parent, SWT.NONE);
+ group.setText("Misc");
+ GridLayout layout = new GridLayout(3, false);
+ group.setLayout(layout);
+ group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ BooleanFieldEditor fullErrorReports = new BooleanFieldEditor(
+ TCFPreferences.PREF_FULL_ERROR_REPORTS,
+ "Show full (long) error reports in details panes of the debugger views",
+ group);
+
+ fullErrorReports.fillIntoGrid(group, 3);
+ addField(fullErrorReports);
+
+ group.setLayout(layout);
+ }
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java
index 2c1b4911f..d75681c55 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferences.java
@@ -28,7 +28,8 @@ public class TCFPreferences {
PREF_VIEW_UPDATES_THROTTLE = "ViewUpdatesThrottle",
PREF_TARGET_TRAFFIC_THROTTLE = "TargetTrafficThrottle",
PREF_AUTO_CHILDREN_LIST_UPDATES = "AutoChildrenListUpdates",
- PREF_DELAY_CHILDREN_LIST_UPDATES = "DelayChildrenListUpdates";
+ PREF_DELAY_CHILDREN_LIST_UPDATES = "DelayChildrenListUpdates",
+ PREF_FULL_ERROR_REPORTS = "FullErrorReports";
public static IPreferenceStore getPreferenceStore() {
return Activator.getDefault().getPreferenceStore();
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java
index 140348e61..cc4b61811 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/preferences/TCFPreferencesInitializer.java
@@ -32,5 +32,6 @@ public class TCFPreferencesInitializer extends AbstractPreferenceInitializer {
prefs.setDefault(TCFPreferences.PREF_TARGET_TRAFFIC_THROTTLE, true);
prefs.setDefault(TCFPreferences.PREF_AUTO_CHILDREN_LIST_UPDATES, true);
prefs.setDefault(TCFPreferences.PREF_DELAY_CHILDREN_LIST_UPDATES, false);
+ prefs.setDefault(TCFPreferences.PREF_FULL_ERROR_REPORTS, false);
}
}

Back to the top