fix full name display of generators

This commit is contained in:
Eyck Jentzsch 2021-03-02 19:32:09 +01:00
parent 7f7fdf09f4
commit c5d77af0d0
3 changed files with 14 additions and 1 deletions

View File

@ -167,7 +167,9 @@ public class TextDbLoader implements IWaveformDbLoader {
*/ */
@Override @Override
public Collection<IWaveform> getAllWaves() { public Collection<IWaveform> getAllWaves() {
return new ArrayList<>(txStreams.values()); ArrayList<IWaveform> ret = new ArrayList<>(txStreams.values());
ret.addAll(txGenerators.values());
return ret;
} }
/** /**

View File

@ -82,5 +82,15 @@ class TxGenerator extends AbstractTxStream {
public String getKind() { public String getKind() {
return stream.getKind(); return stream.getKind();
} }
/**
* Gets the full hierarchical name.
*
* @return the full name
*/
@Override
public String getFullName() {
return ((AbstractTxStream)parent).getFullName()+"."+name;
}
} }

View File

@ -189,6 +189,7 @@ public class WaveformDb extends HierNode implements IWaveformDb, PropertyChangeL
if (IWaveformDbLoader.SIGNAL_ADDED.equals(evt.getPropertyName()) if (IWaveformDbLoader.SIGNAL_ADDED.equals(evt.getPropertyName())
|| IWaveformDbLoader.STREAM_ADDED.equals(evt.getPropertyName())) { || IWaveformDbLoader.STREAM_ADDED.equals(evt.getPropertyName())) {
IWaveform waveform = (IWaveform) evt.getNewValue(); IWaveform waveform = (IWaveform) evt.getNewValue();
waveforms.put(waveform.getFullName(), waveform);
putInHierarchy(waveform); putInHierarchy(waveform);
pcs.firePropertyChange(IHierNode.WAVEFORMS, null, waveforms); pcs.firePropertyChange(IHierNode.WAVEFORMS, null, waveforms);
pcs.firePropertyChange(IHierNode.CHILDS, null, childNodes); pcs.firePropertyChange(IHierNode.CHILDS, null, childNodes);