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


Java NotationPackage.eINSTANCE方法代码示例

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


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

示例1: match

import org.eclipse.gmf.runtime.notation.NotationPackage; //导入方法依赖的package包/类
@Override
public Comparison match(IComparisonScope scope, Monitor monitor) {
	Predicate<EObject> predicate = new Predicate<EObject>() {
		@Override
		public boolean apply(EObject eobject) {
			// We only want to diff the SGraph and notation elements,
			// not the transient palceholders for concrete languages
			EPackage ePackage = eobject.eClass().getEPackage();
			return ePackage == SGraphPackage.eINSTANCE || ePackage == NotationPackage.eINSTANCE;
		}
	};
	if (scope instanceof DefaultComparisonScope) {
		DefaultComparisonScope defaultScope = (DefaultComparisonScope) scope;
		defaultScope.setEObjectContentFilter(predicate);
		defaultScope.setResourceContentFilter(predicate);
	}
	return super.match(scope, monitor);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:19,代码来源:SCTMatchEngineFactory.java

示例2: shouldOverrideChildPasteOperation

import org.eclipse.gmf.runtime.notation.NotationPackage; //导入方法依赖的package包/类
/**
 * By default, don't provide any child paste override behaviour.
 */
public boolean shouldOverrideChildPasteOperation(EObject parentElement,
		EObject childEObject) {
	return (childEObject.eClass().getEPackage() == NotationPackage.eINSTANCE);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:8,代码来源:NotationClipboardOperationHelper.java

示例3: shouldAllowPaste

import org.eclipse.gmf.runtime.notation.NotationPackage; //导入方法依赖的package包/类
protected boolean shouldAllowPaste(
		PasteChildOperation overriddenChildPasteOperation) {
	EObject eObject = overriddenChildPasteOperation.getEObject();
	EObject parentEObject = overriddenChildPasteOperation
			.getParentEObject();
	// RATLC01137919 removed the condition that parentEObject is a diagram
	// to allow paste into diagram elements
	if ((parentEObject instanceof View) && (eObject instanceof View)) {
		EObject semanticChildElement = ((View) eObject).getElement();
		if (semanticChildElement == null || isSubdiagram(eObject, semanticChildElement)) {
			return true;
		}

		// PATCH START
		EObject target = getSemanticPasteTarget((View) eObject,
				(View) overriddenChildPasteOperation.getParentEObject());
		if (target == null) {
			return false;
		}
		// PATCH END

		if (semanticChildElement.eIsProxy()) {
			semanticChildElement = ClipboardSupportUtil.resolve(
					semanticChildElement, overriddenChildPasteOperation
							.getParentPasteProcess()
							.getLoadedIDToEObjectMapCopy());
			if (semanticChildElement.eIsProxy()) {
				semanticChildElement = EcoreUtil.resolve(
						semanticChildElement, getResource(parentEObject));
			}
		}

		EPackage semanticChildEpackage = semanticChildElement.eClass()
				.getEPackage();
		EPackage parentRootContainerEpackage = EcoreUtil
				.getRootContainer(parentEObject).eClass().getEPackage();
		EPackage sematicParentRootContainerEpackage = null;
		EObject sematicParentElement = ((View) parentEObject).getElement();
		if (sematicParentElement != null) {
			sematicParentRootContainerEpackage = EcoreUtil
					.getRootContainer(sematicParentElement).eClass()
					.getEPackage();
		}

		if (parentRootContainerEpackage != NotationPackage.eINSTANCE) {
			if (semanticChildEpackage != parentRootContainerEpackage) {
				return false;
			}
		}

		if ((sematicParentRootContainerEpackage != null)
				&& (sematicParentRootContainerEpackage != NotationPackage.eINSTANCE)) {
			if (semanticChildEpackage != sematicParentRootContainerEpackage) {
				return false;
			}
		}
		return true;
	}
	return false;
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:61,代码来源:NotationClipboardOperationHelper.java

示例4: isPackageSupported

import org.eclipse.gmf.runtime.notation.NotationPackage; //导入方法依赖的package包/类
@Override
public boolean isPackageSupported(EPackage ePackage) {
    return NotationPackage.eINSTANCE == ePackage;
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:5,代码来源:NotationPostProcessingSwitch.java


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