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.

Bug 153472 - methods are not bolded in JSPS
Summary: methods are not bolded in JSPS
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-19 16:30 UTC by trobbins
Modified: 2016-07-07 08:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test project (4.62 KB, application/octet-stream)
2008-12-02 22:28 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description trobbins 2008-11-19 16:30:41 UTC
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
Comment 1 Marek Fukala 2008-12-02 13:06:48 UTC
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)
%>
Comment 2 trobbins 2008-12-02 13:13:41 UTC
I'm sorry, but I should've mentioned that i'm using the NB5.5 Profile for 'Fonts & Colors'.
Comment 3 Marek Fukala 2008-12-02 13:45:00 UTC
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?
Comment 4 trobbins 2008-12-02 13:54:18 UTC
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.
Comment 5 Marek Fukala 2008-12-02 14:14:55 UTC
"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.
Comment 6 trobbins 2008-12-02 14:25:09 UTC
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.
Comment 7 trobbins 2008-12-02 14:27:11 UTC
Sorry, my last comment was incorrect.  Neither the method declaration or usage are bolded in the snipplet i used.
Comment 8 Marek Fukala 2008-12-02 14:55:55 UTC
Davide, can you look at this issue? It looks like a free form project problem.
Comment 9 David Konecny 2008-12-02 22:28:44 UTC
Created attachment 74444 [details]
test project
Comment 10 David Konecny 2008-12-02 22:34:59 UTC
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.
Comment 11 trobbins 2008-12-03 14:40:19 UTC
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.
Comment 12 David Konecny 2008-12-03 20:09:29 UTC
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)
Comment 13 trobbins 2008-12-03 20:35:49 UTC
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.   
Comment 14 David Konecny 2008-12-04 20:12:26 UTC
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?
Comment 15 Marek Fukala 2008-12-05 10:39:00 UTC
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? 

Comment 16 trobbins 2009-01-25 16:29:57 UTC
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.
Comment 17 David Konecny 2009-09-22 04:26:20 UTC
Passing back to Marek. I would fix cryptic names and that's it.
Comment 18 Martin Balin 2016-07-07 08:55:26 UTC
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