|
|
Re: URI serialization [message #758841 is a reply to message #758706] |
Thu, 24 November 2011 16:57 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi Moritz
Yes, I thought of that just after posting the message, but I'm not sure
that it's valid.
The Scope services provide results for a variety of clients, so the full
description is appropriate. It doesn't seem right to optimize the return
for a particular client. I'll look again, maybe the client can be passed
through the scope calls to induce client-specific descriptions.
Regards
Ed Willink
On 24/11/2011 10:39, Moritz Eysholdt wrote:
> Hi Ed,
>
> did you try to do this via scoping?
>
> When the ScopeProvider is invoked it gets handed in the proper
> context. The returned scope would have to create an EObjectDescription
> for the referenced object in IScope.getSingleElement(EObject). The
> EObjectDescription's QualifiedName could be the referenced Object's
> shortened (relative) file name. You could create QualifiedNames with
> just one segment or treat each segment of the path as a segment of the
> QualifiedName.
>
> regards,
> Moritz
>
> On 24.11.11 09:01, Ed Willink wrote:
>> Hi
>>
>> Is there an elegant way to serialize a URI reference from one semantic
>> object to another?
>>
>> The problem is that a compact serialization should deresolve a monstrous
>> absolute URI such as
>> 'file:/C:/GIT/org.eclipse.ocl/tests/org.eclipse.ocl.examples.xtext.tests/bin/org/eclipse/ocl/examples/test/xtext/models/Fruit.uml#_kFEgAJaZEdunUqiNpqprXQ'
>>
>> with respect to the prevailing semantic context, but the semantic
>> context is not available in the ValueConverter.
>>
>> Resolving the problem in a derived CrossReferenceSerializer can work,
>> but breaks the modularity of the new serializer whereby all
>> rule-specific serialization is in the corresponding ValueConverter.
>>
>> Perhaps the ValueConverter API needs revisiting to support invocation
>> context and decorated qualified names (Bug 361577).
>>
>> Regards
>>
>> Ed Willink
>
|
|
|
Powered by
FUDForum. Page generated in 0.04242 seconds