Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make fields and functions in PdeKeywords protected #2383
The PDEKeywords class in the Processing app, handles syntax highlighting. This would seem a prime candidate for subclassing in different modes. As different languages have different syntax rules, then there should be different code for handling them (I am currently working on the Python mode).
However, it isn't really set up for subclassing as important members and functions (lastOffset, lastKeyword, doKeyword) are declared private. Would it be possible to make these protected?
Looked at this now and went back and forth several times... The keyword coloring is really fragile (and buggy), and those interfaces stink, so I'd left them hidden so that we're not supporting them in perpetuity or setting up an expectation of them working in future releases.
Then again, if we change anything, it'll be getting rid of the entire 'syntax' package, so we may as well make those available as-is.
So... fixed for 3.0 beta 4.