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
blob: b95c677a15d23f53787efd0bd08b050e02ae8fa5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*******************************************************************************
 * Copyright (c) 2001, 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.common;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jst.j2ee.internal.common.impl.J2EEResourceFactoryRegistry;
import org.eclipse.wst.common.internal.emf.resource.CompatibilityResourceFactory;




/**
 * @author nssheth
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class J2EEXMIResourceFactory extends CompatibilityResourceFactory {

	public static J2EEXMIResourceFactory INSTANCE = new J2EEXMIResourceFactory();
	
	public static void register() {
		J2EEResourceFactoryRegistry.INSTANCE.getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, INSTANCE);
	}

	/**
	 * Constructor for J2EEXMIResourceFactory.
	 */
	public J2EEXMIResourceFactory() {
		super();
	}

	/**
	 * @see org.eclipse.emf.ecore.resource.Resource.Factory#createResource(URI)
	 */
	public Resource createResource(URI uri) {
		J2EEXMIResource resource = new J2EEXMIResource(uri);
		return resource;
	}
}

Back to the top