ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. dreamreal tornadovm hit 4.0.0
  2. dreamreal any tornado users?
  3. Chronos cheeser: He writes interesting blog articles
  4. Chronos I don't always agree with him, but they're almost always interesting
  5. cheeser yeah
  6. Bombe Hmm, there doesn’t seem to be a maintained syntax highlighting library for Java. That makes me sad.
  7. Bombe Not sure I understand. I have a String, I want some representation that allows e.g. colouring. Could be an AST, could be Markdown, could be HTML.
  8. Bombe That would be an acceptable outcome, yes.
  9. Bombe Maybe my search engine skills have turned to shit, but the only thing I can find is commonmark, which doesn’t do syntax highlighting, and blogposts that list a number of syntax highlighting projects which support ~5 languagues and are unmaintained.
  10. Bombe The fuck, do I have to explain the difference between Java and JavaScript to you? :D
  11. Bombe String -> (something)? -> HTML is pretty much exactly what I want to do.
  12. Bombe Client-side is no good, though, I need it in Java.
  13. Bombe Well, on the JVM, to be more precise, don’t care what it’s in exactly, unless it requires gigantic runtimes or is Scala. :)
  14. Bombe I’m getting a String, I want to apply syntax highlighting, and I want to store the resulting HTML.
  15. ernimril Bombe, so what parts do you want help with? The tokenizer? the parser? the highlighter? the output handling?
  16. ernimril Bombe, depending on what you want, this can maybe be useful for a few of the above: https://github.com/bobbylight/RSyntaxTextArea
  17. nevet GitHub - bobbylight/RSyntaxTextArea: A syntax highlighting, code folding text editor for Java Swing applications.
  18. javabot ernimril's title: "GitHub - bobbylight/RSyntaxTextArea: A syntax highlighting, code folding text editor for Java Swing applications. · GitHub"
  19. cheeser https://github.com/codelibs/jhighlight ? updated last week.
  20. nevet GitHub - codelibs/jhighlight: JHighlight is an embeddable pure Java syntax highlighting library.
  21. javabot cheeser's title: "GitHub - codelibs/jhighlight: JHighlight is an embeddable pure Java syntax highlighting library. · GitHub"
  22. Bombe ernimri, what I would love is a library to take care of all of that for me. :D
  23. dreamreal considering the specificity of the requirement, that'd be a high expectation :D
  24. Bombe I’m not sure what is so incredibly hard to understand: I have a String, and I want a String.
  25. Bombe The final result will be stored; at some point in the future it will be sanitized and displayed in a browser, but that’s completely irrelevant because out of scope.
  26. dreamreal so you want a string, that presumably represents valid java source, to be highlighted in... html using... styles? no css?
  27. dreamreal no, like, external css
  28. dreamreal why not, in that case, start with a keyword search/replace: s/package/<span style="color:red">package</span>/
  29. dreamreal otherwise you're looking at generating an AST and using that to spit out bits based on token purpose
  30. dreamreal which is not particularly complicated, I suppose
  31. Bombe Yes, I know how (in theory) to do that manually, and if everything else is shit, I will probably do that.
  32. Bombe Still, I would love to not do that myself. :)