Programming exercises
: Refactor online editor to use native ACE file sessions
#7393
Labels
Programming exercises
: Refactor online editor to use native ACE file sessions
#7393
Is your feature request related to a problem?
When switching files in the online editor the editor remains on the position scrolled to in the previous file (e.g. file A line 0, switch to file B, scroll to line 70, switch back to file A; now that has scrolled as well).
The current implementation uses a custom file session to implement multiple sessions on top of the editor:
Artemis/src/main/webapp/app/exercises/programming/shared/code-editor/ace/code-editor-ace.component.ts
Line 49 in 8425924
Artemis/src/main/webapp/app/exercises/programming/shared/code-editor/ace/code-editor-ace.component.ts
Line 119 in 8425924
With this only the file content and the cursor position is saved and later manually restored when switching files by overwriting the current content of the session.
This also leads to somewhat fragile behaviour of the inline annotations (e.g., bug #7033).
Describe the solution you'd like
Use the native file sessions provided by the ACE library (https://ace.c9.io/#nav=howto section ‘One Editor, Multiple Sessions’) to handle the sessions.
Open questions
The text was updated successfully, but these errors were encountered: