fix missing gzip txlog file filter in file dialog

This commit is contained in:
Eyck Jentzsch 2021-07-11 13:47:12 +02:00
parent f57fb93525
commit 929408d08c
3 changed files with 15 additions and 3 deletions

View File

@ -12,5 +12,5 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.compiler.source=11

View File

@ -9,7 +9,7 @@ DesignBrowser_8=Insert before
LoadingWaveformDb_0=Database loading... LoadingWaveformDb_0=Database loading...
LoadStoreSettingsHandler_2=*.scview LoadStoreSettingsHandler_2=*.scview
LoadStoreSettingsHandler_3=SCViewer.scview LoadStoreSettingsHandler_3=SCViewer.scview
OpenHandler_0=*.vcd;*.vcd.gz;*.txdb;*.txdb.gz;*.txlog;*.fbrdb OpenHandler_0=*.vcd;*.vcd.gz;*.txlog;*.txlog.gz;*.txdb;*.fbrdb
QuitHandler_0=Confirmation QuitHandler_0=Confirmation
QuitHandler_1=Do you want to exit? QuitHandler_1=Do you want to exit?
RelationTypeToolControl_0=------------ RelationTypeToolControl_0=------------

View File

@ -3,6 +3,7 @@ package com.minres.scviewer.e4.application.parts;
import java.io.File; import java.io.File;
import java.nio.file.FileSystems; import java.nio.file.FileSystems;
import java.nio.file.PathMatcher; import java.nio.file.PathMatcher;
import java.text.DateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -229,6 +230,14 @@ public class FileBrowserDialog extends TrayDialog {
colSize.getColumn().setText("Size"); colSize.getColumn().setText("Size");
colSize.getColumn().addSelectionListener(getSelectionAdapter(colSize.getColumn(), 1)); colSize.getColumn().addSelectionListener(getSelectionAdapter(colSize.getColumn(), 1));
TableViewerColumn colDate = new TableViewerColumn(tableViewer, SWT.RIGHT);
colDate.setLabelProvider(new FileTableLabelProvider() {
@Override public String getText(Object element) { return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM).format(((File) element).lastModified()); }
});
colDate.getColumn().setWidth(200);
colDate.getColumn().setText("Modification Date");
colDate.getColumn().addSelectionListener(getSelectionAdapter(colDate.getColumn(), 2));
TableViewerColumn colEmpty = new TableViewerColumn(tableViewer, SWT.CENTER); TableViewerColumn colEmpty = new TableViewerColumn(tableViewer, SWT.CENTER);
colEmpty.setLabelProvider(new FileTableLabelProvider() { colEmpty.setLabelProvider(new FileTableLabelProvider() {
@Override public String getText(Object element) { return ""; } @Override public String getText(Object element) { return ""; }
@ -264,7 +273,7 @@ public class FileBrowserDialog extends TrayDialog {
tableViewer.setInput(selectedDir.listFiles()); tableViewer.setInput(selectedDir.listFiles());
} }
}); });
sashForm.setWeights(new int[]{3, 3}); sashForm.setWeights(new int[]{2, 3});
return area; return area;
} }
@ -445,6 +454,9 @@ public class FileBrowserDialog extends TrayDialog {
case 1: case 1:
rc = Long.valueOf(p1.length()).compareTo(p2.length()); rc = Long.valueOf(p1.length()).compareTo(p2.length());
break; break;
case 2:
rc = Long.valueOf(p1.lastModified()).compareTo(p2.lastModified());
break;
default: default:
rc = 0; rc = 0;
} }