NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Is there an option for permanent highlighting of certain identifiers and the like?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
tgm1024



Joined: 26 Feb 2015
Posts: 33

PostPosted: Wed Oct 11, 2017 5:22 pm    Post subject: Is there an option for permanent highlighting of certain identifiers and the like? Reply with quote

There are times when I'm hit with a myriad of identifiers which are very hard to visually parse. For instance the LWJGL class names (and resulting object names in examples) are a bear for me to make heads or tails of.

For over 30 years I've always had extreme difficulty with this kind of thing in code. FAR more than anyone else I've spoken to.

A page full of things such as this:


GLFWErrorCallback.createPrint(System.err).set();
if ( !glfwInit() ) throw new IllegalStateException("Unable to initialize GLFW");
glfwDefaultWindowHints();
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);


Would be so much easier for me to read as something like this:


GLFWErrorCallback.createPrint(System.err).set();
if ( !glfwInit() ) throw new IllegalStateException("Unable to initialize GLFW");
glfwDefaultWindowHints();
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);


Best probably an even lighter gray. Anything like that, or perhaps a plugin? Perhaps something in the xml config files for netbeans?

Thanks! This really has always held me back.
Back to top
tkellerer



Joined: 15 Aug 2008
Posts: 737
Location: Bavaria

PostPosted: Wed Oct 11, 2017 5:34 pm    Post subject: Re: Is there a way to ask for permanent highlighting of certain identifiers and the like? Reply with quote

tgm1024 wrote:
Best probably an even lighter gray. Anything like that, or perhaps a plugin? Perhaps something in the xml config files for netbeans?


There are two ways to do that (if I understand correctly what you want)

If that is a complete identifier, you can enable the "Keep mark" option in the "Highlighting" section of the editor's options.

If it's only a part of an identifier, then highlight that part, use "Ctlr-F" to search for that string and use the "Toggle highlight search" button in the editor's toolbar



search.png
 Description:
 Filesize:  19.58 KB
 Viewed:  222 Time(s)

search.png



options.png
 Description:
 Filesize:  26.69 KB
 Viewed:  222 Time(s)

options.png


Back to top
tgm1024



Joined: 26 Feb 2015
Posts: 33

PostPosted: Wed Oct 11, 2017 10:50 pm    Post subject: Reply with quote

Thanks but no, neither of those are tenable.

First suggestion I can't use because it's only part of identifiers I need visually masked out (or just recolored).

(please see my examples).


Second suggestion I can't use because it would 1. all vanish the moment I went to search for something else (which is part of coding) and 2. would only work for one set of criteria. There are conceivably a list of things that I would benefit from highlighting.


Sounds like the functionality isn't there. Do you know of a mod that would help? I'm pretty much ready to start coding my own at this point.
Back to top
tkellerer



Joined: 15 Aug 2008
Posts: 737
Location: Bavaria

PostPosted: Thu Oct 12, 2017 6:10 am    Post subject: Reply with quote

tgm1024 wrote:
Sounds like the functionality isn't there. Do you know of a mod that would help? I'm pretty much ready to start coding my own at this point.
You can always file an enhancement request:

https://netbeans.org/community/issues.html

But I fail to see how lacking that feature prevents you in any way to start coding.

I for one would be very irritated if the editor would always highlight something. I never turn "persistent marks" on and I think I can count the times where I used "Toggle highlight search" with one hand (including the time I used it to generate the screenshot).
Back to top
tgm1024



Joined: 26 Feb 2015
Posts: 33

PostPosted: Thu Oct 12, 2017 1:25 pm    Post subject: Reply with quote

tkellerer wrote:
tgm1024 wrote:
Sounds like the functionality isn't there. Do you know of a mod that would help? I'm pretty much ready to start coding my own at this point.
You can always file an enhancement request:

https://netbeans.org/community/issues.html

But I fail to see how lacking that feature prevents you in any way to start coding.

I for one would be very irritated if the editor would always highlight something. I never turn "persistent marks" on and I think I can count the times where I used "Toggle highlight search" with one hand (including the time I used it to generate the screenshot).

I never said it was preventing me from coding. I've been a professional software engineer since 1981.

I was talking about a setting that I could turn on and off, but in my case always leave on for certain projects.

And it's not highlighting but greying out, or even a subtle color change.

I'm talking about a particular visual pattern problem I have.

At first I thought that it had to do with a breakdown in pattern recognition, however a doctor clarified that it's actually that my visual pattern recognition ability is much higher than average and as a result I'm detecting the subpatterns (in this case, the glfw, etc.) so "strongly" that it's defeating the ability to detect the changing patterns (the ones that don't repeat, such as DefaultWindowHints, etc.).

As you can see from my initial example, I'm attempting to lessen the prominence of such repeating patterns in identifiers.

I've been coding with netbeans for years too. The only problem is that the pattern problem persists. The only time I've seen a solution to this was briefly on emacs (which I can't stand) that was running a custom lisp script to do the dimming (a friend of mine was doing this for the same reason, though he isn't affected by it quite as badly as I am).


Last edited by tgm1024 on Thu Oct 12, 2017 1:47 pm; edited 1 time in total
Back to top
tgm1024



Joined: 26 Feb 2015
Posts: 33

PostPosted: Thu Oct 12, 2017 1:28 pm    Post subject: Reply with quote

In any case, it sounds like it's not a functionality I'm going to find until I code it into the IDE myself with a mod or some incredibly complicated macro recording or something.

Thanks for the link to the features section.
Back to top
Quella



Joined: 21 Oct 2017
Posts: 1

PostPosted: Sat Oct 21, 2017 3:17 am    Post subject: Reply with quote

I feel a lot of complex code, really envy you who will these people Wink
Back to top
tgm1024



Joined: 26 Feb 2015
Posts: 33

PostPosted: Sun Oct 22, 2017 3:24 pm    Post subject: Reply with quote

Quella wrote:
I feel a lot of complex code, really envy you who will these people Wink


I'm sorry, I don't understand. Can you please rephrase?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo