Search in sources :

Example 1 with IWidgetInfoProvider

use of org.csstudio.opibuilder.model.IWidgetInfoProvider in project yamcs-studio by yamcs.

the class ArrayEditPart method doActivate.

@SuppressWarnings("unchecked")
@Override
protected void doActivate() {
    delegate.markAsControlPV(IPVWidgetModel.PROP_PVNAME, IPVWidgetModel.PROP_PVVALUE);
    delegate.setUpdateSuppressTime(500);
    super.doActivate();
    delegate.doActivate();
    if (getExecutionMode() == ExecutionMode.RUN_MODE) {
        if (!getChildren().isEmpty()) {
            elementDefaultValue = ((AbstractBaseEditPart) getChildren().get(0)).getValue();
            initValueArray();
            setValue(getValue());
            IWidgetInfoProvider provider = (IWidgetInfoProvider) getWidgetModel().getChildren().get(0).getAdapter(IWidgetInfoProvider.class);
            if (provider != null) {
                Object info = provider.getInfo(ArrayModel.ARRAY_UNIQUEPROP_ID);
                if (info != null && info instanceof List<?>) {
                    unSyncablePropIDsFromChild = new ArrayList<String>((List<String>) info);
                    unSyncablePropIDsFromChild.addAll(NONE_SYNCABLE_PROPIDS);
                }
            }
        }
        registerLoadPVDataTypeListener();
    }
}
Also used : List(java.util.List) ArrayList(java.util.ArrayList) VString(org.diirt.vtype.VString) IWidgetInfoProvider(org.csstudio.opibuilder.model.IWidgetInfoProvider)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 IWidgetInfoProvider (org.csstudio.opibuilder.model.IWidgetInfoProvider)1 VString (org.diirt.vtype.VString)1