Merge remote-tracking branch 'origin/master'
Conflicts:
bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
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 062c036..89f782e 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
@@ -96,7 +96,6 @@
private IMemento fMemento;
private File fInputFile;
-// private String fDirectory;
private Comparator fComparator;
@@ -635,11 +634,6 @@
*/
void handleImport() {
FileDialog dialog = new FileDialog(getViewSite().getShell());
- // RAP [if] Missing API
-// dialog.setFilterExtensions(new String[] {"*.log"}); //$NON-NLS-1$
-// if (fDirectory != null)
-// dialog.setFilterPath(fDirectory);
- // RAPEND
String path = dialog.open();
if (path == null) { // cancel
return;
@@ -671,7 +665,6 @@
*/
protected void setLogFile(File path) {
fInputFile = path;
-// fDirectory = fInputFile.getParent();
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
monitor.beginTask(Messages.get().LogView_operation_importing, IProgressMonitor.UNKNOWN);
@@ -821,7 +814,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;
@@ -843,7 +836,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
}
@@ -1047,6 +1040,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;
}