Closed nicky508 closed 4 years ago
I played with the editor and saw that the proposals aren't working correctly yet. Needs some tweaking. This doesn't show in the airport-mapping sample, so i will add another example in order to show the issue.
I played with the editor and saw that the proposals aren't working correctly yet. Needs some tweaking. This doesn't show in the airport-mapping sample, so i will add another example in order to show the issue.
Ok, curious, As soon as I have the example I take a look.
I added the permit-mapping example to master, to have a working example as a baseline.
References using QualifiedName
stopped working:
map Agency from permits.t_agency {
I played with the editor and saw that the proposals aren't working correctly yet.
Typing Ctrl-Space and "ro" should propose transit.route property.
Right now, I have to begin with the prefix, like typing "tr".
I see, the problem is in the new converter class. I think some additional code needs to be added. Maybe some code is conflicting with the original QualifiedName.
The issue is that I added an extra name converter. However, this one works on the same qualified name provider. Therefore, it gives issues on the existing Qualified names. To solve this issue we need to add and extra qualified name provider. I created this one which works on rdfname instead of name. But the general way is to replace the existing provider by a custom provider. Try to find how to add the custom provider besides the existing one.
Registered the RDF Qualified Name Provider for "rdfname" instead of "name" and a name converter with the ":" delimiter instead of ".". This would be the base for solving the issue. Now it should be changed in the grammer, but I get stuck on it. I started with getting it to work on the RdfClass. Therefore I changed:
Vocabulary:
'vocabulary' rdfname=ID '{'
prefix=Prefix
('classes' (classes+=RdfClass)*)?
('properties' (properties+=RdfProperty)*)?
'}';
RdfClass:
rdfname=ID;
SubjectTypeMapping:
type=[RdfClass|RdfQualifiedName];
RdfQualifiedName:
ID (':' ID);
But how I change the grammer, I keep getting "Couldn't resolve reference to RdfClass 'transit:Stop'."
@mchlrch Do you have any clue where to look for the solution? I think I think wrong in how to construct the grammer.
"Couldn't resolve reference to RdfClass 'transit:Stop'"
This error comes from the linker, so there might be something missing in the Qualified Name Provider. I don't see an issue with the grammar.
I will pull and debug to see if I can figure it out
I will pull and debug to see if I can figure it out
Looking at the code, I start to think that what we try to do is not intended. Access to the delimiter of the qualifiedName is without context, so it seems not to be intended that one can have several different delimiters within one language. The QualifiedNameConverter
would need to be able to choose the right delimiter, but there is no context designated for that.
@nicky508 Could you ask in the forum, if it's not intended that one can have several different types of QualifiedNames with different delimiters within one language? https://www.eclipse.org/forums/index.php?t=thread&frm_id=27
Closing this. From what I can tell, the working parts of the changes got cherry picked to master individually.
12