org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage Java Examples

The following examples show how to use org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbapgitstagingPackageImpl.java    From ADT_Frontend with MIT License 5 votes vote down vote up
/**
 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
 *
 * <p>This method is used to initialize {@link IAbapgitstagingPackage#eINSTANCE} when that field is accessed.
 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @see #eNS_URI
 * @see #createPackageContents()
 * @see #initializePackageContents()
 * @generated
 */
public static IAbapgitstagingPackage init() {
	if (isInited) return (IAbapgitstagingPackage)EPackage.Registry.INSTANCE.getEPackage(IAbapgitstagingPackage.eNS_URI);

	// Obtain or create and register package
	Object registeredAbapgitstagingPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
	AbapgitstagingPackageImpl theAbapgitstagingPackage = registeredAbapgitstagingPackage instanceof AbapgitstagingPackageImpl ? (AbapgitstagingPackageImpl)registeredAbapgitstagingPackage : new AbapgitstagingPackageImpl();

	isInited = true;

	// Initialize simple dependencies
	IAdtCorePackage.eINSTANCE.eClass();
	IAtomPackage.eINSTANCE.eClass();
	XMLNamespacePackage.eINSTANCE.eClass();
	XMLTypePackage.eINSTANCE.eClass();

	// Create package meta-data objects
	theAbapgitstagingPackage.createPackageContents();

	// Initialize created meta-data
	theAbapgitstagingPackage.initializePackageContents();

	// Mark meta-data to indicate it can't be changed
	theAbapgitstagingPackage.freeze();

	// Update the registry and return the package
	EPackage.Registry.INSTANCE.put(IAbapgitstagingPackage.eNS_URI, theAbapgitstagingPackage);
	return theAbapgitstagingPackage;
}
 
Example #2
Source File: AbstractURIHandlerTest.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Before
public void setUp() {
	globalState = GlobalRegistries.makeCopyOfGlobalState();
	EPackage.Registry.INSTANCE.put(XMLTypePackage.eNS_URI, XMLTypePackage.eINSTANCE);
	EPackage.Registry.INSTANCE.put(XMLNamespacePackage.eNS_URI, XMLNamespacePackage.eINSTANCE);
	resourceSet = getNewResourceSet();
	primaryResource = resourceSet.createResource(getResourceURI());
	referencedResource = resourceSet.createResource(getReferencedURI());
}
 
Example #3
Source File: EMFGeneratorFragment2.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected Set<EPackage> getReferencedEPackages(final List<EPackage> packs) {
  final HashSet<EPackage> result = CollectionLiterals.<EPackage>newHashSet();
  for (final EPackage pkg : packs) {
    {
      final TreeIterator<EObject> iterator = pkg.eAllContents();
      while (iterator.hasNext()) {
        {
          final EObject obj = iterator.next();
          EList<EObject> _eCrossReferences = obj.eCrossReferences();
          for (final EObject crossRef : _eCrossReferences) {
            boolean _eIsProxy = crossRef.eIsProxy();
            if (_eIsProxy) {
              URI _eProxyURI = ((InternalEObject) crossRef).eProxyURI();
              String _plus = ("Proxy \'" + _eProxyURI);
              String _plus_1 = (_plus + "\' could not be resolved");
              EMFGeneratorFragment2.LOG.error(_plus_1);
            } else {
              final EPackage p = EcoreUtil2.<EPackage>getContainerOfType(crossRef, EPackage.class);
              if ((p != null)) {
                result.add(p);
              }
            }
          }
        }
      }
    }
  }
  result.removeAll(packs);
  result.remove(EcorePackage.eINSTANCE);
  result.remove(XMLTypePackage.eINSTANCE);
  result.remove(XMLNamespacePackage.eINSTANCE);
  return result;
}