private static void applyBasePreferencesTo()

in src/main/java/org/jetbrains/plugins/spotbugs/gui/preferences/LegacyAbstractSettingsConverter.java [79:119]


	private static void applyBasePreferencesTo(
			@NotNull final PersistencePreferencesBean from,
			@NotNull final AbstractSettings to,
			@Nullable final WorkspaceSettings toWorkspace,
			@NotNull final String importFilePathKey
	) {

		final Map<String, String> p = from.getBasePreferences();
		if (p == null || p.isEmpty()) {
			return;
		}

		to.analysisEffort = asString(p.get(ANALYSIS_EFFORT_LEVEL), to.analysisEffort);
		to.minPriority = asString(p.get(MIN_PRIORITY_TO_REPORT), to.minPriority);
		to.suppressWarningsClassName = asString(p.get(ANNOTATION_SUPPRESS_WARNING_CLASS), to.suppressWarningsClassName);

		if (toWorkspace != null) {
			toWorkspace.compileBeforeAnalyze = asBoolean(p.get(COMPILE_BEFORE_ANALYZE), toWorkspace.compileBeforeAnalyze);
			toWorkspace.analyzeAfterCompile = asBoolean(p.get(ANALYZE_AFTER_COMPILE), toWorkspace.analyzeAfterCompile);
			toWorkspace.analyzeAfterAutoMake = asBoolean(p.get(ANALYZE_AFTER_AUTOMAKE), toWorkspace.analyzeAfterAutoMake);
			toWorkspace.runInBackground = asBoolean(p.get(RUN_ANALYSIS_IN_BACKGROUND), toWorkspace.runInBackground);

			final String importFilePath = FileUtilFb.toSystemIndependentName(asString(p.get(IMPORT_FILE_PATH), null));
			if (!StringUtil.isEmptyOrSpaces(importFilePath)) {
				toWorkspace.importFilePath.put(importFilePathKey, importFilePath);
			}
			toWorkspace.exportBugCollectionDirectory = asString(p.get(EXPORT_BASE_DIR), toWorkspace.exportBugCollectionDirectory);
			toWorkspace.exportBugCollectionAsHtml = asBoolean(p.get(EXPORT_AS_HTML), toWorkspace.exportBugCollectionAsHtml);
			toWorkspace.exportBugCollectionAsXml = asBoolean(p.get(EXPORT_AS_XML), toWorkspace.exportBugCollectionAsXml);
			toWorkspace.exportBugCollectionCreateSubDirectory = asBoolean(p.get(EXPORT_CREATE_ARCHIVE_DIR), toWorkspace.exportBugCollectionCreateSubDirectory);
			toWorkspace.openExportedHtmlBugCollectionInBrowser = asBoolean(p.get(EXPORT_OPEN_BROWSER), toWorkspace.openExportedHtmlBugCollectionInBrowser);

			toWorkspace.toolWindowToFront = asBoolean(p.get(TOOLWINDOW_TO_FRONT), toWorkspace.toolWindowToFront);
			toWorkspace.toolWindowScrollToSource = asBoolean(p.get(TOOLWINDOW_SCROLL_TO_SOURCE), toWorkspace.toolWindowScrollToSource);
			toWorkspace.toolWindowEditorPreview = asBoolean(p.get(TOOLWINDOW_EDITOR_PREVIEW), toWorkspace.toolWindowEditorPreview);
			toWorkspace.toolWindowGroupBy = asString(p.get(TOOLWINDOW_GROUP_BY), toWorkspace.toolWindowGroupBy);

			toWorkspace.annotationGutterIcon = asBoolean(p.get(ANNOTATION_GUTTER_ICON_ENABLED), toWorkspace.annotationGutterIcon);
			toWorkspace.annotationTextRangeMarkup = asBoolean(p.get(ANNOTATION_TEXT_RAGE_MARKUP_ENABLED), toWorkspace.annotationTextRangeMarkup);
		}
	}