* created for the path of Ptolemy home.
*/
public void createFieldEditors() {
Composite parent = getFieldEditorParent();
DirectoryFieldEditor directoryFieldEditor = new DirectoryFieldEditor(
PreferenceConstants.PTII, "&Ptolemy home:",
getFieldEditorParent(), true) {
protected void fireValueChanged(String property, Object oldValue,
Object newValue) {
if ((property.equals(VALUE)) && isValid()) {
String PTII = getStringValue();
File sourceList = new File(PTII
+ "/ptolemy/backtrack/automatic/source.lst");
if (sourceList.exists()) {
IPreferenceStore store = EclipsePlugin.getDefault()
.getPreferenceStore();
store.setValue(
PreferenceConstants.BACKTRACK_SOURCE_LIST,
sourceList.getPath());
}
}
super.fireValueChanged(property, oldValue, newValue);
}
};
directoryFieldEditor.setWorkspaceOnly(false);
addField(directoryFieldEditor);
Label space = new Label(parent, 0);
GridData gridData = new GridData();
gridData.horizontalSpan = 3;