Search in sources :

Example 1 with ProductivityFeaturesRegistry

use of com.intellij.featureStatistics.ProductivityFeaturesRegistry in project intellij-community by JetBrains.

the class IdeResourcesTestCase method testFeatureTipsRegistered.

public void testFeatureTipsRegistered() {
    ProductivityFeaturesRegistry registry = ProductivityFeaturesRegistry.getInstance();
    Set<String> ids = registry.getFeatureIds();
    assertNotEmpty(ids);
    Collection<String> errors = ContainerUtil.newTreeSet();
    for (String id : ids) {
        FeatureDescriptor descriptor = registry.getFeatureDescriptor(id);
        TipAndTrickBean tip = TipAndTrickBean.findByFileName(descriptor.getTipFileName());
        if (tip == null) {
            errors.add("<tipAndTrick file=\"" + descriptor.getTipFileName() + "\" feature-id=\"" + id + "\"/>");
        }
    }
    assertEquals("Register the following extensions:\n" + StringUtil.join(errors, "\n"), 0, errors.size());
}
Also used : TipAndTrickBean(com.intellij.ide.util.TipAndTrickBean) FeatureDescriptor(com.intellij.featureStatistics.FeatureDescriptor) ProductivityFeaturesRegistry(com.intellij.featureStatistics.ProductivityFeaturesRegistry)

Aggregations

FeatureDescriptor (com.intellij.featureStatistics.FeatureDescriptor)1 ProductivityFeaturesRegistry (com.intellij.featureStatistics.ProductivityFeaturesRegistry)1 TipAndTrickBean (com.intellij.ide.util.TipAndTrickBean)1