diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal')
7 files changed, 0 insertions, 740 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/AbstractJNDIBindingsHelper.java b/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/AbstractJNDIBindingsHelper.java deleted file mode 100644 index 8d3de51a4..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/AbstractJNDIBindingsHelper.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005,2006 IBM Corporation - * Licensed Material - Property of IBM. All rights reserved. - * US Government Users Restricted Rights - Use, duplication or disclosure v1.0 - * restricted by GSA ADP Schedule Contract with IBM Corp. - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.core.internal.bindings; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EJBJar; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.webapplication.WebApp; - -/** - * Default implementation of {@link IJNDIBindingsHelper}. Clients should extend this class for their - * implementations. - * - */ -public class AbstractJNDIBindingsHelper implements IJNDIBindingsHelper { - - /** - * Default implementation returns <code>false</code>. - */ - public boolean appliesFor(IProject project) { - return false; - } - - /** - * Default implementation returns <code>false</code>. - */ - public boolean appliesFor(Archive archive) { - return false; - } - - /** - * Default implementation returns <code>object.toString()</code>. - */ - public String getJNDIName(Object object) { - return object.toString(); - } - - /** - * Default implementation returns <code>bean.getName()</code>. - */ - public String getJNDIName(EnterpriseBean bean) { - return bean.getName(); - } - - /** - * Default implementation returns <code>resourceRef.getName()</code>. - */ - public String getJNDINameForRef(EnterpriseBean bean, ResourceRef resourceRef) { - return resourceRef.getName(); - } - - /** - * Default implementation returns <code>resourceEnvRef.getName()</code>. - */ - public String getJNDINameForRef(EnterpriseBean bean, ResourceEnvRef resourceEnvRef) { - return resourceEnvRef.getName(); - } - - /** - * Default implementation returns <code>securityRoleRef.getName()</code>. - */ - public String getJNDINameForRef(EnterpriseBean bean, SecurityRoleRef securityRoleRef) { - return securityRoleRef.getName(); - } - - /** - * Default implementation returns <code>resourceRef.getName()</code>. - */ - public String getJNDINameForRef(WebApp webApp, ResourceRef resourceRef) { - return resourceRef.getName(); - } - - /** - * Default implementation returns <code>resourceEnvRef.getName()</code>. - */ - public String getJNDINameForRef(WebApp webApp, ResourceEnvRef resourceEnvRef) { - return resourceEnvRef.getName(); - } - - /** - * Default implementation returns <code>((EJBJar) bean.eContainer()).getDisplayName()</code>. - */ - public String getJNDINameForDefaultDataSource(ContainerManagedEntity bean) { - return ((EJBJar) bean.eContainer()).getDisplayName(); - } - -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/IJNDIBindingsHelper.java b/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/IJNDIBindingsHelper.java deleted file mode 100644 index fa6a51264..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/IJNDIBindingsHelper.java +++ /dev/null @@ -1,117 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005,2006 IBM Corporation - * Licensed Material - Property of IBM. All rights reserved. - * US Government Users Restricted Rights - Use, duplication or disclosure v1.0 - * restricted by GSA ADP Schedule Contract with IBM Corp. - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.core.internal.bindings; - -import org.eclipse.core.resources.IProject; -import org.eclipse.jst.j2ee.common.ResourceEnvRef; -import org.eclipse.jst.j2ee.common.ResourceRef; -import org.eclipse.jst.j2ee.common.SecurityRoleRef; -import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; -import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity; -import org.eclipse.jst.j2ee.ejb.EnterpriseBean; -import org.eclipse.jst.j2ee.webapplication.WebApp; - -/** - * This is used to load jndi bindings from various J2EE artifacts. Clients should acquire - * IBindingsHelper from the {@link JNDIBindingsHelperManager}. - */ -public interface IJNDIBindingsHelper { - - /** - * Clients should not call this method. This method is used by the - * {@link JNDIBindingsHelperManager}. - * - * @param project - * @return true if this {@link IJNDIBindingsHelper} can be used to load bindings for specified - * project. - */ - public boolean appliesFor(IProject project); - - /** - * Clients should not call this method. This method is used by the - * {@link JNDIBindingsHelperManager}. - * - * @param project - * @return true if this {@link IJNDIBindingsHelper} can be used to load bindings for specified - * archive. - */ - public boolean appliesFor(Archive archive); - - /** - * Returns the specified bean's JNDI name. - * - * @param bean - * @return the specified bean's JNDI name. - */ - public String getJNDIName(EnterpriseBean bean); - - /** - * Returns the JNDI name for the specified CMP's default datasource. - * - * @param bean - * @return the JNDI name for the specified CMP's default datasource. - */ - public String getJNDINameForDefaultDataSource(ContainerManagedEntity bean); - - /** - * Returns the specified bean's resource reference's JNDI name. - * - * @param bean - * @param resourceRef - * @return the specified bean's resource reference's JNDI name. - */ - public String getJNDINameForRef(EnterpriseBean bean, ResourceRef resourceRef); - - /** - * Returns the specified bean's resource environment reference's JNDI name. - * - * @param bean - * @param resourceEnvRef - * @return the specified bean's resource environment reference's JNDI name. - */ - public String getJNDINameForRef(EnterpriseBean bean, ResourceEnvRef resourceEnvRef); - - /** - * Returns the specified bean's security role referenc's JNDI name. - * - * @param bean - * @param securityRoleRef - * @return the specified bean's security role referenc's JNDI name. - */ - public String getJNDINameForRef(EnterpriseBean bean, SecurityRoleRef securityRoleRef); - - /** - * Reuturns the specified web application's resource reference's JNDI name. - * - * @param webApp - * @param resourceRef - * @return the specified web application's resource reference's JNDI name. - */ - public String getJNDINameForRef(WebApp webApp, ResourceRef resourceRef); - - /** - * Returns the specified web application's resource environment reference's JNDI name. - * - * @param webApp - * @param resourceEnvRef - * @return the specified web application's resource environment reference's JNDI name. - */ - public String getJNDINameForRef(WebApp webApp, ResourceEnvRef resourceEnvRef); - - /** - * Returns the specified Object's JNDI name. This method should only be used if none of the - * others apply, as it will likely be inefficient due to instanceof checks. - * - * @param obj - * @return the specified Object's JNDI name. - */ - public String getJNDIName(Object obj); - -} diff --git a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/JNDIBindingsHelperManager.java b/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/JNDIBindingsHelperManager.java deleted file mode 100644 index 7a8538797..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/bindings/JNDIBindingsHelperManager.java +++ /dev/null @@ -1,150 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005,2006 IBM Corporation - * Licensed Material - Property of IBM. All rights reserved. - * US Government Users Restricted Rights - Use, duplication or disclosure v1.0 - * restricted by GSA ADP Schedule Contract with IBM Corp. - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.j2ee.core.internal.bindings; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.jem.util.RegistryReader; -import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive; -import org.eclipse.jst.j2ee.core.internal.plugin.J2EECorePlugin; - -/** - * This class is not intended to be subclasses - * - */ -public class JNDIBindingsHelperManager { - - private List allHelpers; - private IJNDIBindingsHelper defaultHelper; - private static final int TYPE_PROJECT = 0; - private static final int TYPE_ARCHIVE = 1; - - private static JNDIBindingsHelperManager instance = null; - - /** - * Returns the singleton instance. - * - * @return the singleton instance. - */ - public static JNDIBindingsHelperManager getInstance() { - if (instance == null) { - instance = new JNDIBindingsHelperManager(); - } - return instance; - } - - /** - * Returns an array of bindings helpers applicable for the specified project. If no registered - * bindings helpers apply, the returned array will contain a default bindings helper. - * - * @param project - * @return - */ - public IJNDIBindingsHelper[] getBindingsHelpers(IProject project) { - return getBindingsHelpers(TYPE_PROJECT, project); - } - - /** - * Returns an array of bindings helpers applicable for the specified archive. If no registered - * bindings helpers apply, the returned array will contain a default bindings helper. - * - * @param project - * @return - */ - public IJNDIBindingsHelper[] getBindingsHelpers(Archive archive) { - return getBindingsHelpers(TYPE_ARCHIVE, archive); - } - - private IJNDIBindingsHelper[] getBindingsHelpers(int type, Object obj) { - List helpers = getHelpers(); - List appliesHelpers = new ArrayList(); - IJNDIBindingsHelper helper = null; - for (int i = 0; i < helpers.size(); i++) { - helper = (IJNDIBindingsHelper) helpers.get(i); - if ((TYPE_PROJECT == type && helper.appliesFor((IProject) obj)) || (TYPE_ARCHIVE == type && helper.appliesFor((Archive) obj))) { - appliesHelpers.add(helper); - } - } - if (appliesHelpers.size() == 0) { - appliesHelpers.add(getDefaultHelper()); - } - - IJNDIBindingsHelper[] helpersArray = new IJNDIBindingsHelper[appliesHelpers.size()]; - for (int i = 0; i < helpersArray.length; i++) { - helpersArray[i] = (IJNDIBindingsHelper) appliesHelpers.get(i); - } - - return helpersArray; - } - - private IJNDIBindingsHelper getDefaultHelper() { - if (null == defaultHelper) { - defaultHelper = new AbstractJNDIBindingsHelper() { - public boolean appliesFor(IProject project) { - return true; - } - - public boolean appliesFor(Archive archive) { - return true; - } - }; - } - return defaultHelper; - } - - private List getHelpers() { - if (null == allHelpers) { - BindingsHelperRegistry registry = new BindingsHelperRegistry(); - registry.readRegistry(); - allHelpers = registry.getHelpers(); - } - return allHelpers; - } - - - protected String TAG_J2EE_BINDINGS_HELPER = "jndiBindingsHelpers"; //$NON-NLS-1$ - - private class BindingsHelperRegistry extends RegistryReader { - - private String ATT_CLASS = "class"; //$NON-NLS-1$ - private String TAG_BINDINGS_HELPER = "jndiBindingsHelper"; //$NON-NLS-1$ - - private List helpers = new ArrayList(); - - private BindingsHelperRegistry() { - super(J2EECorePlugin.PLUGIN_ID, TAG_J2EE_BINDINGS_HELPER); - } - - public boolean readElement(IConfigurationElement element) { - if (TAG_BINDINGS_HELPER.equals(element.getName())) { - try { - addHelper((IJNDIBindingsHelper) element.createExecutableExtension(ATT_CLASS)); - } catch (CoreException e) { - e.printStackTrace(); - return false; - } - return true; - } - return false; - } - - public List getHelpers() { - return helpers; - } - - private void addHelper(IJNDIBindingsHelper helper) { - helpers.add(helper); - } - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/Assert.java b/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/Assert.java deleted file mode 100644 index a797956b3..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/Assert.java +++ /dev/null @@ -1,110 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 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 - *******************************************************************************/ -package org.eclipse.jst.j2ee.core.internal.plugin; - -/** - * <code>Assert</code> is useful for for embedding runtime sanity checks - * in code. - * The predicate methods all test a condition and throw some - * type of unchecked exception if the condition does not hold. - * <p> - * Assertion failure exceptions, like most runtime exceptions, are - * thrown when something is misbehaving. Assertion failures are invariably - * unspecified behavior; consequently, clients should never rely on - * these being thrown (and certainly should not being catching them - * specifically). - * </p> - */ -public final class Assert { - /* This class is not intended to be instantiated. */ - private Assert() { - // not allowed - } - - /** Asserts that an argument is legal. If the given boolean is - * not <code>true</code>, an <code>IllegalArgumentException</code> - * is thrown. - * - * @param expression the outcode of the check - * @return <code>true</code> if the check passes (does not return - * if the check fails) - * @exception IllegalArgumentException if the legality test failed - */ - public static boolean isLegal(boolean expression) { - return isLegal(expression, ""); //$NON-NLS-1$ - } - - /** Asserts that an argument is legal. If the given boolean is - * not <code>true</code>, an <code>IllegalArgumentException</code> - * is thrown. - * The given message is included in that exception, to aid debugging. - * - * @param expression the outcode of the check - * @param message the message to include in the exception - * @return <code>true</code> if the check passes (does not return - * if the check fails) - * @exception IllegalArgumentException if the legality test failed - */ - public static boolean isLegal(boolean expression, String message) { - if (!expression) - throw new IllegalArgumentException(message); - return expression; - } - - /** Asserts that the given object is not <code>null</code>. If this - * is not the case, some kind of unchecked exception is thrown. - * - * @param object the value to test - * @exception IllegalArgumentException if the object is <code>null</code> - */ - public static void isNotNull(Object object) { - isNotNull(object, ""); //$NON-NLS-1$ - } - - /** Asserts that the given object is not <code>null</code>. If this - * is not the case, some kind of unchecked exception is thrown. - * The given message is included in that exception, to aid debugging. - * - * @param object the value to test - * @param message the message to include in the exception - * @exception IllegalArgumentException if the object is <code>null</code> - */ - public static void isNotNull(Object object, String message) { - if (object == null) - throw new AssertionFailedException("null argument:" + message); //$NON-NLS-1$ - } - - /** Asserts that the given boolean is <code>true</code>. If this - * is not the case, some kind of unchecked exception is thrown. - * - * @param expression the outcode of the check - * @return <code>true</code> if the check passes (does not return - * if the check fails) - */ - public static boolean isTrue(boolean expression) { - return isTrue(expression, ""); //$NON-NLS-1$ - } - - /** Asserts that the given boolean is <code>true</code>. If this - * is not the case, some kind of unchecked exception is thrown. - * The given message is included in that exception, to aid debugging. - * - * @param expression the outcode of the check - * @param message the message to include in the exception - * @return <code>true</code> if the check passes (does not return - * if the check fails) - */ - public static boolean isTrue(boolean expression, String message) { - if (!expression) - throw new AssertionFailedException("assertion failed: " + message); //$NON-NLS-1$ - return expression; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/AssertionFailedException.java b/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/AssertionFailedException.java deleted file mode 100644 index b349e1cc6..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/AssertionFailedException.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 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 - *******************************************************************************/ -package org.eclipse.jst.j2ee.core.internal.plugin; - -/** - * <code>AssertionFailedException</code> is a runtime exception thrown - * by some of the methods in <code>Assert</code>. - * <p> - * This class is not declared public to prevent some misuses; programs that catch - * or otherwise depend on assertion failures are susceptible to unexpected - * breakage when assertions in the code are added or removed. - * </p> - */ -/* package */ -class AssertionFailedException extends RuntimeException { - /** - * All serializable objects should have a stable serialVersionUID - */ - private static final long serialVersionUID = 1L; - - /** Constructs a new exception with the given message. - */ - public AssertionFailedException(String detail) { - super(detail); - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/EclipseEJBModelExtenderProvider.java b/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/EclipseEJBModelExtenderProvider.java deleted file mode 100644 index 764522d05..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/EclipseEJBModelExtenderProvider.java +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 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 Oct 29, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -package org.eclipse.jst.j2ee.core.internal.plugin; - -import java.util.SortedSet; -import java.util.TreeSet; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.jem.util.RegistryReader; -import org.eclipse.jem.util.logger.proxy.Logger; -import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; -import org.eclipse.jst.j2ee.internal.IEJBModelExtenderProvider; -import org.eclipse.wst.common.frameworks.internal.enablement.Identifiable; -import org.eclipse.wst.common.frameworks.internal.enablement.IdentifiableComparator; - -/** - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public class EclipseEJBModelExtenderProvider extends RegistryReader implements IEJBModelExtenderProvider { - - private SortedSet extensionHelpers; - - /* - * static final String EXTENSION_NAME = "e"; //$NON-NLS-1$ static final - * String ELEMENT_J2EEMODULE_EXTENSION = "j2eeModuleExtensionHelper"; - * //$NON-NLS-1$ static final String MODULE_EXTENSION_CLASS = - * "extensionClass"; //$NON-NLS-1$ - */ - - private static EclipseEJBModelExtenderProvider INSTANCE = null; - - public static class Descriptor implements Identifiable { - - public static final String EJB_MODEL_EXTENDER = "ejbModelExtender"; //$NON-NLS-1$ - - public static final String ATT_ID = "id"; //$NON-NLS-1$ - - public static final String ATT_EJB_EXTENSION_CLASS = "extensionClass"; //$NON-NLS-1$ - - private static int loadOrderCounter = 0; - - private final String id; - - private final int loadOrder; - - private IConfigurationElement element; - - private EjbModuleExtensionHelper instance; - - public Descriptor(IConfigurationElement element) { - Assert.isLegal(EJB_MODEL_EXTENDER.equals(element.getName()), - "Invalid IConfigurationElement used to create EclipseEJBModelExtenderProvider.Descriptor."); //$NON-NLS-1$ - this.element = element; - this.id = this.element.getAttribute(ATT_ID); - this.loadOrder = loadOrderCounter++; - } - - public String getID() { - return this.id; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.wst.common.frameworks.internal.enablement.Identifiable#getLoadOrder() - */ - public int getLoadOrder() { - return loadOrder; - } - - public EjbModuleExtensionHelper getInstance() { - try { - if (instance == null) - instance = (EjbModuleExtensionHelper) element - .createExecutableExtension(ATT_EJB_EXTENSION_CLASS); - } catch (CoreException e) { - Logger.getLogger().logError(e); - } - return instance; - } - } - - protected EclipseEJBModelExtenderProvider() { - super(J2EECorePlugin.PLUGIN_ID, Descriptor.EJB_MODEL_EXTENDER); - } - - public static EclipseEJBModelExtenderProvider getInstance() { - if (INSTANCE == null) { - INSTANCE = new EclipseEJBModelExtenderProvider(); - INSTANCE.readRegistry(); - } - return INSTANCE; - } - - /** - * readElement() - parse and deal w/ an extension like: <earModuleExtension - * extensionClass = "com.ibm.etools.web.plugin.WebModuleExtensionImpl"/> - */ - public boolean readElement(IConfigurationElement element) { - if (!element.getName().equals(Descriptor.EJB_MODEL_EXTENDER)) return false; - - addModuleExtension(new Descriptor(element)); - return true; - } - - /** - * @param descriptor - */ - private void addModuleExtension(Descriptor descriptor) { - getExtensionHelpers().add(descriptor); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jst.j2ee.internal.core.moduleextension.helper.IEJBModelExtenderProvider#getEJBModuleExtension(java.lang.Object) - */ - public EjbModuleExtensionHelper getEJBModuleExtension(Object context) { - //IProject project = null; // TODO MDE Get the project using Project Utilities (add depend to emf.workbench ?) - if (getExtensionHelpers().isEmpty()) - return null; - Descriptor descriptor = (Descriptor) getExtensionHelpers().first(); - if(descriptor != null) - return descriptor.getInstance(); - return null; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jst.j2ee.internal.core.moduleextension.helper.IEJBModelExtenderProvider#hasEJBModuleExtension(java.lang.Object) - */ - public boolean hasEJBModuleExtension(Object context) { - return false; - } - - /** - * @return Returns the extensionHelpers. - */ - protected SortedSet getExtensionHelpers() { - if (extensionHelpers == null) extensionHelpers = new TreeSet(IdentifiableComparator.getInstance()); - return extensionHelpers; - } -} diff --git a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/J2EECorePlugin.java b/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/J2EECorePlugin.java deleted file mode 100644 index 2ecb95761..000000000 --- a/plugins/org.eclipse.jst.j2ee.core/j2eeCorePlugin/org/eclipse/jst/j2ee/core/internal/plugin/J2EECorePlugin.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 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.core.internal.plugin; -import org.eclipse.core.runtime.Plugin; -import org.eclipse.jem.util.logger.proxy.Logger; -import org.eclipse.jem.util.logger.proxyrender.DefaultPluginTraceRenderer; -import org.eclipse.jst.j2ee.internal.IEJBModelExtenderManager; -import org.osgi.framework.BundleContext; - -/* - * Created on Nov 25, 2003 - * - * To change the template for this generated file go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -/** - * @author vijayb - * - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments - */ -public class J2EECorePlugin extends Plugin { - public static final String PLUGIN_ID = "org.eclipse.jst.j2ee.core"; //$NON-NLS-1$ - private static J2EECorePlugin inst = null; - protected static Logger logger = null; - /** - * @param descriptor - */ - public J2EECorePlugin() { - super(); - if (inst==null) inst = this; - } - - public void start(BundleContext context) throws Exception { - super.start(context); - IEJBModelExtenderManager.INSTANCE.setProvider(EclipseEJBModelExtenderProvider.getInstance()); - } - - public static J2EECorePlugin getPlugin(){ - return inst; - } - - public static String getPluginID() { - return PLUGIN_ID; - } - - public Logger getMsgLogger() { - if (logger == null) { - logger = Logger.getLogger(getPluginID()); - setRenderer(logger); - } - return logger; - } - - /** - * @param aLogger - */ - protected void setRenderer(Logger aLogger) { - new DefaultPluginTraceRenderer(aLogger); - } - -} |