You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "lkishalmi (via GitHub)" <gi...@apache.org> on 2024/07/13 23:19:09 UTC

[PR] Fix Yaml Editor does not respect indent size on new line [netbeans]

lkishalmi opened a new pull request, #7575:
URL: https://github.com/apache/netbeans/pull/7575

   This one fixes the annoying habit of the Yaml editor that it does not respect the configured indent size.
   
   It seems the `IndentUtils` used the `SPACES_PER_TAB`  in all cases.
   
   Also moved the module language level to Java 17


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


Re: [PR] Fix Yaml Editor does not respect indent size on new line [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #7575:
URL: https://github.com/apache/netbeans/pull/7575#discussion_r1676982714


##########
ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java:
##########
@@ -289,9 +290,9 @@ public int beforeBreak(Document document, int offset, JTextComponent target) thr
         int indent = getLineIndent(doc, offset);
         String linePrefix = doc.getText(lineBegin, offset - lineBegin);
         String lineSuffix = doc.getText(offset, lineEnd + 1 - offset);
-        if (linePrefix.trim().endsWith(":") && lineSuffix.trim().length() == 0) {
+        if (linePrefix.stripTrailing().endsWith(":") && lineSuffix.isBlank()) {

Review Comment:
   gonna steal this and put this into a `stripLeading()`/`stripTrailing()` rule -> https://github.com/mbien/jackpot-inspections/commit/037b5867190b49030be754df8c18c9a6646df250 :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


Re: [PR] Fix Yaml Editor does not respect indent size on new line [netbeans]

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #7575:
URL: https://github.com/apache/netbeans/pull/7575#issuecomment-2234495384

   Fixed some deprecations as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


Re: [PR] Fix Yaml Editor does not respect indent size on new line [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #7575:
URL: https://github.com/apache/netbeans/pull/7575#issuecomment-2234292238

   As I brought up the deprecation fix, I don't think this should hold up merging. It was just a side observation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


Re: [PR] Fix Yaml Editor does not respect indent size on new line [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #7575:
URL: https://github.com/apache/netbeans/pull/7575#issuecomment-2234140278

   well, this PR had no milestone and looks semi-ready. What shall we do now, merge or poke @lkishalmi to fix the deprecation?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


Re: [PR] Fix Yaml Editor does not respect indent size on new line [netbeans]

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi merged PR #7575:
URL: https://github.com/apache/netbeans/pull/7575


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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