}
JTextField[] modifiableFields = new JTextField[]{pathToEclipsePreferenceFileJava,
pathToEclipsePreferenceFileJS, disabledFileTypes, importOrder, pathToImportOrderPreferenceFile};
for (JTextField field : modifiableFields) {
field.getDocument().addDocumentListener(new DocumentAdapter() {
protected void textChanged(DocumentEvent e) {
updateComponents();
}
});
}
eclipsePreferenceFilePathJavaBrowse.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
browseForFile(pathToEclipsePreferenceFileJava);
}
});
pathToImportOrderPreferenceFileBrowse.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
browseForFile(pathToImportOrderPreferenceFile);
}
});
eclipsePreferenceFilePathJSBrowse.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
browseForFile(pathToEclipsePreferenceFileJS);
}
});
rootComponent.addAncestorListener(new AncestorListener() {
public void ancestorAdded(AncestorEvent event) {
// Called when component becomes visible, to ensure that the
// popups
// are visible when the form is shown for the first time.
updateComponents();
}
public void ancestorRemoved(AncestorEvent event) {
}
public void ancestorMoved(AncestorEvent event) {
}
});
pathToEclipsePreferenceFileJava.getDocument().addDocumentListener(new DocumentAdapter() {
@Override
protected void textChanged(DocumentEvent e) {
setJavaFormatterProfileModel();
}
});
pathToEclipsePreferenceFileJS.getDocument().addDocumentListener(new DocumentAdapter() {
@Override
protected void textChanged(DocumentEvent e) {
setJavaScriptFormatterProfileModel();
}
});