[netbeans] branch master updated: Fix NumberFormatException in dependency update hint.

2023-07-12 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 d9335fa23e Fix NumberFormatException in dependency update hint.
 new 2c2e57cd7e Merge pull request #6184 from mbien/maven-hint-nfe-fix
d9335fa23e is described below

commit d9335fa23e88afd38e0c701cd8d8992d1e21f737
Author: Michael Bien 
AuthorDate: Wed Jul 12 14:31:53 2023 +0200

Fix NumberFormatException in dependency update hint.

Empty version Strings in the pom should not cause exceptions.
---
 .../src/org/netbeans/modules/maven/hints/pom/UpdateDependencyHint.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/java/maven.hints/src/org/netbeans/modules/maven/hints/pom/UpdateDependencyHint.java
 
b/java/maven.hints/src/org/netbeans/modules/maven/hints/pom/UpdateDependencyHint.java
index bd7c4998f9..b42343f1e5 100644
--- 
a/java/maven.hints/src/org/netbeans/modules/maven/hints/pom/UpdateDependencyHint.java
+++ 
b/java/maven.hints/src/org/netbeans/modules/maven/hints/pom/UpdateDependencyHint.java
@@ -175,7 +175,7 @@ public class UpdateDependencyHint implements 
POMErrorFixProvider {
 return i == 0 || Integer.parseInt(v.substring(0, i)) < 10_000;
 }
 }
-return Integer.parseInt(v) < 10_000;
+return v.isEmpty() || Integer.parseInt(v) < 10_000;
 }
 
 // example: in '3.14' -> out '3.'


-
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: turn github PR squash feature off.

2023-07-12 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 e3062ad9b1 turn github PR squash feature off.
 new 94b76eafc1 Merge pull request #5617 from mbien/no-squash
e3062ad9b1 is described below

commit e3062ad9b15a80101df599c638a8577dbed4863a
Author: Michael Bien 
AuthorDate: Mon Mar 6 21:05:14 2023 +0100

turn github PR squash feature off.
---
 .asf.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.asf.yaml b/.asf.yaml
index acf7b7bf61..7dfa23e6cb 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -30,7 +30,7 @@ github:
 issues: true
 projects: true
   enabled_merge_buttons:
-squash:  true
+squash:  false
 merge:   true
 rebase:  true
   protected_branches:


-
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 (f6df5f3323 -> aedaefefbc)

2023-07-12 Thread jtulach
This is an automated email from the ASF dual-hosted git repository.

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


from f6df5f3323 Merge pull request #6179 from 
junichi11/php-gh-5681-reimplement
 add aedaefefbc Incremental compilation of NetBeans: All dependencies are 
