Search in sources :

Example 1 with IResourceDescription

use of org.eclipse.xtext.resource.IResourceDescription in project ow by vtst.

the class LessImportStatementResolver method loadResourceDescription.

// **************************************************************************
// Containers
private IResourceDescription loadResourceDescription(Resource resource, URI uri) {
    LoadOnDemandResourceDescriptions lodrd = loadOnDemandDescriptions.get();
    lodrd.initialize(new IResourceDescriptions.NullImpl(), Collections.<URI>emptyList(), resource);
    try {
        IResourceDescription rd = lodrd.getResourceDescription(uri);
        return rd;
    } catch (IllegalStateException e) {
        // resource.
        return null;
    }
}
Also used : IResourceDescription(org.eclipse.xtext.resource.IResourceDescription) IResourceDescriptions(org.eclipse.xtext.resource.IResourceDescriptions) LoadOnDemandResourceDescriptions(org.eclipse.xtext.scoping.impl.LoadOnDemandResourceDescriptions)

Aggregations

IResourceDescription (org.eclipse.xtext.resource.IResourceDescription)1 IResourceDescriptions (org.eclipse.xtext.resource.IResourceDescriptions)1 LoadOnDemandResourceDescriptions (org.eclipse.xtext.scoping.impl.LoadOnDemandResourceDescriptions)1