[jira] [Commented] (NETBEANS-6022) error during parsing of swing components created by matisse

2022-03-09 Thread Austin Stephens (Jira)


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

Austin Stephens commented on NETBEANS-6022:
---

Is there a reason this isn't fixed yet? As far as I can tell, it is still 
present in the latest version with Netbeans 12.6 and JDK 16. It makes it 
functionally impossible to navigate the Swing Java sources.

> error during parsing of swing components created by matisse
> ---
>
> Key: NETBEANS-6022
> URL: https://issues.apache.org/jira/browse/NETBEANS-6022
> Project: NetBeans
>  Issue Type: Bug
>  Components: guibuilder - Code, java - Compiler
>Affects Versions: 12.0, 12.1, 12.5
> Environment: *Product Version:* Apache NetBeans IDE 12.1
> *Java:* 13.0.1; Eclipse OpenJ9 VM openj9-0.17.0
> *Runtime:* OpenJDK Runtime Environment 13.0.1+9
> *System:* Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
>Reporter: Ruslan Lopez Carro
>Priority: Minor
> Attachments: AbstractButton_7.dump, Component_8.dump, 
> Component_9.dump, JComponent_10.dump, JComponent_9.dump, JEditorPane_2.dump, 
> JTextComponent_8.dump, Transferable_31.dump, ide.log
>
>
> I edited an existing maven project and added a new package, added some custom 
> bean forms, and switched a couple of times from code to view tab while I was 
> editing it, some time later I saw the bubble to report this error.
> {code:java}
> SEVERE [org.openide.util.Exceptions]
> An error occurred during parsing of 'java.desktop/javax/swing/JComponent.java 
> in C:\Program Files\AdoptOpenJDK\jdk-13.0.1.9-openj9\lib\src.zip'. Please 
> report a bug against java/source and attach dump file 
> 'C:\Users\myuser\AppData\Roaming\NetBeans\12.1\var\log\JComponent_9.dump'.
> An error occurred during parsing of 'java.desktop/javax/swing/JComponent.java 
> in C:\Program Files\AdoptOpenJDK\jdk-13.0.1.9-openj9\lib\src.zip'. Please 
> report a bug against java/source and attach dump file 
> 'C:\Users\myuser\AppData\Roaming\NetBeans\12.1\var\log\JComponent_9.dump'.
> Caused: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for 
> java.lang.annotation.Annotation not found{code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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] [Assigned] (NETBEANS-4826) Groovy completion tests fail when JavaIndexer reference in Groovy layer is fixed.

2022-03-09 Thread Petr Pisl (Jira)


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

Petr Pisl reassigned NETBEANS-4826:
---

Assignee: Petr Pisl

> Groovy completion tests fail when JavaIndexer reference in Groovy layer is 
> fixed.
> -
>
> Key: NETBEANS-4826
> URL: https://issues.apache.org/jira/browse/NETBEANS-4826
> Project: NetBeans
>  Issue Type: Bug
>  Components: groovy - Editor
>Reporter: Svatopluk Dedic
>Assignee: Petr Pisl
>Priority: Major
>
> For reference see [PR-2359|https://github.com/apache/netbeans/pull/2359]. The 
> JavaIndexer .shadow file is broken (fails commit-validation task), but when 
> fixed, tests in Groovy editor fail. Possibly the tests need to be updated 
> appropriately.
> I've removed (commented out) the indexer, as it was ineffective for years, 
> but the change should be reviewed / fixed by someone knowledgeable in Groovy 
> code.
> Setting as major, as having / not having Java indexer may have quite an 
> impact on the project's symbols.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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-5599) PHP 8.1 Support

2022-03-09 Thread Eric VILLARD (Jira)


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

Eric VILLARD commented on NETBEANS-5599:


[~junichi11], sincerely sorry if you felt pressured by me, that was not the 
purpose of my message.

Many thanks for all what you are doing. ;)

Best

