From e801d86876dcfa002c76a3510e7ba1adef9ec79d Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Sun, 6 Apr 2008 20:39:03 +0000 Subject: [PATCH] [210242][nls] Credentials dialog should look different if password is not supported or optional https://bugs.eclipse.org/bugs/show_bug.cgi?id=210242 --- .../UI/org/eclipse/rse/internal/ui/SystemResources.java | 2 ++ .../org/eclipse/rse/internal/ui/SystemResources.properties | 2 ++ .../eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java index ea416a56cf1..8e36ec7bd2c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.java @@ -19,6 +19,7 @@ * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings * Rupen Mardirossian (IBM) - [210682] Added BUTTON_OVERWRITE_ALL & and tooltip, also added some verbiage for new SystemCopyDialog. * Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View + * David Dykstal (IBM) - [210242] Credentials dialog should look different if password is not supported or optional *******************************************************************************/ package org.eclipse.rse.internal.ui; @@ -325,6 +326,7 @@ public class SystemResources extends NLS public static String RESID_PASSWORD_TITLE; public static String RESID_PASSWORD_LABEL; + public static String RESID_PASSWORD_LABEL_OPTIONAL; public static String RESID_PASSWORD_TIP; public static String RESID_PASSWORD_SYSTEMTYPE_LABEL; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties index 5e073f63f95..01ec2181db1 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemResources.properties @@ -21,6 +21,7 @@ # Rupen Mardirossian (IBM) - [210692] Define strings for SystemCopyDialog # Xuan Chen (IBM) - [222263] Need to provide a PropertySet Adapter for System Team View # David Dykstal (IBM) - [197018] Last Page of New Filter Wizard mentions Change Action +# David Dykstal (IBM) - [210242] Credentials dialog should look different if password is not supported or optional ################################################################################ # NLS_MESSAGEFORMAT_VAR @@ -528,6 +529,7 @@ RESID_TESTFILTERSTRING_PROMPT_TOOLTIP=Filter string being tested #============================================================= RESID_PASSWORD_TITLE = Enter Password RESID_PASSWORD_LABEL = Password +RESID_PASSWORD_LABEL_OPTIONAL=Password (optional) RESID_PASSWORD_TIP = Enter password for connecting to this host RESID_PASSWORD_SYSTEMTYPE_LABEL=System type RESID_PASSWORD_HOSTNAME_LABEL=Host name diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java index 9e06b37dfd0..20fc33112fa 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java @@ -15,6 +15,7 @@ * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * David Dykstal (IBM) - [210474] Deny save password function missing + * David Dykstal (IBM) - [210242] Credentials dialog should look different if password is not supported or optional ********************************************************************************/ package org.eclipse.rse.ui.dialogs; @@ -201,7 +202,11 @@ public final class SystemPasswordPromptDialog extends SystemPromptDialog impleme // Password prompt if (connectorService.supportsPassword()) { - textPassword = SystemWidgetHelpers.createLabeledTextField(composite_prompts, this, SystemResources.RESID_PASSWORD_LABEL, SystemResources.RESID_PASSWORD_TIP); + String passwordLabel = SystemResources.RESID_PASSWORD_LABEL_OPTIONAL; + if (connectorService.requiresPassword()) { + passwordLabel = SystemResources.RESID_PASSWORD_LABEL; + } + textPassword = SystemWidgetHelpers.createLabeledTextField(composite_prompts, this, passwordLabel, SystemResources.RESID_PASSWORD_TIP); textPassword.setEchoChar('*'); }