-
Notifications
You must be signed in to change notification settings - Fork 8
Feat/ide 715 filter tree #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…m-IaC,-Open-Source-and-Code,-using-a-local-cache (#215) * chore: wip * fix: add info nodes for no issues found and no fixable issues found * fix: tests * feat: add initial tree filling impl * feat: display info nodes * feat: add generic filter method to cache * feat: show view when scanning
…s/expand treeviewer.
fix: tests on command line
* feat: prepending the treenodes for ignores and AI Fix with identifier * fix: added space after ignore tag * feat: add a call to read feature flags, and call that function to read snykCodeConsistentIgnores * fix: expand treeviewer to show all issues. * fix: wip remvoe ignores filters if needed * fix: rename file * fix: call featureflag service after auth and settings persistence * fix: notifyProgress if param is null * feat: taskprocessor for sending tasks after ls init * fix: tests use current pref * feat: filter issues based on ignore preferences * fix: remove commands if ff for ignores are false * fix: adding the handlers and commands for filters * fix: adding an asyncExec on the ui updates --------- Co-authored-by: Abdelrahman Shawki Hassan <[email protected]>
* wip: html provider * fix: populate tree after snyk.Scan success * refactor: use css from LS * wip: html provider * fix: merge conflicts * fix: added HtmlProviderFactory tests * fix: use comperator for sorting issues * refactor: create BrowserHandler * fix: cache theme instance
Co-authored-by: Abdelrahman Shawki Hassan <[email protected]>
17800d7
to
ef58e01
Compare
private boolean isIssueVisible(IssueTreeNode issueNode) { | ||
Issue issue = issueNode.getIssue(); | ||
if (issue == null) { | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would it be visible if null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to apply filters (and hide) tree elements if we don't match any filters.
@Override | ||
public boolean select(Viewer viewer, Object parentElement, Object element) { | ||
if (element instanceof FileTreeNode) { | ||
return hasVisibleChildren((FileTreeNode) element, viewer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that looks good. I hope it wouldn't be a performance bottleneck tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we only call the hasVisibleChildren
if the node is a treenode, so its not called for all tree nodes. However this might be slow if a project has very many files.
.../src/main/java/io/snyk/eclipse/plugin/views/snyktoolview/filters/SeverityCriticalFilter.java
Show resolved
Hide resolved
db1aad9
to
a95df80
Compare
Description
The file tree can now use the viewmenus popup menu to select these filters:
Additional work on filters will be done in this ticket
https://snyksec.atlassian.net/browse/IDE-782?atlOrigin=eyJpIjoiOGZhM2IzMjlkYzAyNDI4Njg1MWRkZDZiMDM1MGRlMTgiLCJwIjoiaiJ9
Checklist
Screenshots / GIFs
Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!