mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Patch for Sean Evoy
This commit is contained in:
parent
b66bb2d4b7
commit
4528b2a06c
3 changed files with 31 additions and 4 deletions
|
@ -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
|
||||
Backing out previous changes regarding new JFace interfaces.
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ OpenClassWizardAction.title=New Class
|
|||
# ------- Project/Prefernces/Wizards COnfiguration blocks -------
|
||||
|
||||
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.desc=Set required binary parser for this project
|
||||
|
|
|
@ -73,6 +73,11 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
|
|||
return null;
|
||||
}
|
||||
|
||||
public void updateValues() {
|
||||
fErrorParserList.removeAllElements();
|
||||
setValues();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a label provider for the error parsers
|
||||
*
|
||||
|
@ -111,10 +116,19 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
|
|||
/**
|
||||
* To be implemented, abstract method.
|
||||
* @param project
|
||||
* @param list
|
||||
* @return String[]
|
||||
*/
|
||||
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.
|
||||
* @param project
|
||||
|
@ -143,12 +157,19 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
|
|||
|
||||
protected void initializeValues() {
|
||||
initMapParsers();
|
||||
setValues();
|
||||
}
|
||||
|
||||
protected void setValues() {
|
||||
String[] parserIDs;
|
||||
IProject project = getContainer().getProject();
|
||||
if (project == null) {
|
||||
// From a Preference.
|
||||
parserIDs =getErrorParserIDs(fPrefs);
|
||||
if (fPrefs != null) {
|
||||
// From a Preference.
|
||||
parserIDs = getErrorParserIDs(fPrefs);
|
||||
} else {
|
||||
parserIDs = getErrorParserIDs();
|
||||
}
|
||||
} else {
|
||||
// From the Project.
|
||||
parserIDs = getErrorParserIDs(project);
|
||||
|
@ -227,6 +248,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
|
|||
String[] parserIDs = (String[])list.toArray(EMPTY);
|
||||
|
||||
if (project == null) {
|
||||
// Save to preferences
|
||||
saveErrorParsers(fPrefs, parserIDs);
|
||||
} else {
|
||||
saveErrorParsers(project, parserIDs);
|
||||
|
|
Loading…
Add table
Reference in a new issue