Search in sources :

Example 1 with JoinGroupWizard

use of org.eclipse.ecf.internal.example.collab.ui.JoinGroupWizard in project ecf by eclipse.

the class JoinGroupWizardAction method run.

public void run(IAction action) {
    if (!connected) {
        JoinGroupWizard wizard = new JoinGroupWizard(resource, PlatformUI.getWorkbench(), connectID);
        Shell shell = null;
        if (targetPart == null) {
            shell = (window == null) ? null : window.getShell();
        } else {
            shell = targetPart.getSite().getShell();
        }
        // Create the wizard dialog
        WizardDialog dialog = new WizardDialog(shell, wizard);
        // Open the wizard dialog
        dialog.open();
    } else {
        ClientEntry client = isConnected(resource);
        if (client == null) {
            connected = false;
            action.setText(CONNECT_PROJECT_MENU_TEXT);
        } else {
            EclipseCollabSharedObject collab = client.getSharedObject();
            if (collab != null) {
                collab.chatGUIDestroy();
            }
        }
    }
}
Also used : EclipseCollabSharedObject(org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject) JoinGroupWizard(org.eclipse.ecf.internal.example.collab.ui.JoinGroupWizard) Shell(org.eclipse.swt.widgets.Shell) ClientEntry(org.eclipse.ecf.internal.example.collab.ClientEntry) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

EclipseCollabSharedObject (org.eclipse.ecf.example.collab.share.EclipseCollabSharedObject)1 ClientEntry (org.eclipse.ecf.internal.example.collab.ClientEntry)1 JoinGroupWizard (org.eclipse.ecf.internal.example.collab.ui.JoinGroupWizard)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 Shell (org.eclipse.swt.widgets.Shell)1