From d970d07048ad5d6315debecdbccbe1283ff0c513 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 9 Jan 2021 10:34:22 +0100 Subject: [PATCH 1/5] make ITxGenerator as stream --- .../database/sqlite/AbstractTxStream.java | 129 ++++++++++++++++++ .../scviewer/database/sqlite/TxGenerator.java | 47 ++++++- .../scviewer/database/sqlite/TxStream.java | 89 +----------- .../database/text/AbstractTxStream.java | 127 +++++++++++++++++ .../scviewer/database/text/TextDbLoader.java | 2 +- .../scviewer/database/text/TxEvent.java | 4 +- .../scviewer/database/text/TxGenerator.java | 31 ++--- .../scviewer/database/text/TxStream.java | 112 +-------------- .../scviewer/database/vcd/VCDSignal.java | 5 + .../minres/scviewer/database/IWaveform.java | 2 + .../scviewer/database/tx/ITxGenerator.java | 6 +- 11 files changed, 333 insertions(+), 221 deletions(-) create mode 100644 plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java create mode 100644 plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java new file mode 100644 index 0000000..ec986a0 --- /dev/null +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java @@ -0,0 +1,129 @@ +/******************************************************************************* + * 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.sqlite; + +import java.sql.SQLException; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.NavigableMap; +import java.util.TreeMap; + +import com.minres.scviewer.database.EventKind; +import com.minres.scviewer.database.HierNode; +import com.minres.scviewer.database.IEvent; +import com.minres.scviewer.database.IWaveform; +import com.minres.scviewer.database.RelationType; +import com.minres.scviewer.database.RelationTypeFactory; +import com.minres.scviewer.database.WaveformType; +import com.minres.scviewer.database.sqlite.db.IDatabase; +import com.minres.scviewer.database.tx.ITx; + +abstract class AbstractTxStream extends HierNode implements IWaveform { + + protected IDatabase database; + + private long streamId; + + private Integer maxConcurrency; + + private TreeMap events; + + private List usedRelationsList; + + public AbstractTxStream(IDatabase database, String name, long streamId) { + super(name); + this.database=database; + this.streamId=streamId; + } + + @Override + public int getWidth() { + if(maxConcurrency==null){ + StringBuilder sb = new StringBuilder(); + sb.append("SELECT MAX(concurrencyLevel) as concurrencyLevel FROM ScvTx where stream="); + sb.append(streamId); + try( + java.sql.Connection connection = database.createConnection(); + java.sql.Statement statement = connection.createStatement(); + java.sql.ResultSet resultSet = statement.executeQuery(sb.toString()); + ) { + while (resultSet.next()) { + if(maxConcurrency==null) maxConcurrency=0; + Object value = resultSet.getObject("concurrencyLevel"); + if(value!=null) + maxConcurrency=(Integer) value; + } + } catch (SQLException e) { + if(maxConcurrency==null) maxConcurrency=0; + } + maxConcurrency+=1; + } + return maxConcurrency; + } + + @Override + public NavigableMap getEvents(){ + if(events==null){ + events=new TreeMap<>(); + for(Entry entry:getTransactions().entrySet()){ + putEvent(new TxEvent(EventKind.BEGIN, entry.getValue())); + putEvent(new TxEvent(EventKind.END, entry.getValue())); + } + } + return events; + } + + private void putEvent(TxEvent ev){ + Long time = ev.getTime(); + if(events.containsKey(time)) { + IEvent[] oldV = events.get(time); + IEvent[] newV = new IEvent[oldV.length+1]; + System.arraycopy(oldV, 0, newV, 0, oldV.length); + newV[oldV.length]=ev; + events.put(time, newV); + } else { + events.put(time, new IEvent[] {ev}); + } + } + + protected abstract Map getTransactions(); + + @Override + public IEvent[] getEventsAtTime(Long time) { + return getEvents().get(time); + } + + public void setRelationTypeList(List usedRelationsList){ + this.usedRelationsList=usedRelationsList; + } + + public RelationType getRelationType(String name) { + RelationType relType=RelationTypeFactory.create(name); + if(!usedRelationsList.contains(relType)) usedRelationsList.add(relType); + return relType; + } + + @Override + public IEvent[] getEventsBeforeTime(Long time) { + Entry e = events.floorEntry(time); + if(e==null) + return new IEvent[]{}; + else + return events.floorEntry(time).getValue(); + } + + @Override + public WaveformType getType() { + return WaveformType.TRANSACTION; + } + +} diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java index 08cc6f3..1b5dd38 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java @@ -10,17 +10,30 @@ *******************************************************************************/ package com.minres.scviewer.database.sqlite; +import java.beans.IntrospectionException; +import java.lang.reflect.InvocationTargetException; +import java.sql.SQLException; +import java.util.Map; +import java.util.TreeMap; + import com.minres.scviewer.database.IWaveform; +import com.minres.scviewer.database.sqlite.db.IDatabase; +import com.minres.scviewer.database.sqlite.db.SQLiteDatabaseSelectHandler; import com.minres.scviewer.database.sqlite.tables.ScvGenerator; +import com.minres.scviewer.database.sqlite.tables.ScvTx; +import com.minres.scviewer.database.tx.ITx; import com.minres.scviewer.database.tx.ITxGenerator; -public class TxGenerator implements ITxGenerator { +public class TxGenerator extends AbstractTxStream implements ITxGenerator { - private IWaveform stream; + private TxStream stream; private ScvGenerator scvGenerator; - public TxGenerator(IWaveform stream, ScvGenerator scvGenerator) { + private TreeMap transactions; + + public TxGenerator(IDatabase database, TxStream stream, ScvGenerator scvGenerator) { + super(database, scvGenerator.getName(), stream.getId()); this.stream=stream; this.scvGenerator=scvGenerator; } @@ -40,4 +53,32 @@ public class TxGenerator implements ITxGenerator { return scvGenerator.getName(); } + @Override + public boolean isSame(IWaveform other) { + return(other instanceof TxGenerator && this.getId().equals(other.getId())); + } + + @Override + public String getKind() { + return stream.getKind(); + } + + @Override + protected Map getTransactions() { + if(transactions==null){ + transactions = new TreeMap<>(); + SQLiteDatabaseSelectHandler handler = new SQLiteDatabaseSelectHandler<>(ScvTx.class, database, + "stream="+stream.getId()+" and generator="+scvGenerator.getId()); + try { + for(ScvTx scvTx:handler.selectObjects()){ + transactions.put(scvTx.getId(), new Tx(database, (TxStream) stream, this, scvTx)); + } + } catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException + | InvocationTargetException | SQLException | IntrospectionException e) { + e.printStackTrace(); + } + } + return transactions; + } + } diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java index 324825b..dbbf6ab 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java @@ -35,9 +35,7 @@ import com.minres.scviewer.database.sqlite.tables.ScvTx; import com.minres.scviewer.database.tx.ITx; import com.minres.scviewer.database.tx.ITxGenerator; -public class TxStream extends HierNode implements IWaveform { - - private IDatabase database; +public class TxStream extends AbstractTxStream { private String fullName; @@ -47,15 +45,8 @@ public class TxStream extends HierNode implements IWaveform { private TreeMap transactions; - private Integer maxConcurrency; - - private TreeMap events; - - private List usedRelationsList; - public TxStream(IDatabase database, ScvStream scvStream) { - super(scvStream.getName()); - this.database=database; + super(database, scvStream.getName(), scvStream.getId()); fullName=scvStream.getName(); this.scvStream=scvStream; } @@ -77,7 +68,7 @@ public class TxStream extends HierNode implements IWaveform { generators=new TreeMap<>(); try { for(ScvGenerator scvGenerator:handler.selectObjects()){ - generators.put(scvGenerator.getId(), new TxGenerator(this, scvGenerator)); + generators.put(scvGenerator.getId(), new TxGenerator(database, this, scvGenerator)); } } catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException | InvocationTargetException | SQLException | IntrospectionException e) { @@ -87,56 +78,6 @@ public class TxStream extends HierNode implements IWaveform { return new ArrayList<>(generators.values()); } - @Override - public int getWidth() { - if(maxConcurrency==null){ - StringBuilder sb = new StringBuilder(); - sb.append("SELECT MAX(concurrencyLevel) as concurrencyLevel FROM ScvTx where stream="); - sb.append(scvStream.getId()); - try( - java.sql.Connection connection = database.createConnection(); - java.sql.Statement statement = connection.createStatement(); - java.sql.ResultSet resultSet = statement.executeQuery(sb.toString()); - ) { - while (resultSet.next()) { - if(maxConcurrency==null) maxConcurrency=0; - Object value = resultSet.getObject("concurrencyLevel"); - if(value!=null) - maxConcurrency=(Integer) value; - } - } catch (SQLException e) { - if(maxConcurrency==null) maxConcurrency=0; - } - maxConcurrency+=1; - } - return maxConcurrency; - } - - @Override - public NavigableMap getEvents(){ - if(events==null){ - events=new TreeMap<>(); - for(Entry entry:getTransactions().entrySet()){ - putEvent(new TxEvent(EventKind.BEGIN, entry.getValue())); - putEvent(new TxEvent(EventKind.END, entry.getValue())); - } - } - return events; - } - - private void putEvent(TxEvent ev){ - Long time = ev.getTime(); - if(events.containsKey(time)) { - IEvent[] oldV = events.get(time); - IEvent[] newV = new IEvent[oldV.length+1]; - System.arraycopy(oldV, 0, newV, 0, oldV.length); - newV[oldV.length]=ev; - events.put(time, newV); - } else { - events.put(time, new IEvent[] {ev}); - } - } - protected Map getTransactions() { if(transactions==null){ if(generators==null) getGenerators(); @@ -160,33 +101,13 @@ public class TxStream extends HierNode implements IWaveform { return getEvents().get(time); } - public void setRelationTypeList(List usedRelationsList){ - this.usedRelationsList=usedRelationsList; - } - - public RelationType getRelationType(String name) { - RelationType relType=RelationTypeFactory.create(name); - if(!usedRelationsList.contains(relType)) usedRelationsList.add(relType); - return relType; - } - @Override public boolean isSame(IWaveform other) { return(other instanceof TxStream && this.getId().equals(other.getId())); } @Override - public IEvent[] getEventsBeforeTime(Long time) { - Entry e = events.floorEntry(time); - if(e==null) - return new IEvent[]{}; - else - return events.floorEntry(time).getValue(); + public String getKind() { + return scvStream.getKind(); } - - @Override - public WaveformType getType() { - return WaveformType.TRANSACTION; - } - } diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java new file mode 100644 index 0000000..9c9e9b5 --- /dev/null +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright (c) 2012 IT Just working. + * 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: + * IT Just working - initial API and implementation + *******************************************************************************/ +package com.minres.scviewer.database.text; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map.Entry; +import java.util.NavigableMap; +import java.util.TreeMap; + +import com.minres.scviewer.database.EventKind; +import com.minres.scviewer.database.HierNode; +import com.minres.scviewer.database.IEvent; +import com.minres.scviewer.database.IWaveform; +import com.minres.scviewer.database.WaveformType; +import com.minres.scviewer.database.tx.ITxEvent; +import com.minres.scviewer.database.tx.ITxGenerator; + +abstract class AbstractTxStream extends HierNode implements IWaveform { + + private Long id; + + protected TextDbLoader loader; + + TreeMap events = new TreeMap<>(); + + private int maxConcurrency = 0; + + private int concurrency = 0; + + boolean concurrencyCalculated = false; + + public AbstractTxStream(TextDbLoader loader, Long id, String name) { + super(name); + this.loader=loader; + this.id=id; + } + + void setConcurrency(int concurrency) { + this.concurrency = concurrency; + if(concurrency>maxConcurrency) + maxConcurrency = concurrency; + } + + int getConcurrency() { + return this.concurrency; + } + + + @Override + public int getWidth() { + return maxConcurrency; + } + + public void addEvent(ITxEvent evt) { + if(!events.containsKey(evt.getTime())) + events.put(evt.getTime(), new IEvent[] {evt}); + else { + IEvent[] evts = events.get(evt.getTime()); + IEvent[] newEvts = Arrays.copyOf(evts, evts.length+1); + newEvts[evts.length]=evt; + events.put(evt.getTime(), newEvts); + } + } + + @Override + public NavigableMap getEvents() { + if(!concurrencyCalculated) calculateConcurrency(); + return events; + } + + @Override + public IEvent[] getEventsAtTime(Long time) { + if(!concurrencyCalculated) calculateConcurrency(); + return events.get(time); + } + + @Override + public IEvent[] getEventsBeforeTime(Long time) { + if(!concurrencyCalculated) + calculateConcurrency(); + Entry e = events.floorEntry(time); + if(e==null) + return new IEvent[] {}; + else + return events.floorEntry(time).getValue(); + } + + @Override + public WaveformType getType() { + return WaveformType.TRANSACTION; + } + + @Override + public Long getId() { + return id; + } + + synchronized void calculateConcurrency() { + if(concurrencyCalculated) return; + ArrayList rowendtime = new ArrayList<>(); + events.entrySet().stream().forEach( entry -> { + IEvent[] values = entry.getValue(); + Arrays.asList(values).stream().filter(e->e.getKind()==EventKind.BEGIN).forEach(evt -> { + Tx tx = (Tx) ((TxEvent)evt).getTransaction(); + int rowIdx = 0; + for(; rowIdxtx.getBeginTime(); rowIdx++); + if(rowendtime.size()<=rowIdx) + rowendtime.add(tx.getEndTime()); + else + rowendtime.set(rowIdx, tx.getEndTime()); + tx.setConcurrencyIndex(rowIdx); + }); + }); + concurrencyCalculated=true; + } + +} diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java index e8cdd75..0b6d9c0 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java @@ -318,7 +318,7 @@ public class TextDbLoader implements IWaveformDbLoader{ if ((matcher.matches())) { Long id = Long.parseLong(matcher.group(1)); TxStream stream=loader.txStreams.get(Long.parseLong(matcher.group(3))); - generator=new TxGenerator(id, stream, matcher.group(2)); + generator=new TxGenerator(loader, id, matcher.group(2), stream); loader.txGenerators.put(id, generator); } } else if("begin_attribute".equals(tokens[0])){ diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java index c4c977d..ad57e01 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java @@ -11,9 +11,9 @@ class TxEvent implements ITxEvent { final EventKind kind; - final Long transaction; + final long transaction; - final Long time; + final long time; TxEvent(TextDbLoader loader, EventKind kind, Long transaction, Long time) { this.loader=loader; diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java index 662fd80..dc55be7 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java @@ -13,43 +13,32 @@ package com.minres.scviewer.database.text; import java.util.ArrayList; import java.util.List; -import com.minres.scviewer.database.HierNode; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.tx.ITxGenerator; -class TxGenerator extends HierNode implements ITxGenerator { +class TxGenerator extends AbstractTxStream implements ITxGenerator { - Long id; - - IWaveform stream; + TxStream stream; - Boolean active = false; - List beginAttrs = new ArrayList<>(); List endAttrs= new ArrayList<>(); - TxGenerator(Long id, TxStream stream, String name){ - super(name, stream); - this.id=id; + TxGenerator(TextDbLoader loader, Long id, String name, TxStream stream){ + super(loader, id, name); this.stream=stream; } - @Override - public Long getId() { - return id; - } - @Override public IWaveform getStream(){ return stream; } @Override - public String getName() { - return name; + public boolean isSame(IWaveform other) { + return(other instanceof TxGenerator && this.getId().equals(other.getId())); } - + public List getBeginAttrs() { return beginAttrs; } @@ -57,7 +46,9 @@ class TxGenerator extends HierNode implements ITxGenerator { public List getEndAttrs() { return endAttrs; } - - Boolean isActive() {return active;} + @Override + public String getKind() { + return stream.getKind(); + } } diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java index 344a545..c0ab7d0 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java @@ -10,85 +10,16 @@ *******************************************************************************/ package com.minres.scviewer.database.text; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map.Entry; -import java.util.NavigableMap; -import java.util.TreeMap; - -import com.minres.scviewer.database.EventKind; -import com.minres.scviewer.database.HierNode; -import com.minres.scviewer.database.IEvent; import com.minres.scviewer.database.IWaveform; -import com.minres.scviewer.database.WaveformType; -import com.minres.scviewer.database.tx.ITxEvent; -import com.minres.scviewer.database.tx.ITxGenerator; -class TxStream extends HierNode implements IWaveform { - - private Long id; - - private TextDbLoader loader; +class TxStream extends AbstractTxStream { final String kind; - private int maxConcurrency = 0; - - private int concurrency = 0; - - boolean concurrencyCalculated = false; - - void setConcurrency(int concurrency) { - this.concurrency = concurrency; - if(concurrency>maxConcurrency) - maxConcurrency = concurrency; - } - - int getConcurrency() { - return this.concurrency; - } - - TreeMap events = new TreeMap<>(); - TxStream(TextDbLoader loader, Long id, String name, String kind){ - super(name); - this.id=id; - this.loader=loader; + super(loader, id, name); this.kind=kind; } - - List getGenerators(){ - return new ArrayList<>(loader.txGenerators.values()); - } - - @Override - public int getWidth() { - return maxConcurrency; - } - - public void addEvent(ITxEvent evt) { - if(!events.containsKey(evt.getTime())) - events.put(evt.getTime(), new IEvent[] {evt}); - else { - IEvent[] evts = events.get(evt.getTime()); - IEvent[] newEvts = Arrays.copyOf(evts, evts.length+1); - newEvts[evts.length]=evt; - events.put(evt.getTime(), newEvts); - } - } - - @Override - public NavigableMap getEvents() { - if(!concurrencyCalculated) calculateConcurrency(); - return events; - } - - @Override - public IEvent[] getEventsAtTime(Long time) { - if(!concurrencyCalculated) calculateConcurrency(); - return events.get(time); - } @Override public boolean isSame(IWaveform other) { @@ -96,43 +27,8 @@ class TxStream extends HierNode implements IWaveform { } @Override - public IEvent[] getEventsBeforeTime(Long time) { - if(!concurrencyCalculated) - calculateConcurrency(); - Entry e = events.floorEntry(time); - if(e==null) - return new IEvent[] {}; - else - return events.floorEntry(time).getValue(); - } - - @Override - public WaveformType getType() { - return WaveformType.TRANSACTION; - } - - @Override - public Long getId() { - return id; - } - - synchronized void calculateConcurrency() { - if(concurrencyCalculated) return; - ArrayList rowendtime = new ArrayList<>(); - events.entrySet().stream().forEach( entry -> { - IEvent[] values = entry.getValue(); - Arrays.asList(values).stream().filter(e->e.getKind()==EventKind.BEGIN).forEach(evt -> { - Tx tx = (Tx) ((TxEvent)evt).getTransaction(); - int rowIdx = 0; - for(; rowIdxtx.getBeginTime(); rowIdx++); - if(rowendtime.size()<=rowIdx) - rowendtime.add(tx.getEndTime()); - else - rowendtime.set(rowIdx, tx.getEndTime()); - tx.setConcurrencyIndex(rowIdx); - }); - }); - concurrencyCalculated=true; + public String getKind() { + return kind; } } diff --git a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java index 78c8863..378cccf 100644 --- a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java +++ b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java @@ -113,4 +113,9 @@ public class VCDSignal extends HierNode implements IWaveform { return width; } + @Override + public String getKind() { + return "signal"; + } + } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java index ee7298f..85856a3 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java @@ -26,6 +26,8 @@ public interface IWaveform extends IHierNode { public WaveformType getType(); + public String getKind(); + public int getWidth(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java index 424051f..7226b0c 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java @@ -12,8 +12,8 @@ package com.minres.scviewer.database.tx; import com.minres.scviewer.database.IWaveform; -public interface ITxGenerator { - public Long getId(); +public interface ITxGenerator extends IWaveform { + public IWaveform getStream(); - public String getName(); + } From eb64cc60c57ff6146ffc388b21ce0d11e55785bd Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 9 Jan 2021 12:43:02 +0100 Subject: [PATCH 2/5] fix copyright header, javadoc, and warnings --- .../scviewer/database/sqlite/TxGenerator.java | 1 + .../scviewer/database/sqlite/TxStream.java | 7 - .../db/SQLiteDatabaseSelectHandler.java | 6 +- .../database/text/AbstractTxStream.java | 130 ++++-- .../scviewer/database/text/ScvRelation.java | 34 +- .../minres/scviewer/database/text/ScvTx.java | 59 ++- .../scviewer/database/text/TextDbLoader.java | 421 ++++++++++++------ .../com/minres/scviewer/database/text/Tx.java | 161 +++++-- .../scviewer/database/text/TxAttribute.java | 48 +- .../database/text/TxAttributeType.java | 50 ++- .../scviewer/database/text/TxEvent.java | 74 ++- .../scviewer/database/text/TxGenerator.java | 74 ++- .../scviewer/database/text/TxRelation.java | 40 +- .../scviewer/database/text/TxStream.java | 78 +++- .../build.properties | 2 +- .../scviewer/database/AssociationType.java | 14 +- .../minres/scviewer/database/BitValue.java | 171 ++++--- .../minres/scviewer/database/BitVector.java | 133 ++++-- .../minres/scviewer/database/DataType.java | 54 ++- .../minres/scviewer/database/DoubleVal.java | 39 +- .../minres/scviewer/database/EventKind.java | 21 +- .../minres/scviewer/database/HierNode.java | 104 ++++- .../scviewer/database/IDerivedWaveform.java | 5 + .../com/minres/scviewer/database/IEvent.java | 31 +- .../minres/scviewer/database/IHierNode.java | 23 +- .../minres/scviewer/database/IWaveform.java | 56 ++- .../minres/scviewer/database/IWaveformDb.java | 49 +- .../scviewer/database/IWaveformDbFactory.java | 10 +- .../scviewer/database/IWaveformDbLoader.java | 65 ++- .../database/InputFormatException.java | 9 +- .../scviewer/database/RelationType.java | 54 ++- .../database/RelationTypeFactory.java | 38 +- .../scviewer/database/WaveformType.java | 21 +- .../database/internal/WaveformDb.java | 148 ++++-- .../database/internal/WaveformDbFactory.java | 14 +- .../com/minres/scviewer/database/tx/ITx.java | 66 ++- .../scviewer/database/tx/ITxAttribute.java | 11 +- .../database/tx/ITxAttributeType.java | 23 +- .../minres/scviewer/database/tx/ITxEvent.java | 19 +- .../scviewer/database/tx/ITxGenerator.java | 10 +- .../scviewer/database/tx/ITxRelation.java | 24 +- 41 files changed, 1856 insertions(+), 541 deletions(-) diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java index 1b5dd38..bad29aa 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java @@ -36,6 +36,7 @@ public class TxGenerator extends AbstractTxStream implements ITxGenerator { super(database, scvGenerator.getName(), stream.getId()); this.stream=stream; this.scvGenerator=scvGenerator; + stream.addChild(this); } @Override diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java index dbbf6ab..0d821ba 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java @@ -16,17 +16,10 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.NavigableMap; import java.util.TreeMap; -import com.minres.scviewer.database.EventKind; -import com.minres.scviewer.database.HierNode; import com.minres.scviewer.database.IEvent; import com.minres.scviewer.database.IWaveform; -import com.minres.scviewer.database.RelationType; -import com.minres.scviewer.database.RelationTypeFactory; -import com.minres.scviewer.database.WaveformType; import com.minres.scviewer.database.sqlite.db.IDatabase; import com.minres.scviewer.database.sqlite.db.SQLiteDatabaseSelectHandler; import com.minres.scviewer.database.sqlite.tables.ScvGenerator; diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java index 6b92957..17d861b 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java @@ -77,7 +77,6 @@ public class SQLiteDatabaseSelectHandler extends AbstractDatabaseHandler { * @throws InvocationTargetException */ public synchronized List selectObjects() throws SQLException, - SecurityException, IllegalArgumentException, InstantiationException, IllegalAccessException, IntrospectionException, InvocationTargetException { @@ -116,12 +115,11 @@ public class SQLiteDatabaseSelectHandler extends AbstractDatabaseHandler { * @throws InvocationTargetException */ private List createObjects(ResultSet resultSet) - throws SecurityException, IllegalArgumentException, - SQLException, InstantiationException, + throws SQLException, InstantiationException, IllegalAccessException, IntrospectionException, InvocationTargetException { - List list = new ArrayList(); + List list = new ArrayList<>(); while (resultSet.next()) { diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java index 9c9e9b5..425e607 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/AbstractTxStream.java @@ -1,5 +1,6 @@ /******************************************************************************* - * Copyright (c) 2012 IT Just working. + * Copyright (c) 2012 IT Just working + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -12,7 +13,6 @@ package com.minres.scviewer.database.text; import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import java.util.Map.Entry; import java.util.NavigableMap; import java.util.TreeMap; @@ -23,105 +23,137 @@ import com.minres.scviewer.database.IEvent; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.WaveformType; import com.minres.scviewer.database.tx.ITxEvent; -import com.minres.scviewer.database.tx.ITxGenerator; +/** + * The Class AbstractTxStream. + */ abstract class AbstractTxStream extends HierNode implements IWaveform { + /** The id. */ private Long id; - + + /** The loader. */ protected TextDbLoader loader; - + + /** The events. */ TreeMap events = new TreeMap<>(); - private int maxConcurrency = 0; - - private int concurrency = 0; - + /** The concurrency calculated. */ boolean concurrencyCalculated = false; - + + /** + * Instantiates a new abstract tx stream. + * + * @param loader the loader + * @param id the id + * @param name the name + */ public AbstractTxStream(TextDbLoader loader, Long id, String name) { super(name); - this.loader=loader; - this.id=id; - } - - void setConcurrency(int concurrency) { - this.concurrency = concurrency; - if(concurrency>maxConcurrency) - maxConcurrency = concurrency; - } - - int getConcurrency() { - return this.concurrency; - } - - - @Override - public int getWidth() { - return maxConcurrency; + this.loader = loader; + this.id = id; } + /** + * Adds the event. + * + * @param evt the evt + */ public void addEvent(ITxEvent evt) { - if(!events.containsKey(evt.getTime())) - events.put(evt.getTime(), new IEvent[] {evt}); + if (!events.containsKey(evt.getTime())) + events.put(evt.getTime(), new IEvent[] { evt }); else { IEvent[] evts = events.get(evt.getTime()); - IEvent[] newEvts = Arrays.copyOf(evts, evts.length+1); - newEvts[evts.length]=evt; + IEvent[] newEvts = Arrays.copyOf(evts, evts.length + 1); + newEvts[evts.length] = evt; events.put(evt.getTime(), newEvts); } } - + + /** + * Gets the events. + * + * @return the events + */ @Override public NavigableMap getEvents() { - if(!concurrencyCalculated) calculateConcurrency(); + if (!concurrencyCalculated) + calculateConcurrency(); return events; } + /** + * Gets the events at time. + * + * @param time the time + * @return the events at time + */ @Override public IEvent[] getEventsAtTime(Long time) { - if(!concurrencyCalculated) calculateConcurrency(); + if (!concurrencyCalculated) + calculateConcurrency(); return events.get(time); } - + + /** + * Gets the events before time. + * + * @param time the time + * @return the events before time + */ @Override public IEvent[] getEventsBeforeTime(Long time) { - if(!concurrencyCalculated) + if (!concurrencyCalculated) calculateConcurrency(); - Entry e = events.floorEntry(time); - if(e==null) - return new IEvent[] {}; - else - return events.floorEntry(time).getValue(); + Entry e = events.floorEntry(time); + if (e == null) + return new IEvent[] {}; + else + return events.floorEntry(time).getValue(); } + /** + * Gets the type. + * + * @return the type + */ @Override public WaveformType getType() { return WaveformType.TRANSACTION; } + /** + * Gets the id. + * + * @return the id + */ @Override public Long getId() { return id; } + /** + * Calculate concurrency. + */ synchronized void calculateConcurrency() { - if(concurrencyCalculated) return; + if (concurrencyCalculated) + return; ArrayList rowendtime = new ArrayList<>(); - events.entrySet().stream().forEach( entry -> { + events.entrySet().stream().forEach(entry -> { IEvent[] values = entry.getValue(); - Arrays.asList(values).stream().filter(e->e.getKind()==EventKind.BEGIN).forEach(evt -> { - Tx tx = (Tx) ((TxEvent)evt).getTransaction(); + Arrays.asList(values).stream().filter(e -> e.getKind() == EventKind.BEGIN).forEach(evt -> { + Tx tx = (Tx) ((TxEvent) evt).getTransaction(); int rowIdx = 0; - for(; rowIdxtx.getBeginTime(); rowIdx++); - if(rowendtime.size()<=rowIdx) + for (; rowIdx < rowendtime.size() && rowendtime.get(rowIdx) > tx.getBeginTime(); rowIdx++) + ; + if (rowendtime.size() <= rowIdx) rowendtime.add(tx.getEndTime()); else rowendtime.set(rowIdx, tx.getEndTime()); tx.setConcurrencyIndex(rowIdx); }); }); - concurrencyCalculated=true; + concurrencyCalculated = true; } } diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvRelation.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvRelation.java index de07918..3c31980 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvRelation.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvRelation.java @@ -1,21 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2020 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.text; import java.io.Serializable; import com.minres.scviewer.database.RelationType; +/** + * The Class ScvRelation. + */ class ScvRelation implements Serializable { - /** - * - */ + + /** The Constant serialVersionUID. */ private static final long serialVersionUID = -347668857680574140L; + /** The source. */ final long source; - + + /** The target. */ final long target; - + + /** The relation type. */ final RelationType relationType; - + + /** + * Instantiates a new scv relation. + * + * @param relationType the relation type + * @param source the source + * @param target the target + */ public ScvRelation(RelationType relationType, long source, long target) { this.source = source; this.target = target; diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvTx.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvTx.java index 92498f2..f94d609 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvTx.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/ScvTx.java @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2012 IT Just working. + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -16,32 +17,54 @@ import java.util.List; import com.minres.scviewer.database.tx.ITxAttribute; -class ScvTx implements Serializable{ - - /** - * - */ +/** + * The Class ScvTx. + */ +class ScvTx implements Serializable { + + /** The Constant serialVersionUID. */ private static final long serialVersionUID = -855200240003328221L; + /** The id. */ final long id; - + + /** The generator id. */ final long generatorId; + /** The stream id. */ final long streamId; - + + /** The begin time. */ long beginTime; - + + /** The end time. */ long endTime; - + + /** The attributes. */ final List attributes = new ArrayList<>(); - - ScvTx(long id, long streamId, long generatorId, long begin){ - this.id=id; - this.streamId=streamId; - this.generatorId=generatorId; - this.beginTime=begin; - this.endTime=begin; + + /** + * Instantiates a new scv tx. + * + * @param id the id + * @param streamId the stream id + * @param generatorId the generator id + * @param begin the begin + */ + ScvTx(long id, long streamId, long generatorId, long begin) { + this.id = id; + this.streamId = streamId; + this.generatorId = generatorId; + this.beginTime = begin; + this.endTime = begin; + } + + /** + * Gets the id. + * + * @return the id + */ + Long getId() { + return id; } - - Long getId() {return id;} } diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java index 0b6d9c0..df575bc 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.java @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2012 IT Just working. + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -47,101 +48,128 @@ import com.minres.scviewer.database.RelationType; import com.minres.scviewer.database.RelationTypeFactory; import com.minres.scviewer.database.tx.ITx; -public class TextDbLoader implements IWaveformDbLoader{ +/** + * The Class TextDbLoader. + */ +public class TextDbLoader implements IWaveformDbLoader { - private Long maxTime=0L; + /** The max time. */ + private Long maxTime = 0L; - DB mapDb=null; - - final List attrValues = new ArrayList<>(); + /** The map db. */ + DB mapDb = null; + /** The attr values. */ + final List attrValues = new ArrayList<>(); + + /** The relation types. */ final Map relationTypes = UnifiedMap.newMap(); - - final Map txStreams = UnifiedMap.newMap(); - - final Map txGenerators = UnifiedMap.newMap(); - - Map transactions = null; - final Map attributeTypes = UnifiedMap.newMap(); + /** The tx streams. */ + final Map txStreams = UnifiedMap.newMap(); + /** The tx generators. */ + final Map txGenerators = UnifiedMap.newMap(); + + /** The transactions. */ + Map transactions = null; + + /** The attribute types. */ + final Map attributeTypes = UnifiedMap.newMap(); + + /** The relations in. */ final HashMultimap relationsIn = HashMultimap.create(); + /** The relations out. */ final HashMultimap relationsOut = HashMultimap.create(); - HashMap txCache = new HashMap<>(); + /** The tx cache. */ + HashMap txCache = new HashMap<>(); - List threads = new ArrayList<>(); - - @Override + /** The threads. */ + List threads = new ArrayList<>(); + + /** + * Gets the max time. + * + * @return the max time + */ + @Override public Long getMaxTime() { return maxTime; } + /** + * Gets the all waves. + * + * @return the all waves + */ @Override public Collection getAllWaves() { return new ArrayList<>(txStreams.values()); } + /** The Constant x. */ static final byte[] x = "scv_tr_stream".getBytes(); + /** + * Load. + * + * @param db the db + * @param file the file + * @return true, if successful + * @throws InputFormatException the input format exception + */ @SuppressWarnings("unchecked") @Override - public boolean load(IWaveformDb db, File file) throws InputFormatException { + public boolean load(IWaveformDb db, File file) throws InputFormatException { dispose(); - if(file.isDirectory() || !file.exists()) return false; + if (file.isDirectory() || !file.exists()) + return false; TextDbParser parser = new TextDbParser(this); boolean gzipped = isGzipped(file); try { - if(!isTxfile(gzipped?new GZIPInputStream(new FileInputStream(file)):new FileInputStream(file))) - return false; - } catch(Exception e) { + if (!isTxfile(gzipped ? new GZIPInputStream(new FileInputStream(file)) : new FileInputStream(file))) + return false; + } catch (Exception e) { throw new InputFormatException(); } - - if(file.length() < 75000000*(gzipped?1:10) || "memory".equals(System.getProperty("ScvBackingDB", "file"))) - mapDb = DBMaker - .memoryDirectDB() - .allocateStartSize(512l*1024l*1024l) - .allocateIncrement(128l*1024l*1024l) - .cleanerHackEnable() - .make(); + + if (file.length() < 75000000 * (gzipped ? 1 : 10) + || "memory".equals(System.getProperty("ScvBackingDB", "file"))) + mapDb = DBMaker.memoryDirectDB().allocateStartSize(512l * 1024l * 1024l) + .allocateIncrement(128l * 1024l * 1024l).cleanerHackEnable().make(); else { File mapDbFile; try { - mapDbFile = File.createTempFile("."+file.getName(), ".mapdb", null /*file.parentFile*/); + mapDbFile = File.createTempFile("." + file.getName(), ".mapdb", null /* file.parentFile */); Files.delete(Paths.get(mapDbFile.getPath())); } catch (IOException e1) { return false; } - mapDb = DBMaker - .fileDB(mapDbFile) - .fileMmapEnable() // Always enable mmap - .fileMmapEnableIfSupported() - .fileMmapPreclearDisable() - .allocateStartSize(512l*1024l*1024l) - .allocateIncrement(128l*1024l*1024l) - .cleanerHackEnable() - .make(); + mapDb = DBMaker.fileDB(mapDbFile).fileMmapEnable() // Always enable mmap + .fileMmapEnableIfSupported().fileMmapPreclearDisable().allocateStartSize(512l * 1024l * 1024l) + .allocateIncrement(128l * 1024l * 1024l).cleanerHackEnable().make(); mapDbFile.deleteOnExit(); } try { - parser.txSink = mapDb.treeMap("transactions", Serializer.LONG,Serializer.JAVA).createFromSink(); - parser.parseInput(gzipped?new GZIPInputStream(new FileInputStream(file)):new FileInputStream(file)); + parser.txSink = mapDb.treeMap("transactions", Serializer.LONG, Serializer.JAVA).createFromSink(); + parser.parseInput(gzipped ? new GZIPInputStream(new FileInputStream(file)) : new FileInputStream(file)); transactions = parser.txSink.create(); - } catch(IllegalArgumentException|ArrayIndexOutOfBoundsException e) { - } catch(Exception e) { - System.out.println("---->>> Exception "+e.toString()+" caught while loading database"); + } catch (IllegalArgumentException | ArrayIndexOutOfBoundsException e) { + } catch (Exception e) { + System.out.println("---->>> Exception " + e.toString() + " caught while loading database"); e.printStackTrace(); return false; } - for(TxStream stream:txStreams.values()) { + for (TxStream stream : txStreams.values()) { Thread t = new Thread() { @Override public void run() { try { - stream.calculateConcurrency(); - } catch (Exception e) {/* don't let exceptions bubble up */ } + stream.calculateConcurrency(); + } catch (Exception e) { + /* don't let exceptions bubble up */ } } }; threads.add(t); @@ -149,31 +177,41 @@ public class TextDbLoader implements IWaveformDbLoader{ } return true; } - + + /** + * Dispose. + */ @Override public void dispose() { attrValues.clear(); relationTypes.clear(); - txStreams.clear(); - txGenerators.clear(); - transactions = null; - attributeTypes.clear(); + txStreams.clear(); + txGenerators.clear(); + transactions = null; + attributeTypes.clear(); relationsIn.clear(); relationsOut.clear(); - if(mapDb!=null) { + if (mapDb != null) { mapDb.close(); - mapDb=null; + mapDb = null; } } - + + /** + * Checks if is txfile. + * + * @param istream the istream + * @return true, if is txfile + */ private static boolean isTxfile(InputStream istream) { byte[] buffer = new byte[x.length]; try { int readCnt = istream.read(buffer, 0, x.length); istream.close(); - if(readCnt==x.length){ - for(int i=0; i getAllRelationTypes(){ + /** + * Gets the all relation types. + * + * @return the all relation types + */ + public Collection getAllRelationTypes() { return relationTypes.values(); } + /** + * The Class TextDbParser. + */ static class TextDbParser { - static final Pattern scv_tr_stream = Pattern.compile("^scv_tr_stream\\s+\\(ID (\\d+),\\s+name\\s+\"([^\"]+)\",\\s+kind\\s+\"([^\"]+)\"\\)$"); - static final Pattern scv_tr_generator = Pattern.compile("^scv_tr_generator\\s+\\(ID\\s+(\\d+),\\s+name\\s+\"([^\"]+)\",\\s+scv_tr_stream\\s+(\\d+),$"); - static final Pattern begin_attribute = Pattern.compile("^begin_attribute \\(ID (\\d+), name \"([^\"]+)\", type \"([^\"]+)\"\\)$"); - static final Pattern end_attribute = Pattern.compile("^end_attribute \\(ID (\\d+), name \"([^\"]+)\", type \"([^\"]+)\"\\)$"); - + + /** The Constant scv_tr_stream. */ + static final Pattern scv_tr_stream = Pattern + .compile("^scv_tr_stream\\s+\\(ID (\\d+),\\s+name\\s+\"([^\"]+)\",\\s+kind\\s+\"([^\"]+)\"\\)$"); + + /** The Constant scv_tr_generator. */ + static final Pattern scv_tr_generator = Pattern + .compile("^scv_tr_generator\\s+\\(ID\\s+(\\d+),\\s+name\\s+\"([^\"]+)\",\\s+scv_tr_stream\\s+(\\d+),$"); + + /** The Constant begin_attribute. */ + static final Pattern begin_attribute = Pattern + .compile("^begin_attribute \\(ID (\\d+), name \"([^\"]+)\", type \"([^\"]+)\"\\)$"); + + /** The Constant end_attribute. */ + static final Pattern end_attribute = Pattern + .compile("^end_attribute \\(ID (\\d+), name \"([^\"]+)\", type \"([^\"]+)\"\\)$"); + + /** The loader. */ final TextDbLoader loader; - + + /** The transaction by id. */ HashMap transactionById = new HashMap<>(); - + + /** The tx sink. */ TreeMapSink txSink; - + + /** The reader. */ BufferedReader reader = null; - - TxGenerator generator=null; - + + /** The generator. */ + TxGenerator generator = null; + + /** The attr value lut. */ Map attrValueLut = new HashMap<>(); - + + /** + * Instantiates a new text db parser. + * + * @param loader the loader + */ public TextDbParser(TextDbLoader loader) { super(); this.loader = loader; } - void parseInput(InputStream inputStream) throws IOException{ + /** + * Parses the input. + * + * @param inputStream the input stream + * @throws IOException Signals that an I/O exception has occurred. + */ + void parseInput(InputStream inputStream) throws IOException { reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); String curLine = reader.readLine(); String nextLine = null; - while((nextLine=reader.readLine())!=null && curLine!=null) { - curLine=parseLine(curLine, nextLine); + while ((nextLine = reader.readLine()) != null && curLine != null) { + curLine = parseLine(curLine, nextLine); } - if(curLine!=null) + if (curLine != null) parseLine(curLine, nextLine); } - private TxAttributeType getAttrType(String name, DataType dataType, AssociationType type){ - String key =name+"-"+dataType.toString(); + /** + * Gets the attr type. + * + * @param name the name + * @param dataType the data type + * @param type the type + * @return the attr type + */ + private TxAttributeType getAttrType(String name, DataType dataType, AssociationType type) { + String key = name + "-" + dataType.toString(); TxAttributeType res; - if(loader.attributeTypes.containsKey(key)){ - res=loader.attributeTypes.get(key); + if (loader.attributeTypes.containsKey(key)) { + res = loader.attributeTypes.get(key); } else { - res=new TxAttributeType(name, dataType, type); + res = new TxAttributeType(name, dataType, type); loader.attributeTypes.put(key, res); } return res; } - private String parseLine(String curLine, String nextLine) throws IOException{ + /** + * Parses the line. + * + * @param curLine the cur line + * @param nextLine the next line + * @return the string + * @throws IOException Signals that an I/O exception has occurred. + */ + private String parseLine(String curLine, String nextLine) throws IOException { String[] tokens = curLine.split("\\s+"); - if("tx_record_attribute".equals(tokens[0])){ + if ("tx_record_attribute".equals(tokens[0])) { Long id = Long.parseLong(tokens[1]); String name = tokens[2].substring(1, tokens[2].length()); DataType type = DataType.valueOf(tokens[3]); - String remaining = tokens.length>5?String.join(" ", Arrays.copyOfRange(tokens, 5, tokens.length)):""; + String remaining = tokens.length > 5 ? String.join(" ", Arrays.copyOfRange(tokens, 5, tokens.length)) + : ""; TxAttributeType attrType = getAttrType(name, type, AssociationType.RECORD); transactionById.get(id).attributes.add(new TxAttribute(attrType, getAttrString(attrType, remaining))); - } else if("tx_begin".equals(tokens[0])){ + } else if ("tx_begin".equals(tokens[0])) { Long id = Long.parseLong(tokens[1]); Long genId = Long.parseLong(tokens[2]); - TxGenerator gen=loader.txGenerators.get(genId); - ScvTx scvTx = new ScvTx(id, gen.stream.getId(), genId, Long.parseLong(tokens[3])*stringToScale(tokens[4])); - loader.maxTime = loader.maxTime>scvTx.beginTime?loader.maxTime:scvTx.beginTime; + TxGenerator gen = loader.txGenerators.get(genId); + ScvTx scvTx = new ScvTx(id, gen.stream.getId(), genId, + Long.parseLong(tokens[3]) * stringToScale(tokens[4])); + loader.maxTime = loader.maxTime > scvTx.beginTime ? loader.maxTime : scvTx.beginTime; TxStream stream = loader.txStreams.get(gen.stream.getId()); - stream.setConcurrency(stream.getConcurrency()+1); - if(nextLine!=null && nextLine.charAt(0)=='a') { - int idx=0; - while(nextLine!=null && nextLine.charAt(0)=='a') { - String[] attrTokens=nextLine.split("\\s+"); + stream.setConcurrency(stream.getConcurrency() + 1); + if (nextLine != null && nextLine.charAt(0) == 'a') { + int idx = 0; + while (nextLine != null && nextLine.charAt(0) == 'a') { + String[] attrTokens = nextLine.split("\\s+"); TxAttributeType attrType = gen.beginAttrs.get(idx); TxAttribute attr = new TxAttribute(attrType, getAttrString(attrType, attrTokens[1])); scvTx.attributes.add(attr); idx++; - nextLine=reader.readLine(); + nextLine = reader.readLine(); } } txSink.put(id, scvTx); transactionById.put(id, scvTx); - } else if("tx_end".equals(tokens[0])){ + } else if ("tx_end".equals(tokens[0])) { Long id = Long.parseLong(tokens[1]); ScvTx scvTx = transactionById.get(id); - assert Long.parseLong(tokens[2])==scvTx.generatorId; - scvTx.endTime=Long.parseLong(tokens[3])*stringToScale(tokens[4]); - loader.maxTime = loader.maxTime>scvTx.endTime?loader.maxTime:scvTx.endTime; + assert Long.parseLong(tokens[2]) == scvTx.generatorId; + scvTx.endTime = Long.parseLong(tokens[3]) * stringToScale(tokens[4]); + loader.maxTime = loader.maxTime > scvTx.endTime ? loader.maxTime : scvTx.endTime; TxGenerator gen = loader.txGenerators.get(scvTx.generatorId); TxStream stream = loader.txStreams.get(gen.stream.getId()); - if(scvTx.beginTime==scvTx.endTime) - stream.addEvent(new TxEvent(loader, EventKind.SINGLE, id, scvTx.beginTime)); - else { - stream.addEvent(new TxEvent(loader, EventKind.BEGIN, id, scvTx.beginTime)); - stream.addEvent(new TxEvent(loader, EventKind.END, id, scvTx.endTime)); + if (scvTx.beginTime == scvTx.endTime) { + TxEvent evt = new TxEvent(loader, EventKind.SINGLE, id, scvTx.beginTime); + stream.addEvent(evt); + gen.addEvent(evt); + } else { + TxEvent begEvt = new TxEvent(loader, EventKind.BEGIN, id, scvTx.beginTime); + stream.addEvent(begEvt); + gen.addEvent(begEvt); + TxEvent endEvt = new TxEvent(loader, EventKind.END, id, scvTx.endTime); + stream.addEvent(endEvt); + gen.addEvent(endEvt); } - stream.setConcurrency(stream.getConcurrency()-1); - if(nextLine!=null && nextLine.charAt(0)=='a') { - int idx=0; - while(nextLine!=null && nextLine.charAt(0)=='a') { - String[] attrTokens=nextLine.split("\\s+"); + stream.setConcurrency(stream.getConcurrency() - 1); + if (nextLine != null && nextLine.charAt(0) == 'a') { + int idx = 0; + while (nextLine != null && nextLine.charAt(0) == 'a') { + String[] attrTokens = nextLine.split("\\s+"); TxAttributeType attrType = gen.endAttrs.get(idx); TxAttribute attr = new TxAttribute(attrType, getAttrString(attrType, attrTokens[1])); scvTx.attributes.add(attr); idx++; - nextLine=reader.readLine(); + nextLine = reader.readLine(); } } - } else if("tx_relation".equals(tokens[0])){ - Long tr2= Long.parseLong(tokens[2]); - Long tr1= Long.parseLong(tokens[3]); - String relType=tokens[1].substring(1, tokens[1].length()-1); - if(!loader.relationTypes.containsKey(relType)) + } else if ("tx_relation".equals(tokens[0])) { + Long tr2 = Long.parseLong(tokens[2]); + Long tr1 = Long.parseLong(tokens[3]); + String relType = tokens[1].substring(1, tokens[1].length() - 1); + if (!loader.relationTypes.containsKey(relType)) loader.relationTypes.put(relType, RelationTypeFactory.create(relType)); ScvRelation rel = new ScvRelation(loader.relationTypes.get(relType), tr1, tr2); loader.relationsOut.put(tr1, rel); loader.relationsIn.put(tr2, rel); - } else if("scv_tr_stream".equals(tokens[0])){ + } else if ("scv_tr_stream".equals(tokens[0])) { Matcher matcher = scv_tr_stream.matcher(curLine); if (matcher.matches()) { Long id = Long.parseLong(matcher.group(1)); TxStream stream = new TxStream(loader, id, matcher.group(2), matcher.group(3)); loader.txStreams.put(id, stream); } - } else if("scv_tr_generator".equals(tokens[0])){ + } else if ("scv_tr_generator".equals(tokens[0])) { Matcher matcher = scv_tr_generator.matcher(curLine); if ((matcher.matches())) { Long id = Long.parseLong(matcher.group(1)); - TxStream stream=loader.txStreams.get(Long.parseLong(matcher.group(3))); - generator=new TxGenerator(loader, id, matcher.group(2), stream); - loader.txGenerators.put(id, generator); + TxStream stream = loader.txStreams.get(Long.parseLong(matcher.group(3))); + generator = new TxGenerator(loader, id, matcher.group(2), stream); + loader.txGenerators.put(id, generator); } - } else if("begin_attribute".equals(tokens[0])){ + } else if ("begin_attribute".equals(tokens[0])) { Matcher matcher = begin_attribute.matcher(curLine); if ((matcher.matches())) { - TxAttributeType attrType = getAttrType(matcher.group(2), DataType.valueOf(matcher.group(3)), AssociationType.BEGIN); + TxAttributeType attrType = getAttrType(matcher.group(2), DataType.valueOf(matcher.group(3)), + AssociationType.BEGIN); generator.beginAttrs.add(attrType); } - } else if("end_attribute".equals(tokens[0])){ + } else if ("end_attribute".equals(tokens[0])) { Matcher matcher = end_attribute.matcher(curLine); if ((matcher.matches())) { - TxAttributeType attrType = getAttrType(matcher.group(2), DataType.valueOf(matcher.group(3)), AssociationType.END); + TxAttributeType attrType = getAttrType(matcher.group(2), DataType.valueOf(matcher.group(3)), + AssociationType.END); generator.endAttrs.add(attrType); } - } else if(")".equals(tokens[0])){ - generator=null; - } else if("a".equals(tokens[0])){//matcher = line =~ /^a\s+(.+)$/ - System.out.println("Don't know what to do with: '"+curLine+"'"); + } else if (")".equals(tokens[0])) { + generator = null; + } else if ("a".equals(tokens[0])) {// matcher = line =~ /^a\s+(.+)$/ + System.out.println("Don't know what to do with: '" + curLine + "'"); } else - System.out.println("Don't know what to do with: '"+curLine+"'"); + System.out.println("Don't know what to do with: '" + curLine + "'"); return nextLine; } - + + /** + * Gets the attr string. + * + * @param attrType the attr type + * @param string the string + * @return the attr string + */ private String getAttrString(TxAttributeType attrType, String string) { String value; - switch(attrType.getDataType()){ + switch (attrType.getDataType()) { case STRING: case ENUMERATION: - value=string.substring(1, string.length()-1); + value = string.substring(1, string.length() - 1); break; default: - value=string; + value = string; } - if(attrValueLut.containsKey(value)){ + if (attrValueLut.containsKey(value)) { return loader.attrValues.get(attrValueLut.get(value)); } else { attrValueLut.put(value, loader.attrValues.size()); @@ -361,20 +475,38 @@ public class TextDbLoader implements IWaveformDbLoader{ } } - private long stringToScale(String scale){ + /** + * String to scale. + * + * @param scale the scale + * @return the long + */ + private long stringToScale(String scale) { String cmp = scale.trim(); - if("fs".equals(cmp)) return 1L; - if("ps".equals(cmp)) return 1000L; - if("ns".equals(cmp)) return 1000000L; - if("us".equals(cmp)) return 1000000000L; - if("ms".equals(cmp)) return 1000000000000L; - if("s".equals(cmp) ) return 1000000000000000L; + if ("fs".equals(cmp)) + return 1L; + if ("ps".equals(cmp)) + return 1000L; + if ("ns".equals(cmp)) + return 1000000L; + if ("us".equals(cmp)) + return 1000000000L; + if ("ms".equals(cmp)) + return 1000000000000L; + if ("s".equals(cmp)) + return 1000000000000000L; return 1L; } } + /** + * Gets the transaction. + * + * @param txId the tx id + * @return the transaction + */ public ITx getTransaction(long txId) { - if(txCache.containsKey(txId)) + if (txCache.containsKey(txId)) return txCache.get(txId); Tx tx = new Tx(this, txId); txCache.put(txId, tx); @@ -382,4 +514,3 @@ public class TextDbLoader implements IWaveformDbLoader{ } } - diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/Tx.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/Tx.java index cf24abc..3f288b1 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/Tx.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/Tx.java @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2012 IT Just working. + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -21,111 +22,217 @@ import com.minres.scviewer.database.tx.ITxAttribute; import com.minres.scviewer.database.tx.ITxGenerator; import com.minres.scviewer.database.tx.ITxRelation; +/** + * The Class Tx. + */ class Tx implements ITx { - + + /** The loader. */ private final TextDbLoader loader; - + + /** The id. */ private long id; - - long beginTime=-1; - - long endTime=-1; - + + /** The begin time. */ + long beginTime = -1; + + /** The end time. */ + long endTime = -1; + + /** The concurrency index. */ private int concurrencyIndex; - + + /** + * Instantiates a new tx. + * + * @param loader the loader + * @param scvTx the scv tx + */ public Tx(TextDbLoader loader, ScvTx scvTx) { - this.loader=loader; - id=scvTx.id; + this.loader = loader; + id = scvTx.id; } + /** + * Instantiates a new tx. + * + * @param loader the loader + * @param txId the tx id + */ public Tx(TextDbLoader loader, long txId) { - this.loader=loader; - id=txId; + this.loader = loader; + id = txId; } + /** + * Gets the incoming relations. + * + * @return the incoming relations + */ @Override public Collection getIncomingRelations() { Set rels = loader.relationsIn.get(id); return rels.stream().map(rel -> new TxRelation(loader, rel)).collect(Collectors.toList()); } + /** + * Gets the outgoing relations. + * + * @return the outgoing relations + */ @Override public Collection getOutgoingRelations() { Set rels = loader.relationsOut.get(id); return rels.stream().map(rel -> new TxRelation(loader, rel)).collect(Collectors.toList()); } + /** + * Compare to. + * + * @param o the o + * @return the int + */ @Override public int compareTo(ITx o) { - int res =getBeginTime().compareTo(o.getBeginTime()); - if(res!=0) + int res = getBeginTime().compareTo(o.getBeginTime()); + if (res != 0) return res; else return getId().compareTo(o.getId()); } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (obj == null || getClass() != obj.getClass()) return false; - return this.getScvTx().equals(((Tx) obj).getScvTx()); - } + /** + * Equals. + * + * @param obj the obj + * @return true, if successful + */ @Override - public int hashCode() { + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null || getClass() != obj.getClass()) + return false; + return this.getScvTx().equals(((Tx) obj).getScvTx()); + } + + /** + * Hash code. + * + * @return the int + */ + @Override + public int hashCode() { return getScvTx().hashCode(); } + /** + * To string. + * + * @return the string + */ @Override public String toString() { - return "tx#"+getId()+"["+getBeginTime()/1000000+"ns - "+getEndTime()/1000000+"ns]"; + return "tx#" + getId() + "[" + getBeginTime() / 1000000 + "ns - " + getEndTime() / 1000000 + "ns]"; } + /** + * Gets the id. + * + * @return the id + */ @Override public Long getId() { return getScvTx().id; } + /** + * Gets the stream. + * + * @return the stream + */ @Override public IWaveform getStream() { return loader.txStreams.get(getScvTx().streamId); } + /** + * Gets the generator. + * + * @return the generator + */ @Override public ITxGenerator getGenerator() { return loader.txGenerators.get(getScvTx().generatorId); } + /** + * Gets the begin time. + * + * @return the begin time + */ @Override public Long getBeginTime() { - if(beginTime<0) beginTime=getScvTx().beginTime; + if (beginTime < 0) + beginTime = getScvTx().beginTime; return beginTime; } + /** + * Gets the end time. + * + * @return the end time + */ @Override public Long getEndTime() { - if(endTime<0) endTime=getScvTx().endTime; + if (endTime < 0) + endTime = getScvTx().endTime; return endTime; } + /** + * Sets the end time. + * + * @param time the new end time + */ void setEndTime(Long time) { - getScvTx().endTime=time; + getScvTx().endTime = time; } + /** + * Gets the concurrency index. + * + * @return the concurrency index + */ @Override public int getConcurrencyIndex() { return concurrencyIndex; } + /** + * Sets the concurrency index. + * + * @param idx the new concurrency index + */ void setConcurrencyIndex(int idx) { - concurrencyIndex=idx; + concurrencyIndex = idx; } + /** + * Gets the attributes. + * + * @return the attributes + */ @Override public List getAttributes() { return getScvTx().attributes; } + /** + * Gets the scv tx. + * + * @return the scv tx + */ private ScvTx getScvTx() { return loader.transactions.get(id); } diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttribute.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttribute.java index 26e316c..3f8976e 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttribute.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttribute.java @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2012 IT Just working. + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -16,37 +17,66 @@ import com.minres.scviewer.database.AssociationType; import com.minres.scviewer.database.DataType; import com.minres.scviewer.database.tx.ITxAttribute; -public class TxAttribute implements ITxAttribute, Serializable { - - /** - * - */ +/** + * The Class TxAttribute. + */ +public class TxAttribute implements ITxAttribute, Serializable { + + /** The Constant serialVersionUID. */ private static final long serialVersionUID = 4767726016651807152L; + /** The attribute type. */ private final TxAttributeType attributeType; + /** The value. */ private final String value; - - TxAttribute(TxAttributeType type, String value){ - this.attributeType=type; - this.value=value; + + /** + * Instantiates a new tx attribute. + * + * @param type the type + * @param value the value + */ + TxAttribute(TxAttributeType type, String value) { + this.attributeType = type; + this.value = value; } + /** + * Gets the name. + * + * @return the name + */ @Override public String getName() { return attributeType.getName(); } + /** + * Gets the type. + * + * @return the type + */ @Override public AssociationType getType() { return attributeType.getType(); } + /** + * Gets the data type. + * + * @return the data type + */ @Override public DataType getDataType() { return attributeType.getDataType(); } + /** + * Gets the value. + * + * @return the value + */ @Override public Object getValue() { return value; diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttributeType.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttributeType.java index 67c72aa..90e1b27 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttributeType.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxAttributeType.java @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2012 IT Just working. + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -16,34 +17,61 @@ import com.minres.scviewer.database.AssociationType; import com.minres.scviewer.database.DataType; import com.minres.scviewer.database.tx.ITxAttributeType; +/** + * The Class TxAttributeType. + */ class TxAttributeType implements ITxAttributeType, Serializable { - /** - * - */ + + /** The Constant serialVersionUID. */ private static final long serialVersionUID = 7159721937208946828L; - + + /** The name. */ private String name; - + + /** The data type. */ private DataType dataType; - + + /** The type. */ private AssociationType type; - - TxAttributeType(String name, DataType dataType, AssociationType type){ - this.name=name; - this.dataType=dataType; - this.type=type; + + /** + * Instantiates a new tx attribute type. + * + * @param name the name + * @param dataType the data type + * @param type the type + */ + TxAttributeType(String name, DataType dataType, AssociationType type) { + this.name = name; + this.dataType = dataType; + this.type = type; } + /** + * Gets the name. + * + * @return the name + */ @Override public String getName() { return name; } + /** + * Gets the data type. + * + * @return the data type + */ @Override public DataType getDataType() { return dataType; } + /** + * Gets the type. + * + * @return the type + */ @Override public AssociationType getType() { return type; diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java index ad57e01..df76234 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxEvent.java @@ -1,3 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2020 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.text; import com.minres.scviewer.database.EventKind; @@ -5,50 +15,94 @@ import com.minres.scviewer.database.WaveformType; import com.minres.scviewer.database.tx.ITx; import com.minres.scviewer.database.tx.ITxEvent; +/** + * The Class TxEvent. + */ class TxEvent implements ITxEvent { + /** The loader. */ final TextDbLoader loader; - + + /** The kind. */ final EventKind kind; - + + /** The transaction. */ final long transaction; - + + /** The time. */ final long time; - + + /** + * Instantiates a new tx event. + * + * @param loader the loader + * @param kind the kind + * @param transaction the transaction + * @param time the time + */ TxEvent(TextDbLoader loader, EventKind kind, Long transaction, Long time) { - this.loader=loader; + this.loader = loader; this.kind = kind; this.transaction = transaction; this.time = time; } + /** + * Duplicate. + * + * @return the i tx event + * @throws CloneNotSupportedException the clone not supported exception + */ @Override - public - ITxEvent duplicate() throws CloneNotSupportedException { + public ITxEvent duplicate() throws CloneNotSupportedException { return new TxEvent(loader, kind, transaction, time); } + /** + * To string. + * + * @return the string + */ @Override - public - String toString() { - return kind.toString()+"@"+time+" of tx #"+transaction; + public String toString() { + return kind.toString() + "@" + time + " of tx #" + transaction; } + /** + * Gets the type. + * + * @return the type + */ @Override public WaveformType getType() { return WaveformType.TRANSACTION; } + /** + * Gets the kind. + * + * @return the kind + */ @Override public EventKind getKind() { return kind; } + /** + * Gets the time. + * + * @return the time + */ @Override public Long getTime() { return time; } + /** + * Gets the transaction. + * + * @return the transaction + */ @Override public ITx getTransaction() { return loader.getTransaction(transaction); diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java index dc55be7..d62feb1 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxGenerator.java @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2012 IT Just working. + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -16,39 +17,90 @@ import java.util.List; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.tx.ITxGenerator; +/** + * The Class TxGenerator. + */ class TxGenerator extends AbstractTxStream implements ITxGenerator { + /** The stream. */ TxStream stream; - - List beginAttrs = new ArrayList<>(); - - List endAttrs= new ArrayList<>(); - TxGenerator(TextDbLoader loader, Long id, String name, TxStream stream){ + /** The begin attrs. */ + List beginAttrs = new ArrayList<>(); + + /** The end attrs. */ + List endAttrs = new ArrayList<>(); + + /** + * Instantiates a new tx generator. + * + * @param loader the loader + * @param id the id + * @param name the name + * @param stream the stream + */ + TxGenerator(TextDbLoader loader, Long id, String name, TxStream stream) { super(loader, id, name); - this.stream=stream; + this.stream = stream; + stream.addChild(this); } - + + /** + * Gets the stream. + * + * @return the stream + */ @Override - public IWaveform getStream(){ + public IWaveform getStream() { return stream; } - + + /** + * Checks if is same. + * + * @param other the other + * @return true, if is same + */ @Override public boolean isSame(IWaveform other) { - return(other instanceof TxGenerator && this.getId().equals(other.getId())); + return (other instanceof TxGenerator && this.getId().equals(other.getId())); } - + + /** + * Gets the begin attrs. + * + * @return the begin attrs + */ public List getBeginAttrs() { return beginAttrs; } + /** + * Gets the end attrs. + * + * @return the end attrs + */ public List getEndAttrs() { return endAttrs; } + /** + * Gets the kind. + * + * @return the kind + */ @Override public String getKind() { return stream.getKind(); } + + /** + * Gets the width. + * + * @return the width + */ + @Override + public int getWidth() { + return stream.getWidth(); + } } diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxRelation.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxRelation.java index 943fb05..78cd584 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxRelation.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxRelation.java @@ -1,30 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2020 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.text; import com.minres.scviewer.database.RelationType; import com.minres.scviewer.database.tx.ITx; import com.minres.scviewer.database.tx.ITxRelation; +/** + * The Class TxRelation. + */ class TxRelation implements ITxRelation { + /** The loader. */ final TextDbLoader loader; - + + /** The scv relation. */ final ScvRelation scvRelation; - + + /** + * Instantiates a new tx relation. + * + * @param loader the loader + * @param scvRelation the scv relation + */ public TxRelation(TextDbLoader loader, ScvRelation scvRelation) { this.loader = loader; this.scvRelation = scvRelation; } + /** + * Gets the relation type. + * + * @return the relation type + */ @Override public RelationType getRelationType() { return scvRelation.relationType; } + /** + * Gets the source. + * + * @return the source + */ @Override public ITx getSource() { return loader.getTransaction(scvRelation.source); } + /** + * Gets the target. + * + * @return the target + */ @Override public ITx getTarget() { return loader.getTransaction(scvRelation.target); diff --git a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java index c0ab7d0..4a346cd 100644 --- a/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java +++ b/plugins/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TxStream.java @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2012 IT Just working. + * Copyright (c) 2020 MINRES Technologies GmbH * 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 @@ -12,23 +13,82 @@ package com.minres.scviewer.database.text; import com.minres.scviewer.database.IWaveform; +/** + * The Class TxStream. + */ class TxStream extends AbstractTxStream { - + + /** The kind. */ final String kind; - - TxStream(TextDbLoader loader, Long id, String name, String kind){ + + /** + * Instantiates a new tx stream. + * + * @param loader the loader + * @param id the id + * @param name the name + * @param kind the kind + */ + TxStream(TextDbLoader loader, Long id, String name, String kind) { super(loader, id, name); - this.kind=kind; - } - - @Override - public boolean isSame(IWaveform other) { - return(other instanceof TxStream && this.getId().equals(other.getId())); + this.kind = kind; } + /** + * Checks if is same. + * + * @param other the other + * @return true, if is same + */ + @Override + public boolean isSame(IWaveform other) { + return (other instanceof TxStream && this.getId().equals(other.getId())); + } + + /** + * Gets the kind. + * + * @return the kind + */ @Override public String getKind() { return kind; } + /** The max concurrency. */ + private int maxConcurrency = 0; + + /** The concurrency. */ + private int concurrency = 0; + + /** + * Sets the concurrency. + * + * @param concurrency the new concurrency + */ + void setConcurrency(int concurrency) { + this.concurrency = concurrency; + if (concurrency > maxConcurrency) + maxConcurrency = concurrency; + } + + /** + * Gets the concurrency. + * + * @return the concurrency + */ + int getConcurrency() { + return this.concurrency; + } + + /** + * Gets the width. + * + * @return the width + */ + @Override + public int getWidth() { + return maxConcurrency; + } + } diff --git a/plugins/com.minres.scviewer.database/build.properties b/plugins/com.minres.scviewer.database/build.properties index 7856cb9..f5c8f4f 100644 --- a/plugins/com.minres.scviewer.database/build.properties +++ b/plugins/com.minres.scviewer.database/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014, 2015 MINRES Technologies GmbH and others. +# Copyright (c) 2014, 2015 - 2020 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java index e9e2437..26be0d0 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -10,6 +10,16 @@ *******************************************************************************/ package com.minres.scviewer.database; +// TODO: Auto-generated Javadoc +/** + * The Enum AssociationType. + */ public enum AssociationType { - BEGIN, RECORD, END + + /** The begin. */ + BEGIN, + /** The record. */ + RECORD, + /** The end. */ + END } \ No newline at end of file diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitValue.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitValue.java index aae3703..32173d0 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitValue.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitValue.java @@ -1,68 +1,125 @@ +/******************************************************************************* + * Copyright (c) 2020 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; + +/** + * The Enum BitValue. + */ public enum BitValue { - ZERO, - ONE, - X, - Z; - private static final BitValue[] ORDINAL_TABLE = BitValue.values(); + /** The zero. */ + ZERO, - public static BitValue fromChar(char c) { - switch (c) { - case '0': - return ZERO; - case '1': - return ONE; - case 'x': - case 'X': - return X; - case 'z': - case 'Z': - return Z; - default: - throw new NumberFormatException("unknown digit " + c); - } - } + /** The one. */ + ONE, - public char toChar() { - switch (this) { - case ZERO: - return '0'; - case ONE: - return '1'; - case X: - return 'x'; - case Z: - return 'z'; - } + /** The x. */ + X, - return ' '; // Unreachable? - } + /** The z. */ + Z; - public static BitValue fromInt(int i) { - if (i == 0) { - return ZERO; - } else { - return ONE; - } - } + /** The Constant ORDINAL_TABLE. */ + private static final BitValue[] ORDINAL_TABLE = BitValue.values(); - public int toInt() { - return (this == ONE) ? 1 : 0; - } + /** + * From char. + * + * @param c the c + * @return the bit value + */ + public static BitValue fromChar(char c) { + switch (c) { + case '0': + return ZERO; + case '1': + return ONE; + case 'x': + case 'X': + return X; + case 'z': + case 'Z': + return Z; + default: + throw new NumberFormatException("unknown digit " + c); + } + } - public static BitValue fromOrdinal(int ord) { - return ORDINAL_TABLE[ord]; - } + /** + * To char. + * + * @return the char + */ + public char toChar() { + switch (this) { + case ZERO: + return '0'; + case ONE: + return '1'; + case X: + return 'x'; + case Z: + return 'z'; + } - public int compare(BitValue other) { - if (this == ONE && other == ZERO) { - return 1; - } else if (this == ZERO && other == ONE) { - return -1; - } else { - // Either these are equal, or there is an X and Z, which match everything. - return 0; - } - } + return ' '; // Unreachable? + } + + /** + * From int. + * + * @param i the i + * @return the bit value + */ + public static BitValue fromInt(int i) { + if (i == 0) { + return ZERO; + } else { + return ONE; + } + } + + /** + * To int. + * + * @return the int + */ + public int toInt() { + return (this == ONE) ? 1 : 0; + } + + /** + * From ordinal. + * + * @param ord the ord + * @return the bit value + */ + public static BitValue fromOrdinal(int ord) { + return ORDINAL_TABLE[ord]; + } + + /** + * Compare. + * + * @param other the other + * @return the int + */ + public int compare(BitValue other) { + if (this == ONE && other == ZERO) { + return 1; + } else if (this == ZERO && other == ONE) { + return -1; + } else { + // Either these are equal, or there is an X and Z, which match everything. + return 0; + } + } } \ No newline at end of file diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java index 7ca5888..c53fc27 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -10,34 +10,56 @@ *******************************************************************************/ package com.minres.scviewer.database; +/** + * The Class BitVector. + */ public class BitVector implements IEvent { + /** The width. */ private final int width; + /** The packed values. */ private int[] packedValues; + /** + * Instantiates a new bit vector. + * + * @param netWidth the net width + */ public BitVector(int netWidth) { - this.width=netWidth; - packedValues = new int[(netWidth+15)/16]; - for(int i=0; i> 5; int bitOffset = bitIndex & 31; packedValues[wordOffset] &= ~(3 << bitOffset); packedValues[wordOffset] |= value.ordinal() << bitOffset; } + /** + * Gets the value. + * + * @return the value + */ public char[] getValue() { int bitOffset = 0; int wordOffset = 0; char[] res = new char[width]; // Copy values out of packed array for (int i = 0; i < width; i++) { - int currentWord = (packedValues[wordOffset] >> bitOffset)&3; - res[width-i-1]=BitValue.fromInt(currentWord).toChar(); + int currentWord = (packedValues[wordOffset] >> bitOffset) & 3; + res[width - i - 1] = BitValue.fromInt(currentWord).toChar(); bitOffset += 2; if (bitOffset == 32) { wordOffset++; @@ -47,6 +69,11 @@ public class BitVector implements IEvent { return res; } + /** + * Sets the value. + * + * @param value the new value + */ public void setValue(char[] value) { int bitIndex = width; int wordOffset = bitIndex >> 4; @@ -61,41 +88,61 @@ public class BitVector implements IEvent { } } + /** + * Gets the width. + * + * @return the width + */ public int getWidth() { return width; } - public String toString(){ + /** + * To string. + * + * @return the string + */ + public String toString() { return new String(getValue()); } - public String toHexString(){ - int resWidth=(width-1)/4+1; - char[] value=getValue(); + /** + * To hex string. + * + * @return the string + */ + public String toHexString() { + int resWidth = (width - 1) / 4 + 1; + char[] value = getValue(); char[] res = new char[resWidth]; - for(int i=resWidth-1; i>=0; i--){ - int digit=0; - for(int j=3; j>=0; j--){ - if((4*i+j)= 0; i--) { + int digit = 0; + for (int j = 3; j >= 0; j--) { + if ((4 * i + j) < value.length) { + BitValue val = BitValue.fromChar(value[4 * i + j]); + switch (val) { case X: case Z: - res[i]=val.toChar(); + res[i] = val.toChar(); continue; case ONE: - digit+=1<<(3-j); + digit += 1 << (3 - j); break; default: break; } } } - res[i]=Character.forDigit(digit, 16); //((digit < 10) ? '0' + digit : 'a' + digit -10) + res[i] = Character.forDigit(digit, 16); // ((digit < 10) ? '0' + digit : 'a' + digit -10) } - return new String(res); + return new String(res); } + /** + * To unsigned value. + * + * @return the long + */ public long toUnsignedValue() { long res = 0; int bitOffset = 0; @@ -103,10 +150,11 @@ public class BitVector implements IEvent { int currentWord = 0; // Copy values out of packed array for (int i = 0; i < width; i++) { - if(bitOffset==0) currentWord = packedValues[wordOffset]; + if (bitOffset == 0) + currentWord = packedValues[wordOffset]; switch (currentWord & 3) { case 1: - res|=1<>= 2; } } - if(lastVal!=0) - res |= -1l< childs; - + + /** The pcs. */ protected PropertyChangeSupport pcs; + /** + * Instantiates a new hier node. + */ public HierNode() { childs = new ArrayList<>(); - pcs=new PropertyChangeSupport(this); + pcs = new PropertyChangeSupport(this); } + /** + * Instantiates a new hier node. + * + * @param name the name + */ public HierNode(String name) { this(); - this.name=name; + this.name = name; } + /** + * Instantiates a new hier node. + * + * @param name the name + * @param parent the parent + */ public HierNode(String name, IHierNode parent) { this(); - this.name=name; - this.parent=parent; + this.name = name; + this.parent = parent; } + /** + * Adds the property change listener. + * + * @param l the l + */ @Override public void addPropertyChangeListener(PropertyChangeListener l) { pcs.addPropertyChangeListener(l); } + /** + * Removes the property change listener. + * + * @param l the l + */ @Override public void removePropertyChangeListener(PropertyChangeListener l) { pcs.removePropertyChangeListener(l); } - + /** + * Gets the full name. + * + * @return the full name + */ @Override public String getFullName() { - if(parent!=null) - return parent.getFullName()+"."+name; + if (parent != null) + return parent.getFullName() + "." + name; else return name; } + /** + * Gets the name. + * + * @return the name + */ @Override public String getName() { return name; } + /** + * Sets the name. + * + * @param name the new name + */ @Override public void setName(String name) { - this.name=name; + this.name = name; } + /** + * Sets the parent. + * + * @param parent the new parent + */ @Override public void setParent(IHierNode parent) { - this.parent=parent; + this.parent = parent; } + /** + * Gets the child nodes. + * + * @return the child nodes + */ @Override public List getChildNodes() { return childs; } + /** + * Adds the child. + * + * @param child the child + */ + public void addChild(IHierNode child) { + if (!childs.contains(child)) { + childs.add(child); + child.setParent(this); + } + } + + /** + * Compare to. + * + * @param o the o + * @return the int + */ @Override public int compareTo(IHierNode o) { return getFullName().compareTo(o.getFullName()); } + /** + * Derive waveform. + * + * @return the i derived waveform + */ @Override public IDerivedWaveform deriveWaveform() { return null; diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IDerivedWaveform.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IDerivedWaveform.java index 10beacd..60205db 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IDerivedWaveform.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IDerivedWaveform.java @@ -15,5 +15,10 @@ package com.minres.scviewer.database; */ public interface IDerivedWaveform extends IWaveform { + /** + * Adds the source waveform. + * + * @param waveform the waveform + */ void addSourceWaveform(IWaveform waveform); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IEvent.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IEvent.java index 6d0bf25..08d235f 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IEvent.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IEvent.java @@ -1,11 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2020 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; +/** + * The Interface IEvent. + */ public interface IEvent { + /** + * Duplicate. + * + * @return the i event + * @throws CloneNotSupportedException the clone not supported exception + */ public IEvent duplicate() throws CloneNotSupportedException; + /** + * Gets the kind. + * + * @return the kind + */ public EventKind getKind(); - + + /** + * Gets the type. + * + * @return the type + */ public WaveformType getType(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IHierNode.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IHierNode.java index e91ea84..e81576e 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IHierNode.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IHierNode.java @@ -16,25 +16,22 @@ import java.util.List; /** * The Interface IHierNode. */ -public interface IHierNode extends Comparable{ - +public interface IHierNode extends Comparable { + /** * Attach a non-null PropertyChangeListener to this object. * - * @param l - * a non-null PropertyChangeListener instance - * @throws IllegalArgumentException - * if the parameter is null + * @param l a non-null PropertyChangeListener instance + * @throws IllegalArgumentException if the parameter is null */ public void addPropertyChangeListener(PropertyChangeListener l); /** * Remove a PropertyChangeListener from this component. * - * @param l - * a PropertyChangeListener instance + * @param l a PropertyChangeListener instance */ - public void removePropertyChangeListener(PropertyChangeListener l) ; + public void removePropertyChangeListener(PropertyChangeListener l); /** * Gets the full name. @@ -42,21 +39,21 @@ public interface IHierNode extends Comparable{ * @return the full name */ public String getFullName(); - + /** * Gets the name. * * @return the name */ public String getName(); - + /** * Sets the name. * * @param name the new name */ public void setName(String name); - + /** * Sets the parent. * @@ -70,7 +67,7 @@ public interface IHierNode extends Comparable{ * @return the child nodes */ public List getChildNodes(); - + /** * Derive waveform. * diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java index 85856a3..9e1bd83 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -12,22 +12,70 @@ package com.minres.scviewer.database; import java.util.NavigableMap; +/** + * The Interface IWaveform. + * + * @author eyck + */ public interface IWaveform extends IHierNode { + /** + * Gets the id. + * + * @return the id + */ public Long getId(); + /** + * Checks if is same. + * + * @param other the other + * @return true, if is same + */ public boolean isSame(IWaveform other); + /** + * Gets the events. + * + * @return the events + */ public NavigableMap getEvents(); + /** + * Gets the events at time. + * + * @param time the time + * @return the events at time + */ public IEvent[] getEventsAtTime(Long time); + /** + * Gets the events before time. + * + * @param time the time + * @return the events before time + */ public IEvent[] getEventsBeforeTime(Long time); - + + /** + * Gets the type. + * + * @return the type + */ public WaveformType getType(); - + + /** + * Gets the kind. + * + * @return the kind + */ public String getKind(); - + + /** + * Gets the width. + * + * @return the width + */ public int getWidth(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java index 2dee198..435c6f7 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -13,21 +13,58 @@ package com.minres.scviewer.database; import java.io.File; import java.util.List; - +/** + * The Interface IWaveformDb. + */ public interface IWaveformDb extends IHierNode { + /** + * Gets the max time. + * + * @return the max time + */ public Long getMaxTime(); - + + /** + * Gets the stream by name. + * + * @param name the name + * @return the stream by name + */ public IWaveform getStreamByName(String name); - + + /** + * Gets the all waves. + * + * @return the all waves + */ public List getAllWaves(); - + + /** + * Gets the all relation types. + * + * @return the all relation types + */ public List getAllRelationTypes(); - + + /** + * Load. + * + * @param inp the inp + * @return true, if successful + */ public boolean load(File inp); + /** + * Checks if is loaded. + * + * @return true, if is loaded + */ public boolean isLoaded(); + /** + * Clear. + */ public void clear(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java index bfc39f6..cb40d78 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -10,7 +10,15 @@ *******************************************************************************/ package com.minres.scviewer.database; +/** + * A factory for creating IWaveformDb objects. + */ public interface IWaveformDbFactory { + /** + * Gets the database. + * + * @return the database + */ IWaveformDb getDatabase(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java index 0042008..099fa63 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -13,15 +13,66 @@ package com.minres.scviewer.database; import java.io.File; import java.util.Collection; +/** + * The Interface IWaveformDbLoader. + */ public interface IWaveformDbLoader { +// static final String STREAM_ADDED = "StreamAdded"; +// +// static final String GENERATOR_ADDED = "GeneratorAdded"; +// +// static final String LOADING_FINISHED = "LoadingFinished"; +// /** +// * Attach a non-null PropertyChangeListener to this object. +// * +// * @param l +// * a non-null PropertyChangeListener instance +// * @throws IllegalArgumentException +// * if the parameter is null +// */ +// public void addPropertyChangeListener(PropertyChangeListener l); +// +// /** +// * Remove a PropertyChangeListener from this component. +// * +// * @param l +// * a PropertyChangeListener instance +// */ +// public void removePropertyChangeListener(PropertyChangeListener l) ; + /** + * Load. + * + * @param db the db + * @param inp the inp + * @return true, if successful + * @throws InputFormatException the input format exception + */ public boolean load(IWaveformDb db, File inp) throws InputFormatException; - + + /** + * Gets the max time. + * + * @return the max time + */ public Long getMaxTime(); - - public Collection getAllWaves() ; - - public Collection getAllRelationTypes() ; - + + /** + * Gets the all waves. + * + * @return the all waves + */ + public Collection getAllWaves(); + + /** + * Gets the all relation types. + * + * @return the all relation types + */ + public Collection getAllRelationTypes(); + + /** + * Dispose. + */ public void dispose(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java index e116321..2ed0124 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -10,11 +10,12 @@ *******************************************************************************/ package com.minres.scviewer.database; +/** + * The Class InputFormatException. + */ public class InputFormatException extends Exception { - /** - * - */ + /** The Constant serialVersionUID. */ private static final long serialVersionUID = 8676129878197783368L; } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java index 16de19c..3fe2ceb 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -12,40 +12,74 @@ package com.minres.scviewer.database; import java.io.Serializable; +/** + * The Class RelationType. + */ public class RelationType implements Serializable { - /** - * - */ + + /** The Constant serialVersionUID. */ private static final long serialVersionUID = 6394859077558971735L; + /** The name. */ private String name; + /** + * Instantiates a new relation type. + * + * @param name the name + */ RelationType(String name) { super(); this.name = name; } + /** + * Gets the name. + * + * @return the name + */ public String getName() { return name; } + /** + * Sets the name. + * + * @param name the new name + */ public void setName(String name) { this.name = name; } - - public String toString(){ + + /** + * To string. + * + * @return the string + */ + public String toString() { return name; } - + + /** + * Hash code. + * + * @return the int + */ @Override public int hashCode() { return name.hashCode(); } - + + /** + * Equals. + * + * @param obj the obj + * @return true, if successful + */ @Override public boolean equals(Object obj) { - if(obj instanceof RelationType) - return name.equals(((RelationType)obj).name); + if (obj instanceof RelationType) + return name.equals(((RelationType) obj).name); else return false; } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationTypeFactory.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationTypeFactory.java index 582805b..81336df 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationTypeFactory.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationTypeFactory.java @@ -1,22 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2020 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; import java.util.HashMap; +/** + * A factory for creating RelationType objects. + */ public class RelationTypeFactory { - - public static RelationType create(String name){ - if(registry.containsKey(name)){ + + /** + * Creates the. + * + * @param name the name + * @return the relation type + */ + public static RelationType create(String name) { + if (registry.containsKey(name)) { return registry.get(name); - }else{ + } else { RelationType relType = new RelationType(name); registry.put(name, relType); return relType; } - + } - private RelationTypeFactory() {} - + /** + * Instantiates a new relation type factory. + */ + private RelationTypeFactory() { + } + + /** The registry. */ private static HashMap registry = new HashMap<>(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/WaveformType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/WaveformType.java index 9e56f65..209f3c9 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/WaveformType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/WaveformType.java @@ -1,5 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2020 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; +/** + * The Enum WaveformType. + */ public enum WaveformType { - SIGNAL, TRANSACTION, FILTER + + /** The signal. */ + SIGNAL, + /** The transaction. */ + TRANSACTION, + /** The filter. */ + FILTER } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java index 32d20e8..5e548e5 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -25,67 +25,114 @@ import com.minres.scviewer.database.IWaveformDb; import com.minres.scviewer.database.IWaveformDbLoader; import com.minres.scviewer.database.RelationType; +/** + * The Class WaveformDb. + */ public class WaveformDb extends HierNode implements IWaveformDb { - private static List loaders=new LinkedList<>(); + /** The loaders. */ + private static List loaders = new LinkedList<>(); + /** The loaded. */ private boolean loaded; + /** The relation types. */ private List relationTypes; - + + /** The waveforms. */ private Map waveforms; + /** The max time. */ private Long maxTime; - - - public synchronized void bind(IWaveformDbLoader loader){ + + /** + * Bind. + * + * @param loader the loader + */ + public synchronized void bind(IWaveformDbLoader loader) { loaders.add(loader); } - public synchronized void unbind(IWaveformDbLoader loader){ + /** + * Unbind. + * + * @param loader the loader + */ + public synchronized void unbind(IWaveformDbLoader loader) { loaders.remove(loader); } - + /** + * Gets the loaders. + * + * @return the loaders + */ public static List getLoaders() { return Collections.unmodifiableList(loaders); } + /** + * Instantiates a new waveform db. + */ public WaveformDb() { super(); waveforms = new HashMap<>(); - relationTypes=new ArrayList<>(); - maxTime=0L; + relationTypes = new ArrayList<>(); + maxTime = 0L; } + /** + * Gets the max time. + * + * @return the max time + */ @Override public Long getMaxTime() { return maxTime; } + /** + * Gets the stream by name. + * + * @param name the name + * @return the stream by name + */ @Override public IWaveform getStreamByName(String name) { return waveforms.get(name); } + /** + * Gets the all waves. + * + * @return the all waves + */ @Override public List getAllWaves() { return new ArrayList<>(waveforms.values()); } + /** + * Load. + * + * @param inp the inp + * @return true, if successful + */ @Override - public boolean load(File inp){ - for(IWaveformDbLoader loader:loaders){ + public boolean load(File inp) { + for (IWaveformDbLoader loader : loaders) { try { - if(loader.load(this, inp)){ - for(IWaveform w:loader.getAllWaves()){ - waveforms.put(w.getFullName(),w); + if (loader.load(this, inp)) { + for (IWaveform w : loader.getAllWaves()) { + waveforms.put(w.getFullName(), w); } - if(loader.getMaxTime()>maxTime){ - maxTime=loader.getMaxTime(); + if (loader.getMaxTime() > maxTime) { + maxTime = loader.getMaxTime(); } - if(name==null) name=getFileBasename(inp.getName()); - buildHierarchyNodes() ; + if (name == null) + name = getFileBasename(inp.getName()); + buildHierarchyNodes(); relationTypes.addAll(loader.getAllRelationTypes()); pcs.firePropertyChange("WAVEFORMS", null, waveforms); pcs.firePropertyChange("CHILDS", null, childs); @@ -95,67 +142,94 @@ public class WaveformDb extends HierNode implements IWaveformDb { } catch (Exception e) { return false; } - } + } return false; } + /** + * Gets the file basename. + * + * @param f the f + * @return the file basename + */ protected static String getFileBasename(String f) { - String ext = ""; - int i = f.lastIndexOf('.'); - if (i > 0 && i < f.length() - 1) { - ext = f.substring(0, i); - } - return ext; - } + String ext = ""; + int i = f.lastIndexOf('.'); + if (i > 0 && i < f.length() - 1) { + ext = f.substring(0, i); + } + return ext; + } + /** + * Clear. + */ @Override public void clear() { waveforms.clear(); childs.clear(); - loaded=false; + loaded = false; } + /** + * Checks if is loaded. + * + * @return true, if is loaded + */ public boolean isLoaded() { return loaded; } + /** + * Builds the hierarchy nodes. + */ private void buildHierarchyNodes() { - for(IWaveform stream:getAllWaves()){ + for (IWaveform stream : getAllWaves()) { String[] hier = stream.getName().split("\\."); IHierNode node = this; - for(int i=0; i o1.getName().compareTo(o2.getName())); - for(IHierNode n:node.getChildNodes()) { - if(!n.getChildNodes().isEmpty()) + for (IHierNode n : node.getChildNodes()) { + if (!n.getChildNodes().isEmpty()) sortRecursive(n); } } + /** + * Gets the all relation types. + * + * @return the all relation types + */ @Override public List getAllRelationTypes() { return relationTypes; diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java index 08b237d..3fb710c 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -17,12 +17,20 @@ import com.minres.scviewer.database.IWaveformDb; import com.minres.scviewer.database.IWaveformDbFactory; /** - * @author eyck + * A factory for creating WaveformDb objects. * + * @author eyck */ public class WaveformDbFactory implements IWaveformDbFactory { - /* (non-Javadoc) + /** + * Gets the database. + * + * @return the database + */ + /* + * (non-Javadoc) + * * @see com.minres.scviewer.database.IWaveformDbFactory#getDatabase() */ @Override diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java index 73e72d7..524a70a 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -15,23 +15,71 @@ import java.util.List; import com.minres.scviewer.database.IWaveform; -public interface ITx extends Comparable{ +/** + * The Interface ITx. + */ +public interface ITx extends Comparable { + /** + * Gets the id. + * + * @return the id + */ public Long getId(); - + + /** + * Gets the stream. + * + * @return the stream + */ public IWaveform getStream(); - + + /** + * Gets the generator. + * + * @return the generator + */ public ITxGenerator getGenerator(); - + + /** + * Gets the begin time. + * + * @return the begin time + */ public Long getBeginTime(); - + + /** + * Gets the end time. + * + * @return the end time + */ public Long getEndTime(); - + + /** + * Gets the concurrency index. + * + * @return the concurrency index + */ public int getConcurrencyIndex(); - + + /** + * Gets the attributes. + * + * @return the attributes + */ public List getAttributes(); - + + /** + * Gets the incoming relations. + * + * @return the incoming relations + */ public Collection getIncomingRelations(); + /** + * Gets the outgoing relations. + * + * @return the outgoing relations + */ public Collection getOutgoingRelations(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java index 1e06781..39c4a6c 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -10,6 +10,15 @@ *******************************************************************************/ package com.minres.scviewer.database.tx; +/** + * The Interface ITxAttribute. + */ public interface ITxAttribute extends ITxAttributeType { + + /** + * Gets the value. + * + * @return the value + */ public Object getValue(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java index fe21390..e204094 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -13,8 +13,29 @@ package com.minres.scviewer.database.tx; import com.minres.scviewer.database.AssociationType; import com.minres.scviewer.database.DataType; +/** + * The Interface ITxAttributeType. + */ public interface ITxAttributeType { + + /** + * Gets the name. + * + * @return the name + */ public String getName(); + + /** + * Gets the data type. + * + * @return the data type + */ public DataType getDataType(); + + /** + * Gets the type. + * + * @return the type + */ public AssociationType getType(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java index 1aada15..7c4930a 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -12,9 +12,22 @@ package com.minres.scviewer.database.tx; import com.minres.scviewer.database.IEvent; +/** + * The Interface ITxEvent. + */ public interface ITxEvent extends IEvent { + /** + * Gets the time. + * + * @return the time + */ public Long getTime(); - - public ITx getTransaction(); + + /** + * Gets the transaction. + * + * @return the transaction + */ + public ITx getTransaction(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java index 7226b0c..5daf7bb 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -12,8 +12,16 @@ package com.minres.scviewer.database.tx; import com.minres.scviewer.database.IWaveform; +/** + * The Interface ITxGenerator. + */ public interface ITxGenerator extends IWaveform { + /** + * Gets the stream. + * + * @return the stream + */ public IWaveform getStream(); } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java index 40eafe1..f994357 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015 - 2020 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 @@ -12,11 +12,29 @@ package com.minres.scviewer.database.tx; import com.minres.scviewer.database.RelationType; +/** + * The Interface ITxRelation. + */ public interface ITxRelation { + /** + * Gets the relation type. + * + * @return the relation type + */ RelationType getRelationType(); - + + /** + * Gets the source. + * + * @return the source + */ ITx getSource(); - + + /** + * Gets the target. + * + * @return the target + */ ITx getTarget(); } From 9d2e2e7f64a03da3db1d6cba4ecb9264a52de915 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 9 Jan 2021 12:55:51 +0100 Subject: [PATCH 3/5] show children of streams --- .../e4/application/parts/DesignBrowser.java | 278 +++++++----------- .../provider/TxDbContentProvider.java | 43 +-- 2 files changed, 113 insertions(+), 208 deletions(-) diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java index 6616c3e..87ec118 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java @@ -10,7 +10,6 @@ *******************************************************************************/ package com.minres.scviewer.e4.application.parts; -import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.lang.annotation.Annotation; import java.util.ArrayList; @@ -21,7 +20,6 @@ import java.util.regex.PatternSyntaxException; import javax.annotation.PostConstruct; import javax.inject.Inject; -import javax.inject.Named; import org.eclipse.e4.core.contexts.ContextInjectionFactory; import org.eclipse.e4.core.contexts.IEclipseContext; @@ -31,21 +29,14 @@ import org.eclipse.e4.core.di.annotations.Optional; import org.eclipse.e4.core.services.events.IEventBroker; import org.eclipse.e4.ui.di.Focus; import org.eclipse.e4.ui.di.UIEventTopic; -import org.eclipse.e4.ui.model.application.ui.basic.MPart; import org.eclipse.e4.ui.services.EMenuService; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.e4.ui.workbench.modeling.ESelectionService; -import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IContentProvider; -import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ITreePathContentProvider; -import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TreePath; @@ -56,11 +47,6 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.events.ControlAdapter; import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.DisposeEvent; -import org.eclipse.swt.events.DisposeListener; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -79,7 +65,6 @@ import com.minres.scviewer.database.HierNode; import com.minres.scviewer.database.IHierNode; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.IWaveformDb; -import com.minres.scviewer.database.tx.ITx; import com.minres.scviewer.e4.application.Messages; import com.minres.scviewer.e4.application.handlers.AddWaveformHandler; import com.minres.scviewer.e4.application.provider.TxDbContentProvider; @@ -96,7 +81,7 @@ public class DesignBrowser { /** The event broker. */ @Inject IEventBroker eventBroker; - + /** The selection service. */ @Inject ESelectionService selectionService; @@ -105,16 +90,13 @@ public class DesignBrowser { /** The eclipse ctx. */ @Inject IEclipseContext eclipseCtx; - + /** The sash form. */ private SashForm sashForm; - + /** The top. */ Composite top; - /** The bottom. */ - private Composite bottom; - /** The tree viewer. */ private TreeViewer treeViewer; @@ -140,25 +122,22 @@ public class DesignBrowser { int thisSelectionCount=0, otherSelectionCount=0; /** The tree viewer pcl. */ - private PropertyChangeListener treeViewerPCL = new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - if("CHILDS".equals(evt.getPropertyName())){ //$NON-NLS-1$ - treeViewer.getTree().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - treeViewer.refresh(); - } - }); - } else if("WAVEFORMS".equals(evt.getPropertyName())) { - treeViewer.getTree().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - IWaveformDb database = waveformViewerPart.getDatabase(); - treeViewer.setInput(Arrays.asList(database.isLoaded()?new IWaveformDb[]{database}:new IWaveformDb[]{new LoadingWaveformDb()})); - } - }); - } + private PropertyChangeListener treeViewerPCL = evt -> { + if("CHILDS".equals(evt.getPropertyName())){ //$NON-NLS-1$ + treeViewer.getTree().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + treeViewer.refresh(); + } + }); + } else if("WAVEFORMS".equals(evt.getPropertyName())) { + treeViewer.getTree().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + IWaveformDb database = waveformViewerPart.getDatabase(); + treeViewer.setInput(Arrays.asList(database.isLoaded()?new IWaveformDb[]{database}:new IWaveformDb[]{new LoadingWaveformDb()})); + } + }); } }; @@ -166,20 +145,17 @@ public class DesignBrowser { private WaveformViewer waveformViewerPart; /** The sash paint listener. */ - protected PaintListener sashPaintListener=new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - int size=Math.min(e.width, e.height)-1; - e.gc.setForeground(SWTResourceManager.getColor(SWT.COLOR_DARK_GRAY)); - e.gc.setFillRule(SWT.FILL_EVEN_ODD); - if(e.width>e.height) - e.gc.drawArc(e.x+(e.width-size)/2, e.y, size, size, 0, 360); - else - e.gc.drawArc(e.x, e.y+(e.height-size)/2, size, size, 0, 360); - } + protected PaintListener sashPaintListener= e -> { + int size=Math.min(e.width, e.height)-1; + e.gc.setForeground(SWTResourceManager.getColor(SWT.COLOR_DARK_GRAY)); + e.gc.setFillRule(SWT.FILL_EVEN_ODD); + if(e.width>e.height) + e.gc.drawArc(e.x+(e.width-size)/2, e.y, size, size, 0, 360); + else + e.gc.drawArc(e.x, e.y+(e.height-size)/2, size, size, 0, 360); }; - + /** * Creates the composite. * @@ -192,12 +168,13 @@ public class DesignBrowser { top = new Composite(sashForm, SWT.NONE); createTreeViewerComposite(top); - bottom = new Composite(sashForm, SWT.NONE); + Composite bottom = new Composite(sashForm, SWT.NONE); createTableComposite(bottom); - + sashForm.setWeights(new int[] {100, 100}); sashForm.SASH_WIDTH=5; top.addControlListener(new ControlAdapter() { + @Override public void controlResized(ControlEvent e) { sashForm.getChildren()[2].addPaintListener(sashPaintListener); top.removeControlListener(this); @@ -206,7 +183,7 @@ public class DesignBrowser { if(waveformViewerPart!=null) setWaveformViewer(waveformViewerPart); } - + /** * Creates the tree viewer composite. * @@ -217,12 +194,9 @@ public class DesignBrowser { treeNameFilter = new Text(parent, SWT.BORDER); treeNameFilter.setMessage(Messages.DesignBrowser_3); - treeNameFilter.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - treeAttributeFilter.setSearchText(((Text) e.widget).getText()); - treeViewer.refresh(); - } + treeNameFilter.addModifyListener( e -> { + treeAttributeFilter.setSearchText(((Text) e.widget).getText()); + treeViewer.refresh(); }); treeNameFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -235,21 +209,17 @@ public class DesignBrowser { treeViewer.addFilter(treeAttributeFilter); treeViewer.setUseHashlookup(true); treeViewer.setAutoExpandLevel(2); - treeViewer.addSelectionChangedListener(new ISelectionChangedListener() { - - @Override - public void selectionChanged(SelectionChangedEvent event) { - ISelection selection=event.getSelection(); - if( selection instanceof IStructuredSelection) { - Object object= ((IStructuredSelection)selection).getFirstElement(); - if(object instanceof IHierNode && ((IHierNode)object).getChildNodes().size()!=0){ - txTableViewer.setInput(object); - updateButtons(); - } - else { //if selection is changed but empty - txTableViewer.setInput(null); - updateButtons(); - } + treeViewer.addSelectionChangedListener(event -> { + ISelection selection=event.getSelection(); + if( selection instanceof IStructuredSelection) { + Object object= ((IStructuredSelection)selection).getFirstElement(); + if(object instanceof IHierNode && !((IHierNode)object).getChildNodes().isEmpty()){ + txTableViewer.setInput(object); + updateButtons(); + } + else { //if selection is changed but empty + txTableViewer.setInput(null); + updateButtons(); } } }); @@ -265,13 +235,10 @@ public class DesignBrowser { tableNameFilter = new Text(parent, SWT.BORDER); tableNameFilter.setMessage(Messages.DesignBrowser_2); - tableNameFilter.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - tableAttributeFilter.setSearchText(((Text) e.widget).getText()); - updateButtons(); - txTableViewer.refresh(); - } + tableNameFilter.addModifyListener(e -> { + tableAttributeFilter.setSearchText(((Text) e.widget).getText()); + updateButtons(); + txTableViewer.refresh(); }); tableNameFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -282,22 +249,15 @@ public class DesignBrowser { txTableViewer.setLabelProvider(new TxDbLabelProvider()); txTableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH)); txTableViewer.addFilter(tableAttributeFilter); - txTableViewer.addDoubleClickListener(new IDoubleClickListener() { - @Override - public void doubleClick(DoubleClickEvent event) { - AddWaveformHandler myHandler = new AddWaveformHandler(); - Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$ - if(result!=null && (Boolean)result) - ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx); - } + txTableViewer.addDoubleClickListener(event -> { + AddWaveformHandler myHandler = new AddWaveformHandler(); + Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$ + if(result!=null && (Boolean)result) + ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx); }); - txTableViewer.addSelectionChangedListener(new ISelectionChangedListener() { - - @Override - public void selectionChanged(SelectionChangedEvent event) { - selectionService.setSelection(event.getSelection()); - updateButtons(); - } + txTableViewer.addSelectionChangedListener(event -> { + selectionService.setSelection(event.getSelection()); + updateButtons(); }); menuService.registerContextMenu(txTableViewer.getControl(), POPUP_ID); @@ -351,7 +311,7 @@ public class DesignBrowser { } updateButtons(); } - + /** * reset tree viewer and tableviewer after every closed tab */ @@ -371,7 +331,7 @@ public class DesignBrowser { StructuredSelection sel = new StructuredSelection(list); txTableViewer.setSelection(sel); } - + /** * Gets the status event. * @@ -383,17 +343,14 @@ public class DesignBrowser { if( this.waveformViewerPart == null || this.waveformViewerPart != waveformViewerPart ) { if(this.waveformViewerPart!=null) this.waveformViewerPart.storeDesignBrowerState(new DBState()); - waveformViewerPart.addDisposeListener( new DisposeListener() { - @Override - public void widgetDisposed(DisposeEvent e) { - Control control = treeViewer.getControl(); - // check if widget is already disposed (f.ex. because of workbench closing) - if (control == null || control.isDisposed()) { //if so: do nothing - }else { //reset tree- and tableviewer - resetTreeViewer(); - } + waveformViewerPart.addDisposeListener( e -> { + Control control = treeViewer.getControl(); + // check if widget is already disposed (f.ex. because of workbench closing) + if (control == null || control.isDisposed()) { //if so: do nothing + }else { //reset tree- and tableviewer + resetTreeViewer(); } - } ); + }); setWaveformViewer(waveformViewerPart); } } @@ -403,14 +360,14 @@ public class DesignBrowser { this.waveformViewerPart=waveformViewerPart; IWaveformDb database = waveformViewerPart.getDatabase(); Object input = treeViewer.getInput(); - if(input!=null && input instanceof List){ + if(input instanceof List){ IWaveformDb db = ((List)input).get(0); if(db==database) return; // do nothing if old and new database is the same ((List)input).get(0).removePropertyChangeListener(treeViewerPCL); } treeViewer.setInput(Arrays.asList(database.isLoaded()?new IWaveformDb[]{database}:new IWaveformDb[]{new LoadingWaveformDb()})); Object state=this.waveformViewerPart.retrieveDesignBrowerState(); - if(state!=null && state instanceof DBState) + if(state instanceof DBState) ((DBState)state).apply(); else txTableViewer.setInput(null); @@ -418,26 +375,6 @@ public class DesignBrowser { database.addPropertyChangeListener(treeViewerPCL); } - /** - * Sets the selection. - * - * @param selection the selection - * @param partService the part service - */ - @Inject - public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional IStructuredSelection selection, EPartService partService){ - MPart part = partService.getActivePart(); - if(part!=null && part.getObject() != this && selection!=null){ - if( selection instanceof IStructuredSelection) { - Object object= ((IStructuredSelection)selection).getFirstElement(); - if(object instanceof IHierNode&& ((IHierNode)object).getChildNodes().size()!=0) - txTableViewer.setInput(object); - otherSelectionCount = (object instanceof IWaveform || object instanceof ITx)?1:0; - } - } - updateButtons(); - } - /** * Update buttons. */ @@ -467,8 +404,8 @@ public class DesignBrowser { */ public void setSearchText(String s) { try { - pattern = Pattern.compile(".*" + s + ".*"); //$NON-NLS-1$ //$NON-NLS-2$ - this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$ + pattern = Pattern.compile(".*" + s + ".*"); //$NON-NLS-1$ //$NON-NLS-2$ + this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$ } catch (PatternSyntaxException e) {} } @@ -477,14 +414,9 @@ public class DesignBrowser { */ @Override public boolean select(Viewer viewer, Object parentElement, Object element) { - if (searchString == null || searchString.length() == 0) { - return true; - } - if(element instanceof IWaveform) { - if (pattern.matcher(((IWaveform) element).getName()).matches()) - return true; - } - return false; + return searchString == null || + searchString.length() == 0 || + (element instanceof IWaveform && pattern.matcher(((IWaveform) element).getName()).matches()); } } @@ -501,8 +433,8 @@ public class DesignBrowser { */ public void setSearchText(String s) { try { - pattern = Pattern.compile(".*" + s + ".*"); - this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$ + pattern = Pattern.compile(".*" + s + ".*"); + this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$ } catch (PatternSyntaxException e) {} } @@ -514,7 +446,7 @@ public class DesignBrowser { public boolean select(Viewer viewer, Object parentElement, Object element) { return selectTreePath(viewer, new TreePath(new Object[] { parentElement }), element); } - + private boolean selectTreePath(Viewer viewer, TreePath parentPath, Object element) { // Cut off children of elements that are shown repeatedly. for (int i = 0; i < parentPath.getSegmentCount() - 1; i++) { @@ -529,12 +461,11 @@ public class DesignBrowser { if (searchString == null || searchString.length() == 0) { return true; } - TreeViewer treeViewer = (TreeViewer) viewer; Boolean matchingResult = isMatchingOrNull(element); if (matchingResult != null) { return matchingResult; } - return hasUnfilteredChild(treeViewer, parentPath, element); + return hasUnfilteredChild((TreeViewer)viewer, parentPath, element); } Boolean isMatchingOrNull(Object element) { @@ -563,18 +494,18 @@ public class DesignBrowser { IContentProvider contentProvider = viewer.getContentProvider(); Object[] children = contentProvider instanceof ITreePathContentProvider ? ((ITreePathContentProvider) contentProvider).getChildren(elementPath) - : ((ITreeContentProvider) contentProvider).getChildren(element); + : ((ITreeContentProvider) contentProvider).getChildren(element); - /* avoid NPE + guard close */ - if (children == null || children.length == 0) { - return false; - } - for (int i = 0; i < children.length; i++) { - if (selectTreePath(viewer, elementPath, children[i])) { - return true; - } - } - return false; + /* avoid NPE + guard close */ + if (children == null || children.length == 0) { + return false; + } + for (int i = 0; i < children.length; i++) { + if (selectTreePath(viewer, elementPath, children[i])) { + return true; + } + } + return false; } } /** @@ -587,14 +518,12 @@ public class DesignBrowser { Object parent = viewer.getInput(); if(parent==null) return new Object[0]; Object[] result = null; - if (parent != null) { - IStructuredContentProvider cp = (IStructuredContentProvider) viewer.getContentProvider(); - if (cp != null) { - result = cp.getElements(parent); - if(result==null) return new Object[0]; - for (int i = 0, n = result.length; i < n; ++i) { - if(result[i]==null) return new Object[0]; - } + IStructuredContentProvider cp = (IStructuredContentProvider) viewer.getContentProvider(); + if (cp != null) { + result = cp.getElements(parent); + if(result==null) return new Object[0]; + for (int i = 0, n = result.length; i < n; ++i) { + if(result[i]==null) return new Object[0]; } } ViewerFilter[] filters = viewer.getFilters(); @@ -622,8 +551,7 @@ public class DesignBrowser { eclipseCtx.set(AddWaveformHandler.PARAM_ALL_ID, all.toString()); eclipseCtx.set(DesignBrowser.class, this); eclipseCtx.set(WaveformViewer.class, waveformViewerPart); - Object result = ContextInjectionFactory.invoke(handler, annotation, eclipseCtx); - return result; + return ContextInjectionFactory.invoke(handler, annotation, eclipseCtx); } /** @@ -643,12 +571,12 @@ public class DesignBrowser { public WaveformViewer getActiveWaveformViewerPart() { return waveformViewerPart; } - + /** * The Class DBState. */ class DBState { - + /** * Instantiates a new DB state. */ @@ -657,7 +585,7 @@ public class DesignBrowser { this.treeSelection=treeViewer.getSelection(); this.tableSelection=txTableViewer.getSelection(); } - + /** * Apply. */ @@ -665,16 +593,16 @@ public class DesignBrowser { treeViewer.setExpandedElements(expandedElements); treeViewer.setSelection(treeSelection, true); txTableViewer.setSelection(tableSelection, true); - + } /** The expanded elements. */ private Object[] expandedElements; - + /** The tree selection. */ private ISelection treeSelection; - + /** The table selection. */ private ISelection tableSelection; } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java index 2a83ca2..b55dae3 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java @@ -12,12 +12,10 @@ package com.minres.scviewer.e4.application.provider; import java.util.Collection; import java.util.List; +import java.util.stream.Collectors; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; -import com.google.common.base.Predicate; -import com.google.common.collect.Collections2; import com.minres.scviewer.database.IHierNode; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.IWaveformDb; @@ -28,15 +26,14 @@ import com.minres.scviewer.database.IWaveformDb; public class TxDbContentProvider implements ITreeContentProvider { /** The show nodes. */ - // private List nodes; - private boolean tabelEntries; + private boolean tableEntries; /** * Instantiates a new tx db content provider. */ public TxDbContentProvider() { super(); - this.tabelEntries = false; + this.tableEntries = false; } /** @@ -46,20 +43,7 @@ public class TxDbContentProvider implements ITreeContentProvider { */ public TxDbContentProvider(boolean tableEntries) { super(); - this.tabelEntries = tableEntries; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IContentProvider#dispose() - */ - @Override - public void dispose() { } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + this.tableEntries = tableEntries; } /* (non-Javadoc) @@ -67,24 +51,17 @@ public class TxDbContentProvider implements ITreeContentProvider { */ @Override public Object[] getElements(Object inputElement) { - if(tabelEntries && inputElement instanceof IWaveformDb){ + if(tableEntries && inputElement instanceof IWaveformDb){ return new Object[]{}; }else if(inputElement instanceof IHierNode){ - Collection res = Collections2.filter(((IHierNode)inputElement).getChildNodes(), new Predicate(){ - @Override - public boolean apply(IHierNode arg0) { - if(tabelEntries){ - return arg0 instanceof IWaveform; - } else{ - return arg0.getChildNodes().size()!=0; - } - } - }); + Collection res = ((IHierNode)inputElement).getChildNodes().stream().filter(n -> + tableEntries? n instanceof IWaveform : !n.getChildNodes().isEmpty() + ).collect(Collectors.toList()); return res.toArray(); }else if(inputElement instanceof List){ return ((List)inputElement).toArray(); } else - return null; + return new Object[]{}; } /* (non-Javadoc) @@ -109,7 +86,7 @@ public class TxDbContentProvider implements ITreeContentProvider { @Override public boolean hasChildren(Object element) { Object[] obj = getElements(element); - return obj == null ? false : obj.length > 0; + return obj.length > 0; } } From abacae42d73fcd23e6d3eeb45f8133e18789feb4 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 9 Jan 2021 13:43:11 +0100 Subject: [PATCH 4/5] fix selection handling in viewer and Sonarlint warnings --- .../scviewer/database/ui/IWaveformView.java | 3 +- .../ui/swt/internal/WaveformView.java | 49 ++++++++++++------- .../scviewer/database/AssociationType.java | 1 - .../e4/application/parts/DesignBrowser.java | 40 ++++++--------- .../application/parts/TransactionDetails.java | 22 ++++----- 5 files changed, 58 insertions(+), 57 deletions(-) diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java index d166cc0..8b9a3c5 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java @@ -23,6 +23,7 @@ import org.eclipse.swt.widgets.Control; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.RelationType; import com.minres.scviewer.database.RelationTypeFactory; +import com.minres.scviewer.database.tx.ITx; public interface IWaveformView extends PropertyChangeListener, ISelectionProvider{ @@ -64,7 +65,7 @@ public interface IWaveformView extends PropertyChangeListener, ISelectionProvide public List getStreamList(); - public TrackEntry getEntryForStream(IWaveform source); + public TrackEntry getEntryFor(ITx source); public List getElementsAt(Point pt); diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java index 145ac77..16172a5 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map.Entry; import java.util.NavigableMap; import java.util.NoSuchElementException; +import java.util.Optional; import java.util.TreeMap; import java.util.stream.Collectors; @@ -696,30 +697,36 @@ public class WaveformView implements IWaveformView { boolean selectionChanged = false; currentWaveformSelection.forEach(e->e.selected=false); if (selection instanceof IStructuredSelection) { - if(((IStructuredSelection) selection).size()==0){ + IStructuredSelection sel = (IStructuredSelection) selection; + if(sel.size()==0){ selectionChanged = currentTxSelection!=null||currentWaveformSelection!=null; currentTxSelection = null; currentWaveformSelection .clear(); } else { if(!add) currentWaveformSelection.clear(); - for(Object sel:((IStructuredSelection) selection).toArray()){ - if (sel instanceof ITx){ - ITx txSel = (ITx) sel; - TrackEntry trackEntry = getEntryForStream(txSel.getStream()); + List selList = sel.toList(); + if(selList.get(0) instanceof ITx) { + ITx txSel = (ITx) selList.get(0); + TrackEntry trackEntry = selList.size()==2 && selList.get(1) instanceof TrackEntry? + (TrackEntry) selList.get(1):null; + if(trackEntry==null) { + trackEntry = getEntryFor(txSel); if(trackEntry==null && addIfNeeded){ trackEntry=new TrackEntry(txSel.getStream(), styleProvider); streams.add(trackEntry); } - currentTxSelection = txSel; - currentWaveformSelection.clear(); - currentWaveformSelection.add(trackEntry); - selectionChanged = true; - } else if (sel instanceof TrackEntry && !currentWaveformSelection.contains(sel)) { - currentWaveformSelection.add((TrackEntry)sel); - if(currentTxSelection!=null && !selectionChanged) - currentTxSelection=null; - selectionChanged = true; - } + } + currentTxSelection = txSel; + currentWaveformSelection.clear(); + currentWaveformSelection.add(trackEntry); + selectionChanged = true; + } else if(selList.size()==1 && selList.get(0) instanceof TrackEntry) { + currentWaveformSelection.add((TrackEntry)selList.get(0)); + if(currentTxSelection!=null) + currentTxSelection=null; + selectionChanged = true; + } else { + System.err.println("Invalid selection"); } } } else { @@ -773,7 +780,7 @@ public class WaveformView implements IWaveformView { public void moveSelection(GotoDirection direction, RelationType relationType) { if(currentWaveformSelection.size() !=1 && currentTxSelection==null) return; TrackEntry selectedWaveform=currentWaveformSelection.size() == 1? - currentWaveformSelection.get(0) : getEntryForStream(currentTxSelection.getStream()); + currentWaveformSelection.get(0) : getEntryFor(currentTxSelection); if(selectedWaveform.waveform.getType()==WaveformType.TRANSACTION && currentTxSelection!=null) { if(relationType.equals(IWaveformView.NEXT_PREV_IN_STREAM)){ ITx transaction = null; @@ -1167,9 +1174,13 @@ public class WaveformView implements IWaveformView { }); } - public TrackEntry getEntryForStream(IWaveform source) { - for(TrackEntry trackEntry:streams) - if(trackEntry.waveform.isSame(source)) return trackEntry; + public TrackEntry getEntryFor(ITx source) { + Optional optGen = streams.stream().filter(e->source.getGenerator().equals(e.waveform)).findFirst(); + if(optGen.isPresent()) + return optGen.get(); + Optional optStr = streams.stream().filter(e->source.getStream().equals(e.waveform)).findFirst(); + if(optStr.isPresent()) + return optStr.get(); return null; } diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java index 26be0d0..f8408af 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java @@ -10,7 +10,6 @@ *******************************************************************************/ package com.minres.scviewer.database; -// TODO: Auto-generated Javadoc /** * The Enum AssociationType. */ diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java index 87ec118..c4a4270 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java @@ -100,15 +100,9 @@ public class DesignBrowser { /** The tree viewer. */ private TreeViewer treeViewer; - /** The name filter of the design browser tree. */ - private Text treeNameFilter; - /** The attribute filter. */ StreamTTreeFilter treeAttributeFilter; - /** The name filter. */ - private Text tableNameFilter; - /** The attribute filter. */ StreamTableFilter tableAttributeFilter; @@ -116,34 +110,30 @@ public class DesignBrowser { private TableViewer txTableViewer; /** The append all item. */ - ToolItem appendItem, insertItem; + ToolItem appendItem; + + ToolItem insertItem; /** The other selection count. */ - int thisSelectionCount=0, otherSelectionCount=0; + int thisSelectionCount=0; + + int otherSelectionCount=0; + + /** The waveform viewer part. */ + private WaveformViewer waveformViewerPart; /** The tree viewer pcl. */ private PropertyChangeListener treeViewerPCL = evt -> { if("CHILDS".equals(evt.getPropertyName())){ //$NON-NLS-1$ - treeViewer.getTree().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - treeViewer.refresh(); - } - }); + treeViewer.getTree().getDisplay().asyncExec(() -> treeViewer.refresh()); } else if("WAVEFORMS".equals(evt.getPropertyName())) { - treeViewer.getTree().getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - IWaveformDb database = waveformViewerPart.getDatabase(); - treeViewer.setInput(Arrays.asList(database.isLoaded()?new IWaveformDb[]{database}:new IWaveformDb[]{new LoadingWaveformDb()})); - } + treeViewer.getTree().getDisplay().asyncExec(() -> { + IWaveformDb database = waveformViewerPart.getDatabase(); + treeViewer.setInput(Arrays.asList(database.isLoaded()?new IWaveformDb[]{database}:new IWaveformDb[]{new LoadingWaveformDb()})); }); } }; - /** The waveform viewer part. */ - private WaveformViewer waveformViewerPart; - /** The sash paint listener. */ protected PaintListener sashPaintListener= e -> { int size=Math.min(e.width, e.height)-1; @@ -192,7 +182,7 @@ public class DesignBrowser { public void createTreeViewerComposite(Composite parent) { parent.setLayout(new GridLayout(1, false)); - treeNameFilter = new Text(parent, SWT.BORDER); + Text treeNameFilter = new Text(parent, SWT.BORDER); treeNameFilter.setMessage(Messages.DesignBrowser_3); treeNameFilter.addModifyListener( e -> { treeAttributeFilter.setSearchText(((Text) e.widget).getText()); @@ -233,7 +223,7 @@ public class DesignBrowser { public void createTableComposite(Composite parent) { parent.setLayout(new GridLayout(1, false)); - tableNameFilter = new Text(parent, SWT.BORDER); + Text tableNameFilter = new Text(parent, SWT.BORDER); tableNameFilter.setMessage(Messages.DesignBrowser_2); tableNameFilter.addModifyListener(e -> { tableAttributeFilter.setSearchText(((Text) e.widget).getText()); diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java index 2a973eb..9fe5e11 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java @@ -181,17 +181,6 @@ public class TransactionDetails { treeViewer.refresh(); } }); - // Add the type column - col2 = new TreeViewerColumn(treeViewer, SWT.NONE); - col2.getColumn().setText(Messages.TransactionDetails_2); - col2.getColumn().setResizable(true); - col2.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(waveformViewerPart, AttributeLabelProvider.TYPE))); - col2.getColumn().addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - ((TxAttributeViewerSorter) treeViewer.getComparator()).doSort(COLUMN_SECOND); - treeViewer.refresh(); - } - }); // Add the value column col3 = new TreeViewerColumn(treeViewer, SWT.NONE); col3.getColumn().setText(Messages.TransactionDetails_3); @@ -203,6 +192,17 @@ public class TransactionDetails { treeViewer.refresh(); } }); + // Add the type column + col2 = new TreeViewerColumn(treeViewer, SWT.NONE); + col2.getColumn().setText(Messages.TransactionDetails_2); + col2.getColumn().setResizable(true); + col2.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(waveformViewerPart, AttributeLabelProvider.TYPE))); + col2.getColumn().addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent event) { + ((TxAttributeViewerSorter) treeViewer.getComparator()).doSort(COLUMN_SECOND); + treeViewer.refresh(); + } + }); // Pack the columns // for (int i = 0, n = table.getColumnCount(); i < n; i++) { // table.getColumn(i).pack(); From 0d448368ccf6e71e08d3a44d54e9cf67023a0c32 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 9 Jan 2021 14:26:49 +0100 Subject: [PATCH 5/5] fix license statement and Sonarlint --- .../feature.xml | 2 +- .../com.minres.scviewer.feature/feature.xml | 2 +- .../build.properties | 2 +- .../database/sqlite/AbstractTxStream.java | 2 +- .../database/sqlite/SQLiteDbLoader.java | 2 +- .../minres/scviewer/database/sqlite/Tx.java | 2 +- .../scviewer/database/sqlite/TxAttribute.java | 2 +- .../scviewer/database/sqlite/TxEvent.java | 2 +- .../scviewer/database/sqlite/TxGenerator.java | 2 +- .../scviewer/database/sqlite/TxRelation.java | 2 +- .../scviewer/database/sqlite/TxStream.java | 2 +- .../sqlite/db/AbstractDatabaseHandler.java | 2 +- .../database/sqlite/db/IDatabase.java | 2 +- .../database/sqlite/db/SQLiteDatabase.java | 2 +- .../db/SQLiteDatabaseInsertHandler.java | 2 +- .../db/SQLiteDatabaseSelectHandler.java | 2 +- .../database/sqlite/tables/ScvGenerator.java | 2 +- .../database/sqlite/tables/ScvSimProps.java | 2 +- .../database/sqlite/tables/ScvStream.java | 2 +- .../database/sqlite/tables/ScvTx.java | 2 +- .../sqlite/tables/ScvTxAttribute.java | 2 +- .../database/sqlite/tables/ScvTxEvent.java | 2 +- .../database/sqlite/tables/ScvTxRelation.java | 2 +- .../build.properties | 2 +- .../build.properties | 2 +- .../scviewer/database/ui/GotoDirection.java | 2 +- .../minres/scviewer/database/ui/ICursor.java | 2 +- .../scviewer/database/ui/IWaveformView.java | 4 +- .../database/ui/IWaveformViewFactory.java | 2 +- .../scviewer/database/ui/TrackEntry.java | 2 +- .../scviewer/database/ui/WaveformColors.java | 2 +- .../database/ui/swt/DatabaseUiPlugin.java | 2 +- .../database/ui/swt/WaveformViewFactory.java | 2 +- .../ui/swt/internal/ArrowPainter.java | 2 +- .../ui/swt/internal/CursorPainter.java | 2 +- .../database/ui/swt/internal/IPainter.java | 2 +- .../ui/swt/internal/IWaveformPainter.java | 2 +- .../ui/swt/internal/ObservableList.java | 2 +- .../ui/swt/internal/RulerPainter.java | 2 +- .../ui/swt/internal/SignalPainter.java | 2 +- .../ui/swt/internal/StreamPainter.java | 2 +- .../ui/swt/internal/TrackAreaPainter.java | 2 +- .../ui/swt/internal/TrackPainter.java | 2 +- .../ui/swt/internal/WaveformCanvas.java | 2 +- .../ui/swt/internal/WaveformView.java | 10 +- .../build.properties | 2 +- .../database/vcd/IVCDDatabaseBuilder.java | 2 +- .../scviewer/database/vcd/VCDDbLoader.java | 2 +- .../scviewer/database/vcd/VCDFileParser.java | 2 +- .../scviewer/database/vcd/VCDSignal.java | 2 +- .../build.properties | 2 +- .../scviewer/database/AssociationType.java | 2 +- .../minres/scviewer/database/BitVector.java | 2 +- .../minres/scviewer/database/DataType.java | 2 +- .../minres/scviewer/database/HierNode.java | 2 +- .../minres/scviewer/database/IWaveform.java | 2 +- .../minres/scviewer/database/IWaveformDb.java | 2 +- .../scviewer/database/IWaveformDbFactory.java | 2 +- .../scviewer/database/IWaveformDbLoader.java | 2 +- .../database/InputFormatException.java | 2 +- .../scviewer/database/RelationType.java | 2 +- .../database/internal/WaveformDb.java | 2 +- .../database/internal/WaveformDbFactory.java | 2 +- .../com/minres/scviewer/database/tx/ITx.java | 2 +- .../scviewer/database/tx/ITxAttribute.java | 2 +- .../database/tx/ITxAttributeType.java | 2 +- .../minres/scviewer/database/tx/ITxEvent.java | 2 +- .../scviewer/database/tx/ITxGenerator.java | 2 +- .../scviewer/database/tx/ITxRelation.java | 2 +- .../scviewer/e4/application/E4LifeCycle.java | 2 +- .../elements/NavigateToolbarContribution.java | 2 +- .../elements/RelationTypeToolControl.java | 2 +- .../e4/application/handlers/AboutHandler.java | 2 +- .../handlers/AddWaveformHandler.java | 2 +- .../handlers/DeleteWaveformHandler.java | 2 +- .../handlers/LoadStoreSettingsHandler.java | 2 +- .../handlers/MoveWaveformHandler.java | 2 +- .../application/handlers/NavigateEvent.java | 2 +- .../application/handlers/NavigateTrans.java | 2 +- .../e4/application/handlers/OpenHandler.java | 2 +- .../e4/application/handlers/QuitHandler.java | 2 +- .../application/handlers/ReloadHandler.java | 2 +- .../e4/application/handlers/SaveHandler.java | 2 +- .../application/handlers/SearchHandler.java | 2 +- .../handlers/SelectAllHandler.java | 2 +- .../handlers/SetRelationTypeHandler.java | 2 +- .../application/handlers/ThemeSetHandler.java | 2 +- .../e4/application/handlers/ZoomHandler.java | 2 +- .../internal/status/HeapStatus.java | 2 +- .../internal/status/IHeapStatusConstants.java | 2 +- .../internal/status/StatusBarControl.java | 2 +- .../application/internal/status/TrimUtil.java | 2 +- .../internal/status/WaveStatusBarControl.java | 2 +- .../internal/util/FileMonitor.java | 2 +- .../internal/util/IFileChangeListener.java | 2 +- .../internal/util/IModificationChecker.java | 2 +- .../e4/application/parts/AboutDialog.java | 2 +- .../e4/application/parts/DesignBrowser.java | 9 +- .../e4/application/parts/PartListener.java | 2 +- .../application/parts/TransactionDetails.java | 50 ++-- .../e4/application/parts/WaveformViewer.java | 224 +++++++----------- .../preferences/DefaultValuesInitializer.java | 2 +- .../preferences/PreferenceConstants.java | 2 +- .../preferences/SCViewerPreferencesPage.java | 2 +- .../preferences/WaveformPreferencesPage.java | 2 +- .../provider/TxDbContentProvider.java | 2 +- .../provider/TxDbLabelProvider.java | 2 +- .../provider/TxPropertiesContentProvider.java | 2 +- .../provider/TxPropertiesLabelProvider.java | 2 +- .../eclipse/wb/swt/SWTResourceManager.java | 2 +- .../ui/TxEditorActionBarContributor.java | 2 +- .../com/minres/scviewer/ui/TxEditorInput.java | 2 +- .../scviewer/ui/TxEditorInputFactory.java | 2 +- .../com/minres/scviewer/ui/TxEditorPart.java | 2 +- .../minres/scviewer/ui/TxEditorPlugin.java | 2 +- .../adapter/ITransactionPropertySource.java | 2 +- .../scviewer/ui/adapter/TxAdapterFactory.java | 2 +- .../minres/scviewer/ui/handler/GotoNext.java | 2 +- .../minres/scviewer/ui/handler/GotoPrev.java | 2 +- .../scviewer/ui/handler/RemoveHandler.java | 2 +- .../com/minres/scviewer/ui/handler/Zoom.java | 2 +- .../minres/scviewer/ui/handler/ZoomInOut.java | 2 +- .../scviewer/ui/views/SelectionTableView.java | 2 +- .../ui/views/TransactionPropertySheet.java | 2 +- .../scviewer/ui/views/TxOutlinePage.java | 2 +- .../provider/TxDbTreeContentProvider.java | 2 +- .../views/provider/TxDbTreeLabelProvider.java | 2 +- .../ui/views/sections/AttributeProperty.java | 2 +- .../ui/views/sections/RelatedProperty.java | 2 +- .../eclipse/wb/swt/SWTResourceManager.java | 2 +- 130 files changed, 256 insertions(+), 291 deletions(-) diff --git a/features/com.minres.scviewer.database.feature/feature.xml b/features/com.minres.scviewer.database.feature/feature.xml index eed494e..bbbf174 100644 --- a/features/com.minres.scviewer.database.feature/feature.xml +++ b/features/com.minres.scviewer.database.feature/feature.xml @@ -12,7 +12,7 @@ text base recording. - Copyright (c) 2015 MINRES Technologies GmbH. + Copyright (c) 2015-2021 MINRES Technologies GmbH. 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 diff --git a/features/com.minres.scviewer.feature/feature.xml b/features/com.minres.scviewer.feature/feature.xml index 1f35310..03c09da 100644 --- a/features/com.minres.scviewer.feature/feature.xml +++ b/features/com.minres.scviewer.feature/feature.xml @@ -12,7 +12,7 @@ built-in text base recording. - Copyright (c) 2015 MINRES Technologies GmbH. + Copyright (c) 2015-2021 MINRES Technologies GmbH. 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/build.properties b/plugins/com.minres.scviewer.database.sqlite/build.properties index 000038b..6a077f3 100644 --- a/plugins/com.minres.scviewer.database.sqlite/build.properties +++ b/plugins/com.minres.scviewer.database.sqlite/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014, 2015 MINRES Technologies GmbH and others. +# Copyright (c) 2014, 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java index ec986a0..cf8ab93 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/AbstractTxStream.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/SQLiteDbLoader.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/SQLiteDbLoader.java index 0b09965..910ffa6 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/SQLiteDbLoader.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/SQLiteDbLoader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/Tx.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/Tx.java index 62f35e1..cd16751 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/Tx.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/Tx.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxAttribute.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxAttribute.java index c6c987c..94fcb18 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxAttribute.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxAttribute.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxEvent.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxEvent.java index 3900e0d..c78d9b8 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxEvent.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java index bad29aa..bc9d707 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxGenerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxRelation.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxRelation.java index 2b092fd..c1e3947 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxRelation.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxRelation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java index 0d821ba..db93cee 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/TxStream.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/AbstractDatabaseHandler.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/AbstractDatabaseHandler.java index aa1efbd..163a049 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/AbstractDatabaseHandler.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/AbstractDatabaseHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/IDatabase.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/IDatabase.java index 92d2405..2842721 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/IDatabase.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/IDatabase.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java index 4d89c33..5e1d31e 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabase.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseInsertHandler.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseInsertHandler.java index a1ec422..bdcc5e0 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseInsertHandler.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseInsertHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java index 17d861b..68b9f2a 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/db/SQLiteDatabaseSelectHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvGenerator.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvGenerator.java index 720455e..b962d4e 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvGenerator.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvGenerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvSimProps.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvSimProps.java index f1fba23..aa77cfe 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvSimProps.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvSimProps.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvStream.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvStream.java index c8140c2..3338cf0 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvStream.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvStream.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTx.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTx.java index 6ca1c1d..075e961 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTx.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTx.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxAttribute.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxAttribute.java index 909a1b7..6a816d5 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxAttribute.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxAttribute.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxEvent.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxEvent.java index bd895f1..8f71c57 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxEvent.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxRelation.java b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxRelation.java index de5b10f..faedec4 100644 --- a/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxRelation.java +++ b/plugins/com.minres.scviewer.database.sqlite/src/com/minres/scviewer/database/sqlite/tables/ScvTxRelation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.text/build.properties b/plugins/com.minres.scviewer.database.text/build.properties index 391d9fb..51e8f5f 100644 --- a/plugins/com.minres.scviewer.database.text/build.properties +++ b/plugins/com.minres.scviewer.database.text/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014, 2015 MINRES Technologies GmbH and others. +# Copyright (c) 2014, 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/build.properties b/plugins/com.minres.scviewer.database.ui.swt/build.properties index 4e2b05a..3a56c2a 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/build.properties +++ b/plugins/com.minres.scviewer.database.ui.swt/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014, 2015 MINRES Technologies GmbH and others. +# Copyright (c) 2014, 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/GotoDirection.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/GotoDirection.java index 4809532..2813ae1 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/GotoDirection.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/GotoDirection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/ICursor.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/ICursor.java index 4f51d1d..9c62a46 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/ICursor.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/ICursor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java index 8b9a3c5..0e71ecf 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 @@ -67,6 +67,8 @@ public interface IWaveformView extends PropertyChangeListener, ISelectionProvide public TrackEntry getEntryFor(ITx source); + public TrackEntry getEntryFor(IWaveform source); + public List getElementsAt(Point pt); public void moveSelectedTrack(int i); diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformViewFactory.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformViewFactory.java index f535534..730da62 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformViewFactory.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/IWaveformViewFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/TrackEntry.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/TrackEntry.java index e8dbd1d..eeec8d0 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/TrackEntry.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/TrackEntry.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/WaveformColors.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/WaveformColors.java index 3c77796..78340b5 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/WaveformColors.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/WaveformColors.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/DatabaseUiPlugin.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/DatabaseUiPlugin.java index 26fa9ac..98aa447 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/DatabaseUiPlugin.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/DatabaseUiPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/WaveformViewFactory.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/WaveformViewFactory.java index fc997b2..7228190 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/WaveformViewFactory.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/WaveformViewFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java index 4e21fba..dfeeb16 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ArrowPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/CursorPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/CursorPainter.java index a5dcde9..09e0777 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/CursorPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/CursorPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IPainter.java index 745ec5e..3d73cbe 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IWaveformPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IWaveformPainter.java index da1c814..9fcd899 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IWaveformPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/IWaveformPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ObservableList.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ObservableList.java index 21f90d4..20237d9 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ObservableList.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/ObservableList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/RulerPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/RulerPainter.java index be31f05..8408294 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/RulerPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/RulerPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java index 896d7fb..40a5bc9 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/SignalPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/StreamPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/StreamPainter.java index 6ca51b5..6592632 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/StreamPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/StreamPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java index 5f2ecb8..90326e3 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackAreaPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackPainter.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackPainter.java index 762d505..123e9af 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackPainter.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/TrackPainter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java index f08178b..eba6cb4 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformCanvas.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java index 16172a5..8927a3c 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java +++ b/plugins/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/ui/swt/internal/WaveformView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 @@ -1184,6 +1184,14 @@ public class WaveformView implements IWaveformView { return null; } + @Override + public TrackEntry getEntryFor(IWaveform source) { + Optional optGen = streams.stream().filter(e->source.equals(e.waveform)).findFirst(); + if(optGen.isPresent()) + return optGen.get(); + return null; + } + public List getElementsAt(Point pt){ return waveformCanvas.getElementsAt(pt); } diff --git a/plugins/com.minres.scviewer.database.vcd/build.properties b/plugins/com.minres.scviewer.database.vcd/build.properties index 5f30e48..b8cb5ba 100644 --- a/plugins/com.minres.scviewer.database.vcd/build.properties +++ b/plugins/com.minres.scviewer.database.vcd/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014, 2015 MINRES Technologies GmbH and others. +# Copyright (c) 2014, 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java index 5655840..7347bed 100644 --- a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java +++ b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java index 7639ced..62a9851 100644 --- a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java +++ b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java index bed4f89..3135345 100644 --- a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java +++ b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java index 378cccf..05f27d4 100644 --- a/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java +++ b/plugins/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/build.properties b/plugins/com.minres.scviewer.database/build.properties index f5c8f4f..8e6dc18 100644 --- a/plugins/com.minres.scviewer.database/build.properties +++ b/plugins/com.minres.scviewer.database/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2014, 2015 - 2020 MINRES Technologies GmbH and others. +# Copyright (c) 2014, 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java index f8408af..0994f5a 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/AssociationType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java index c53fc27..bf8c576 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/DataType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/DataType.java index 09cce50..967078b 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/DataType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/DataType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/HierNode.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/HierNode.java index b38b285..fbcb3bf 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/HierNode.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/HierNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java index 9e1bd83..73d551e 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveform.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java index 435c6f7..f4e60fa 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDb.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java index cb40d78..e2350a6 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java index 099fa63..3cff5b9 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/IWaveformDbLoader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java index 2ed0124..0945c0b 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/InputFormatException.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java index 3fe2ceb..2c22383 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/RelationType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java index 5e548e5..6930e06 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDb.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java index 3fb710c..17caf71 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/internal/WaveformDbFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java index 524a70a..afed810 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITx.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java index 39c4a6c..fc24e8b 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttribute.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java index e204094..aa21420 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxAttributeType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java index 7c4930a..e2de304 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java index 5daf7bb..54398c1 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxGenerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java index f994357..bdd42e1 100644 --- a/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java +++ b/plugins/com.minres.scviewer.database/src/com/minres/scviewer/database/tx/ITxRelation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 - 2020 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java index 54de3da..4ef9f5b 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateToolbarContribution.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateToolbarContribution.java index fc8db23..2660afd 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateToolbarContribution.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateToolbarContribution.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/RelationTypeToolControl.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/RelationTypeToolControl.java index 57b1914..bb24484 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/RelationTypeToolControl.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/RelationTypeToolControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java index b53ec5c..150d7f6 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AddWaveformHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AddWaveformHandler.java index 4965478..38223d3 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AddWaveformHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AddWaveformHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/DeleteWaveformHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/DeleteWaveformHandler.java index badbf5d..b0228b7 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/DeleteWaveformHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/DeleteWaveformHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/LoadStoreSettingsHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/LoadStoreSettingsHandler.java index fc575c9..4c2531a 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/LoadStoreSettingsHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/LoadStoreSettingsHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/MoveWaveformHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/MoveWaveformHandler.java index 388a931..4d2a491 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/MoveWaveformHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/MoveWaveformHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateEvent.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateEvent.java index 4c4ad61..e76b7cb 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateEvent.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateTrans.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateTrans.java index f73c811..0189401 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateTrans.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/NavigateTrans.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/OpenHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/OpenHandler.java index 2fc5a9b..de4afaf 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/OpenHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/OpenHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/QuitHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/QuitHandler.java index 9c7a6f1..d2ff37f 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/QuitHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/QuitHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ReloadHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ReloadHandler.java index 6c53a63..6f22711 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ReloadHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ReloadHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SaveHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SaveHandler.java index eb4ac91..a30671d 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SaveHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SaveHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SearchHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SearchHandler.java index 3e77803..dfa24e3 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SearchHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SearchHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SelectAllHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SelectAllHandler.java index a641546..3a09ac7 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SelectAllHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SelectAllHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SetRelationTypeHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SetRelationTypeHandler.java index a1a263e..629a785 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SetRelationTypeHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/SetRelationTypeHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ThemeSetHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ThemeSetHandler.java index 7cc12e3..468d276 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ThemeSetHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ThemeSetHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ZoomHandler.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ZoomHandler.java index 2e2b495..4bae012 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ZoomHandler.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ZoomHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/HeapStatus.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/HeapStatus.java index d94a9ea..9cf6433 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/HeapStatus.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/HeapStatus.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/IHeapStatusConstants.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/IHeapStatusConstants.java index d6713e3..53ac11c 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/IHeapStatusConstants.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/IHeapStatusConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/StatusBarControl.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/StatusBarControl.java index e51d975..f1a598a 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/StatusBarControl.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/StatusBarControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/TrimUtil.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/TrimUtil.java index 81d7974..59a5436 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/TrimUtil.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/TrimUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/WaveStatusBarControl.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/WaveStatusBarControl.java index 458860a..56ff3fa 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/WaveStatusBarControl.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/status/WaveStatusBarControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/FileMonitor.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/FileMonitor.java index cd4fdc9..e933f98 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/FileMonitor.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/FileMonitor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IFileChangeListener.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IFileChangeListener.java index 550f21d..6c56ab6 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IFileChangeListener.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IFileChangeListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IModificationChecker.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IModificationChecker.java index b002def..f97ed1f 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IModificationChecker.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/internal/util/IModificationChecker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java index d137e59..c63aea0 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java index c4a4270..4032795 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/DesignBrowser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 @@ -79,6 +79,7 @@ public class DesignBrowser { /** The Constant POPUP_ID. */ private static final String POPUP_ID="com.minres.scviewer.e4.application.parts.DesignBrowser.popupmenu"; //$NON-NLS-1$ + private static final String AFTER="after"; //$NON-NLS-1$ /** The event broker. */ @Inject IEventBroker eventBroker; @@ -241,7 +242,7 @@ public class DesignBrowser { txTableViewer.addFilter(tableAttributeFilter); txTableViewer.addDoubleClickListener(event -> { AddWaveformHandler myHandler = new AddWaveformHandler(); - Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$ + Object result = runCommand(myHandler, CanExecute.class, AFTER, false); //$NON-NLS-1$ if(result!=null && (Boolean)result) ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx); }); @@ -263,7 +264,7 @@ public class DesignBrowser { @Override public void widgetSelected(SelectionEvent e) { AddWaveformHandler myHandler = new AddWaveformHandler(); - Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$ + Object result = runCommand(myHandler, CanExecute.class, AFTER, false); //$NON-NLS-1$ if(result!=null && (Boolean)result) ContextInjectionFactory.invoke(myHandler, Execute.class, eclipseCtx); } @@ -371,7 +372,7 @@ public class DesignBrowser { private void updateButtons() { if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed()){ AddWaveformHandler myHandler = new AddWaveformHandler(); - Object result = runCommand(myHandler, CanExecute.class, "after", false); //$NON-NLS-1$ + Object result = runCommand(myHandler, CanExecute.class, AFTER, false); //$NON-NLS-1$ appendItem.setEnabled(result instanceof Boolean && (Boolean)result); result = runCommand(myHandler, CanExecute.class, "before", false); //$NON-NLS-1$ insertItem.setEnabled(result instanceof Boolean && (Boolean)result); diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/PartListener.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/PartListener.java index 9f6b7d3..5f7d999 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/PartListener.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/PartListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java index 9fe5e11..a64fc74 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 @@ -29,8 +29,6 @@ import org.eclipse.e4.ui.services.IServiceConstants; import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.e4.ui.workbench.modeling.ESelectionService; import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider; -import org.eclipse.jface.viewers.DoubleClickEvent; -import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeViewerListener; @@ -42,8 +40,6 @@ import org.eclipse.jface.viewers.TreeViewerColumn; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ControlAdapter; import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Point; @@ -58,9 +54,10 @@ import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeItem; import com.minres.scviewer.database.tx.ITx; +import com.minres.scviewer.database.tx.ITxAttribute; import com.minres.scviewer.e4.application.Messages; -import com.minres.scviewer.e4.application.parts.txTableTree.AttributeLabelProvider; import com.minres.scviewer.e4.application.parts.txTableTree.AbstractTransactionTreeContentProvider; +import com.minres.scviewer.e4.application.parts.txTableTree.AttributeLabelProvider; import com.minres.scviewer.e4.application.parts.txTableTree.TransactionTreeNode; import com.minres.scviewer.e4.application.parts.txTableTree.TransactionTreeNodeType; import com.minres.scviewer.e4.application.parts.txTableTree.TxAttributeFilter; @@ -95,8 +92,12 @@ public class TransactionDetails { private TreeViewer treeViewer; /** The col3. */ - private TreeViewerColumn col1, col2, col3; + private TreeViewerColumn col1; + private TreeViewerColumn col2; + + private TreeViewerColumn col3; + /** The attribute filter. */ TxAttributeFilter attributeFilter; @@ -123,13 +124,10 @@ public class TransactionDetails { nameFilter = new Text(top, SWT.BORDER); nameFilter.setMessage(Messages.TransactionDetails_0); - nameFilter.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { + nameFilter.addModifyListener(e -> { attributeFilter.setSearchText(((Text) e.widget).getText()); treeViewer.refresh(); treeViewer.expandAll(true); - } }); nameFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -176,6 +174,7 @@ public class TransactionDetails { col1.getColumn().setResizable(true); col1.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(waveformViewerPart, AttributeLabelProvider.NAME))); col1.getColumn().addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent event) { ((TxAttributeViewerSorter) treeViewer.getComparator()).doSort(COLUMN_FIRST); treeViewer.refresh(); @@ -187,6 +186,7 @@ public class TransactionDetails { col3.getColumn().setResizable(true); col3.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(waveformViewerPart, AttributeLabelProvider.VALUE))); col3.getColumn().addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent event) { ((TxAttributeViewerSorter) treeViewer.getComparator()).doSort(COLUMN_SECOND); treeViewer.refresh(); @@ -198,6 +198,7 @@ public class TransactionDetails { col2.getColumn().setResizable(true); col2.setLabelProvider(new DelegatingStyledCellLabelProvider(new AttributeLabelProvider(waveformViewerPart, AttributeLabelProvider.TYPE))); col2.getColumn().addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent event) { ((TxAttributeViewerSorter) treeViewer.getComparator()).doSort(COLUMN_SECOND); treeViewer.refresh(); @@ -212,10 +213,7 @@ public class TransactionDetails { tree.setHeaderVisible(true); tree.setLinesVisible(true); - treeViewer.addDoubleClickListener(new IDoubleClickListener(){ - - @Override - public void doubleClick(DoubleClickEvent event) { + treeViewer.addDoubleClickListener(event -> { ISelection selection = treeViewer.getSelection(); if(selection instanceof IStructuredSelection){ IStructuredSelection structuredSelection = (IStructuredSelection) selection; @@ -228,10 +226,9 @@ public class TransactionDetails { } } } - } - }); top.addControlListener(new ControlAdapter() { + @Override public void controlResized(ControlEvent e) { Tree table = treeViewer.getTree(); Rectangle area = top.getClientArea(); @@ -294,8 +291,8 @@ public class TransactionDetails { this.names = names; this.paths = paths; } - public List names; - public TreePath[] paths; + public final List names; + public final TreePath[] paths; } HashMap settings = new HashMap<>(); @@ -325,8 +322,8 @@ public class TransactionDetails { int getAttrNameHash(Object o) { if(o instanceof ITx) { ITx tx = (ITx) o; - List attr_names = tx.getAttributes().stream().map(a -> a.getName()).collect(Collectors.toList()); - return Objects.hash(attr_names); + List attrNames = tx.getAttributes().stream().map(ITxAttribute::getName).collect(Collectors.toList()); + return Objects.hash(attrNames); } else return o.hashCode(); @@ -371,7 +368,7 @@ public class TransactionDetails { List getTopItemHier(TreeItem node){ if(node == null) { - return new ArrayList(); + return new ArrayList<>(); } else { List elems = getTopItemHier(node.getParentItem()); elems.add(node.getText(0)); @@ -380,7 +377,7 @@ public class TransactionDetails { } private void setTopItemFromHier(List names, TreeItem [] items) { - if(names.size()==0) return; + if(names.isEmpty()) return; for (TreeItem item : items) { // find item from category if(item.getText(0).equals(names.get(0))) { if(names.size()==1 || item.getItemCount()==0) { @@ -404,10 +401,9 @@ public class TransactionDetails { MPart part = partService.getActivePart(); if( part == null || ! (part.getObject() instanceof WaveformViewer ) || part.getObject() != waveformViewerPart) return; - if(treeViewer!=null && selection!=null && !treeViewer.getTree().isDisposed()){ - if( selection instanceof IStructuredSelection && !selection.isEmpty()) { - setInput(((IStructuredSelection)selection).getFirstElement()); - } + if(treeViewer!=null && selection!=null && !treeViewer.getTree().isDisposed() && + selection instanceof IStructuredSelection && !selection.isEmpty()) { + setInput(selection.getFirstElement()); } } } diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index 6d35d7c..213d799 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 @@ -10,8 +10,6 @@ *******************************************************************************/ package com.minres.scviewer.e4.application.parts; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -55,17 +53,13 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.e4.ui.workbench.modeling.ESelectionService; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.FocusListener; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; @@ -73,9 +67,7 @@ import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; @@ -161,8 +153,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis /** The Constant WAVE_ACTION_ID. */ public static final String WAVE_ACTION_ID = "com.minres.scviewer.ui.action.AddToWave"; //$NON-NLS-1$ + private static final String MENU_CONTEXT = "com.minres.scviewer.e4.application.popupmenu.wavecontext"; //$NON-NLS-1$ + /** The number of active DisposeListeners */ - private static int disposeListenerNumber = 0; + private int disposeListenerNumber = 0; /** The factory. */ WaveformViewFactory factory = new WaveformViewFactory(); @@ -238,7 +232,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis @Inject Composite parent; - private Boolean showHover; + private boolean showHover; /** * Creates the composite. @@ -256,17 +250,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis store=prefs; showHover=hover; database = dbFactory.getDatabase(); - database.addPropertyChangeListener(new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - if ("WAVEFORMS".equals(evt.getPropertyName())) { //$NON-NLS-1$ - myParent.getDisplay().syncExec(new Runnable() { - @Override - public void run() { - waveformPane.setMaxTime(database.getMaxTime()); - } - }); - } + database.addPropertyChangeListener(evt -> { + if ("WAVEFORMS".equals(evt.getPropertyName())) { //$NON-NLS-1$ + myParent.getDisplay().syncExec(() -> waveformPane.setMaxTime(database.getMaxTime())); } }); parent.setLayout(new FillLayout(SWT.HORIZONTAL)); @@ -300,38 +286,26 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis //set selection to empty selection when opening a new waveformPane selectionService.setSelection(new StructuredSelection()); - waveformPane.addPropertyChangeListener(IWaveformView.CURSOR_PROPERTY, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { + waveformPane.addPropertyChangeListener(IWaveformView.CURSOR_PROPERTY, evt -> { Long time = (Long) evt.getNewValue(); eventBroker.post(WaveStatusBarControl.CURSOR_TIME, waveformPane.getScaledTime(time)); long marker = waveformPane.getMarkerTime(waveformPane.getSelectedMarkerId()); eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(time - marker)); - - } }); - waveformPane.addPropertyChangeListener(IWaveformView.MARKER_PROPERTY, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { + waveformPane.addPropertyChangeListener(IWaveformView.MARKER_PROPERTY, evt -> { Long time = (Long) evt.getNewValue(); eventBroker.post(WaveStatusBarControl.MARKER_TIME, waveformPane.getScaledTime(time)); long cursor = waveformPane.getCursorTime(); eventBroker.post(WaveStatusBarControl.MARKER_DIFF, waveformPane.getScaledTime(cursor - time)); - } }); - waveformPane.addSelectionChangedListener(new ISelectionChangedListener() { - @Override - public void selectionChanged(SelectionChangedEvent event) { + waveformPane.addSelectionChangedListener(event -> { if (event.getSelection() instanceof IStructuredSelection) { selectionService.setSelection(event.getSelection()); } - } }); - waveformPane.getWaveformControl().addListener(SWT.KeyDown, new Listener() { - @Override - public void handleEvent(Event e) { + waveformPane.getWaveformControl().addListener(SWT.KeyDown, e -> { if((e.stateMask&SWT.MOD3)!=0) { // Alt key } else if((e.stateMask&SWT.MOD1)!=0) { //Ctrl/Cmd int zoomlevel = waveformPane.getZoomLevel(); @@ -352,6 +326,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis case SWT.ARROW_DOWN: waveformPane.moveSelectedTrack(1); return; + default: + break; } } else if((e.stateMask&SWT.MOD2)!=0) { //Shift switch(e.keyCode) { @@ -361,6 +337,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis case SWT.ARROW_RIGHT: waveformPane.scrollHorizontal(100); return; + default: + break; } } else { switch(e.keyCode) { @@ -378,31 +356,27 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis return; case SWT.HOME: return; //TODO: should be handled case SWT.END: return; //TODO: should be handled + default: + break; } } - } }); zoomLevel = waveformPane.getZoomLevels(); checkForUpdates = store.getBoolean(PreferenceConstants.DATABASE_RELOAD, true); - filesToLoad = new ArrayList(); + filesToLoad = new ArrayList<>(); persistedState = part.getPersistedState(); 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))); } - if (filesToLoad.size() > 0) + if (!filesToLoad.isEmpty()) loadDatabase(persistedState); eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[waveformPane.getZoomLevel()]); -// menuService.registerContextMenu(waveformPane.getNameControl(), -// "com.minres.scviewer.e4.application.popupmenu.namecontext"); //$NON-NLS-1$ - menuService.registerContextMenu(waveformPane.getNameControl(), - "com.minres.scviewer.e4.application.popupmenu.wavecontext"); //$NON-NLS-1$ - menuService.registerContextMenu(waveformPane.getValueControl(), - "com.minres.scviewer.e4.application.popupmenu.wavecontext"); //$NON-NLS-1$ - menuService.registerContextMenu(waveformPane.getWaveformControl(), - "com.minres.scviewer.e4.application.popupmenu.wavecontext"); //$NON-NLS-1$ + menuService.registerContextMenu(waveformPane.getNameControl(), MENU_CONTEXT); + menuService.registerContextMenu(waveformPane.getValueControl(), MENU_CONTEXT); + menuService.registerContextMenu(waveformPane.getWaveformControl(), MENU_CONTEXT); ePartService.addPartListener(new PartListener() { @Override public void partActivated(MPart part) { @@ -426,7 +400,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis public boolean createContent(Composite parent, Point pt) { if(!showHover) return false; List res = waveformPane.getElementsAt(pt); - if(res.size()>0) + if(!res.isEmpty()) { if(res.get(0) instanceof ITx) { ITx tx = (ITx)res.get(0); final Display display = parent.getDisplay(); @@ -478,18 +452,13 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis nameCol.pack(); valueCol.pack(); table.setSize(table.computeSize(SWT.DEFAULT, SWT.DEFAULT)); - parent.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { + parent.addPaintListener( e -> { Rectangle area = parent.getClientArea(); valueCol.setWidth(area.width - nameCol.getWidth()); - } }); - parent.addFocusListener(FocusListener.focusGainedAdapter(e -> { - table.setFocus(); - })); + parent.addFocusListener(FocusListener.focusGainedAdapter(e -> table.setFocus())); return true; - } else if(res.get(0) instanceof TrackEntry) { + } else if(res.get(0) instanceof TrackEntry) { TrackEntry te = (TrackEntry)res.get(0); final Font font = new Font(Display.getCurrent(), "Terminal", 10, SWT.NORMAL); @@ -502,6 +471,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis label.setLayoutData(labelGridData); return true; } + } return false; } }); @@ -524,7 +494,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis @Inject @Optional public void reactOnReloadDatabaseChange(@Preference(nodePath = PreferenceConstants.PREFERENCES_SCOPE, value = PreferenceConstants.DATABASE_RELOAD) Boolean checkForUpdates) { - if (checkForUpdates) { + if (checkForUpdates.booleanValue()) { fileChecker = fileMonitor.addFileChangeListener(WaveformViewer.this, filesToLoad, FILE_CHECK_INTERVAL); } else { fileMonitor.removeFileChangeListener(WaveformViewer.this); @@ -579,7 +549,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis }); try { jobGroup.join(0, monitor); - } catch (OperationCanceledException | InterruptedException e) { + } catch (OperationCanceledException e) { + throw new OperationCanceledException(Messages.WaveformViewer_14); + }catch (InterruptedException e) { + // Restore interrupted state... + Thread.currentThread().interrupt(); throw new OperationCanceledException(Messages.WaveformViewer_14); } if (monitor.isCanceled()) @@ -618,15 +592,11 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis @Override public void fileChanged(List file) { final Display display = myParent.getDisplay(); - display.asyncExec(new Runnable() { - @Override - public void run() { + display.asyncExec(() -> { if (MessageDialog.openQuestion(display.getActiveShell(), Messages.WaveformViewer_17, Messages.WaveformViewer_18)) { reloadDatabase(); } - } - }); fileMonitor.removeFileChangeListener(this); } @@ -636,7 +606,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis saveWaveformViewerState(state); waveformPane.getStreamList().clear(); database.clear(); - if (filesToLoad.size() > 0) + if (!filesToLoad.isEmpty()) loadDatabase(state, 0L); } @@ -658,9 +628,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis if(partConfig!=null) { this.partConfig=partConfig; } - if (filesToLoad.size() > 0) + if (!filesToLoad.isEmpty()) loadDatabase(persistedState); - if(partConfig.length()>0) + if(partConfig!=null && !partConfig.isEmpty()) loadState(partConfig); } @@ -680,53 +650,48 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis @PersistState public void saveState(MPart part) { // save changes - Map persistedState = part.getPersistedState(); - persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size())); //$NON-NLS-1$ + Map persistingState = part.getPersistedState(); + persistingState.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()); + persistingState.put(DATABASE_FILE + index, file.getAbsolutePath()); index++; } - saveWaveformViewerState(persistedState); + saveWaveformViewerState(persistingState); } public void saveState(String fileName){ - Map persistedState = new HashMap<>(); - persistedState.put(DATABASE_FILE + "S", Integer.toString(filesToLoad.size())); //$NON-NLS-1$ + Map persistingState = new HashMap<>(); + persistingState.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()); + persistingState.put(DATABASE_FILE + index, file.getAbsolutePath()); index++; } - saveWaveformViewerState(persistedState); + saveWaveformViewerState(persistingState); Properties props = new Properties(); - props.putAll(persistedState); + props.putAll(persistingState); - try { - - FileOutputStream out = new FileOutputStream(fileName); - props.store(out, "Written by SCViewer"); //$NON-NLS-1$ - out.close(); + try (FileOutputStream out = new FileOutputStream(fileName)) { + props.store(out, "Written by SCViewer"); //$NON-NLS-1$ } catch (IOException e) { e.printStackTrace(); } } public void loadState(String fileName){ - Properties props = new Properties(); - try { - //clear old streams before loading tab settings - if(!waveformPane.getStreamList().isEmpty()) { - waveformPane.getStreamList().clear(); - for (TrackEntry trackEntry : waveformPane.getStreamList()) { - trackEntry.selected = false; - } + //clear old streams before loading tab settings + if(!waveformPane.getStreamList().isEmpty()) { + waveformPane.getStreamList().clear(); + for (TrackEntry trackEntry : waveformPane.getStreamList()) { + trackEntry.selected = false; } - FileInputStream in = new FileInputStream(fileName); + } + try (FileInputStream in = new FileInputStream(fileName)) { + Properties props = new Properties(); props.load(in); - in.close(); @SuppressWarnings({ "unchecked", "rawtypes" }) - HashMap propMap = new HashMap((Map) props); + HashMap propMap = new HashMap<>((Map) props); restoreWaveformViewerState(propMap); } catch(FileNotFoundException e) { } catch (IOException e) { @@ -737,27 +702,27 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis /** * Save waveform viewer state. * - * @param persistedState the persisted state + * @param persistingState the persisted state */ - protected void saveWaveformViewerState(Map persistedState) { - persistedState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size())); //$NON-NLS-1$ + protected void saveWaveformViewerState(Map persistingState) { + persistingState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size())); //$NON-NLS-1$ Integer index = 0; for (TrackEntry trackEntry : waveformPane.getStreamList()) { - persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName()); - persistedState.put(SHOWN_WAVEFORM + index + VALUE_DISPLAY, trackEntry.valueDisplay.toString()); - persistedState.put(SHOWN_WAVEFORM + index + WAVE_DISPLAY, trackEntry.waveDisplay.toString()); - persistedState.put(SHOWN_WAVEFORM + index + WAVEFORM_SELECTED, String.valueOf(trackEntry.selected).toUpperCase()); + persistingState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName()); + persistingState.put(SHOWN_WAVEFORM + index + VALUE_DISPLAY, trackEntry.valueDisplay.toString()); + persistingState.put(SHOWN_WAVEFORM + index + WAVE_DISPLAY, trackEntry.waveDisplay.toString()); + persistingState.put(SHOWN_WAVEFORM + index + WAVEFORM_SELECTED, String.valueOf(trackEntry.selected).toUpperCase()); index++; } List cursors = waveformPane.getCursorList(); - persistedState.put(SHOWN_CURSOR + "S", Integer.toString(cursors.size())); //$NON-NLS-1$ + persistingState.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())); + persistingState.put(SHOWN_CURSOR + index, Long.toString(cursor.getTime())); index++; } - persistedState.put(ZOOM_LEVEL, Integer.toString(waveformPane.getZoomLevel())); - persistedState.put(BASE_LINE_TIME, Long.toString(waveformPane.getBaselineTime())); + persistingState.put(ZOOM_LEVEL, Integer.toString(waveformPane.getZoomLevel())); + persistingState.put(BASE_LINE_TIME, Long.toString(waveformPane.getBaselineTime())); // get selected transaction of a stream ISelection selection = waveformPane.getSelection(); @@ -767,16 +732,16 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis ITx tx = (ITx) sel.get(0); TrackEntry te = (TrackEntry) sel.get(1); // get transaction id - persistedState.put(SELECTED_TX_ID, Long.toString(tx.getId())); + persistingState.put(SELECTED_TX_ID, Long.toString(tx.getId())); //get TrackEntry name String name = te.waveform.getFullName(); - persistedState.put(SELECTED_TRACKENTRY_NAME, name); + persistingState.put(SELECTED_TRACKENTRY_NAME, name); } } } protected List getISelection(ISelection selection){ - List result = new LinkedList (); + List result = new LinkedList<> (); if ( selection instanceof IStructuredSelection ) { Iterator i = ((IStructuredSelection)selection).iterator(); @@ -804,7 +769,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis if (waveform != null) { TrackEntry t = waveformPane.addWaveform(waveform, -1); //check if t is selected - boolean isSelected = Boolean.valueOf(state.get(SHOWN_WAVEFORM + i + WAVEFORM_SELECTED)); + boolean isSelected = Boolean.parseBoolean(state.get(SHOWN_WAVEFORM + i + WAVEFORM_SELECTED)); if(isSelected) { t.selected = true; } else { @@ -852,19 +817,20 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis boolean found = false; // TODO: find transaction by time? To avoid 3x for-loop for( IEvent[] lev : te.waveform.getEvents().values() ) { - if(lev == null) continue; - for(IEvent itxe : lev) { - if(itxe == null || !(itxe instanceof ITxEvent)) continue; - ITx itx = ((ITxEvent)itxe).getTransaction(); - if(itx.getId() == txId) { - found = true; - ArrayList selectionList = new ArrayList(); - selectionList.add(te); - selectionList.add(itx); - waveformPane.setSelection(new StructuredSelection (selectionList)); - break; + if(lev != null) + for(IEvent itxe : lev) { + if(itxe instanceof ITxEvent) { + ITx itx = ((ITxEvent)itxe).getTransaction(); + if(itx.getId().equals(txId)) { + found = true; + ArrayList selectionList = new ArrayList<>(); + selectionList.add(te); + selectionList.add(itx); + waveformPane.setSelection(new StructuredSelection (selectionList)); + break; + } + } } - } if(found) break; } break; @@ -913,11 +879,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis * @return true, if successful */ protected boolean askIfToLoad(File txFile) { - if (txFile.exists() && MessageDialog.openQuestion(myParent.getDisplay().getActiveShell(), Messages.WaveformViewer_37, - Messages.WaveformViewer_38 + txFile.getName() + Messages.WaveformViewer_39)) { - return true; - } - return false; + return txFile.exists() && MessageDialog.openQuestion(myParent.getDisplay().getActiveShell(), Messages.WaveformViewer_37, + Messages.WaveformViewer_38 + txFile.getName() + Messages.WaveformViewer_39); } /** @@ -995,8 +958,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis } else { Object first = selection.getFirstElement(); if(first instanceof ITx) { - IWaveform stream = (first instanceof ITx) ? ((ITx) first).getStream() : (IWaveform) first; - TrackEntry trackEntry = waveformPane.getEntryForStream(stream); + TrackEntry trackEntry = waveformPane.getEntryFor((ITx) first); if (insert) { int index = waveformPane.getStreamList().indexOf(trackEntry); for (IWaveform waveform : iWaveforms) @@ -1025,7 +987,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis waveformPane.deleteSelectedTracks(); } - public void removeStreamFromList(ISelection sel) { + public void removeSelectedStreamFromList() { waveformPane.deleteSelectedTracks(); } /** @@ -1072,7 +1034,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis * @param level the new zoom level */ public void setZoomLevel(Integer level) { - //System.out.println("setZoomLevel() - ZoomLevel: " + level); if (level < 0) level = 0; if (level > zoomLevel.length - 1) @@ -1095,7 +1056,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis boolean foundZoom=false; //try to find existing zoomlevel where scaleFactor*clientAreaWidth >= maxTime, if one is found set it as new zoomlevel for (int level=0; level= maxTime) { setZoomLevel(level); @@ -1280,9 +1241,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis } public void search(String propName, DataType type, String propValue) { -// StructuredSelection sel = (StructuredSelection) getSelection(); -// TrackEntry e = findTrackEntry((sel).toArray()); -// if(e==null) return; transactionList.getControl().setSearchProps(propName, type, propValue); } } \ No newline at end of file diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java index e7c1e64..86692e3 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java index 9146fe6..8200463 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/PreferenceConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java index fe80cef..0099795 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/SCViewerPreferencesPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/WaveformPreferencesPage.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/WaveformPreferencesPage.java index fdab816..79ce4fb 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/WaveformPreferencesPage.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/WaveformPreferencesPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java index b55dae3..d009bd9 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbLabelProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbLabelProvider.java index a267de6..b66e0cb 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbLabelProvider.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxDbLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesContentProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesContentProvider.java index d13b681..b5cf7c8 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesContentProvider.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesLabelProvider.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesLabelProvider.java index 340f616..97263aa 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesLabelProvider.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/provider/TxPropertiesLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/SWTResourceManager.java b/plugins/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/SWTResourceManager.java index 4974bee..cd49be1 100644 --- a/plugins/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/SWTResourceManager.java +++ b/plugins/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/SWTResourceManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorActionBarContributor.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorActionBarContributor.java index 249c759..0e94297 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorActionBarContributor.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorActionBarContributor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInput.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInput.java index 10654ad..bae3807 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInput.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInput.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInputFactory.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInputFactory.java index cb58c0b..65018c0 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInputFactory.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorInputFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java index fbcca4f..f2dc9b9 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPlugin.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPlugin.java index 8550cd2..f4ad1a8 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPlugin.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/ITransactionPropertySource.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/ITransactionPropertySource.java index 450be66..32d2a3e 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/ITransactionPropertySource.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/ITransactionPropertySource.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/TxAdapterFactory.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/TxAdapterFactory.java index 383dd77..25fcbfd 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/TxAdapterFactory.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/adapter/TxAdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoNext.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoNext.java index 2e8b036..11ea07c 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoNext.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoNext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoPrev.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoPrev.java index b1f5f72..7237f41 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoPrev.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/GotoPrev.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/RemoveHandler.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/RemoveHandler.java index 0fd6d77..e4b32d7 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/RemoveHandler.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/RemoveHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/Zoom.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/Zoom.java index 1b99c08..b21ec11 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/Zoom.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/Zoom.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/ZoomInOut.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/ZoomInOut.java index 5fa9887..4f1c59f 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/ZoomInOut.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/handler/ZoomInOut.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/SelectionTableView.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/SelectionTableView.java index 4c0a65a..7c9b6ae 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/SelectionTableView.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/SelectionTableView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TransactionPropertySheet.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TransactionPropertySheet.java index f3db535..a0e0373 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TransactionPropertySheet.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TransactionPropertySheet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TxOutlinePage.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TxOutlinePage.java index f18ea3c..2ebc292 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TxOutlinePage.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/TxOutlinePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeContentProvider.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeContentProvider.java index d3a8b5a..cf40ffa 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeContentProvider.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeLabelProvider.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeLabelProvider.java index 359005b..53f3dbc 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeLabelProvider.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/provider/TxDbTreeLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java index 72f2c44..8103fb4 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/RelatedProperty.java b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/RelatedProperty.java index c8ce08b..1833506 100644 --- a/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/RelatedProperty.java +++ b/plugins/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/RelatedProperty.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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 diff --git a/plugins/com.minres.scviewer.ui/src/org/eclipse/wb/swt/SWTResourceManager.java b/plugins/com.minres.scviewer.ui/src/org/eclipse/wb/swt/SWTResourceManager.java index 99d8452..8683183 100644 --- a/plugins/com.minres.scviewer.ui/src/org/eclipse/wb/swt/SWTResourceManager.java +++ b/plugins/com.minres.scviewer.ui/src/org/eclipse/wb/swt/SWTResourceManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 MINRES Technologies GmbH and others. + * Copyright (c) 2015-2021 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