if (tempCaps instanceof ScalarCaps) {
ScalarCaps<?, ?> targetCaps = (ScalarCaps<?, ?>) tempCaps;
targetCaps.setUnitEnabled(state);
}
UnitPlugin unitPlugin = getPlugin(target, UnitPlugin.class);
if (unitPlugin != null) {
unitPlugin.setUnitEnabled(state);
}
}