intellij-emberjs icon indicating copy to clipboard operation
intellij-emberjs copied to clipboard

Add support for angle bracket components

Open Turbo87 opened this issue 6 years ago • 12 comments

to support e.g. https://github.com/rwjblue/ember-angle-bracket-invocation-polyfill

Turbo87 avatar Jun 06 '18 14:06 Turbo87

Came here to say this but you are on top of things.

km-smith avatar Jun 07 '18 04:06 km-smith

@Turbo87 is this something that you still need or is it a WIP?

donaldwasserman avatar Mar 30 '19 21:03 donaldwasserman

it's still needed

Turbo87 avatar Mar 31 '19 07:03 Turbo87

Any news on the progress of this? This is an integral part of Ember now and should be supported ASAP ;)

Thanks for the great plugin btw!

jpveilleux avatar May 24 '19 19:05 jpveilleux

I've started investigating this in the last couple weeks and it seems we can't just reuse the HbsReferenceContributor as it's only handling the parsed handlebars tree.

Next I'll try to build a TagDescriptorsProvider which implements XmlElementDescriptorProvider, XmlTagNameProvider , similar to the ng2 implementation.

The intellij plugin docs are pretty lacking :(

nvm It's easier on ng2 side as they ship their own lexer

makepanic avatar Jun 04 '19 19:06 makepanic

The intellij plugin docs are pretty lacking :(

oh yes... 🙈

Turbo87 avatar Jun 04 '19 19:06 Turbo87

Any news on this?

It's an awesome plugin, thank you for your work.

vsergiu93 avatar Nov 05 '19 09:11 vsergiu93

Sadly I didn't have any more time. I think the most sane solution would be to fork the handelbars plugin and extend their flex grammar to support what we need. This shouldn't be that much more work :tm: as we're already using the handlebars plugin parsing result.

Alternatively we could write our own gramma, similar to the ng2 plugin. That would be tons of work though :(

makepanic avatar Nov 05 '19 11:11 makepanic

@makepanic I'm not sure why we need a custom grammer for this. I've tried to implement it using a regular ReferenceContributor, but for some reason the references were not clickable at all.

As much as I like developing in IntelliJ, writing plugins for it is a real pain in the ...

Turbo87 avatar Nov 12 '19 22:11 Turbo87

Interesting. I've tried to extend the HbsPatterns to get proper results but it seemed like i can only use the tokens that the handlebars library finds. Somehow i only got handlebars syntax and everything else was transparent. Don't we need access to the "html" tokens too (aka angle bracket tokens)?

makepanic avatar Nov 13 '19 06:11 makepanic

yeah, the HbsReferenceContributor is limited to the Handlebars PSI. Angle Bracket Components are part of the HTML PSI though, so they would need their own dedicated reference contributor AFAICT.

Turbo87 avatar Nov 13 '19 07:11 Turbo87

Looks like this was added in https://github.com/Turbo87/intellij-emberjs/pull/293?

rohitpaulk avatar Jun 10 '21 20:06 rohitpaulk