import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.custom.StyledText;
GridData gd_btnRememberMe = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
btnRememberMe.setLayoutData(gd_btnRememberMe);
btnRememberMe.setText(Messages.RemotingLoginDialog_LABEL_REMEMBER_ME);
- new Label(loginComposite, SWT.NONE);
- new Label(loginComposite, SWT.NONE);
- new Label(loginComposite, SWT.NONE);
- new Label(loginComposite, SWT.NONE);
+
+ Label lblDefaultLogin = new Label(loginComposite, SWT.NONE);
+ GridDataFactory.fillDefaults().span(4, 1).align(SWT.TRAIL, SWT.CENTER).applyTo(lblDefaultLogin);
+ lblDefaultLogin.setText("Default: user=admin password=00000");
styledTxtMessage = new StyledText(remotingComposite, SWT.NONE);
styledTxtMessage.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
credentialsPrefs.put(getPasswordPrefKey(), txtPassword.getText());
flushPreferences(credentialsPrefs);
}
-
+
private void removePrefCredentials() {
IEclipsePreferences preferences = ConfigurationScope.INSTANCE.getNode(STORE_PREFERENCES_NODE);
Preferences credentialsPrefs = preferences.node(LOGIN_NODE);
setMessage(bse.getMessage());
}
}
-
-
+
+
private void readPrefCredentials() {
String username, password;