diff options
author | slewis | 2007-03-26 20:19:20 +0000 |
---|---|---|
committer | slewis | 2007-03-26 20:19:20 +0000 |
commit | 4634764316621138c3d0d3909da9973fc9e9fa93 (patch) | |
tree | ccd1bf59e7655ac97e1849e84be534f6d8e319e9 /providers/bundles/org.eclipse.ecf.provider.xmpp.ui | |
parent | 65c3e49a28e724dfda741089a628598c9c101014 (diff) | |
download | org.eclipse.ecf-4634764316621138c3d0d3909da9973fc9e9fa93.tar.gz org.eclipse.ecf-4634764316621138c3d0d3909da9973fc9e9fa93.tar.xz org.eclipse.ecf-4634764316621138c3d0d3909da9973fc9e9fa93.zip |
Added PresenceUI to org.eclipse.ecf.presence.ui plugin
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.xmpp.ui')
4 files changed, 33 insertions, 24 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 c5b89445a..2583e85de 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 @@ -9,5 +9,7 @@ Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.ecf, - org.eclipse.ecf.ui + org.eclipse.ecf.ui, + org.eclipse.ecf.presence, + org.eclipse.ecf.presence.ui Eclipse-LazyStart: true diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizard.java index 351ea78cc..5e422e607 100644 --- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizard.java +++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizard.java @@ -18,8 +18,11 @@ import org.eclipse.ecf.core.identity.IDCreateException; import org.eclipse.ecf.core.identity.IDFactory; import org.eclipse.ecf.core.security.ConnectContextFactory; import org.eclipse.ecf.core.security.IConnectContext; +import org.eclipse.ecf.core.user.User; import org.eclipse.ecf.core.util.IExceptionHandler; import org.eclipse.ecf.internal.provider.xmpp.ui.Activator; +import org.eclipse.ecf.presence.IPresenceContainerAdapter; +import org.eclipse.ecf.presence.ui.PresenceUI; import org.eclipse.ecf.ui.IConnectWizard; import org.eclipse.ecf.ui.actions.AsynchContainerConnectAction; import org.eclipse.ecf.ui.dialogs.ContainerConnectErrorDialog; @@ -30,8 +33,6 @@ import org.eclipse.ui.IWorkbench; public class XMPPConnectWizard extends Wizard implements IConnectWizard { - private static final int CONNECT_ERROR_CODE = 7777; - XMPPConnectWizardPage page; private Shell shell; @@ -42,6 +43,22 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard { private IConnectContext connectContext; + private IExceptionHandler exceptionHandler = new IExceptionHandler() { + public IStatus handleException(final Throwable exception) { + if (exception != null) { + Display.getDefault().asyncExec(new Runnable() { + public void run() { + new ContainerConnectErrorDialog(shell, IStatus.ERROR, + "See Details", targetID.getName(), exception) + .open(); + } + }); + } + return new Status(IStatus.OK, Activator.PLUGIN_ID, IStatus.OK, + "Connected", null); + } + }; + public void addPages() { page = new XMPPConnectWizardPage(); addPage(page); @@ -64,25 +81,15 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard { e.printStackTrace(); return false; } + // Get presence container adapter + IPresenceContainerAdapter presenceAdapter = (IPresenceContainerAdapter) container + .getAdapter(IPresenceContainerAdapter.class); + // Create and show roster view user interface + new PresenceUI(container, presenceAdapter).showForUser(new User( + targetID)); new AsynchContainerConnectAction(this.container, this.targetID, - this.connectContext, new IExceptionHandler() { - public IStatus handleException(final Throwable exception) { - if (exception != null) { - Display.getDefault().asyncExec(new Runnable() { - public void run() { - new ContainerConnectErrorDialog(shell, - CONNECT_ERROR_CODE, "See Details", - targetID.getName(), exception) - .open(); - } - }); - } - return new Status(IStatus.OK, Activator.PLUGIN_ID, 0, - "", null); - } - - }).run(null); + this.connectContext, exceptionHandler).run(null); return true; } diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java index 614093015..650fb14a6 100644 --- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java +++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPConnectWizardPage.java @@ -29,7 +29,7 @@ public class XMPPConnectWizardPage extends WizardPage { XMPPConnectWizardPage() { super(""); setTitle("XMPP Connection Wizard"); - setDescription("Specify a nickname and XMPP server to connect to."); + setDescription("Specify a XMPP account to connect to."); setPageComplete(false); } @@ -39,7 +39,7 @@ public class XMPPConnectWizardPage 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("User ID:"); connectText = new Text(parent, SWT.SINGLE | SWT.BORDER); connectText.setLayoutData(fillData); diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java index 008ebf973..1e8dfa31d 100644 --- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java +++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/provider/xmpp/ui/wizards/XMPPSConnectWizardPage.java @@ -24,7 +24,7 @@ final class XMPPSConnectWizardPage extends XMPPConnectWizardPage { XMPPSConnectWizardPage() { super(); setTitle("XMPPS Connection Wizard"); - setDescription("Specify a nickname and XMPPS server to connect to."); + setDescription("Specify a XMPP account to connect to."); setPageComplete(false); } @@ -34,7 +34,7 @@ final class XMPPSConnectWizardPage extends XMPPConnectWizardPage { 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("User ID:"); connectText = new Text(parent, SWT.SINGLE | SWT.BORDER); connectText.setLayoutData(fillData); |