port bug fix 416507 and 416509 from rcp project
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
index b38c8f8..27ca09f 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
@@ -819,7 +819,7 @@
List result = new ArrayList();
LogSession lastLogSession = LogReader.parseLogFile(fInputFile, result, fMemento);
- if ((lastLogSession != null) && isEclipseStartTime(lastLogSession.getDate())) {
+ if (lastLogSession != null && (lastLogSession.getDate() == null || isEclipseStartTime(lastLogSession.getDate()))) {
currentSession = lastLogSession;
} else {
currentSession = null;
@@ -841,7 +841,7 @@
private boolean isEclipseStartTime(Date date) {
String ts = System.getProperty("eclipse.startTime"); //$NON-NLS-1$
try {
- return (ts != null && date != null && date.getTime() == Long.parseLong(ts));
+ return (ts != null && date.getTime() == Long.parseLong(ts));
} catch (NumberFormatException e) {
// empty
}
@@ -1045,6 +1045,25 @@
private LogEntry createLogEntry(IStatus status) {
LogEntry entry = new LogEntry(status);
entry.setSession(currentSession);
+
+ if (status.getException() instanceof CoreException) {
+ IStatus coreStatus = ((CoreException) status.getException()).getStatus();
+ if (coreStatus != null) {
+ LogEntry childEntry = createLogEntry(coreStatus);
+ entry.addChild(childEntry);
+ childEntry.setSession(currentSession);
+ }
+ }
+
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ LogEntry childEntry = createLogEntry(children[i]);
+ entry.addChild(childEntry);
+ childEntry.setSession(currentSession);
+ }
+ }
+
return entry;
}