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 #478938] Fri, 07 August 2009 15:03 Go to next message
Eclipse UserFriend
Originally posted by: nyoescape.gmail.com

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"

SW5kZXg6IHNyYy9vcmcvZWNsaXBzZS9lcHNpbG9uL2V2bC9lbWYvdmF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l0b3Ioc1Jlc291cmNlTG9jYXRpb24pLmdl dElkKCk7DQog
CQkNCiAJCS8vUGxhdGZvcm1VSS5nZXRXb3JrYmVuY2goKS5nZXRFZGl0b3JS ZWdpc3RyeSgp
Lg0KIAkJDQpJbmRleDogc3JjL29yZy9lY2xpcHNlL2Vwc2lsb24vZXZsL2Vt Zi92YWxpZGF0
aW9uL0dtZk1hcmtlclJlc29sdmVyLmphdmEKPT09PT09PT09PT09PT09PT09 PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0g c3JjL29yZy9l
Y2xpcHNlL2Vwc2lsb24vZXZsL2VtZi92YWxpZGF0aW9uL0dtZk1hcmtlclJl c29sdmVyLmph
dmEJKHJldmlzaW9uIDUyNCkKKysrIHNyYy9vcmcvZWNsaXBzZS9lcHNpbG9u L2V2bC9lbWYv
dmFsaWRhdGlvbi9HbWZNYXJrZXJSZXNvbHZlci5qYXZhCSh3b3JraW5nIGNv cHkpCkBAIC03
Myw3ICs3Niw3IEBACiAJCQ0KIAkJCQ0KIAkJLy9VUkkgdXJpID0gVVJJLmNy ZWF0ZVVSSSht
YXJrZXIuZ2V0UmVzb3VyY2UoKS5nZXRGdWxsUGF0aCgpLnRvU3RyaW5nKCkp Ow0KLQkJU3Ry
aW5nIGxvY2F0aW9uID0gInBsYXRmb3JtOiIgKyBtYXJrZXIuZ2V0UmVzb3Vy Y2UoKS5nZXRG
dWxsUGF0aCgpLnRvU3RyaW5nKCk7DQorCQlTdHJpbmcgbG9jYXRpb24gPSAi cGxhdGZvcm06
L3Jlc291cmNlIiArIG1hcmtlci5nZXRSZXNvdXJjZSgpLmdldEZ1bGxQYXRo KCkudG9TdHJp
bmcoKTsNCiAJCQ0KIAkJLy9TeXN0ZW0uZXJyLnByaW50bG4oIkdNRiA6ICIg KyBsb2NhdGlv
bik7DQogCQkNCg==
--------------090907090104040608050504--
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #478965 is a reply to message #478938] Fri, 07 August 2009 17:05 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hey Antonio,

Antonio García Domínguez wrote:
> 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

This seems like an omission; I agree this should be fixed.

>
> - 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?

Please do file a bug report for this. The (currently broken) code in
EmfMarkerResolver uses the same logic as an EMF helper, so it really
should work. I've fiddled with it for an hour now, and have no idea why
it doesn't. This line:

ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(platformResourceString))

is from MarkerHelper.class, part of EMF. Looks to be the same as the
broken code in EmfMarkerResolver. I'll take another look at this on Monday.

>
> 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.

I think that the diagram editor should refresh its contents when the
quick fix is applied. I can't recreate the behaviour you describe above:
for me, the diagram contains the applied fix, when I save it's the fixed
diagram that's persisted to disk. Does the diagram always fail to
refresh its contents for you?

Cheers,
Louis.
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #479004 is a reply to message #478965] Fri, 07 August 2009 22:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nyoescape.gmail.com

Hi Louis,

> Please do file a bug report for this. The (currently broken) code in
> EmfMarkerResolver uses the same logic as an EMF helper, so it really
> should work. I've fiddled with it for an hour now, and have no idea why
> it doesn't. This line:
>
> ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(platformResourceString))
>
> is from MarkerHelper.class, part of EMF. Looks to be the same as the
> broken code in EmfMarkerResolver. I'll take another look at this on Monday.

Here is the bug report, then. I've copied and pasted from my previous
mail and mentioned what you said in this mail. I've also attached the patch.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=286017

> I think that the diagram editor should refresh its contents when the
> quick fix is applied. I can't recreate the behaviour you describe above:
> for me, the diagram contains the applied fix, when I save it's the fixed
> diagram that's persisted to disk. Does the diagram always fail to
> refresh its contents for you?

I'll look into it again as soon as I can :-). Right now I'm trying to
get the usual Eugenia workflow in an Ant buildfile.

