fixes visual handling of Tx not yet being loaded
This commit is contained in:
parent
6f2f5a388c
commit
654cf3f9e5
|
@ -13,10 +13,10 @@ public class Constants {
|
||||||
public static final String CONTENT_PROVIDER_TAG = "TOOLTIP_CONTENT_PROVIDER";
|
public static final String CONTENT_PROVIDER_TAG = "TOOLTIP_CONTENT_PROVIDER";
|
||||||
public static final String HELP_PROVIDER_TAG = "TOOLTIP_HELP_PROVIDER";
|
public static final String HELP_PROVIDER_TAG = "TOOLTIP_HELP_PROVIDER";
|
||||||
|
|
||||||
public static final DecimalFormat TIME_FORMAT_FS = new DecimalFormat("#");
|
public static final DecimalFormat TIME_FORMAT_FS = new DecimalFormat("#0");
|
||||||
public static final DecimalFormat TIME_FORMAT_PS = new DecimalFormat("#");
|
public static final DecimalFormat TIME_FORMAT_PS = new DecimalFormat("#0");
|
||||||
public static final DecimalFormat TIME_FORMAT_NS = new DecimalFormat("#.0##");
|
public static final DecimalFormat TIME_FORMAT_NS = new DecimalFormat("#0.0##");
|
||||||
public static final DecimalFormat TIME_FORMAT_UMS = new DecimalFormat("#.0#####");
|
public static final DecimalFormat TIME_FORMAT_UMS = new DecimalFormat("#0.0#####");
|
||||||
public static final long[] POWERS_OF_TEN = {
|
public static final long[] POWERS_OF_TEN = {
|
||||||
1L,
|
1L,
|
||||||
10L,
|
10L,
|
||||||
|
|
|
@ -109,20 +109,21 @@ public class ArrowPainter implements IPainter {
|
||||||
protected void deriveGeom(Collection<ITxRelation> relations, List<LinkEntry> res, boolean useTarget) {
|
protected void deriveGeom(Collection<ITxRelation> relations, List<LinkEntry> res, boolean useTarget) {
|
||||||
for (ITxRelation iTxRelation : relations) {
|
for (ITxRelation iTxRelation : relations) {
|
||||||
ITx otherTx = useTarget ? iTxRelation.getTarget() : iTxRelation.getSource();
|
ITx otherTx = useTarget ? iTxRelation.getTarget() : iTxRelation.getSource();
|
||||||
for(IWaveform iWaveform: new IWaveform[]{otherTx.getStream(), otherTx.getGenerator()}) {
|
if(otherTx!=null && otherTx.getBeginTime()>=0)
|
||||||
if (waveCanvas.wave2painterMap.containsKey(iWaveform)) {
|
for(IWaveform iWaveform: new IWaveform[]{otherTx.getStream(), otherTx.getGenerator()}) {
|
||||||
IWaveformPainter painter = waveCanvas.wave2painterMap.get(iWaveform);
|
if (waveCanvas.wave2painterMap.containsKey(iWaveform)) {
|
||||||
if(painter!=null) {
|
IWaveformPainter painter = waveCanvas.wave2painterMap.get(iWaveform);
|
||||||
int height = waveCanvas.styleProvider.getTrackHeight();
|
if(painter!=null) {
|
||||||
Rectangle bb = new Rectangle(
|
int height = waveCanvas.styleProvider.getTrackHeight();
|
||||||
(int) (otherTx.getBeginTime() / scaleFactor),
|
Rectangle bb = new Rectangle(
|
||||||
waveCanvas.rulerHeight + painter.getVerticalOffset() + height * getConcurrencyIndex(otherTx),
|
(int) (otherTx.getBeginTime() / scaleFactor),
|
||||||
(int) ((otherTx.getEndTime() - otherTx.getBeginTime()) / scaleFactor),
|
waveCanvas.rulerHeight + painter.getVerticalOffset() + height * getConcurrencyIndex(otherTx),
|
||||||
height);
|
(int) ((otherTx.getEndTime() - otherTx.getBeginTime()) / scaleFactor),
|
||||||
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
|
height);
|
||||||
|
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,9 +73,10 @@ public abstract class AbstractTransactionTreeContentProvider implements ITreeCon
|
||||||
case OUT_REL:
|
case OUT_REL:
|
||||||
Vector<Object[] > res_out = new Vector<>();
|
Vector<Object[] > res_out = new Vector<>();
|
||||||
for(ITxRelation rel:node.element.getOutgoingRelations()){
|
for(ITxRelation rel:node.element.getOutgoingRelations()){
|
||||||
|
ITx tgt = rel.getTarget();
|
||||||
res_out.add(new Object[]{
|
res_out.add(new Object[]{
|
||||||
rel.getRelationType(),
|
rel.getRelationType(),
|
||||||
rel.getTarget().getGenerator().getName(),
|
tgt.getBeginTime()<0?"":tgt.getGenerator().getName(),
|
||||||
rel.getTarget()});
|
rel.getTarget()});
|
||||||
}
|
}
|
||||||
return res_out.toArray();
|
return res_out.toArray();
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class AttributeLabelProvider extends LabelProvider implements IStyledLabe
|
||||||
public static final int TX_TIME=3;
|
public static final int TX_TIME=3;
|
||||||
|
|
||||||
String showProp;
|
String showProp;
|
||||||
|
|
||||||
public String getShowProp() {
|
public String getShowProp() {
|
||||||
return showProp;
|
return showProp;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,10 @@ public class AttributeLabelProvider extends LabelProvider implements IStyledLabe
|
||||||
Object o = elements[field];
|
Object o = elements[field];
|
||||||
if(o instanceof ITx) {
|
if(o instanceof ITx) {
|
||||||
ITx tx = (ITx)o;
|
ITx tx = (ITx)o;
|
||||||
return new StyledString(this.txToString(tx)+" ("+tx.getStream().getFullName()+")");
|
if(tx.getBeginTime()<0)
|
||||||
|
return new StyledString(this.txToString(tx));
|
||||||
|
else
|
||||||
|
return new StyledString(this.txToString(tx)+" ("+tx.getStream().getFullName()+")");
|
||||||
} else
|
} else
|
||||||
return new StyledString(o.toString());
|
return new StyledString(o.toString());
|
||||||
} else if(element instanceof ITx){
|
} else if(element instanceof ITx){
|
||||||
|
@ -168,8 +171,13 @@ public class AttributeLabelProvider extends LabelProvider implements IStyledLabe
|
||||||
*/
|
*/
|
||||||
String txToString(ITx tx){
|
String txToString(ITx tx){
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("tx#").append(tx.getId()).append("[").append(timeToString(tx.getBeginTime())); //$NON-NLS-1$ //$NON-NLS-2$
|
sb.append("tx#").append(tx.getId());
|
||||||
sb.append(" - ").append(timeToString(tx.getEndTime())).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
|
if(tx.getBeginTime()>=0 && tx.getEndTime()>=0) {
|
||||||
|
sb.append("[").append(timeToString(tx.getBeginTime())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
sb.append(" - ").append(timeToString(tx.getEndTime())).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
} else {
|
||||||
|
sb.append("[not visible]");
|
||||||
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
<repository location="http://download.eclipse.org/nebula/releases/latest"/>
|
<repository location="http://download.eclipse.org/nebula/releases/latest"/>
|
||||||
<unit id="org.eclipse.nebula.widgets.xviewer.feature.feature.group" version="1.1.0.202208171809"/>
|
<unit id="org.eclipse.nebula.widgets.xviewer.feature.feature.group" version="0.0.0"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
<repository location="http://download.eclipse.org/collections/10.4.0/repository"/>
|
<repository location="http://download.eclipse.org/collections/10.4.0/repository"/>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue