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.
When Format is called on a normal Java file after turning off "Spaces" "Before Parentheses", and "Spaces" "Before Left Braces" for if statements in the Options the Java file looks like this: if(value == null){ ... But, when Format is called on a JSP file it looks like this: <% if (value == null) { ... Format should of made the JSP file look like this: <% if(value == null){ ... Just like the Java file.
mfukala, is this problem at JSP side or is it handled by Java module? Or does this depend on Parsing API?
The formatting of java code is done by java formatter AFAIK. This may also be a settings problem. Tomasz Slota will tell you more.
i think Dusan is a better person to ask...
The problem is that org.netbeans.modules.editor.indent.spi.CodeStylePreferences works with Document/FileObject's mime-type only. CodeStylePreferences should be modified to work also with embeddings.
Is the priority set correctly? I would suggest lowering the priority to P3 (standard)...
Well, this problem makes all java formating settings non-functional in embedded code. So, perhaps P2 is reasonable here.
Created attachment 76618 [details] Proposed API change to CodeStylePreferences
I would like to propose a small API change to the CodeStylePreferences class (diff is attached).
Looks ok to me. Thanks Dusan
Fixed in jet-main. See http://hg.netbeans.org/jet-main/rev/f1aaa871c14c
Integrated into 'main-golden', will be available in build *200902070301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/f1aaa871c14c User: Dusan Balek <dbalek@netbeans.org> Log: Issue #153957: JSP/Java reformating problem - fixed.