Hi,
On Tue, Nov 24, 2009 at 3:08 PM, Robert M. Fuhrer
<
rfuhrer@xxxxxxxxxxxxxx> wrote:
Ok, for reference resolution, silly me, of course you're right - and the
schema "map[loc, loc]" could be considered a composition of the
IReferenceResolver API with the ISourcePositionLocator API.
yup.
That said, the schema "map[loc, loc]" is still so generic that it could mean
many things, so if the hyperlink controller simply looked for a fact of the
schema "map[loc, loc]" for the given language, it could pick up relations
that aren't really ref => def. Another example is "rel[loc, loc]", which is
basically the signature of "mark occurrences", which by design permits
multiple interpretations.
It's a matter of adding more naming. Either we add a 'String
getName()' method to IFactGenerator, such
that we can lookup by name, or we use a type alias to document which
interpretation
for map[loc,loc] we intended. E.g.
type SourceReferenceMap = map[loc, loc]; (In Java:
typeFactory.aliasType("SourceReferenceMap",
typeFactory.mapType(typeFactory.locationType(),
typeFactory.locationType()))
Now we can look up the corrrect IFactGenerator by searching for
SourceReferenceMap, which is just a map[loc,loc].