This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In NB 5, all methods in jsps are bolded. In NB 6.5, they are not. I have code completion working and they are still not bolded. They are bolded however in java files. I am currently in a free form project with build script
Method calls are not bolded AFAIK using the 6.5 default coloring schema. Just method declarations are bolded. The same applies for jsps. Try: <%! public void foo() { //bolded } %> <% foo(); //not bolded (correct) %>
I'm sorry, but I should've mentioned that i'm using the NB5.5 Profile for 'Fonts & Colors'.
If netbeans 5.5 color scheme is used both method declarations and usages are bolded in JSP. At least for me and my colleague. OTOH in some stage of the modification the method names turned to be not bolded, but then after some other modifications it turned back. We were not able to reproduce the problem anymore. Can you please check if the problem occures for all files or just some specific ones? Can you try to put my code snippet above into an empty JSP?
That 'foo' snippet does not bold the method usage. I have noticed that in NB 6.5, bolding never works on method usage for JSPS or plain JAVA code if code completion is not working. I have assumed this functionality to be intentional and it makes sense to do it that way, so I am fine with that. On the other hand, if code completion is working, bolding is inconsistent, even with different files in the same project. I have not been able to detect any kind of pattern with this. When bolding is working, it usually takes at least 10 seconds for it to 'kick in' after opening the file. One more thing. Related to bug 154347, JSPFs never bold the methods either, even when code completion is working.
"Bolding" besides other semantic highlightings depends on parser result. So if the source is broken to some extent those features are disabled. The same applies for the completion. Please try to follow these steps: 1) create a new JSP in your java web project 2) delete its content and put <%! public void foo() { foo(); } %> inside => both method name occurances should be bolded in nb5.5 color profile, just the method declaration is bolded in default nb 6.5 coloring profile. At least they are for us on 6.5 FCS build. Can you please tell me what build number do you use? What platform and what project types and libraries? Thanks.
that code snipplet does not have the method usage bolded, but does have the method declaration bolded. I am using version 6.5 (Build 200811100001). I am using a 'Web Free-Form Application'. As for libraries, I usually add to the Java Sources classpath; my companies main jar file, located in the bin directory of my local output directory. I also usually add the javax.servlet.jar in the same bin folder. For Web Sources, i usually add jstl.jar and standard.jar (for tag library support) from a specific folder in our source.
Sorry, my last comment was incorrect. Neither the method declaration or usage are bolded in the snipplet i used.
Davide, can you look at this issue? It looks like a free form project problem.
Created attachment 74444 [details] test project
Works fine for me. Please try opening attached project in NB 6.5 with clean userdir (start NB with "--userdir /tmp/userdir"). Before opening it it IDE open nbproject/project.xml file and change "../../java-ee5/lib/javaee.jar" path to wherever you have that file locally. Or perhaps replace it with your javax.servlet jar - I'm not sure what all is inside that jar. Opening that project and 1.jsp bolds foo declaration and I can navigate from foo() call back to declaration.
I tried it out and it did not bold for me. I am not sure what you are wanting for that jar you added. i don't have a 'javaee.jar' anywhere that i know of. i added the servlet jar but it did nothing and i don't see why you wanted me to do this anyways, because foo() is locally defined so no external jars are necessary.
javaee.jar is part of J2EE5. All I'm after is to add Servlet API to freeform project classpath. If I do not do that then nothing gets bold and editor status bar shows red error "Servlet API classes are not on classpath, some scriptlet editing features are disabled." (just to avoid any side issues I restarted IDE after changing freeform project classpath)
OK, i added the servlet jar path, and now my method declaration is bolded, but that is not my goal. I am wanting the method usage to be bolded.
Marek, you said that method references are intentionally not bold since NB6.5? Is there a coloring option or is it hardcoded? I could not find any option in JSP Syntax panel in IDE options. Actually there is heaps of cryptic items likes "mod-something". Is that intentional or bug?
The cryptic names are a bug definitely. They are the GSF ones. Actually I admin I am not sure why they need to be there. Changing them doesn't affect java coloring anyway, the coloring is inherited from java editor setting. So if you change the coloring for java it should change in jsp as well. OTOH as I said already if you use netbeans 5.5 coloring scheme the method usages are bolded as well. trobbins, are you saying that using 5.5 coloring profile you have just method declarations bold but not the usages? Is that right? Or do I miss a point?
Sorry, for the late response. You were right in your comment about it depending on the parser result. It seems that if there are problems in parsing, the method usage bolding will not work for the whole document. Also, jspf files will rarely bold for me. NB 5.0 would bold methods no matter what, so I guess i am just used to that behavior. It seems logical to me that if code completion is working, then it should bold the method, regardless of if some parser has problems.
Passing back to Marek. I would fix cryptic names and that's it.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss