[netbeans] branch master updated: Replaced a part of replaceAll() calls to replace()

2023-01-08 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien 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 f98e74dcb9 Replaced a part of replaceAll() calls to replace()
 new 0ecc6721fb Merge pull request #5228 from tbw777/replaceAll2
f98e74dcb9 is described below

commit f98e74dcb9577466492cf7600c4b3306efa69e3f
Author: Andrei Briukhov 
AuthorDate: Fri Jan 6 15:06:44 2023 -0300

Replaced a part of replaceAll() calls to replace()

replace() method is more fast then replaceAll() for non regex cases
---
 .../src/org/netbeans/modules/bugzilla/commands/BugzillaExecutor.java| 2 +-
 .../src/org/netbeans/modules/nativeexecution/api/util/MacroMap.java | 2 +-
 .../src/org/netbeans/modules/mercurial/ui/commit/CommitPanel.java   | 2 +-
 .../src/org/netbeans/modules/subversion/ui/commit/CommitPanel.java  | 2 +-
 .../org/netbeans/modules/versioning/util/common/CollapsiblePanel.java   | 2 +-
 .../qa-functional/src/org/netbeans/xml/test/actions/XMLActionsTest.java | 2 +-
 .../org/netbeans/installer/utils/system/launchers/impl/ShLauncher.java  | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/ide/bugzilla/src/org/netbeans/modules/bugzilla/commands/BugzillaExecutor.java 
b/ide/bugzilla/src/org/netbeans/modules/bugzilla/commands/BugzillaExecutor.java
index 7f0da48acb..a65f48336f 100644
--- 
a/ide/bugzilla/src/org/netbeans/modules/bugzilla/commands/BugzillaExecutor.java
+++ 
b/ide/bugzilla/src/org/netbeans/modules/bugzilla/commands/BugzillaExecutor.java
@@ -308,7 +308,7 @@ public class BugzillaExecutor {
 html = html.substring(idxS, idxE);
 
 // very nice
-html = html.replaceAll("Please press \\Back\\ and try 
again.", ""); // NOI18N
+html = html.replace("Please press Back and try again.", ""); // 
NOI18N
 
 return html;
 }
diff --git 
a/ide/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/MacroMap.java
 
b/ide/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/MacroMap.java
index 4450204089..3731b56a20 100644
--- 
a/ide/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/MacroMap.java
+++ 
b/ide/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/MacroMap.java
@@ -237,7 +237,7 @@ public final class MacroMap implements Cloneable {
 
 String oldpath = get(name);
 String newPath = path + (oldpath == null ? "" : (isWindows ? ';' : 
':') + oldpath); // NOI18N
-newPath = newPath.replaceAll("::", ":"); // NOI18N
+newPath = newPath.replace("::", ":"); // NOI18N
 newPath = newPath.replaceAll("^:", ""); // NOI18N
 newPath = newPath.replaceAll(":$", ""); // NOI18N
 put(name, newPath);
diff --git 
a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/commit/CommitPanel.java 
b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/commit/CommitPanel.java
index 58ff389183..914ab24807 100644
--- 
a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/commit/CommitPanel.java
+++ 
b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/commit/CommitPanel.java
@@ -306,7 +306,7 @@ public class CommitPanel extends AutoResizingPanel 
implements PreferenceChangeLi
 JTabbedPane hooksTabbedPane = new JTabbedPane();
 for (HgHook hook : hooks) {
 hooksTabbedPane.add(hook.createComponent(hookContext),
-hook.getDisplayName().replaceAll("\\&", 
""));
+hook.getDisplayName().replace("&", ""));
 }
 hookSectionPanel.add(hooksTabbedPane);
 }
