@@ -328,7 +328,7 @@ void initLogger() {
328328 static public volatile boolean autoSavePromptEnabled = true ;
329329 static public volatile boolean defaultAutoSaveEnabled = true ;
330330 static public volatile boolean ccTriggerEnabled = false ;
331- static public volatile boolean importSuggestEnabled = true ;
331+ // static public volatile boolean importSuggestEnabled = true;
332332 static public int autoSaveInterval = 3 ; //in minutes
333333
334334
@@ -339,17 +339,18 @@ void initLogger() {
339339
340340 static public final String prefErrorCheck = "pdex.errorCheckEnabled" ;
341341 static public final String prefWarnings = "pdex.warningsEnabled" ;
342- static public final String prefCodeCompletionEnabled = "pdex.completion" ;
343- static public final String prefCCTriggerEnabled = "pdex.completion.trigger" ;
344342 static public final String prefDebugOP = "pdex.dbgOutput" ;
345343 static public final String prefErrorLogs = "pdex.writeErrorLogs" ;
346344 static public final String prefAutoSaveInterval = "pdex.autoSaveInterval" ;
347345 static public final String prefAutoSave = "pdex.autoSave.autoSaveEnabled" ;
348346 static public final String prefAutoSavePrompt = "pdex.autoSave.promptDisplay" ;
349347 static public final String prefDefaultAutoSave = "pdex.autoSave.autoSaveByDefault" ;
350- static public final String prefImportSuggestEnabled = "pdex.importSuggestEnabled" ;
351348 static public final String suggestionsFileName = "suggestions.txt" ;
352349
350+ static public final String COMPLETION_PREF = "pdex.completion" ;
351+ static public final String COMPLETION_TRIGGER_PREF = "pdex.completion.trigger" ;
352+ static public final String SUGGEST_IMPORTS_PREF = "pdex.suggest.imports" ;
353+
353354// static volatile public boolean enableTweak = false;
354355
355356 /**
@@ -363,16 +364,16 @@ public void loadPreferences() {
363364 ensurePrefsExist ();
364365 errorCheckEnabled = Preferences .getBoolean (prefErrorCheck );
365366 warningsEnabled = Preferences .getBoolean (prefWarnings );
366- codeCompletionsEnabled = Preferences .getBoolean (prefCodeCompletionEnabled );
367+ codeCompletionsEnabled = Preferences .getBoolean (COMPLETION_PREF );
367368// DEBUG = Preferences.getBoolean(prefDebugOP);
368369 errorLogsEnabled = Preferences .getBoolean (prefErrorLogs );
369370 autoSaveInterval = Preferences .getInteger (prefAutoSaveInterval );
370371// untitledAutoSaveEnabled = Preferences.getBoolean(prefUntitledAutoSave);
371372 autoSaveEnabled = Preferences .getBoolean (prefAutoSave );
372373 autoSavePromptEnabled = Preferences .getBoolean (prefAutoSavePrompt );
373374 defaultAutoSaveEnabled = Preferences .getBoolean (prefDefaultAutoSave );
374- ccTriggerEnabled = Preferences .getBoolean (prefCCTriggerEnabled );
375- importSuggestEnabled = Preferences .getBoolean (prefImportSuggestEnabled );
375+ ccTriggerEnabled = Preferences .getBoolean (COMPLETION_TRIGGER_PREF );
376+ // importSuggestEnabled = Preferences.getBoolean(prefImportSuggestEnabled);
376377 loadSuggestionsMap ();
377378 }
378379
@@ -381,16 +382,16 @@ public void savePreferences() {
381382 Messages .log ("Saving PDEX prefs" );
382383 Preferences .setBoolean (prefErrorCheck , errorCheckEnabled );
383384 Preferences .setBoolean (prefWarnings , warningsEnabled );
384- Preferences .setBoolean (prefCodeCompletionEnabled , codeCompletionsEnabled );
385+ Preferences .setBoolean (COMPLETION_PREF , codeCompletionsEnabled );
385386// Preferences.setBoolean(prefDebugOP, DEBUG);
386387 Preferences .setBoolean (prefErrorLogs , errorLogsEnabled );
387388 Preferences .setInteger (prefAutoSaveInterval , autoSaveInterval );
388389// Preferences.setBoolean(prefUntitledAutoSave,untitledAutoSaveEnabled);
389390 Preferences .setBoolean (prefAutoSave , autoSaveEnabled );
390391 Preferences .setBoolean (prefAutoSavePrompt , autoSavePromptEnabled );
391392 Preferences .setBoolean (prefDefaultAutoSave , defaultAutoSaveEnabled );
392- Preferences .setBoolean (prefCCTriggerEnabled , ccTriggerEnabled );
393- Preferences .setBoolean (prefImportSuggestEnabled , importSuggestEnabled );
393+ Preferences .setBoolean (COMPLETION_TRIGGER_PREF , ccTriggerEnabled );
394+ // Preferences.setBoolean(prefImportSuggestEnabled, importSuggestEnabled);
394395 }
395396
396397 public void loadSuggestionsMap () {
@@ -441,8 +442,8 @@ public void ensurePrefsExist() {
441442 Preferences .setBoolean (prefErrorCheck , errorCheckEnabled );
442443 if (Preferences .get (prefWarnings ) == null )
443444 Preferences .setBoolean (prefWarnings , warningsEnabled );
444- if (Preferences .get (prefCodeCompletionEnabled ) == null )
445- Preferences .setBoolean (prefCodeCompletionEnabled , codeCompletionsEnabled );
445+ if (Preferences .get (COMPLETION_PREF ) == null )
446+ Preferences .setBoolean (COMPLETION_PREF , codeCompletionsEnabled );
446447 if (Preferences .get (prefDebugOP ) == null )
447448// Preferences.setBoolean(prefDebugOP, DEBUG);
448449 if (Preferences .get (prefErrorLogs ) == null )
@@ -457,10 +458,10 @@ public void ensurePrefsExist() {
457458 Preferences .setBoolean (prefAutoSavePrompt , autoSavePromptEnabled );
458459 if (Preferences .get (prefDefaultAutoSave ) == null )
459460 Preferences .setBoolean (prefDefaultAutoSave , defaultAutoSaveEnabled );
460- if (Preferences .get (prefCCTriggerEnabled ) == null )
461- Preferences .setBoolean (prefCCTriggerEnabled , ccTriggerEnabled );
462- if (Preferences .get (prefImportSuggestEnabled ) == null )
463- Preferences .setBoolean (prefImportSuggestEnabled , importSuggestEnabled );
461+ if (Preferences .get (COMPLETION_TRIGGER_PREF ) == null )
462+ Preferences .setBoolean (COMPLETION_TRIGGER_PREF , ccTriggerEnabled );
463+ // if (Preferences.get(prefImportSuggestEnabled) == null)
464+ // Preferences.setBoolean(prefImportSuggestEnabled, importSuggestEnabled);
464465 }
465466
466467
0 commit comments