This is an automated email from the ASF dual-hosted git repository. skygo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new 1c5247a [NETBEANS-5480] Add an option(system property) to disable the feature to fold PHP tags new cca3859 Merge pull request #3069 from junichi11/netbeans-5480-folding-phptag 1c5247a is described below commit 1c5247aeff0fee91255fc74b521c58da1187ec13 Author: Junichi Yamamoto <junich...@apache.org> AuthorDate: Wed Jul 21 13:01:09 2021 +0900 [NETBEANS-5480] Add an option(system property) to disable the feature to fold PHP tags https://issues.apache.org/jira/browse/NETBEANS-5480 - The folding features do not have options to enable/disable each item at the moment although there are options for each whole language (There are Enable Code Folding checkboxes) - Users can add `-J-Dnb.php.editor.doNotFoldPhptag=true` on boot --- .../src/org/netbeans/modules/php/editor/csl/FoldingScanner.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/csl/FoldingScanner.java b/php/php.editor/src/org/netbeans/modules/php/editor/csl/FoldingScanner.java index 767e4ef..67dc6f7 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/csl/FoldingScanner.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/csl/FoldingScanner.java @@ -131,6 +131,7 @@ public final class FoldingScanner { ); private static final String LAST_CORRECT_FOLDING_PROPERTY = "LAST_CORRECT_FOLDING_PROPERY"; //NOI18N + private static final boolean FOLD_PHPTAG = !Boolean.getBoolean("nb.php.editor.doNotFoldPhptag"); // NOI18N NETBEANS-5480 public static FoldingScanner create() { return new FoldingScanner(); @@ -170,7 +171,9 @@ public final class FoldingScanner { Source source = phpParseResult.getSnapshot().getSource(); assert source != null : "source was null"; Document doc = source.getDocument(false); - processPHPTags(folds, doc); + if (FOLD_PHPTAG) { + processPHPTags(folds, doc); + } setFoldingProperty(doc, folds); return folds; } --------------------------------------------------------------------- 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