Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2008-09-05 00:05:22 -0400
committermkersten2008-09-05 00:05:22 -0400
commit1f63c245ef9f7f9e66e79511b01d54496a3899e2 (patch)
treec054ee092f3885382f2db5a1c381546094479de2
parent5f7eb93b46473b83785e42f164947286ba2d9103 (diff)
downloadorg.eclipse.mylyn.tasks-1f63c245ef9f7f9e66e79511b01d54496a3899e2.tar.gz
org.eclipse.mylyn.tasks-1f63c245ef9f7f9e66e79511b01d54496a3899e2.tar.xz
org.eclipse.mylyn.tasks-1f63c245ef9f7f9e66e79511b01d54496a3899e2.zip
RESOLVED - bug 245445: [patch] NewTaskFromErrorAction should include the sub-entries of an error LogEntry
https://bugs.eclipse.org/bugs/show_bug.cgi?id=245445
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java34
1 files changed, 28 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java
index af8dadd8d..0db4c2542 100644
--- a/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java
+++ b/org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java
@@ -80,15 +80,37 @@ public class NewTaskFromErrorAction implements IObjectActionDelegate {
// StringBuilder sb = new StringBuilder();
// buildDescriptionFromLogEntry(entry, sb, true);
+ ErrorLogStatus status = createStatus(entry);
+
+ new ErrorReporterManager().fail(status);
+ }
+
+ private ErrorLogStatus createStatus(LogEntry entry) {
ErrorLogStatus status = new ErrorLogStatus(entry.getSeverity(), entry.getPluginId(), entry.getCode(),
entry.getMessage());
- status.setDate(entry.getDate());
- status.setStack(entry.getStack());
- LogSession session = entry.getSession();
- if (session != null) {
- status.setLogSessionData(session.getSessionData());
+ try {
+ status.setDate(entry.getDate());
+ status.setStack(entry.getStack());
+ LogSession session = entry.getSession();
+ if (session != null) {
+ status.setLogSessionData(session.getSessionData());
+ }
+
+ if (entry.hasChildren()) {
+ Object[] children = entry.getChildren(entry);
+ if (children != null) {
+ for (Object child : children) {
+ if (child instanceof LogEntry) {
+ ErrorLogStatus childStatus = createStatus((LogEntry) child);
+ status.add(childStatus);
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ // ignore any errors for setting additional attributes
}
- new ErrorReporterManager().fail(status);
+ return status;
}
public void run() {

Back to the top