prerequisite (#4523)

No new revisions were added by this update.

Summary of changes:
 ide/c.jcraft.jsch/nbproject/project.xml | 5 +
 1 file changed, 5 insertions(+)


-
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 dependabot/npm_and_yarn/java/java.lsp.server/vscode/semver-7.5.2 deleted (was 1d355cc6cd)

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

github-bot pushed a change to branch 
dependabot/npm_and_yarn/java/java.lsp.server/vscode/semver-7.5.2
in repository https://gitbox.apache.org/repos/asf/netbeans.git


 was 1d355cc6cd Bump semver from 7.3.5 to 7.5.2 in 
/java/java.lsp.server/vscode

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


-
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 dependabot/npm_and_yarn/java/java.lsp.server/vscode/semver-7.5.4 created (now 742f4bc77c)

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

github-bot pushed a change to branch 
dependabot/npm_and_yarn/java/java.lsp.server/vscode/semver-7.5.4
in repository https://gitbox.apache.org/repos/asf/netbeans.git


  at 742f4bc77c Bump semver from 7.3.5 to 7.5.4 in 
/java/java.lsp.server/vscode

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: Don't remove existing uses if they are the same as the created string for use statements

2023-07-12 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 26ab50f13b Don't remove existing uses if they are the same as the 
created string for use statements
 new f6df5f3323 Merge pull request #6179 from 
junichi11/php-gh-5681-reimplement
26ab50f13b is described below

commit 26ab50f13b7c223f6e8cfa6592961f9f57551055
Author: Junichi Yamamoto 
AuthorDate: Wed Jul 12 00:20:50 2023 +0900

Don't remove existing uses if they are the same as the created string for 
use statements

- https://github.com/apache/netbeans/pull/5681
- Avoid changing the file state if the created string is the same as the
  existing use statements
---
 .../php/editor/actions/FixUsesPerformer.java   | 37 +-
 .../01/testIssue210093_01.php.fixUses  |  4 +--
 .../actions/testNoChanges/01/testNoChanges_01.php  | 37 ++
 .../testNoChanges/01/testNoChanges_01.php.fixUses  | 37 ++
 .../php/editor/actions/FixUsesPerformerTest.java   |  7 
 5 files changed, 112 insertions(+), 10 deletions(-)

diff --git 
a/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java
 
b/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java
index 678f6e372c..f294b47160 100644
--- 
a/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java
+++ 
b/php/php.editor/src/org/netbeans/modules/php/editor/actions/FixUsesPerformer.java
@@ -114,7 +114,6 @@ public class FixUsesPerformer {
 if (document instanceof BaseDocument) {
 baseDocument = (BaseDocument) document;
 editList = new EditList(baseDocument);
-processExistingUses();
 processSelections();
 editList.apply();
 }
@@ -157,10 +156,23 @@ public class FixUsesPerformer {
 }
 replaceUnimportedItems();
 String insertString = createInsertString(useParts);
+insertUses(startOffset, insertString);
+}
+
+private void insertUses(int startOffset, String insertString) {
+ExistingUseStatementVisitor visitor = new 
ExistingUseStatementVisitor();
+Program program = parserResult.getProgram();
+if (program != null) {
+program.accept(visitor);
+}
+List usedRanges = visitor.getUsedRanges();
+String existingUses = getExistingUses(usedRanges);
 // avoid being recognized as a modified file
-if (insertString.isEmpty()) {
+if (insertString.isEmpty()
+|| existingUses.equals(insertString.trim())) {
 
StatusDisplayer.getDefault().setStatusText(Bundle.FixUsesPerformer_noChanges());
 } else {
+processExistingUses(usedRanges);
 editList.replace(startOffset, 0, insertString, false, 0);
 }
 }
@@ -493,13 +505,22 @@ public class FixUsesPerformer {
 return result.toString();
 }
 
-private void processExistingUses() {
-ExistingUseStatementVisitor visitor = new 
ExistingUseStatementVisitor();
-Program program = parserResult.getProgram();
-if (program != null) {
-program.accept(visitor);
+private String getExistingUses(List usedRanges) {
+String existingUses = EMPTY_STRING;
+if (!usedRanges.isEmpty()) {
+int start = usedRanges.get(0).getStart();
+int end = usedRanges.get(usedRanges.size() - 1).getEnd();
+try {
+existingUses = baseDocument.getText(start, end - start);
+} catch (BadLocationException ex) {
+LOGGER.log(Level.WARNING, "Invalid offset: {0}", 
ex.offsetRequested()); // NOI18N
+}
 }
-for (OffsetRange offsetRange : visitor.getUsedRanges()) {
+return existingUses;
+}
+
+private void processExistingUses(List usedRanges) {
+for (OffsetRange offsetRange : usedRanges) {
 int startOffset = 
getOffsetWithoutLeadingWhitespaces(offsetRange.getStart());
 editList.replace(startOffset, offsetRange.getEnd() - startOffset, 
EMPTY_STRING, false, 0);
 }
diff --git 
a/php/php.editor/test/unit/data/testfiles/actions/testIssue210093/01/testIssue210093_01.php.fixUses
 
b/php/php.editor/test/unit/data/testfiles/actions/testIssue210093/01/testIssue210093_01.php.fixUses
index c64e8084be..2eff6f58a1 100644
--- 
a/php/php.editor/test/unit/data/testfiles/actions/testIssue210093/01/testIssue210093_01.php.fixUses
+++ 
b/php/php.editor/test/unit/data/testfiles/actions/testIssue210093/01/testIssue210093_01.php.fixUses
@@ -8,11 +8,11 @@ namespace Issue\Martin {
 
 namespace {
 
-use \Issue\Martin\Pondeli;
+use \Issue\Martin\Pondeli;
 
 function testOk(Pondeli $param) {}
 
 function testFail(Pondeli 

[netbeans] branch master updated (fcab7a1923 -> 02a5586907)

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

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


from fcab7a1923 Rework Janitor, try to use real version numbers, in the 
future
 add 02a5586907 Allow to specify additional NBLS document selectors from 
other extensions. (#6174)

No new revisions were added by this update.

Summary of changes:
 .../vscode/schemas/package.schema.json | 79 ++
 java/java.lsp.server/vscode/src/extension.ts   | 29 +++-
 2 files changed, 77 insertions(+), 31 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