You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Kenneth Fogel <kf...@dawsoncollege.qc.ca.INVALID> on 2025/09/26 18:20:09 UTC

Its time we bid adieu to those four first lines

Please, please, please stop having:
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
appear at the top of class files. Please create an option in Tools->Options to perform these tasks.

I do not enjoy that in writing my latest book that uses NetBeans as the preferred IDE I must add an instruction to immediately delete these first 4 lines. Sure, I could explain that if they can find these files, clicking on them does not work in Windows 11, they could edit these lines out of existence. But why? They are NetBeans configuration, and you should be able to do this from Options and not from inside a source code file. I apologize if they are somewhere in Options but I could not find it in the NetBeans meu choices.

This has come up before, but the time has come. NetBeans 28 must get rid of these four lines, In My less than Humble Opinion.

Ken Fogel

PS: I went hunting for these files on my Win 11 system and I cannot find them anywhere. Could someone tell me where the top-secret location is.


Re: Its time we bid adieu to those four first lines

Posted by Christian Lenz <Ch...@gmx.net.INVALID>.
+1 from my side too. We can have wizards for helping users figuring 
NetBeans out and also helping tutorials. But this shouldn't be in the 
file at all. My 2 cents.


Cheers

Chris

Am 26.09.2025 um 20:20 schrieb Kenneth Fogel:
> Please, please, please stop having:
> /*
> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
> */
> appear at the top of class files. Please create an option in Tools->Options to perform these tasks.
>
> I do not enjoy that in writing my latest book that uses NetBeans as the preferred IDE I must add an instruction to immediately delete these first 4 lines. Sure, I could explain that if they can find these files, clicking on them does not work in Windows 11, they could edit these lines out of existence. But why? They are NetBeans configuration, and you should be able to do this from Options and not from inside a source code file. I apologize if they are somewhere in Options but I could not find it in the NetBeans meu choices.
>
> This has come up before, but the time has come. NetBeans 28 must get rid of these four lines, In My less than Humble Opinion.
>
> Ken Fogel
>
> PS: I went hunting for these files on my Win 11 system and I cannot find them anywhere. Could someone tell me where the top-secret location is.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Its time we bid adieu to those four first lines

Posted by Michael Bien <mb...@gmail.com>.
On 9/27/25 11:22, Neil C Smith wrote:
> On Fri, 26 Sept 2025 at 19:44, Michael Bien <mb...@gmail.com> wrote:
>> agreed. I remember trying to remove some even more annoying occurrences
>> of the template links for cases which leave even less design space for users but it got
>> vetoed unfortunately.
>>
>> https://github.com/apache/netbeans/pull/3876
> And from that discussion it appears that better signposting to "new"
> users that they need to hold down CTRL or CMD to make anything
> clickable in the editor is still something we're missing out on! :-)
>
> Ken, that would actually be a useful thing to highlight early in your
> book, as it's a key part of navigation around code and resources in
> the editor.  And there's a very obvious reason you don't want a normal
> click to navigate anywhere in a text editor.
>
> This header change came from
> https://github.com/apache/netbeans/pull/2960  Unfortunately, that only
> partly made this "easier", because it also removed the important fact
> that these things are managed from Tools / Templates and not Tools /
> Options.
this wasn't just the header, you will find those "please configure me"
comments in more places which were generated by NB. (even lambda completion
one-liners until #3458)

This is also no UI issue (!) as suggested elsewhere. The comment is in the file.
Any attempt to fold it or make it render nicer will obfuscate the problem and
likely make it worse:

https://github.com/search?q=%22choose+Tools+%7C+Templates%22&type=code


I question that the tutorial aspect outweighs the general annoyance those links
cause. After all, good defaults are very important! The less someone has
to configure to make a tool usable the better.

IMO: neither the comment nor the link should exist, if this needs some kind of
tutorial, it could be potentially solved via a hint or something like that which
jumps to the template on activation if the cursor is in the top level file comment.
NB doesn't have a help system anymore, its weird that out of all things
which could be explained, code templates were prioritized so much that
links are spammed into source code.

A wiki article about code templates would probably help here more than anything
else, esp after chat bots read it on their quest to replace web search.

(If you search "NetBeans code templates" you likely land on an article which
explains how to bundle them in a nbm)

-mbien


>
> In particular, Tools / Templates - Licenses / Default License - Open
> in Editor is I think what you're looking for?
>
> It's important to consider that these are also brandable.  If one of
> the reasons for the current text is still VSNetBeans, and that is not
> working for the IDE, they do not have to be the same.
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Its time we bid adieu to those four first lines

Posted by Jaroslav Tulach <ja...@gmail.com>.
> users that they need to hold down CTRL or CMD to make anything
> clickable in the editor

If the problem really is „Ctrl-Click“, then I’d first change the template text and only later "throw the baby out with its bathwater".

> Ken, that would actually be a useful thing to highlight early in your
> book, as it's a key part of navigation around code and resources in
> the editor.  And there's a very obvious reason you don't want a normal
> click to navigate anywhere in a text editor.

;-) Good idea. 

On the other hand the UI should be usable without reading any books and as Ken adventure shows, apparently the UI is currently misleading enough...
-jt

PS: If you want me to update the text, I can do it as a weekend entertainment - at least I’ll have some important contribution to next Net|Beans release.


