Skip to content

Commit

Permalink
cr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalk007 committed Sep 22, 2024
1 parent 79cd857 commit 153fa48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public void addNavigation(DependencyNode treeNode, PsiElement navigationTargetEl
}
NavigationTarget navigationTarget = new NavigationTarget(navigationTargetElement, document.getLineNumber(navigationTargetElement.getTextOffset()), componentName);
Set<NavigationTarget> navigationTargets = navigationMap.get(treeNode);

if (navigationTargets == null) {
navigationTargets = new HashSet<>(Collections.singletonList(navigationTarget));

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/jfrog/ide/idea/scan/GradleScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.Map;
import java.util.concurrent.ExecutorService;

import static com.jfrog.ide.common.log.Utils.logError;
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/jfrog/ide/idea/ui/LocalComponentsTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ private void handleContextMenu(ComponentsTree tree, MouseEvent e) {
}
Object selected = selectedPath.getLastPathComponent();

// Create the popup menu if clicked on a package. if it's a vulnerability, create ignore rule option.
if (selected instanceof DependencyNode) {
DescriptorFileTreeNode descriptorFileTreeNode = (DescriptorFileTreeNode) selectedPath.getParentPath().getLastPathComponent();
String descriptorPath = descriptorFileTreeNode.getSubtitle();
this.createNodePopupMenu((DependencyNode) selected, descriptorPath);
createNodePopupMenu((DependencyNode) selected, descriptorPath);
} else if (selected instanceof VulnerabilityNode) {
createIgnoreRuleOption((VulnerabilityNode) selected, e);
} else if (selected instanceof ApplicableIssueNode) {
Expand Down Expand Up @@ -272,6 +273,4 @@ public void setNoIssuesEmptyText() {
public void setScanErrorEmptyText() {
SwingUtilities.invokeLater(() -> getEmptyText().setText(ERROR_WHILE_SCANNING));
}
}


}

0 comments on commit 153fa48

Please sign in to comment.