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();
}
}
}
}
Aggregations