> PHP 8.1 Support
> ---
>
> Key: NETBEANS-5599
> URL: https://issues.apache.org/jira/browse/NETBEANS-5599
> Project: NetBeans
>  Issue Type: New Feature
>  Components: php - Editor
>Reporter: Junichi Yamamoto
>Assignee: Junichi Yamamoto
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> [https://wiki.php.net/rfc#php_81]
>  * [https://wiki.php.net/rfc/final_class_const]
>  * [https://wiki.php.net/rfc/noreturn_type]
>  * [https://wiki.php.net/rfc/readonly_properties_v2]
>  * [https://wiki.php.net/rfc/new_in_initializers]
>  * [https://wiki.php.net/rfc/pure-intersection-types]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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



[netbeans] branch master updated: Improve ImplementAbstractMethodsHintError

2022-03-09 Thread junichi11
This is an automated email from the ASF dual-hosted git repository.

junichi11 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 b6d57f2  Improve ImplementAbstractMethodsHintError
 new 30b1d7c  Merge pull request #3734 from 
junichi11/php-improve-implement-abstract-methods-hint-error
b6d57f2 is described below

commit b6d57f2e23815bfb415a68a9f9547d9948146af3
Author: Junichi Yamamoto 
AuthorDate: Wed Mar 9 09:13:25 2022 +0900

Improve ImplementAbstractMethodsHintError

- Sort method elements to get the same result
---
 .../verification/ImplementAbstractMethodsHintError.java   | 11 ++-
 ...urnTypeImplementMethod01.php.testStaticReturnType_01.hints |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git 
a/php/php.editor/src/org/netbeans/modules/php/editor/verification/ImplementAbstractMethodsHintError.java
 
b/php/php.editor/src/org/netbeans/modules/php/editor/verification/ImplementAbstractMethodsHintError.java
index e9b3fc9..fbef93b 100644
--- 
a/php/php.editor/src/org/netbeans/modules/php/editor/verification/ImplementAbstractMethodsHintError.java
+++ 
b/php/php.editor/src/org/netbeans/modules/php/editor/verification/ImplementAbstractMethodsHintError.java
@@ -23,6 +23,7 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Set;
 import java.util.logging.Level;
@@ -148,7 +149,15 @@ public class ImplementAbstractMethodsHintError extends 
HintErrorRule {
 
allValidMethods.addAll(toNames(getValidInheritedMethods(getInheritedMethods(classScope,
 index;
 
allValidMethods.addAll(toNames(index.getDeclaredMethods(classScope)));
 ElementFilter declaredMethods = 
ElementFilter.forExcludedNames(allValidMethods, PhpElementKind.METHOD);
-Set accessibleMethods = 
declaredMethods.filter(index.getAccessibleMethods(classScope, classScope));
+List accessibleMethods = new 
ArrayList<>(declaredMethods.filter(index.getAccessibleMethods(classScope, 
classScope)));
+// sort to get the same result
+accessibleMethods.sort((MethodElement m1, MethodElement m2) -> 
{
+int result = 
m1.getFilenameUrl().compareTo(m2.getFilenameUrl());
+if (result == 0) {
+return Integer.compare(m1.getOffset(), m2.getOffset());
+}
+return result;
+});
 Set methodSkeletons = new LinkedHashSet<>();
 MethodElement lastMethodElement = null;
 FileObject lastFileObject = null;
diff --git 
a/php/php.editor/test/unit/data/testfiles/verification/ImplementAbstractMethodsHintError/testStaticReturnTypeImplementMethod01.php.testStaticReturnType_01.hints
 
b/php/php.editor/test/unit/data/testfiles/verification/ImplementAbstractMethodsHintError/testStaticReturnTypeImplementMethod01.php.testStaticReturnType_01.hints
index 70580a1..0209abc 100644
--- 
a/php/php.editor/test/unit/data/testfiles/verification/ImplementAbstractMethodsHintError/testStaticReturnTypeImplementMethod01.php.testStaticReturnType_01.hints
+++ 
b/php/php.editor/test/unit/data/testfiles/verification/ImplementAbstractMethodsHintError/testStaticReturnTypeImplementMethod01.php.testStaticReturnType_01.hints
@@ -1,5 +1,5 @@
 class TestClass implements TestInterface {
   -
-HINT:\TestClass is not abstract and does not override abstract method  
testSimple() in \TestInterface
+HINT:\TestClass is not abstract and does not override abstract method  
testUnionType() in \TestInterface
 FIX:Implement All Abstract Methods
 FIX:Declare Abstract Class

-
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-5599) PHP 8.1 Support

2022-03-09 Thread Junichi Yamamoto (Jira)


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

Junichi Yamamoto commented on NETBEANS-5599:


I'm working on PHP 8.1 support little by little. It's not easy to implement new 
features. It takes a lot of time.

So just wait.

Thank you for understanding.

> PHP 8.1 Support
> ---
>
> Key: NETBEANS-5599
> URL: https://issues.apache.org/jira/browse/NETBEANS-5599
> Project: NetBeans
>  Issue Type: New Feature
>  Components: php - Editor
>Reporter: Junichi Yamamoto
>Assignee: Junichi Yamamoto
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> [https://wiki.php.net/rfc#php_81]
>  * [https://wiki.php.net/rfc/final_class_const]
>  * [https://wiki.php.net/rfc/noreturn_type]
>  * [https://wiki.php.net/rfc/readonly_properties_v2]
>  * [https://wiki.php.net/rfc/new_in_initializers]
>  * [https://wiki.php.net/rfc/pure-intersection-types]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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-5599) PHP 8.1 Support

2022-03-09 Thread Eric VILLARD (Jira)


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

Eric VILLARD commented on NETBEANS-5599:


Hi everybody,

like [~FFT] I think enumeration is an important addition in PHP 8.1 and should 
be supported by NetBeans.

Best regards

> PHP 8.1 Support
> ---
>
> Key: NETBEANS-5599
> URL: https://issues.apache.org/jira/browse/NETBEANS-5599
> Project: NetBeans
>  Issue Type: New Feature
>  Components: php - Editor
>Reporter: Junichi Yamamoto
>Assignee: Junichi Yamamoto
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> [https://wiki.php.net/rfc#php_81]
>  * [https://wiki.php.net/rfc/final_class_const]
>  * [https://wiki.php.net/rfc/noreturn_type]
>  * [https://wiki.php.net/rfc/readonly_properties_v2]
>  * [https://wiki.php.net/rfc/new_in_initializers]
>  * [https://wiki.php.net/rfc/pure-intersection-types]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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-4539) No syntax highlighting for specific textmate grammar

2022-03-09 Thread Christian Lenz (Jira)


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

Christian Lenz commented on NETBEANS-4539:
--

So for markdown the syntax highlighting is working but not really notworthy as 
mentioned here: 
[https://github.com/apache/netbeans/discussions/3477#discussioncomment-2060060] 
but this is another topic. For ftl files, unfortunately no syntax highlighting, 
but maybe the lexer is somehow broken and VS Code can handle this better. Atm I 
can live with that, it seems the only lexer atm which is not working so far.

> No syntax highlighting for specific textmate grammar
> 
>
> Key: NETBEANS-4539
> URL: https://issues.apache.org/jira/browse/NETBEANS-4539
> Project: NetBeans
>  Issue Type: Bug
>  Components: textmate-lexer
>Affects Versions: 12.0, 12.4
> Environment: Product Version: Apache NetBeans IDE 12.0
> Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chris\AppData\Roaming\Netbeans\12.0
> Cache directory: C:\Users\Chris\AppData\Local\NetBeans\Cache\12.0
>Reporter: Christian Lenz
>Assignee: Jan Lahoda
>Priority: Major
>
> I don't have syntax highlighting, when I use/register this grammar file: 
> https://github.com/microsoft/vscode-markdown-tm-grammar/blob/master/syntaxes/markdown.tmLanguage
> Steps to reproduce:
> * Open options
> * Go to Editor -> Language Servers
> * Create a new entry for md files
> * Use the given grammar file to register it for md files
> * Save and apply options.
> * Open any *.md file
> * See no syntax highlighting



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
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] [Closed] (NETBEANS-4530) NPE for specific textmate grammar

2022-03-09 Thread Christian Lenz (Jira)


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

Christian Lenz closed NETBEANS-4530.


> NPE for specific textmate grammar
> -
>
> Key: NETBEANS-4530
> URL: https://issues.apache.org/jira/browse/NETBEANS-4530
> Project: NetBeans
>  Issue Type: Bug
>  Components: textmate-lexer
>Affects Versions: 12.0, 12.4
> Environment: Product Version: Apache NetBeans IDE 12.0
> Updates: Updates available
> Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chris\AppData\Roaming\Netbeans\12.0
> Cache directory: C:\Users\Chris\AppData\Local\NetBeans\Cache\12.0
>Reporter: Christian Lenz
>Assignee: Jan Lahoda
>Priority: Major
> Attachments: example.d, example.nim
>
>
> When I use this grammar file: 
> https://github.com/pragmagic/vscode-nim/blob/master/syntaxes/nim.json for the 
> nim language, I got a NPE:
> {code}
> java.lang.NullPointerException
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar._tokenize(Grammar.java:220)
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:191)
>   at 
> org.netbeans.modules.textmate.lexer.TextmateLexer.nextToken(TextmateLexer.java:75)
>   at 
> org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:191)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingImpl(IncTokenList.java:170)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbedding(IncTokenList.java:165)
>   at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:463)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$TSInfo.moveNextToken(SyntaxHighlighting.java:779)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:476)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:405)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:600)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.updateMergeVars(DirectMergeContainer.java:337)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.nextMerge(DirectMergeContainer.java:303)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.moveNext(DirectMergeContainer.java:234)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.readUntil(HighlightsReader.java:59)
>   at 
> org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:168)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1299)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:699)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder.createReplaceRepaintViews(ViewBuilder.java:660)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewUpdates.reinitAllViews(ViewUpdates.java:189)
>   at 
> org.netbeans.modules.editor.lib2.view.DocumentViewOp.checkViewsInited(DocumentViewOp.java:619)
>   at 
> org.netbeans.modules.editor.lib2.view.DocumentView.getPreferredSpan(DocumentView.java:226)
>   at 
> java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1452)
>   at 
> java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:957)
>   at 
> java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
>   at 
> java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
>   at 
> org.netbeans.modules.editor.NbEditorUI$LayeredEditorPane.getPreferredSize(NbEditorUI.java:453)
>   at 
> java.desktop/javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:795)
>   at java.desktop/java.awt.Container.layout(Container.java:1537)
>   at java.desktop/java.awt.Container.doLayout(Container.java:1526)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1722)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Contai

[jira] [Resolved] (NETBEANS-4530) NPE for specific textmate grammar

2022-03-09 Thread Christian Lenz (Jira)


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

Christian Lenz resolved NETBEANS-4530.
--
Resolution: Fixed

> NPE for specific textmate grammar
> -
>
> Key: NETBEANS-4530
> URL: https://issues.apache.org/jira/browse/NETBEANS-4530
> Project: NetBeans
>  Issue Type: Bug
>  Components: textmate-lexer
>Affects Versions: 12.0, 12.4
> Environment: Product Version: Apache NetBeans IDE 12.0
> Updates: Updates available
> Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chris\AppData\Roaming\Netbeans\12.0
> Cache directory: C:\Users\Chris\AppData\Local\NetBeans\Cache\12.0
>Reporter: Christian Lenz
>Assignee: Jan Lahoda
>Priority: Major
> Attachments: example.d, example.nim
>
>
> When I use this grammar file: 
> https://github.com/pragmagic/vscode-nim/blob/master/syntaxes/nim.json for the 
> nim language, I got a NPE:
> {code}
> java.lang.NullPointerException
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar._tokenize(Grammar.java:220)
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:191)
>   at 
> org.netbeans.modules.textmate.lexer.TextmateLexer.nextToken(TextmateLexer.java:75)
>   at 
> org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:191)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingImpl(IncTokenList.java:170)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbedding(IncTokenList.java:165)
>   at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:463)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$TSInfo.moveNextToken(SyntaxHighlighting.java:779)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:476)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:405)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:600)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.updateMergeVars(DirectMergeContainer.java:337)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.nextMerge(DirectMergeContainer.java:303)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.moveNext(DirectMergeContainer.java:234)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.readUntil(HighlightsReader.java:59)
>   at 
> org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:168)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1299)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:699)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder.createReplaceRepaintViews(ViewBuilder.java:660)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewUpdates.reinitAllViews(ViewUpdates.java:189)
>   at 
> org.netbeans.modules.editor.lib2.view.DocumentViewOp.checkViewsInited(DocumentViewOp.java:619)
>   at 
> org.netbeans.modules.editor.lib2.view.DocumentView.getPreferredSpan(DocumentView.java:226)
>   at 
> java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1452)
>   at 
> java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:957)
>   at 
> java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
>   at 
> java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
>   at 
> org.netbeans.modules.editor.NbEditorUI$LayeredEditorPane.getPreferredSize(NbEditorUI.java:453)
>   at 
> java.desktop/javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:795)
>   at java.desktop/java.awt.Container.layout(Container.java:1537)
>   at java.desktop/java.awt.Container.doLayout(Container.java:1526)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1722)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at ja

