[ 
https://issues.apache.org/jira/browse/NETBEANS-4359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Kleszyk updated NETBEANS-4359:
------------------------------------
    Description: 
I've been playing with the beta 4 release of 12.0 to test out some of the 
preview functionality in Java 14.

It appears that the automatic formatting tool is always wrapping type 
annotations, even if Editor > Formatting > Java > Wrapping > Annotations is set 
to 'Never'.

For example, when using {{org.checkerframework.checker.nullness.qual.Nullable}}:

{code:java}
public static @Nullable Object getNullable()
{
    return null;
}
{code}

is formatted as

{code:java}
public static @Nullable
Object getNullable()
{
    return null;
}
{code}

(As an aside, it probably would be reasonable to add a separate option for the 
wrapping behavior of annotations that have {{TYPE_USE}} or {{TYPE_PARAMETER}} 
as a {{@Target}})

  was:
I've been playing with the beta 4 release of 12.0 to test out some of the 
preview functionality in Java 14.

It appears that the automatic formatting tool is always wrapping type 
annotations, even if Editor > Formatting > Java > Wrapping > Annotations is set 
to 'Never'.

For example, when using {{org.checkerframework.checker.nullness.qual.Nullable}}:

{code:java}
        public static @Nullable
        Object getNullable()
        {
            return null;
        }
{code}

is formatted as

{code:java}
@Nullable
local;
{code}

(As an aside, it probably would be reasonable to add a separate option for the 
wrapping behavior of annotations that have {{TYPE_USE}} or {{TYPE_PARAMETER}} 
as a {{@Target}})


> Incorrect wrapping of type annotations
> --------------------------------------
>
>                 Key: NETBEANS-4359
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4359
>             Project: NetBeans
>          Issue Type: Bug
>          Components: editor - Formatting & Indentation
>    Affects Versions: 12.0
>         Environment: OS: Windows 7 x64
> Java: OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
> Active plugins: HTML5 1.24, Java SE 1.43, Tools 3.92.0.2, PHP 1.70, Service 
> Registry 1.35
> Inactive plugins: JavaFX 2 1.25, Java Web and EE 1.33, Developing NetBeans 
> 1.38, Groovy 1.4, Base IDE 1.0
>            Reporter: David Kleszyk
>            Priority: Trivial
>         Attachments: nb-configuration.xml, 
> org-netbeans-modules-editor-settings-CustomPreferences.xml, pom.xml
>
>
> I've been playing with the beta 4 release of 12.0 to test out some of the 
> preview functionality in Java 14.
> It appears that the automatic formatting tool is always wrapping type 
> annotations, even if Editor > Formatting > Java > Wrapping > Annotations is 
> set to 'Never'.
> For example, when using 
> {{org.checkerframework.checker.nullness.qual.Nullable}}:
> {code:java}
> public static @Nullable Object getNullable()
> {
>     return null;
> }
> {code}
> is formatted as
> {code:java}
> public static @Nullable
> Object getNullable()
> {
>     return null;
> }
> {code}
> (As an aside, it probably would be reasonable to add a separate option for 
> the wrapping behavior of annotations that have {{TYPE_USE}} or 
> {{TYPE_PARAMETER}} as a {{@Target}})



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to