public final class DefaultResourceTypes extends ExtensionProvider implements BatchExtension, ServerExtension {
private static final String SUPPORTS_MEASURE_FILTERS = "supportsMeasureFilters";
- private static final String CONFIGURABLE = "configurable";;
+ private static final String CONFIGURABLE = "configurable";
private static final String UPDATABLE_KEY = "updatable_key";
@Override
.addType(ResourceType.builder(Qualifiers.DIRECTORY)
.setProperty(SUPPORTS_MEASURE_FILTERS, true)
.build())
- .addType(ResourceType.builder(Qualifiers.PACKAGE)
- .build())
.addType(ResourceType.builder(Qualifiers.FILE)
.hasSourceCode()
.setProperty(SUPPORTS_MEASURE_FILTERS, true)
.build())
- .addType(ResourceType.builder(Qualifiers.CLASS)
- .hasSourceCode()
- .build())
.addType(ResourceType.builder(Qualifiers.UNIT_TEST_FILE)
.hasSourceCode()
.setProperty(SUPPORTS_MEASURE_FILTERS, true)
.addRelations(Qualifiers.PROJECT, Qualifiers.MODULE)
.addRelations(Qualifiers.MODULE, Qualifiers.DIRECTORY, Qualifiers.PACKAGE)
.addRelations(Qualifiers.DIRECTORY, Qualifiers.FILE, Qualifiers.UNIT_TEST_FILE)
- .addRelations(Qualifiers.PACKAGE, Qualifiers.CLASS, Qualifiers.UNIT_TEST_FILE)
.build();
}
public class DefaultResourceTypesTest {
@Test
- public void should_provide() {
+ public void provide_types() {
ResourceTypeTree tree = new DefaultResourceTypes().provide();
- assertThat(tree.getTypes()).hasSize(7);
+ assertThat(tree.getTypes()).hasSize(5);
assertThat(tree.getChildren(Qualifiers.PROJECT)).containsExactly(Qualifiers.MODULE);
}
*/
public class HighlightableBuilder extends PerspectiveBuilder<Highlightable> {
- private static final Set<String> SUPPORTED_QUALIFIERS = ImmutableSet.of(Qualifiers.FILE, Qualifiers.CLASS, Qualifiers.UNIT_TEST_FILE);
+ private static final Set<String> SUPPORTED_QUALIFIERS = ImmutableSet.of(Qualifiers.FILE, Qualifiers.UNIT_TEST_FILE);
private final ComponentDataCache cache;
public HighlightableBuilder(ComponentDataCache cache) {