Merge branch 'release/2.0' into develop

This commit is contained in:
Eyck Jentzsch 2018-10-15 09:13:55 +02:00
commit 3faa7205ae
14 changed files with 33 additions and 27 deletions

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
<packaging>eclipse-test-plugin</packaging> <packaging>eclipse-test-plugin</packaging>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
</project> </project>

View File

@ -184,6 +184,9 @@ class VCDFileParser {
int netWidth = traceBuilder.getNetWidth(net); int netWidth = traceBuilder.getNetWidth(net);
if(netWidth<0) { if(netWidth<0) {
if("nan".equals(value))
traceBuilder.appendTransition(net, currentTime, Double.NaN);
else
traceBuilder.appendTransition(net, currentTime, Double.parseDouble(value)); traceBuilder.appendTransition(net, currentTime, Double.parseDouble(value));
} else { } else {
BitVector decodedValues = new BitVector(netWidth); BitVector decodedValues = new BitVector(netWidth);

View File

@ -10,6 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package com.minres.scviewer.database.vcd; package com.minres.scviewer.database.vcd;
import java.util.Map.Entry;
import java.util.NavigableMap; import java.util.NavigableMap;
import java.util.TreeMap; import java.util.TreeMap;
@ -106,6 +107,10 @@ public class VCDSignal<T extends ISignalChange> extends HierNode implements ISig
@Override @Override
public T getWaveformEventsBeforeTime(Long time) { public T getWaveformEventsBeforeTime(Long time) {
Entry<Long, T> e = values.floorEntry(time);
if(e==null)
return null;
else
return values.floorEntry(time).getValue(); return values.floorEntry(time).getValue();
} }

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -64,9 +64,12 @@ public class E4LifeCycle {
@PostContextCreate @PostContextCreate
void postContextCreate(IApplicationContext appContext, final IEventBroker eventBroker) { void postContextCreate(IApplicationContext appContext, final IEventBroker eventBroker) {
final String[] args = (String[])appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS); final String[] args = (String[])appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS);
Options opt = new Options(args, 1); Options opt = new Options(args, 0);
opt.getSet().addOption("c", Separator.BLANK, Multiplicity.ONCE); opt.getSet()
if (!opt.check(Options.DEFAULT_SET, true, true)) { .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); System.exit(1);
} }
final String confFile =opt.getSet().isSet("c")?opt.getSet().getOption("c").getResultValue(0):""; final String confFile =opt.getSet().isSet("c")?opt.getSet().getOption("c").getResultValue(0):"";

View File

@ -30,31 +30,20 @@ public class OpenHandler {
@Execute @Execute
public void execute(Shell shell, MApplication app, EModelService modelService, EPartService partService){ public void execute(Shell shell, MApplication app, EModelService modelService, EPartService partService){
FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI); FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
// dialog.setFilterExtensions (new String []{"vcd", "txdb", "txlog"});
dialog.setFilterExtensions (new String []{Messages.OpenHandler_0}); dialog.setFilterExtensions (new String []{Messages.OpenHandler_0});
dialog.open(); dialog.open();
String path = dialog.getFilterPath(); String path = dialog.getFilterPath();
for(String fileName: dialog.getFileNames()){ for(String fileName: dialog.getFileNames()){
File file = new File(path+File.separator+fileName); File file = new File(path+File.separator+fileName);
if(file.exists()){ 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$ MPart part = partService .createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer"); //$NON-NLS-1$
part.setLabel(file.getName()); part.setLabel(file.getName());
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app); //$NON-NLS-1$ MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app); //$NON-NLS-1$
partStack.getChildren().add(part); partStack.getChildren().add(part);
partService.showPart(part, PartState.ACTIVATE); partService.showPart(part, PartState.ACTIVATE);
// Object o = part.getObject();
// if(o instanceof WaveformViewerPart)
// ((WaveformViewerPart)o).setPartInput(file);
IEclipseContext ctx=part.getContext(); IEclipseContext ctx=part.getContext();
ctx.modify("input", file); //$NON-NLS-1$ ctx.modify("input", file); //$NON-NLS-1$
ctx.declareModifiable("input"); //$NON-NLS-1$ ctx.modify("config", ""); //$NON-NLS-1$
} }
} }
} }

View File

@ -34,6 +34,9 @@
</launcher> </launcher>
<vm> <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> </vm>
<license> <license>
@ -71,6 +74,7 @@
<plugin id="org.eclipse.core.databinding.property"/> <plugin id="org.eclipse.core.databinding.property"/>
<plugin id="org.eclipse.core.expressions"/> <plugin id="org.eclipse.core.expressions"/>
<plugin id="org.eclipse.core.filesystem"/> <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.macosx" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/> <plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
<plugin id="org.eclipse.core.jobs"/> <plugin id="org.eclipse.core.jobs"/>
@ -92,6 +96,7 @@
<plugin id="org.eclipse.e4.ui.di"/> <plugin id="org.eclipse.e4.ui.di"/>
<plugin id="org.eclipse.e4.ui.model.workbench"/> <plugin id="org.eclipse.e4.ui.model.workbench"/>
<plugin id="org.eclipse.e4.ui.services"/> <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.widgets"/>
<plugin id="org.eclipse.e4.ui.workbench"/> <plugin id="org.eclipse.e4.ui.workbench"/>
<plugin id="org.eclipse.e4.ui.workbench.addons.swt"/> <plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
@ -120,6 +125,7 @@
<plugin id="org.eclipse.pde.ds.lib"/> <plugin id="org.eclipse.pde.ds.lib"/>
<plugin id="org.eclipse.swt"/> <plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/> <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.eclipse.swt.win32.win32.x86_64" fragment="true"/>
<plugin id="org.w3c.css.sac"/> <plugin id="org.w3c.css.sac"/>
<plugin id="org.w3c.dom.events"/> <plugin id="org.w3c.dom.events"/>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
</project> </project>

View File

@ -12,7 +12,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>1.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath> <relativePath>../com.minres.scviewer.parent</relativePath>
</parent> </parent>
<!-- <build> <!-- <build>