[jira] [Commented] (NETBEANS-4530) NPE for specific textmate grammar

2022-03-09 Thread Christian Lenz (Jira)


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

Christian Lenz commented on NETBEANS-4530:
--

After updated the D lexer, no exception. Nim just worked immediately, w/o 
updating the grammar.

> NPE for specific textmate grammar
> -
>
> Key: NETBEANS-4530
> URL: https://issues.apache.org/jira/browse/NETBEANS-4530
> Project: NetBeans
>  Issue Type: Bug
>  Components: textmate-lexer
>Affects Versions: 12.0, 12.4
> Environment: Product Version: Apache NetBeans IDE 12.0
> Updates: Updates available
> Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chris\AppData\Roaming\Netbeans\12.0
> Cache directory: C:\Users\Chris\AppData\Local\NetBeans\Cache\12.0
>Reporter: Christian Lenz
>Assignee: Jan Lahoda
>Priority: Major
> Attachments: example.d, example.nim
>
>
> When I use this grammar file: 
> https://github.com/pragmagic/vscode-nim/blob/master/syntaxes/nim.json for the 
> nim language, I got a NPE:
> {code}
> java.lang.NullPointerException
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar._tokenize(Grammar.java:220)
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:191)
>   at 
> org.netbeans.modules.textmate.lexer.TextmateLexer.nextToken(TextmateLexer.java:75)
>   at 
> org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:191)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingImpl(IncTokenList.java:170)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbedding(IncTokenList.java:165)
>   at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:463)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$TSInfo.moveNextToken(SyntaxHighlighting.java:779)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:476)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:405)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:600)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.updateMergeVars(DirectMergeContainer.java:337)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.nextMerge(DirectMergeContainer.java:303)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.moveNext(DirectMergeContainer.java:234)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.readUntil(HighlightsReader.java:59)
>   at 
> org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:168)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1299)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:699)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder.createReplaceRepaintViews(ViewBuilder.java:660)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewUpdates.reinitAllViews(ViewUpdates.java:189)
>   at 
> org.netbeans.modules.editor.lib2.view.DocumentViewOp.checkViewsInited(DocumentViewOp.java:619)
>   at 
> org.netbeans.modules.editor.lib2.view.DocumentView.getPreferredSpan(DocumentView.java:226)
>   at 
> java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1452)
>   at 
> java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:957)
>   at 
> java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
>   at 
> java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
>   at 
> org.netbeans.modules.editor.NbEditorUI$LayeredEditorPane.getPreferredSize(NbEditorUI.java:453)
>   at 
> java.desktop/javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:795)
>   at java.desktop/java.awt.Container.layout(Container.java:1537)
>   at java.desktop/java.awt.Container.doLayout(Container.java:1526)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1722)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Container.validateTree(Container.java:1731)
>   at java.desktop/java.awt.Con