Compare commits

...

7 Commits

99 changed files with 825 additions and 424 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src"/>
<classpathentry exported="true" kind="lib" path="sqlite-jdbc-3.8.7.jar"/>

View File

@ -1,7 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=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

View File

@ -4,7 +4,7 @@ Bundle-Name: SQLite transaction database
Bundle-SymbolicName: com.minres.scviewer.database.sqlite
Bundle-Version: 1.0.0.qualifier
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",
org.eclipse.equinox.util;bundle-version="1.0.500",
org.eclipse.equinox.ds;bundle-version="1.4.200",

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src/"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,3 +1,4 @@
eclipse.preferences.version=1
encoding//src/com/minres/scviewer/database/test/DatabaseServicesPerformanceTest.java=UTF-8
encoding//src/com/minres/scviewer/database/test/DatabaseServicesTest.java=UTF-8
encoding/<project>=UTF-8

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -12,7 +12,7 @@
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<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"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
@ -26,17 +26,17 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.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.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.minres.scviewer.database.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
<stringAttribute key="selected_target_plugins" value="com.google.guava*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_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_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@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@default:default,org.hamcrest.core@default:default,org.junit@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.binary@default:default,com.minres.scviewer.database.sqlite@default:true,com.minres.scviewer.database.test@default:default,com.minres.scviewer.database.text@default:true,com.minres.scviewer.database.ui.swt@default:default,com.minres.scviewer.database.ui@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:true,com.opcoach.e4.preferences@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>

View File

@ -4,7 +4,7 @@ Bundle-Name: SCViewer database tests
Bundle-SymbolicName: com.minres.scviewer.database.test
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: MINRES Technologies GnbH
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.junit,
com.minres.scviewer.database,
com.minres.scviewer.database.sqlite;bundle-version="1.0.0",

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="com.minres.scviewer.database.test">
<implementation class="com.minres.scviewer.database.test.DatabaseServicesTest"/>
<implementation class="com.minres.scviewer.database.test.DatabaseFactory"/>
<reference bind="setFactory" cardinality="1..1" interface="com.minres.scviewer.database.IWaveformDbFactory" name="IWaveformDbFactory" policy="static" unbind="unsetFactory"/>
</scr:component>

View File

@ -1 +1,3 @@
/.scviewer.*
/.my_db.txlog*
/.simple_system.txlog_bdb.*

View File

@ -14,6 +14,7 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>0.23.1</version>
<configuration>
<!-- <bundleStartLevel /> -->
<dependencies>

View File

@ -0,0 +1,24 @@
package com.minres.scviewer.database.test;
import com.minres.scviewer.database.IWaveformDb;
import com.minres.scviewer.database.IWaveformDbFactory;
public class DatabaseFactory {
private static IWaveformDbFactory waveformDbFactory;
public synchronized void setFactory(IWaveformDbFactory service) {
waveformDbFactory = service;
}
public synchronized void unsetFactory(IWaveformDbFactory service) {
if (waveformDbFactory == service) {
waveformDbFactory = null;
}
}
public IWaveformDb getDatabase() {
return waveformDbFactory.getDatabase();
}
}

View File

