blob: 5fd5d020fe8260386274b153977afbe787225b8c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2003, 2004 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 Dec 3, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package org.eclipse.jst.j2ee.internal.wizard;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jst.j2ee.application.operations.J2EEModuleImportDataModel;
import org.eclipse.jst.j2ee.applicationclient.creation.AppClientImportDataModel;
import org.eclipse.jst.j2ee.internal.archive.operations.AppClientImportOperation;
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.IWorkbench;
import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
/**
* @author cbridgha
*
* To change the template for this generated type comment go to Window>Preferences>Java>Code
* Generation>Code and Comments
*/
public class AppClientImportWizard extends J2EEModuleImportWizard {
private static final String MAIN_PG = "main"; //$NON-NLS-1$
/**
* @param model
*/
public AppClientImportWizard(AppClientImportDataModel model) {
super(model);
}
/**
*
*/
public AppClientImportWizard() {
super();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createDefaultModel()
*/
protected WTPOperationDataModel createDefaultModel() {
AppClientImportDataModel aModel = new AppClientImportDataModel();
aModel.setBooleanProperty(J2EEModuleImportDataModel.ADD_TO_EAR, true);
return aModel;
}
protected WTPOperation getImportOperation() {
return new AppClientImportOperation(getAppClientDataModel());
}
public void addPages() {
addPage(new AppClientImportPage(getAppClientDataModel(), MAIN_PG));
}
/**
*
*/
private AppClientImportDataModel getAppClientDataModel() {
return (AppClientImportDataModel) model;
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.IMPORT_WIZ_TITLE));
setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_IMPORT_WIZARD_BANNER));
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEModuleImportWizard#getModuleValidatorStrings()
*/
protected String[] getModuleValidatorStrings() {
return new String[]{"org.eclipse.jst.j2ee.internal.validation.UIApplicationClientValidator"}; //$NON-NLS-1$
}
}