breck7 / scrollsdk

Build on top of Scroll.
https://sdk.scroll.pub
380 stars 17 forks source link

💡 Designer: Add GoTo definition to designer app #102

Closed breck7 closed 1 month ago

breck7 commented 4 years ago

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 commented 4 years ago

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

breck7 commented 4 years ago

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 commented 4 years ago

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 commented 1 month ago

Would be neat but low pri