/******************************************************************************* 
 * Copyright (c) 2016 Red Hat, Inc. 
 * Distributed under license by Red Hat, Inc. All rights reserved. 
 * This program is 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: 
 * Red Hat, Inc. - initial API and implementation 
 ******************************************************************************/ 
package org.jboss.reddeer.eclipse.wst.server.ui.wizard;

import org.jboss.reddeer.jface.wizard.WizardDialog;

/**
 * Wizard for adding and removing modules on the server. 
 * 
 * @author Lucia Jelinkova
 *
 */
public class ModifyModulesDialog extends WizardDialog {

	public static final String DIALOG_TITLE = "Add and Remove...";
}

@@ -614,255 +614,1448 @@
 eer.
-jface.wizard.WizardDialog;%0A%0A/**%0A * Wizard for adding and removing modules on the server. %0A * %0A * @author Lucia Jelinkova%0A *%0A */%0Apublic class ModifyModulesDialog extends WizardDialog %7B%0A%0A%09public static final String DIALOG_TITLE = %22Add and Remove...%22;
+common.exception.RedDeerException;%0Aimport org.jboss.reddeer.common.logging.Logger;%0Aimport org.jboss.reddeer.common.wait.TimePeriod;%0Aimport org.jboss.reddeer.common.wait.WaitWhile;%0Aimport org.jboss.reddeer.core.condition.JobIsRunning;%0Aimport org.jboss.reddeer.jface.wizard.WizardDialog;%0Aimport org.jboss.reddeer.swt.api.Shell;%0Aimport org.jboss.reddeer.swt.condition.ShellIsAvailable;%0Aimport org.jboss.reddeer.swt.impl.button.FinishButton;%0Aimport org.jboss.reddeer.swt.impl.button.OkButton;%0Aimport org.jboss.reddeer.swt.impl.shell.DefaultShell;%0A%0A/**%0A * Wizard for adding and removing modules on the server. %0A * %0A * @author Lucia Jelinkova%0A *%0A */%0Apublic class ModifyModulesDialog extends WizardDialog %7B%0A%0A%09protected final Logger log = Logger.getLogger(this.getClass());%0A%09public static final String DIALOG_TITLE = %22Add and Remove...%22;%0A%09%0A%09/**%0A%09 * Click the finish button in wizard dialog.%0A%09 * @param timeout to wait for wizard shell to close.%0A%09 */%0A%09public void finish(TimePeriod timeout) %7B%0A%09%09log.info(%22Finish wizard%22);%0A%09%09%0A%09%09Shell s = new DefaultShell(DIALOG_TITLE);%0A%09%09new FinishButton().click();%0A%09%09%0A%09%09try%7B%0A%09%09%09Shell serverShell = new DefaultShell(%22Server%22);%0A%09%09%09new OkButton().click();%0A%09%09%09new WaitWhile(new ShellIsAvailable(serverShell));%0A%09%09%7D catch (RedDeerException e) %7B%0A%09%09%09log.debug(%22Dialog '%22+DIALOG_TITLE+%22' did not ask for confirmation%22);%0A%09%09%7D%0A%09%0A%09%09new WaitWhile(new ShellIsAvailable(s), timeout);%0A%09%09new WaitWhile(new JobIsRunning(), timeout);%0A%09%7D
 %0A%7D%0A

Modify Modules dialog may ask for confirmation. Fixes #1488 (#1488)