Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Error in EVL Quick Fix: "cannot find resource '/project:/...'"
Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #573110] Fri, 07 August 2009 15:03
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

This is a multi-part message in MIME format.
--------------090907090104040608050504
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello all,

I've started to define quick fixes for a EVL file I'm using in a model.
Validation works and the markers appear at the right places, but when I
right click one of them and select "Quick Fix" I get an error message
saying that the '/project:/NameOfProject/PathToMyModelFile' resource
does not exist. If I dismiss the error message, all I get is the
"Ignore" default quick fix.

I thought it might be in the same category of issues as bug #285559, so
I looked around with the debugger and found two problems.

- The method getElementResourceLocation of the class
org.eclipse.epsilon.evl.emf.validation.GmfMarkerResolver returns
platform URIs to the workspace files, but they don't have the
"resource" segment, so they look like this:

project:/NameOfProject/PathToMyModelFile

rather than this:

project:/resource/NameOfProject/PathToMyModelFile

- The method getEditingDomain of the class
org.eclipse.epsilon.evl.emf.validation.EmfMarkerResolver uses the
previous platform URI by creating a Path from it. Reading the
Javadocs for Path, I gather that it expects an absolute filesystem
path, not a platform URI, so that's where the "/project:/foo/bar" part
comes from.

I've attached a quick and dirty patch which solves these two issues. I
don't quite like having to convert the platform URI to a String and then
back to a URL so I can pass it to FileLocator#toFileURL, and I'm not
sure about the way I'm handling exceptions in that call. It does fix the
problem, though. Should I report a bug about this?

By the way: it's not related to this issue, but shouldn't the diagram
editor refresh its contents when the quick fix is applied? Currently, I
have to remember to hit Refresh to see the changes, and if I hit Save,
the old version is saved, instead of the new one.

Best regards,
Antonio

--------------090907090104040608050504
Content-Type: text/x-patch;
name="fix-evl-quickfix.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="fix-evl-quickfix.patch"

SW5kZXg6IHNyYy9vcmcvZ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Finding templates with TemplateFactory.load
Next Topic:EGL's handling of target files
Goto Forum:
  


Current Time: Thu Apr 25 15:11:09 GMT 2024

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

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

Back to the top