1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Method to save the ErrorParsers ids.

This commit is contained in:
Alain Magloire 2003-09-03 18:41:02 +00:00
parent 645fd04fa9
commit a5e90c433e

View file

@ -760,7 +760,11 @@ public class CCorePlugin extends Plugin {
} }
public String[] getPreferenceErrorParserIDs() { public String[] getPreferenceErrorParserIDs() {
String parserIDs = CCorePlugin.getDefault().getPluginPreferences().getString(PREF_ERROR_PARSER); return getPreferenceErrorParserIDs(CCorePlugin.getDefault().getPluginPreferences());
}
public String[] getPreferenceErrorParserIDs(Preferences prefs) {
String parserIDs = prefs.getString(PREF_ERROR_PARSER);
String[] empty = new String[0]; String[] empty = new String[0];
if (parserIDs != null && parserIDs.length() > 0) { if (parserIDs != null && parserIDs.length() > 0) {
StringTokenizer tok = new StringTokenizer(parserIDs, ";"); StringTokenizer tok = new StringTokenizer(parserIDs, ";");
@ -774,11 +778,15 @@ public class CCorePlugin extends Plugin {
} }
public void setPreferenceErrorParser(String[] parsersIDs) { public void setPreferenceErrorParser(String[] parsersIDs) {
StringBuffer buf = new StringBuffer(); setPreferenceErrorParser(CCorePlugin.getDefault().getPluginPreferences(), parsersIDs);
for (int i = 0; i < parsersIDs.length; i++) {
buf.append(parsersIDs[i]).append(';');
} }
CCorePlugin.getDefault().getPluginPreferences().setValue(PREF_ERROR_PARSER, buf.toString());
public void setPreferenceErrorParser(Preferences prefs, String[] parserIDs) {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < parserIDs.length; i++) {
buf.append(parserIDs[i]).append(';');
}
prefs.setValue(PREF_ERROR_PARSER, buf.toString());
} }
public IScannerInfoProvider getScannerInfoProvider(IProject project) { public IScannerInfoProvider getScannerInfoProvider(IProject project) {