当前位置: 首页>>代码示例>>Java>>正文


Java EObject.eClass方法代码示例

本文整理汇总了Java中org.eclipse.emf.ecore.EObject.eClass方法的典型用法代码示例。如果您正苦于以下问题:Java EObject.eClass方法的具体用法?Java EObject.eClass怎么用?Java EObject.eClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.emf.ecore.EObject的用法示例。


在下文中一共展示了EObject.eClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: installProxies

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * Installs proxies for all non containment references and only if the node representing the EObject that contains
 * the cross reference has got leaf nodes (as a leaf node represents the cross reference).
 *
 * @param resource
 *            the N4JSResource
 * @param obj
 *            the EObject containing the cross reference
 * @param producer
 *            the error/warning producer
 * @param parentNode
 *            the node representing obj inside the node model
 */
private void installProxies(N4JSResource resource, EObject obj, IDiagnosticProducer producer,
		ICompositeNode parentNode, boolean dontCheckParent) {
	final EClass eClass = obj.eClass();
	if (eClass.getEAllReferences().size() - eClass.getEAllContainments().size() == 0)
		return;

	for (INode node = parentNode.getFirstChild(); node != null; node = node.getNextSibling()) {
		EObject grammarElement = node.getGrammarElement();
		if (grammarElement instanceof CrossReference && hasLeafNodes(node)) {
			producer.setNode(node);
			CrossReference crossReference = (CrossReference) grammarElement;
			final EReference eRef = GrammarUtil.getReference(crossReference, eClass);
			if (eRef == null) {
				ParserRule parserRule = GrammarUtil.containingParserRule(crossReference);
				final String feature = GrammarUtil.containingAssignment(crossReference).getFeature();
				throw new IllegalStateException("Couldn't find EReference for crossreference '" + eClass.getName()
						+ "::" + feature + "' in parser rule '" + parserRule.getName() + "'.");
			}
			createAndSetProxy(resource, obj, node, eRef, crossReference, producer);
			afterCreateAndSetProxy(obj, node, eRef, crossReference, producer);
		} else if (grammarElement instanceof RuleCall && node instanceof ICompositeNode) {
			RuleCall ruleCall = (RuleCall) grammarElement;
			AbstractRule calledRule = ruleCall.getRule();
			if (calledRule instanceof ParserRule && ((ParserRule) calledRule).isFragment()) {
				installProxies(resource, obj, producer, (ICompositeNode) node, true);
			}
		}
	}
	if (!dontCheckParent && shouldCheckParentNode(parentNode)) {
		installProxies(resource, obj, producer, parentNode.getParent(), dontCheckParent);
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:46,代码来源:N4JSLinker.java

示例2: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && GqamPackage.Literals.PERIODIC_PATTERN == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:PeriodicPatternPropertiesEditionProvider.java

示例3: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && SrmPackage.Literals.ALARM == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:AlarmPropertiesEditionProvider.java

示例4: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && GrmPackage.Literals.SYNCH_RESOURCE == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:SynchResourcePropertiesEditionProvider.java

示例5: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && GrmPackage.Literals.CLOCK_RESOURCE == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:ClockResourcePropertiesEditionProvider.java

示例6: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && SrmPackage.Literals.INTERRUPT_RESOURCE == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:InterruptResourcePropertiesEditionProvider.java

示例7: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && HrmPackage.Literals.HARDWARE_ARBITER == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:HardwareArbiterPropertiesEditionProvider.java

示例8: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && GqamPackage.Literals.ACQUIRE_STEP == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:AcquireStepPropertiesEditionProvider.java

示例9: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && AnalysisPackage.Literals.DELAY == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:DelayPropertiesEditionProvider.java

示例10: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && SrmPackage.Literals.SOFTWARE_CONNECTOR == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:SoftwareConnectorPropertiesEditionProvider.java

示例11: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && SrmPackage.Literals.SOFTWARE_INTERFACE == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:SoftwareInterfacePropertiesEditionProvider.java

示例12: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && HrmPackage.Literals.HARDWARE_MMU == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:HardwareMmuPropertiesEditionProvider.java

示例13: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && MetamodelPackage.Literals.QUERY == eObj.eClass();
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:10,代码来源:QueryPropertiesEditionProvider.java

示例14: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && GrmPackage.Literals.RESOURCE_USAGE == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:ResourceUsagePropertiesEditionProvider.java

示例15: select

import org.eclipse.emf.ecore.EObject; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
 */
public boolean select(Object toTest) {
	EObject eObj = EEFUtils.resolveSemanticObject(toTest);
	return eObj != null && LibraryPackage.Literals.DEADLINE_MONOTONIC_SCHEDULING_POLICY == eObj.eClass();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:10,代码来源:DeadlineMonotonicSchedulingPolicyPropertiesEditionProvider.java


注:本文中的org.eclipse.emf.ecore.EObject.eClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。