Skip to content

Commit 4c9a936

Browse files
committed
fix: handle the case where no projects are open in Eclipse on start
1 parent 770293e commit 4c9a936

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

plugin/src/main/java/io/snyk/eclipse/plugin/views/snyktoolview/RootNode.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ public void reset() {
1717
super.reset();
1818
List<IProject> openProjects = ResourceUtils.getAccessibleTopLevelProjects();
1919

20+
if (openProjects.isEmpty()) {
21+
var contentRoot = new ContentRootNode("No projects in workspace to scan", null);
22+
this.addChild(contentRoot);
23+
24+
}
25+
2026
for (IProject project : openProjects) {
2127
Path path = ResourceUtils.getFullPath(project);
2228
var contentRoot = new ContentRootNode(project.getName(), path);

plugin/src/main/java/io/snyk/eclipse/plugin/views/snyktoolview/handlers/EnableAllSeveritiesHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ public EnableAllSeveritiesHandler() {
2424
public Object execute(ExecutionEvent event) throws ExecutionException {
2525
super.execute(event);
2626

27-
TreeFilterManager.getInstance().removeTreeFilter(this.preferenceKey);
28-
2927
return null;
3028
}
3129

0 commit comments

Comments
 (0)