Best regards,
Antonio
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #479017 is a reply to message #479004] Sat, 08 August 2009 07:18 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Antonio,

Antonio García Domínguez wrote:
> Hi Louis,
>
>> Please do file a bug report for this. The (currently broken) code in
>> EmfMarkerResolver uses the same logic as an EMF helper, so it really
>> should work. I've fiddled with it for an hour now, and have no idea why
>> it doesn't. This line:
>>
>> ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(platformResourceString))
>>
>> is from MarkerHelper.class, part of EMF. Looks to be the same as the
>> broken code in EmfMarkerResolver. I'll take another look at this on Monday.
>
> Here is the bug report, then. I've copied and pasted from my previous
> mail and mentioned what you said in this mail. I've also attached the patch.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=286017

Thanks very much, and thanks for the workaround.

>
>> I think that the diagram editor should refresh its contents when the
>> quick fix is applied. I can't recreate the behaviour you describe above:
>> for me, the diagram contains the applied fix, when I save it's the fixed
>> diagram that's persisted to disk. Does the diagram always fail to
>> refresh its contents for you?
>
> I'll look into it again as soon as I can :-). Right now I'm trying to
> get the usual Eugenia workflow in an Ant buildfile.

Great, thanks. Do let us know if it's not working as expected for you.
Good luck!

Cheers,
Louis.
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #479152 is a reply to message #479017] Sun, 09 August 2009 20:37 Go to previous message
Eclipse UserFriend
Originally posted by: nyoescape.gmail.com

Hi Louis,

> Thanks very much, and thanks for the workaround.

Hope it helps, though it's a bit hackish :-).

> Great, thanks. Do let us know if it's not working as expected for you.
> Good luck!

It almost works as I'd expect, but the refresh problem is still there.
I've written a more detailed report below, but I'll save you some time.
Everything works, but the diagram view is not updated, though the error
marker disappears. I need to press F5 for that to happen. The saving
problem must have been my own mistake: I haven't managed to reproduce it.

If necessary, I can try and prepare some simple example which reproduces
this problem.

Regards,
Antonio

-- start report

I'm using Galileo in Linux (build ID I20090611-1540). I'm using the
modeling distribution which includes the incubating components, and the
latest Epsilon interim release.

The model involved is basically a control flow graph, and I'm making
sure that there are no edges whose source and target point to the same
node. The EVL script is like this:

context ActivityEdge {
constraint NoCycles {
check : self.source <> self.target
message : 'Source and target of an edge must not be the same'
fix {
title : 'Remove link from model'
do {
delete self;
}
}
}
}

I have some simple custom graphical components and the edge connects two
components which are inside of a compartment (the edge itself is not).

The steps to reproduce the problem are as follows:

1. Define a new graph in the form of start -> do something -> finish.
2. Add a cycle, violating the above constraint.
3. Use Edit -> Validate. The error for the above constraint appears,
with the correct marker over the edge.
4. Right click on the error in the Problems view, use Quick Fix, use
"Remove link from model".

Here is the problem:

5. The error message and the marker disappear, but not the edge.

The rest of the errors remain, but I suppose this is on purpose. IIRC,
custom code is needed to run validation every time the file is saved.
After that, there are several possibilities, which all work as expected:

6a. Close without saving, and then reopen. As expected, the edge remains
both in the diagram and the model.
6b. Save, then close, and then reopen. As expected, the edge has
disappeared from both the diagram and the model.
6c. Refresh with F5. The diagram is properly updated, and when saved,
the model is updated as well.

-- end report
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #573158 is a reply to message #478938] Fri, 07 August 2009 17:05 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hey Antonio,

Antonio García Domínguez wrote:
> 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

This seems like an omission; I agree this should be fixed.

>
> - 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?

Please do file a bug report for this. The (currently broken) code in
EmfMarkerResolver uses the same logic as an EMF helper, so it really
should work. I've fiddled with it for an hour now, and have no idea why
it doesn't. This line:

ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(platformResourceString))

is from MarkerHelper.class, part of EMF. Looks to be the same as the
broken code in EmfMarkerResolver. I'll take another look at this on Monday.

>
> 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.

I think that the diagram editor should refresh its contents when the
quick fix is applied. I can't recreate the behaviour you describe above:
for me, the diagram contains the applied fix, when I save it's the fixed
diagram that's persisted to disk. Does the diagram always fail to
refresh its contents for you?

Cheers,
Louis.
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #573176 is a reply to message #478965] Fri, 07 August 2009 22:32 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Louis,

