(netbeans-mavenutils-archetype-nbm-archetype) branch dependabot/maven/src/main/resources/archetype-resources/org.apache.netbeans.utilities-nbm-maven-plugin-14.0 created (now 0fa4eec)

2023-11-22 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/maven/src/main/resources/archetype-resources/org.apache.netbeans.utilities-nbm-maven-plugin-14.0
in repository 
https://gitbox.apache.org/repos/asf/netbeans-mavenutils-archetype-nbm-archetype.git


  at 0fa4eec  Bump org.apache.netbeans.utilities:nbm-maven-plugin

No new revisions were added by this update.


-
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: LSP: Minor changes.

2023-11-22 Thread dbalek
This is an automated email from the ASF dual-hosted git repository.

dbalek 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 a3fb3eac29 LSP: Minor changes.
 new 2264941c8f Merge pull request #6739 from dbalek/dbalek/minor-changes
a3fb3eac29 is described below

commit a3fb3eac29337351a55bb7562d792c76e44b8b2f
Author: Dusan Balek 
AuthorDate: Wed Nov 22 09:37:04 2023 +0100

LSP: Minor changes.
---
 .../src/org/netbeans/modules/java/lsp/server/protocol/Server.java | 2 +-
 java/java.lsp.server/vscode/package-lock.json | 4 ++--
 java/java.lsp.server/vscode/src/nbcode.ts | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
 
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
index 85e8ad0b25..b427a84993 100644
--- 
a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
+++ 
b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
@@ -207,7 +207,7 @@ public final class Server {
 LOG.log(Level.WARNING, "Error occurred during LSP message 
dispatch", t);
 if (t instanceof CompletionException) {
 if (t.getCause() instanceof ResponseErrorException) {
-return ((ResponseErrorException)t).getResponseError();
+return 
((ResponseErrorException)t.getCause()).getResponseError();
 }
 Throwable cause = t.getCause();
 ResponseError error = new ResponseError();
diff --git a/java/java.lsp.server/vscode/package-lock.json 
b/java/java.lsp.server/vscode/package-lock.json
index 8243353c86..7bd0d7017f 100644
--- a/java/java.lsp.server/vscode/package-lock.json
+++ b/java/java.lsp.server/vscode/package-lock.json
@@ -1,12 +1,12 @@
 {
"name": "apache-netbeans-java",
-   "version": "19.0.301",
+   "version": "0.1.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "apache-netbeans-java",
-   "version": "19.0.301",
+   "version": "0.1.0",
"license": "Apache 2.0",
"dependencies": {
"@vscode/debugadapter": "1.55.1",
diff --git a/java/java.lsp.server/vscode/src/nbcode.ts 
b/java/java.lsp.server/vscode/src/nbcode.ts
index 468cc7c446..8300a3750e 100644
--- a/java/java.lsp.server/vscode/src/nbcode.ts
+++ b/java/java.lsp.server/vscode/src/nbcode.ts
@@ -88,7 +88,7 @@ export function launch(
 return process;
 }
 
-if (typeof process === 'object' && process.argv0 === 'node') {
+if (typeof process === 'object' && typeof process.argv0 ==='string' && 
process.argv0.startsWith('node')) {
 let extension = path.join(process.argv[1], '..', '..');
 let nbcode = path.join(extension, 'nbcode');
 if (!fs.existsSync(nbcode)) {


-
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



svn commit: r65493 - /dev/netbeans/netbeans-maven-utilities/14.0/ /release/netbeans/netbeans-maven-utilities/14.0/

2023-11-22 Thread skygo
Author: skygo
Date: Wed Nov 22 10:15:42 2023
New Revision: 65493

Log:
Apache NetBeans utilities v14.0 release

Added:
release/netbeans/netbeans-maven-utilities/14.0/
  - copied from r65492, dev/netbeans/netbeans-maven-utilities/14.0/
Removed:
dev/netbeans/netbeans-maven-utilities/14.0/


-
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 php-nb21-features updated: Fix incorrect indentation behavior #6731

2023-11-22 Thread junichi11
This is an automated email from the ASF dual-hosted git repository.

junichi11 pushed a commit to branch php-nb21-features
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/php-nb21-features by this push:
 new dd68f675ab Fix incorrect indentation behavior #6731
 new e91ac6221d Merge pull request #6738 from 
junichi11/php-gh-6731-incorrect-indent
dd68f675ab is described below

commit dd68f675abe3be2950364f9bcb1f48a6a70b6237
Author: Junichi Yamamoto 
AuthorDate: Wed Nov 22 12:10:48 2023 +0900

Fix incorrect indentation behavior #6731

- https://github.com/apache/netbeans/issues/6731
- When a multi-line parameter of a function/method invocation has a string 
with a variable(e.g. `"example {$example}"`), ignore the variable within the 
string(i.e. {$example}) to avoid adding extra indentations

Example:
```php
$x = test(
"test {$test}"
);// enter key here
```

Before:
```php
$x = test(
"test {$test}"
);
// one indentation is added
```

After:
```php
$x = test(
"test {$test}"
);
// no indentation
```
---
 .../modules/php/editor/lexer/LexUtilities.java | 13 --
 .../test/unit/data/testfiles/indent/gh6731_01.php  | 23 +
 .../data/testfiles/indent/gh6731_01.php.indented   | 24 ++
 .../test/unit/data/testfiles/indent/gh6731_02.php  | 23 +
 .../data/testfiles/indent/gh6731_02.php.indented   | 24 ++
 .../test/unit/data/testfiles/indent/gh6731_03.php  | 21 
 .../data/testfiles/indent/gh6731_03.php.indented   | 22 
 .../test/unit/data/testfiles/indent/gh6731_04.php  | 27 
 .../data/testfiles/indent/gh6731_04.php.indented   | 28 +
 .../test/unit/data/testfiles/indent/gh6731_05.php  | 28 +
 .../data/testfiles/indent/gh6731_05.php.indented   | 29 ++
 .../test/unit/data/testfiles/indent/gh6731_06.php  | 28 +
 .../data/testfiles/indent/gh6731_06.php.indented   | 29 ++
 .../test/unit/data/testfiles/indent/gh6731_07.php  | 28 +
 .../data/testfiles/indent/gh6731_07.php.indented   | 29 ++
 .../php/editor/indent/PHPNewLineIndenterTest.java  | 28 +
 16 files changed, 402 insertions(+), 2 deletions(-)

diff --git 
a/php/php.editor/src/org/netbeans/modules/php/editor/lexer/LexUtilities.java 
b/php/php.editor/src/org/netbeans/modules/php/editor/lexer/LexUtilities.java
index 009abedf4f..c00a2999eb 100644
--- a/php/php.editor/src/org/netbeans/modules/php/editor/lexer/LexUtilities.java
+++ b/php/php.editor/src/org/netbeans/modules/php/editor/lexer/LexUtilities.java
@@ -507,6 +507,7 @@ public final class LexUtilities {
 Token token;
 int balance = 0;
 int curlyBalance = 0;
+boolean isInQuotes = false; // GH-6731 for checking a variable in 
string
 do {
 token = ts.token();
 if (token.id() == PHPTokenId.PHP_TOKEN) {
@@ -520,6 +521,14 @@ public final class LexUtilities {
 default:
 //no-op
 }
+} else if (token.id() == PHPTokenId.PHP_CONSTANT_ENCAPSED_STRING) {
+// GH-6731 for checking a variable in string
+// e.g. "example {$example}"
+if ((token.text().length() == 1 && 
TokenUtilities.textEquals(token.text(), "\"")) // NOI18N
+|| (!TokenUtilities.startsWith(token.text(), "\"") && 
TokenUtilities.endsWith(token.text(), "\"")) // NOI18N
+|| (TokenUtilities.startsWith(token.text(), "\"") && 
!TokenUtilities.endsWith(token.text(), "\""))) { // NOI18N
+isInQuotes = !isInQuotes;
+}
 } else if ((token.id() == PHPTokenId.PHP_SEMICOLON || token.id() 
== PHPTokenId.PHP_OPENTAG)
 && ts.moveNext()) {
 // we found previous end of expression => find begin of the 
current.
@@ -584,7 +593,7 @@ public final class LexUtilities {
 break;
 } else if (token.id() == PHPTokenId.PHP_CURLY_CLOSE) {
 curlyBalance--;
-if (curlyBalance == -1 && ts.moveNext()) {
+if (!isInQuotes && curlyBalance == -1 && ts.moveNext()) {
 // we are after previous blog close
 LexUtilities.findNext(ts, Arrays.asList(
 PHPTokenId.WHITESPACE,
@@ -600,7 +609,7 @@ public final class LexUtilities {
 }
 } else if (token.id() == PHPTokenId.PHP_CURLY_OPEN) {
 curlyBalance++;
-if (curlyBalance == 1 && ts.moveNext()) {
+if (!isInQuotes && curlyBalance == 1 && ts.moveNext()) {

(netbeans) branch master updated: Micronaut Expression Language: Goto Declaration and Hover implementation.

2023-11-22 Thread dbalek
This is an automated email from the ASF dual-hosted git repository.

dbalek 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 f7f6f74f2e Micronaut Expression Language: Goto Declaration and Hover 
implementation.
 new 45b50b30e3 Merge pull request #6732 from 
dbalek/dbalek/micronaut-expression-language-hyperinks
f7f6f74f2e is described below

commit f7f6f74f2ef9edf4bb79d6bc443a8666b643b93f
Author: Dusan Balek 
AuthorDate: Mon Nov 20 18:17:00 2023 +0100

Micronaut Expression Language: Goto Declaration and Hover implementation.
---
 .../micronaut/MicronautConfigUtilities.java|  62 +++-
 .../completion/MicronautConfigDocumentation.java   |   2 +-
 .../MicronautDataCompletionCollector.java  |   4 +-
 .../MicronautDataCompletionProvider.java   | 116 +-
 .../completion/MicronautDataCompletionTask.java|   4 +-
 .../MicronautExpressionLanguageCompletion.java |  22 +--
 .../MicronautExpressionLanguageHoverProvider.java  |  42 +
 .../micronaut/expression/ExpressionTree.java   | 170 -
 .../MicronautExpressionLanguageParser.java |   3 +
 .../MicronautExpressionLanguageUtilities.java  | 161 +++
 .../MicronautConfigHyperlinkProvider.java  |  61 +---
 .../MicronautExpressionHyperlinkProvider.java  | 161 +++
 .../micronaut/resources/mexp.tmLanguage.json   |   4 +-
 13 files changed, 623 insertions(+), 189 deletions(-)

diff --git 
a/enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigUtilities.java
 
b/enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigUtilities.java
index 75887a4645..7617172bbb 100644
--- 
a/enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigUtilities.java
+++ 
b/enterprise/micronaut/src/org/netbeans/modules/micronaut/MicronautConfigUtilities.java
@@ -24,14 +24,25 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Stack;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.ElementFilter;
 import javax.swing.text.Document;
 import org.netbeans.api.editor.document.EditorDocumentUtils;
 import org.netbeans.api.editor.document.LineDocument;
 import org.netbeans.api.editor.document.LineDocumentUtils;
+import org.netbeans.api.java.source.ClasspathInfo;
+import org.netbeans.api.java.source.ElementHandle;
+import org.netbeans.api.java.source.JavaSource;
 import org.netbeans.api.project.FileOwnerQuery;
 import org.netbeans.api.project.Project;
 import org.netbeans.lib.editor.util.swing.DocumentUtilities;
@@ -223,8 +234,8 @@ public class MicronautConfigUtilities {
 }
 return spans;
 }
-
-private static ConfigurationMetadataProperty getProperty(Map groups, String propertyName, 
List sources) {
+
+public static ConfigurationMetadataProperty getProperty(Map groups, String propertyName, 
List sources) {
 for (Map.Entry groupEntry : 
groups.entrySet()) {
 String groupKey = groupEntry.getKey();
 if (groupKey.endsWith(".*")) {
@@ -246,6 +257,53 @@ public class MicronautConfigUtilities {
 return null;
 }
 
+public static ElementHandle getElementHandle(ClasspathInfo cpInfo, String 
typeName, String propertyName, AtomicBoolean cancel) {
+ElementHandle[] handle = new ElementHandle[1];
+if (typeName != null) {
+handle[0] = 
ElementHandle.createTypeElementHandle(ElementKind.CLASS, typeName);
+if (cpInfo != null && propertyName != null) {
+try {
+JavaSource.create(cpInfo).runUserActionTask(controller -> {
+if (cancel != null && cancel.get()) {
+return;
+}
+controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);
+TypeElement te = (TypeElement) 
handle[0].resolve(controller);
+if (te != null) {
+ElementHandle found = null;
+String name = "set" + propertyName.replace("-", 
"");
+for (ExecutableElement executableElement : 
ElementFilter.methodsIn(te.getEnclosedElements())) {
+if 
(name.equalsIgnoreCase(executableElement.getSimpleName().toString())) {
+found