diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java')
-rw-r--r-- | plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java deleted file mode 100644 index f85cfa2bf..000000000 --- a/plugins/org.eclipse.jst.j2ee.jca/jca/org/eclipse/jst/j2ee/jca/project/facet/ConnectorFacetProjectCreationDataModelProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * 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 - *******************************************************************************/ -package org.eclipse.jst.j2ee.jca.project.facet; - -import org.eclipse.jst.common.project.facet.IJavaFacetInstallDataModelProperties; -import org.eclipse.jst.common.project.facet.JavaFacetInstallDataModelProvider; -import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities; -import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties; -import org.eclipse.jst.j2ee.project.facet.J2EEFacetProjectCreationDataModelProvider; -import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent; -import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory; -import org.eclipse.wst.common.frameworks.datamodel.IDataModel; -import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener; - -public class ConnectorFacetProjectCreationDataModelProvider extends J2EEFacetProjectCreationDataModelProvider { - - public ConnectorFacetProjectCreationDataModelProvider() { - super(); - } - - public void init() { - super.init(); - FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP); - IDataModel javaFacet = DataModelFactory.createDataModel(new JavaFacetInstallDataModelProvider()); - map.add(javaFacet); - IDataModel jcaFacet = DataModelFactory.createDataModel(new ConnectorFacetInstallDataModelProvider()); - map.add(jcaFacet); - javaFacet.setProperty(IJavaFacetInstallDataModelProperties.SOURCE_FOLDER_NAME,jcaFacet.getStringProperty(IConnectorFacetInstallDataModelProperties.CONFIG_FOLDER)); - jcaFacet.addListener(new IDataModelListener() { - public void propertyChanged(DataModelEvent event) { - if (IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME.equals(event.getPropertyName())) { - if (isPropertySet(EAR_PROJECT_NAME)) - setProperty(EAR_PROJECT_NAME, (String)event.getProperty()); - else - model.notifyPropertyChange(EAR_PROJECT_NAME, IDataModel.DEFAULT_CHG); - }else if (IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR.equals(event.getPropertyName())) { - setProperty(ADD_TO_EAR, event.getProperty()); - } - } - }); - } - - public boolean propertySet(String propertyName, Object propertyValue) { - if( propertyName.equals( MODULE_URI )){ - FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP); - IDataModel rarFacet = map.getFacetDataModel( J2EEProjectUtilities.JCA ); - rarFacet.setProperty( IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI, propertyValue ); - } - return super.propertySet(propertyName, propertyValue); - } -} |