/**
 * プロジェクト名 LaxIde
 * クラス名 GenerateAction.java
 * 作成日: 2007/05/28
 * 
 */
package jp.co.cybec.laxide.actions;

import jp.co.cybec.laxide.wizards.LetsAjaxWebAppGenerationWizardForAction;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.PlatformUI;

/**
 * HTMLやJSを生成するウィザードを起動するためのアクションクラス
 * ファイル名：GenerateAction.java
 * @author nakamura
 * 作成時刻：10:47:25
 *
 */
public class GenerateAction implements IWorkbenchWindowActionDelegate {

	private IWorkbenchWindow window;

	public void dispose() {

	}

	public void init(IWorkbenchWindow window) {
		this.window = window;

	}
    /**
     * HTMLやJSを生成するウィザードを起動する
     * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
     */
	public void run(IAction action) {
		this.window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
		LetsAjaxWebAppGenerationWizardForAction wizard = new LetsAjaxWebAppGenerationWizardForAction();
		WizardDialog dialog = new WizardDialog(this.window.getShell(), wizard);
		dialog.setBlockOnOpen(true);
		dialog.create();

		dialog.open();

	}

	public void selectionChanged(IAction action, ISelection selection) {
	}

}
