6: Add Load/Save state functionality

Task-Url: https://github.com/eyck/txviewer/issues/issue/6
This commit is contained in:
2015-11-30 22:16:29 +01:00
parent 31ed3e4858
commit ff4cb91aed
7 changed files with 159 additions and 46 deletions

View File

@ -27,8 +27,9 @@ public class OpenHandler {
@Execute
public void execute(Shell shell, MApplication app, EModelService modelService, EPartService partService){
FileDialog dialog = new FileDialog(shell, SWT.MULTI);
dialog.setFilterExtensions (new String []{"vcd", "txdb", "txlog"});
FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
// dialog.setFilterExtensions (new String []{"vcd", "txdb", "txlog"});
dialog.setFilterExtensions (new String []{"*.vcd;*.txdb;*.txlog"});
dialog.open();
String path = dialog.getFilterPath();
for(String fileName: dialog.getFileNames()){
@ -36,8 +37,7 @@ public class OpenHandler {
if(file.exists()){
// MPart part = MBasicFactory.INSTANCE.createPart();
// part.setLabel(fileName);
// part.setContributionURI("bundleclass://com.minres.scviewer.e4.application/"+
// WaveformViewerPart.class.getName());
// part.setContributionURI("bundleclass://com.minres.scviewer.e4.application/"+ WaveformViewerPart.class.getName());
MPart part = partService .createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
part.setLabel(file.getName());