Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.jee/jeecreation/org')
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE6ContentDescriber.java76
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEEContentDescriber.java64
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java77
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProviderFactory.java28
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java78
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProviderFactory.java28
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java132
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProviderFactory.java28
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/JEE5ModelProvider.java526
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesDataModelProvider.java13
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesOperation.java26
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesDataModelProvider.java22
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesFilesOperation.java36
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelOperation.java30
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelProvider.java31
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesDataModelProvider.java13
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesOperation.java26
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesDataModelProvider.java13
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesOperation.java61
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IAppClientCreateDeploymentFilesDataModelProperties.java10
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IConnectorCreateDeploymentFilesDataModelProperties.java20
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ICreateDeploymentFilesDataModelProperties.java15
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEJBCreateDeploymentFilesDataModelProperties.java10
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEarCreateDeploymentFilesDataModelProperties.java10
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IWebCreateDeploymentFilesDataModelProperties.java10
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/JEEFacetInstallDelegate.java17
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesDataModelProvider.java13
-rw-r--r--plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesOperation.java50
28 files changed, 0 insertions, 1463 deletions
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE6ContentDescriber.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE6ContentDescriber.java
deleted file mode 100644
index 0338b6c57..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEE6ContentDescriber.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2009 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
- *******************************************************************************/
-package org.eclipse.jst.jee.contenttype;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescriber;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-
-/**
- * A content describer for detecting a j2ee module
- */
-public final class JEE6ContentDescriber implements IContentDescriber {
- public JEE6ContentDescriber() {
- super();
- }
-
- public final static QualifiedName JEEVERSION = new QualifiedName("jee-version", "5.0"); //$NON-NLS-1$ //$NON-NLS-2$
-
- public int describe(InputStream contents, IContentDescription description) throws IOException {
-
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(contents);
- switch (quickPeek.getType()) {
- case JavaEEQuickPeek.APPLICATION_CLIENT_TYPE:
- case JavaEEQuickPeek.APPLICATION_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.JEE_6_0_ID:
- return VALID;
- }
- return INVALID;
- case JavaEEQuickPeek.EJB_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.EJB_3_1_ID:
- return VALID;
- }
- return INVALID;
- case JavaEEQuickPeek.WEB_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.WEB_3_0_ID:
- return VALID;
- }
- return INVALID;
- case JavaEEQuickPeek.WEBFRAGMENT_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.WEBFRAGMENT_3_0_ID:
- return VALID;
- }
- return INVALID;
- case JavaEEQuickPeek.CONNECTOR_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.JCA_1_6_ID:
- return VALID;
- }
- return INVALID;
- }
-
- return INVALID;
- }
-
- public QualifiedName[] getSupportedOptions() {
-
- return new QualifiedName[] { JEEVERSION };
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEEContentDescriber.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEEContentDescriber.java
deleted file mode 100644
index dd4e85aa7..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/contenttype/JEEContentDescriber.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2007 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
- *******************************************************************************/
-package org.eclipse.jst.jee.contenttype;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescriber;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-
-/**
- * A content describer for detecting a j2ee module
- */
-public final class JEEContentDescriber implements IContentDescriber {
- public JEEContentDescriber() {
- super();
- }
-
- public final static QualifiedName JEEVERSION = new QualifiedName("jee-version", "5.0"); //$NON-NLS-1$ //$NON-NLS-2$
-
- public int describe(InputStream contents, IContentDescription description) throws IOException {
-
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(contents);
- switch (quickPeek.getType()) {
- case JavaEEQuickPeek.APPLICATION_CLIENT_TYPE:
- case JavaEEQuickPeek.APPLICATION_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.JEE_5_0_ID:
- return VALID;
- }
- return INVALID;
- case JavaEEQuickPeek.EJB_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.EJB_3_0_ID:
- return VALID;
- }
- return INVALID;
- case JavaEEQuickPeek.WEB_TYPE:
- switch (quickPeek.getVersion()) {
- case JavaEEQuickPeek.WEB_2_5_ID:
- return VALID;
- }
- return INVALID;
- }
-
- return INVALID;
- }
-
- public QualifiedName[] getSupportedOptions() {
-
- return new QualifiedName[] { JEEVERSION };
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java
deleted file mode 100644
index 135cb4538..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProvider.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.jst.jee.model.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.javaee.applicationclient.ApplicationClient;
-import org.eclipse.jst.javaee.applicationclient.ApplicationClientDeploymentDescriptor;
-import org.eclipse.jst.javaee.applicationclient.ApplicationclientFactory;
-import org.eclipse.jst.javaee.applicationclient.IApplicationClientResource;
-import org.eclipse.jst.javaee.core.DisplayName;
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-
-public class AppClient5ModelProvider extends JEE5ModelProvider {
-
- private static final String APPCLIENT5_CONTENT_TYPE = "org.eclipse.jst.jee.ee5appclientDD"; //$NON-NLS-1$
- public AppClient5ModelProvider(IProject proj) {
- super();
- this.proj = proj;
- setDefaultResourcePath(new Path(J2EEConstants.APP_CLIENT_DD_URI));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.model.IModelProvider#getModelObject(org.eclipse.core.runtime.IPath)
- */
- @Override
- public Object getModelObject(IPath modelPath) {
- IApplicationClientResource appRes = (IApplicationClientResource)getModelResource(modelPath);
- if (appRes != null && appRes.getRootObject() != null)
- return appRes.getApplicationClient();
- return null;
- }
- @Override
- protected String getContentTypeDescriber() {
- return APPCLIENT5_CONTENT_TYPE;
- }
- @Override
- public void populateRoot(XMLResourceImpl res, String name) {
- ApplicationClientDeploymentDescriptor dd = ApplicationclientFactory.eINSTANCE.createApplicationClientDeploymentDescriptor();
- dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE_NS_URL); //$NON-NLS-1$
- dd.getXMLNSPrefixMap().put("xsi", J2EEConstants.XSI_NS_URL); //$NON-NLS-1$
-
- ApplicationClient client = ApplicationclientFactory.eINSTANCE.createApplicationClient();
- DisplayName dn = JavaeeFactory.eINSTANCE.createDisplayName();
- dn.setValue(name);
- client.getDisplayNames().add(dn);
-
- String version = J2EEProjectUtilities.getJ2EEProjectVersion(proj);
- if(version != null && version.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
- dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APP_CLIENT_SCHEMA_LOC_5);
- client.setVersion(J2EEVersionConstants.VERSION_5_TEXT);
- }
- else {
- dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APP_CLIENT_SCHEMA_LOC_6);
- client.setVersion(J2EEVersionConstants.VERSION_6_TEXT);
- }
-
- dd.setApplicationClient(client);
- res.getContents().add((EObject) dd);
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProviderFactory.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProviderFactory.java
deleted file mode 100644
index 3e5758787..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/AppClient5ModelProviderFactory.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.jst.jee.model.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.IModelProviderFactory;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClient5ModelProviderFactory implements IModelProviderFactory {
-
- public IModelProvider create(IProject project) {
- return new AppClient5ModelProvider(project);
- }
-
- public IModelProvider create(IVirtualComponent component) {
- return new AppClient5ModelProvider(component.getProject());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java
deleted file mode 100644
index 2546b4d03..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProvider.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.jst.jee.model.internal;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.javaee.core.DisplayName;
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-import org.eclipse.jst.javaee.jca.Connector;
-import org.eclipse.jst.javaee.jca.ConnectorDeploymentDescriptor;
-import org.eclipse.jst.javaee.jca.IConnectorResource;
-import org.eclipse.jst.javaee.jca.JcaFactory;
-
-public class Connector16ModelProvider extends JEE5ModelProvider {
-
- private static final String CONNECTOR16_CONTENT_TYPE = "org.eclipse.jst.jee.ee6connectorDD"; //$NON-NLS-1$
- public Connector16ModelProvider(IProject proj) {
- super();
- this.proj = proj;
- setDefaultResourcePath(new Path(J2EEConstants.RAR_DD_URI));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.model.IModelProvider#getModelObject(org.eclipse.core.runtime.IPath)
- */
- @Override
- public Object getModelObject(IPath modelPath) {
- IConnectorResource connectorRes = (IConnectorResource)getModelResource(modelPath);
- if (connectorRes != null && connectorRes.getRootObject() != null)
- return connectorRes.getConnector();
- return null;
- }
- @Override
- protected String getContentTypeDescriber() {
- return CONNECTOR16_CONTENT_TYPE;
- }
- @Override
- public void populateRoot(XMLResourceImpl res, String name) {
- ConnectorDeploymentDescriptor dd = JcaFactory.eINSTANCE.createConnectorDeploymentDescriptor();
- dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE_NS_URL); //$NON-NLS-1$
- dd.getXMLNSPrefixMap().put("xsi", J2EEConstants.XSI_NS_URL); //$NON-NLS-1$
-
- Connector connector = JcaFactory.eINSTANCE.createConnector();
- DisplayName dn = JavaeeFactory.eINSTANCE.createDisplayName();
- dn.setValue(name);
- connector.getDisplayNames().add(dn);
-
- String version = J2EEProjectUtilities.getJ2EEProjectVersion(proj);
- if(version != null && version.equals(J2EEVersionConstants.VERSION_1_6_TEXT)) {
- dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.CONNECTOR_SCHEMA_LOC_1_6);
- connector.setVersion(J2EEVersionConstants.VERSION_1_6_TEXT);
- }
- else
- {
- // default to 1.6 for now
- dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.CONNECTOR_SCHEMA_LOC_1_6);
- connector.setVersion(J2EEVersionConstants.VERSION_1_6_TEXT);
- }
- dd.setConnector(connector);
- res.getContents().add((EObject) dd);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProviderFactory.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProviderFactory.java
deleted file mode 100644
index 84f38cef8..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/Connector16ModelProviderFactory.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.jst.jee.model.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.IModelProviderFactory;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class Connector16ModelProviderFactory implements IModelProviderFactory {
-
- public IModelProvider create(IProject project) {
- return new Connector16ModelProvider(project);
- }
-
- public IModelProvider create(IVirtualComponent component) {
- return new Connector16ModelProvider(component.getProject());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java
deleted file mode 100644
index 46f938ba4..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProvider.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.jst.jee.model.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-import org.eclipse.jst.j2ee.application.WebModule;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.model.IEARModelProvider;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.javaee.application.Application;
-import org.eclipse.jst.javaee.application.ApplicationDeploymentDescriptor;
-import org.eclipse.jst.javaee.application.ApplicationFactory;
-import org.eclipse.jst.javaee.application.IApplicationResource;
-import org.eclipse.jst.javaee.application.Module;
-import org.eclipse.jst.javaee.core.DisplayName;
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class EAR5ModelProvider extends JEE5ModelProvider implements IEARModelProvider {
-
- private static final String EAR5_CONTENT_TYPE = "org.eclipse.jst.jee.ee5earDD"; //$NON-NLS-1$
- public EAR5ModelProvider(IProject proj) {
- super();
- this.proj = proj;
- setDefaultResourcePath(new Path(J2EEConstants.APPLICATION_DD_URI));
- }
- @Override
- protected String getContentTypeDescriber() {
- return EAR5_CONTENT_TYPE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.model.IModelProvider#getModelObject(org.eclipse.core.runtime.IPath)
- */
- @Override
- public Object getModelObject(IPath modelPath) {
- IApplicationResource earRes = (IApplicationResource)getModelResource(modelPath);
- if (earRes != null && earRes.getRootObject() != null)
- return earRes.getApplication();
- return null;
- }
-
- public String getModuleURI(IVirtualComponent moduleComp) {
- IVirtualComponent comp = ComponentCore.createComponent(proj);
- IVirtualReference [] refs = comp.getReferences();
- for(int i=0; i<refs.length; i++){
- if(refs[i].getDependencyType() == IVirtualReference.DEPENDENCY_TYPE_USES){
- if(refs[i].getReferencedComponent().equals(moduleComp)){
- return refs[i].getArchiveName();
- }
- }
- }
- return null;
- }
- /**
- * This method will return the context root in this application for the passed in web project.
- *
- * @param webProject
- * @return contextRoot String
- */
- public String getWebContextRoot(IProject webProject) {
- if (webProject == null || !JavaEEProjectUtilities.isDynamicWebProject(webProject))
- return null;
- IVirtualComponent webComp = ComponentCore.createComponent(webProject);
- String webModuleURI = getModuleURI(webComp);
- if (webModuleURI != null) {
- Module webModule = ((Application)getModelObject()).getModule(webModuleURI, null);
- if (webModule != null)
- return webModule.getWeb().getContextRoot();
- }
- return null;
- }
- @Override
- public void populateRoot(XMLResourceImpl res, String name) {
- ApplicationDeploymentDescriptor dd = ApplicationFactory.eINSTANCE.createApplicationDeploymentDescriptor();
- dd.getXMLNSPrefixMap().put("", J2EEConstants.JAVAEE_NS_URL); //$NON-NLS-1$
- dd.getXMLNSPrefixMap().put("xsi", J2EEConstants.XSI_NS_URL); //$NON-NLS-1$
-
- Application ear = ApplicationFactory.eINSTANCE.createApplication();
- DisplayName dn = JavaeeFactory.eINSTANCE.createDisplayName();
- dn.setValue(name);
- ear.getDisplayNames().add(dn);
-
- String version = J2EEProjectUtilities.getJ2EEProjectVersion(proj);
- if(version != null && version.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
- dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APPLICATION_SCHEMA_LOC_5);
- ear.setVersion(J2EEVersionConstants.VERSION_5_TEXT);
- }
- else {
- dd.getXSISchemaLocation().put(J2EEConstants.JAVAEE_NS_URL, J2EEConstants.APPLICATION_SCHEMA_LOC_6);
- ear.setVersion(J2EEVersionConstants.VERSION_6_TEXT);
- }
-
- dd.setApplication(ear);
- res.getContents().add((EObject) dd);
- }
-
- /**
- * This method will set the context root on the application for the passed in contextRoot.
- *
- * @param webProject
- * @param aContextRoot
- */
- public void setWebContextRoot(IProject webProject, String aContextRoot) {
- if (webProject == null || !JavaEEProjectUtilities.isDynamicWebProject(webProject))
- return;
- IVirtualComponent webComp = ComponentCore.createComponent(webProject);
- String webModuleURI = getModuleURI(webComp);
- if (webModuleURI != null) {
- WebModule webModule = (WebModule) ((Application)getModelObject()).getModule(webModuleURI, null);
- if (webModule != null)
- webModule.setContextRoot(aContextRoot);
- // TODO - should this method save? Or should the caller be required to save?
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProviderFactory.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProviderFactory.java
deleted file mode 100644
index c36483017..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/EAR5ModelProviderFactory.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.jst.jee.model.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.IModelProviderFactory;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class EAR5ModelProviderFactory implements IModelProviderFactory {
-
- public IModelProvider create(IProject project) {
- return new EAR5ModelProvider(project);
- }
-
- public IModelProvider create(IVirtualComponent component) {
- return new EAR5ModelProvider(component.getProject());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/JEE5ModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/JEE5ModelProvider.java
deleted file mode 100644
index 199fd7d45..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/model/internal/JEE5ModelProvider.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- *******************************************************************************/
-package org.eclipse.jst.jee.model.internal;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-import org.eclipse.jem.util.emf.workbench.FlexibleProjectResourceSet;
-import org.eclipse.jem.util.emf.workbench.ProjectResourceSet;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jst.j2ee.componentcore.EnterpriseArtifactEdit;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.IModelProviderEvent;
-import org.eclipse.jst.j2ee.model.IModelProviderListener;
-import org.eclipse.jst.j2ee.model.ModelProviderEvent;
-import org.eclipse.jst.javaee.core.internal.util.JavaeeResourceImpl;
-import org.eclipse.jst.jee.JEEPlugin;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
-import org.eclipse.wst.common.componentcore.internal.impl.PlatformURLModuleConnection;
-import org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorImpl;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter;
-
-public class JEE5ModelProvider implements IModelProvider, ResourceStateInputProvider, ResourceStateValidator, IModelProviderListener{
-
- protected XMLResourceImpl writableResource;
- protected IProject proj;
- protected IPath defaultResourcePath;
- protected ResourceStateValidator stateValidator;
- protected ResourceAdapter resourceAdapter = new ResourceAdapter();
- protected final ListenerList listeners = new ListenerList();
- //private static boolean resourceChangeListenerEnabled = false;
-
- private List modelResources = new ArrayList();
- protected class ResourceAdapter extends AdapterImpl {
- @Override
- public void notifyChanged(Notification notification) {
- if (notification.getEventType() == Notification.SET
- && notification.getFeatureID(null) == Resource.RESOURCE__IS_LOADED) {
- resourceIsLoadedChanged((Resource) notification.getNotifier(), notification.getOldBooleanValue(), notification.getNewBooleanValue());
- } else if (notification.getFeatureID(null) == Resource.RESOURCE__IS_MODIFIED)
- resourceChanged((Resource) notification.getNotifier());
- }
- @Override
- public boolean equals(Object arg0) {
-
- return this.getClass().equals(arg0.getClass());
- }
-
- @Override
- public int hashCode() {
-
- return getClass().hashCode();
- }
- }
-
- public JEE5ModelProvider() {
- super();
- }
-
- protected ProjectResourceSet getResourceSet(IProject proj2) {
- return (ProjectResourceSet)WorkbenchResourceHelperBase.getResourceSet(proj);
- }
-
- public XMLResourceImpl getWritableResource() {
- return writableResource;
- }
-
- public void setWritableResource(XMLResourceImpl writableResource) {
- this.writableResource = writableResource;
- }
-
- protected void resourceChanged(Resource aResource) {
- if (hasListeners()) {
- int eventCode = ModelProviderEvent.KNOWN_RESOURCES_CHANGED;
- ModelProviderEvent evt = new ModelProviderEvent(eventCode, this, proj);
- evt.addResource(aResource);
- notifyListeners(evt);
- }
- }
-
- protected void resourceIsLoadedChanged(Resource aResource, boolean oldValue, boolean newValue) {
- if (hasListeners()) {
- int eventCode = newValue ? ModelProviderEvent.LOADED_RESOURCE : ModelProviderEvent.UNLOADED_RESOURCE;
- ModelProviderEvent evt = new ModelProviderEvent(eventCode, this, proj);
- evt.addResource(aResource);
- notifyListeners(evt);
- }
- }
- private void addManagedResource(XMLResourceImpl res) {
- modelResources.add(res);
- if (!res.eAdapters().contains(resourceAdapter))
- res.eAdapters().add(resourceAdapter);
- }
- /**
- * Returns true if there are any listeners
- */
- public boolean hasListeners() {
- return !listeners.isEmpty();
- }
-
- private URI getModuleURI(URI uri) {
- URI moduleuri = ModuleURIUtil.fullyQualifyURI(proj,getContentTypeDescriber());
- IPath requestPath = new Path(moduleuri.path()).append(new Path(uri.path()));
- URI resourceURI = URI.createURI(PlatformURLModuleConnection.MODULE_PROTOCOL + requestPath.toString());
- return resourceURI;
- }
-
- protected XMLResourceImpl getModelResource(final IPath modelPath) {
- if(proj == null || !proj.isAccessible()){
- throw new IllegalStateException("The project <" + proj + "> is not accessible."); //$NON-NLS-1$//$NON-NLS-2$
- }
- if (writableResource != null) {
- addManagedResource(writableResource);
- return writableResource;
- }
- IPath innerModelPath = modelPath;
- if ((innerModelPath == null) || innerModelPath.equals(IModelProvider.FORCESAVE))
- innerModelPath = getDefaultResourcePath();
- ProjectResourceSet resSet = getResourceSet(proj);
- IVirtualFolder container = ComponentCore.createComponent(proj).getRootFolder();
- String modelPathURI = innerModelPath.toString();
- URI uri = URI.createURI(modelPathURI);
-
- IPath projURIPath = new Path("");//$NON-NLS-1$
- projURIPath = projURIPath.append(container.getProjectRelativePath());
- projURIPath = projURIPath.addTrailingSeparator();
- projURIPath = projURIPath.append(innerModelPath);
- URI projURI = URI.createURI(projURIPath.toString());
- XMLResourceImpl res = null;
- try {
- if (proj.getFile(projURI.toString()).exists())
- {
- res = (XMLResourceImpl) resSet.getResource(getModuleURI(uri),true);
- addManagedResource(res);
- } else {//First find in resource set, then create if not found new Empty Resource.
- XMLResourceImpl newRes = createModelResource(innerModelPath, resSet, projURI);
- addManagedResource(newRes);
- return newRes;
- }
- } catch (WrappedException ex) {
- if (ex.getCause() instanceof FileNotFoundException)
- return null;
- throw ex;
- }
- return res;
- }
-
-
- protected XMLResourceImpl createModelResource(IPath modelPath, ProjectResourceSet resourceSet, URI uri) {
- // First try to find existing cached resource.
- XMLResourceImpl res = (XMLResourceImpl)resourceSet.getResource(getModuleURI(uri), false);
- if (res == null || !res.isLoaded()) {
- // Create temp resource if no file exists
- res= (XMLResourceImpl)((FlexibleProjectResourceSet)resourceSet).createResource(getModuleURI(uri),WTPResourceFactoryRegistry.INSTANCE.getFactory(uri, getContentType(getContentTypeDescriber())));
- populateRoot(res, resourceSet.getProject().getName());
- }
- return res;
- }
-
- public void populateRoot(XMLResourceImpl res, String string) {
- }
-
- private IContentDescription getContentType(String contentTypeDescriber) {
- if (contentTypeDescriber != null)
- return Platform.getContentTypeManager().getContentType(contentTypeDescriber).getDefaultDescription();
- return null;
- }
-
- public IPath getDefaultResourcePath() {
- return defaultResourcePath;
- }
-
- public void setDefaultResourcePath(IPath defaultResourcePath) {
- this.defaultResourcePath = defaultResourcePath;
- }
-
- public Object getModelObject() {
- return getModelObject(getDefaultResourcePath());
- }
-
- public Object getModelObject(IPath modelPath) {
- return null;
- }
-
- /**
- * Used to optionally define an associated content type for XML file creation
- * @return
- */
- protected String getContentTypeDescriber() {
-
- return null;
- }
-
-
-
- public IStatus validateEdit(final IPath modelPath, final Object context) {
- IPath innaerModelPath = modelPath;
- Object innerContext = context;
- if (innaerModelPath == null)
- innaerModelPath = getDefaultResourcePath();
- IWorkspace work = ResourcesPlugin.getWorkspace();
- IFile file = WorkbenchResourceHelper.getFile(getModelResource(innaerModelPath));
- if (file != null && file.exists()) {
- IFile[] files = { file };
- if (innerContext == null)
- innerContext = IWorkspace.VALIDATE_PROMPT;
- return work.validateEdit(files, innerContext);
- }
- return Status.OK_STATUS;
- }
-
- public void modify(Runnable runnable, IPath modelPath) {
- //About to modify and save this model
- try {
- JavaeeResourceImpl res = (JavaeeResourceImpl)getModelResource(modelPath);
- if (res != null)
- setWritableResource(res);
- runnable.run();
- try {
- if (res != null) {
- if (modelPath != null && modelPath.equals(IModelProvider.FORCESAVE))
- res.save(Collections.EMPTY_MAP,true);
- else
- res.save(Collections.EMPTY_MAP);
- }
- } catch (IOException e) {
- JEEPlugin.logError(e);
- }
- } catch (Exception ex) {
- JEEPlugin.logError(ex);
- } finally {
- setWritableResource(null);
- }
-
- }
-
-// private class ResourceChangeListener implements IResourceChangeListener {
-// public void resourceChanged(IResourceChangeEvent event) {
-// IResourceDelta delta= event.getDelta();
-// // make sure that there is a delta (since some events don't have one)
-// if (delta != null)
-// {
-// IResourceDelta[] affectedChildren= delta.getAffectedChildren(IResourceDelta.CHANGED | IResourceDelta.REMOVED , IResource.FILE);
-// IResourceDelta projectDelta = null;
-// IResource changedResource = null;
-// IProject changedProject = null;
-// IPath resourcePath = null;
-//
-// for (int i= 0; i < affectedChildren.length; i++) {
-// projectDelta = affectedChildren[i];
-// changedResource = projectDelta.getResource();
-// changedProject = changedResource.getProject();
-// HashSet<IPath> currentResources = modelResources.get(changedProject);
-// // only deal with the projects that have resources that have been loaded
-// if (currentResources != null)
-// {
-// // if this is a project deletion, remove the project from the HashMap.
-// if (changedResource == changedProject && projectDelta.getKind() == IResourceDelta.REMOVED)
-// {
-// modelResources.remove(changedProject);
-// // if modelResources is empty, we should self-destruct
-// if (modelResources.isEmpty())
-// {
-// resourceChangeListenerEnabled = false;
-// ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
-// }
-// }
-// else
-// {
-// Iterator<IPath> iter = currentResources.iterator();
-// ArrayList<IPath> toUnload = new ArrayList<IPath>();
-// // check each resource that was loaded from the project to see if it is part of the change
-// while (iter.hasNext())
-// {
-// resourcePath = iter.next();
-// if (projectDelta.findMember(resourcePath) != null)
-// {
-// // limit the list of resources that need to be unloaded to those that have changed
-// toUnload.add(resourcePath);
-// }
-// }
-// if (toUnload.size() > 0)
-// {
-// Resource current = null;
-// ProjectResourceSet resourceSet = getResourceSet(changedProject);
-// URIConverter uriConverter = resourceSet.getURIConverter();
-// HashSet<URI> resourceURIs = new HashSet<URI>();
-// iter = toUnload.iterator();
-// while (iter.hasNext())
-// {
-// // convert all of the resources to URIs - this is a faster match during the compare
-// resourceURIs.add(uriConverter.normalize(URI.createURI(iter.next().toString())));
-// }
-// Iterator<Resource> iter2 = resourceSet.getResources().iterator();
-// while (iter2.hasNext())
-// {
-// current = iter2.next();
-// if (resourceURIs.contains(current.getURI()))
-// {
-// current.unload();
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-
- public void addListener(IModelProviderListener listener) {
-
- listeners.add(listener);
- }
-
- public void removeListener(IModelProviderListener listener)
- {
- listeners.remove(listener);
- }
- /**
- * Save only resources that need to be saved (i.e., no other references).
- */
- public void modelsChanged(IModelProviderEvent anEvent) {
- int code = anEvent.getEventCode();
- switch (code) {
- case IModelProviderEvent.REMOVED_RESOURCE : {
- if (hasResourceReference(anEvent.getChangedResources()))
- removeResources(anEvent.getChangedResources());
- else
- return;
- break;
- }
- }
- if (hasListeners()) {
- anEvent.setModel(this);
- notifyListeners(anEvent);
- }
- }
- protected void removeResources(List aList) {
- Resource res;
- for (int i = 0; i < aList.size(); i++) {
- res = (Resource) aList.get(i);
- removeResource(res) ;
- }
- }
- /**
- * Remove reference to the aResource.
- */
- protected boolean removeResource(Resource aResource) {
- if (aResource != null) {
- aResource.eAdapters().remove(resourceAdapter);
- return getResources().remove(aResource);
- }
- return false;
- }
-
- /**
- * Return true if any Resource in the list of
- *
- * @resources is referenced by me.
- */
- protected boolean hasResourceReference(List tResources) {
- for (int i = 0; i < tResources.size(); i++) {
- if (hasResourceReference((Resource) tResources.get(i)))
- return true;
- }
- return false;
- }
- /**
- * Return true if aResource is referenced by me.
- */
- protected boolean hasResourceReference(Resource aResource) {
- if (aResource != null)
- return getResources().contains(aResource);
- return false;
- }
-
- /**
- * Notify listeners of
- *
- * @anEvent.
- */
- protected void notifyListeners(IModelProviderEvent anEvent) {
-
- NotifyRunner notifier = new NotifyRunner(anEvent);
-
- Object[] notifyList = listeners.getListeners();
- for (int i = 0; i < notifyList.length; i++) {
- notifier.setListener( (IModelProviderListener) notifyList[i] );
- SafeRunner.run(notifier);
- }
- }
- public class NotifyRunner implements ISafeRunnable {
-
- private final IModelProviderEvent event;
- private IModelProviderListener listener;
-
- public NotifyRunner(IModelProviderEvent event) {
- Assert.isNotNull(event);
- this.event = event;
- }
-
-
- public void setListener(IModelProviderListener listener) {
- this.listener = listener;
- }
-
- public void handleException(Throwable exception) {
- JEEPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, JEEPlugin.PLUGIN_ID, 0, exception.getMessage(), exception));
-
- }
-
- public void run() throws Exception {
- if(listener != null)
- listener.modelsChanged(event);
- }
-
- }
- public ResourceStateValidator getStateValidator() {
- if (stateValidator == null)
- stateValidator = createStateValidator();
- return stateValidator;
- }
-
- /**
- * Method createStateValidator.
- *
- * @return ResourceStateValidator
- */
- private ResourceStateValidator createStateValidator() {
- return new ResourceStateValidatorImpl(this);
- }
-
- protected EnterpriseArtifactEdit createArtifactEdit() {
- return null;
- }
-
- public void checkActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
- getStateValidator().checkActivation(presenter);
-
- }
-
- public boolean checkReadOnly() {
- return getStateValidator().checkReadOnly();
- }
-
- public boolean checkSave(ResourceStateValidatorPresenter presenter) throws CoreException {
- return getStateValidator().checkSave(presenter);
- }
-
- public void lostActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
- getStateValidator().lostActivation(presenter);
-
- }
-
- public IStatus validateState(ResourceStateValidatorPresenter presenter) throws CoreException {
- if (presenter == null)
- return Status.OK_STATUS;
- return getStateValidator().validateState(presenter);
- }
-
- public void cacheNonResourceValidateState(List roNonResourceFiles) {
- // do nothing
- }
-
- public List getNonResourceFiles() {
- return null;
- }
-
- public List getNonResourceInconsistentFiles() {
- return null;
- }
-
- public List getResources() {
- return modelResources;
- }
-
-
- public boolean isDirty() {
-
- List list = getResources();
- for (int i = 0; i < list.size(); i++) {
- if (((Resource) list.get(i)).isModified())
- return true;
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesDataModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesDataModelProvider.java
deleted file mode 100644
index c398d896a..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesDataModelProvider.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class AppClientCreateDeploymentFilesDataModelProvider extends
- CreateDeploymentFilesDataModelProvider implements
- IWebCreateDeploymentFilesDataModelProperties {
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new AppClientCreateDeploymentFilesOperation(model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesOperation.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesOperation.java
deleted file mode 100644
index 373d4adcd..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/AppClientCreateDeploymentFilesOperation.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AppClientCreateDeploymentFilesOperation extends
- CreateDeploymentFilesDataModelOperation {
-
-
- public AppClientCreateDeploymentFilesOperation(IDataModel model) {
- super(model);
- }
-
- @Override
- protected void createDeploymentFiles(IProject project, IProgressMonitor monitor) {
- final IModelProvider provider = ModelProviderManager.getModelProvider(project);
- provider.modify(new Runnable(){
- public void run() {
- }
- }, IModelProvider.FORCESAVE);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesDataModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesDataModelProvider.java
deleted file mode 100644
index b1e68e1c0..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesDataModelProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class ConnectorCreateDeploymentFilesDataModelProvider extends
- CreateDeploymentFilesDataModelProvider {
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new ConnectorCreateDeploymentFilesFilesOperation(model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesFilesOperation.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesFilesOperation.java
deleted file mode 100644
index 9745d05d2..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ConnectorCreateDeploymentFilesFilesOperation.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class ConnectorCreateDeploymentFilesFilesOperation extends
- CreateDeploymentFilesDataModelOperation {
-
-
- public ConnectorCreateDeploymentFilesFilesOperation(IDataModel model) {
- super(model);
- }
-
- @Override
- protected void createDeploymentFiles(IProject project, IProgressMonitor monitor) {
- final IModelProvider provider = ModelProviderManager.getModelProvider(project);
- provider.modify(new Runnable(){
- public void run() {
- }
- }, IModelProvider.FORCESAVE);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelOperation.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelOperation.java
deleted file mode 100644
index 60e2b17b5..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelOperation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class CreateDeploymentFilesDataModelOperation extends
- AbstractDataModelOperation {
-
- public CreateDeploymentFilesDataModelOperation(IDataModel model) {
- super(model);
- }
-
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- IProject targetProject = (IProject) model.getProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT);
- createDeploymentFiles(targetProject, monitor);
- return OK_STATUS;
- }
-
- protected void createDeploymentFiles(IProject project, IProgressMonitor monitor) {
- // do nothing
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelProvider.java
deleted file mode 100644
index 225deaa82..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/CreateDeploymentFilesDataModelProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import java.util.Set;
-
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class CreateDeploymentFilesDataModelProvider extends
- AbstractDataModelProvider implements ICreateDeploymentFilesDataModelProperties {
-
- @Override
- public Object getDefaultProperty(String propertyName) {
- if(ICreateDeploymentFilesDataModelProperties.GENERATE_DD.equals(propertyName)){
- return true;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- @Override
- public Set getPropertyNames() {
- Set propertyNames = super.getPropertyNames();
- propertyNames.add(GENERATE_DD);
- propertyNames.add(TARGET_PROJECT);
- return propertyNames;
- }
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new CreateDeploymentFilesDataModelOperation(model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesDataModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesDataModelProvider.java
deleted file mode 100644
index 9c7e8f788..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesDataModelProvider.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class EJBCreateDeploymentFilesDataModelProvider extends
- CreateDeploymentFilesDataModelProvider implements
- IEJBCreateDeploymentFilesDataModelProperties {
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new EJBCreateDeploymentFilesOperation(model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesOperation.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesOperation.java
deleted file mode 100644
index bc8e1c22f..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EJBCreateDeploymentFilesOperation.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EJBCreateDeploymentFilesOperation extends
- CreateDeploymentFilesDataModelOperation {
-
-
- public EJBCreateDeploymentFilesOperation(IDataModel model) {
- super(model);
- }
-
- @Override
- protected void createDeploymentFiles(IProject project, IProgressMonitor monitor) {
- final IModelProvider provider = ModelProviderManager.getModelProvider(project);
- provider.modify(new Runnable(){
- public void run() {
- }
- }, IModelProvider.FORCESAVE);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesDataModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesDataModelProvider.java
deleted file mode 100644
index 9ec86833c..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesDataModelProvider.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class EarCreateDeploymentFilesDataModelProvider extends
- CreateDeploymentFilesDataModelProvider implements
- IEarCreateDeploymentFilesDataModelProperties {
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new EarCreateDeploymentFilesOperation(model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesOperation.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesOperation.java
deleted file mode 100644
index 772d4e1a7..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/EarCreateDeploymentFilesOperation.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.jee.JEEPlugin;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EarCreateDeploymentFilesOperation extends
- CreateDeploymentFilesDataModelOperation {
-
-
- public EarCreateDeploymentFilesOperation(IDataModel model) {
- super(model);
- }
-
- @Override
- protected void createDeploymentFiles(IProject project, final IProgressMonitor monitor) {
- final IVirtualComponent component = ComponentCore.createComponent(project);
- final IModelProvider provider = ModelProviderManager.getModelProvider(project);
- provider.modify(new Runnable(){
- public void run() {
- IVirtualReference[] componentReferences = J2EEProjectUtilities.getJ2EEModuleReferences(component);
- if(componentReferences != null && componentReferences.length > 0){
- final IDataModel dataModel = DataModelFactory.createDataModel(new AddComponentToEnterpriseApplicationDataModelProvider());
- dataModel.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, component);
- List modList = (List) dataModel.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- Map<IVirtualComponent, String> uriMap = new HashMap<IVirtualComponent, String>();
- for(int i = 0; i < componentReferences.length; i++) {
- IVirtualComponent referencedComponent = componentReferences[i].getReferencedComponent();
- modList.add(referencedComponent);
- uriMap.put(referencedComponent, componentReferences[i].getArchiveName());
- }
- dataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, uriMap);
- dataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, modList);
- try {
- dataModel.getDefaultOperation().execute(monitor, null);
- } catch (ExecutionException e) {
- JEEPlugin.logError(e);
- }
- }
- }
- }, IModelProvider.FORCESAVE);
-
-
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IAppClientCreateDeploymentFilesDataModelProperties.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IAppClientCreateDeploymentFilesDataModelProperties.java
deleted file mode 100644
index 6ed3be670..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IAppClientCreateDeploymentFilesDataModelProperties.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-public interface IAppClientCreateDeploymentFilesDataModelProperties extends
- ICreateDeploymentFilesDataModelProperties {
- /**
- * This field should not be used. It is not part of the API and may be modified in the future.
- */
- public static Class _provider_class = AppClientCreateDeploymentFilesDataModelProvider.class;
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IConnectorCreateDeploymentFilesDataModelProperties.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IConnectorCreateDeploymentFilesDataModelProperties.java
deleted file mode 100644
index 0fae47727..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IConnectorCreateDeploymentFilesDataModelProperties.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-
-package org.eclipse.jst.jee.project.facet;
-
-public interface IConnectorCreateDeploymentFilesDataModelProperties {
- /**
- * This field should not be used. It is not part of the API and may be modified in the future.
- */
- public static Class _provider_class = ConnectorCreateDeploymentFilesDataModelProvider.class;
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ICreateDeploymentFilesDataModelProperties.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ICreateDeploymentFilesDataModelProperties.java
deleted file mode 100644
index dd3ab5ff4..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/ICreateDeploymentFilesDataModelProperties.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;
-
-public interface ICreateDeploymentFilesDataModelProperties extends
- IDataModelProperties {
-
- public static final String TARGET_PROJECT = "ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT"; //$NON-NLS-1$
- /**
- * boolean property for Java EE 5 projects, to create/not create a deployment descriptor,
- * The default value is false
- */
- public static final String GENERATE_DD = "ICreateDeploymentFilesDataModelProperties.GENERATE_DD"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEJBCreateDeploymentFilesDataModelProperties.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEJBCreateDeploymentFilesDataModelProperties.java
deleted file mode 100644
index 72d50e2fa..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEJBCreateDeploymentFilesDataModelProperties.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-public interface IEJBCreateDeploymentFilesDataModelProperties extends
- ICreateDeploymentFilesDataModelProperties {
- /**
- * This field should not be used. It is not part of the API and may be modified in the future.
- */
- public static Class _provider_class = EJBCreateDeploymentFilesDataModelProvider.class;
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEarCreateDeploymentFilesDataModelProperties.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEarCreateDeploymentFilesDataModelProperties.java
deleted file mode 100644
index 5f1d59b69..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IEarCreateDeploymentFilesDataModelProperties.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-public interface IEarCreateDeploymentFilesDataModelProperties extends
- ICreateDeploymentFilesDataModelProperties {
- /**
- * This field should not be used. It is not part of the API and may be modified in the future.
- */
- public static Class _provider_class = EarCreateDeploymentFilesDataModelProvider.class;
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IWebCreateDeploymentFilesDataModelProperties.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IWebCreateDeploymentFilesDataModelProperties.java
deleted file mode 100644
index 243337685..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/IWebCreateDeploymentFilesDataModelProperties.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-public interface IWebCreateDeploymentFilesDataModelProperties extends
- ICreateDeploymentFilesDataModelProperties {
- /**
- * This field should not be used. It is not part of the API and may be modified in the future.
- */
- public static Class _provider_class = WebCreateDeploymentFilesDataModelProvider.class;
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/JEEFacetInstallDelegate.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/JEEFacetInstallDelegate.java
deleted file mode 100644
index 54cc129a8..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/JEEFacetInstallDelegate.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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
- *******************************************************************************/
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDelegate;
-
-public abstract class JEEFacetInstallDelegate extends J2EEFacetInstallDelegate {
- // this class used to have methods but now due to refactoring/model support it does not.
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesDataModelProvider.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesDataModelProvider.java
deleted file mode 100644
index 15c93e4b9..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesDataModelProvider.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class WebCreateDeploymentFilesDataModelProvider extends
- CreateDeploymentFilesDataModelProvider implements
- IWebCreateDeploymentFilesDataModelProperties {
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new WebCreateDeploymentFilesOperation(model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesOperation.java b/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesOperation.java
deleted file mode 100644
index 08e6747ce..000000000
--- a/plugins/org.eclipse.jst.jee/jeecreation/org/eclipse/jst/jee/project/facet/WebCreateDeploymentFilesOperation.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.jst.jee.project.facet;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.javaee.web.WebApp;
-import org.eclipse.jst.javaee.web.WebFactory;
-import org.eclipse.jst.javaee.web.WelcomeFileList;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class WebCreateDeploymentFilesOperation extends
- CreateDeploymentFilesDataModelOperation {
-
-
- public WebCreateDeploymentFilesOperation(IDataModel model) {
- super(model);
- }
-
- @Override
- protected void createDeploymentFiles(IProject project, IProgressMonitor monitor) {
- final IModelProvider provider = ModelProviderManager.getModelProvider(project);
-
- provider.modify(new Runnable(){
- public void run() {
- WebApp webApp = (WebApp) provider.getModelObject();
-
- // welcome file list
- List<String> welcomeFiles = Arrays.asList(
- "index.html", //$NON-NLS-1$
- "index.htm", //$NON-NLS-1$
- "index.jsp", //$NON-NLS-1$
- "default.html", //$NON-NLS-1$
- "default.htm", //$NON-NLS-1$
- "default.jsp" //$NON-NLS-1$
- );
-
- // Add the welcome-file-list tag
- WelcomeFileList welcomeFileList = WebFactory.eINSTANCE.createWelcomeFileList();
- welcomeFileList.getWelcomeFiles().addAll(welcomeFiles);
- webApp.getWelcomeFileLists().add(welcomeFileList);
- }
- }, IModelProvider.FORCESAVE);
-
- }
-
-}

Back to the top