All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.xtext.xbase.resource.XbaseResourceDescriptionStrategy Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2012 itemis AG (http://www.itemis.eu) 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
 *******************************************************************************/
package org.eclipse.xtext.xbase.resource;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.common.types.descriptions.JvmTypesResourceDescriptionStrategy;
import org.eclipse.xtext.resource.IReferenceDescription;
import org.eclipse.xtext.util.IAcceptor;
import org.eclipse.xtext.xbase.XAbstractFeatureCall;

import com.google.inject.Singleton;

/**
 * @author Jan Koehnlein - Initial contribution and API
 */
@Singleton
public class XbaseResourceDescriptionStrategy extends JvmTypesResourceDescriptionStrategy {
	
	@Override
	public boolean createReferenceDescriptions(EObject from, URI exportedContainerURI, IAcceptor acceptor) {
		if (from instanceof XAbstractFeatureCall && ((XAbstractFeatureCall) from).isPackageFragment())
			return false;
		return super.createReferenceDescriptions(from, exportedContainerURI, acceptor);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy