use of kutch.biff.marvin.task.DynamicDebugWidgetTask in project Board-Instrumentation-Framework by intel.
the class DataManager method ChangeValue.
public void ChangeValue(String ID, String Namespace, String Value) {
boolean OnDemandItemFound = false;
boolean OnDemandTabFound = false;
synchronized (this) {
for (Pair<DynamicItemInfoContainer, OnDemandWidgetBuilder> entry : _OnDemandQueue) {
if (entry.getKey().Matches(Namespace, ID, Value)) {
LateCreateTask objTask = new LateCreateTask(entry.getValue(), Namespace, ID, Value, entry.getKey().getLastMatchedSortStr());
TaskManager.getTaskManager().AddDeferredTaskObject(objTask);
OnDemandItemFound = true;
if (entry.getValue() instanceof OnDemandTabBuilder) {
OnDemandTabFound = true;
}
}
}
if (OnDemandItemFound) {
Configuration.getConfig().setCursorToWait();
}
// go and handle any GenerateDatapoint stuff
for (GenerateDatapointInfo info : __GenerateDatapointList) {
if (info.Matches(Namespace, ID)) {
info.BuildDatapoint(Namespace, ID);
}
}
}
synchronized (this) {
String Key = Utility.generateKey(Namespace, ID);
_UpdateCount++;
boolean inWildcard = HandleWildcardChangeValue(ID, Namespace, Value);
if (false == _DataMap.containsKey(Key)) {
_DataMap.put(Key, new DataSet());
if (false == inWildcard) {
_UnassignedDataPoints++;
// nifty stuff to dynamically add a tab to show 'unregistered' data points.
if (kutch.biff.marvin.widget.DynamicTabWidget.isEnabled()) {
DynamicDebugWidgetTask objTask = new DynamicDebugWidgetTask(Namespace, ID, Value);
TaskManager.getTaskManager().AddPostponedTask(objTask, 0);
}
}
}
if (// if didn't exist, is created above
_DataMap.containsKey(Key)) {
_DataMap.get(Key).setLatestValue(Value);
}
}
if (true == OnDemandTabFound) {
// ApplyOnDemandTabStyle objTask = new ApplyOnDemandTabStyle();
// TaskManager.getTaskManager().AddPostponedTask(objTask, 1000);
}
}
Aggregations