> 27. 9. 2025 v 11:22, Neil C Smith <ne...@apache.org>:
> 
> On Fri, 26 Sept 2025 at 19:44, Michael Bien <mb...@gmail.com> wrote:
>> agreed. I remember trying to remove some even more annoying occurrences
>> of the template links for cases which leave even less design space for users but it got
>> vetoed unfortunately.
>> 
>> https://github.com/apache/netbeans/pull/3876
> 
> And from that discussion it appears that better signposting to "new"
> users that they need to hold down CTRL or CMD to make anything
> clickable in the editor is still something we're missing out on! :-)
> 
> Ken, that would actually be a useful thing to highlight early in your
> book, as it's a key part of navigation around code and resources in
> the editor.  And there's a very obvious reason you don't want a normal
> click to navigate anywhere in a text editor.
> 
> This header change came from
> https://github.com/apache/netbeans/pull/2960  Unfortunately, that only
> partly made this "easier", because it also removed the important fact
> that these things are managed from Tools / Templates and not Tools /
> Options.
> 
> In particular, Tools / Templates - Licenses / Default License - Open
> in Editor is I think what you're looking for?
> 
> It's important to consider that these are also brandable.  If one of
> the reasons for the current text is still VSNetBeans, and that is not
> working for the IDE, they do not have to be the same.
> 
> Best wishes,
> 
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Its time we bid adieu to those four first lines

Posted by Neil C Smith <ne...@apache.org>.
On Fri, 26 Sept 2025 at 19:44, Michael Bien <mb...@gmail.com> wrote:
> agreed. I remember trying to remove some even more annoying occurrences
> of the template links for cases which leave even less design space for users but it got
> vetoed unfortunately.
>
> https://github.com/apache/netbeans/pull/3876

And from that discussion it appears that better signposting to "new"
users that they need to hold down CTRL or CMD to make anything
clickable in the editor is still something we're missing out on! :-)

Ken, that would actually be a useful thing to highlight early in your
book, as it's a key part of navigation around code and resources in
the editor.  And there's a very obvious reason you don't want a normal
click to navigate anywhere in a text editor.

This header change came from
https://github.com/apache/netbeans/pull/2960  Unfortunately, that only
partly made this "easier", because it also removed the important fact
that these things are managed from Tools / Templates and not Tools /
Options.

In particular, Tools / Templates - Licenses / Default License - Open
in Editor is I think what you're looking for?

It's important to consider that these are also brandable.  If one of
the reasons for the current text is still VSNetBeans, and that is not
working for the IDE, they do not have to be the same.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Its time we bid adieu to those four first lines

Posted by Michael Bien <mb...@gmail.com>.
agreed. I remember trying to remove some even more annoying occurrences
of the template links for cases which leave even less design space for users but it got 
vetoed unfortunately.

https://github.com/apache/netbeans/pull/3876

File headers are at least somewhat useful to configure due to licenses etc.


There was a time when NB generated those links for lambdas (!) too :)

https://github.com/apache/netbeans/pull/3458 removed it quietly.

best regards,

michael


On 9/26/25 20:20, Kenneth Fogel wrote:
> Please, please, please stop having:
> /*
> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
> */
> appear at the top of class files. Please create an option in Tools->Options to perform these tasks.
>
> I do not enjoy that in writing my latest book that uses NetBeans as the preferred IDE I must add an instruction to immediately delete these first 4 lines. Sure, I could explain that if they can find these files, clicking on them does not work in Windows 11, they could edit these lines out of existence. But why? They are NetBeans configuration, and you should be able to do this from Options and not from inside a source code file. I apologize if they are somewhere in Options but I could not find it in the NetBeans meu choices.
>
> This has come up before, but the time has come. NetBeans 28 must get rid of these four lines, In My less than Humble Opinion.
>
> Ken Fogel
>
> PS: I went hunting for these files on my Win 11 system and I cannot find them anywhere. Could someone tell me where the top-secret location is.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Its time we bid adieu to those four first lines

Posted by Matthias Bläsing <mb...@doppel-helix.eu.INVALID>.
Hi,

Am Freitag, dem 26.09.2025 um 18:20 +0000 schrieb Kenneth Fogel:
> Please, please, please stop having:
> /*
> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
> */
> appear at the top of class files. Please create an option in Tools->Options to perform these tasks.

These are templates. And they are configured in Tools->Templates. The
one you are looking for is Licenses -> Default License.

What is more, when you are in project context you can just select a
license in the project configuration and that will become the header.
There is nothing magic here.

> I do not enjoy that in writing my latest book that uses NetBeans as the preferred IDE I must add an instruction to immediately delete these first 4 lines. Sure, I could explain that if they can find these files, clicking on them does not work in Windows 11, they could edit these lines out of existence. But why? They are NetBeans configuration, and you should be able to do this from Options and not from inside a source code file. I apologize if they are somewhere in Options but I could not find it in the NetBeans meu choices.

The link in the source code is a convenience option. Strg+Click takes
you to the right place (on english keyboards that will be CTRL and I
think on mac os this CMD). As described above you can reach the
location without this.

> This has come up before, but the time has come. NetBeans 28 must get rid of these four lines, In My less than Humble Opinion.

It must not. In my humble opinion. So what now?

Greetings

Matthias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists