Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Validation] Markers missing Location
[Validation] Markers missing Location [message #419041] Thu, 08 May 2008 21:02 Go to next message
Kane Bonnette is currently offline Kane BonnetteFriend
Messages: 3
Registered: July 2009
Junior Member
We have a project we recently converted to using EMF. As part of that, I'm
converting our old validation code to use the EMF validation framework. On
the test validation I've created (using a single constraint), I can
validate with the Diagnostician to get a Diagnostic, and then convert that
Diagnostic to an IMarker with the MarkerHelper/EditUIMarkerHelper class.
These markers show up in the Problems view correctly. However, they are
missing line numbers, which is the benefit we were hoping to get from
using EMF validation. Is there a way to get line numbers for these
markers, or does EMF not provide that functionality?
Re: [Validation] Markers missing Location [message #419044 is a reply to message #419041] Thu, 08 May 2008 21:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020505070103050209050805
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Kane,

EMF markers keep track of the actual object (using a URI) to which the
marker refers. But the location of each object in it's XML
serialization is not tracked.
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=196618>

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

In theory we could track such things as we're parsing, but of course the
first time you change something, the locations would change... We could
also do such tracking as we serialize. We've just never had time to
work on a synchronized source view.


Kane Bonnette wrote:
> We have a project we recently converted to using EMF. As part of that,
> I'm converting our old validation code to use the EMF validation
> framework. On the test validation I've created (using a single
> constraint), I can validate with the Diagnostician to get a
> Diagnostic, and then convert that Diagnostic to an IMarker with the
> MarkerHelper/EditUIMarkerHelper class. These markers show up in the
> Problems view correctly. However, they are missing line numbers, which
> is the benefit we were hoping to get from using EMF validation. Is
> there a way to get line numbers for these markers, or does EMF not
> provide that functionality?
>


--------------020505070103050209050805
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kane,<br>
<br>
EMF markers keep track of the actual object (using a URI) to which the
marker refers.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Validation] Markers missing Location [message #419046 is a reply to message #419044] Thu, 08 May 2008 21:50 Go to previous message
Kane Bonnette is currently offline Kane BonnetteFriend
Messages: 3
Registered: July 2009
Junior Member
Hi Ed,

I understand having other things to do :) Don't we all...

It seems to me that losing the accuracy of the line number/column is a
minimal issue, as I (and many other users, I imagine) would be
re-validating a model on changes. With an incremental builder, this isn't
resource/time intensive, and would maintain accuracy.

Of course, even if that weren't the case, if the user is going to edit the
code and the validation is off enough to be noticeable, the user can
always validate again.

I'll post these comments to the bug you gave as well. Good to know I'm not
the first to run into this.

Kane
Previous Topic:Problem with readonly multiline text editor
Next Topic:Modify resource set without a write transaction
Goto Forum:
  


Current Time: Tue Apr 16 13:12:41 GMT 2024

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

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

Back to the top