Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Sphinx » skip creating/unloading unavailable resources
skip creating/unloading unavailable resources [message #805132] Thu, 23 February 2012 11:16
Tibor Kovacs is currently offline Tibor KovacsFriend
Messages: 3
Registered: February 2012
Junior Member
When resolving references in our projects that point to files that are not present, Sphinx tries to create a resource and when it fails unloads the resource. The removal jobs causing blinking of the mouse pointer.

This could be avoided by checking the existence of the file or even better checking if the file content type can be determined.

I would propose to add a check to the ScopingResourceSetImpl before calling the getResource(), something like this:

if((resource == null || !resource.isLoaded()) && loadOnDemand) {
try {
 // If no content type, do not try to create a resource and then unload it in the catch
 if(EcoreResourceUtil.getContentTypeId(uri) == null) {
  return null;
 }
 resource = getResource(uri.trimFragment(), true);
} catch(Exception ex) {
...
Previous Topic:Sphinx support
Next Topic:problem marker updates
Goto Forum:
  


Current Time: Tue Dec 03 11:49:06 GMT 2024

Powered by FUDForum. Page generated in 0.02642 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top