diff --git 
a/ide/subversion/src/org/netbeans/modules/subversion/ui/commit/CommitPanel.java 
b/ide/subversion/src/org/netbeans/modules/subversion/ui/commit/CommitPanel.java
index 7ca61cc5c0..4e27036d1f 100644
--- 
a/ide/subversion/src/org/netbeans/modules/subversion/ui/commit/CommitPanel.java
+++ 
b/ide/subversion/src/org/netbeans/modules/subversion/ui/commit/CommitPanel.java
@@ -302,7 +302,7 @@ public class CommitPanel extends AutoResizingPanel 
implements PreferenceChangeLi
 JTabbedPane hooksTabbedPane = new JTabbedPane();
 for (SvnHook hook : hooks) {
 hooksTabbedPane.add(hook.createComponent(hookContext),
-hook.getDisplayName().replaceAll("\\&", 
""));
+hook.getDisplayName().replace("&", ""));
 }
 hooksSectionPanel.add(hooksTabbedPane);
 }
diff --git 
a/ide/versioning.util/src/org/netbeans/modules/versioning/util/common/CollapsiblePanel.java
 
b/ide/versioning.util/src/org/netbeans/modules/versioning/util/common/CollapsiblePanel.java
index e42da20b3c..85bf7e85f2 100644
--- 

[netbeans] branch master updated: TOML uses ANTLR4 Lexer Support

2023-01-08 Thread lkishalmi
This is an automated email from the ASF dual-hosted git repository.

lkishalmi 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 88c0c39f20 TOML uses ANTLR4 Lexer Support
88c0c39f20 is described below

commit 88c0c39f203c0815a0547ecbfba4d8d420615a17
Author: Laszlo Kishalmi 
AuthorDate: Sun Jan 8 16:33:29 2023 -0800

TOML uses ANTLR4 Lexer Support
---
 ide/languages.toml/nbproject/project.xml   |   8 ++
 .../languages/toml/LexerInputCharStream.java   | 135 -
 .../netbeans/modules/languages/toml/TomlLexer.java |  83 ++---
 .../modules/languages/toml/TomlTokenId.java|   3 +-
 4 files changed, 22 insertions(+), 207 deletions(-)

diff --git a/ide/languages.toml/nbproject/project.xml 
b/ide/languages.toml/nbproject/project.xml
index ea7fe01d03..309960c9b0 100644
--- a/ide/languages.toml/nbproject/project.xml
+++ b/ide/languages.toml/nbproject/project.xml
@@ -114,6 +114,14 @@
 1.80
 
 
+
+
org.netbeans.modules.lexer.antlr4
+
+
+
+1.0
+
+
 
 
org.netbeans.modules.parsing.api
 
diff --git 
a/ide/languages.toml/src/org/netbeans/modules/languages/toml/LexerInputCharStream.java
 
