Merge branch 'release/2.0' into develop
This commit is contained in:
commit
3faa7205ae
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-test-plugin</packaging>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
</project>
|
|
@ -184,6 +184,9 @@ class VCDFileParser {
|
|||
|
||||
int netWidth = traceBuilder.getNetWidth(net);
|
||||
if(netWidth<0) {
|
||||
if("nan".equals(value))
|
||||
traceBuilder.appendTransition(net, currentTime, Double.NaN);
|
||||
else
|
||||
traceBuilder.appendTransition(net, currentTime, Double.parseDouble(value));
|
||||
} else {
|
||||
BitVector decodedValues = new BitVector(netWidth);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package com.minres.scviewer.database.vcd;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
import java.util.NavigableMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
|
@ -106,6 +107,10 @@ public class VCDSignal<T extends ISignalChange> extends HierNode implements ISig
|
|||
|
||||
@Override
|
||||
public T getWaveformEventsBeforeTime(Long time) {
|
||||
Entry<Long, T> e = values.floorEntry(time);
|
||||
if(e==null)
|
||||
return null;
|
||||
else
|
||||
return values.floorEntry(time).getValue();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -64,9 +64,12 @@ public class E4LifeCycle {
|
|||
@PostContextCreate
|
||||
void postContextCreate(IApplicationContext appContext, final IEventBroker eventBroker) {
|
||||
final String[] args = (String[])appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS);
|
||||
Options opt = new Options(args, 1);
|
||||
opt.getSet().addOption("c", Separator.BLANK, Multiplicity.ONCE);
|
||||
if (!opt.check(Options.DEFAULT_SET, true, true)) {
|
||||
Options opt = new Options(args, 0);
|
||||
opt.getSet()
|
||||
.addOption("clearPersistedState", Multiplicity.ZERO_OR_ONE)
|
||||
.addOption("c", Separator.BLANK, Multiplicity.ZERO_OR_ONE);
|
||||
if (!opt.check(Options.DEFAULT_SET, true, false)) {
|
||||
System.err.println(opt.getCheckErrors());
|
||||
System.exit(1);
|
||||
}
|
||||
final String confFile =opt.getSet().isSet("c")?opt.getSet().getOption("c").getResultValue(0):"";
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
</launcher>
|
||||
|
||||
<vm>
|
||||
<linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8</linux>
|
||||
<macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8</macos>
|
||||
<windows include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8</windows>
|
||||
</vm>
|
||||
|
||||
<license>
|
||||
|
@ -71,6 +74,7 @@
|
|||
<plugin id="org.eclipse.core.databinding.property"/>
|
||||
<plugin id="org.eclipse.core.expressions"/>
|
||||
<plugin id="org.eclipse.core.filesystem"/>
|
||||
<plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/>
|
||||
<plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
|
||||
<plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
|
||||
<plugin id="org.eclipse.core.jobs"/>
|
||||
|
@ -92,6 +96,7 @@
|
|||
<plugin id="org.eclipse.e4.ui.di"/>
|
||||
<plugin id="org.eclipse.e4.ui.model.workbench"/>
|
||||
<plugin id="org.eclipse.e4.ui.services"/>
|
||||
<plugin id="org.eclipse.e4.ui.swt.gtk" fragment="true"/>
|
||||
<plugin id="org.eclipse.e4.ui.widgets"/>
|
||||
<plugin id="org.eclipse.e4.ui.workbench"/>
|
||||
<plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
|
||||
|
@ -120,6 +125,7 @@
|
|||
<plugin id="org.eclipse.pde.ds.lib"/>
|
||||
<plugin id="org.eclipse.swt"/>
|
||||
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
|
||||
<plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
|
||||
<plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
|
||||
<plugin id="org.w3c.css.sac"/>
|
||||
<plugin id="org.w3c.dom.events"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
</project>
|
|
@ -12,7 +12,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||
</parent>
|
||||
<!-- <build>
|
||||
|
|
Loading…
Reference in New Issue