[jira] [Commented] (NETBEANS-1199) Unwanted wrapping after annotation if before type

2018-09-26 Thread Oleg Schelykalnov (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16629829#comment-16629829
 ] 

Oleg Schelykalnov commented on NETBEANS-1199:
-

Looks like formatting doesn't consider annotation target.
{code:java}
@Nullable{code}
have a
{code:java}
@Target(value = {ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
{code} and shouldn't be wrapped.
 But {code:java}
@Override{code}
have a
{code:java}
@Target(ElementType.METHOD)
{code}
and should be wrapped on new line.

> Unwanted wrapping after annotation if before type
> -
>
> Key: NETBEANS-1199
> URL: https://issues.apache.org/jira/browse/NETBEANS-1199
> Project: NetBeans
>  Issue Type: Bug
>  Components: editor - Formatting & Indentation
>Affects Versions: 8.2
>Reporter: Antonio Marques
>Priority: Minor
>
> * Go to *Preferences \ Editor \ Formatting \ Java \ Wrapping*
>  * Select *Annotations: {color:#FF}Never{color}*
>  * Go to a file with a line like
> {{    public @Nullable String middleName;}}
>  * Format either the line or the file
>  * The line becomes split:{{}}
> {{    public @Nullable}}
> {{    }}{{String middleName;}}
>  * If the annotation is before public rather than String, then the newline 
> isn't inserted.
> This may look minor, but requires having our source not the way we want to, 
> so it's quite annoying.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
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



[jira] [Commented] (NETBEANS-1199) Unwanted wrapping after annotation if before type

2018-10-09 Thread Antonio Marques (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16643480#comment-16643480
 ] 

Antonio Marques commented on NETBEANS-1199:
---

That may be the reason I'm having this issue on fields, but if the settings say 
to 'never' wrap, then even method annotations shouldn't be wrapped, no?

`@Nullable` can be used with fields and methods. I don't wish it wrapped after 
in neither position.

What I do want is for annotations to be left alone. I put `@Override` above the 
method and it should stay there. I put `@Nullable` between the access modifier 
and the type and I want it to stay put as well.

> Unwanted wrapping after annotation if before type
> -
>
> Key: NETBEANS-1199
> URL: https://issues.apache.org/jira/browse/NETBEANS-1199
> Project: NetBeans
>  Issue Type: Bug
>  Components: editor - Formatting & Indentation
>Affects Versions: 8.2
>Reporter: Antonio Marques
>Priority: Minor
>
> * Go to *Preferences \ Editor \ Formatting \ Java \ Wrapping*
>  * Select *Annotations: {color:#FF}Never{color}*
>  * Go to a file with a line like
> {{    public @Nullable String middleName;}}
>  * Format either the line or the file
>  * The line becomes split:{{}}
> {{    public @Nullable}}
> {{    }}{{String middleName;}}
>  * If the annotation is before public rather than String, then the newline 
> isn't inserted.
> This may look minor, but requires having our source not the way we want to, 
> so it's quite annoying.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
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