You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
While writing the "Inline Editor for JavaScript functions" and "Inline Image Viewer" extensions, I needed to access the "private" _codeMirror property in order to get the current mode (using getOption("mode")) and call the getTokenAt() function.
We should either expose these on Editor, or consider just making the _codeMirror property public.
Pull #923 fixed half of this by adding an Editor.getModeForSelection() API. For the remaining half (getTokenAt()) we're still not really sure how much (if any) we should try to abstract away the CodeMirror tokenizer APIs.
The existing TokenUtils abstracts away getTokenAt() reasonably well, and the new 'token stream' I'm working on will do so even more cleanly. After that we may be able to close this.
I guess this can be closed now, as we've managed to achieve everything we need from our TokenUtils implementation.
Thanks for noticing, @ficristo (and yeah, it's been some time, I'm catching up with my mail again ;) )
Activity
njx commentedon May 8, 2012
To @peterflynn and @gruehle to talk about along with #803.
peterflynn commentedon May 24, 2012
Pull #923 fixed half of this by adding an
Editor.getModeForSelection()API. For the remaining half (getTokenAt()) we're still not really sure how much (if any) we should try to abstract away the CodeMirror tokenizer APIs.peterflynn commentedon Mar 28, 2013
The existing TokenUtils abstracts away getTokenAt() reasonably well, and the new 'token stream' I'm working on will do so even more cleanly. After that we may be able to close this.
ficristo commentedon Dec 31, 2015
Is there still something to do here? Has "token stream" landed?
marcelgerber commentedon Feb 19, 2016
I guess this can be closed now, as we've managed to achieve everything we need from our TokenUtils implementation.
Thanks for noticing, @ficristo (and yeah, it's been some time, I'm catching up with my mail again ;) )