Short description
Add a section 'incoming edges' in the scope graph. Rename the section 'edges' to 'outgoing edges'
Problem description.
Right now, it is easy to see the outgoing edges of a scope in the a .scopegraph file, but the incoming edges have to be derived by searching for that edge and scope, which is made particularly difficult due to the way Statix lays out multiple targets with the same edge.
Describe the solution you'd like
Instead of just edges, show incoming edges and outgoing edges in .scopegraph:
Some kind of menu action that can be used when on the scope. Sounds awful but would work.
Show references by CTRL+clicking the scope declaration (requires #85). Has two problems: first, it shows every reference, not just incoming edges. More importantly, Eclipse uses menu actions to show references, not just CTRL+click on a declaration like IntelliJ.
Additional context
This feature would work very well in combination with #85. The combination of these two would allow more or less effortless following edges back and forth between scopes.
Additional ideas for sections
References: relations in other scopes that refer to this scope.
Queries that were started from this scope
Queries that resolved to this scope
Queries that pathed via this scope
Some of these might become big very quickly, so it is probably a good idea to make sections collapsible, with menu options like collapse all > {scopes, sections, relations > {all, own, references}, edges > {all, outgoing edges, incoming edges}, queries > {all, started, resolved, pathed}}
Example:
#.-s_data_def_125-26 {
relations {
statics/base!generic_param : ("F", GenericParameter(#src/main/test.pie-s_data_def_125-26, "F"))
("T", GenericParameter(#src/main/test.pie-s_data_def_125-26, "T"))
}
references {
statics/base!generic_arg : #src/main/test.pie-s_data_instance_16-5 : (GenericParameter(#src/main/test.pie-s_data_def_125-26, "F"), IntType())
(GenericParameter(#src/main/test.pie-s_data_def_125-26, "T"), StrType())
#src/main/test.pie-s_data_instance_24-9 : (GenericParameter(#src/main/test.pie-s_data_def_125-26, "F"), BoolType())
(GenericParameter(#src/main/test.pie-s_data_def_125-26, "T"), DataType(#src/main/test.pie-s_data_instance_16-5))
}
outgoing edges {
statics/base!P : #src/main/test.pie-s_func_inner_16-5
#src/main/test.pie-s_func_60-17
}
incoming edges {
statics/base!INHERIT : #src/main/test.pie-s_data_instance_14-23
}
queries originating {
query var { name' :- name' == "foo" } filter P min P in #.-s_data_def_125-26 |-> []
}
queries resolving {
query data { name' :- name' == "Box" } filter P min P in #.-s_func_124-27 |-> [((<...too lazy to write out path...>), #.-s_data_def_125-26)]
}
queries traversing {
}
}
Short description Add a section 'incoming edges' in the scope graph. Rename the section 'edges' to 'outgoing edges'
Problem description. Right now, it is easy to see the outgoing edges of a scope in the a
.scopegraph
file, but the incoming edges have to be derived by searching for that edge and scope, which is made particularly difficult due to the way Statix lays out multiple targets with the same edge.Describe the solution you'd like Instead of just
edges
, showincoming edges
andoutgoing edges
in.scopegraph
:Describe alternatives you've considered
Additional context This feature would work very well in combination with #85. The combination of these two would allow more or less effortless following edges back and forth between scopes.
Additional ideas for sections
Some of these might become big very quickly, so it is probably a good idea to make sections collapsible, with menu options like collapse all > {scopes, sections, relations > {all, own, references}, edges > {all, outgoing edges, incoming edges}, queries > {all, started, resolved, pathed}}
Example: