blob: b18fff0d52754c860f96415537b2f33f15c1d3f0 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
/*
* Created on Mar 22, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.eclipse.jst.j2ee.internal.wizard;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientComponentCreationDataModelProvider;
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
import org.eclipse.ui.INewWizard;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
public class AppClientComponentCreationWizard extends J2EEComponentCreationWizard implements IExecutableExtension, INewWizard {
/**
* <p>
* The Wizard ID of the EARComponentCreationWizard. Used for internal purposes and activities management.
* </p>
*/
public static final String WIZARD_ID = AppClientComponentCreationWizard.class.getName();
/**
* <p>
* The default constructor. Creates a wizard with no selection,
* no model instance, and no operation instance. The model and
* operation will be created as needed.
* </p>
*/
public AppClientComponentCreationWizard() {
super();
}
/**
* <p>
* The model is used to prepopulate the wizard controls
* and interface with the operation.
* </p>
* @param model The model parameter is used to pre-populate wizard controls and interface with the operation
*/
public AppClientComponentCreationWizard(IDataModel model) {
super(model);
}
/**
* {@inheritDoc}
*
* <p>
* Sets up the dialog window title and default page image.
* </p>
*
* @see J2EEArtifactCreationWizard#doInit()
*/
protected void doInit() {
setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APPCLIENT_COMPONENT_WIZ_TITLE));
setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_PROJECT_WIZARD_BANNER));
preFillSelectedEARProject();
}
/**
* {@inheritDoc}
*
* <p>
* Adds a {@link JCAProjectCreationPage} as the {@link J2EEComponentCreationWizard#MAIN_PG}.
* </p>
*/
protected void doAddPages() {
AppClientComponentCreationWizardPage page1 = new AppClientComponentCreationWizardPage(getDataModel(), MAIN_PG);
addPage(page1);
super.doAddPages();
}
protected IDataModelProvider getDefaultProvider() {
return new AppClientComponentCreationDataModelProvider();
}
}