b/ide/languages.toml/src/org/netbeans/modules/languages/toml/LexerInputCharStream.java
deleted file mode 100644
index 7f2c2877ed..00
--- 
a/ide/languages.toml/src/org/netbeans/modules/languages/toml/LexerInputCharStream.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.netbeans.modules.languages.toml;
-
-import org.antlr.v4.runtime.CharStream;
-import static org.antlr.v4.runtime.IntStream.UNKNOWN_SOURCE_NAME;
-import org.antlr.v4.runtime.misc.Interval;
-import org.netbeans.spi.lexer.*;
-
-/**
- *
- * @author lkishalmi
- */
-public class LexerInputCharStream implements CharStream {
-private final LexerInput input;
-
-private int tokenMark = Integer.MAX_VALUE;
-private int index = 0;
-
-public LexerInputCharStream(LexerInput input) {
-this.input = input;
-}
-
-@Override
-public String getText(Interval intrvl) {
-if (intrvl.a < tokenMark) {
-throw new UnsupportedOperationException("Can't read before the 
last token end: " + tokenMark);
-}
-int start = intrvl.a - tokenMark;
-int end = intrvl.b - tokenMark + 1;
-int toread = end - start - input.readLength();
-for (int i = 0; i < toread; i++) {
-input.read();
-}
-String ret = String.valueOf(input.readText(start, end));
-if (toread > 0) {
-input.backup(toread);
-}
-return ret;
-}
-
-@Override
-public void consume() {
-read();
-}
-
-@Override
-public int LA(int count) {
-if (count == 0) {
-return 0; //the behaviour is not defined
-}
-
-int c = 0;
-if (count > 0) {
-for (int i = 0; i < count; i++) {
-c = read();
-}
-backup(count);
-} else {
-backup(count);
-c = read();
-}
-return c;
-}
-
-//Marks are for buffering in ANTLR4, we do not really need them
-@Override
-public int mark() {
-return -1;
-}
-
-public void markToken() {
-tokenMark = index;
-}
-
-@Override
-public void release(int marker) {
-}
-
-@Override
-public int index() {
-return index;
-}
-
-@Override
-public void seek(int i) {
-if (i < index()) {
-backup(index() - i);
-} else {
-while (index() < i) {
-if (read() == LexerInput.EOF) {
-break;
-}
-}
-}
-}
-
-
-private int read() {
-int ret = input.read();
-index += 1;
-return 

[netbeans] branch master updated: Move ANTLR Lexers to lexer.antlr4

2023-01-08 Thread lkishalmi
This is an automated email from the ASF dual-hosted git repository.

lkishalmi 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 6f472b51ca Move ANTLR Lexers to lexer.antlr4
6f472b51ca is described below

commit 6f472b51caa5ae24ddcb63c4ca5965c3404253dd
Author: Laszlo Kishalmi 
AuthorDate: Sun Jan 8 19:26:52 2023 -0800

Move ANTLR Lexers to lexer.antlr4
---
 java/languages.antlr/nbproject/project.xml |  22 +--
 .../languages/antlr/AbstractAntlrLexer.java|  82 --
 .../languages/antlr/AntlrTokenSequence.java| 172 -
 .../languages/antlr/LexerInputCharStream.java  | 134 
 .../modules/languages/antlr/v3/Antlr3Lexer.java|  40 ++---
 .../antlr/v4/Antlr4CompletionProvider.java |   3 +-
 .../modules/languages/antlr/v4/Antlr4Lexer.java|  40 ++---
 .../languages/antlr/v4/Antlr4ParserResult.java |   3 +
 .../languages/antlr/AntlrTokenSequenceTest.java| 162 ---
 9 files changed, 35 insertions(+), 623 deletions(-)

diff --git a/java/languages.antlr/nbproject/project.xml 
b/java/languages.antlr/nbproject/project.xml
index 73729c3315..05c1ef1db2 100644
--- a/java/languages.antlr/nbproject/project.xml
+++ b/java/languages.antlr/nbproject/project.xml
@@ -141,6 +141,14 @@
 1.80
 
 
+
+
org.netbeans.modules.lexer.antlr4
+
+
+
+1.0
+
+
 
 
org.netbeans.modules.parsing.api
 
@@ -231,20 +239,6 @@
 
 
 
-
-
-unit
-
-
org.netbeans.libs.junit4
-
-
-
-
org.netbeans.modules.nbjunit
-
-
-
-
-
 
 
 
diff --git 
a/java/languages.antlr/src/org/netbeans/modules/languages/antlr/AbstractAntlrLexer.java
 
b/java/languages.antlr/src/org/netbeans/modules/languages/antlr/AbstractAntlrLexer.java
deleted file mode 100644
index 9f76582b2e..00
--- 
a/java/languages.antlr/src/org/netbeans/modules/languages/antlr/AbstractAntlrLexer.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.netbeans.modules.languages.antlr;
-
-import org.antlr.v4.runtime.misc.IntegerList;
-import org.netbeans.api.lexer.Token;
-import org.netbeans.spi.lexer.Lexer;
-import org.netbeans.spi.lexer.LexerRestartInfo;
-import org.netbeans.spi.lexer.TokenFactory;
-
-
-/**
- *
- * @author lkishalmi
- */
-public abstract class AbstractAntlrLexer 
implements Lexer {
-
-private final TokenFactory tokenFactory;
-protected final T lexer;
-private final LexerInputCharStream input;
-
-public AbstractAntlrLexer(LexerRestartInfo info, T lexer) {
-this.tokenFactory = info.tokenFactory();
-this.lexer = lexer;
-this.input = (LexerInputCharStream) lexer.getInputStream();
-if (info.state() != null) {
-((LexerState) info.state()).restore(lexer);
-}
-input.markToken();
-}
-
-
-@Override
-public void release() {
-}
-
-protected final Token token(AntlrTokenId id) {
-input.markToken();
-return tokenFactory.createToken(id);
-}
-
-public static class LexerState {
-final int state;
-final int mode;
-final IntegerList modes;
-
-public LexerState(T lexer) {
-this.state= lexer.getState();
-
-this.mode = lexer._mode;
-this.modes = new IntegerList(lexer._modeStack);
-}
-
-public void restore(T lexer) {
-lexer.setState(state);
-lexer._modeStack.addAll(modes);
-lexer._mode = mode;
-}
-
-@Override
-   

[netbeans] branch master updated: fix NPE in RemoveUnnecessary class when case statement list is null.

2023-01-08 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien 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 442b693bb5 fix NPE in RemoveUnnecessary class when case statement list 
is null.
 new 4b3794d0a6 Merge pull request #5179 from mbien/npe-fix-gh-5177
442b693bb5 is described below

commit 442b693bb556d0a02db0e4085843e9a5eeadf7dd
Author: Michael Bien 
AuthorDate: Mon Jan 2 21:08:59 2023 +0100

fix NPE in RemoveUnnecessary class when case statement list is null.
---
 .../org/netbeans/modules/java/hints/control/RemoveUnnecessary.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/java/java.hints/src/org/netbeans/modules/java/hints/control/RemoveUnnecessary.java
 
b/java/java.hints/src/org/netbeans/modules/java/hints/control/RemoveUnnecessary.java
index b1c9a7dfcd..61604dbfdb 100644
--- 
a/java/java.hints/src/org/netbeans/modules/java/hints/control/RemoveUnnecessary.java
+++ 
b/java/java.hints/src/org/netbeans/modules/java/hints/control/RemoveUnnecessary.java
@@ -145,10 +145,13 @@ public class RemoveUnnecessary {
 case CASE: {
 if (tp.getParentPath().getLeaf().getKind() == Kind.SWITCH) 
{
 List cases = ((SwitchTree) 
tp.getParentPath().getLeaf()).getCases();
-List locStatements = new 
ArrayList();
+List locStatements = new ArrayList<>();
 
 for (int i = cases.indexOf(tp.getLeaf()); i < 
cases.size(); i++) {
-locStatements.addAll(cases.get(i).getStatements());
+List list = 
cases.get(i).getStatements();
+if (list != null) {
+locStatements.addAll(list);
+}
 }
 
 statements = locStatements;


-
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 (3a8b5145e6 -> f77b42360f)

2023-01-08 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


from 3a8b5145e6 Merge pull request #5061 from lbownik/openide.util.task2
 new 81197c3afd update OutputUtils to support stacktrace links leading to 
JDK files.
 new 7624b4d7db small code renovation
 new f77b42360f Merge pull request #5091 from mbien/mvn-jdk-stacktrace-fix

The 7890 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../modules/maven/api/output/OutputUtils.java  |  49 --
 .../classpath/AbstractProjectClassPathImpl.java|  24 +--
 .../maven/classpath/ClassPathProviderImpl.java | 185 +++--
 .../maven/execute/CommandLineOutputHandler.java|   6 +-
 .../modules/maven/runjar/RunJarPrereqChecker.java  |  28 ++--
 5 files changed, 123 insertions(+), 169 deletions(-)


-
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: rewritten 2 tests of org.openide.util.TaskTest into more readable form refactored one removed tests obsoleted by https://github.com/apache/netbeans/pull/4112 added ce

2023-01-08 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien 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 aa157c60b4 rewritten 2 tests of org.openide.util.TaskTest into more 
readable form refactored one removed tests obsoleted by 
https://github.com/apache/netbeans/pull/4112 added cecriptive failure messages 
to assert calls added 2 more messages shortened test method names squashed
 new 3a8b5145e6 Merge pull request #5061 from lbownik/openide.util.task2
aa157c60b4 is described below

commit aa157c60b43501fcfead74b10e9df6f3adfba02b
Author: Lukasz Bownik 
AuthorDate: Thu Dec 8 19:18:33 2022 +0100

rewritten 2 tests of org.openide.util.TaskTest into more readable form
refactored one
removed tests obsoleted by https://github.com/apache/netbeans/pull/4112
added cecriptive failure messages to assert calls
added 2 more messages
shortened test method names
squashed
---
 .../test/unit/src/org/openide/util/TaskTest.java   | 126 ++---
 1 file changed, 88 insertions(+), 38 deletions(-)

diff --git a/platform/openide.util/test/unit/src/org/openide/util/TaskTest.java 
b/platform/openide.util/test/unit/src/org/openide/util/TaskTest.java
index cc5a9d1398..8eb0151fc1 100644
--- a/platform/openide.util/test/unit/src/org/openide/util/TaskTest.java
+++ b/platform/openide.util/test/unit/src/org/openide/util/TaskTest.java
@@ -35,7 +35,8 @@ import org.junit.Ignore;
 
 
 public class TaskTest {
-private final static long tenMiliseconds = 1000; // in nanosecods
+private final static long tenMiliseconds = 1000; // in nanoseconds
+private final static long fiveHundredMiliseconds = 5; // in 
nanoseconds
 
 private static final Logger LOG = 
Logger.getLogger("org.openide.util.TaskTest");
 
@@ -115,14 +116,14 @@ public class TaskTest {
 this.executedListenerTask = t;
 });
 
-assertFalse(task.isFinished());
+assertFalse("Task should not have been finished.", task.isFinished());
 assertNotEquals("null", task.debug());
 
 task.run();
 
-assertTrue(this.runHasBeenExecuted);
+assertTrue("Runnable should have been executed.", 
this.runHasBeenExecuted);
 assertSame(task, this.executedListenerTask);
-assertTrue(task.isFinished());
+assertTrue("Task should have finished.", task.isFinished());
 }
 
 
//--
@@ -141,7 +142,7 @@ public class TaskTest {
 
 task.run();
 
-assertTrue(task.isFinished());
+assertTrue("Task should have finished.", task.isFinished());
 assertNull(this.executedListenerTask);
 }
 
@@ -156,20 +157,20 @@ public class TaskTest {
 task.run();
 
 assertNull(this.executedListenerTask);
-assertTrue(task.isFinished());
+assertTrue("Task should have finished.", task.isFinished());
 
 task.addTaskListener((t) -> {
 this.executedListenerTask = t;
 });
 
 assertSame(task, this.executedListenerTask);
-assertTrue(task.isFinished()); // still finished
+assertTrue("Task should have finished.", task.isFinished()); // still 
finished
 }
 
 
//--
 @Ignore("Current implementation allows null listener but then Task.run 
throws NPE :(")
 @Test
-public void addTaskListener_throwsNullPointer_whenGivenNullArgument() {
+public void addTaskListener_throwsNullPointer_whenGivenNull() {
 
 Task task = new Task(() -> {
 });
@@ -183,7 +184,7 @@ public class TaskTest {
 
 
//--
 @Test
-public void removeTaskListener_doesNothing_whenGivenNullArgument() {
+public void removeTaskListener_doesNothing_whenGivenNull() {
 
 this.executedListenerTask = null;
 
@@ -200,6 +201,62 @@ public class TaskTest {
 assertSame(task, this.executedListenerTask);
 }
 
+
//--
+@Test
+public void taksIsNotFinished_untilRunMethodCompletes()
+  throws Exception {
+
+Object lock = new Object();
+Task task = new Task(() -> {
+synchronized (lock) {
+lock.notify(); // let the test thread continue
+try {
+lock.wait();
+} catch (InterruptedException e) {
+fail("This shall never happen as the test does not call 
'interrupt()'.");
+}
+}
+});
+
+assertFalse("Task should not have been finished.", task.isFinished());
+
+synchronized (lock) {
+new Thread(task).start();
+

[netbeans] branch master updated: Initial implementation of ANTLR4 Lexer Support (#5206)

2023-01-08 Thread lkishalmi
This is an automated email from the ASF dual-hosted git repository.

lkishalmi 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 89b7a0930d Initial implementation of ANTLR4 Lexer Support (#5206)
89b7a0930d is described below

commit 89b7a0930dcf453bba5a0512baaf47de9fd42ed8
Author: Laszlo Kishalmi 
AuthorDate: Sun Jan 8 15:56:13 2023 -0800

Initial implementation of ANTLR4 Lexer Support (#5206)

* Initial implementation of ANTLR4 Lexer Support

* More documentation on AbstractAntlrLexerBridge

* Added lexer.antlr4 test to GH Workflows

* Removed System.out.println from tests
---
 .github/workflows/main.yml |3 +
 ide/lexer.antlr4/arch.xml  | 1063 
 ide/lexer.antlr4/build.xml |   41 +
 ide/lexer.antlr4/manifest.mf   |3 +
 ide/lexer.antlr4/nbproject/project.properties  |   22 +
 ide/lexer.antlr4/nbproject/project.xml |   61 ++
 .../spi/lexer/antlr4/AbstractAntlrLexerBridge.java |  183 
 .../spi/lexer/antlr4/AntlrTokenSequence.java   |  249 +
 .../netbeans/spi/lexer/antlr4/Bundle.properties|   23 +
 .../spi/lexer/antlr4/LexerInputCharStream.java |  136 +++
 .../src/org/antlr/grammars/dummy/DummyLexer.g4 |   67 ++
 .../src/org/antlr/grammars/dummy/DummyLexer.java   |  175 
 .../spi/lexer/antlr4}/AntlrTokenSequenceTest.java  |   26 +-
 .../languages/antlr/AntlrTokenSequenceTest.java|9 -
 nbbuild/cluster.properties |1 +
 15 files changed, 2040 insertions(+), 22 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6c94c85813..431442ba04 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -523,6 +523,9 @@ jobs:
   - name: ide/lexer
 run: ant $OPTS -f ide/lexer test
 
+  - name: ide/lexer.antlr4
+run: ant $OPTS -f ide/lexer.antlr4 test
+
   - name: ide/lib.terminalemulator
 run: ant $OPTS -f ide/lib.terminalemulator test
 
diff --git a/ide/lexer.antlr4/arch.xml b/ide/lexer.antlr4/arch.xml
new file mode 100644
index 00..ea212512fb
--- /dev/null
+++ b/ide/lexer.antlr4/arch.xml
@@ -0,0 +1,1063 @@
+
+
+
+]>
+
+
+
+  
+
+
+
+ 
+  
+   
+
+ 
+  This module provides a bridge between ANTLRv4 Lexers and NetBeans Lexer
+  infrastructure.
+ 
+
+   
+  
+ 
+
+
+
+
+
+
+
+ 
+  
+ New language support with ANTLRv4 Grammar.
+  
+ 
+
+
+
+
+ 
+  
+   None.
+  
+ 
+
+
+ 
+  
+   None.
+  
+ 
+
+ 
+  
+   None.
+  
+ 
+
+
+
+
+
+ 
+  
+   XXX no answer for arch-quality
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for arch-time
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for arch-what
+  
+ 
+
+
+
+
+ 
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for compat-deprecation
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for compat-i18n
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for compat-standards
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for compat-version
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for dep-jre
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for dep-jrejdk
+  
+ 
+
+
+
+
+ 
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for dep-non-nb
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for dep-platform
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for deploy-dependencies
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for deploy-jar
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for deploy-nbm
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for deploy-packages
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for deploy-shared
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-ant-tasks
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-classloader
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-component
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-introspection
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-privateaccess
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-process
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-reflection
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for exec-threading
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for format-clipboard
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for format-dnd
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for format-types
+  
+ 
+
+
+
+
+ 
+  
+   None.
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for lookup-register
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for lookup-remove
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-exit
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-huge_dialogs
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-limit
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-mem
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-menus
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-progress
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-scale
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-spi
+  
+ 
+
+
+
+
+ 
+  
+   XXX no answer for perf-startup
+  
+ 
+
+
+
+
+ 
+