This PR introduces a new Index based on VSM: CodeIndex, which can be used to retrieve pieces of code from a code query.
Model entities are indexed by their ANode and vectorization is based on model usage such as:
modules importation
classes spcialization and refinement
methods calls and refinements
Example:
# Create the index
var index = new CodeIndex(toolcontext)
for mentity in mentities do
index.index_mentity(mentity)
end
# Match a piece of code
var matches = index.match_code("print \"Hello, World!\"")
for match in matches do
print match
end
This PR introduces a new Index based on VSM: CodeIndex, which can be used to retrieve pieces of code from a code query.
Model entities are indexed by their ANode and vectorization is based on model usage such as:
Example: