Search in sources :

Example 1 with ProblemTypePreference

use of org.eclipse.titanium.preferences.ProblemTypePreference in project titan.EclipsePlug-ins by eclipse.

the class AnalyzerBuilder method adaptPreferences.

public AnalyzerBuilder adaptPreferences() {
    if (exhausted) {
        throw new IllegalStateException("One must not use the builder after build() method is called");
    }
    actions.clear();
    projectActions.clear();
    final IPreferencesService prefs = Platform.getPreferencesService();
    for (final ProblemTypePreference prefType : ProblemTypePreference.values()) {
        final String prefName = prefType.getPreferenceName();
        final String warnLevel = prefs.getString(Activator.PLUGIN_ID, prefName, GeneralConstants.IGNORE, null);
        if (!GeneralConstants.IGNORE.equals(warnLevel)) {
            addPreferenceProblem(prefType);
        }
    }
    return this;
}
Also used : ProblemTypePreference(org.eclipse.titanium.preferences.ProblemTypePreference) IPreferencesService(org.eclipse.core.runtime.preferences.IPreferencesService)

Aggregations

IPreferencesService (org.eclipse.core.runtime.preferences.IPreferencesService)1 ProblemTypePreference (org.eclipse.titanium.preferences.ProblemTypePreference)1