Skip to content

Commit c3ab02a

Browse files
committed
Add comment to explain why check if PV instanceof DisplayProvider see
pullrequest #3228
1 parent 3f623d0 commit c3ab02a

File tree

1 file changed

+3
-0
lines changed
  • app/pvtable/src/main/java/org/phoebus/applications/pvtable/model

1 file changed

+3
-0
lines changed

app/pvtable/src/main/java/org/phoebus/applications/pvtable/model/PVTableItem.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ private void updateDescription() {
203203
VType currentValue = getValue();
204204
if(currentValue != null) {
205205
PV thePV = pv.get();
206+
// DisplayProvider is an optional interface for VType values,
207+
// not PVs, but the custum datasource as Muscade happens to implement
208+
// DisplayProvider for enum and bool PVs, so check for that here
206209
Display display = thePV instanceof DisplayProvider ? ((DisplayProvider) thePV).getDisplay() : null;
207210
display = display == null && currentValue instanceof DisplayProvider ? ((DisplayProvider) currentValue).getDisplay(): display;
208211
if (display != null) {

0 commit comments

Comments
 (0)