Git Product home page Git Product logo

Comments (8)

casid avatar casid commented on July 25, 2024 5

Due to my frustration with JSP at work, I've written jte during lockdown - a small template engine that has pretty much full IntelliJ support for code suggestions, refactorings and highlighting. The language takes a very similar approach as Rocker does, so the jte IntelliJ plugin might be a blueprint for a Rocker IntelliJ plugin.

In case you're curious, here is a gif showing the plugin in action:
jte in IntelliJ

The key part of the plugin is org.jusecase.jte.intellij.language.JteJavaLanguageInjector extending com.intellij.lang.injection.MultiHostInjector, which basically injects the various Java parts of the template in a Java class that IntelliJ understands.

from rocker.

jjlauer avatar jjlauer commented on July 25, 2024 4

@tipsy @bjornbak We're trying to gauge interest in an IDE plugin for rocker templates (that would include code completion). If interested please take a few seconds to fill out this survey: https://www.surveymonkey.com/r/VKXYG8P

from rocker.

jjlauer avatar jjlauer commented on July 25, 2024

@bjornbak IDE support would obviously be amazing -- but not exactly a trivial problem. The project is relatively new so no IDE support at the moment. If you wanted to give intellij a stab, I'd say go for it! The compiler generates a very usable Model object you could build a template engine with.

from rocker.

tipsy avatar tipsy commented on July 25, 2024

Any update on this? The engine looks very promising, but no IntelliJ-plugin is unfortunate.

from rocker.

jjlauer avatar jjlauer commented on July 25, 2024

from rocker.

raderio avatar raderio commented on July 25, 2024

We need to push in Spring Boot direction #66
If Rocker will be popular, it will be by default in Spring Boot, so Jetbrains itself will make a plugin.

from rocker.

bendem avatar bendem commented on July 25, 2024

I have been trying to whip up something to provide syntax highlighting for rocker in intellij but I'm clearly out of my league. I've tried using https://github.com/antlr/antlr4-intellij-adaptor/ and came up with this:
Screenshot 2019-07-24 at 12 10 00
Screenshot 2019-07-24 at 13 01 33

I'm sure someone with a basic understanding of how antlr works (not my case) would get to something actually usable in a few hours/days.

The implementation can probably be heavily inspired by pebble's plugin: https://github.com/bjansen/pebble-intellij

Source: https://github.com/bendem/rocker-intellij-plugin

from rocker.

iluoxuan avatar iluoxuan commented on July 25, 2024

@bendem nice , i like rocker but no idea support ,

from rocker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.