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 java.util.Map;
|
|
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 |
import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* This class contains helper methods to serialize and deserialize XML documents
|
|
33 |
* <!-- begin-user-doc -->
|
|
34 |
* <!-- end-user-doc -->
|
|
35 |
* @generated
|
|
36 |
*/
|
|
37 |
public class CSConfigXMLProcessor extends XMLProcessor {
|
|
38 |
/**
|
|
39 |
* Public constructor to instantiate the helper.
|
|
40 |
* <!-- begin-user-doc -->
|
|
41 |
* <!-- end-user-doc -->
|
|
42 |
* @generated
|
|
43 |
*/
|
|
44 |
public CSConfigXMLProcessor() {
|
|
45 |
super(new EPackageRegistryImpl(EPackage.Registry.INSTANCE));
|
|
46 |
extendedMetaData.putPackage(null, CSConfigPackage.eINSTANCE);
|
|
47 |
}
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Register for "*" and "xml" file extensions the CSConfigResourceFactoryImpl factory.
|
|
51 |
* <!-- begin-user-doc -->
|
|
52 |
* <!-- end-user-doc -->
|
|
53 |
* @generated
|
|
54 |
*/
|
|
55 |
@Override
|
|
56 |
protected Map<String, Resource.Factory> getRegistrations() {
|
|
57 |
if (registrations == null) {
|
|
58 |
super.getRegistrations();
|
|
59 |
registrations.put(XML_EXTENSION, new CSConfigResourceFactoryImpl());
|
|
60 |
registrations.put(STAR_EXTENSION, new CSConfigResourceFactoryImpl());
|
|
61 |
}
|
|
62 |
return registrations;
|
|
63 |
}
|
|
64 |
|
|
65 |
} //CSConfigXMLProcessor
|