@Override
protected Control createDialogArea(Composite parent) {
userScopedConfig = loadUserScopedConfig();
UserConfig userConfig = userScopedConfig.get(UserConfig.KEY);
Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new GridLayout(2, false));
GridDataFactory.fillDefaults().grab(true, true).applyTo(main);
// user name
Label userNameLabel = new Label(main, SWT.NONE);
userNameLabel.setText(UIText.BasicConfigurationDialog_UserNameLabel);
userName = new Text(main, SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, false).applyTo(userName);
String currentName = null;
if (userConfig != null)
currentName = userConfig.getAuthorName();
if (currentName != null)
userName.setText(currentName);
userName.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
needsUpdate = true;
}
});
// user email
Label emailLabel = new Label(main, SWT.NONE);
emailLabel.setText(UIText.BasicConfigurationDialog_UserEmailLabel);
email = new Text(main, SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, false).applyTo(email);
String currentMail = null;
if (userConfig != null)
currentMail = userConfig.getAuthorEmail();
if (currentMail != null)
email.setText(currentMail);
email.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
needsUpdate = true;