Lines 406-412
Link Here
|
406 |
|
406 |
|
407 |
} |
407 |
} |
408 |
|
408 |
|
409 |
private final void addDataFilterImpl(final DataFilter filter, final boolean isAdjusting) { |
409 |
private void addDataFilterImpl(final DataFilter filter, final boolean isAdjusting) { |
410 |
if (filter instanceof TimeIntervalDataFilter) { |
410 |
if (filter instanceof TimeIntervalDataFilter) { |
411 |
dataFiltersSupport.cleanAll(TimeIntervalDataFilter.class, false); |
411 |
dataFiltersSupport.cleanAll(TimeIntervalDataFilter.class, false); |
412 |
} |
412 |
} |
Lines 482-488
Link Here
|
482 |
|
482 |
|
483 |
for (DLightTool tool : context.getTools()) { |
483 |
for (DLightTool tool : context.getTools()) { |
484 |
validTools.add(tool); |
484 |
validTools.add(tool); |
485 |
toolNames.append(tool.getName() + ServiceInfoDataStorage.DELIMITER); |
485 |
toolNames.append(tool.getName()).append(ServiceInfoDataStorage.DELIMITER); |
486 |
} |
486 |
} |
487 |
|
487 |
|
488 |
if (validTools.isEmpty()) { |
488 |
if (validTools.isEmpty()) { |
Lines 546-552
Link Here
|
546 |
for (IndicatorNotificationsListener l : indicatorNotificationListeners) { |
546 |
for (IndicatorNotificationsListener l : indicatorNotificationListeners) { |
547 |
IndicatorDataProviderAccessor.getDefault().addIndicatorDataProviderListener(idp, l); |
547 |
IndicatorDataProviderAccessor.getDefault().addIndicatorDataProviderListener(idp, l); |
548 |
} |
548 |
} |
549 |
idpsNames.append(idp.getName() + ServiceInfoDataStorage.DELIMITER); |
549 |
idpsNames.append(idp.getName()).append(ServiceInfoDataStorage.DELIMITER); |
550 |
List<Indicator<?>> indicators = DLightToolAccessor.getDefault().getIndicators(tool); |
550 |
List<Indicator<?>> indicators = DLightToolAccessor.getDefault().getIndicators(tool); |
551 |
|
551 |
|
552 |
for (Indicator<?> i : indicators) { |
552 |
for (Indicator<?> i : indicators) { |
Lines 559-565
Link Here
|
559 |
} |
559 |
} |
560 |
target.addTargetListener(idp); |
560 |
target.addTargetListener(idp); |
561 |
if (log.isLoggable(Level.FINE)) { |
561 |
if (log.isLoggable(Level.FINE)) { |
562 |
log.fine("I have subscribed indicator " + i + " to indicatorDataProvider " + idp); // NOI18N |
562 |
log.log(Level.FINE, "I have subscribed indicator {0} to indicatorDataProvider {1}", new Object[]{i, idp}); // NOI18N |
563 |
} |
563 |
} |
564 |
} |
564 |
} |
565 |
if (i instanceof DataFilterListener) { |
565 |
if (i instanceof DataFilterListener) { |
Lines 590-596
Link Here
|
590 |
|
590 |
|
591 |
if (collectors != null && collectors.size() > 0) { |
591 |
if (collectors != null && collectors.size() > 0) { |
592 |
for (DataCollector<?> toolCollector : collectors) { |
592 |
for (DataCollector<?> toolCollector : collectors) { |
593 |
collectorNames.append(toolCollector.getName() + ServiceInfoDataStorage.DELIMITER); |
593 |
collectorNames.append(toolCollector.getName()).append(ServiceInfoDataStorage.DELIMITER); |
594 |
Map<DataStorageType, DataStorage> currentStorages = DataStorageManager.getInstance().getDataStoragesFor(this, toolCollector); |
594 |
Map<DataStorageType, DataStorage> currentStorages = DataStorageManager.getInstance().getDataStoragesFor(this, toolCollector); |
595 |
|
595 |
|
596 |
if (toolCollector instanceof DLightTarget.ExecutionEnvVariablesProvider) { |
596 |
if (toolCollector instanceof DLightTarget.ExecutionEnvVariablesProvider) { |
Lines 608-629
Link Here
|
608 |
storages.add(storage); |
608 |
storages.add(storage); |
609 |
} |
609 |
} |
610 |
} |
610 |
} |
611 |
toolCollector.init(currentStorages, target); |
|
|
612 |
addDataFilterListener(toolCollector); |
613 |
|
614 |
if (toolCollector instanceof IndicatorDataProvider) { |
611 |
if (toolCollector instanceof IndicatorDataProvider) { |
615 |
IndicatorDataProvider<?> idp = (IndicatorDataProvider<?>) toolCollector; |
612 |
IndicatorDataProvider<?> idp = (IndicatorDataProvider<?>) toolCollector; |
616 |
idp.init(serviceInfoDataStorage); |
613 |
idp.init(serviceInfoDataStorage); |
617 |
} |
614 |
} |
618 |
|
615 |
|
|
|
616 |
// do tool initialization _AFTER_ IndicatorDataProvider init |
617 |
// because tool may (DTraceDataCollector does) expect that |
618 |
// serviceInfoDataStorage is available for them if they |
619 |
// do implement IndicatorDataProvider interface |
619 |
|
620 |
|
|
|
621 |
toolCollector.init(currentStorages, target); |
622 |
addDataFilterListener(toolCollector); |
620 |
|
623 |
|
621 |
if (notAttachableDataCollector == null && !toolCollector.isAttachable()) { |
624 |
if (notAttachableDataCollector == null && !toolCollector.isAttachable()) { |
622 |
notAttachableDataCollector = toolCollector; |
625 |
notAttachableDataCollector = toolCollector; |
623 |
} |
626 |
} |
624 |
} else { |
627 |
} else { |
625 |
// Cannot find storage for this collector! |
628 |
// Cannot find storage for this collector! |
626 |
log.severe("Cannot find storage for collector " + toolCollector); // NOI18N |
629 |
log.log(Level.SEVERE, "Cannot find storage for collector {0}", toolCollector); // NOI18N |
627 |
} |
630 |
} |
628 |
|
631 |
|
629 |
target.addTargetListener(toolCollector); |
632 |
target.addTargetListener(toolCollector); |
Lines 696-702
Link Here
|
696 |
Collection<DataProviderFactory> providerFactories = DataProvidersManager.getInstance().getDataProviderFactories(dataModelScheme); |
699 |
Collection<DataProviderFactory> providerFactories = DataProvidersManager.getInstance().getDataProviderFactories(dataModelScheme); |
697 |
|
700 |
|
698 |
// If not found - just return null |
701 |
// If not found - just return null |
699 |
if (providerFactories.size() == 0) { |
702 |
if (providerFactories.isEmpty()) { |
700 |
return null; |
703 |
return null; |
701 |
} |
704 |
} |
702 |
|
705 |
|