This commit is contained in:
Eyck Jentzsch 2020-05-09 12:50:28 +02:00
父節點 e88014ebba
當前提交 19ea1f0b6d
共有 8 個檔案被更改,包括 174 行新增66 行删除

查看文件

@ -1,46 +1,104 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="true"/>
<stringAttribute key="deselected_workspace_plugins" value="com.minres.scviewer.e4.application,com.minres.scviewer.ui"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.minres.scviewer.database.test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.minres.scviewer.database.test"/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.minres.scviewer.database.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,org.apache.ant@default:default,org.apache.commons.jxpath@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.codehaus.groovy@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.emf.xpath@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.hamcrest.core@default:default,org.junit@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:true,com.minres.scviewer.database.test@default:default,com.minres.scviewer.database.text@default:true,com.minres.scviewer.database.ui.swt@default:default,com.minres.scviewer.database.ui@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:true,com.opcoach.e4.preferences@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="false"/>
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="true"/>
<setAttribute key="deselected_workspace_bundles">
<setEntry value="com.minres.scviewer.e4.application"/>
<setEntry value="com.minres.scviewer.ui"/>
</setAttribute>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.minres.scviewer.database.test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.minres.scviewer.database.test"/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.minres.scviewer.database.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
<setAttribute key="selected_target_bundles">
<setEntry value="com.google.guava@default:default"/>
<setEntry value="javax.annotation@default:default"/>
<setEntry value="javax.inject@default:default"/>
<setEntry value="javax.servlet@default:default"/>
<setEntry value="org.apache.ant@default:default"/>
<setEntry value="org.apache.commons.jxpath@default:default"/>
<setEntry value="org.apache.felix.gogo.command@default:default"/>
<setEntry value="org.apache.felix.gogo.runtime@default:default"/>
<setEntry value="org.codehaus.groovy@default:default"/>
<setEntry value="org.eclipse.ant.core@default:default"/>
<setEntry value="org.eclipse.core.commands@default:default"/>
<setEntry value="org.eclipse.core.contenttype@default:default"/>
<setEntry value="org.eclipse.core.expressions@default:default"/>
<setEntry value="org.eclipse.core.filesystem.macosx@default:false"/>
<setEntry value="org.eclipse.core.filesystem@default:default"/>
<setEntry value="org.eclipse.core.jobs@default:default"/>
<setEntry value="org.eclipse.core.resources@default:default"/>
<setEntry value="org.eclipse.core.runtime@default:true"/>
<setEntry value="org.eclipse.core.variables@default:default"/>
<setEntry value="org.eclipse.e4.core.contexts@default:default"/>
<setEntry value="org.eclipse.e4.core.di.annotations@default:default"/>
<setEntry value="org.eclipse.e4.core.di.extensions@default:default"/>
<setEntry value="org.eclipse.e4.core.di@default:default"/>
<setEntry value="org.eclipse.e4.core.services@default:default"/>
<setEntry value="org.eclipse.e4.emf.xpath@default:default"/>
<setEntry value="org.eclipse.e4.ui.di@default:default"/>
<setEntry value="org.eclipse.e4.ui.model.workbench@default:default"/>
<setEntry value="org.eclipse.e4.ui.services@default:default"/>
<setEntry value="org.eclipse.emf.common@default:default"/>
<setEntry value="org.eclipse.emf.ecore@default:default"/>
<setEntry value="org.eclipse.equinox.app@default:default"/>
<setEntry value="org.eclipse.equinox.bidi@default:default"/>
<setEntry value="org.eclipse.equinox.common@2:true"/>
<setEntry value="org.eclipse.equinox.ds@1:true"/>
<setEntry value="org.eclipse.equinox.preferences@default:default"/>
<setEntry value="org.eclipse.equinox.registry@default:default"/>
<setEntry value="org.eclipse.equinox.util@default:default"/>
<setEntry value="org.eclipse.jface@default:default"/>
<setEntry value="org.eclipse.osgi.compatibility.state@default:false"/>
<setEntry value="org.eclipse.osgi.services@default:default"/>
<setEntry value="org.eclipse.osgi@-1:true"/>
<setEntry value="org.eclipse.swt.cocoa.macosx.x86_64@default:false"/>
<setEntry value="org.eclipse.swt@default:default"/>
<setEntry value="org.hamcrest.core@default:default"/>
<setEntry value="org.junit@default:default"/>
</setAttribute>
<setAttribute key="selected_workspace_bundles">
<setEntry value="com.minres.scviewer.database.sqlite@default:true"/>
<setEntry value="com.minres.scviewer.database.test@default:default"/>
<setEntry value="com.minres.scviewer.database.text@default:true"/>
<setEntry value="com.minres.scviewer.database.ui.swt@default:default"/>
<setEntry value="com.minres.scviewer.database.ui@default:default"/>
<setEntry value="com.minres.scviewer.database.vcd@default:default"/>
<setEntry value="com.minres.scviewer.database@default:true"/>
<setEntry value="com.opcoach.e4.preferences@default:default"/>
</setAttribute>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>

