@@ -46,15 +46,18 @@ public static synchronized Preferences getInstance(PreferenceStore store) {
4646 public static final String LSP_VERSION = "LSP_VERSION" ;
4747 public static final String USE_TOKEN_AUTH = "useTokenAuth" ;
4848 public static final String ANALYTICS_PLUGIN_INSTALLED_SENT = "analyticsPluginInstalledSent" ;
49- public static final String FILTER_CRITICAL = "FILTER_SNYK_CRITICAL" ;
50- public static final String FILTER_HIGH = "FILTER_SNYK_HIGH" ;
51- public static final String FILTER_MEDIUM = "FILTER_SNYK_MEDIUM" ;
52- public static final String FILTER_LOW = "FILTER_SNYK_LOW" ;
53- public static final String FILTER_DELTA_NEW_ISSUES = "FILTER_SNYK_NEW_ISSUES" ;
54- public static final String FILTER_IGNORES_SHOW_OPEN_ISSUES = "FILTER_IGNORES_OPEN_ISSUES" ;
55- public static final String FILTER_IGNORES_SHOW_IGNORED_ISSUES = "FILTER_IGNORES_IGNORED_ISSUES" ;
56- public static final String FILTER_FIXABLE_ISSUES = "FILTER_FIXABLE_ISSUES" ;
57- public static final String FILTER_OSS_FIXABLE_ISSUES = "FILTER_OSS_FIXABLE_ISSUES" ;
49+ public static final String ENABLE_DELTA = "ENABLE_DELTA" ;
50+
51+
52+ // all filter preferences are positive: SHOW = true, HIDE = false
53+ public static final String FILTER_SHOW_CRITICAL = "FILTER_SHOW_CRITICAL" ;
54+ public static final String FILTER_SHOW_HIGH = "FILTER_SHOW_HIGH" ;
55+ public static final String FILTER_SHOW_MEDIUM = "FILTER_SHOW_MEDIUM" ;
56+ public static final String FILTER_SHOW_LOW = "FILTER_SHOW_LOW" ;
57+
58+ public static final String FILTER_IGNORES_SHOW_OPEN_ISSUES = "FILTER_IGNORES_SHOW_OPEN_ISSUES" ;
59+ public static final String FILTER_IGNORES_SHOW_IGNORED_ISSUES = "FILTER_IGNORES_SHOW_IGNORED_ISSUES" ;
60+ public static final String FILTER_SHOW_ONLY_FIXABLE = "FILTER_SHOW_FIXABLE_AND_UNFIXABLE_ISSUES" ;
5861
5962 // Feature flags
6063 public static final String IS_GLOBAL_IGNORES_FEATURE_ENABLED = "IS_GLOBAL_IGNORES_FEATURE_ENABLED" ;
@@ -87,32 +90,29 @@ public static synchronized Preferences getInstance(PreferenceStore store) {
8790 if (getPref (ACTIVATE_SNYK_IAC ) == null ) {
8891 store (ACTIVATE_SNYK_IAC , "true" );
8992 }
90- if (getPref (FILTER_CRITICAL ) == null ) {
91- store (FILTER_CRITICAL , "false " );
93+ if (getPref (FILTER_SHOW_CRITICAL ) == null ) {
94+ store (FILTER_SHOW_CRITICAL , "true " );
9295 }
93- if (getPref (FILTER_HIGH ) == null ) {
94- store (FILTER_HIGH , "false " );
96+ if (getPref (FILTER_SHOW_HIGH ) == null ) {
97+ store (FILTER_SHOW_HIGH , "true " );
9598 }
96- if (getPref (FILTER_MEDIUM ) == null ) {
97- store (FILTER_MEDIUM , "false " );
99+ if (getPref (FILTER_SHOW_MEDIUM ) == null ) {
100+ store (FILTER_SHOW_MEDIUM , "true " );
98101 }
99- if (getPref (FILTER_LOW ) == null ) {
100- store (FILTER_LOW , "false " );
102+ if (getPref (FILTER_SHOW_LOW ) == null ) {
103+ store (FILTER_SHOW_LOW , "true " );
101104 }
102- if (getPref (FILTER_DELTA_NEW_ISSUES ) == null ) {
103- store (FILTER_DELTA_NEW_ISSUES , "false" );
105+ if (getPref (ENABLE_DELTA ) == null ) {
106+ store (ENABLE_DELTA , "false" );
104107 }
105108 if (getPref (FILTER_IGNORES_SHOW_OPEN_ISSUES ) == null ) {
106109 store (FILTER_IGNORES_SHOW_OPEN_ISSUES , "true" );
107110 }
108111 if (getPref (FILTER_IGNORES_SHOW_IGNORED_ISSUES ) == null ) {
109- store (FILTER_IGNORES_SHOW_IGNORED_ISSUES , "true" );
110- }
111- if (getPref (FILTER_FIXABLE_ISSUES ) == null ) {
112- store (FILTER_FIXABLE_ISSUES , "false" );
112+ store (FILTER_IGNORES_SHOW_IGNORED_ISSUES , "false" );
113113 }
114- if (getPref (FILTER_OSS_FIXABLE_ISSUES ) == null ) {
115- store (FILTER_OSS_FIXABLE_ISSUES , "false" );
114+ if (getPref (FILTER_SHOW_ONLY_FIXABLE ) == null ) {
115+ store (FILTER_SHOW_ONLY_FIXABLE , "false" );
116116 }
117117
118118 if (getPref (SEND_ERROR_REPORTS ) == null ) {
@@ -262,7 +262,7 @@ public boolean isTest() {
262262 }
263263
264264 public static boolean isDeltaEnabled () {
265- return Preferences .getInstance ().getBooleanPref (Preferences .FILTER_DELTA_NEW_ISSUES );
265+ return Preferences .getInstance ().getBooleanPref (Preferences .ENABLE_DELTA );
266266 }
267267
268268 public static void setCurrentPreferences (Preferences prefs ) {
0 commit comments