Search in sources :

Example 1 with ResourceDescriptionWithoutModuleUserData

use of org.eclipse.n4js.ui.building.ResourceDescriptionWithoutModuleUserData in project n4js by eclipse.

the class AbstractBuilderTest method assertXtextIndexIsValidInternal.

private void assertXtextIndexIsValidInternal() {
    final IResourceDescriptions index = getXtextIndex();
    final StringBuilder sb = new StringBuilder();
    for (IResourceDescription desc : index.getAllResourceDescriptions()) {
        if (desc instanceof ResourceDescriptionWithoutModuleUserData) {
            sb.append("\n");
            sb.append(IResourceDescription.class.getSimpleName());
            sb.append(" in index must not be an instance of ");
            sb.append(ResourceDescriptionWithoutModuleUserData.class.getSimpleName());
            sb.append(" but it was. URI: ");
            sb.append(desc.getURI());
        }
    }
    assertTrue(sb.toString(), 0 == sb.length());
}
Also used : IResourceDescription(org.eclipse.xtext.resource.IResourceDescription) ResourceDescriptionWithoutModuleUserData(org.eclipse.n4js.ui.building.ResourceDescriptionWithoutModuleUserData) IResourceDescriptions(org.eclipse.xtext.resource.IResourceDescriptions)

Aggregations

ResourceDescriptionWithoutModuleUserData (org.eclipse.n4js.ui.building.ResourceDescriptionWithoutModuleUserData)1 IResourceDescription (org.eclipse.xtext.resource.IResourceDescription)1 IResourceDescriptions (org.eclipse.xtext.resource.IResourceDescriptions)1