@ -0,0 +1,65 @@
/*******************************************************************************
* Copyright (c) 2015 MINRES Technologies GmbH and others.
* All rights reserved. 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
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.minres.scviewer.database.IWaveformDb;
import com.minres.scviewer.database.IWaveformDbFactory;
public class DatabaseServicesPerformanceTest {
private DatabaseFactory databaseFactory;
private IWaveformDb waveformDb;
@Before
public void setUp() throws Exception {
databaseFactory = new DatabaseFactory();
waveformDb=databaseFactory.getDatabase();
}
@After
public void tearDown() throws Exception {
}
@Test
public void testVCD() throws Exception {
File f = new File("inputs/my_db.vcd").getAbsoluteFile();
assertTrue(f.exists());
waveformDb.load(f);
assertNotNull(waveformDb);
assertEquals(14, waveformDb.getAllWaves().size());
assertEquals(2, waveformDb.getChildNodes().size());
}
@Test
public void testTxText() throws Exception {
File f = new File("inputs/simple_system.txlog").getAbsoluteFile();
assertTrue(f.exists());
long timeBefore = System.currentTimeMillis();
waveformDb.load(f);
long timeAfter = System.currentTimeMillis();
long elapsed = timeAfter - timeBefore;
assertNotNull(waveformDb);
System.out.println("elapsed:" + elapsed);
}
}

View File

@ -26,23 +26,13 @@ import com.minres.scviewer.database.IWaveformDbFactory;
public class DatabaseServicesTest {
private static IWaveformDbFactory waveformDbFactory;
private DatabaseFactory databaseFactory;
private IWaveformDb waveformDb;
public synchronized void setFactory(IWaveformDbFactory service) {
waveformDbFactory = service;
}
public synchronized void unsetFactory(IWaveformDbFactory service) {
if (waveformDbFactory == service) {
waveformDbFactory = null;
}
}
@Before
public void setUp() throws Exception {
waveformDb=waveformDbFactory.getDatabase();
waveformDb=new DatabaseFactory().getDatabase();
// Wait for OSGi dependencies
// for (int i = 0; i < 10; i++) {
// if (waveformDb.size() == 3) // Dependencies fulfilled

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src/"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -1,2 +1,3 @@
eclipse.preferences.version=1
groovy.compiler.level=23
groovy.compiler.level=24
groovy.script.filters=**/*.dsld,y,**/*.gradle,n

View File

@ -4,7 +4,7 @@ Bundle-Name: Textual transaction database
Bundle-SymbolicName: com.minres.scviewer.database.text
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: MINRES Technologies GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.minres.scviewer.database,
org.osgi.framework;version="1.3.0"
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",

View File

@ -26,17 +26,21 @@ import com.minres.scviewer.database.IWaveformDb
import com.minres.scviewer.database.IWaveformDbLoader
import com.minres.scviewer.database.RelationType
public class TextDbLoader implements IWaveformDbLoader{
public class TextDbLoader implements IWaveformDbLoader, Serializable{
private Long maxTime;
IWaveformDb db;
transient IWaveformDb db;
DB backingDb;
transient DB backingDb;
def streams = []
transient def streamsById = [:]
transient def generatorsById = [:]
transient def transactionsById = [:]
def relationTypes=[:]
transient def relationTypes=[:]
public TextDbLoader() {
}
@ -48,37 +52,39 @@ public class TextDbLoader implements IWaveformDbLoader{
@Override
public List<IWaveform> getAllWaves() {
return new LinkedList<IWaveform>(streams);
return new LinkedList<IWaveform>(streamsById.values());
}
public Map<Long, ITxGenerator> getGeneratorsById() {
TreeMap<Long, ITxGenerator> res = new TreeMap<Long, ITxGenerator>();
streams.each{TxStream stream -> stream.generators.each{res.put(it.id, id)} }
return res;
}
// public Map<Long, ITxGenerator> getGeneratorsById() {
// TreeMap<Long, ITxGenerator> res = new TreeMap<Long, ITxGenerator>();
// streamsById.values().each{TxStream stream ->
// stream.generators.each{res.put(it.id, id)} }
// return res;
// }
static final byte[] x = "scv_tr_stream".bytes
@Override
boolean load(IWaveformDb db, File file) throws Exception {
this.db=db
this.streams=[]
def gzipped = isGzipped(file)
if(isTxfile(gzipped?new GZIPInputStream(new FileInputStream(file)):new FileInputStream(file))){
if(true) {
def parentDir=file.absoluteFile.parent
def filename=file.name
new File(parentDir).eachFileRecurse (FileType.FILES) { f -> if(f.name=~/^\.${filename}/) f.delete() }
this.backingDb = DBMaker.openFile(parentDir+File.separator+"."+filename+"_bdb")
.deleteFilesAfterClose()
.useRandomAccessFile()
.setMRUCacheSize(4096)
//.disableTransactions()
.disableLocking()
.make();
} else {
this.backingDb = DBMaker.openMemory().disableLocking().make()
}
def parentDir=file.absoluteFile.parent
def filename=file.name
new File(parentDir).eachFileRecurse (FileType.FILES) { f -> if(f.name=~/^\.${filename}/) f.delete() }
this.backingDb = DBMaker.openFile(parentDir+File.separator+"."+filename+"_bdb")
.deleteFilesAfterClose()
.useRandomAccessFile()
//.enableHardCache()
.enableMRUCache()
.setMRUCacheSize(1024*4096)
.disableTransactions()
.disableLocking()
.make();
streamsById = backingDb.createHashMap("streamsById")
generatorsById = backingDb.createHashMap("generatorsById")
transactionsById = backingDb.createHashMap("transactionsById")
relationTypes=backingDb.createHashMap("relationTypes")
parseInput(gzipped?new GZIPInputStream(new FileInputStream(file)):new FileInputStream(file))
calculateConcurrencyIndicees()
return true
@ -122,9 +128,7 @@ public class TextDbLoader implements IWaveformDbLoader{
}
}
private def parseInput(InputStream inputStream){
def streamsById = [:]
def generatorsById = [:]
def transactionsById = [:]
//def transactionsById = backingDb.createHashMap("transactionsById")
TxGenerator generator
Tx transaction
boolean endTransaction=false
@ -139,15 +143,14 @@ public class TextDbLoader implements IWaveformDbLoader{
case "begin_attribute":
case "end_attribute":
if ((matcher = line =~ /^scv_tr_stream\s+\(ID (\d+),\s+name\s+"([^"]+)",\s+kind\s+"([^"]+)"\)$/)) {
def id = Integer.parseInt(matcher[0][1])
def stream = new TxStream(db, id, matcher[0][2], matcher[0][3], backingDb)
streams<<stream
def id = Long.parseLong(matcher[0][1])
def stream = new TxStream(this, id, matcher[0][2], matcher[0][3])
streamsById[id]=stream
} else if ((matcher = line =~ /^scv_tr_generator\s+\(ID\s+(\d+),\s+name\s+"([^"]+)",\s+scv_tr_stream\s+(\d+),$/)) {
def id = Integer.parseInt(matcher[0][1])
ITxStream stream=streamsById[Integer.parseInt(matcher[0][3])]
generator=new TxGenerator(id, stream, matcher[0][2])
stream.generators<<generator
def id = Long.parseLong(matcher[0][1])
ITxStream stream=streamsById[Long.parseLong(matcher[0][3])]
generator=new TxGenerator(this, id, stream.id, matcher[0][2])
stream.generators<<id
generatorsById[id]=generator
} else if ((matcher = line =~ /^begin_attribute \(ID (\d+), name "([^"]+)", type "([^"]+)"\)$/)) {
generator.begin_attrs << TxAttributeType.getAttrType(matcher[0][2], DataType.valueOf(matcher[0][3]), AssociationType.BEGIN)
@ -159,9 +162,9 @@ public class TextDbLoader implements IWaveformDbLoader{
generator=null
break
case "tx_begin"://matcher = line =~ /^tx_begin\s+(\d+)\s+(\d+)\s+(\d+)\s+([munpf]?s)/
def id = Integer.parseInt(tokens[1])
TxGenerator gen=generatorsById[Integer.parseInt(tokens[2])]
transaction = new Tx(id, gen.stream, gen, Long.parseLong(tokens[3])*stringToScale(tokens[4]))
def id = Long.parseLong(tokens[1])
TxGenerator gen=generatorsById[Long.parseLong(tokens[2])]
transaction = new Tx(this, id, gen.id, Long.parseLong(tokens[3])*stringToScale(tokens[4]))
gen.transactions << transaction
transactionsById[id]= transaction
gen.begin_attrs_idx=0;
@ -169,16 +172,16 @@ public class TextDbLoader implements IWaveformDbLoader{
endTransaction=false
break
case "tx_end"://matcher = line =~ /^tx_end\s+(\d+)\s+(\d+)\s+(\d+)\s+([munpf]?s)/
def id = Integer.parseInt(tokens[1])
def id = Long.parseLong(tokens[1])
transaction = transactionsById[id]
assert Integer.parseInt(tokens[2])==transaction.generator.id
assert Long.parseLong(tokens[2])==transaction.generator.id
transaction.endTime = Long.parseLong(tokens[3])*stringToScale(tokens[4])
transaction.generator.end_attrs_idx=0;
maxTime = maxTime>transaction.endTime?maxTime:transaction.endTime
endTransaction=true
break
case "tx_record_attribute"://matcher = line =~ /^tx_record_attribute\s+(\d+)\s+"([^"]+)"\s+(\S+)\s*=\s*(.+)$/
def id = Integer.parseInt(tokens[1])
def id = Long.parseLong(tokens[1])
transactionsById[id].attributes<<new TxAttribute(tokens[2][1..-2], DataType.valueOf(tokens[3]), AssociationType.RECORD, tokens[5..-1].join(' '))
break
case "a"://matcher = line =~ /^a\s+(.+)$/
@ -189,8 +192,8 @@ public class TextDbLoader implements IWaveformDbLoader{
}
break
case "tx_relation"://matcher = line =~ /^tx_relation\s+\"(\S+)\"\s+(\d+)\s+(\d+)$/
Tx tr2= transactionsById[Integer.parseInt(tokens[2])]
Tx tr1= transactionsById[Integer.parseInt(tokens[3])]
Tx tr2= transactionsById[Long.parseLong(tokens[2])]
Tx tr1= transactionsById[Long.parseLong(tokens[3])]
def relType=tokens[1][1..-2]
if(!relationTypes.containsKey(relType)) relationTypes[relType]=RelationType.create(relType)
def rel = new TxRelation(relationTypes[relType], tr1, tr2)
@ -202,14 +205,14 @@ public class TextDbLoader implements IWaveformDbLoader{
}
lineCnt++
if((lineCnt%1000) == 0) {
backingDb.commit()
}
}
backingDb.commit();
}
private def calculateConcurrencyIndicees(){
streams.each{ TxStream stream -> stream.getMaxConcurrency() }
streamsById.values().each{ TxStream stream ->
stream.getMaxConcurrency()
}
}

View File

@ -12,13 +12,13 @@ package com.minres.scviewer.database.text
import com.minres.scviewer.database.*
class Tx implements ITx {
class Tx implements ITx, Serializable {
TextDbLoader loader
Long id
TxGenerator generator
TxStream stream
Long generator_id
int concurrencyIndex
@ -32,10 +32,10 @@ class Tx implements ITx {
def outgoingRelations =[]
Tx(int id, TxStream stream, TxGenerator generator, Long begin){
Tx(TextDbLoader loader, Long id, Long generator_id, Long begin){
this.loader=loader
this.id=id
this.stream=stream
this.generator=generator
this.generator_id=generator_id
this.beginTime=begin
this.endTime=begin
}
@ -64,4 +64,14 @@ class Tx implements ITx {
return "tx#"+getId()+"["+getBeginTime()/1000000+"ns - "+getEndTime()/1000000+"ns]";
}
@Override
public ITxStream<ITxEvent> getStream() {
return generator.stream;
}
@Override
public ITxGenerator getGenerator() {
return loader.generatorsById[generator_id];
}
}

View File

@ -15,7 +15,7 @@ import com.minres.scviewer.database.DataType;
import com.minres.scviewer.database.ITxAttributeType;
import com.minres.scviewer.database.ITxAttribute
class TxAttribute implements ITxAttribute{
class TxAttribute implements ITxAttribute, Serializable {
TxAttributeType attributeType

View File

@ -14,7 +14,7 @@ import com.minres.scviewer.database.AssociationType;
import com.minres.scviewer.database.DataType;
import com.minres.scviewer.database.ITxAttributeType;
class TxAttributeType implements ITxAttributeType {
class TxAttributeType implements ITxAttributeType, Serializable {
String name
DataType dataType
AssociationType type

View File

@ -4,7 +4,7 @@ import com.minres.scviewer.database.ITx
import com.minres.scviewer.database.ITxEvent
import com.minres.scviewer.database.IWaveformEvent
class TxEvent implements ITxEvent {
class TxEvent implements ITxEvent, Serializable {
final ITxEvent.Type type;

View File

@ -12,7 +12,7 @@ package com.minres.scviewer.database.text
import java.util.ArrayList;
import java.util.List;
import org.apache.jdbm.DB
import com.minres.scviewer.database.ITxAttributeType
import com.minres.scviewer.database.ITxAttribute;
import com.minres.scviewer.database.ITxEvent;
@ -21,10 +21,11 @@ import com.minres.scviewer.database.ITxStream;
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.IWaveformEvent;
class TxGenerator implements ITxGenerator{
class TxGenerator implements ITxGenerator, Serializable{
Long id
TxStream stream
Long stream_id
String name
TextDbLoader loader;
Boolean active = false
ArrayList<ITx> transactions=[]
@ -33,14 +34,15 @@ class TxGenerator implements ITxGenerator{
ArrayList<ITxAttributeType> end_attrs= []
int end_attrs_idx = 0
TxGenerator(int id, TxStream stream, name){
TxGenerator(TextDbLoader loader, Long id, Long stream_id, name){
this.id=id
this.stream=stream
this.stream_id=stream_id
this.name=name
this.loader=loader
}
ITxStream<? extends ITxEvent> getStream(){
return stream;
return loader.streamsById[stream_id];
}
List<ITx> getTransactions(){

View File

@ -4,7 +4,7 @@ import com.minres.scviewer.database.ITxRelation
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.RelationType;
class TxRelation implements ITxRelation {
class TxRelation implements ITxRelation, Serializable {
Tx source
Tx target

View File

@ -27,11 +27,11 @@ import com.minres.scviewer.database.IHierNode
import com.minres.scviewer.database.ITxStream
import com.minres.scviewer.database.ITx
class TxStream extends HierNode implements ITxStream {
class TxStream extends HierNode implements ITxStream, Serializable {
Long id
IWaveformDb database
transient TextDbLoader loader
String fullName
@ -43,24 +43,24 @@ class TxStream extends HierNode implements ITxStream {
private TreeMap<Long, List<ITxEvent>> events
TxStream(IWaveformDb db, int id, String name, String kind, DB backingStore){
TxStream(TextDbLoader loader, Long id, String name, String kind){
super(name)
this.id=id
this.database=db
this.loader=loader
this.fullName=name
this.kind=kind
this.maxConcurrency=0
//events = new TreeMap<Long, List<ITxEvent>>()
events=backingStore.createTreeMap("stream-"+name)
events = new TreeMap<Long, List<ITxEvent>>()
//events=backingStore.createTreeMap("stream-"+name)
}
List<ITxGenerator> getGenerators(){
return generators as List<ITxGenerator>
return generators.collect { loader.generatorsById[it] } as List<ITxGenerator>
}
@Override
public IWaveformDb getDb() {
return database
return loader.db
}
@Override

View File

@ -11,6 +11,7 @@ import java.util.Comparator;
/**
* Various utilities used in JDBM
*/
@SuppressWarnings("rawtypes")
class Utils {
/**
@ -45,8 +46,9 @@ class Utils {
/**
* Compares comparables. Default comparator for most of java types
*/
static final Comparator COMPARABLE_COMPARATOR = new Comparator<Comparable>() {
public int compare(Comparable o1, Comparable o2) {
static final Comparator COMPARABLE_COMPARATOR = new Comparator<Comparable>() {
@SuppressWarnings("unchecked")
public int compare(Comparable o1, Comparable o2) {
return o1 == null && o2 != null ? -1 : (o1 != null && o2 == null ? 1 : o1.compareTo(o2));
}
};
@ -72,7 +74,8 @@ class Utils {
}
static <E> E max(E e1, E e2, Comparator comp){
@SuppressWarnings("unchecked")
static <E> E max(E e1, E e2, Comparator comp){
if(e1 == null) return e2;
if(e2 == null) return e1;
@ -81,7 +84,8 @@ class Utils {
return comp.compare(e1,e2)<0 ? e2:e1;
}
static <E> E min(E e1, E e2, Comparator comp){
@SuppressWarnings("unchecked")
static <E> E min(E e1, E e2, Comparator comp){
if(e1 == null) return e2;
if(e2 == null) return e1;

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src/"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -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.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
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.unusedWarningToken=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

View File

@ -4,7 +4,7 @@ Bundle-Name: SWT widget
Bundle-SymbolicName: com.minres.scviewer.database.ui.swt
Bundle-Version: 1.1.0.qualifier
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",
com.minres.scviewer.database;bundle-version="1.0.0",
com.google.guava;bundle-version="15.0.0",

View File

@ -25,6 +25,7 @@ import org.eclipse.swt.graphics.Rectangle;
import com.minres.scviewer.database.ISignal;
import com.minres.scviewer.database.ISignalChange;
import com.minres.scviewer.database.ISignalChangeMulti;
import com.minres.scviewer.database.ISignalChangeReal;
import com.minres.scviewer.database.ISignalChangeSingle;
import com.minres.scviewer.database.ui.TrackEntry;
import com.minres.scviewer.database.ui.WaveformColors;
@ -107,8 +108,13 @@ public class SignalPainter extends TrackPainter {
NavigableMap<Long, ? extends ISignalChange> entries = signal.getEvents().subMap(first.getKey(), false, last.getKey(), true);
SignalChange left = new SignalChange(first);
SignalChange right = new SignalChange(entries.size() > 0 ? entries.firstEntry() : first);
SignalStencil stencil = left.value instanceof ISignalChangeSingle ? new SingleBitStencil() : new MultiBitStencil(gc);
SignalStencil stencil = null;
if(left.value instanceof ISignalChangeSingle)
stencil= new SingleBitStencil();
else if(left.value instanceof ISignalChangeMulti)
stencil= new MultiBitStencil(gc);
else
stencil= new RealStencil(left.value, entries);
maxX = area.x + area.width;
yOffsetT = this.waveCanvas.getTrackHeight() / 5 + area.y;
yOffsetM = this.waveCanvas.getTrackHeight() / 2 + area.y;
@ -122,7 +128,6 @@ public class SignalPainter extends TrackPainter {
// b) left to close to right
if (left.time == right.time) {
right.time = endTime;
} else {
multiple = true;
long eTime = (xBegin + 1) * this.waveCanvas.getScaleFactor();
@ -144,7 +149,9 @@ public class SignalPainter extends TrackPainter {
if (xEnd == xBegin) {
multiple = true;
long eTime = (xBegin + 1) * this.waveCanvas.getScaleFactor();
right.set(entries.floorEntry(eTime), endTime);
Entry<Long, ? extends ISignalChange> entry = entries.floorEntry(eTime);
if(entry!=null && entry.getKey()> right.time)
right.set(entry, endTime);
xEnd = getXEnd(eTime);
}
} while (left.time < endTime);
@ -254,7 +261,84 @@ public class SignalPainter extends TrackPainter {
}
}
}
}
private class RealStencil implements SignalStencil {
double min;
double max;
double diff;
public RealStencil(ISignalChange value, NavigableMap<Long, ? extends ISignalChange> entries) {
min=((ISignalChangeReal) value).getValue();
max=min;
for (ISignalChange e : entries.values()) {
double v = ((ISignalChangeReal)e).getValue();
max= Double.isNaN(max)? v : Math.max(max, v);
min= Double.isNaN(min)? v : Math.min(min, v);
}
int nans = (Double.isNaN(max)?2:0) + (Double.isNaN(max)?1:0);
switch(nans) {
case 0:
break;
case 1:
max=min;
break;
case 2:
min=max;
case 3:
max=min=0;
}
diff=max-min;
if(diff==0.0) {
if(max>0)
min=0.0;
else if(min<0.0)
max=0.0;
else {
max=1.0;
min=0.0;
}
diff=max-min;
}
}
public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple) {
double value = ((ISignalChangeReal)left).getValue();
if(Double.isNaN(value)) {
Color color = waveCanvas.colors[WaveformColors.SIGNAL_NAN.ordinal()];
int width = xEnd - xBegin;
if (width > 1) {
int[] points = {
xBegin, yOffsetT,
xEnd, yOffsetT,
xEnd, yOffsetB,
xBegin, yOffsetB
};
gc.setForeground(color);
gc.drawPolygon(points);
gc.setBackground(color);
gc.fillPolygon(points);
} else {
gc.setForeground(color);
gc.drawLine(xEnd, yOffsetT, xEnd, yOffsetB);
}
} else {
Color color = waveCanvas.colors[WaveformColors.SIGNAL_ANALOG.ordinal()];
int height=yOffsetT-yOffsetB;
double offset=value-min;
int yOffset=diff>0?(int)(height*(offset/diff)) + yOffsetB:yOffsetM;
gc.setForeground(color);
if (xEnd > maxX) {
gc.drawLine(xBegin, yOffset, maxX, yOffset);
} else {
gc.drawLine(xBegin, yOffset, xEnd, yOffset);
double nextOffset = ((ISignalChangeReal)right).getValue()-min;
int yNext = diff>0?(int)(height*(nextOffset/diff)) + yOffsetB:height/2;
if (yOffset != yNext)
gc.drawLine(xEnd, yOffset, xEnd, yNext);
}
}
}
}
public ISignal<? extends ISignalChange> getSignal() {

View File

@ -156,6 +156,8 @@ public class WaveformCanvas extends Canvas {
colors[WaveformColors.SIGNALZ.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_YELLOW);
colors[WaveformColors.SIGNALX.ordinal()] = SWTResourceManager.getColor(255, 51, 51);
colors[WaveformColors.SIGNALU.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_YELLOW);
colors[WaveformColors.SIGNAL_ANALOG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GREEN);
colors[WaveformColors.SIGNAL_NAN.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED);
colors[WaveformColors.SIGNAL_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE);
colors[WaveformColors.CURSOR.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED);
colors[WaveformColors.CURSOR_DRAG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GRAY);

View File

@ -72,6 +72,7 @@ import com.google.common.collect.Lists;
import com.minres.scviewer.database.ISignal;
import com.minres.scviewer.database.ISignalChange;
import com.minres.scviewer.database.ISignalChangeMulti;
import com.minres.scviewer.database.ISignalChangeReal;
import com.minres.scviewer.database.ISignalChangeSingle;
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.ITxEvent;
@ -88,7 +89,7 @@ import com.minres.scviewer.database.ui.WaveformColors;
public class WaveformViewer implements IWaveformViewer {
private ListenerList selectionChangedListeners = new ListenerList();
private ListenerList<ISelectionChangedListener> selectionChangedListeners = new ListenerList<ISelectionChangedListener>();
private PropertyChangeSupport pcs;
@ -458,6 +459,8 @@ public class WaveformViewer implements IWaveformViewer {
entry.setValue("b'"+((ISignalChangeSingle)event).getValue());
} else if(event instanceof ISignalChangeMulti){
entry.setValue("h'"+((ISignalChangeMulti)event).getValue().toHexString());
} else if(event instanceof ISignalChangeReal){
entry.setValue(Double.toString(((ISignalChangeReal)event).getValue()));
}
} else if(entry.getKey() instanceof ITxStream<?>){
ITxStream<?> stream = (ITxStream<?>) entry.getKey();

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src"/>
<classpathentry kind="output" path="bin"/>

View File

@ -1,7 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=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

View File

@ -4,7 +4,7 @@ Bundle-Name: Database UI
Bundle-SymbolicName: com.minres.scviewer.database.ui
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: MINRES Technologies GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.minres.scviewer.database.ui
Require-Bundle: com.minres.scviewer.database,
org.eclipse.jface

View File

@ -14,7 +14,7 @@ public enum WaveformColors {
LINE, LINE_HIGHLITE,
TRACK_BG_EVEN, TRACK_BG_ODD, TRACK_BG_HIGHLITE,
TX_BG, TX_BG_HIGHLITE, TX_BORDER,
SIGNAL0, SIGNAL1, SIGNALZ, SIGNALX, SIGNALU, SIGNAL_TEXT,
SIGNAL0, SIGNAL1, SIGNALZ, SIGNALX, SIGNALU, SIGNAL_TEXT, SIGNAL_ANALOG, SIGNAL_NAN,
CURSOR, CURSOR_DRAG, CURSOR_TEXT,
MARKER, MARKER_TEXT, REL_ARROW, REL_ARROW_HIGHLITE
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src/"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,7 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=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

View File

@ -4,7 +4,7 @@ Bundle-Name: VCD signal database
Bundle-SymbolicName: com.minres.scviewer.database.vcd
Bundle-Version: 1.0.0.qualifier
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",
org.eclipse.equinox.util;bundle-version="1.0.500",
org.eclipse.equinox.ds;bundle-version="1.4.200",

View File

@ -52,8 +52,16 @@ public interface IVCDDatabaseBuilder {
*
* @param signalId the int value
* @param currentTime the current time in ps
* @param decodedValues the decoded values
* @param decodedValues the decoded bit values
*/
public void appendTransition(int signalId, long currentTime, BitVector decodedValues);
/**
* Append transition.
*
* @param signalId the int value
* @param currentTime the current time in ps
* @param vValues the real values
*/
public void appendTransition(int signalId, long currentTime, Double values);
}

View File

@ -23,6 +23,7 @@ import com.minres.scviewer.database.BitVector;
import com.minres.scviewer.database.ISignal;
import com.minres.scviewer.database.ISignalChange;
import com.minres.scviewer.database.ISignalChangeMulti;
import com.minres.scviewer.database.ISignalChangeReal;
import com.minres.scviewer.database.ISignalChangeSingle;
import com.minres.scviewer.database.IWaveform;
import com.minres.scviewer.database.IWaveformDb;
@ -166,6 +167,17 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
return signal.getWidth();
}
/* (non-Javadoc)
* @see com.minres.scviewer.database.vcd.ITraceBuilder#appendTransition(int, long, com.minres.scviewer.database.vcd.BitVector)
*/
@SuppressWarnings("unchecked")
@Override
public void appendTransition(int signalId, long currentTime, Double value) {
VCDSignal<? extends IWaveformEvent> signal = (VCDSignal<? extends IWaveformEvent>) signals.get(signalId);
Long time = currentTime*TIME_RES;
((VCDSignal<ISignalChangeReal>)signal).values.put(time, new VCDSignalChangeReal(time, value));
}
/* (non-Javadoc)
* @see com.minres.scviewer.database.vcd.ITraceBuilder#appendTransition(int, long, com.minres.scviewer.database.vcd.BitVector)
*/
@ -173,7 +185,7 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
@Override
public void appendTransition(int signalId, long currentTime, BitVector decodedValues) {
VCDSignal<? extends IWaveformEvent> signal = (VCDSignal<? extends IWaveformEvent>) signals.get(signalId);
Long time = currentTime* TIME_RES;
Long time = currentTime*TIME_RES;
if(signal.getWidth()==1){
((VCDSignal<ISignalChangeSingle>)signal).values.put(time, new VCDSignalChangeSingle(time, decodedValues.getValue()[0]));
} else {

View File

@ -147,6 +147,7 @@ class VCDFileParser {
if (tokenizer.sval.charAt(0) == '#') { // If the line begins with a #, this is a timestamp.
currentTime = Long.parseLong(tokenizer.sval.substring(1)) * picoSecondsPerIncrement;
} else {
boolean isReal=false;
if(tokenizer.sval.equals("$comment")){
do {
if (!nextToken()) return false;
@ -161,6 +162,13 @@ class VCDFileParser {
value = tokenizer.sval.substring(1);
nextToken();
id = tokenizer.sval;
} else if (tokenizer.sval.charAt(0) == 'r') {
// real value net. Value appears first, followed by space,
// then identifier
value = tokenizer.sval.substring(1);
nextToken();
id = tokenizer.sval;
isReal=true;
} else {
// Single value net. identifier first, then value, no space.
value = tokenizer.sval.substring(0, 1);
@ -173,40 +181,48 @@ class VCDFileParser {
return true;
}
int netWidth = traceBuilder.getNetWidth(net);
BitVector decodedValues = new BitVector(netWidth);
if (value.equals("z") && netWidth > 1) {
for (int i = 0; i < netWidth; i++)
decodedValues.setValue(i, BitVector.VALUE_Z);
} else if (value.equals("x") && netWidth > 1) {
for (int i = 0; i < netWidth; i++)
decodedValues.setValue(i, BitVector.VALUE_X);
if(isReal) {
if("nan".equals(value)) {
traceBuilder.appendTransition(net, currentTime, Double.NaN);
} else {
traceBuilder.appendTransition(net, currentTime, Double.parseDouble(value));
}
} else {
int stringIndex = 0;
for (int convertedIndex = netWidth - value.length(); convertedIndex < netWidth; convertedIndex++) {
switch (value.charAt(stringIndex++)) {
case 'z':
decodedValues.setValue(convertedIndex, BitVector.VALUE_Z);
break;
case '1':
decodedValues.setValue(convertedIndex, BitVector.VALUE_1);
break;
case '0':
decodedValues.setValue(convertedIndex, BitVector.VALUE_0);
break;
case 'x':
decodedValues.setValue(convertedIndex, BitVector.VALUE_X);
break;
default:
decodedValues.setValue(convertedIndex, BitVector.VALUE_X);
int netWidth = traceBuilder.getNetWidth(net);
BitVector decodedValues = new BitVector(netWidth);
if (value.equals("z") && netWidth > 1) {
for (int i = 0; i < netWidth; i++)
decodedValues.setValue(i, BitVector.VALUE_Z);
} else if (value.equals("x") && netWidth > 1) {
for (int i = 0; i < netWidth; i++)
decodedValues.setValue(i, BitVector.VALUE_X);
} else {
int stringIndex = 0;
for (int convertedIndex = netWidth - value.length(); convertedIndex < netWidth; convertedIndex++) {
switch (value.charAt(stringIndex++)) {
case 'z':
decodedValues.setValue(convertedIndex, BitVector.VALUE_Z);
break;
case '1':
decodedValues.setValue(convertedIndex, BitVector.VALUE_1);
break;
case '0':
decodedValues.setValue(convertedIndex, BitVector.VALUE_0);
break;
case 'x':
decodedValues.setValue(convertedIndex, BitVector.VALUE_X);
break;
default:
decodedValues.setValue(convertedIndex, BitVector.VALUE_X);
}
}
}
traceBuilder.appendTransition(net, currentTime, decodedValues);
}
traceBuilder.appendTransition(net, currentTime, decodedValues);
}
return true;
}

View File

@ -0,0 +1,37 @@
/*******************************************************************************
* Copyright (c) 2015 MINRES Technologies GmbH and others.
* All rights reserved. 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
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database.vcd;
import com.minres.scviewer.database.ISignalChangeReal;
import com.minres.scviewer.database.SignalChange;
public class VCDSignalChangeReal extends SignalChange implements ISignalChangeReal, Cloneable {
private double value;
public VCDSignalChangeReal(Long time, double value) {
super(time);
this.value=value;
}
public double getValue() {
return value;
}
public void setValue(double value) {
this.value = value;
}
@Override
public String toString() {
return value+"@"+getTime();
}
}

View File

@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<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"/>
</classpath>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -4,7 +4,7 @@ Bundle-Name: Waveform database
Bundle-SymbolicName: com.minres.scviewer.database
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: MINRES Technologies GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.minres.scviewer.database
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/component.xml,OSGI-INF/component2.xml

View File

@ -12,18 +12,25 @@ package com.minres.scviewer.database;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class HierNode implements IHierNode {
public class HierNode implements IHierNode, Serializable {
/**
*
*/
private static final long serialVersionUID = -2278641781226609616L;
protected String name;
protected String parentName;
protected ArrayList<IHierNode> childs;
protected transient ArrayList<IHierNode> childs;
protected PropertyChangeSupport pcs;
protected transient PropertyChangeSupport pcs;
public HierNode() {
childs = new ArrayList<IHierNode>();

View File

@ -0,0 +1,17 @@
/*******************************************************************************
* Copyright (c) 2015 MINRES Technologies GmbH and others.
* All rights reserved. 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
*
* Contributors:
* MINRES Technologies GmbH - initial API and implementation
*******************************************************************************/
package com.minres.scviewer.database;
public interface ISignalChangeReal extends ISignalChange{
public double getValue();
}

View File

@ -10,10 +10,16 @@
*******************************************************************************/
package com.minres.scviewer.database;
import java.io.Serializable;
import java.util.HashMap;
public class RelationType {
public class RelationType implements Serializable {
/**
*
*/
private static final long serialVersionUID = -5598253591502850283L;
private static HashMap<String, RelationType> registry = new HashMap<>();
private String name;

View File

@ -11,6 +11,7 @@
package com.minres.scviewer.database.internal;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@ -31,7 +32,12 @@ import com.minres.scviewer.database.IWaveformEvent;
import com.minres.scviewer.database.InputFormatException;
import com.minres.scviewer.database.RelationType;
public class WaveformDb extends HierNode implements IWaveformDb {
public class WaveformDb extends HierNode implements IWaveformDb, Serializable {
/**
*
*/
private static final long serialVersionUID = 4917280760027131179L;
private static List<IWaveformDbLoader> loaders=new LinkedList<IWaveformDbLoader>();

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src"/>
<classpathentry kind="output" path="bin"/>

View File

@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
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.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.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=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

View File

@ -32,6 +32,6 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
com.opcoach.e4.preferences,
org.eclipse.e4.core.di.extensions,
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,
javax.inject;version="1.0.0"

View File

@ -64,7 +64,7 @@ public class E4LifeCycle {
eventBroker.subscribe(UIEvents.UILifeCycle.ACTIVATE, new EventHandler() {
@Override
public void handleEvent(Event event) {
MPart part = (MPart) event.getProperty("ChangedElement");
MPart part = (MPart) event.getProperty("ChangedElement"); //$NON-NLS-1$
if(part!=null){
IEclipseContext ctx = part.getContext();
OpenViewHandler openViewHandler= new OpenViewHandler();
@ -115,7 +115,7 @@ public class E4LifeCycle {
StringBuilder sb = new StringBuilder();
boolean first=true;
for(String token:tokens){
if(!first) sb.append(",");
if(!first) sb.append(","); //$NON-NLS-1$
sb.append(token);
first=false;
}
@ -143,14 +143,14 @@ public class E4LifeCycle {
*/
public void openViewForFile(String 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());
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);
partService.showPart(part, PartState.ACTIVATE);
IEclipseContext ctx=part.getContext();
ctx.modify("input", file);
ctx.declareModifiable("input");
ctx.modify("input", file); //$NON-NLS-1$
ctx.declareModifiable("input"); //$NON-NLS-1$
}
}
}

View File

@ -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() {
}
}

View File

@ -54,7 +54,7 @@ public class NavigateContribution {
WaveformViewer waveformViewerPart = (WaveformViewer) part.getObject();
RelationType relationTypeFilter = waveformViewerPart.getRelationTypeFilter();
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);
for(RelationType relationType:waveformViewerPart.getAllRelationTypes()){
// MDirectMenuItem dynamicItem = modelService.createModelElement(MDirectMenuItem.class);
@ -69,15 +69,15 @@ public class NavigateContribution {
MParameter parameter=modelService.createModelElement(MParameter.class);
parameter.setName(commandParameter.getElementId());
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);
handledMenuItem.setLabel(relationType.getName());
if(relationTypeFilter.equals(relationType)){
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
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/empty.png");
handledMenuItem.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application");
handledMenuItem.setIconURI("platform:/plugin/com.minres.scviewer.e4.application/icons/empty.png"); //$NON-NLS-1$
handledMenuItem.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application"); //$NON-NLS-1$
handledMenuItem.setCommand(command);
handledMenuItem.getParameters().add(parameter);
items.add(handledMenuItem);

View File

@ -31,6 +31,7 @@ import org.eclipse.swt.widgets.Composite;
import com.minres.scviewer.database.ITx;
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.WaveformViewer;
@ -49,7 +50,7 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
WaveformViewer waveformViewerPart;
/** The dummy. */
RelationType dummy = RelationType.create("------------");
RelationType dummy = RelationType.create(Messages.RelationTypeToolControl_0);
/**
* Instantiates a new relation type tool control.
@ -72,7 +73,7 @@ public class RelationTypeToolControl extends PartListener implements ISelectionC
comboViewer = new ComboViewer(parent, SWT.NONE);
Combo comboBox = comboViewer.getCombo();
comboBox.setBounds(0, 0, 26, 22);
comboBox.setText("Select");
comboBox.setText(Messages.RelationTypeToolControl_1);
comboViewer.setContentProvider(new ArrayContentProvider());
comboViewer.setInput(new RelationType[] {dummy});
comboViewer.setSelection(new StructuredSelection(dummy));

View File

@ -21,7 +21,7 @@ public class AboutHandler {
@Execute
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(false);
}

View File

@ -29,8 +29,8 @@ import com.minres.scviewer.e4.application.parts.DesignBrowser;
public class AddWaveformHandler {
public final static String PARAM_WHERE_ID="com.minres.scviewer.e4.application.command.addwaveform.where";
public final static String PARAM_ALL_ID="com.minres.scviewer.e4.application.command.addwaveform.all";
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"; //$NON-NLS-1$
@Inject @Optional DesignBrowser designBrowser;
@ -40,8 +40,8 @@ public class AddWaveformHandler {
@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection) {
if(designBrowser==null) designBrowser = getListPart( partService);
if(designBrowser==null || designBrowser.getActiveWaveformViewerPart()==null) return false;
Boolean before = "before".equalsIgnoreCase(where);
if("true".equalsIgnoreCase(all))
Boolean before = "before".equalsIgnoreCase(where); //$NON-NLS-1$
if("true".equalsIgnoreCase(all)) //$NON-NLS-1$
return designBrowser.getFilteredChildren().length>0 &&
(!before || ((IStructuredSelection)designBrowser.getActiveWaveformViewerPart().getSelection()).size()>0);
else
@ -57,7 +57,7 @@ public class AddWaveformHandler {
if(designBrowser!=null && selection.size()>0){
List<?> sel=selection.toList();
designBrowser.getActiveWaveformViewerPart().addStreamsToList(sel.toArray(new IWaveform<?>[]{}),
"before".equalsIgnoreCase(where));
"before".equalsIgnoreCase(where)); //$NON-NLS-1$
}
}

View File

@ -22,10 +22,11 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import com.minres.scviewer.e4.application.Messages;
import com.minres.scviewer.e4.application.parts.WaveformViewer;
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
public boolean canExecute(EPartService partService) {
@ -37,10 +38,10 @@ public class LoadStoreSettingsHandler {
@Execute
public void execute(@Named(PARAMETER_ID) String param, Shell shell, MApplication app, EModelService modelService,
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);
dialog.setFilterExtensions (new String []{"*.scview"});
if(!load) dialog.setFileName("SCViewer.scview");
dialog.setFilterExtensions (new String []{Messages.LoadStoreSettingsHandler_2});
if(!load) dialog.setFileName(Messages.LoadStoreSettingsHandler_3);
String res = dialog.open();
MPart part = partService.getActivePart();
if(res!=null && part!=null){

View File

@ -26,7 +26,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
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
public Boolean canExecute(ESelectionService selectionService){
@ -43,9 +43,9 @@ public class MoveWaveformHandler {
MPart part = partService.getActivePart();
Object obj = part.getObject();
if(obj instanceof WaveformViewer){
if("up".equalsIgnoreCase(param))
if("up".equalsIgnoreCase(param)) //$NON-NLS-1$
((WaveformViewer)obj).moveSelected(-1);
else if("down".equalsIgnoreCase(param))
else if("down".equalsIgnoreCase(param)) //$NON-NLS-1$
((WaveformViewer)obj).moveSelected(1);
}
}

View File

@ -27,7 +27,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
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
public Boolean canExecute(ESelectionService selectionService){
@ -46,9 +46,9 @@ public class NavigateEvent {
MPart part = partService.getActivePart();
Object obj = part.getObject();
if(obj instanceof WaveformViewer){
if("next".equalsIgnoreCase(param))
if("next".equalsIgnoreCase(param)) //$NON-NLS-1$
((WaveformViewer)obj).moveCursor(GotoDirection.NEXT);
else if("prev".equalsIgnoreCase(param))
else if("prev".equalsIgnoreCase(param)) //$NON-NLS-1$
((WaveformViewer)obj).moveCursor(GotoDirection.PREV);
}
}

View File

@ -26,7 +26,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
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
public Boolean canExecute(ESelectionService selectionService){
@ -43,9 +43,9 @@ public class NavigateTrans {
MPart part = partService.getActivePart();
Object obj = part.getObject();
if(obj instanceof WaveformViewer){
if("next".equalsIgnoreCase(param))
if("next".equalsIgnoreCase(param)) //$NON-NLS-1$
((WaveformViewer)obj).moveSelection(GotoDirection.NEXT);
else if("prev".equalsIgnoreCase(param))
else if("prev".equalsIgnoreCase(param)) //$NON-NLS-1$
((WaveformViewer)obj).moveSelection(GotoDirection.PREV);
}
}

View File

@ -23,13 +23,15 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import com.minres.scviewer.e4.application.Messages;
public class OpenHandler {
@Execute
public void execute(Shell shell, MApplication app, EModelService modelService, EPartService partService){
FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
// dialog.setFilterExtensions (new String []{"vcd", "txdb", "txlog"});
dialog.setFilterExtensions (new String []{"*.vcd;*.txdb;*.txlog"});
dialog.setFilterExtensions (new String []{Messages.OpenHandler_0});
dialog.open();
String path = dialog.getFilterPath();
for(String fileName: dialog.getFileNames()){
@ -38,19 +40,19 @@ public class OpenHandler {
// MPart part = MBasicFactory.INSTANCE.createPart();
// part.setLabel(fileName);
// part.setContributionURI("bundleclass://com.minres.scviewer.e4.application/"+ WaveformViewerPart.class.getName());
MPart part = partService .createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer");
MPart part = partService .createPart("com.minres.scviewer.e4.application.partdescriptor.waveformviewer"); //$NON-NLS-1$
part.setLabel(file.getName());
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app);
MPartStack partStack = (MPartStack)modelService.find("org.eclipse.editorss", app); //$NON-NLS-1$
partStack.getChildren().add(part);
partService.showPart(part, PartState.ACTIVATE);
// Object o = part.getObject();
// if(o instanceof WaveformViewerPart)
// ((WaveformViewerPart)o).setPartInput(file);
IEclipseContext ctx=part.getContext();
ctx.modify("input", file);
ctx.declareModifiable("input");
ctx.modify("input", file); //$NON-NLS-1$
ctx.declareModifiable("input"); //$NON-NLS-1$
}

View File

@ -15,12 +15,14 @@ import org.eclipse.e4.ui.workbench.IWorkbench;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
import com.minres.scviewer.e4.application.Messages;
public class QuitHandler {
@Execute
public void execute(IWorkbench workbench, Shell shell){
if (MessageDialog.openConfirm(shell, "Confirmation",
"Do you want to exit?")) {
if (MessageDialog.openConfirm(shell, Messages.QuitHandler_0,
Messages.QuitHandler_1)) {
workbench.close();
}
}

View File

@ -20,7 +20,7 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
import com.minres.scviewer.e4.application.parts.WaveformViewer;
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
public void execute(@Named(PARAMTER_ID) String relationName, EPartService partService) {

View File

@ -22,7 +22,7 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService;
*/
@SuppressWarnings("restriction")
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
public boolean canExecute(EPartService partService) {

View File

@ -22,7 +22,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer;
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
public boolean canExecute(EPartService partService) {
@ -36,11 +36,11 @@ public class ZoomHandler {
if(obj instanceof WaveformViewer){
WaveformViewer waveformViewerPart = (WaveformViewer) obj;
int zoomLevel = waveformViewerPart.getZoomLevel();
if("in".equalsIgnoreCase(level))
if("in".equalsIgnoreCase(level)) //$NON-NLS-1$
waveformViewerPart.setZoomLevel(zoomLevel-1);
else if("out".equalsIgnoreCase(level))
else if("out".equalsIgnoreCase(level)) //$NON-NLS-1$
waveformViewerPart.setZoomLevel(zoomLevel+1);
else if("fit".equalsIgnoreCase(level))
else if("fit".equalsIgnoreCase(level)) //$NON-NLS-1$
waveformViewerPart.setZoomFit();
}

View File

@ -32,13 +32,15 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
import org.osgi.service.prefs.PreferencesService;
import com.minres.scviewer.e4.application.Messages;
/**
* The Class StatusBarControl.
*/
public class StatusBarControl {
/** The Constant STATUS_UPDATE. */
public static final String STATUS_UPDATE="StatusUpdate";
public static final String STATUS_UPDATE="StatusUpdate"; //$NON-NLS-1$
/** The model service. */
@Inject EModelService modelService;
@ -194,7 +196,7 @@ public class StatusBarControl {
progressBar.setMaximum(progressBar.getMaximum() + totalWork);
}
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() {
runningTasks--;
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) ---
progressBar.setToolTipText("No background progress running.");
progressBar.setToolTipText(Messages.StatusBarControl_4);
}
}
});

View File

@ -27,22 +27,24 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import com.minres.scviewer.e4.application.Messages;
/**
* The Class WaveStatusBarControl.
*/
public class WaveStatusBarControl extends StatusBarControl {
/** 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. */
public static final String CURSOR_TIME="CursorPosUpdate";
public static final String CURSOR_TIME="CursorPosUpdate"; //$NON-NLS-1$
/** 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. */
public static final String MARKER_DIFF="MarlerDiffUpdate";
public static final String MARKER_DIFF="MarlerDiffUpdate"; //$NON-NLS-1$
/** The model service. */
@Inject
@ -75,7 +77,7 @@ public class WaveStatusBarControl extends StatusBarControl {
super();
this.labelString = labelString;
this.width=width;
content="";
content=""; //$NON-NLS-1$
}
/* (non-Javadoc)
@ -124,10 +126,10 @@ public class WaveStatusBarControl extends StatusBarControl {
@Inject
public WaveStatusBarControl(UISynchronize sync) {
super(sync);
cursorContribution = new TextContributionItem("C:", 80);
markerContribution = new TextContributionItem("M:", 80);
markerDiffContribution = new TextContributionItem("C-M:", 80);
zoomContribution = new TextContributionItem("Z:", 80);
cursorContribution = new TextContributionItem(Messages.WaveStatusBarControl_5, 80);
markerContribution = new TextContributionItem(Messages.WaveStatusBarControl_6, 80);
markerDiffContribution = new TextContributionItem(Messages.WaveStatusBarControl_7, 80);
zoomContribution = new TextContributionItem(Messages.WaveStatusBarControl_8, 80);
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,cursorContribution);
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,markerContribution);
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,markerDiffContribution);
@ -144,13 +146,13 @@ public class WaveStatusBarControl extends StatusBarControl {
if(manager!=null && selection!=null){
switch(selection.size()){
case 0:
manager.setMessage("");
manager.setMessage(""); //$NON-NLS-1$
break;
case 1:
manager.setMessage(selection.getFirstElement().getClass().getSimpleName()+" selected");
manager.setMessage(selection.getFirstElement().getClass().getSimpleName()+Messages.WaveStatusBarControl_10);
break;
default:
manager.setMessage(""+selection.size()+" Elements");
manager.setMessage(""+selection.size()+Messages.WaveStatusBarControl_12); //$NON-NLS-1$
break;
}
}

View File

@ -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:

View File

@ -40,24 +40,18 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.wb.swt.ResourceManager;
import org.eclipse.wb.swt.SWTResourceManager;
import com.minres.scviewer.e4.application.Messages;
/**
* The Class AboutDialog.
*/
public class AboutDialog extends Dialog {
/** The product title. */
private String productTitle=
"\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.0\n";
private String productTitle=Messages.AboutDialog_0;
/** The copyright text. */
private String copyrightText="\nCopyright (c) 2015 MINRES Technologies GmbH and others.\n"+
"\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";
private String copyrightText=Messages.AboutDialog_1;
/**
* Create the dialog.
@ -86,8 +80,8 @@ public class AboutDialog extends Dialog {
composite.setLayout(new GridLayout(2, false));
final Color white=SWTResourceManager.getColor(SWT.COLOR_WHITE);
final Image scviewerLogo=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/SCViewer_logo.png");
final Image minresLogo=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/Minres_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"); //$NON-NLS-1$ //$NON-NLS-2$
Canvas canvas = new Canvas(composite,SWT.NO_REDRAW_RESIZE);
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;
styledText.setStyleRange(styleRange);
///^(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,
// you could use this statement:
// Pattern pattern = Pattern.compile("\\s+", Pattern.CASE_INSENSITIVE);

View File

@ -68,6 +68,7 @@ import com.minres.scviewer.database.IHierNode;
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.IWaveform;
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.provider.TxDbContentProvider;
import com.minres.scviewer.e4.application.provider.TxDbLabelProvider;
@ -79,7 +80,7 @@ import com.minres.scviewer.e4.application.provider.TxDbLabelProvider;
public class DesignBrowser {
/** 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. */
@Inject IEventBroker eventBroker;
@ -124,7 +125,7 @@ public class DesignBrowser {
private PropertyChangeListener treeViewerPCL = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if("CHILDS".equals(evt.getPropertyName())){
if("CHILDS".equals(evt.getPropertyName())){ //$NON-NLS-1$
treeViewer.getTree().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
@ -215,7 +216,7 @@ public class DesignBrowser {
parent.setLayout(new GridLayout(1, false));
nameFilter = new Text(parent, SWT.BORDER);
nameFilter.setMessage("Enter text to filter waveforms");
nameFilter.setMessage(Messages.DesignBrowser_2);
nameFilter.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
@ -237,7 +238,7 @@ public class DesignBrowser {
@Override
public void doubleClick(DoubleClickEvent event) {
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)
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
}
@ -258,14 +259,14 @@ public class DesignBrowser {
toolBar.setBounds(0, 0, 87, 20);
appendItem = new ToolItem(toolBar, SWT.NONE);
appendItem.setToolTipText("Append after");
appendItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_wave.png"));
appendItem.setToolTipText(Messages.DesignBrowser_4);
appendItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_wave.png")); //$NON-NLS-1$ //$NON-NLS-2$
appendItem.setEnabled(false);
appendItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
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)
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
}
@ -273,14 +274,14 @@ public class DesignBrowser {
});
insertItem = new ToolItem(toolBar, SWT.NONE);
insertItem.setToolTipText("Insert before");
insertItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_wave.png"));
insertItem.setToolTipText(Messages.DesignBrowser_8);
insertItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_wave.png")); //$NON-NLS-1$ //$NON-NLS-2$
insertItem.setEnabled(false);
insertItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
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)
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
}
@ -288,8 +289,8 @@ public class DesignBrowser {
new ToolItem(toolBar, SWT.SEPARATOR);
appendAllItem = new ToolItem(toolBar, SWT.NONE);
appendAllItem.setToolTipText("Append all after");
appendAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_all_waves.png"));
appendAllItem.setToolTipText(Messages.DesignBrowser_12);
appendAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_all_waves.png")); //$NON-NLS-1$ //$NON-NLS-2$
appendAllItem.setEnabled(false);
new ToolItem(toolBar, SWT.SEPARATOR);
@ -301,7 +302,7 @@ public class DesignBrowser {
Object oldSel=selectionService.getSelection();
selectionService.setSelection(new StructuredSelection(all));
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)
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
selectionService.setSelection(oldSel);
@ -309,8 +310,8 @@ public class DesignBrowser {
}
});
insertAllItem = new ToolItem(toolBar, SWT.NONE);
insertAllItem.setToolTipText("Insert all before");
insertAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_all_waves.png"));
insertAllItem.setToolTipText(Messages.DesignBrowser_16);
insertAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_all_waves.png")); //$NON-NLS-1$ //$NON-NLS-2$
insertAllItem.setEnabled(false);
insertAllItem.addSelectionListener(new SelectionAdapter() {
@Override
@ -320,7 +321,7 @@ public class DesignBrowser {
Object oldSel=selectionService.getSelection();
selectionService.setSelection(new StructuredSelection(all));
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)
ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx);
selectionService.setSelection(oldSel);
@ -400,13 +401,13 @@ public class DesignBrowser {
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed() &&
!appendAllItem.isDisposed() && !insertAllItem.isDisposed()){
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);
result = runCommand(myHandler, CanExecute.class, "after", true);
result = runCommand(myHandler, CanExecute.class, "after", true); //$NON-NLS-1$
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);
result = runCommand(myHandler, CanExecute.class, "before", true);
result = runCommand(myHandler, CanExecute.class, "before", true); //$NON-NLS-1$
insertAllItem.setEnabled(result instanceof Boolean && (Boolean)result);
}
}
@ -425,7 +426,7 @@ public class DesignBrowser {
* @param s the new search text
*/
public void setSearchText(String s) {
this.searchString = ".*" + s + ".*";
this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
}
/* (non-Javadoc)

View File

@ -10,10 +10,11 @@ import com.minres.scviewer.database.IWaveform;
import com.minres.scviewer.database.IWaveformDb;
import com.minres.scviewer.database.IWaveformEvent;
import com.minres.scviewer.database.RelationType;
import com.minres.scviewer.e4.application.Messages;
public class LoadingWaveformDb implements IWaveformDb {
private final String label = "Database loading...";
private final String label = Messages.LoadingWaveformDb_0;
@Override
public void addPropertyChangeListener(PropertyChangeListener l) {

View File

@ -55,6 +55,7 @@ import org.eclipse.swt.widgets.Tree;
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.ITxAttribute;
import com.minres.scviewer.database.ITxRelation;
import com.minres.scviewer.e4.application.Messages;
import com.minres.scviewer.e4.application.provider.TxPropertiesLabelProvider;
/**
@ -107,7 +108,7 @@ public class TransactionDetails {
parent.setLayout(new GridLayout(1, false));
nameFilter = new Text(parent, SWT.BORDER);
nameFilter.setMessage("Enter text to filter");
nameFilter.setMessage(Messages.TransactionDetails_0);
nameFilter.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
@ -133,7 +134,7 @@ public class TransactionDetails {
tree.setLayoutData(new GridData(GridData.FILL_BOTH));
// Add the name column
col1 = new TreeViewerColumn(treeViewer, SWT.NONE);
col1.getColumn().setText("Name");
col1.getColumn().setText(Messages.TransactionDetails_1);
col1.getColumn().setResizable(true);
col1.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.NAME)));
col1.getColumn().addSelectionListener(new SelectionAdapter() {
@ -144,7 +145,7 @@ public class TransactionDetails {
});
// Add the type column
col2 = new TreeViewerColumn(treeViewer, SWT.NONE);
col2.getColumn().setText("Type");
col2.getColumn().setText(Messages.TransactionDetails_2);
col2.getColumn().setResizable(true);
col2.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.TYPE)));
col2.getColumn().addSelectionListener(new SelectionAdapter() {
@ -155,7 +156,7 @@ public class TransactionDetails {
});
// Add the value column
col3 = new TreeViewerColumn(treeViewer, SWT.NONE);
col3.getColumn().setText("Value");
col3.getColumn().setText(Messages.TransactionDetails_3);
col3.getColumn().setResizable(true);
col3.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(AttributeLabelProvider.VALUE)));
col3.getColumn().addSelectionListener(new SelectionAdapter() {
@ -282,8 +283,8 @@ public class TransactionDetails {
*/
String txToString(ITx tx){
StringBuilder sb = new StringBuilder();
sb.append("tx#").append(tx.getId()).append("[").append(timeToString(tx.getBeginTime())).
append(" - ").append(timeToString(tx.getEndTime())).append("]");
sb.append("tx#").append(tx.getId()).append("[").append(timeToString(tx.getBeginTime())). //$NON-NLS-1$ //$NON-NLS-2$
append(" - ").append(timeToString(tx.getEndTime())).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
return sb.toString();
}
@ -330,7 +331,6 @@ public class TransactionDetails {
* @param e2 the e2
* @return the int
*/
@SuppressWarnings("unchecked")
public int compare(Viewer viewer, Object e1, Object e2) {
int rc = 0;
if(e1 instanceof ITxAttribute && e2 instanceof ITxAttribute){
@ -369,7 +369,7 @@ public class TransactionDetails {
* @param s the new search text
*/
public void setSearchText(String s) {
this.searchString = ".*" + s + ".*";
this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
}
/* (non-Javadoc)
@ -427,12 +427,12 @@ PROPS, /** The attrs. */
*/
public String toString(){
switch(type){
case PROPS: return "Properties";
case ATTRS: return "Attributes";
case IN_REL: return "Incoming relations";
case OUT_REL: return "Outgoing relations";
case PROPS: return Messages.TransactionDetails_10;
case ATTRS: return Messages.TransactionDetails_11;
case IN_REL: return Messages.TransactionDetails_12;
case OUT_REL: return Messages.TransactionDetails_13;
}
return "";
return ""; //$NON-NLS-1$
}
}
@ -476,10 +476,10 @@ PROPS, /** The attrs. */
TreeNode propertyHolder=(TreeNode) element;
if(propertyHolder.type == Type.PROPS){
return new Object[][]{
{"Name", "String", propertyHolder.element.getStream().getFullName()},
{"Type", "String", propertyHolder.element.getGenerator().getName()},
{"Start time", "Time", timeToString(propertyHolder.element.getBeginTime())},
{"End time", "Time", timeToString(propertyHolder.element.getEndTime())}
{Messages.TransactionDetails_1, Messages.TransactionDetails_16, propertyHolder.element.getStream().getFullName()},
{Messages.TransactionDetails_2, Messages.TransactionDetails_16, propertyHolder.element.getGenerator().getName()},
{Messages.TransactionDetails_19, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getBeginTime())},
{Messages.TransactionDetails_21, Messages.TransactionDetails_20, timeToString(propertyHolder.element.getEndTime())}
};
}else if(propertyHolder.type == Type.ATTRS)
return propertyHolder.element.getAttributes().toArray();
@ -561,7 +561,7 @@ PROPS, /** The attrs. */
ITxAttribute attribute = (ITxAttribute) element;
return new StyledString(attribute.getName());
}else if (element instanceof ITxRelation) {
return new StyledString("Relation");
return new StyledString(Messages.TransactionDetails_4);
}else if(element instanceof Object[]){
Object[] elements = (Object[]) element;
return new StyledString(elements[field].toString());
@ -575,7 +575,7 @@ PROPS, /** The attrs. */
Object[] elements = (Object[]) element;
return new StyledString(elements[field].toString());
}else
return new StyledString("");
return new StyledString(""); //$NON-NLS-1$
default:
if (element instanceof ITxAttribute) {
ITxAttribute attribute = (ITxAttribute) element;
@ -586,7 +586,7 @@ PROPS, /** The attrs. */
} else if(element instanceof ITx){
return new StyledString(txToString((ITx) element));
}else
return new StyledString("");
return new StyledString(""); //$NON-NLS-1$
}
}
}

View File

@ -72,6 +72,7 @@ import com.minres.scviewer.database.ui.ICursor;
import com.minres.scviewer.database.ui.IWaveformViewer;
import com.minres.scviewer.database.ui.TrackEntry;
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.util.FileMonitor;
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 {
/** 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. */
public static final String ADD_WAVEFORM = "AddWaveform";
public static final String ADD_WAVEFORM = "AddWaveform"; //$NON-NLS-1$
/** 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. */
protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM";
protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM"; //$NON-NLS-1$
/** 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. */
protected static final String ZOOM_LEVEL = "ZOOM_LEVEL";
protected static final String ZOOM_LEVEL = "ZOOM_LEVEL"; //$NON-NLS-1$
/** 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. */
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$
/** 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. */
WaveformViewerFactory factory = new WaveformViewerFactory();
@ -193,7 +194,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
database.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if ("WAVEFORMS".equals(evt.getPropertyName())) {
if ("WAVEFORMS".equals(evt.getPropertyName())) { //$NON-NLS-1$
myParent.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
@ -236,8 +237,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
checkForUpdates = prefs.getBoolean(PreferenceConstants.DATABASE_RELOAD, true);
filesToLoad = new ArrayList<File>();
persistedState = part.getPersistedState();
Integer files = persistedState.containsKey(DATABASE_FILE + "S")
? Integer.parseInt(persistedState.get(DATABASE_FILE + "S")) : 0;
Integer files = persistedState.containsKey(DATABASE_FILE + "S") //$NON-NLS-1$
? Integer.parseInt(persistedState.get(DATABASE_FILE + "S")) : 0; //$NON-NLS-1$
for (int i = 0; i < files; i++) {
filesToLoad.add(new File(persistedState.get(DATABASE_FILE + i)));
}
@ -245,11 +246,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
loadDatabase(persistedState);
eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[waveformPane.getZoomLevel()]);
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(),
"com.minres.scviewer.e4.application.popupmenu.namecontext");
"com.minres.scviewer.e4.application.popupmenu.namecontext"); //$NON-NLS-1$
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() {
@Override
public void partActivated(MPart part) {
@ -288,7 +289,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
DefaultValuesInitializer initializer = new DefaultValuesInitializer();
HashMap<WaveformColors, RGB> colorPref = new HashMap<>();
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()));
RGB rgb = StringConverter.asRGB(prefValue);
colorPref.put(c, rgb);
@ -303,7 +304,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
*/
protected void loadDatabase(final Map<String, String> state) {
fileMonitor.removeFileChangeListener(this);
Job job = new Job("Database Load Job") {
Job job = new Job(Messages.WaveformViewer_15) {
@Override
protected IStatus run(IProgressMonitor monitor) {
// convert to SubMonitor and set total number of work units
@ -311,7 +312,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
try {
subMonitor.worked(1);
for (File file : filesToLoad) {
subMonitor.setTaskName("Loading "+file.getName());
subMonitor.setTaskName(Messages.WaveformViewer_16+file.getName());
database.load(file);
database.addPropertyChangeListener(waveformPane);
subMonitor.worked(1);
@ -358,8 +359,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
display.asyncExec(new Runnable() {
@Override
public void run() {
if (MessageDialog.openQuestion(display.getActiveShell(), "Database re-load",
"Would you like to reload the database?")) {
if (MessageDialog.openQuestion(display.getActiveShell(), Messages.WaveformViewer_17,
Messages.WaveformViewer_18)) {
Map<String, String> state = new HashMap<>();
saveWaveformViewerState(state);
waveformPane.getStreamList().clear();
@ -387,15 +388,15 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
filesToLoad.add(file);
try {
String ext = getFileExtension(file.getName());
if ("vcd".equals(ext.toLowerCase())) {
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), "txdb")))) {
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), "txdb")));
} else if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), "txlog")))) {
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), "txlog")));
if (Messages.WaveformViewer_19.equals(ext.toLowerCase())) {
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_20)))) {
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_20)));
} else if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_21)))) {
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_21)));
}
} else if ("txdb".equals(ext.toLowerCase()) || "txlog".equals(ext.toLowerCase())) {
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), "vcd")))) {
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), "vcd")));
} else if (Messages.WaveformViewer_20.equals(ext.toLowerCase()) || Messages.WaveformViewer_21.equals(ext.toLowerCase())) {
if (askIfToLoad(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_19)))) {
filesToLoad.add(new File(renameFileExtension(file.getCanonicalPath(), Messages.WaveformViewer_19)));
}
}
} catch (IOException e) { // silently ignore any error
@ -423,7 +424,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
public void saveState(MPart part) {
// save changes
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;
for (File file : filesToLoad) {
persistedState.put(DATABASE_FILE + index, file.getAbsolutePath());
@ -434,7 +435,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
public void saveState(String fileName){
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;
for (File file : filesToLoad) {
persistedState.put(DATABASE_FILE + index, file.getAbsolutePath());
@ -445,7 +446,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
props.putAll(persistedState);
try {
FileOutputStream out = new FileOutputStream(fileName);
props.store(out, "Written by SCViewer");
props.store(out, "Written by SCViewer"); //$NON-NLS-1$
out.close();
} catch (IOException e) {
e.printStackTrace();
@ -473,14 +474,14 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
*/
protected void saveWaveformViewerState(Map<String, String> persistedState) {
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;
for (TrackEntry trackEntry : waveformPane.getStreamList()) {
persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName());
index++;
}
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;
for (ICursor cursor : cursors) {
persistedState.put(SHOWN_CURSOR + index, Long.toString(cursor.getTime()));
@ -496,7 +497,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
* @param state the 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<>();
for (int i = 0; i < waves; 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)
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();
if (cursorLength == cursors.size()) {
for (int i = 0; i < cursorLength; i++) {
@ -567,8 +568,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
* @return true, if successful
*/
protected boolean askIfToLoad(File txFile) {
if (txFile.exists() && MessageDialog.openQuestion(myParent.getDisplay().getActiveShell(), "Database open",
"Would you like to open the adjacent database " + txFile.getName() + " as well?")) {
if (txFile.exists() && MessageDialog.openQuestion(myParent.getDisplay().getActiveShell(), Messages.WaveformViewer_37,
Messages.WaveformViewer_38 + txFile.getName() + Messages.WaveformViewer_39)) {
return true;
}
return false;
@ -584,10 +585,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
protected static String renameFileExtension(String source, String newExt) {
String target;
String currentExt = getFileExtension(source);
if (currentExt.equals("")) {
target = source + "." + newExt;
if (currentExt.equals("")) { //$NON-NLS-1$
target = source + "." + newExt; //$NON-NLS-1$
} 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;
}
@ -599,7 +600,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
* @return the file extension
*/
protected static String getFileExtension(String f) {
String ext = "";
String ext = ""; //$NON-NLS-1$
int i = f.lastIndexOf('.');
if (i > 0 && i < f.length() - 1) {
ext = f.substring(i + 1);

View File

@ -46,6 +46,8 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
colors[WaveformColors.SIGNALZ.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_YELLOW);
colors[WaveformColors.SIGNALX.ordinal()] = SWTResourceManager.getColor(255, 51, 51);
colors[WaveformColors.SIGNALU.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_YELLOW);
colors[WaveformColors.SIGNAL_ANALOG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GREEN);
colors[WaveformColors.SIGNAL_NAN.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED);
colors[WaveformColors.SIGNAL_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE);
colors[WaveformColors.CURSOR.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED);
colors[WaveformColors.CURSOR_DRAG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GRAY);
@ -65,7 +67,7 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer {
store.setDefault(PreferenceConstants.DATABASE_RELOAD, true);
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$
}
}

View File

@ -16,64 +16,64 @@ package com.minres.scviewer.e4.application.preferences;
public class PreferenceConstants {
/** 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. */
public static final String DATABASE_RELOAD="databaseReload";
public static final String DATABASE_RELOAD="databaseReload"; //$NON-NLS-1$
/** 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. */
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. */
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. */
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. */
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. */
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. */
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. */
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. */
public static final String SIGNAL0_COLOR="SIGNAL0_COLOR";
public static final String SIGNAL0_COLOR="SIGNAL0_COLOR"; //$NON-NLS-1$
/** 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. */
public static final String SIGNALZ_COLOR="SIGNALZ_COLOR";
public static final String SIGNALZ_COLOR="SIGNALZ_COLOR"; //$NON-NLS-1$
/** 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. */
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. */
public static final String CURSOR_COLOR="CURSOR_COLOR";
public static final String CURSOR_COLOR="CURSOR_COLOR"; //$NON-NLS-1$
/** 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. */
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. */
public static final String MARKER_COLOR="MARKER_COLOR";
public static final String MARKER_COLOR="MARKER_COLOR"; //$NON-NLS-1$
/** 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$
}

View File

@ -13,6 +13,8 @@ package com.minres.scviewer.e4.application.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import com.minres.scviewer.e4.application.Messages;
/**
* The Class SCViewerPreferencesPage showing the SCViewer top preferences.
@ -32,7 +34,7 @@ public class SCViewerPreferencesPage extends FieldEditorPreferencePage {
@Override
protected void createFieldEditors() {
addField(new BooleanFieldEditor(PreferenceConstants.DATABASE_RELOAD, "Check for changed database",
addField(new BooleanFieldEditor(PreferenceConstants.DATABASE_RELOAD, Messages.SCViewerPreferencesPage_0,
getFieldEditorParent()));
}

View File

@ -14,6 +14,7 @@ import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import com.minres.scviewer.database.ui.WaveformColors;
import com.minres.scviewer.e4.application.Messages;
/**
* The WaveformView preference page to show the colors to use.
@ -34,7 +35,7 @@ public class WaveformPreferencesPage extends FieldEditorPreferencePage {
protected void createFieldEditors() {
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()));
}
}

View File

@ -42,12 +42,12 @@ public class TxDbLabelProvider implements ILabelProvider {
*/
public TxDbLabelProvider() {
super();
loadinDatabase=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database_go.png");
database=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/database.png");
stream=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/stream.png");
folder=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/folder.png");
signal=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/signal.png");
wave=ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/wave.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"); //$NON-NLS-1$ //$NON-NLS-2$
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"); //$NON-NLS-1$ //$NON-NLS-2$
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"); //$NON-NLS-1$ //$NON-NLS-2$
}
/* (non-Javadoc)

View File

@ -80,7 +80,7 @@ public class TxPropertiesLabelProvider implements ITableLabelProvider {
@Override
public String getColumnText(Object element, int columnIndex) {
ITxAttribute attribute = (ITxAttribute) element;
String text = "";
String text = ""; //$NON-NLS-1$
switch (columnIndex) {
case TransactionDetails.COLUMN_FIRST:
text = attribute.getName();

View File

@ -26,7 +26,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
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,
@ -124,7 +126,7 @@ public class ResourceManager extends SWTResourceManager {
*/
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) {
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];
if (cornerDecoratedImageMap == null) {

View File

@ -27,6 +27,8 @@ import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle;
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.
@ -232,7 +234,7 @@ public class SWTResourceManager {
*/
public static Image decorateImage(final Image baseImage, final Image decorator, final int corner) {
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];
if (cornerDecoratedImageMap == null) {

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.e4.ui.workbench.swt.E4Application"/>
<booleanAttribute key="askclear" value="true"/>
<booleanAttribute key="automaticAdd" value="false"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="false"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/SCViewer (restart)"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-com.minres.scviewer.e4.application.product"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -clearPersistedState -data @none"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx4G -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.minres.scviewer.e4.application.product"/>
<stringAttribute key="productFile" value="/com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.product"/>
<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.ibm.icu@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.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.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.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.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.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.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.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.hamcrest.core@default:default,org.junit@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_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:default,com.minres.scviewer.database.text@default:default,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:default,com.minres.scviewer.e4.application@default:default,com.opcoach.e4.preferences@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="true"/>
<booleanAttribute key="usefeatures" value="false"/>
</launchConfiguration>

View File

@ -11,6 +11,7 @@
<module>../com.minres.scviewer.database.sqlite</module>
<module>../com.minres.scviewer.database.text</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.swt</module>
<module>../com.opcoach.e4.preferences</module>

View File

@ -9,7 +9,7 @@
<repository location="http://download.eclipse.org/releases/neon"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.codehaus.groovy24.feature.feature.group" version="2.9.2.xx-201701211811-e46"/>
<unit id="org.codehaus.groovy24.feature.feature.group" version="2.9.3.xx-201806261157-e46"/>
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.6"/>
</location>
</locations>
@ -17,8 +17,7 @@
<arch>x86_64</arch>
<nl>de_DE</nl>
</environment>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 7 [1.7.0_45]"/>
<launcherArgs>
<vmArgs>-Dosgi.requiredJavaVersion=1.6 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgs>
<vmArgs>-Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256 -Xms40m -Xmx2G </vmArgs>
</launcherArgs>
</target>
</target>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="src" path="src"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>

View File

@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
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.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.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=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

View File

@ -1,2 +1,3 @@
eclipse.preferences.version=1
groovy.compiler.level=23
groovy.compiler.level=24
groovy.script.filters=**/*.dsld,y,**/*.gradle,n

View File

@ -19,7 +19,7 @@ Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
org.eclipse.osgi,
org.eclipse.core.expressions;bundle-version="3.4.600",
org.eclipse.jface
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Import-Package: com.google.common.collect
Service-Component: OSGI-INF/component.xml

View File

@ -51,7 +51,7 @@ public class AttributeProperty extends AbstractPropertySection implements ISelec
private final String[] titles = { "Location", "Name", "Type", "Value" };
private ListenerList listeners = new ListenerList();
private ListenerList<ISelectionChangedListener> listeners = new ListenerList<ISelectionChangedListener>();
private ITx iTr;

View File

@ -55,7 +55,7 @@ public class RelatedProperty extends AbstractPropertySection implements ISelecti
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;

View File

@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<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"/>
</classpath>

View File

@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
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.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.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=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

View File

@ -4,7 +4,7 @@ Bundle-Name: Preferences
Bundle-SymbolicName: com.opcoach.e4.preferences;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: OPCOACH
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: javax.inject,
org.eclipse.core.runtime;bundle-version="3.9.0",
org.eclipse.jface;bundle-version="3.9.0",

View File

@ -3,5 +3,4 @@
<plugin>
<extension-point id="e4PreferencePages" name="e4PreferencePages" schema="schema/e4PreferencePages.exsd"/>
<extension-point id="e4PreferenceStoreProvider" name="e4PreferenceStoreProvider" schema="schema/e4PreferenceStoreProvider.exsd"/>
</plugin>