查看文件

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
Bundle-Version: 2.5.0.qualifier
Bundle-Version: 2.6.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",

查看文件

@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.minres.scviewer.e4.application</artifactId>
<version>2.5.0-SNAPSHOT</version>
<version>2.6.0-SNAPSHOT</version>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>

查看文件

@ -1,5 +1,5 @@
AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: {0}\n
AboutDialog_1=\nCopyright (c) 2015, 2019 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP-Tools/SCViewer and the master branch is mirrored to GitHub: https://github.com/minres/SCViewer\n
AboutDialog_1=\nCopyright (c) 2015, 2019, 2020 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.mapdb and org.sqlite JDBC driver\n\nSource code is hosted at https://git.minres.com/VP-Tools/SCViewer and the master branch is mirrored to GitHub: https://github.com/minres/SCViewer\n
DesignBrowser_12=Append all after
DesignBrowser_16=Insert all before
DesignBrowser_2=Enter text to filter waveforms

查看文件

@ -328,13 +328,15 @@ public class DesignBrowser {
*/
@Focus
public void setFocus() {
txTableViewer.getTable().setFocus();
IStructuredSelection selection = (IStructuredSelection)txTableViewer.getSelection();
if(selection.size()==0){
appendItem.setEnabled(false);
if(txTableViewer!=null) {
txTableViewer.getTable().setFocus();
IStructuredSelection selection = (IStructuredSelection)txTableViewer.getSelection();
if(selection.size()==0){
appendItem.setEnabled(false);
}
selectionService.setSelection(selection);
thisSelectionCount=selection.toList().size();
}
selectionService.setSelection(selection);
thisSelectionCount=selection.toList().size();
updateButtons();
}

查看文件

@ -10,8 +10,14 @@
*******************************************************************************/
package com.minres.scviewer.e4.application.parts;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import java.util.Vector;
import java.util.regex.PatternSyntaxException;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
@ -477,12 +483,19 @@ public class TransactionDetails {
return true;
}
if(element instanceof ITxAttribute){
return (((ITxAttribute) element).getName().toLowerCase().matches(searchString.toLowerCase()));
try {
return (((ITxAttribute) element).getName().toLowerCase().matches(searchString.toLowerCase()));
} catch (PatternSyntaxException e) {
return true;
}
}
if(element instanceof Object[]) {
return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase());
try {
return (((Object[])element)[0]).toString().toLowerCase().matches(searchString.toLowerCase());
} catch (PatternSyntaxException e) {
return true;
}
}
return false;
}
}
@ -490,11 +503,13 @@ public class TransactionDetails {
/**
* The Enum Type.
*/
enum Type {/** The props. */
PROPS, /** The attrs. */
ATTRS, /** The in rel. */
IN_REL, /** The out rel. */
OUT_REL}
enum Type {
PROPS, /** The props. */
ATTRS, /** The attrs. */
IN_REL, /** The in rel. */
OUT_REL,/** The out rel. */
HIER
}
/**
* The Class TreeNode.
@ -507,6 +522,7 @@ public class TransactionDetails {
/** The element. */
public ITx element;
private String hier_path;
/**
* Instantiates a new tree node.
*
@ -516,6 +532,13 @@ public class TransactionDetails {
public TreeNode(ITx element, Type type){
this.element=element;
this.type=type;
this.hier_path="";
}
public TreeNode(ITx element, String path){
this.element=element;
this.type=Type.HIER;
this.hier_path=path;
}
/* (non-Javadoc)
@ -527,9 +550,33 @@ public class TransactionDetails {
case ATTRS: return Messages.TransactionDetails_11;
case IN_REL: return Messages.TransactionDetails_12;
case OUT_REL: return Messages.TransactionDetails_13;
case HIER:{
String[] tokens = hier_path.split("\\.");
return tokens[tokens.length-1];
}
}
return ""; //$NON-NLS-1$
}
public Object[] getAttributeListForHier() {
if(childs==null) {
Map<String, Object> res = element.getAttributes().stream()
.filter(txAttr -> txAttr.getName().startsWith(hier_path))
.map(txAttr -> {
String target = hier_path.length()==0?txAttr.getName():txAttr.getName().replace(hier_path+'.', "");
String[] tokens = target.split("\\.");
if(tokens.length==1)
return new AbstractMap.SimpleEntry<>(tokens[0], txAttr);
else
return new AbstractMap.SimpleEntry<>(tokens[0], new TreeNode(element, hier_path.length()>0?hier_path+"."+tokens[0]:tokens[0]));
})
.collect(Collectors.toMap(p -> p.getKey(), p -> p.getValue(), (first, second) -> first));
childs = new TreeMap<String, Object>(res).values().toArray();
}
return childs;
}
private Object[] childs=null;
}
/**
@ -577,8 +624,8 @@ public class TransactionDetails {
{Messages.TransactionDetails_19, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getBeginTime())},
{Messages.TransactionDetails_21, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getEndTime())}
};
}else if(propertyHolder.type == Type.ATTRS)
return propertyHolder.element.getAttributes().toArray();
}else if(propertyHolder.type == Type.ATTRS || propertyHolder.type == Type.HIER)
return propertyHolder.getAttributeListForHier();
else if(propertyHolder.type == Type.IN_REL){
Vector<Object[] > res = new Vector<>();
for(ITxRelation rel:propertyHolder.element.getIncomingRelations()){
@ -655,7 +702,8 @@ public class TransactionDetails {
case NAME:
if (element instanceof ITxAttribute) {
ITxAttribute attribute = (ITxAttribute) element;
return new StyledString(attribute.getName());
String[] tokens = attribute.getName().split("\\.");
return new StyledString(tokens[tokens.length-1]);
}else if (element instanceof ITxRelation) {
return new StyledString(Messages.TransactionDetails_4);
}else if(element instanceof Object[]){

查看文件

@ -10,7 +10,7 @@
<relativePath>../com.minres.scviewer.parent</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.5.0-SNAPSHOT</version>
<version>2.6.0-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

查看文件

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.5.0.qualifier" useFeatures="false" includeLaunchers="true">
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.6.0.qualifier" useFeatures="false" includeLaunchers="true">
<configIni use="default">
</configIni>
@ -56,6 +56,7 @@
<plugin id="com.minres.scviewer.database.vcd"/>
<plugin id="com.minres.scviewer.e4.application"/>
<plugin id="com.opcoach.e4.preferences"/>
<plugin id="com.opcoach.e4.preferences.mainmenu"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
<plugin id="org.apache.batik.constants"/>
@ -113,7 +114,6 @@
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.concurrent"/>
<plugin id="org.eclipse.equinox.ds"/>
<plugin id="org.eclipse.equinox.event"/>
<plugin id="org.eclipse.equinox.preferences"/>
<plugin id="org.eclipse.equinox.registry"/>