Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-03-24 05:46:05 +0000
committerslewis2008-03-24 05:46:05 +0000
commitf32aee1d8b5083865fd5ac1a2ebf4289e67f3734 (patch)
tree37cdde5d02f91cd24ccb65829b920a915b7a2095 /providers
parent0f3d2e3fed95adf2d8a51ca893082579a8c5ecd0 (diff)
downloadorg.eclipse.ecf-f32aee1d8b5083865fd5ac1a2ebf4289e67f3734.tar.gz
org.eclipse.ecf-f32aee1d8b5083865fd5ac1a2ebf4289e67f3734.tar.xz
org.eclipse.ecf-f32aee1d8b5083865fd5ac1a2ebf4289e67f3734.zip
Enhancements/contributions from bug 222866. Also updated versions to 2.0.0 for core and filetransfer plugins
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/build.properties1
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/icons/new_connection.gifbin0 -> 947 bytes
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.properties3
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.xml30
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java3
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties14
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizard.java148
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java5
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizard.java23
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java4
11 files changed, 148 insertions, 85 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/META-INF/MANIFEST.MF
index a5bda483c..73cb3ee5f 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ecf.provider.xmpp.ui;singleton:=true
-Bundle-Version: 1.3.0.qualifier
+Bundle-Version: 1.4.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.xmpp.ui.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/build.properties b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/build.properties
index 98be5c6ae..110d0b76a 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/build.properties
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/build.properties
@@ -2,6 +2,7 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
+ icons/,\
plugin.xml,\
plugin.properties,\
about.html
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/icons/new_connection.gif b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/icons/new_connection.gif
new file mode 100644
index 000000000..4d4c6bb16
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/icons/new_connection.gif
Binary files differ
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.properties b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.properties
index 03d322a86..337c35cf1 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.properties
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.properties
@@ -11,3 +11,6 @@ providerName = Eclipse.org
TextEditorHyperlinkTarget= Textual Editors
XMPPHyperlinkDetector= XMPP/XMPPS
+
+XMPPConnectWizardPage.description=Create a XMPP connection
+XMPPSConnectWizardPage.description=Create a XMPPS connection
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.xml b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.xml
index eaecce4b8..310326df3 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.xml
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/plugin.xml
@@ -14,6 +14,36 @@
id="org.eclipse.ecf.provider.ui.xmpp.xmppsConnect"
name="XMPPS"/>
</extension>
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ class="org.eclipse.ecf.internal.provider.xmpp.ui.wizards.XMPPConnectWizard"
+ id="org.eclipse.ecf.provider.ui.xmpp.xmppConnect"
+ name="XMPP"
+ icon="icons/new_connection.gif"
+ category="org.eclipse.ecf.ui.newConnection.category"
+ finalPerspective="org.eclipse.ecf.ui.perspective.communications">
+ <description>%XMPPConnectWizardPage.description</description>
+ </wizard>
+ <wizard
+ class="org.eclipse.ecf.internal.provider.xmpp.ui.wizards.XMPPSConnectWizard"
+ id="org.eclipse.ecf.provider.ui.xmpp.xmppsConnect"
+ name="XMPPS"
+ icon="icons/new_connection.gif"
+ category="org.eclipse.ecf.ui.newConnection.category"
+ finalPerspective="org.eclipse.ecf.ui.perspective.communications">
+ <description>%XMPPSConnectWizardPage.description</description>
+ </wizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension targetID="org.eclipse.ecf.ui.perspective.communications">
+ <newWizardShortcut id="org.eclipse.ecf.provider.ui.xmpp.xmppConnect"/>
+ <newWizardShortcut id="org.eclipse.ecf.provider.ui.xmpp.xmppsConnect"/>
+ </perspectiveExtension>
+ </extension>
+
<extension
point="org.eclipse.ui.menus">
<menuContribution
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java
index 35bc773cd..888de08eb 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/Messages.java
@@ -71,6 +71,9 @@ public class Messages extends NLS {
public static String XMPPCompoundContributionItem_FILE_SEND_REFUSED_TITLE;
public static String XMPPCompoundContributionItem_FILE_SEND_REFUSED_MESSAGE;
+ public static String XMPPConnectWizard_WIZARD_TITLE;
+ public static String XMPPSConnectWizard_WIZARD_TITLE;
+
private Messages() {
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties
index 27cd6f3c9..19674569f 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/messages.properties
@@ -1,3 +1,14 @@
+################################################################################
+# Copyright (c) 2007 Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Composent, Inc. - initial API and implementation
+################################################################################
+
XMPPConnectWizardPage_WIZARD_TITLE=XMPP Connection Wizard
XMPPConnectWizardPage_WIZARD_DESCRIPTION=Specify an XMPP account to connect to.
XMPPCompoundContributionItem_CHOOSE_FILE=Choose File For {0}
@@ -37,3 +48,6 @@ XMPPHyperlink_SELECT_ACTION_DIALOG_MESSAGE=The target host {0} is not the same a
XMPPHyperlink_MESSAGING_ERROR_TITLE=Messaging Error
XMPPHyperlink_MESSAGING_ERROR_MESSAGE=You don't want to talk to yourself, do you?
XMPPHyperlink_CONNECT_ACCOUNT_DIALOG_TITLE=Connect To Account
+
+XMPPConnectWizard_WIZARD_TITLE=New XMPP Connection
+XMPPSConnectWizard_WIZARD_TITLE=New XMPPS Connection
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizard.java
index dade5a361..8c3599197 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizard.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizard.java
@@ -14,6 +14,8 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
+import org.eclipse.ecf.core.ContainerCreateException;
+import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.core.IContainerListener;
import org.eclipse.ecf.core.events.IContainerConnectedEvent;
@@ -47,24 +49,27 @@ import org.eclipse.ecf.ui.actions.AsynchContainerConnectAction;
import org.eclipse.ecf.ui.dialogs.IDCreateErrorDialog;
import org.eclipse.ecf.ui.util.PasswordCacheHelper;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-public class XMPPConnectWizard extends Wizard implements IConnectWizard {
+public class XMPPConnectWizard extends Wizard implements IConnectWizard, INewWizard {
XMPPConnectWizardPage page;
private Shell shell;
- private IContainer container;
+ //private IContainer container;
+ protected IContainer container;
private ID targetID;
@@ -82,72 +87,49 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
}
protected IIncomingFileTransferRequestListener requestListener = new IIncomingFileTransferRequestListener() {
- public void handleFileTransferRequest(
- final IFileTransferRequestEvent event) {
+ public void handleFileTransferRequest(final IFileTransferRequestEvent event) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- String username = event.getRequesterID().getName();
- IFileTransferInfo transferInfo = event
- .getFileTransferInfo();
- String fileName = transferInfo.getFile().getName();
- Object[] bindings = new Object[] { username, fileName,
- ((transferInfo.getFileSize() == -1) ? "unknown" //$NON-NLS-1$
- : (transferInfo.getFileSize() + " bytes")), //$NON-NLS-1$
+ final String username = event.getRequesterID().getName();
+ final IFileTransferInfo transferInfo = event.getFileTransferInfo();
+ final String fileName = transferInfo.getFile().getName();
+ final Object[] bindings = new Object[] {username, fileName, ((transferInfo.getFileSize() == -1) ? "unknown" //$NON-NLS-1$
+ : (transferInfo.getFileSize() + " bytes")), //$NON-NLS-1$
(transferInfo.getDescription() == null) ? "none" //$NON-NLS-1$
- : transferInfo.getDescription() };
- if (MessageDialog.openQuestion(shell, NLS.bind(
- Messages.XMPPConnectWizard_FILE_RECEIVE_TITLE,
- username), NLS.bind(
- Messages.XMPPConnectWizard_FILE_RECEIVE_MESSAGE,
- bindings))) {
- FileDialog fd = new FileDialog(shell, SWT.OPEN);
+ : transferInfo.getDescription()};
+ if (MessageDialog.openQuestion(shell, NLS.bind(Messages.XMPPConnectWizard_FILE_RECEIVE_TITLE, username), NLS.bind(Messages.XMPPConnectWizard_FILE_RECEIVE_MESSAGE, bindings))) {
+ final FileDialog fd = new FileDialog(shell, SWT.OPEN);
// XXX this should be some default path gotten from
// preference. For now we'll have it be the user.home
// system property
fd.setFilterPath(System.getProperty("user.home")); //$NON-NLS-1$
fd.setFileName(fileName);
- int suffixLoc = fileName.lastIndexOf('.');
+ final int suffixLoc = fileName.lastIndexOf('.');
if (suffixLoc != -1) {
- String ext = fileName.substring(fileName
- .lastIndexOf('.'));
- fd.setFilterExtensions(new String[] { ext });
+ final String ext = fileName.substring(fileName.lastIndexOf('.'));
+ fd.setFilterExtensions(new String[] {ext});
}
- fd.setText(NLS.bind(
- Messages.XMPPConnectWizard_FILE_SAVE_TITLE,
- username));
+ fd.setText(NLS.bind(Messages.XMPPConnectWizard_FILE_SAVE_TITLE, username));
final String res = fd.open();
if (res == null)
event.reject();
else {
try {
- final FileOutputStream fos = new FileOutputStream(
- new File(res));
+ final FileOutputStream fos = new FileOutputStream(new File(res));
event.accept(fos, new IFileTransferListener() {
- public void handleTransferEvent(
- IFileTransferEvent event) {
+ public void handleTransferEvent(IFileTransferEvent event) {
// XXX Should have some some UI
// for transfer events
if (event instanceof IIncomingFileTransferReceiveDoneEvent) {
try {
fos.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
}
});
- } catch (Exception e) {
- MessageDialog
- .openError(
- shell,
- Messages.XMPPConnectWizard_RECEIVE_ERROR_TITLE,
- NLS
- .bind(
- Messages.XMPPConnectWizard_RECEIVE_ERROR_MESSAGE,
- new Object[] {
- fileName,
- username,
- e
- .getLocalizedMessage() }));
+ } catch (final Exception e) {
+ MessageDialog.openError(shell, Messages.XMPPConnectWizard_RECEIVE_ERROR_TITLE, NLS.bind(Messages.XMPPConnectWizard_RECEIVE_ERROR_MESSAGE, new Object[] {fileName, username, e.getLocalizedMessage()}));
}
}
} else
@@ -167,6 +149,21 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
shell = workbench.getActiveWorkbenchWindow().getShell();
this.container = container;
this.workbench = workbench;
+
+ setWindowTitle(Messages.XMPPConnectWizard_WIZARD_TITLE);
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ shell = workbench.getActiveWorkbenchWindow().getShell();
+ this.workbench = workbench;
+ this.container = null;
+ try {
+ this.container = ContainerFactory.getDefault().createContainer("ecf.xmpp.smack");
+ } catch (final ContainerCreateException e) {
+ // None
+ }
+
+ setWindowTitle(Messages.XMPPConnectWizard_WIZARD_TITLE);
}
private IWorkbench workbench;
@@ -175,11 +172,9 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
private void openView() {
try {
- MultiRosterView view = (MultiRosterView) workbench
- .getActiveWorkbenchWindow().getActivePage().showView(
- MultiRosterView.VIEW_ID);
+ final MultiRosterView view = (MultiRosterView) workbench.getActiveWorkbenchWindow().getActivePage().showView(MultiRosterView.VIEW_ID);
view.addContainer(container);
- } catch (PartInitException e) {
+ } catch (final PartInitException e) {
e.printStackTrace();
}
}
@@ -188,34 +183,24 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
final IChatMessage message = e.getChatMessage();
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- MessagesView view = (MessagesView) workbench
- .getActiveWorkbenchWindow().getActivePage().findView(
- MessagesView.VIEW_ID);
+ MessagesView view = (MessagesView) workbench.getActiveWorkbenchWindow().getActivePage().findView(MessagesView.VIEW_ID);
if (view != null) {
- IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view
- .getSite().getAdapter(
- IWorkbenchSiteProgressService.class);
+ final IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view.getSite().getAdapter(IWorkbenchSiteProgressService.class);
view.openTab(icms, itms, targetID, message.getFromID());
view.showMessage(message);
service.warnOfContentChange();
} else {
try {
- IWorkbenchPage page = workbench
- .getActiveWorkbenchWindow().getActivePage();
- view = (MessagesView) page.showView(
- MessagesView.VIEW_ID, null,
- IWorkbenchPage.VIEW_CREATE);
+ final IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
+ view = (MessagesView) page.showView(MessagesView.VIEW_ID, null, IWorkbenchPage.VIEW_CREATE);
if (!page.isPartVisible(view)) {
- IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view
- .getSite()
- .getAdapter(
- IWorkbenchSiteProgressService.class);
+ final IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view.getSite().getAdapter(IWorkbenchSiteProgressService.class);
service.warnOfContentChange();
}
view.openTab(icms, itms, targetID, message.getFromID());
view.showMessage(message);
- } catch (PartInitException e) {
+ } catch (final PartInitException e) {
e.printStackTrace();
}
}
@@ -226,9 +211,7 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
private void displayTypingNotification(final ITypingMessageEvent e) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- MessagesView view = (MessagesView) workbench
- .getActiveWorkbenchWindow().getActivePage().findView(
- MessagesView.VIEW_ID);
+ final MessagesView view = (MessagesView) workbench.getActiveWorkbenchWindow().getActivePage().findView(MessagesView.VIEW_ID);
if (view != null)
view.displayTypingNotification(e);
}
@@ -236,29 +219,26 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
}
public boolean performFinish() {
-
+
final String connectID = page.getConnectID();
final String password = page.getPassword();
-
+
// Save combo text even if we don't successfully login
page.saveComboText();
-
- connectContext = ConnectContextFactory
- .createPasswordConnectContext(password);
+
+ connectContext = ConnectContextFactory.createPasswordConnectContext(password);
try {
- targetID = IDFactory.getDefault().createID(
- container.getConnectNamespace(), connectID);
- } catch (IDCreateException e) {
- new IDCreateErrorDialog(null,connectID,e).open();
+ targetID = IDFactory.getDefault().createID(container.getConnectNamespace(), connectID);
+ } catch (final IDCreateException e) {
+ new IDCreateErrorDialog(null, connectID, e).open();
return false;
}
// Save combo items if targetID created successfully
page.saveComboItems();
- final IPresenceContainerAdapter adapter = (IPresenceContainerAdapter) container
- .getAdapter(IPresenceContainerAdapter.class);
+ final IPresenceContainerAdapter adapter = (IPresenceContainerAdapter) container.getAdapter(IPresenceContainerAdapter.class);
container.addListener(new IContainerListener() {
public void handleEvent(IContainerEvent event) {
@@ -272,7 +252,7 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
}
});
- IChatManager icm = adapter.getChatManager();
+ final IChatManager icm = adapter.getChatManager();
icms = icm.getChatMessageSender();
itms = icm.getTypingMessageSender();
@@ -286,23 +266,23 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
}
});
- ISendFileTransferContainerAdapter ioftca = (ISendFileTransferContainerAdapter) container
- .getAdapter(ISendFileTransferContainerAdapter.class);
+ final ISendFileTransferContainerAdapter ioftca = (ISendFileTransferContainerAdapter) container.getAdapter(ISendFileTransferContainerAdapter.class);
ioftca.addListener(requestListener);
// Connect
new AsynchContainerConnectAction(container, targetID, connectContext, null, new Runnable() {
public void run() {
- cachePassword(connectID,password);
- }}).run();
+ cachePassword(connectID, password);
+ }
+ }).run();
return true;
}
protected void cachePassword(final String connectID, String password) {
if (password != null && !password.equals("")) {
- PasswordCacheHelper pwStorage = new PasswordCacheHelper(connectID);
+ final PasswordCacheHelper pwStorage = new PasswordCacheHelper(connectID);
pwStorage.savePassword(password);
}
}
-
+
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java
index bd8f565bd..4156908d7 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java
@@ -49,6 +49,7 @@ public class XMPPConnectWizardPage extends WizardPage {
setTitle(Messages.XMPPConnectWizardPage_WIZARD_TITLE);
setDescription(Messages.XMPPConnectWizardPage_WIZARD_DESCRIPTION);
setImageDescriptor(SharedImages.getImageDescriptor(SharedImages.IMG_CHAT_WIZARD));
+ setPageComplete(false);
}
XMPPConnectWizardPage(String usernameAtHost) {
@@ -72,6 +73,9 @@ public class XMPPConnectWizardPage extends WizardPage {
}
public void createControl(Composite parent) {
+
+ parent = new Composite(parent, SWT.NONE);
+
parent.setLayout(new GridLayout());
final GridData fillData = new GridData(SWT.FILL, SWT.CENTER, true, false);
final GridData endData = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
@@ -119,6 +123,7 @@ public class XMPPConnectWizardPage extends WizardPage {
} else if (isPageComplete())
passwordText.setFocus();
+ org.eclipse.jface.dialogs.Dialog.applyDialogFont(parent);
setControl(parent);
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizard.java
index 99c34fd81..16e792c8c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizard.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizard.java
@@ -10,6 +10,13 @@
*****************************************************************************/
package org.eclipse.ecf.internal.provider.xmpp.ui.wizards;
+import org.eclipse.ecf.core.ContainerCreateException;
+import org.eclipse.ecf.core.ContainerFactory;
+import org.eclipse.ecf.core.IContainer;
+import org.eclipse.ecf.internal.provider.xmpp.ui.Messages;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbench;
+
public final class XMPPSConnectWizard extends XMPPConnectWizard {
@@ -26,4 +33,20 @@ public final class XMPPSConnectWizard extends XMPPConnectWizard {
addPage(page);
}
+ public void init(IWorkbench workbench, IContainer container) {
+ super.init(workbench, container);
+
+ setWindowTitle(Messages.XMPPSConnectWizard_WIZARD_TITLE);
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+ try {
+ this.container = ContainerFactory.getDefault().createContainer("ecf.xmpps.smack");
+ } catch (ContainerCreateException e) {
+ // None
+ }
+
+ setWindowTitle(Messages.XMPPSConnectWizard_WIZARD_TITLE);
+ }
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java
index a3e5d7e4d..10a240216 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java
@@ -55,6 +55,9 @@ final class XMPPSConnectWizardPage extends XMPPConnectWizardPage {
}
public void createControl(Composite parent) {
+
+ parent = new Composite(parent, SWT.NONE);
+
parent.setLayout(new GridLayout());
final GridData fillData = new GridData(SWT.FILL, SWT.CENTER, true, false);
final GridData endData = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
@@ -104,6 +107,7 @@ final class XMPPSConnectWizardPage extends XMPPConnectWizardPage {
} else if (isPageComplete())
passwordText.setFocus();
+ org.eclipse.jface.dialogs.Dialog.applyDialogFont(parent);
setControl(parent);
}

Back to the top