diff options
author | slewis | 2007-05-18 05:55:20 +0000 |
---|---|---|
committer | slewis | 2007-05-18 05:55:20 +0000 |
commit | aba2d60bea4bd99857ecb52f5596258e585fd20a (patch) | |
tree | ef3931b8d776fe990d3b9ac182a3bbf153f5236a | |
parent | ef0db0f155bf2876dde212b6cb5171773f5c1a37 (diff) | |
download | org.eclipse.ecf-aba2d60bea4bd99857ecb52f5596258e585fd20a.tar.gz org.eclipse.ecf-aba2d60bea4bd99857ecb52f5596258e585fd20a.tar.xz org.eclipse.ecf-aba2d60bea4bd99857ecb52f5596258e585fd20a.zip |
Applied patches from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=187060. Also refactored some of org.eclipse.ecf.example.collab. Also internalized strings.
3 files changed, 29 insertions, 12 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/Messages.java b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/Messages.java index 13ea8623d..10c9cf75f 100644 --- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/Messages.java +++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/Messages.java @@ -18,6 +18,14 @@ import org.eclipse.osgi.util.NLS; */ public class Messages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.irc.ui.messages"; //$NON-NLS-1$ + public static String IRCConnectWizardPage_CONNECTID_EXAMPLE; + public static String IRCConnectWizardPage_CONNECTID_LABEL; + public static String IRCConnectWizardPage_PASSWORD_INFO; + public static String IRCConnectWizardPage_PASSWORD_LABEL; + public static String IRCConnectWizardPage_STATUS_MESSAGE_EMPTY; + public static String IRCConnectWizardPage_STATUS_MESSAGE_MALFORMED; + public static String IRCConnectWizardPage_WIZARD_PAGE_DESCRIPTION; + public static String IRCConnectWizardPage_WIZARD_PAGE_TITLE; public static String IRCHyperlink_EXCEPTION_IRC_HYPERLINK; public static String IRCUI_DEPART_CONFIRM_MESSAGE; public static String IRCUI_DEPART_CONFIRM_TITLE; diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/messages.properties b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/messages.properties index 02dd7512a..0d652ea94 100644 --- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/messages.properties +++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/messages.properties @@ -1,4 +1,6 @@ IRCHyperlink_EXCEPTION_IRC_HYPERLINK=Exception in IRC hyperlink open +IRCConnectWizardPage_CONNECTID_LABEL=Connect ID: +IRCConnectWizardPage_PASSWORD_LABEL=Password: IRCUI_JOIN_COMMAND=JOIN IRCUI_QUIT_COMMAND=QUIT IRCUI_DISCONNECT_CONFIRM_TITLE=Disconnect from Server @@ -6,3 +8,9 @@ IRCUI_DISCONNECT_CONFIRM_MESSAGE=Disconnect from {0}? IRCUI_PART_COMMAND=PART IRCUI_DEPART_CONFIRM_TITLE=Depart from IRC Channel IRCUI_DEPART_CONFIRM_MESSAGE=Depart from IRC channel {0}? +IRCConnectWizardPage_WIZARD_PAGE_TITLE=IRC Connection Wizard +IRCConnectWizardPage_WIZARD_PAGE_DESCRIPTION=Specify a user and IRC server to connect to. +IRCConnectWizardPage_STATUS_MESSAGE_EMPTY=A valid connect ID must be specified. +IRCConnectWizardPage_STATUS_MESSAGE_MALFORMED=The connect ID is malformed. +IRCConnectWizardPage_CONNECTID_EXAMPLE=<user>@<ircserver>[:port][/<channel>,<channel2>,...] +IRCConnectWizardPage_PASSWORD_INFO=Password is for password-protected IRC servers. diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java index 2fc481828..bd3537271 100644 --- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java +++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/wizards/IRCConnectWizardPage.java @@ -15,6 +15,7 @@ import java.util.Arrays; import java.util.List; import org.eclipse.ecf.internal.irc.ui.Activator; +import org.eclipse.ecf.internal.irc.ui.Messages; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -36,9 +37,9 @@ final class IRCConnectWizardPage extends WizardPage { private String authorityAndPath; IRCConnectWizardPage() { - super(""); - setTitle("IRC Connection Wizard"); - setDescription("Specify a user and IRC server to connect to."); + super("IRCConnectWizardPage"); //$NON-NLS-1$ + setTitle(Messages.IRCConnectWizardPage_WIZARD_PAGE_TITLE); + setDescription(Messages.IRCConnectWizardPage_WIZARD_PAGE_DESCRIPTION); setPageComplete(false); } @@ -53,7 +54,7 @@ final class IRCConnectWizardPage extends WizardPage { GridData endData = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1); Label label = new Label(parent, SWT.LEFT); - label.setText("Connect ID:"); + label.setText(Messages.IRCConnectWizardPage_CONNECTID_LABEL); connectText = new Combo(parent, SWT.SINGLE | SWT.BORDER | SWT.DROP_DOWN); connectText.setLayoutData(fillData); @@ -61,9 +62,9 @@ final class IRCConnectWizardPage extends WizardPage { public void modifyText(ModifyEvent e) { String text = connectText.getText(); if (text.equals("")) { //$NON-NLS-1$ - updateStatus("A valid connect ID must be specified."); + updateStatus(Messages.IRCConnectWizardPage_STATUS_MESSAGE_EMPTY); } else if (text.indexOf('@') == -1) { - updateStatus("The connect ID is malformed."); + updateStatus(Messages.IRCConnectWizardPage_STATUS_MESSAGE_MALFORMED); } else { updateStatus(null); } @@ -73,15 +74,15 @@ final class IRCConnectWizardPage extends WizardPage { restoreCombo(); label = new Label(parent, SWT.RIGHT); - label.setText("<user>@<ircserver>[:port][/<channel>,<channel2>,...]"); + label.setText(Messages.IRCConnectWizardPage_CONNECTID_EXAMPLE); label.setLayoutData(endData); label = new Label(parent, SWT.LEFT); - label.setText("Password:"); + label.setText(Messages.IRCConnectWizardPage_PASSWORD_LABEL); passwordText = new Text(parent, SWT.SINGLE | SWT.PASSWORD | SWT.BORDER); passwordText.setLayoutData(fillData); label = new Label(parent, SWT.RIGHT | SWT.WRAP); - label.setText("Password is for password-protected IRC servers."); + label.setText(Messages.IRCConnectWizardPage_PASSWORD_INFO); label.setLayoutData(endData); if (authorityAndPath != null) { @@ -93,7 +94,7 @@ final class IRCConnectWizardPage extends WizardPage { } String getConnectID() { - String clean = connectText.getText().replaceAll("#",""); + String clean = connectText.getText().replaceAll("#",""); //$NON-NLS-1$ //$NON-NLS-2$ connectText.setText(clean); return clean; } @@ -110,8 +111,8 @@ final class IRCConnectWizardPage extends WizardPage { private static final String PAGE_SETTINGS = IRCConnectWizardPage.class .getName(); private static final int MAX_COMBO_VALUES = 40; - private static final String COMBO_TEXT_KEY = "connectTextValue"; - private static final String COMBO_BOX_ITEMS_KEY = "comboValues"; + private static final String COMBO_TEXT_KEY = "connectTextValue"; //$NON-NLS-1$ + private static final String COMBO_BOX_ITEMS_KEY = "comboValues"; //$NON-NLS-1$ protected void saveComboText() { IDialogSettings pageSettings = getPageSettings(); |