diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/EnterpriseApplicationCreationOperation.java')
-rw-r--r-- | plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/EnterpriseApplicationCreationOperation.java | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/EnterpriseApplicationCreationOperation.java b/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/EnterpriseApplicationCreationOperation.java deleted file mode 100644 index 0a11969f0..000000000 --- a/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/operations/EnterpriseApplicationCreationOperation.java +++ /dev/null @@ -1,78 +0,0 @@ -/*************************************************************************************************** - * 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 Oct 27, 2003 - * - * To change the template for this generated file go to Window>Preferences>Java>Code - * Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.application.operations; - -import java.lang.reflect.InvocationTargetException; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel; -import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants; -import org.eclipse.jst.j2ee.internal.project.J2EENature; -import org.eclipse.wst.common.frameworks.internal.operations.ProjectCreationDataModel; -import org.eclipse.wst.common.frameworks.internal.operations.ProjectCreationOperation; -import org.eclipse.wst.common.internal.emfworkbench.operation.EditModelOperation; - -/** - * @deprecated - * - */ -public class EnterpriseApplicationCreationOperation extends J2EEArtifactCreationOperationOld { - - public EnterpriseApplicationCreationOperation(EnterpriseApplicationCreationDataModel dataModel) { - super(dataModel); - } - - protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { - EnterpriseApplicationCreationDataModel dataModel = (EnterpriseApplicationCreationDataModel) operationDataModel; - - createProject(monitor); - setVersion((J2EENature) dataModel.getProjectDataModel().getProject().getNature(IEARNatureConstants.NATURE_ID), monitor); - addServerTarget(monitor); - if (dataModel.getBooleanProperty(EnterpriseApplicationCreationDataModel.CREATE_DEFAULT_FILES)) { - createApplication(dataModel, monitor); - } - addModules(dataModel.getAddModulesToEARDataModel(), monitor); - } - - protected void createProject(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { - ProjectCreationDataModel projectModel = ((J2EEArtifactCreationDataModelOld) operationDataModel).getProjectDataModel(); - ProjectCreationOperation projectOperation = new ProjectCreationOperation(projectModel); - projectOperation.doRun(monitor); - } - - private void addModules(AddArchiveProjectsToEARDataModel model, IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { - if (null != model) { - AddArchiveProjectsToEAROperation modulesOperation = new AddArchiveProjectsToEAROperation(model); - modulesOperation.doRun(monitor); - } - } - - private void createApplication(EnterpriseApplicationCreationDataModel dataModel, IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { - EditModelOperation op = new EditModelOperation(dataModel) { - protected void execute(IProgressMonitor aMonitor) throws CoreException, InvocationTargetException, InterruptedException { - EAREditModel earEditModel = (EAREditModel) editModel; - earEditModel.makeDeploymentDescriptorWithRoot(); - } - }; - op.doRun(monitor); - } - - protected void setVersion(J2EENature nature, IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { - EnterpriseApplicationCreationDataModel dataModel = (EnterpriseApplicationCreationDataModel) operationDataModel; - nature.setModuleVersion(dataModel.getIntProperty(EnterpriseApplicationCreationDataModel.APPLICATION_VERSION)); - } - -}
\ No newline at end of file |