Hi forums,
I've implemented global scoping using the ImportUriGlobalScopeProvider approach;
public class InputFileGlobalScopeProvider extends ImportUriGlobalScopeProvider {
public static URI BUILTINS_URI = URI
.createURI("classpath:/de/stelzer/sntsworkbench/sntswb.builtin");
@Override
protected LinkedHashSet<URI> getImportedUris(Resource resource) {
LinkedHashSet<URI> temp = super.getImportedUris(resource);
temp.add(BUILTINS_URI);
return temp;
}
}
When I run my JUnit test everything is fine and references are correctly resolved.
But when I run the same file in Eclipse it just doesn't work.
The DirtyStateAwareResourceDescriptions delegates the getResourceDescription() to his globalDescriptions (instance of ClusteringBuilderState).
And the ClusteringBuilderState tries to lookup the ResourceDescription in his resourceDescriptionMap, which doesn't contains a ResourceDescription for my URI (classpath:/de/stelzer/sntsworkbench/sntswb.builtin) - so null is returned for getResourceDescription() - and no references are resolved...
Am I missing something? or can anybody help me?
UPDATE:
Ok i figured out, that the JdtClasspathUriResolver is used to resolve the URI and fails. Correct me if I'm wrong, but the JdtClasspathUriResolver looks in the projects' classpath - but not in my plugins classpath - so i guess in need another URI?
Greetings Johannes
[Updated on: Wed, 02 May 2012 16:28] by Moderator