clutcher / bh

Issue tracker for Better Highlights Intellij IDEA plugin
6 stars 0 forks source link

Add highlighting of getters and setters in Java #95

Open Farley-Chen opened 5 months ago

Farley-Chen commented 5 months ago

Hi, I think better highlighter is a great plugin in IDEA.

I wonder that is it possible to add a new feature for java property(getter, setter) highlight?

just like this.

https://stackoverflow.com/questions/31298497/is-there-syntax-highlighting-for-java-getters-and-setters-in-intellij

I have tried regex highlight but it is slow then other highlighter like keywords.

clutcher commented 5 months ago

@Farley-Chen I'll check what I can do with that. Can you share regexp which you are using?

Farley-Chen commented 5 months ago

@Farley-Chen I'll check what I can do with that. Can you share regexp which you are using?我会检查一下我能用它做什么。您可以分享您正在使用的正则表达式吗?

The regex are here, although I'm not sure if they are always right.

for getter: [ .]get([^()]+?)\(\) for setter: [ .]set([^()]+?)\( and I found now 2014version can use group? (I'm still using the 2013version) may be in 2014verion for setter: [ .]set([^()]+?)\(([^()]+?)\)

clutcher commented 5 months ago

@Farley-Chen Can you try to use \.set([A-Za-z]+)\(? It is not the same, but I think it should cover all real life cases, and it is 4x times faster.

Farley-Chen commented 5 months ago

@Farley-Chen Can you try to use \.set([A-Za-z]+)\(? It is not the same, but I think it should cover all real life cases, and it is 4x times faster.您可以尝试使用 \.set([A-Za-z]+)\( 吗?它不一样,但我认为它应该涵盖所有现实生活中的情况,而且速度快了 4 倍。

OK, I will have a try, Thank you!

clutcher commented 5 months ago

@Farley-Chen Is new regexp working fast enough? Or you still have an issue and want a separate option for getters/setters highlighting?

Farley-Chen commented 4 months ago

@Farley-Chen Is new regexp working fast enough? Or you still have an issue and want a separate option for getters/setters highlighting?

The new regexp can work ok. If you have enough time, the separate option for getters/setters is better for me.

Farley-Chen commented 2 months ago

@Farley-Chen Is new regexp working fast enough? Or you still have an issue and want a separate option for getters/setters highlighting?新的正则表达式运行得足够快吗?或者您仍然遇到问题并想要一个单独的选项来突出显示 getter/setter?

Hi, I would like to know how long it will take to implement this feature, as I would like to purchase an annual subscription(to receive a fallback license).

So I want to know if I should purchase directly or wait for the new features to come out before purchasing.

clutcher commented 2 months ago

@Farley-Chen My current plan is to release it with release of Intellij 2024.2(approximately july-august). But I'm not 100% sure in that. The main issue right now is how plugin stores settings. Existing approach I implemented with one of the initial plugin releases 5 years ago and it doesn't work well with 2+ settings per token. Switching on another way of settings storing is complicated and requires to also write settings migration stuff.

If you want to speed up implmentation - I can post here intermediate versions, which you would need to install manually, but they would not be super stable, and most probably would require to reenter settings time to time.

P.S. If you don't have any license right now, you can buy it, as I definitely would implement that ticket this year. If your license recently expired, than better to wait till plugin version 2024.2.1.

Farley-Chen commented 2 months ago

@Farley-Chen My current plan is to release it with release of Intellij 2024.2(approximately july-august). But I'm not 100% sure in that. The main issue right now is how plugin stores settings. Existing approach I implemented with one of the initial plugin releases 5 years ago and it doesn't work well with 2+ settings per token. Switching on another way of settings storing is complicated and requires to also write settings migration stuff.

If you want to speed up implmentation - I can post here intermediate versions, which you would need to install manually, but they would not be super stable, and most probably would require to reenter settings time to time.

P.S. If you don't have any license right now, you can buy it, as I definitely would implement that ticket this year. If your license recently expired, than better to wait till plugin version 2024.2.1.

Just follow your rhythm.

Ok, maybe I will wait till 2024.2.