2
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
package com.nokia.carbide.cpp.internal.codescanner.gen.CSConfig.util;
|
|
19 |
|
|
20 |
import com.nokia.carbide.cpp.internal.codescanner.gen.CSConfig.CSConfigPackage;
|
|
21 |
|
|
22 |
import org.eclipse.emf.common.util.URI;
|
|
23 |
|
|
24 |
import org.eclipse.emf.ecore.EPackage;
|
|
25 |
|
|
26 |
import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
|
|
27 |
|
|
28 |
import org.eclipse.emf.ecore.resource.Resource;
|
|
29 |
|
|
30 |
import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
|
|
31 |
|
|
32 |
import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
|
|
33 |
import org.eclipse.emf.ecore.util.ExtendedMetaData;
|
|
34 |
|
|
35 |
import org.eclipse.emf.ecore.xmi.XMLResource;
|
|
36 |
|
|
37 |
/**
|
|
38 |
* <!-- begin-user-doc -->
|
|
39 |
* The <b>Resource Factory</b> associated with the package.
|
|
40 |
* <!-- end-user-doc -->
|
|
41 |
* @see com.nokia.carbide.cpp.internal.codescanner.gen.CSConfig.util.CSConfigResourceImpl
|
|
42 |
* @generated
|
|
43 |
*/
|
|
44 |
public class CSConfigResourceFactoryImpl extends ResourceFactoryImpl {
|
|
45 |
/**
|
|
46 |
* <!-- begin-user-doc -->
|
|
47 |
* <!-- end-user-doc -->
|
|
48 |
* @generated
|
|
49 |
*/
|
|
50 |
protected ExtendedMetaData extendedMetaData;
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Creates an instance of the resource factory.
|
|
54 |
* <!-- begin-user-doc -->
|
|
55 |
* <!-- end-user-doc -->
|
|
56 |
* @generated
|
|
57 |
*/
|
|
58 |
public CSConfigResourceFactoryImpl() {
|
|
59 |
super();
|
|
60 |
extendedMetaData = new BasicExtendedMetaData(new EPackageRegistryImpl(EPackage.Registry.INSTANCE));
|
|
61 |
extendedMetaData.putPackage(null, CSConfigPackage.eINSTANCE);
|
|
62 |
}
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Creates an instance of the resource.
|
|
66 |
* <!-- begin-user-doc -->
|
|
67 |
* <!-- end-user-doc -->
|
|
68 |
* @generated
|
|
69 |
*/
|
|
70 |
@Override
|
|
71 |
public Resource createResource(URI uri) {
|
|
72 |
XMLResource result = new CSConfigResourceImpl(uri);
|
|
73 |
result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
|
|
74 |
result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
|
|
75 |
|
|
76 |
result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
|
|
77 |
|
|
78 |
result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
|
|
79 |
result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
|
|
80 |
|
|
81 |
result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
|
|
82 |
return result;
|
|
83 |
}
|
|
84 |
|
|
85 |
} //CSConfigResourceFactoryImpl
|