This is an automated email from the ASF dual-hosted git repository.
sdedic pushed a commit to branch sdedic/feature/project-dependency-add_base
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to
refs/heads/sdedic/feature/project-dependency-add_base by this push:
new 620a25f6c1 Fixed filtering of artifacts
620a25f6c1 is described below
commit 620a25f6c186123df6f8229fed245ab7506f71e6
Author: Svata Dedic <[email protected]>
AuthorDate: Mon Dec 18 14:46:08 2023 +0100
Fixed filtering of artifacts
---
.../commands/ProjectDependenciesCommand.java | 25 +++++++++++++---------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git
a/java/java.lsp.server/nbcode/integration/src/org/netbeans/modules/nbcode/integration/commands/ProjectDependenciesCommand.java
b/java/java.lsp.server/nbcode/integration/src/org/netbeans/modules/nbcode/integration/commands/ProjectDependenciesCommand.java
index d1b12742fa..8b1eb93732 100644
---
a/java/java.lsp.server/nbcode/integration/src/org/netbeans/modules/nbcode/integration/commands/ProjectDependenciesCommand.java
+++
b/java/java.lsp.server/nbcode/integration/src/org/netbeans/modules/nbcode/integration/commands/ProjectDependenciesCommand.java
@@ -184,32 +184,37 @@ public class ProjectDependenciesCommand implements
CommandProvider {
continue;
}
toProcess.addAll(d.getChildren());
+ boolean found = false;
if (matches != null && !matches.isEmpty()) {
for (ArtifactSpec test : matches) {
if (test.getGroupId() != null &&
!test.getGroupId().equals(a.getGroupId())) {
- continue NEXT;
+ continue;
}
if (test.getArtifactId() != null &&
!test.getArtifactId().equals(a.getArtifactId())) {
- continue NEXT;
+ continue;
}
if (test.getVersionSpec() != null &&
!test.getVersionSpec().equals(a.getVersionSpec())) {
- continue NEXT;
+ continue;
}
if (test.getClassifier() != null &&
!test.getClassifier().equals(a.getClassifier())) {
- continue NEXT;
+ continue;
}
if (test.getType()!= null &&
!test.getType().equals(a.getType())) {
- continue NEXT;
+ continue;
}
// match found, OK
+ found = true;
break;
}
- }
-
- if (request.isReturnContents()) {
- accepted.add(d);
} else {
- accepted.add(Dependency.create(a, d.getScope(),
Collections.emptyList(), null));
+ found = true;
+ }
+ if (found) {
+ if (request.isReturnContents()) {
+ accepted.add(d);
+ } else {
+ accepted.add(Dependency.create(a,
d.getScope(), Collections.emptyList(), null));
+ }
}
}
res.setMatches(accepted);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists