Fixed cli options and NaN handling in VCD loader
This commit is contained in:
@ -30,31 +30,20 @@ public class OpenHandler {
|
||||
@Execute
|
||||
public void execute(Shell shell, MApplication app, EModelService modelService, EPartService partService){
|
||||
FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
|
||||
// dialog.setFilterExtensions (new String []{"vcd", "txdb", "txlog"});
|
||||
dialog.setFilterExtensions (new String []{Messages.OpenHandler_0});
|
||||
dialog.open();
|
||||
String path = dialog.getFilterPath();
|
||||
for(String fileName: dialog.getFileNames()){
|
||||
File file = new File(path+File.separator+fileName);
|
||||
if(file.exists()){
|
||||
// MPart part = MBasicFactory.INSTANCE.createPart();
|
||||
// part.setLabel(fileName);
|
||||
// part.setContributionURI("bundleclass://com.minres.scviewer.e4.application/"+ WaveformViewerPart.class.getName());
|
||||
MPart part = partService .createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer"); //$NON-NLS-1$
|
||||
part.setLabel(file.getName());
|
||||
|
||||
|
||||
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app); //$NON-NLS-1$
|
||||
partStack.getChildren().add(part);
|
||||
partService.showPart(part, PartState.ACTIVATE);
|
||||
// Object o = part.getObject();
|
||||
// if(o instanceof WaveformViewerPart)
|
||||
// ((WaveformViewerPart)o).setPartInput(file);
|
||||
IEclipseContext ctx=part.getContext();
|
||||
ctx.modify("input", file); //$NON-NLS-1$
|
||||
ctx.declareModifiable("input"); //$NON-NLS-1$
|
||||
|
||||
|
||||
ctx.modify("config", ""); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user