> Please do file a bug report for this. The (currently broken) code in
> EmfMarkerResolver uses the same logic as an EMF helper, so it really
> should work. I've fiddled with it for an hour now, and have no idea why
> it doesn't. This line:
>
> ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(platformResourceString))
>
> is from MarkerHelper.class, part of EMF. Looks to be the same as the
> broken code in EmfMarkerResolver. I'll take another look at this on Monday.

Here is the bug report, then. I've copied and pasted from my previous
mail and mentioned what you said in this mail. I've also attached the patch.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=286017

> I think that the diagram editor should refresh its contents when the
> quick fix is applied. I can't recreate the behaviour you describe above:
> for me, the diagram contains the applied fix, when I save it's the fixed
> diagram that's persisted to disk. Does the diagram always fail to
> refresh its contents for you?

I'll look into it again as soon as I can :-). Right now I'm trying to
get the usual Eugenia workflow in an Ant buildfile.

Best regards,
Antonio
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #573199 is a reply to message #479004] Sat, 08 August 2009 07:18 Go to previous message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Antonio,

Antonio García Domínguez wrote:
> Hi Louis,
>
>> Please do file a bug report for this. The (currently broken) code in
>> EmfMarkerResolver uses the same logic as an EMF helper, so it really
>> should work. I've fiddled with it for an hour now, and have no idea why
>> it doesn't. This line:
>>
>> ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(platformResourceString))
>>
>> is from MarkerHelper.class, part of EMF. Looks to be the same as the
>> broken code in EmfMarkerResolver. I'll take another look at this on Monday.
>
> Here is the bug report, then. I've copied and pasted from my previous
> mail and mentioned what you said in this mail. I've also attached the patch.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=286017

Thanks very much, and thanks for the workaround.

>
>> I think that the diagram editor should refresh its contents when the
>> quick fix is applied. I can't recreate the behaviour you describe above:
>> for me, the diagram contains the applied fix, when I save it's the fixed
>> diagram that's persisted to disk. Does the diagram always fail to
>> refresh its contents for you?
>
> I'll look into it again as soon as I can :-). Right now I'm trying to
> get the usual Eugenia workflow in an Ant buildfile.

Great, thanks. Do let us know if it's not working as expected for you.
Good luck!

Cheers,
Louis.
Re: Error in EVL Quick Fix: "cannot find resource '/project:/...'" [message #573283 is a reply to message #479017] Sun, 09 August 2009 20:37 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Louis,

> Thanks very much, and thanks for the workaround.

Hope it helps, though it's a bit hackish :-).

> Great, thanks. Do let us know if it's not working as expected for you.
> Good luck!

It almost works as I'd expect, but the refresh problem is still there.
I've written a more detailed report below, but I'll save you some time.
Everything works, but the diagram view is not updated, though the error
marker disappears. I need to press F5 for that to happen. The saving
problem must have been my own mistake: I haven't managed to reproduce it.

If necessary, I can try and prepare some simple example which reproduces
this problem.

Regards,
Antonio

-- start report

I'm using Galileo in Linux (build ID I20090611-1540). I'm using the
modeling distribution which includes the incubating components, and the
latest Epsilon interim release.

The model involved is basically a control flow graph, and I'm making
sure that there are no edges whose source and target point to the same
node. The EVL script is like this:

context ActivityEdge {
constraint NoCycles {
check : self.source <> self.target
message : 'Source and target of an edge must not be the same'
fix {
title : 'Remove link from model'
do {
delete self;
}
}
}
}

I have some simple custom graphical components and the edge connects two
components which are inside of a compartment (the edge itself is not).

The steps to reproduce the problem are as follows:

1. Define a new graph in the form of start -> do something -> finish.
2. Add a cycle, violating the above constraint.
3. Use Edit -> Validate. The error for the above constraint appears,
with the correct marker over the edge.
4. Right click on the error in the Problems view, use Quick Fix, use
"Remove link from model".

Here is the problem:

5. The error message and the marker disappear, but not the edge.

The rest of the errors remain, but I suppose this is on purpose. IIRC,
custom code is needed to run validation every time the file is saved.
After that, there are several possibilities, which all work as expected:

6a. Close without saving, and then reopen. As expected, the edge remains
both in the diagram and the model.
6b. Save, then close, and then reopen. As expected, the edge has
disappeared from both the diagram and the model.
6c. Refresh with F5. The diagram is properly updated, and when saved,
the model is updated as well.

-- end report
Previous Topic:Working with enumerations and casting to subclass
Next Topic:isSubstringOf?
Goto Forum:
  


Current Time: Fri Apr 19 08:33:41 GMT 2024

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

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

Back to the top