當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。