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.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java')
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java48
1 files changed, 0 insertions, 48 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java
deleted file mode 100644
index 163ae74c2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 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.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-
-public class ClassHelperAdapterFactory implements IAdapterFactory {
-
- private static final Class IFILE_CLASS = IFile.class;
- private static final Class IRESOURCE_CLASS = IResource.class;
-
- private static final Class[] ADAPTER_TYPES = new Class[] {
- IFILE_CLASS, IRESOURCE_CLASS
- };
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(IRESOURCE_CLASS == adapterType || IFILE_CLASS == adapterType) {
- if(adaptableObject instanceof J2EEJavaClassProviderHelper) {
- J2EEJavaClassProviderHelper provider = (J2EEJavaClassProviderHelper) adaptableObject;
- try {
- IResource resource = (IResource) provider.getAdapter(IRESOURCE_CLASS);
- return resource;
- } catch (RuntimeException e) {
- J2EEUIPlugin.logError(0, e.getMessage(), e);
- return null;
- }
- }
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return ADAPTER_TYPES;
- }
-
-}

Back to the top