commit
b68a7d3259
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry exported="true" kind="lib" path="sqlite-jdbc-3.8.7.jar"/>
|
<classpathentry exported="true" kind="lib" path="sqlite-jdbc-3.8.7.jar"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: SQLite transaction database
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.sqlite
|
Bundle-SymbolicName: com.minres.scviewer.database.sqlite
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
org.eclipse.equinox.util;bundle-version="1.0.500",
|
org.eclipse.equinox.util;bundle-version="1.0.500",
|
||||||
org.eclipse.equinox.ds;bundle-version="1.4.200",
|
org.eclipse.equinox.ds;bundle-version="1.4.200",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src/"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -12,22 +12,22 @@
|
||||||
<booleanAttribute key="clearwslog" value="false"/>
|
<booleanAttribute key="clearwslog" value="false"/>
|
||||||
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
|
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
|
||||||
<booleanAttribute key="default" value="false"/>
|
<booleanAttribute key="default" value="false"/>
|
||||||
<stringAttribute key="deselected_workspace_plugins" value="com.minres.scviewer.database.swt,com.minres.scviewer.e4.application,com.minres.scviewer.ui"/>
|
<stringAttribute key="deselected_workspace_plugins" value="com.minres.scviewer.e4.application,com.minres.scviewer.ui"/>
|
||||||
<booleanAttribute key="includeOptional" value="true"/>
|
<booleanAttribute key="includeOptional" value="true"/>
|
||||||
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
|
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
<listEntry value="/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java"/>
|
<listEntry value="/com.minres.scviewer.database.test"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
<listEntry value="1"/>
|
<listEntry value="4"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
|
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.minres.scviewer.database.test"/>
|
||||||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
<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"/>
|
<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.7"/>
|
<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="com.minres.scviewer.database.test.DatabaseServicesTest"/>
|
<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.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.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.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||||
|
@ -35,8 +35,8 @@
|
||||||
<stringAttribute key="pde.version" value="3.3"/>
|
<stringAttribute key="pde.version" value="3.3"/>
|
||||||
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
|
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
|
||||||
<booleanAttribute key="run_in_ui_thread" value="true"/>
|
<booleanAttribute key="run_in_ui_thread" value="true"/>
|
||||||
<stringAttribute key="selected_target_plugins" value="com.google.guava*10.0.1.v201203051515@default:default,com.google.guava*15.0.0.v201403281430@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet*3.0.0.v201112011016@default:default,javax.servlet*3.1.0.v201410161800@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.commons.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.codehaus.groovy*2.4.3.xx-201508121448-e45@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.java7@default:false,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.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@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.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@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.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt.cocoa@default:false,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@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.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@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.eclipse.team.core@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.trace@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.mozilla.javascript@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
|
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@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.vcd@default:default,com.minres.scviewer.database@default:true"/>
|
<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="show_selected_only" value="false"/>
|
||||||
<booleanAttribute key="tracing" value="false"/>
|
<booleanAttribute key="tracing" value="false"/>
|
||||||
<booleanAttribute key="useCustomFeatures" value="false"/>
|
<booleanAttribute key="useCustomFeatures" value="false"/>
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: SCViewer database tests
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.test
|
Bundle-SymbolicName: com.minres.scviewer.database.test
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GnbH
|
Bundle-Vendor: MINRES Technologies GnbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: org.junit,
|
Require-Bundle: org.junit,
|
||||||
com.minres.scviewer.database,
|
com.minres.scviewer.database,
|
||||||
com.minres.scviewer.database.sqlite;bundle-version="1.0.0",
|
com.minres.scviewer.database.sqlite;bundle-version="1.0.0",
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
/.scviewer.*
|
/.scviewer.*
|
||||||
|
/.my_db.txlog*
|
|
@ -14,6 +14,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.eclipse.tycho</groupId>
|
<groupId>org.eclipse.tycho</groupId>
|
||||||
<artifactId>tycho-surefire-plugin</artifactId>
|
<artifactId>tycho-surefire-plugin</artifactId>
|
||||||
|
<version>0.23.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- <bundleStartLevel /> -->
|
<!-- <bundleStartLevel /> -->
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src/"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
|
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: Textual transaction database
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.text
|
Bundle-SymbolicName: com.minres.scviewer.database.text
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Import-Package: com.minres.scviewer.database,
|
Import-Package: com.minres.scviewer.database,
|
||||||
org.osgi.framework;version="1.3.0"
|
org.osgi.framework;version="1.3.0"
|
||||||
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Comparator;
|
||||||
/**
|
/**
|
||||||
* Various utilities used in JDBM
|
* Various utilities used in JDBM
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
class Utils {
|
class Utils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,6 +47,7 @@ class Utils {
|
||||||
* Compares comparables. Default comparator for most of java types
|
* Compares comparables. Default comparator for most of java types
|
||||||
*/
|
*/
|
||||||
static final Comparator COMPARABLE_COMPARATOR = new Comparator<Comparable>() {
|
static final Comparator COMPARABLE_COMPARATOR = new Comparator<Comparable>() {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public int compare(Comparable o1, Comparable o2) {
|
public int compare(Comparable o1, Comparable o2) {
|
||||||
return o1 == null && o2 != null ? -1 : (o1 != null && o2 == null ? 1 : o1.compareTo(o2));
|
return o1 == null && o2 != null ? -1 : (o1 != null && o2 == null ? 1 : o1.compareTo(o2));
|
||||||
}
|
}
|
||||||
|
@ -72,6 +74,7 @@ class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
static <E> E max(E e1, E e2, Comparator comp){
|
static <E> E max(E e1, E e2, Comparator comp){
|
||||||
if(e1 == null) return e2;
|
if(e1 == null) return e2;
|
||||||
if(e2 == null) return e1;
|
if(e2 == null) return e1;
|
||||||
|
@ -81,6 +84,7 @@ class Utils {
|
||||||
return comp.compare(e1,e2)<0 ? e2:e1;
|
return comp.compare(e1,e2)<0 ? e2:e1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
static <E> E min(E e1, E e2, Comparator comp){
|
static <E> E min(E e1, E e2, Comparator comp){
|
||||||
if(e1 == null) return e2;
|
if(e1 == null) return e2;
|
||||||
if(e2 == null) return e1;
|
if(e2 == null) return e1;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src/"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -9,8 +9,8 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
|
||||||
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||||
|
@ -98,4 +98,4 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: SWT widget
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.ui.swt
|
Bundle-SymbolicName: com.minres.scviewer.database.ui.swt
|
||||||
Bundle-Version: 1.1.0.qualifier
|
Bundle-Version: 1.1.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: org.eclipse.swt;bundle-version="3.103.1",
|
Require-Bundle: org.eclipse.swt;bundle-version="3.103.1",
|
||||||
com.minres.scviewer.database;bundle-version="1.0.0",
|
com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
com.google.guava;bundle-version="15.0.0",
|
com.google.guava;bundle-version="15.0.0",
|
||||||
|
|
|
@ -88,7 +88,7 @@ import com.minres.scviewer.database.ui.WaveformColors;
|
||||||
|
|
||||||
public class WaveformViewer implements IWaveformViewer {
|
public class WaveformViewer implements IWaveformViewer {
|
||||||
|
|
||||||
private ListenerList selectionChangedListeners = new ListenerList();
|
private ListenerList<ISelectionChangedListener> selectionChangedListeners = new ListenerList<ISelectionChangedListener>();
|
||||||
|
|
||||||
private PropertyChangeSupport pcs;
|
private PropertyChangeSupport pcs;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: Database UI
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.ui
|
Bundle-SymbolicName: com.minres.scviewer.database.ui
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Export-Package: com.minres.scviewer.database.ui
|
Export-Package: com.minres.scviewer.database.ui
|
||||||
Require-Bundle: com.minres.scviewer.database,
|
Require-Bundle: com.minres.scviewer.database,
|
||||||
org.eclipse.jface
|
org.eclipse.jface
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src/"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: VCD signal database
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.vcd
|
Bundle-SymbolicName: com.minres.scviewer.database.vcd
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
org.eclipse.equinox.util;bundle-version="1.0.500",
|
org.eclipse.equinox.util;bundle-version="1.0.500",
|
||||||
org.eclipse.equinox.ds;bundle-version="1.4.200",
|
org.eclipse.equinox.ds;bundle-version="1.4.200",
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: Waveform database
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database
|
Bundle-SymbolicName: com.minres.scviewer.database
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Export-Package: com.minres.scviewer.database
|
Export-Package: com.minres.scviewer.database
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Service-Component: OSGI-INF/component.xml,OSGI-INF/component2.xml
|
Service-Component: OSGI-INF/component.xml,OSGI-INF/component2.xml
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
||||||
Bundle-Version: 1.1.0.qualifier
|
Bundle-Version: 1.1.1.qualifier
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
org.eclipse.core.runtime;bundle-version="3.11.1",
|
org.eclipse.core.runtime;bundle-version="3.11.1",
|
||||||
|
@ -32,6 +32,6 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
com.opcoach.e4.preferences,
|
com.opcoach.e4.preferences,
|
||||||
org.eclipse.e4.core.di.extensions,
|
org.eclipse.e4.core.di.extensions,
|
||||||
org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0"
|
org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0"
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Import-Package: com.minres.scviewer.database,
|
Import-Package: com.minres.scviewer.database,
|
||||||
javax.inject;version="1.0.0"
|
javax.inject;version="1.0.0"
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>1.1.1-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
|
@ -64,7 +64,7 @@ public class E4LifeCycle {
|
||||||
eventBroker.subscribe(UIEvents.UILifeCycle.ACTIVATE, new EventHandler() {
|
eventBroker.subscribe(UIEvents.UILifeCycle.ACTIVATE, new EventHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(Event event) {
|
public void handleEvent(Event event) {
|
||||||
MPart part = (MPart) event.getProperty("ChangedElement");
|
MPart part = (MPart) event.getProperty("ChangedElement"); //$NON-NLS-1$
|
||||||
if(part!=null){
|
if(part!=null){
|
||||||
IEclipseContext ctx = part.getContext();
|
IEclipseContext ctx = part.getContext();
|
||||||
OpenViewHandler openViewHandler= new OpenViewHandler();
|
OpenViewHandler openViewHandler= new OpenViewHandler();
|
||||||
|
@ -115,7 +115,7 @@ public class E4LifeCycle {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
boolean first=true;
|
boolean first=true;
|
||||||
for(String token:tokens){
|
for(String token:tokens){
|
||||||
if(!first) sb.append(",");
|
if(!first) sb.append(","); //$NON-NLS-1$
|
||||||
sb.append(token);
|
sb.append(token);
|
||||||
first=false;
|
first=false;
|
||||||
}
|
}
|
||||||
|
@ -143,14 +143,14 @@ public class E4LifeCycle {
|
||||||
*/
|
*/
|
||||||
public void openViewForFile(String name){
|
public void openViewForFile(String name){
|
||||||
File file = new File(name);
|
File file = new File(name);
|
||||||
MPart part = partService.createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
|
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);
|
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);
|
||||||
IEclipseContext ctx=part.getContext();
|
IEclipseContext ctx=part.getContext();
|
||||||
ctx.modify("input", file);
|
ctx.modify("input", file); //$NON-NLS-1$
|
||||||
ctx.declareModifiable("input");
|
ctx.declareModifiable("input"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.minres.scviewer.e4.application;
|
||||||
|
|
||||||
|
import org.eclipse.osgi.util.NLS;
|
||||||
|
|
||||||
|
public class Messages extends NLS {
|
||||||
|
private static final String BUNDLE_NAME = "com.minres.scviewer.e4.application.messages"; //$NON-NLS-1$
|
||||||
|
public static String AboutDialog_0;
|
||||||
|
public static String AboutDialog_1;
|
||||||
|
public static String DesignBrowser_12;
|
||||||
|
public static String DesignBrowser_16;
|
||||||
|
public static String DesignBrowser_2;
|
||||||
|
public static String DesignBrowser_4;
|
||||||
|
public static String DesignBrowser_8;
|
||||||
|
public static String LoadingWaveformDb_0;
|
||||||
|
public static String LoadStoreSettingsHandler_2;
|
||||||
|
public static String LoadStoreSettingsHandler_3;
|
||||||
|
public static String OpenHandler_0;
|
||||||
|
public static String QuitHandler_0;
|
||||||
|
public static String QuitHandler_1;
|
||||||
|
public static String RelationTypeToolControl_0;
|
||||||
|
public static String RelationTypeToolControl_1;
|
||||||
|
public static String ResourceManager_0;
|
||||||
|
public static String SCViewerPreferencesPage_0;
|
||||||
|
public static String StatusBarControl_1;
|
||||||
|
public static String StatusBarControl_2;
|
||||||
|
public static String StatusBarControl_3;
|
||||||
|
public static String StatusBarControl_4;
|
||||||
|
public static String SWTResourceManager_0;
|
||||||
|
public static String TransactionDetails_0;
|
||||||
|
public static String TransactionDetails_1;
|
||||||
|
public static String TransactionDetails_10;
|
||||||
|
public static String TransactionDetails_11;
|
||||||
|
public static String TransactionDetails_12;
|
||||||
|
public static String TransactionDetails_13;
|
||||||
|
public static String TransactionDetails_16;
|
||||||
|
public static String TransactionDetails_19;
|
||||||
|
public static String TransactionDetails_2;
|
||||||
|
public static String TransactionDetails_20;
|
||||||
|
public static String TransactionDetails_21;
|
||||||
|
public static String TransactionDetails_3;
|
||||||
|
public static String TransactionDetails_4;
|
||||||
|
public static String WaveformPreferencesPage_1;
|
||||||
|
public static String WaveformViewer_15;
|
||||||
|
public static String WaveformViewer_16;
|
||||||
|
public static String WaveformViewer_17;
|
||||||
|
public static String WaveformViewer_18;
|
||||||
|
public static String WaveformViewer_19;
|
||||||
|
public static String WaveformViewer_20;
|
||||||
|
public static String WaveformViewer_21;
|
||||||
|
public static String WaveformViewer_37;
|
||||||
|
public static String WaveformViewer_38;
|
||||||
|
public static String WaveformViewer_39;
|
||||||
|
public static String WaveStatusBarControl_10;
|
||||||
|
public static String WaveStatusBarControl_12;
|
||||||
|
public static String WaveStatusBarControl_5;
|
||||||
|
public static String WaveStatusBarControl_6;
|
||||||
|
public static String WaveStatusBarControl_7;
|
||||||
|
public static String WaveStatusBarControl_8;
|
||||||
|
static {
|
||||||
|
// initialize resource bundle
|
||||||
|
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Messages() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -54,7 +54,7 @@ public class NavigateContribution {
|
||||||
WaveformViewer waveformViewerPart = (WaveformViewer) part.getObject();
|
WaveformViewer waveformViewerPart = (WaveformViewer) part.getObject();
|
||||||
RelationType relationTypeFilter = waveformViewerPart.getRelationTypeFilter();
|
RelationType relationTypeFilter = waveformViewerPart.getRelationTypeFilter();
|
||||||
MCommand command = modelService.findElements(application,
|
MCommand command = modelService.findElements(application,
|
||||||
"com.minres.scviewer.e4.application.command.setrelationtype", MCommand.class, null).get(0);
|
"com.minres.scviewer.e4.application.command.setrelationtype", MCommand.class, null).get(0); //$NON-NLS-1$
|
||||||
MCommandParameter commandParameter = command.getParameters().get(0);
|
MCommandParameter commandParameter = command.getParameters().get(0);
|
||||||
for(RelationType relationType:waveformViewerPart.getAllRelationTypes()){
|
for(RelationType relationType:waveformViewerPart.getAllRelationTypes()){
|
||||||
// MDirectMenuItem dynamicItem = modelService.createModelElement(MDirectMenuItem.class);
|
// MDirectMenuItem dynamicItem = modelService.createModelElement(MDirectMenuItem.class);
|
||||||
|
@ -69,15 +69,15 @@ public class NavigateContribution {
|
||||||
MParameter parameter=modelService.createModelElement(MParameter.class);
|
MParameter parameter=modelService.createModelElement(MParameter.class);
|
||||||
parameter.setName(commandParameter.getElementId());
|
parameter.setName(commandParameter.getElementId());
|
||||||
parameter.setValue(relationType.getName());
|
parameter.setValue(relationType.getName());
|
||||||
parameter.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application");
|
parameter.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application"); //$NON-NLS-1$
|
||||||
MHandledMenuItem handledMenuItem= modelService.createModelElement(MHandledMenuItem.class);
|
MHandledMenuItem handledMenuItem= modelService.createModelElement(MHandledMenuItem.class);
|
||||||
handledMenuItem.setLabel(relationType.getName());
|
handledMenuItem.setLabel(relationType.getName());
|
||||||
if(relationTypeFilter.equals(relationType)){
|
if(relationTypeFilter.equals(relationType)){
|
||||||
handledMenuItem.setEnabled(false);
|
handledMenuItem.setEnabled(false);
|
||||||
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/tick.png");
|
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/tick.png"); //$NON-NLS-1$
|
||||||
}else
|
}else
|
||||||
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/empty.png");
|
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/empty.png"); //$NON-NLS-1$
|
||||||
handledMenuItem.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application");
|
handledMenuItem.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application"); //$NON-NLS-1$
|
||||||
handledMenuItem.setCommand(command);
|
handledMenuItem.setCommand(command);
|
||||||
handledMenuItem.getParameters().add(parameter);
|
handledMenuItem.getParameters().add(parameter);
|
||||||
items.add(handledMenuItem);
|
items.add(handledMenuItem);
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.RelationType;
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
import com.minres.scviewer.e4.application.parts.PartListener;
|
import com.minres.scviewer.e4.application.parts.PartListener;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
|
||||||
WaveformViewer waveformViewerPart;
|
WaveformViewer waveformViewerPart;
|
||||||
|
|
||||||
/** The dummy. */
|
/** The dummy. */
|
||||||
RelationType dummy = RelationType.create("------------");
|
RelationType dummy = RelationType.create(Messages.RelationTypeToolControl_0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new relation type tool control.
|
* Instantiates a new relation type tool control.
|
||||||
|
@ -72,7 +73,7 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
|
||||||
comboViewer = new ComboViewer(parent, SWT.NONE);
|
comboViewer = new ComboViewer(parent, SWT.NONE);
|
||||||
Combo comboBox = comboViewer.getCombo();
|
Combo comboBox = comboViewer.getCombo();
|
||||||
comboBox.setBounds(0, 0, 26, 22);
|
comboBox.setBounds(0, 0, 26, 22);
|
||||||
comboBox.setText("Select");
|
comboBox.setText(Messages.RelationTypeToolControl_1);
|
||||||
comboViewer.setContentProvider(new ArrayContentProvider());
|
comboViewer.setContentProvider(new ArrayContentProvider());
|
||||||
comboViewer.setInput(new RelationType[] {dummy});
|
comboViewer.setInput(new RelationType[] {dummy});
|
||||||
comboViewer.setSelection(new StructuredSelection(dummy));
|
comboViewer.setSelection(new StructuredSelection(dummy));
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class AboutHandler {
|
||||||
|
|
||||||
@Execute
|
@Execute
|
||||||
public void execute(Shell shell, MApplication app, MWindow window, EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) {
|
public void execute(Shell shell, MApplication app, MWindow window, EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) {
|
||||||
MDialog dialog = (MDialog) ms.find("com.minres.scviewer.e4.application.dialog.aboutscviewer", app);
|
MDialog dialog = (MDialog) ms.find("com.minres.scviewer.e4.application.dialog.aboutscviewer", app); //$NON-NLS-1$
|
||||||
dialog.setToBeRendered(true);
|
dialog.setToBeRendered(true);
|
||||||
dialog.setToBeRendered(false);
|
dialog.setToBeRendered(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ import com.minres.scviewer.e4.application.parts.DesignBrowser;
|
||||||
|
|
||||||
public class AddWaveformHandler {
|
public class AddWaveformHandler {
|
||||||
|
|
||||||
public final static String PARAM_WHERE_ID="com.minres.scviewer.e4.application.command.addwaveform.where";
|
public final static String PARAM_WHERE_ID="com.minres.scviewer.e4.application.command.addwaveform.where"; //$NON-NLS-1$
|
||||||
public final static String PARAM_ALL_ID="com.minres.scviewer.e4.application.command.addwaveform.all";
|
public final static String PARAM_ALL_ID="com.minres.scviewer.e4.application.command.addwaveform.all"; //$NON-NLS-1$
|
||||||
|
|
||||||
@Inject @Optional DesignBrowser designBrowser;
|
@Inject @Optional DesignBrowser designBrowser;
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@ public class AddWaveformHandler {
|
||||||
@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection) {
|
@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection) {
|
||||||
if(designBrowser==null) designBrowser = getListPart( partService);
|
if(designBrowser==null) designBrowser = getListPart( partService);
|
||||||
if(designBrowser==null || designBrowser.getActiveWaveformViewerPart()==null) return false;
|
if(designBrowser==null || designBrowser.getActiveWaveformViewerPart()==null) return false;
|
||||||
Boolean before = "before".equalsIgnoreCase(where);
|
Boolean before = "before".equalsIgnoreCase(where); //$NON-NLS-1$
|
||||||
if("true".equalsIgnoreCase(all))
|
if("true".equalsIgnoreCase(all)) //$NON-NLS-1$
|
||||||
return designBrowser.getFilteredChildren().length>0 &&
|
return designBrowser.getFilteredChildren().length>0 &&
|
||||||
(!before || ((IStructuredSelection)designBrowser.getActiveWaveformViewerPart().getSelection()).size()>0);
|
(!before || ((IStructuredSelection)designBrowser.getActiveWaveformViewerPart().getSelection()).size()>0);
|
||||||
else
|
else
|
||||||
|
@ -57,7 +57,7 @@ public class AddWaveformHandler {
|
||||||
if(designBrowser!=null && selection.size()>0){
|
if(designBrowser!=null && selection.size()>0){
|
||||||
List<?> sel=selection.toList();
|
List<?> sel=selection.toList();
|
||||||
designBrowser.getActiveWaveformViewerPart().addStreamsToList(sel.toArray(new IWaveform<?>[]{}),
|
designBrowser.getActiveWaveformViewerPart().addStreamsToList(sel.toArray(new IWaveform<?>[]{}),
|
||||||
"before".equalsIgnoreCase(where));
|
"before".equalsIgnoreCase(where)); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,11 @@ import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.widgets.FileDialog;
|
import org.eclipse.swt.widgets.FileDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
public class LoadStoreSettingsHandler {
|
public class LoadStoreSettingsHandler {
|
||||||
|
|
||||||
static final String PARAMETER_ID="com.minres.scviewer.e4.application.commandparameter.loadStore";
|
static final String PARAMETER_ID="com.minres.scviewer.e4.application.commandparameter.loadStore"; //$NON-NLS-1$
|
||||||
|
|
||||||
@CanExecute
|
@CanExecute
|
||||||
public boolean canExecute(EPartService partService) {
|
public boolean canExecute(EPartService partService) {
|
||||||
|
@ -37,10 +38,10 @@ public class LoadStoreSettingsHandler {
|
||||||
@Execute
|
@Execute
|
||||||
public void execute(@Named(PARAMETER_ID) String param, Shell shell, MApplication app, EModelService modelService,
|
public void execute(@Named(PARAMETER_ID) String param, Shell shell, MApplication app, EModelService modelService,
|
||||||
EPartService partService){
|
EPartService partService){
|
||||||
boolean load = "load".equals(param);
|
boolean load = "load".equals(param); //$NON-NLS-1$
|
||||||
FileDialog dialog = new FileDialog(shell, load?SWT.OPEN:SWT.SAVE);
|
FileDialog dialog = new FileDialog(shell, load?SWT.OPEN:SWT.SAVE);
|
||||||
dialog.setFilterExtensions (new String []{"*.scview"});
|
dialog.setFilterExtensions (new String []{Messages.LoadStoreSettingsHandler_2});
|
||||||
if(!load) dialog.setFileName("SCViewer.scview");
|
if(!load) dialog.setFileName(Messages.LoadStoreSettingsHandler_3);
|
||||||
String res = dialog.open();
|
String res = dialog.open();
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
if(res!=null && part!=null){
|
if(res!=null && part!=null){
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class MoveWaveformHandler {
|
public class MoveWaveformHandler {
|
||||||
|
|
||||||
static final String PARAMETER_ID="com.minres.scviewer.e4.application.command.movewaveformupCommand.parameter.dir";
|
static final String PARAMETER_ID="com.minres.scviewer.e4.application.command.movewaveformupCommand.parameter.dir"; //$NON-NLS-1$
|
||||||
|
|
||||||
@CanExecute
|
@CanExecute
|
||||||
public Boolean canExecute(ESelectionService selectionService){
|
public Boolean canExecute(ESelectionService selectionService){
|
||||||
|
@ -43,9 +43,9 @@ public class MoveWaveformHandler {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewer){
|
if(obj instanceof WaveformViewer){
|
||||||
if("up".equalsIgnoreCase(param))
|
if("up".equalsIgnoreCase(param)) //$NON-NLS-1$
|
||||||
((WaveformViewer)obj).moveSelected(-1);
|
((WaveformViewer)obj).moveSelected(-1);
|
||||||
else if("down".equalsIgnoreCase(param))
|
else if("down".equalsIgnoreCase(param)) //$NON-NLS-1$
|
||||||
((WaveformViewer)obj).moveSelected(1);
|
((WaveformViewer)obj).moveSelected(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class NavigateEvent {
|
public class NavigateEvent {
|
||||||
|
|
||||||
final static String PARAMTER_ID="com.minres.scviewer.e4.application.command.navigateEventCommand.parameter.dir";
|
final static String PARAMTER_ID="com.minres.scviewer.e4.application.command.navigateEventCommand.parameter.dir"; //$NON-NLS-1$
|
||||||
|
|
||||||
@CanExecute
|
@CanExecute
|
||||||
public Boolean canExecute(ESelectionService selectionService){
|
public Boolean canExecute(ESelectionService selectionService){
|
||||||
|
@ -46,9 +46,9 @@ public class NavigateEvent {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewer){
|
if(obj instanceof WaveformViewer){
|
||||||
if("next".equalsIgnoreCase(param))
|
if("next".equalsIgnoreCase(param)) //$NON-NLS-1$
|
||||||
((WaveformViewer)obj).moveCursor(GotoDirection.NEXT);
|
((WaveformViewer)obj).moveCursor(GotoDirection.NEXT);
|
||||||
else if("prev".equalsIgnoreCase(param))
|
else if("prev".equalsIgnoreCase(param)) //$NON-NLS-1$
|
||||||
((WaveformViewer)obj).moveCursor(GotoDirection.PREV);
|
((WaveformViewer)obj).moveCursor(GotoDirection.PREV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class NavigateTrans {
|
public class NavigateTrans {
|
||||||
|
|
||||||
final static String PARAMTER_ID="com.minres.scviewer.e4.application.command.navigateTransCommand.parameter.dir";
|
final static String PARAMTER_ID="com.minres.scviewer.e4.application.command.navigateTransCommand.parameter.dir"; //$NON-NLS-1$
|
||||||
|
|
||||||
@CanExecute
|
@CanExecute
|
||||||
public Boolean canExecute(ESelectionService selectionService){
|
public Boolean canExecute(ESelectionService selectionService){
|
||||||
|
@ -43,9 +43,9 @@ public class NavigateTrans {
|
||||||
MPart part = partService.getActivePart();
|
MPart part = partService.getActivePart();
|
||||||
Object obj = part.getObject();
|
Object obj = part.getObject();
|
||||||
if(obj instanceof WaveformViewer){
|
if(obj instanceof WaveformViewer){
|
||||||
if("next".equalsIgnoreCase(param))
|
if("next".equalsIgnoreCase(param)) //$NON-NLS-1$
|
||||||
((WaveformViewer)obj).moveSelection(GotoDirection.NEXT);
|
((WaveformViewer)obj).moveSelection(GotoDirection.NEXT);
|
||||||
else if("prev".equalsIgnoreCase(param))
|
else if("prev".equalsIgnoreCase(param)) //$NON-NLS-1$
|
||||||
((WaveformViewer)obj).moveSelection(GotoDirection.PREV);
|
((WaveformViewer)obj).moveSelection(GotoDirection.PREV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,15 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.widgets.FileDialog;
|
import org.eclipse.swt.widgets.FileDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
public class OpenHandler {
|
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 []{"vcd", "txdb", "txlog"});
|
||||||
dialog.setFilterExtensions (new String []{"*.vcd;*.txdb;*.txlog"});
|
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()){
|
||||||
|
@ -38,19 +40,19 @@ public class OpenHandler {
|
||||||
// MPart part = MBasicFactory.INSTANCE.createPart();
|
// MPart part = MBasicFactory.INSTANCE.createPart();
|
||||||
// part.setLabel(fileName);
|
// 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");
|
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);
|
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();
|
// Object o = part.getObject();
|
||||||
// if(o instanceof WaveformViewerPart)
|
// if(o instanceof WaveformViewerPart)
|
||||||
// ((WaveformViewerPart)o).setPartInput(file);
|
// ((WaveformViewerPart)o).setPartInput(file);
|
||||||
IEclipseContext ctx=part.getContext();
|
IEclipseContext ctx=part.getContext();
|
||||||
ctx.modify("input", file);
|
ctx.modify("input", file); //$NON-NLS-1$
|
||||||
ctx.declareModifiable("input");
|
ctx.declareModifiable("input"); //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,14 @@ import org.eclipse.e4.ui.workbench.IWorkbench;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
|
|
||||||
public class QuitHandler {
|
public class QuitHandler {
|
||||||
@Execute
|
@Execute
|
||||||
public void execute(IWorkbench workbench, Shell shell){
|
public void execute(IWorkbench workbench, Shell shell){
|
||||||
if (MessageDialog.openConfirm(shell, "Confirmation",
|
if (MessageDialog.openConfirm(shell, Messages.QuitHandler_0,
|
||||||
"Do you want to exit?")) {
|
Messages.QuitHandler_1)) {
|
||||||
workbench.close();
|
workbench.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class SetRelationTypeHandler {
|
public class SetRelationTypeHandler {
|
||||||
final static String PARAMTER_ID="com.minres.scviewer.e4.application.commandparameter.relationName";
|
final static String PARAMTER_ID="com.minres.scviewer.e4.application.commandparameter.relationName"; //$NON-NLS-1$
|
||||||
|
|
||||||
@Execute
|
@Execute
|
||||||
public void execute(@Named(PARAMTER_ID) String relationName, EPartService partService) {
|
public void execute(@Named(PARAMTER_ID) String relationName, EPartService partService) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("restriction")
|
@SuppressWarnings("restriction")
|
||||||
public class ThemeSetHandler {
|
public class ThemeSetHandler {
|
||||||
final static String PARAMTER_ID = "com.minres.scviewer.e4.application.command.theme.parameter.id";
|
final static String PARAMTER_ID = "com.minres.scviewer.e4.application.command.theme.parameter.id"; //$NON-NLS-1$
|
||||||
|
|
||||||
@CanExecute
|
@CanExecute
|
||||||
public boolean canExecute(EPartService partService) {
|
public boolean canExecute(EPartService partService) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
|
||||||
|
|
||||||
public class ZoomHandler {
|
public class ZoomHandler {
|
||||||
|
|
||||||
final static String PARAMTER_ID="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level";
|
final static String PARAMTER_ID="com.minres.scviewer.e4.application.command.zoomcommand.parameter.level"; //$NON-NLS-1$
|
||||||
|
|
||||||
@CanExecute
|
@CanExecute
|
||||||
public boolean canExecute(EPartService partService) {
|
public boolean canExecute(EPartService partService) {
|
||||||
|
@ -36,11 +36,11 @@ public class ZoomHandler {
|
||||||
if(obj instanceof WaveformViewer){
|
if(obj instanceof WaveformViewer){
|
||||||
WaveformViewer waveformViewerPart = (WaveformViewer) obj;
|
WaveformViewer waveformViewerPart = (WaveformViewer) obj;
|
||||||
int zoomLevel = waveformViewerPart.getZoomLevel();
|
int zoomLevel = waveformViewerPart.getZoomLevel();
|
||||||
if("in".equalsIgnoreCase(level))
|
if("in".equalsIgnoreCase(level)) //$NON-NLS-1$
|
||||||
waveformViewerPart.setZoomLevel(zoomLevel-1);
|
waveformViewerPart.setZoomLevel(zoomLevel-1);
|
||||||
else if("out".equalsIgnoreCase(level))
|
else if("out".equalsIgnoreCase(level)) //$NON-NLS-1$
|
||||||
waveformViewerPart.setZoomLevel(zoomLevel+1);
|
waveformViewerPart.setZoomLevel(zoomLevel+1);
|
||||||
else if("fit".equalsIgnoreCase(level))
|
else if("fit".equalsIgnoreCase(level)) //$NON-NLS-1$
|
||||||
waveformViewerPart.setZoomFit();
|
waveformViewerPart.setZoomFit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,15 @@ import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.ProgressBar;
|
import org.eclipse.swt.widgets.ProgressBar;
|
||||||
import org.osgi.service.prefs.PreferencesService;
|
import org.osgi.service.prefs.PreferencesService;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class StatusBarControl.
|
* The Class StatusBarControl.
|
||||||
*/
|
*/
|
||||||
public class StatusBarControl {
|
public class StatusBarControl {
|
||||||
|
|
||||||
/** The Constant STATUS_UPDATE. */
|
/** The Constant STATUS_UPDATE. */
|
||||||
public static final String STATUS_UPDATE="StatusUpdate";
|
public static final String STATUS_UPDATE="StatusUpdate"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The model service. */
|
/** The model service. */
|
||||||
@Inject EModelService modelService;
|
@Inject EModelService modelService;
|
||||||
|
@ -194,7 +196,7 @@ public class StatusBarControl {
|
||||||
progressBar.setMaximum(progressBar.getMaximum() + totalWork);
|
progressBar.setMaximum(progressBar.getMaximum() + totalWork);
|
||||||
}
|
}
|
||||||
runningTasks++;
|
runningTasks++;
|
||||||
progressBar.setToolTipText("Currently running: " + runningTasks + "\nLast task: " + name);
|
progressBar.setToolTipText(Messages.StatusBarControl_1 + runningTasks + Messages.StatusBarControl_2 + name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -266,9 +268,9 @@ public class StatusBarControl {
|
||||||
public void run() {
|
public void run() {
|
||||||
runningTasks--;
|
runningTasks--;
|
||||||
if (runningTasks > 0){ // --- some tasks are still running ---
|
if (runningTasks > 0){ // --- some tasks are still running ---
|
||||||
progressBar.setToolTipText("Currently running: " + runningTasks);
|
progressBar.setToolTipText(Messages.StatusBarControl_3 + runningTasks);
|
||||||
} else { // --- all tasks are done (a reset of selection could also be done) ---
|
} else { // --- all tasks are done (a reset of selection could also be done) ---
|
||||||
progressBar.setToolTipText("No background progress running.");
|
progressBar.setToolTipText(Messages.StatusBarControl_4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,22 +27,24 @@ import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class WaveStatusBarControl.
|
* The Class WaveStatusBarControl.
|
||||||
*/
|
*/
|
||||||
public class WaveStatusBarControl extends StatusBarControl {
|
public class WaveStatusBarControl extends StatusBarControl {
|
||||||
|
|
||||||
/** The Constant ZOOM_LEVEL. */
|
/** The Constant ZOOM_LEVEL. */
|
||||||
public static final String ZOOM_LEVEL="ZoomLevelUpdate";
|
public static final String ZOOM_LEVEL="ZoomLevelUpdate"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant CURSOR_TIME. */
|
/** The Constant CURSOR_TIME. */
|
||||||
public static final String CURSOR_TIME="CursorPosUpdate";
|
public static final String CURSOR_TIME="CursorPosUpdate"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant MARKER_TIME. */
|
/** The Constant MARKER_TIME. */
|
||||||
public static final String MARKER_TIME="MarkerPosUpdate";
|
public static final String MARKER_TIME="MarkerPosUpdate"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant MARKER_DIFF. */
|
/** The Constant MARKER_DIFF. */
|
||||||
public static final String MARKER_DIFF="MarlerDiffUpdate";
|
public static final String MARKER_DIFF="MarlerDiffUpdate"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The model service. */
|
/** The model service. */
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -75,7 +77,7 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
super();
|
super();
|
||||||
this.labelString = labelString;
|
this.labelString = labelString;
|
||||||
this.width=width;
|
this.width=width;
|
||||||
content="";
|
content=""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -124,10 +126,10 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
@Inject
|
@Inject
|
||||||
public WaveStatusBarControl(UISynchronize sync) {
|
public WaveStatusBarControl(UISynchronize sync) {
|
||||||
super(sync);
|
super(sync);
|
||||||
cursorContribution = new TextContributionItem("C:", 80);
|
cursorContribution = new TextContributionItem(Messages.WaveStatusBarControl_5, 80);
|
||||||
markerContribution = new TextContributionItem("M:", 80);
|
markerContribution = new TextContributionItem(Messages.WaveStatusBarControl_6, 80);
|
||||||
markerDiffContribution = new TextContributionItem("C-M:", 80);
|
markerDiffContribution = new TextContributionItem(Messages.WaveStatusBarControl_7, 80);
|
||||||
zoomContribution = new TextContributionItem("Z:", 80);
|
zoomContribution = new TextContributionItem(Messages.WaveStatusBarControl_8, 80);
|
||||||
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,cursorContribution);
|
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,cursorContribution);
|
||||||
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,markerContribution);
|
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,markerContribution);
|
||||||
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,markerDiffContribution);
|
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,markerDiffContribution);
|
||||||
|
@ -144,13 +146,13 @@ public class WaveStatusBarControl extends StatusBarControl {
|
||||||
if(manager!=null && selection!=null){
|
if(manager!=null && selection!=null){
|
||||||
switch(selection.size()){
|
switch(selection.size()){
|
||||||
case 0:
|
case 0:
|
||||||
manager.setMessage("");
|
manager.setMessage(""); //$NON-NLS-1$
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
manager.setMessage(selection.getFirstElement().getClass().getSimpleName()+" selected");
|
manager.setMessage(selection.getFirstElement().getClass().getSimpleName()+Messages.WaveStatusBarControl_10);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
manager.setMessage(""+selection.size()+" Elements");
|
manager.setMessage(""+selection.size()+Messages.WaveStatusBarControl_12); //$NON-NLS-1$
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.2\n
|
||||||
|
AboutDialog_1=\nCopyright (c) 2015,2016,2017 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.apache.jdbm and org.sqlite JDBC driver\n\nSources code is hosted at GitHub: https://github.com/minres/SCViewer\n
|
||||||
|
DesignBrowser_12=Append all after
|
||||||
|
DesignBrowser_16=Insert all before
|
||||||
|
DesignBrowser_2=Enter text to filter waveforms
|
||||||
|
DesignBrowser_4=Append after
|
||||||
|
DesignBrowser_8=Insert before
|
||||||
|
LoadingWaveformDb_0=Database loading...
|
||||||
|
LoadStoreSettingsHandler_2=*.scview
|
||||||
|
LoadStoreSettingsHandler_3=SCViewer.scview
|
||||||
|
OpenHandler_0=*.vcd;*.txdb;*.txlog
|
||||||
|
QuitHandler_0=Confirmation
|
||||||
|
QuitHandler_1=Do you want to exit?
|
||||||
|
RelationTypeToolControl_0=------------
|
||||||
|
RelationTypeToolControl_1=Select
|
||||||
|
ResourceManager_0=Wrong decorate corner
|
||||||
|
SCViewerPreferencesPage_0=Check for changed database
|
||||||
|
StatusBarControl_1=Currently running:
|
||||||
|
StatusBarControl_2=\nLast task:
|
||||||
|
StatusBarControl_3=Currently running:
|
||||||
|
StatusBarControl_4=No background progress running.
|
||||||
|
SWTResourceManager_0=Wrong decorate corner
|
||||||
|
TransactionDetails_0=Enter text to filter
|
||||||
|
TransactionDetails_1=Name
|
||||||
|
TransactionDetails_10=Properties
|
||||||
|
TransactionDetails_11=Attributes
|
||||||
|
TransactionDetails_12=Incoming relations
|
||||||
|
TransactionDetails_13=Outgoing relations
|
||||||
|
TransactionDetails_16=String
|
||||||
|
TransactionDetails_19=Start time
|
||||||
|
TransactionDetails_2=Type
|
||||||
|
TransactionDetails_20=Time
|
||||||
|
TransactionDetails_21=End time
|
||||||
|
TransactionDetails_3=Value
|
||||||
|
TransactionDetails_4=Relation
|
||||||
|
WaveformPreferencesPage_1=Color for
|
||||||
|
WaveformViewer_15=Database Load Job
|
||||||
|
WaveformViewer_16=Loading
|
||||||
|
WaveformViewer_17=Database re-load
|
||||||
|
WaveformViewer_18=Would you like to reload the database?
|
||||||
|
WaveformViewer_19=vcd
|
||||||
|
WaveformViewer_20=txdb
|
||||||
|
WaveformViewer_21=txlog
|
||||||
|
WaveformViewer_37=Database open
|
||||||
|
WaveformViewer_38=Would you like to open the adjacent database
|
||||||
|
WaveformViewer_39=\ as well?
|
||||||
|
WaveStatusBarControl_10=\ selected
|
||||||
|
WaveStatusBarControl_12=\ Elements
|
||||||
|
WaveStatusBarControl_5=C:
|
||||||
|
WaveStatusBarControl_6=M:
|
||||||
|
WaveStatusBarControl_7=C-M:
|
||||||
|
WaveStatusBarControl_8=Z:
|
|
@ -40,24 +40,18 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.wb.swt.ResourceManager;
|
import org.eclipse.wb.swt.ResourceManager;
|
||||||
import org.eclipse.wb.swt.SWTResourceManager;
|
import org.eclipse.wb.swt.SWTResourceManager;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class AboutDialog.
|
* The Class AboutDialog.
|
||||||
*/
|
*/
|
||||||
public class AboutDialog extends Dialog {
|
public class AboutDialog extends Dialog {
|
||||||
|
|
||||||
/** The product title. */
|
/** The product title. */
|
||||||
private String productTitle=
|
private String productTitle=Messages.AboutDialog_0;
|
||||||
"\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.0\n";
|
|
||||||
|
|
||||||
/** The copyright text. */
|
/** The copyright text. */
|
||||||
private String copyrightText="\nCopyright (c) 2015 MINRES Technologies GmbH and others.\n"+
|
private String copyrightText=Messages.AboutDialog_1;
|
||||||
"\n"+
|
|
||||||
"All 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\n"+
|
|
||||||
"Parts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. "+
|
|
||||||
"These are namely org.apache.jdbm and org.sqlite JDBC driver\n"+
|
|
||||||
"\n\nSources code is hosted at GitHub: https://github.com/minres/SCViewer\n";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the dialog.
|
* Create the dialog.
|
||||||
|
@ -86,8 +80,8 @@ public class AboutDialog extends Dialog {
|
||||||
composite.setLayout(new GridLayout(2, false));
|
composite.setLayout(new GridLayout(2, false));
|
||||||
|
|
||||||
final Color white=SWTResourceManager.getColor(SWT.COLOR_WHITE);
|
final Color white=SWTResourceManager.getColor(SWT.COLOR_WHITE);
|
||||||
final Image scviewerLogo=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/SCViewer_logo.png");
|
final Image scviewerLogo=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/SCViewer_logo.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
final Image minresLogo=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/Minres_logo.png");
|
final Image minresLogo=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/Minres_logo.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
Canvas canvas = new Canvas(composite,SWT.NO_REDRAW_RESIZE);
|
Canvas canvas = new Canvas(composite,SWT.NO_REDRAW_RESIZE);
|
||||||
GridData gd_canvas = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
|
GridData gd_canvas = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
|
||||||
|
@ -117,7 +111,7 @@ public class AboutDialog extends Dialog {
|
||||||
styleRange.fontStyle = SWT.BOLD;
|
styleRange.fontStyle = SWT.BOLD;
|
||||||
styledText.setStyleRange(styleRange);
|
styledText.setStyleRange(styleRange);
|
||||||
///^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
|
///^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
|
||||||
Pattern pattern = Pattern.compile("https?:\\/\\/([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w\\.-]*)*\\/?");
|
Pattern pattern = Pattern.compile("https?:\\/\\/([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w\\.-]*)*\\/?"); //$NON-NLS-1$
|
||||||
// in case you would like to ignore case sensitivity,
|
// in case you would like to ignore case sensitivity,
|
||||||
// you could use this statement:
|
// you could use this statement:
|
||||||
// Pattern pattern = Pattern.compile("\\s+", Pattern.CASE_INSENSITIVE);
|
// Pattern pattern = Pattern.compile("\\s+", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
|
@ -68,6 +68,7 @@ import com.minres.scviewer.database.IHierNode;
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.database.IWaveformDb;
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
import com.minres.scviewer.e4.application.handlers.AddWaveformHandler;
|
import com.minres.scviewer.e4.application.handlers.AddWaveformHandler;
|
||||||
import com.minres.scviewer.e4.application.provider.TxDbContentProvider;
|
import com.minres.scviewer.e4.application.provider.TxDbContentProvider;
|
||||||
import com.minres.scviewer.e4.application.provider.TxDbLabelProvider;
|
import com.minres.scviewer.e4.application.provider.TxDbLabelProvider;
|
||||||
|
@ -79,7 +80,7 @@ import com.minres.scviewer.e4.application.provider.TxDbLabelProvider;
|
||||||
public class DesignBrowser {
|
public class DesignBrowser {
|
||||||
|
|
||||||
/** The Constant POPUP_ID. */
|
/** The Constant POPUP_ID. */
|
||||||
private static final String POPUP_ID="com.minres.scviewer.e4.application.parts.DesignBrowser.popupmenu";
|
private static final String POPUP_ID="com.minres.scviewer.e4.application.parts.DesignBrowser.popupmenu"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The event broker. */
|
/** The event broker. */
|
||||||
@Inject IEventBroker eventBroker;
|
@Inject IEventBroker eventBroker;
|
||||||
|
@ -124,7 +125,7 @@ public class DesignBrowser {
|
||||||
private PropertyChangeListener treeViewerPCL = new PropertyChangeListener() {
|
private PropertyChangeListener treeViewerPCL = new PropertyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
if("CHILDS".equals(evt.getPropertyName())){
|
if("CHILDS".equals(evt.getPropertyName())){ //$NON-NLS-1$
|
||||||
treeViewer.getTree().getDisplay().asyncExec(new Runnable() {
|
treeViewer.getTree().getDisplay().asyncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -215,7 +216,7 @@ public class DesignBrowser {
|
||||||
parent.setLayout(new GridLayout(1, false));
|
parent.setLayout(new GridLayout(1, false));
|
||||||
|
|
||||||
nameFilter = new Text(parent, SWT.BORDER);
|
nameFilter = new Text(parent, SWT.BORDER);
|
||||||
nameFilter.setMessage("Enter text to filter waveforms");
|
nameFilter.setMessage(Messages.DesignBrowser_2);
|
||||||
nameFilter.addModifyListener(new ModifyListener() {
|
nameFilter.addModifyListener(new ModifyListener() {
|
||||||
@Override
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
|
@ -237,7 +238,7 @@ public class DesignBrowser {
|
||||||
@Override
|
@Override
|
||||||
public void doubleClick(DoubleClickEvent event) {
|
public void doubleClick(DoubleClickEvent event) {
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
AddWaveformHandler myHandler = new AddWaveformHandler();
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "after", false);
|
Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$
|
||||||
if(result!=null && (Boolean)result)
|
if(result!=null && (Boolean)result)
|
||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
||||||
}
|
}
|
||||||
|
@ -258,14 +259,14 @@ public class DesignBrowser {
|
||||||
toolBar.setBounds(0, 0, 87, 20);
|
toolBar.setBounds(0, 0, 87, 20);
|
||||||
|
|
||||||
appendItem = new ToolItem(toolBar, SWT.NONE);
|
appendItem = new ToolItem(toolBar, SWT.NONE);
|
||||||
appendItem.setToolTipText("Append after");
|
appendItem.setToolTipText(Messages.DesignBrowser_4);
|
||||||
appendItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_wave.png"));
|
appendItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_wave.png")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
appendItem.setEnabled(false);
|
appendItem.setEnabled(false);
|
||||||
appendItem.addSelectionListener(new SelectionAdapter() {
|
appendItem.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
AddWaveformHandler myHandler = new AddWaveformHandler();
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "after", false);
|
Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$
|
||||||
if(result!=null && (Boolean)result)
|
if(result!=null && (Boolean)result)
|
||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
||||||
}
|
}
|
||||||
|
@ -273,14 +274,14 @@ public class DesignBrowser {
|
||||||
});
|
});
|
||||||
|
|
||||||
insertItem = new ToolItem(toolBar, SWT.NONE);
|
insertItem = new ToolItem(toolBar, SWT.NONE);
|
||||||
insertItem.setToolTipText("Insert before");
|
insertItem.setToolTipText(Messages.DesignBrowser_8);
|
||||||
insertItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_wave.png"));
|
insertItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_wave.png")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
insertItem.setEnabled(false);
|
insertItem.setEnabled(false);
|
||||||
insertItem.addSelectionListener(new SelectionAdapter() {
|
insertItem.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
AddWaveformHandler myHandler = new AddWaveformHandler();
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "before", false);
|
Object result = runCommand(myHandler, CanExecute.class, "before", false); //$NON-NLS-1$
|
||||||
if(result!=null && (Boolean)result)
|
if(result!=null && (Boolean)result)
|
||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
||||||
}
|
}
|
||||||
|
@ -288,8 +289,8 @@ public class DesignBrowser {
|
||||||
new ToolItem(toolBar, SWT.SEPARATOR);
|
new ToolItem(toolBar, SWT.SEPARATOR);
|
||||||
|
|
||||||
appendAllItem = new ToolItem(toolBar, SWT.NONE);
|
appendAllItem = new ToolItem(toolBar, SWT.NONE);
|
||||||
appendAllItem.setToolTipText("Append all after");
|
appendAllItem.setToolTipText(Messages.DesignBrowser_12);
|
||||||
appendAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_all_waves.png"));
|
appendAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_all_waves.png")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
appendAllItem.setEnabled(false);
|
appendAllItem.setEnabled(false);
|
||||||
|
|
||||||
new ToolItem(toolBar, SWT.SEPARATOR);
|
new ToolItem(toolBar, SWT.SEPARATOR);
|
||||||
|
@ -301,7 +302,7 @@ public class DesignBrowser {
|
||||||
Object oldSel=selectionService.getSelection();
|
Object oldSel=selectionService.getSelection();
|
||||||
selectionService.setSelection(new StructuredSelection(all));
|
selectionService.setSelection(new StructuredSelection(all));
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
AddWaveformHandler myHandler = new AddWaveformHandler();
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "after", false);
|
Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$
|
||||||
if(result!=null && (Boolean)result)
|
if(result!=null && (Boolean)result)
|
||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
||||||
selectionService.setSelection(oldSel);
|
selectionService.setSelection(oldSel);
|
||||||
|
@ -309,8 +310,8 @@ public class DesignBrowser {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
insertAllItem = new ToolItem(toolBar, SWT.NONE);
|
insertAllItem = new ToolItem(toolBar, SWT.NONE);
|
||||||
insertAllItem.setToolTipText("Insert all before");
|
insertAllItem.setToolTipText(Messages.DesignBrowser_16);
|
||||||
insertAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_all_waves.png"));
|
insertAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_all_waves.png")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
insertAllItem.setEnabled(false);
|
insertAllItem.setEnabled(false);
|
||||||
insertAllItem.addSelectionListener(new SelectionAdapter() {
|
insertAllItem.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -320,7 +321,7 @@ public class DesignBrowser {
|
||||||
Object oldSel=selectionService.getSelection();
|
Object oldSel=selectionService.getSelection();
|
||||||
selectionService.setSelection(new StructuredSelection(all));
|
selectionService.setSelection(new StructuredSelection(all));
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
AddWaveformHandler myHandler = new AddWaveformHandler();
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "before", false);
|
Object result = runCommand(myHandler, CanExecute.class, "before", false); //$NON-NLS-1$
|
||||||
if(result!=null && (Boolean)result)
|
if(result!=null && (Boolean)result)
|
||||||
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
|
||||||
selectionService.setSelection(oldSel);
|
selectionService.setSelection(oldSel);
|
||||||
|
@ -400,13 +401,13 @@ public class DesignBrowser {
|
||||||
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed() &&
|
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed() &&
|
||||||
!appendAllItem.isDisposed() && !insertAllItem.isDisposed()){
|
!appendAllItem.isDisposed() && !insertAllItem.isDisposed()){
|
||||||
AddWaveformHandler myHandler = new AddWaveformHandler();
|
AddWaveformHandler myHandler = new AddWaveformHandler();
|
||||||
Object result = runCommand(myHandler, CanExecute.class, "after", false);
|
Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$
|
||||||
appendItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
appendItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
||||||
result = runCommand(myHandler, CanExecute.class, "after", true);
|
result = runCommand(myHandler, CanExecute.class, "after", true); //$NON-NLS-1$
|
||||||
appendAllItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
appendAllItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
||||||
result = runCommand(myHandler, CanExecute.class, "before", false);
|
result = runCommand(myHandler, CanExecute.class, "before", false); //$NON-NLS-1$
|
||||||
insertItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
insertItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
||||||
result = runCommand(myHandler, CanExecute.class, "before", true);
|
result = runCommand(myHandler, CanExecute.class, "before", true); //$NON-NLS-1$
|
||||||
insertAllItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
insertAllItem.setEnabled(result instanceof Boolean && (Boolean)result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,7 +426,7 @@ public class DesignBrowser {
|
||||||
* @param s the new search text
|
* @param s the new search text
|
||||||
*/
|
*/
|
||||||
public void setSearchText(String s) {
|
public void setSearchText(String s) {
|
||||||
this.searchString = ".*" + s + ".*";
|
this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -10,10 +10,11 @@ import com.minres.scviewer.database.IWaveform;
|
||||||
import com.minres.scviewer.database.IWaveformDb;
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
import com.minres.scviewer.database.IWaveformEvent;
|
import com.minres.scviewer.database.IWaveformEvent;
|
||||||
import com.minres.scviewer.database.RelationType;
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
public class LoadingWaveformDb implements IWaveformDb {
|
public class LoadingWaveformDb implements IWaveformDb {
|
||||||
|
|
||||||
private final String label = "Database loading...";
|
private final String label = Messages.LoadingWaveformDb_0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPropertyChangeListener(PropertyChangeListener l) {
|
public void addPropertyChangeListener(PropertyChangeListener l) {
|
||||||
|
|
|
@ -55,6 +55,8 @@ import org.eclipse.swt.widgets.Tree;
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.ITxAttribute;
|
import com.minres.scviewer.database.ITxAttribute;
|
||||||
import com.minres.scviewer.database.ITxRelation;
|
import com.minres.scviewer.database.ITxRelation;
|
||||||
|
import com.minres.scviewer.database.DataType;
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
import com.minres.scviewer.e4.application.provider.TxPropertiesLabelProvider;
|
import com.minres.scviewer.e4.application.provider.TxPropertiesLabelProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -107,7 +109,7 @@ public class TransactionDetails {
|
||||||
parent.setLayout(new GridLayout(1, false));
|
parent.setLayout(new GridLayout(1, false));
|
||||||
|
|
||||||
nameFilter = new Text(parent, SWT.BORDER);
|
nameFilter = new Text(parent, SWT.BORDER);
|
||||||
nameFilter.setMessage("Enter text to filter");
|
nameFilter.setMessage(Messages.TransactionDetails_0);
|
||||||
nameFilter.addModifyListener(new ModifyListener() {
|
nameFilter.addModifyListener(new ModifyListener() {
|
||||||
@Override
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
|
@ -133,7 +135,7 @@ public class TransactionDetails {
|
||||||
tree.setLayoutData(new GridData(GridData.FILL_BOTH));
|
tree.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
// Add the name column
|
// Add the name column
|
||||||
col1 = new TreeViewerColumn(treeViewer, SWT.NONE);
|
col1 = new TreeViewerColumn(treeViewer, SWT.NONE);
|
||||||
col1.getColumn().setText("Name");
|
col1.getColumn().setText(Messages.TransactionDetails_1);
|
||||||
col1.getColumn().setResizable(true);
|
col1.getColumn().setResizable(true);
|
||||||
col1.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.NAME)));
|
col1.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.NAME)));
|
||||||
col1.getColumn().addSelectionListener(new SelectionAdapter() {
|
col1.getColumn().addSelectionListener(new SelectionAdapter() {
|
||||||
|
@ -144,7 +146,7 @@ public class TransactionDetails {
|
||||||
});
|
});
|
||||||
// Add the type column
|
// Add the type column
|
||||||
col2 = new TreeViewerColumn(treeViewer, SWT.NONE);
|
col2 = new TreeViewerColumn(treeViewer, SWT.NONE);
|
||||||
col2.getColumn().setText("Type");
|
col2.getColumn().setText(Messages.TransactionDetails_2);
|
||||||
col2.getColumn().setResizable(true);
|
col2.getColumn().setResizable(true);
|
||||||
col2.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.TYPE)));
|
col2.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.TYPE)));
|
||||||
col2.getColumn().addSelectionListener(new SelectionAdapter() {
|
col2.getColumn().addSelectionListener(new SelectionAdapter() {
|
||||||
|
@ -155,7 +157,7 @@ public class TransactionDetails {
|
||||||
});
|
});
|
||||||
// Add the value column
|
// Add the value column
|
||||||
col3 = new TreeViewerColumn(treeViewer, SWT.NONE);
|
col3 = new TreeViewerColumn(treeViewer, SWT.NONE);
|
||||||
col3.getColumn().setText("Value");
|
col3.getColumn().setText(Messages.TransactionDetails_3);
|
||||||
col3.getColumn().setResizable(true);
|
col3.getColumn().setResizable(true);
|
||||||
col3.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.VALUE)));
|
col3.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.VALUE)));
|
||||||
col3.getColumn().addSelectionListener(new SelectionAdapter() {
|
col3.getColumn().addSelectionListener(new SelectionAdapter() {
|
||||||
|
@ -282,8 +284,8 @@ public class TransactionDetails {
|
||||||
*/
|
*/
|
||||||
String txToString(ITx tx){
|
String txToString(ITx tx){
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("tx#").append(tx.getId()).append("[").append(timeToString(tx.getBeginTime())).
|
sb.append("tx#").append(tx.getId()).append("[").append(timeToString(tx.getBeginTime())). //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
append(" - ").append(timeToString(tx.getEndTime())).append("]");
|
append(" - ").append(timeToString(tx.getEndTime())).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +332,6 @@ public class TransactionDetails {
|
||||||
* @param e2 the e2
|
* @param e2 the e2
|
||||||
* @return the int
|
* @return the int
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public int compare(Viewer viewer, Object e1, Object e2) {
|
public int compare(Viewer viewer, Object e1, Object e2) {
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
if(e1 instanceof ITxAttribute && e2 instanceof ITxAttribute){
|
if(e1 instanceof ITxAttribute && e2 instanceof ITxAttribute){
|
||||||
|
@ -369,7 +370,7 @@ public class TransactionDetails {
|
||||||
* @param s the new search text
|
* @param s the new search text
|
||||||
*/
|
*/
|
||||||
public void setSearchText(String s) {
|
public void setSearchText(String s) {
|
||||||
this.searchString = ".*" + s + ".*";
|
this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -427,12 +428,12 @@ PROPS, /** The attrs. */
|
||||||
*/
|
*/
|
||||||
public String toString(){
|
public String toString(){
|
||||||
switch(type){
|
switch(type){
|
||||||
case PROPS: return "Properties";
|
case PROPS: return Messages.TransactionDetails_10;
|
||||||
case ATTRS: return "Attributes";
|
case ATTRS: return Messages.TransactionDetails_11;
|
||||||
case IN_REL: return "Incoming relations";
|
case IN_REL: return Messages.TransactionDetails_12;
|
||||||
case OUT_REL: return "Outgoing relations";
|
case OUT_REL: return Messages.TransactionDetails_13;
|
||||||
}
|
}
|
||||||
return "";
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,10 +477,10 @@ PROPS, /** The attrs. */
|
||||||
TreeNode propertyHolder=(TreeNode) element;
|
TreeNode propertyHolder=(TreeNode) element;
|
||||||
if(propertyHolder.type == Type.PROPS){
|
if(propertyHolder.type == Type.PROPS){
|
||||||
return new Object[][]{
|
return new Object[][]{
|
||||||
{"Name", "String", propertyHolder.element.getStream().getFullName()},
|
{Messages.TransactionDetails_1, Messages.TransactionDetails_16, propertyHolder.element.getStream().getFullName()},
|
||||||
{"Type", "String", propertyHolder.element.getGenerator().getName()},
|
{Messages.TransactionDetails_2, Messages.TransactionDetails_16, propertyHolder.element.getGenerator().getName()},
|
||||||
{"Start time", "Time", timeToString(propertyHolder.element.getBeginTime())},
|
{Messages.TransactionDetails_19, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getBeginTime())},
|
||||||
{"End time", "Time", timeToString(propertyHolder.element.getEndTime())}
|
{Messages.TransactionDetails_21, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getEndTime())}
|
||||||
};
|
};
|
||||||
}else if(propertyHolder.type == Type.ATTRS)
|
}else if(propertyHolder.type == Type.ATTRS)
|
||||||
return propertyHolder.element.getAttributes().toArray();
|
return propertyHolder.element.getAttributes().toArray();
|
||||||
|
@ -561,7 +562,7 @@ PROPS, /** The attrs. */
|
||||||
ITxAttribute attribute = (ITxAttribute) element;
|
ITxAttribute attribute = (ITxAttribute) element;
|
||||||
return new StyledString(attribute.getName());
|
return new StyledString(attribute.getName());
|
||||||
}else if (element instanceof ITxRelation) {
|
}else if (element instanceof ITxRelation) {
|
||||||
return new StyledString("Relation");
|
return new StyledString(Messages.TransactionDetails_4);
|
||||||
}else if(element instanceof Object[]){
|
}else if(element instanceof Object[]){
|
||||||
Object[] elements = (Object[]) element;
|
Object[] elements = (Object[]) element;
|
||||||
return new StyledString(elements[field].toString());
|
return new StyledString(elements[field].toString());
|
||||||
|
@ -575,18 +576,24 @@ PROPS, /** The attrs. */
|
||||||
Object[] elements = (Object[]) element;
|
Object[] elements = (Object[]) element;
|
||||||
return new StyledString(elements[field].toString());
|
return new StyledString(elements[field].toString());
|
||||||
}else
|
}else
|
||||||
return new StyledString("");
|
return new StyledString(""); //$NON-NLS-1$
|
||||||
default:
|
default:
|
||||||
if (element instanceof ITxAttribute) {
|
if (element instanceof ITxAttribute) {
|
||||||
ITxAttribute attribute = (ITxAttribute) element;
|
ITxAttribute attribute = (ITxAttribute) element;
|
||||||
return new StyledString(attribute.getValue().toString());
|
String value = attribute.getValue().toString();
|
||||||
|
if((DataType.UNSIGNED == attribute.getDataType() || DataType.INTEGER==attribute.getDataType()) && !"0".equals(value)) {
|
||||||
|
try {
|
||||||
|
value = attribute.getValue().toString() + " [0x"+Long.toHexString(Long.parseLong(attribute.getValue().toString()))+"]";
|
||||||
|
} catch(NumberFormatException e) { }
|
||||||
|
}
|
||||||
|
return new StyledString(value);
|
||||||
}else if(element instanceof Object[]){
|
}else if(element instanceof Object[]){
|
||||||
Object[] elements = (Object[]) element;
|
Object[] elements = (Object[]) element;
|
||||||
return new StyledString(elements[field].toString());
|
return new StyledString(elements[field].toString());
|
||||||
} else if(element instanceof ITx){
|
} else if(element instanceof ITx){
|
||||||
return new StyledString(txToString((ITx) element));
|
return new StyledString(txToString((ITx) element));
|
||||||
}else
|
}else
|
||||||
return new StyledString("");
|
return new StyledString(""); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,7 @@ import com.minres.scviewer.database.ui.ICursor;
|
||||||
import com.minres.scviewer.database.ui.IWaveformViewer;
|
import com.minres.scviewer.database.ui.IWaveformViewer;
|
||||||
import com.minres.scviewer.database.ui.TrackEntry;
|
import com.minres.scviewer.database.ui.TrackEntry;
|
||||||
import com.minres.scviewer.database.ui.WaveformColors;
|
import com.minres.scviewer.database.ui.WaveformColors;
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
import com.minres.scviewer.e4.application.internal.status.WaveStatusBarControl;
|
import com.minres.scviewer.e4.application.internal.status.WaveStatusBarControl;
|
||||||
import com.minres.scviewer.e4.application.internal.util.FileMonitor;
|
import com.minres.scviewer.e4.application.internal.util.FileMonitor;
|
||||||
import com.minres.scviewer.e4.application.internal.util.IFileChangeListener;
|
import com.minres.scviewer.e4.application.internal.util.IFileChangeListener;
|
||||||
|
@ -86,25 +87,25 @@ import com.minres.scviewer.e4.application.preferences.PreferenceConstants;
|
||||||
public class WaveformViewer implements IFileChangeListener, IPreferenceChangeListener {
|
public class WaveformViewer implements IFileChangeListener, IPreferenceChangeListener {
|
||||||
|
|
||||||
/** The Constant ACTIVE_WAVEFORMVIEW. */
|
/** The Constant ACTIVE_WAVEFORMVIEW. */
|
||||||
public static final String ACTIVE_WAVEFORMVIEW = "Active_Waveform_View";
|
public static final String ACTIVE_WAVEFORMVIEW = "Active_Waveform_View"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant ADD_WAVEFORM. */
|
/** The Constant ADD_WAVEFORM. */
|
||||||
public static final String ADD_WAVEFORM = "AddWaveform";
|
public static final String ADD_WAVEFORM = "AddWaveform"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant DATABASE_FILE. */
|
/** The Constant DATABASE_FILE. */
|
||||||
protected static final String DATABASE_FILE = "DATABASE_FILE";
|
protected static final String DATABASE_FILE = "DATABASE_FILE"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SHOWN_WAVEFORM. */
|
/** The Constant SHOWN_WAVEFORM. */
|
||||||
protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM";
|
protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SHOWN_CURSOR. */
|
/** The Constant SHOWN_CURSOR. */
|
||||||
protected static final String SHOWN_CURSOR = "SHOWN_CURSOR";
|
protected static final String SHOWN_CURSOR = "SHOWN_CURSOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant ZOOM_LEVEL. */
|
/** The Constant ZOOM_LEVEL. */
|
||||||
protected static final String ZOOM_LEVEL = "ZOOM_LEVEL";
|
protected static final String ZOOM_LEVEL = "ZOOM_LEVEL"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant BASE_LINE_TIME. */
|
/** The Constant BASE_LINE_TIME. */
|
||||||
protected static final String BASE_LINE_TIME = "BASE_LINE_TIME";
|
protected static final String BASE_LINE_TIME = "BASE_LINE_TIME"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant FILE_CHECK_INTERVAL. */
|
/** The Constant FILE_CHECK_INTERVAL. */
|
||||||
protected static final long FILE_CHECK_INTERVAL = 60000;
|
protected static final long FILE_CHECK_INTERVAL = 60000;
|
||||||
|
@ -116,7 +117,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
public static final String ID = "com.minres.scviewer.ui.TxEditorPart"; //$NON-NLS-1$
|
public static final String ID = "com.minres.scviewer.ui.TxEditorPart"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant WAVE_ACTION_ID. */
|
/** The Constant WAVE_ACTION_ID. */
|
||||||
public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave";
|
public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The factory. */
|
/** The factory. */
|
||||||
WaveformViewerFactory factory = new WaveformViewerFactory();
|
WaveformViewerFactory factory = new WaveformViewerFactory();
|
||||||
|
@ -193,7 +194,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
database.addPropertyChangeListener(new PropertyChangeListener() {
|
database.addPropertyChangeListener(new PropertyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
if ("WAVEFORMS".equals(evt.getPropertyName())) {
|
if ("WAVEFORMS".equals(evt.getPropertyName())) { //$NON-NLS-1$
|
||||||
myParent.getDisplay().syncExec(new Runnable() {
|
myParent.getDisplay().syncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -236,8 +237,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
checkForUpdates = prefs.getBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
checkForUpdates = prefs.getBoolean(PreferenceConstants.DATABASE_RELOAD, true);
|
||||||
filesToLoad = new ArrayList<File>();
|
filesToLoad = new ArrayList<File>();
|
||||||
persistedState = part.getPersistedState();
|
persistedState = part.getPersistedState();
|
||||||
Integer files = persistedState.containsKey(DATABASE_FILE + "S")
|
Integer files = persistedState.containsKey(DATABASE_FILE + "S") //$NON-NLS-1$
|
||||||
? Integer.parseInt(persistedState.get(DATABASE_FILE + "S")) : 0;
|
? Integer.parseInt(persistedState.get(DATABASE_FILE + "S")) : 0; //$NON-NLS-1$
|
||||||
for (int i = 0; i < files; i++) {
|
for (int i = 0; i < files; i++) {
|
||||||
filesToLoad.add(new File(persistedState.get(DATABASE_FILE + i)));
|
filesToLoad.add(new File(persistedState.get(DATABASE_FILE + i)));
|
||||||
}
|
}
|
||||||
|
@ -245,11 +246,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
loadDatabase(persistedState);
|
loadDatabase(persistedState);
|
||||||
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[waveformPane.getZoomLevel()]);
|
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[waveformPane.getZoomLevel()]);
|
||||||
menuService.registerContextMenu(waveformPane.getNameControl(),
|
menuService.registerContextMenu(waveformPane.getNameControl(),
|
||||||
"com.minres.scviewer.e4.application.popupmenu.namecontext");
|
"com.minres.scviewer.e4.application.popupmenu.namecontext"); //$NON-NLS-1$
|
||||||
menuService.registerContextMenu(waveformPane.getValueControl(),
|
menuService.registerContextMenu(waveformPane.getValueControl(),
|
||||||
"com.minres.scviewer.e4.application.popupmenu.namecontext");
|
"com.minres.scviewer.e4.application.popupmenu.namecontext"); //$NON-NLS-1$
|
||||||
menuService.registerContextMenu(waveformPane.getWaveformControl(),
|
menuService.registerContextMenu(waveformPane.getWaveformControl(),
|
||||||
"com.minres.scviewer.e4.application.popupmenu.wavecontext");
|
"com.minres.scviewer.e4.application.popupmenu.wavecontext"); //$NON-NLS-1$
|
||||||
ePartService.addPartListener(new PartListener() {
|
ePartService.addPartListener(new PartListener() {
|
||||||
@Override
|
@Override
|
||||||
public void partActivated(MPart part) {
|
public void partActivated(MPart part) {
|
||||||
|
@ -288,7 +289,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
DefaultValuesInitializer initializer = new DefaultValuesInitializer();
|
DefaultValuesInitializer initializer = new DefaultValuesInitializer();
|
||||||
HashMap<WaveformColors, RGB> colorPref = new HashMap<>();
|
HashMap<WaveformColors, RGB> colorPref = new HashMap<>();
|
||||||
for (WaveformColors c : WaveformColors.values()) {
|
for (WaveformColors c : WaveformColors.values()) {
|
||||||
String prefValue = prefs.get(c.name() + "_COLOR",
|
String prefValue = prefs.get(c.name() + "_COLOR", //$NON-NLS-1$
|
||||||
StringConverter.asString(initializer.colors[c.ordinal()].getRGB()));
|
StringConverter.asString(initializer.colors[c.ordinal()].getRGB()));
|
||||||
RGB rgb = StringConverter.asRGB(prefValue);
|
RGB rgb = StringConverter.asRGB(prefValue);
|
||||||
colorPref.put(c, rgb);
|
colorPref.put(c, rgb);
|
||||||
|
@ -303,7 +304,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
*/
|
*/
|
||||||
protected void loadDatabase(final Map<String, String> state) {
|
protected void loadDatabase(final Map<String, String> state) {
|
||||||
fileMonitor.removeFileChangeListener(this);
|
fileMonitor.removeFileChangeListener(this);
|
||||||
Job job = new Job("Database Load Job") {
|
Job job = new Job(Messages.WaveformViewer_15) {
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
// convert to SubMonitor and set total number of work units
|
// convert to SubMonitor and set total number of work units
|
||||||
|
@ -311,7 +312,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
try {
|
try {
|
||||||
subMonitor.worked(1);
|
subMonitor.worked(1);
|
||||||
for (File file : filesToLoad) {
|
for (File file : filesToLoad) {
|
||||||
subMonitor.setTaskName("Loading "+file.getName());
|
subMonitor.setTaskName(Messages.WaveformViewer_16+file.getName());
|
||||||
database.load(file);
|
database.load(file);
|
||||||
database.addPropertyChangeListener(waveformPane);
|
database.addPropertyChangeListener(waveformPane);
|
||||||
subMonitor.worked(1);
|
subMonitor.worked(1);
|
||||||
|
@ -358,8 +359,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
display.asyncExec(new Runnable() {
|
display.asyncExec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (MessageDialog.openQuestion(display.getActiveShell(), "Database re-load",
|
if (MessageDialog.openQuestion(display.getActiveShell(), Messages.WaveformViewer_17,
|
||||||
"Would you like to reload the database?")) {
|
Messages.WaveformViewer_18)) {
|
||||||
Map<String, String> state = new HashMap<>();
|
Map<String, String> state = new HashMap<>();
|
||||||
saveWaveformViewerState(state);
|
saveWaveformViewerState(state);
|
||||||
waveformPane.getStreamList().clear();
|
waveformPane.getStreamList().clear();
|
||||||
|
@ -387,15 +388,15 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
filesToLoad.add(file);
|
filesToLoad.add(file);
|
||||||
try {
|
try {
|
||||||
String ext = getFileExtension(file.getName());
|
String ext = getFileExtension(file.getName());
|
||||||
if ("vcd".equals(ext.toLowerCase())) {
|
if (Messages.WaveformViewer_19.equals(ext.toLowerCase())) {
|
||||||
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), "txdb")))) {
|
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_20)))) {
|
||||||
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), "txdb")));
|
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_20)));
|
||||||
} else if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), "txlog")))) {
|
} else if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_21)))) {
|
||||||
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), "txlog")));
|
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_21)));
|
||||||
}
|
}
|
||||||
} else if ("txdb".equals(ext.toLowerCase()) || "txlog".equals(ext.toLowerCase())) {
|
} else if (Messages.WaveformViewer_20.equals(ext.toLowerCase()) || Messages.WaveformViewer_21.equals(ext.toLowerCase())) {
|
||||||
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), "vcd")))) {
|
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_19)))) {
|
||||||
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), "vcd")));
|
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_19)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) { // silently ignore any error
|
} catch (IOException e) { // silently ignore any error
|
||||||
|
@ -423,7 +424,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
public void saveState(MPart part) {
|
public void saveState(MPart part) {
|
||||||
// save changes
|
// save changes
|
||||||
Map<String, String> persistedState = part.getPersistedState();
|
Map<String, String> persistedState = part.getPersistedState();
|
||||||
persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size()));
|
persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size())); //$NON-NLS-1$
|
||||||
Integer index = 0;
|
Integer index = 0;
|
||||||
for (File file : filesToLoad) {
|
for (File file : filesToLoad) {
|
||||||
persistedState.put(DATABASE_FILE + index, file.getAbsolutePath());
|
persistedState.put(DATABASE_FILE + index, file.getAbsolutePath());
|
||||||
|
@ -434,7 +435,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
|
|
||||||
public void saveState(String fileName){
|
public void saveState(String fileName){
|
||||||
Map<String, String> persistedState = new HashMap<>();
|
Map<String, String> persistedState = new HashMap<>();
|
||||||
persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size()));
|
persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size())); //$NON-NLS-1$
|
||||||
Integer index = 0;
|
Integer index = 0;
|
||||||
for (File file : filesToLoad) {
|
for (File file : filesToLoad) {
|
||||||
persistedState.put(DATABASE_FILE + index, file.getAbsolutePath());
|
persistedState.put(DATABASE_FILE + index, file.getAbsolutePath());
|
||||||
|
@ -445,7 +446,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
props.putAll(persistedState);
|
props.putAll(persistedState);
|
||||||
try {
|
try {
|
||||||
FileOutputStream out = new FileOutputStream(fileName);
|
FileOutputStream out = new FileOutputStream(fileName);
|
||||||
props.store(out, "Written by SCViewer");
|
props.store(out, "Written by SCViewer"); //$NON-NLS-1$
|
||||||
out.close();
|
out.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -473,14 +474,14 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
*/
|
*/
|
||||||
protected void saveWaveformViewerState(Map<String, String> persistedState) {
|
protected void saveWaveformViewerState(Map<String, String> persistedState) {
|
||||||
Integer index;
|
Integer index;
|
||||||
persistedState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size()));
|
persistedState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size())); //$NON-NLS-1$
|
||||||
index = 0;
|
index = 0;
|
||||||
for (TrackEntry trackEntry : waveformPane.getStreamList()) {
|
for (TrackEntry trackEntry : waveformPane.getStreamList()) {
|
||||||
persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName());
|
persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName());
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
List<ICursor> cursors = waveformPane.getCursorList();
|
List<ICursor> cursors = waveformPane.getCursorList();
|
||||||
persistedState.put(SHOWN_CURSOR + "S", Integer.toString(cursors.size()));
|
persistedState.put(SHOWN_CURSOR + "S", Integer.toString(cursors.size())); //$NON-NLS-1$
|
||||||
index = 0;
|
index = 0;
|
||||||
for (ICursor cursor : cursors) {
|
for (ICursor cursor : cursors) {
|
||||||
persistedState.put(SHOWN_CURSOR + index, Long.toString(cursor.getTime()));
|
persistedState.put(SHOWN_CURSOR + index, Long.toString(cursor.getTime()));
|
||||||
|
@ -496,7 +497,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
* @param state the state
|
* @param state the state
|
||||||
*/
|
*/
|
||||||
protected void restoreWaveformViewerState(Map<String, String> state) {
|
protected void restoreWaveformViewerState(Map<String, String> state) {
|
||||||
Integer waves = state.containsKey(SHOWN_WAVEFORM+"S") ? Integer.parseInt(state.get(SHOWN_WAVEFORM + "S")):0;
|
Integer waves = state.containsKey(SHOWN_WAVEFORM+"S") ? Integer.parseInt(state.get(SHOWN_WAVEFORM + "S")):0; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
List<TrackEntry> res = new LinkedList<>();
|
List<TrackEntry> res = new LinkedList<>();
|
||||||
for (int i = 0; i < waves; i++) {
|
for (int i = 0; i < waves; i++) {
|
||||||
IWaveform<? extends IWaveformEvent> waveform = database.getStreamByName(state.get(SHOWN_WAVEFORM + i));
|
IWaveform<? extends IWaveformEvent> waveform = database.getStreamByName(state.get(SHOWN_WAVEFORM + i));
|
||||||
|
@ -505,7 +506,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
}
|
}
|
||||||
if (res.size() > 0)
|
if (res.size() > 0)
|
||||||
waveformPane.getStreamList().addAll(res);
|
waveformPane.getStreamList().addAll(res);
|
||||||
Integer cursorLength = state.containsKey(SHOWN_CURSOR+"S")?Integer.parseInt(state.get(SHOWN_CURSOR + "S")):0;
|
Integer cursorLength = state.containsKey(SHOWN_CURSOR+"S")?Integer.parseInt(state.get(SHOWN_CURSOR + "S")):0; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
List<ICursor> cursors = waveformPane.getCursorList();
|
List<ICursor> cursors = waveformPane.getCursorList();
|
||||||
if (cursorLength == cursors.size()) {
|
if (cursorLength == cursors.size()) {
|
||||||
for (int i = 0; i < cursorLength; i++) {
|
for (int i = 0; i < cursorLength; i++) {
|
||||||
|
@ -567,8 +568,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
* @return true, if successful
|
* @return true, if successful
|
||||||
*/
|
*/
|
||||||
protected boolean askIfToLoad(File txFile) {
|
protected boolean askIfToLoad(File txFile) {
|
||||||
if (txFile.exists() && MessageDialog.openQuestion(myParent.getDisplay().getActiveShell(), "Database open",
|
if (txFile.exists() && MessageDialog.openQuestion(myParent.getDisplay().getActiveShell(), Messages.WaveformViewer_37,
|
||||||
"Would you like to open the adjacent database " + txFile.getName() + " as well?")) {
|
Messages.WaveformViewer_38 + txFile.getName() + Messages.WaveformViewer_39)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -584,10 +585,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
protected static String renameFileExtension(String source, String newExt) {
|
protected static String renameFileExtension(String source, String newExt) {
|
||||||
String target;
|
String target;
|
||||||
String currentExt = getFileExtension(source);
|
String currentExt = getFileExtension(source);
|
||||||
if (currentExt.equals("")) {
|
if (currentExt.equals("")) { //$NON-NLS-1$
|
||||||
target = source + "." + newExt;
|
target = source + "." + newExt; //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
target = source.replaceFirst(Pattern.quote("." + currentExt) + "$", Matcher.quoteReplacement("." + newExt));
|
target = source.replaceFirst(Pattern.quote("." + currentExt) + "$", Matcher.quoteReplacement("." + newExt)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
}
|
}
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
@ -599,7 +600,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
||||||
* @return the file extension
|
* @return the file extension
|
||||||
*/
|
*/
|
||||||
protected static String getFileExtension(String f) {
|
protected static String getFileExtension(String f) {
|
||||||
String ext = "";
|
String ext = ""; //$NON-NLS-1$
|
||||||
int i = f.lastIndexOf('.');
|
int i = f.lastIndexOf('.');
|
||||||
if (i > 0 && i < f.length() - 1) {
|
if (i > 0 && i < f.length() - 1) {
|
||||||
ext = f.substring(i + 1);
|
ext = f.substring(i + 1);
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
|
||||||
|
|
||||||
store.setDefault(PreferenceConstants.DATABASE_RELOAD, true);
|
store.setDefault(PreferenceConstants.DATABASE_RELOAD, true);
|
||||||
for (WaveformColors c : WaveformColors.values()) {
|
for (WaveformColors c : WaveformColors.values()) {
|
||||||
store.setDefault(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB()));
|
store.setDefault(c.name()+"_COLOR", StringConverter.asString(colors[c.ordinal()].getRGB())); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,64 +16,64 @@ package com.minres.scviewer.e4.application.preferences;
|
||||||
public class PreferenceConstants {
|
public class PreferenceConstants {
|
||||||
|
|
||||||
/** The Constant PREFERENCES_SCOPE. */
|
/** The Constant PREFERENCES_SCOPE. */
|
||||||
public static final String PREFERENCES_SCOPE="com.minres.scviewer.e4.application";
|
public static final String PREFERENCES_SCOPE="com.minres.scviewer.e4.application"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant DATABASE_RELOAD. */
|
/** The Constant DATABASE_RELOAD. */
|
||||||
public static final String DATABASE_RELOAD="databaseReload";
|
public static final String DATABASE_RELOAD="databaseReload"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant LINE_COLOR. */
|
/** The Constant LINE_COLOR. */
|
||||||
public static final String LINE_COLOR="LINE_COLOR";
|
public static final String LINE_COLOR="LINE_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant LINE_HIGHLITE_COLOR. */
|
/** The Constant LINE_HIGHLITE_COLOR. */
|
||||||
public static final String LINE_HIGHLITE_COLOR="LINE_HIGHLITE_COLOR";
|
public static final String LINE_HIGHLITE_COLOR="LINE_HIGHLITE_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant TRACK_BG_EVEN_COLOR. */
|
/** The Constant TRACK_BG_EVEN_COLOR. */
|
||||||
public static final String TRACK_BG_EVEN_COLOR="TRACK_BG_EVEN_COLOR";
|
public static final String TRACK_BG_EVEN_COLOR="TRACK_BG_EVEN_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant TRACK_BG_ODD_COLOR. */
|
/** The Constant TRACK_BG_ODD_COLOR. */
|
||||||
public static final String TRACK_BG_ODD_COLOR="TRACK_BG_ODD_COLOR";
|
public static final String TRACK_BG_ODD_COLOR="TRACK_BG_ODD_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant TRACK_BG_HIGHLITE_COLOR. */
|
/** The Constant TRACK_BG_HIGHLITE_COLOR. */
|
||||||
public static final String TRACK_BG_HIGHLITE_COLOR="TRACK_BG_HIGHLITE_COLOR";
|
public static final String TRACK_BG_HIGHLITE_COLOR="TRACK_BG_HIGHLITE_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant TX_BG_COLOR. */
|
/** The Constant TX_BG_COLOR. */
|
||||||
public static final String TX_BG_COLOR="TX_BG_COLOR";
|
public static final String TX_BG_COLOR="TX_BG_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant TX_BG_HIGHLITE_COLOR. */
|
/** The Constant TX_BG_HIGHLITE_COLOR. */
|
||||||
public static final String TX_BG_HIGHLITE_COLOR="TX_BG_HIGHLITE_COLOR";
|
public static final String TX_BG_HIGHLITE_COLOR="TX_BG_HIGHLITE_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant TX_BORDER_COLOR. */
|
/** The Constant TX_BORDER_COLOR. */
|
||||||
public static final String TX_BORDER_COLOR="TX_BORDER_COLOR";
|
public static final String TX_BORDER_COLOR="TX_BORDER_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SIGNAL0_COLOR. */
|
/** The Constant SIGNAL0_COLOR. */
|
||||||
public static final String SIGNAL0_COLOR="SIGNAL0_COLOR";
|
public static final String SIGNAL0_COLOR="SIGNAL0_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SIGNAL1_COLOR. */
|
/** The Constant SIGNAL1_COLOR. */
|
||||||
public static final String SIGNAL1_COLOR="SIGNAL1_COLOR";
|
public static final String SIGNAL1_COLOR="SIGNAL1_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SIGNALZ_COLOR. */
|
/** The Constant SIGNALZ_COLOR. */
|
||||||
public static final String SIGNALZ_COLOR="SIGNALZ_COLOR";
|
public static final String SIGNALZ_COLOR="SIGNALZ_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SIGNALX_COLOR. */
|
/** The Constant SIGNALX_COLOR. */
|
||||||
public static final String SIGNALX_COLOR="SIGNALX_COLOR";
|
public static final String SIGNALX_COLOR="SIGNALX_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant SIGNAL_TEXT_COLOR. */
|
/** The Constant SIGNAL_TEXT_COLOR. */
|
||||||
public static final String SIGNAL_TEXT_COLOR="SIGNAL_TEXT_COLOR";
|
public static final String SIGNAL_TEXT_COLOR="SIGNAL_TEXT_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant CURSOR_COLOR. */
|
/** The Constant CURSOR_COLOR. */
|
||||||
public static final String CURSOR_COLOR="CURSOR_COLOR";
|
public static final String CURSOR_COLOR="CURSOR_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant CURSOR_DRAG_COLOR. */
|
/** The Constant CURSOR_DRAG_COLOR. */
|
||||||
public static final String CURSOR_DRAG_COLOR="CURSOR_DRAG_COLOR";
|
public static final String CURSOR_DRAG_COLOR="CURSOR_DRAG_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant CURSOR_TEXT_COLOR. */
|
/** The Constant CURSOR_TEXT_COLOR. */
|
||||||
public static final String CURSOR_TEXT_COLOR="CURSOR_TEXT_COLOR";
|
public static final String CURSOR_TEXT_COLOR="CURSOR_TEXT_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant MARKER_COLOR. */
|
/** The Constant MARKER_COLOR. */
|
||||||
public static final String MARKER_COLOR="MARKER_COLOR";
|
public static final String MARKER_COLOR="MARKER_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
/** The Constant MARKER_TEXT_COLOR. */
|
/** The Constant MARKER_TEXT_COLOR. */
|
||||||
public static final String MARKER_TEXT_COLOR="MARKER_TEXT_COLOR";
|
public static final String MARKER_TEXT_COLOR="MARKER_TEXT_COLOR"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ package com.minres.scviewer.e4.application.preferences;
|
||||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class SCViewerPreferencesPage showing the SCViewer top preferences.
|
* The Class SCViewerPreferencesPage showing the SCViewer top preferences.
|
||||||
|
@ -32,7 +34,7 @@ public class SCViewerPreferencesPage extends FieldEditorPreferencePage {
|
||||||
@Override
|
@Override
|
||||||
protected void createFieldEditors() {
|
protected void createFieldEditors() {
|
||||||
|
|
||||||
addField(new BooleanFieldEditor(PreferenceConstants.DATABASE_RELOAD, "Check for changed database",
|
addField(new BooleanFieldEditor(PreferenceConstants.DATABASE_RELOAD, Messages.SCViewerPreferencesPage_0,
|
||||||
getFieldEditorParent()));
|
getFieldEditorParent()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import org.eclipse.jface.preference.ColorFieldEditor;
|
||||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
|
|
||||||
import com.minres.scviewer.database.ui.WaveformColors;
|
import com.minres.scviewer.database.ui.WaveformColors;
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The WaveformView preference page to show the colors to use.
|
* The WaveformView preference page to show the colors to use.
|
||||||
|
@ -34,7 +35,7 @@ public class WaveformPreferencesPage extends FieldEditorPreferencePage {
|
||||||
protected void createFieldEditors() {
|
protected void createFieldEditors() {
|
||||||
|
|
||||||
for (WaveformColors c : WaveformColors.values()) {
|
for (WaveformColors c : WaveformColors.values()) {
|
||||||
addField(new ColorFieldEditor(c.name() + "_COLOR", "Color for " + c.name().toLowerCase(),
|
addField(new ColorFieldEditor(c.name() + "_COLOR", Messages.WaveformPreferencesPage_1 + c.name().toLowerCase(), //$NON-NLS-1$
|
||||||
getFieldEditorParent()));
|
getFieldEditorParent()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,12 @@ public class TxDbLabelProvider implements ILabelProvider {
|
||||||
*/
|
*/
|
||||||
public TxDbLabelProvider() {
|
public TxDbLabelProvider() {
|
||||||
super();
|
super();
|
||||||
loadinDatabase=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database_go.png");
|
loadinDatabase=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database_go.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
database=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database.png");
|
database=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
stream=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/stream.png");
|
stream=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/stream.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
folder=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/folder.png");
|
folder=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/folder.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
signal=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/signal.png");
|
signal=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/signal.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
wave=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/wave.png");
|
wave=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/wave.png"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class TxPropertiesLabelProvider implements ITableLabelProvider {
|
||||||
@Override
|
@Override
|
||||||
public String getColumnText(Object element, int columnIndex) {
|
public String getColumnText(Object element, int columnIndex) {
|
||||||
ITxAttribute attribute = (ITxAttribute) element;
|
ITxAttribute attribute = (ITxAttribute) element;
|
||||||
String text = "";
|
String text = ""; //$NON-NLS-1$
|
||||||
switch (columnIndex) {
|
switch (columnIndex) {
|
||||||
case TransactionDetails.COLUMN_FIRST:
|
case TransactionDetails.COLUMN_FIRST:
|
||||||
text = attribute.getName();
|
text = attribute.getName();
|
||||||
|
|
|
@ -28,6 +28,8 @@ import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
import org.eclipse.swt.graphics.Rectangle;
|
||||||
import org.osgi.framework.Bundle;
|
import org.osgi.framework.Bundle;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility class for managing OS resources associated with SWT/JFace controls such as colors, fonts, images,
|
* Utility class for managing OS resources associated with SWT/JFace controls such as colors, fonts, images,
|
||||||
* etc.
|
* etc.
|
||||||
|
@ -124,7 +126,7 @@ public class ResourceManager extends SWTResourceManager {
|
||||||
*/
|
*/
|
||||||
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) {
|
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) {
|
||||||
if (corner <= 0 || corner >= LAST_CORNER_KEY) {
|
if (corner <= 0 || corner >= LAST_CORNER_KEY) {
|
||||||
throw new IllegalArgumentException("Wrong decorate corner");
|
throw new IllegalArgumentException(Messages.ResourceManager_0);
|
||||||
}
|
}
|
||||||
Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decoratedImageMap[corner];
|
Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decoratedImageMap[corner];
|
||||||
if (cornerDecoratedImageMap == null) {
|
if (cornerDecoratedImageMap == null) {
|
||||||
|
|
|
@ -28,6 +28,8 @@ import org.eclipse.swt.graphics.RGB;
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
import org.eclipse.swt.graphics.Rectangle;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
|
|
||||||
|
import com.minres.scviewer.e4.application.Messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility class for managing OS resources associated with SWT controls such as colors, fonts, images, etc.
|
* Utility class for managing OS resources associated with SWT controls such as colors, fonts, images, etc.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -232,7 +234,7 @@ public class SWTResourceManager {
|
||||||
*/
|
*/
|
||||||
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) {
|
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) {
|
||||||
if (corner <= 0 || corner >= LAST_CORNER_KEY) {
|
if (corner <= 0 || corner >= LAST_CORNER_KEY) {
|
||||||
throw new IllegalArgumentException("Wrong decorate corner");
|
throw new IllegalArgumentException(Messages.SWTResourceManager_0);
|
||||||
}
|
}
|
||||||
Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decoratedImageMap[corner];
|
Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decoratedImageMap[corner];
|
||||||
if (cornerDecoratedImageMap == null) {
|
if (cornerDecoratedImageMap == null) {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||||
<version>1.2.0-SNAPSHOT</version>
|
<version>1.2.1-SNAPSHOT</version>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?pde version="3.5"?>
|
<?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="1.2.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="1.2.1.qualifier" useFeatures="false" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<module>../com.minres.scviewer.database.sqlite</module>
|
<module>../com.minres.scviewer.database.sqlite</module>
|
||||||
<module>../com.minres.scviewer.database.text</module>
|
<module>../com.minres.scviewer.database.text</module>
|
||||||
<module>../com.minres.scviewer.database.vcd</module>
|
<module>../com.minres.scviewer.database.vcd</module>
|
||||||
|
<module>../com.minres.scviewer.database.test</module>
|
||||||
<module>../com.minres.scviewer.database.ui</module>
|
<module>../com.minres.scviewer.database.ui</module>
|
||||||
<module>../com.minres.scviewer.database.ui.swt</module>
|
<module>../com.minres.scviewer.database.ui.swt</module>
|
||||||
<module>../com.opcoach.e4.preferences</module>
|
<module>../com.opcoach.e4.preferences</module>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
|
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: SCViewer
|
Bundle-Name: SCViewer
|
||||||
Bundle-SymbolicName: com.minres.scviewer.ui;singleton:=true
|
Bundle-SymbolicName: com.minres.scviewer.ui;singleton:=true
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.1.qualifier
|
||||||
Bundle-Activator: com.minres.scviewer.ui.TxEditorPlugin
|
Bundle-Activator: com.minres.scviewer.ui.TxEditorPlugin
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
|
@ -19,7 +19,7 @@ Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
org.eclipse.osgi,
|
org.eclipse.osgi,
|
||||||
org.eclipse.core.expressions;bundle-version="3.4.600",
|
org.eclipse.core.expressions;bundle-version="3.4.600",
|
||||||
org.eclipse.jface
|
org.eclipse.jface
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Import-Package: com.google.common.collect
|
Import-Package: com.google.common.collect
|
||||||
Service-Component: OSGI-INF/component.xml
|
Service-Component: OSGI-INF/component.xml
|
||||||
|
|
|
@ -8,4 +8,5 @@
|
||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
<version>1.0.1-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
|
@ -44,6 +44,7 @@ import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
|
||||||
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
|
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
|
||||||
|
|
||||||
import com.minres.scviewer.database.AssociationType;
|
import com.minres.scviewer.database.AssociationType;
|
||||||
|
import com.minres.scviewer.database.DataType;
|
||||||
import com.minres.scviewer.database.ITxAttribute;
|
import com.minres.scviewer.database.ITxAttribute;
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
|
|
||||||
|
@ -51,7 +52,7 @@ public class AttributeProperty extends AbstractPropertySection implements ISelec
|
||||||
|
|
||||||
private final String[] titles = { "Location", "Name", "Type", "Value" };
|
private final String[] titles = { "Location", "Name", "Type", "Value" };
|
||||||
|
|
||||||
private ListenerList listeners = new ListenerList();
|
private ListenerList<ISelectionChangedListener> listeners = new ListenerList<ISelectionChangedListener>();
|
||||||
|
|
||||||
private ITx iTr;
|
private ITx iTr;
|
||||||
|
|
||||||
|
@ -199,12 +200,13 @@ public class AttributeProperty extends AbstractPropertySection implements ISelec
|
||||||
else if (columnIndex == 2 )
|
else if (columnIndex == 2 )
|
||||||
return attr.getDataType().name();
|
return attr.getDataType().name();
|
||||||
else if (columnIndex == 3){
|
else if (columnIndex == 3){
|
||||||
if("UNSIGNED".equals(attr.getType()) && (attr.getName().contains("addr")||attr.getName().contains("data")))
|
String value = attr.getValue().toString();
|
||||||
|
if((DataType.UNSIGNED == attr.getDataType() || DataType.INTEGER==attr.getDataType()) && !"0".equals(value)) {
|
||||||
try {
|
try {
|
||||||
return "0x"+Long.toHexString(Long.parseLong(attr.getValue().toString()));
|
value = attr.getValue().toString() + "(0x"+Long.toHexString(Long.parseLong(attr.getValue().toString()))+")";
|
||||||
} catch(NumberFormatException e) {
|
} catch(NumberFormatException e) { }
|
||||||
}
|
}
|
||||||
return attr.getValue().toString();
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class RelatedProperty extends AbstractPropertySection implements ISelecti
|
||||||
|
|
||||||
private final String[] titles = { "Relation type", "Relation Name", "Tx Id" };
|
private final String[] titles = { "Relation type", "Relation Name", "Tx Id" };
|
||||||
|
|
||||||
private ListenerList listeners = new ListenerList();
|
private ListenerList<ISelectionChangedListener> listeners = new ListenerList<ISelectionChangedListener>();
|
||||||
|
|
||||||
private ITx iTr;
|
private ITx iTr;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
|
@ -4,7 +4,7 @@ Bundle-Name: Preferences
|
||||||
Bundle-SymbolicName: com.opcoach.e4.preferences;singleton:=true
|
Bundle-SymbolicName: com.opcoach.e4.preferences;singleton:=true
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-Vendor: OPCOACH
|
Bundle-Vendor: OPCOACH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: javax.inject,
|
Require-Bundle: javax.inject,
|
||||||
org.eclipse.core.runtime;bundle-version="3.9.0",
|
org.eclipse.core.runtime;bundle-version="3.9.0",
|
||||||
org.eclipse.jface;bundle-version="3.9.0",
|
org.eclipse.jface;bundle-version="3.9.0",
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<extension-point id="e4PreferencePages" name="e4PreferencePages" schema="schema/e4PreferencePages.exsd"/>
|
<extension-point id="e4PreferencePages" name="e4PreferencePages" schema="schema/e4PreferencePages.exsd"/>
|
||||||
<extension-point id="e4PreferenceStoreProvider" name="e4PreferenceStoreProvider" schema="schema/e4PreferenceStoreProvider.exsd"/>
|
<extension-point id="e4PreferenceStoreProvider" name="e4PreferenceStoreProvider" schema="schema/e4PreferenceStoreProvider.exsd"/>
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
Loading…
Reference in New Issue