1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 09:45:39 +02:00

Patch for Sean Evoy

This commit is contained in:
Hoda Amer 2004-04-22 18:08:26 +00:00
parent b66bb2d4b7
commit 4528b2a06c
3 changed files with 31 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2004-04-22 Sean Evoy
This is the first part of the patch supplied by Leo at Intel
to add error parsers to a managed build project, and to manipulate
the list of error parsers that apply to a project.
2004-04-22 Hoda Amer 2004-04-22 Hoda Amer
Backing out previous changes regarding new JFace interfaces. Backing out previous changes regarding new JFace interfaces.

View file

@ -38,7 +38,7 @@ OpenClassWizardAction.title=New Class
# ------- Project/Prefernces/Wizards COnfiguration blocks ------- # ------- Project/Prefernces/Wizards COnfiguration blocks -------
ErrorParserBlock.label=Error Parsers ErrorParserBlock.label=Error Parsers
ErrorParserBlock.desc=Set the error parser for this project ErrorParserBlock.desc=Set the error parsers for this project
BinaryParserBlock.label=Binary Parser BinaryParserBlock.label=Binary Parser
BinaryParserBlock.desc=Set required binary parser for this project BinaryParserBlock.desc=Set required binary parser for this project

View file

@ -73,6 +73,11 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
return null; return null;
} }
public void updateValues() {
fErrorParserList.removeAllElements();
setValues();
}
/** /**
* Returns a label provider for the error parsers * Returns a label provider for the error parsers
* *
@ -111,10 +116,19 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
/** /**
* To be implemented, abstract method. * To be implemented, abstract method.
* @param project * @param project
* @param list * @return String[]
*/ */
protected abstract String[] getErrorParserIDs(IProject project); protected abstract String[] getErrorParserIDs(IProject project);
/**
* To be overloaded by subclasses with another method of getting the error parsers.
* For example, the managed builder new project wizard uses the selected Target.
* @return String[]
*/
protected String[] getErrorParserIDs() {
return new String[0];
}
/** /**
* To be implemented. abstract method. * To be implemented. abstract method.
* @param project * @param project
@ -143,12 +157,19 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
protected void initializeValues() { protected void initializeValues() {
initMapParsers(); initMapParsers();
setValues();
}
protected void setValues() {
String[] parserIDs; String[] parserIDs;
IProject project = getContainer().getProject(); IProject project = getContainer().getProject();
if (project == null) { if (project == null) {
// From a Preference. if (fPrefs != null) {
parserIDs =getErrorParserIDs(fPrefs); // From a Preference.
parserIDs = getErrorParserIDs(fPrefs);
} else {
parserIDs = getErrorParserIDs();
}
} else { } else {
// From the Project. // From the Project.
parserIDs = getErrorParserIDs(project); parserIDs = getErrorParserIDs(project);
@ -227,6 +248,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
String[] parserIDs = (String[])list.toArray(EMPTY); String[] parserIDs = (String[])list.toArray(EMPTY);
if (project == null) { if (project == null) {
// Save to preferences
saveErrorParsers(fPrefs, parserIDs); saveErrorParsers(fPrefs, parserIDs);
} else { } else {
saveErrorParsers(project, parserIDs); saveErrorParsers(project, parserIDs);