files = getProjectFiles();
- for (String filename: files) {
+ for (String filename : files) {
FileOption fileOption = project.getFileOption(filename);
if (fileOption.getContainer().equals(containerName)) {
fileOption.setContainer("");
@@ -391,12 +468,18 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis
}
}
+ /**
+ * {@inheritDoc}
+ *
+ * Updates the file list.
+ */
public void fileScannerFinished(FileScanner fileScanner) {
final boolean error = fileScanner.isError();
if (!error) {
final List files = fileScanner.getFiles();
SwingUtilities.invokeLater(new Runnable() {
+ @SuppressWarnings("synthetic-access")
public void run() {
projectFileList.setListData(files.toArray(new String[files.size()]));
projectFileList.clearSelection();
@@ -411,7 +494,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis
entriesToRemove.add(filename);
}
}
- for (String filename: entriesToRemove) {
+ for (String filename : entriesToRemove) {
project.setFileOption(filename, null);
}
} else {
@@ -419,6 +502,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis
}
SwingUtilities.invokeLater(new Runnable() {
+ @SuppressWarnings("synthetic-access")
public void run() {
wizard.setPreviousEnabled(true);
wizard.setNextEnabled(!error);
@@ -523,6 +607,13 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis
// INTERFACE DocumentListener
//
+ /**
+ * Updates the options of the currently selected file with the changes made
+ * in the âcustom keyâ textfield.
+ *
+ * @param documentEvent
+ * The document event to process
+ */
private void processDocumentUpdate(DocumentEvent documentEvent) {
String filename = (String) projectFileList.getSelectedValue();
if (filename == null) {
@@ -534,6 +625,7 @@ public class ProjectFilesPage extends TWizardPage implements ActionListener, Lis
String text = document.getText(0, document.getLength());
fileOption.setCustomKey(text);
} catch (BadLocationException ble1) {
+ /* ignore. */
}
}