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

Feature/multi tab support #29

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Efratror
Copy link

@Efratror Efratror commented Apr 1, 2022

Adds support for sketches with multiple files/tabs.

Description of the changes
All the .pde files in a workspace are keyed by there filename with there contents as value in to a contents map. When a file changes, is added or removed the map is updated. When preprocessing starts each line of the contents map is added to a bigcode block. Each line number of the file/tab is keyed to the line number of the big code block. The big code block is then further preprocessed.

When a server request (definition, diagnostics or reference) is passed by the client. The line number of the big code is converted to the line number of the file/tab it belongs to.

Closes #28

A sketch is the contents of all files in the directory.

A transformation map is used to switch between line numbers in the java file and the .pde file (tab)
The definition, diagnostic and reference capabilities of the server need to change to accommodate for multi-tab support.

The line number of the .pde file(tab) needs to be retrieved from the sketch in order to display relevant information correctly
Bigcount wasn't incremented after the first run but became 1 again. This resulted in an error on a second tab not mapping correctly to the original .pde file and line number
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.

[FEATURE] Multiple tab support
1 participant