code: public static IPreferenceStore getPluginPreferences(@CheckForNull IProject project) {
          if (project == null || !isProjectSettingsEnabled(project)) {
              // read workspace (user) settings from instance area
              return new ScopedPreferenceStore(new InstanceScope(), FindbugsPlugin.PLUGIN_ID);
          }
  
          // use project settings
          return new ScopedPreferenceStore(new ProjectScope(project), FindbugsPlugin.PLUGIN_ID);
      }
docs: Get the Eclipse plugin preferences for given project. This method can
  return workspace preferences if project preferences are not created yet
  or they are disabled.
  
  @param project
  the project (if null, workspace settings are used)
  
  @return the preferences for the project or prefs from workspace