addRemovePane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
button = new JButton("View resulting config");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ProjectConfig config;
try {
// Create default configuration
config = new ProjectConfig(true);
} catch (FileNotFoundException ex) {
logger.fatal("Could not find default project config file: "
+ GUI.PROJECT_DEFAULT_CONFIG_FILENAME);
return;
} catch (IOException ex) {
logger.fatal("Error when reading default project config file: "
+ GUI.PROJECT_DEFAULT_CONFIG_FILENAME);
return;
}
// Add the fixed project configurations
if (fixedProjectsList != null) {
for (String projectDir : fixedProjectsList.getItems()) {
try {
config.appendProjectDir(new File(projectDir));
} catch (Exception ex) {
logger.fatal("Error when merging configurations: " + ex);
return;
}
}
}
// Add the project directory configurations
for (String projectDir : changeableProjectsList.getItems()) {
try {
config.appendProjectDir(new File(projectDir));
} catch (Exception ex) {
logger.fatal("Error when merging configurations: " + ex);
return;
}
}