Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insertion live template for connections #120

Merged
merged 58 commits into from
Aug 29, 2023
Merged

Insertion live template for connections #120

merged 58 commits into from
Aug 29, 2023

Conversation

ducky64
Copy link
Collaborator

@ducky64 ducky64 commented Aug 29, 2023

Adds insertion live template support for GUI connect operations. Experimental, partially implemented (for single ports only, limited support for arrays and boundary ports), currently behind a toggle in the settings menu.

Architecturally, this separates the connect-builder (which determines which connections are allowed to a link) from the block analysis (which determines which ports are in a connected group, and what connects are available to a port), from the IR mutator (the executor, which takes a connectivity change and updates the Block IR), from the code generator / insertion live template. Probably more code to before, but in chunks that actually make more sense. Prior, GUI connects were much more monolithic code-wise.

Other functional changes:

  • Fix getting the nearest insertion location when above the class level - prior it crashed because it would traverse to the folder level and can’t getTextRange. Now it detects a null text range is invalid.

Other refactoring / infrastructural changes:

  • Updates to support the new connect expansion.
    • Refactor the IR-to-graph parsing to use the expanded versions, if available.
  • Move the insert block live template to its own file
  • Support no variables in insertion live template

Future TODOs

  • Support suggested index - perhaps as template field
  • Don’t allow name when connecting to an existing named link
  • Support connect append in live template
  • Support boundary ports including bridging
  • Better support for array types

@ducky64 ducky64 changed the base branch from dev to main August 29, 2023 22:12
@ducky64 ducky64 merged commit c0cab42 into main Aug 29, 2023
2 checks passed
@ducky64 ducky64 deleted the connect3 branch August 29, 2023 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant