jtree icon indicating copy to clipboard operation
jtree copied to clipboard

💡 Designer: Add GoTo definition to designer app

Open breck7 opened this issue 6 years ago • 3 comments

Perhaps right click, add a context menu. Go to nodeType definition as well as goto cellType definition.

For "extends" keywords in grammar, perhaps a goto definition as well.

breck7 avatar Nov 11 '19 01:11 breck7

Added app.program.toSideBySide([app.program.toDefinitionLineNumberTree()]).toString() for now.

breck7 avatar Nov 11 '19 01:11 breck7

Just need to add UI for it. The toDefinitionLineNumberTree method replaces the cells with the line number the cellType definition appears on. I also prefixed each line to include the line # the nodeTypeDefinition is defined on.

gotoDefinition

breck7 avatar Nov 11 '19 01:11 breck7

Should add this is from feedback from ZK.

Also, for next steps after the UI is done, potential for something cool. "It's kind of neat actually, the fact that the definitionLineNumber tree has the same shape as the actual source code. Makes me think you could create a powerful 3D visualization type, where you would have the grammar on one plane, the source code on another, and then simply draw lines connecting each word in the program to it's definition line in the grammar."

breck7 avatar Nov 11 '19 02:11 breck7

Would be neat but low pri

breck7 avatar Jul 19 '24 19:07 breck7