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


Java View.isSetElement方法代码示例

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


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

示例1: getStatemachine_1000SemanticChildren

import org.eclipse.gmf.runtime.notation.View; //导入方法依赖的package包/类
/**
 * @generated
 */
public static List<StatemachineNodeDescriptor> getStatemachine_1000SemanticChildren(
		View view) {
	if (!view.isSetElement()) {
		return Collections.emptyList();
	}
	Statemachine modelElement = (Statemachine) view.getElement();
	LinkedList<StatemachineNodeDescriptor> result = new LinkedList<StatemachineNodeDescriptor>();
	for (Iterator<?> it = modelElement.getStates().iterator(); it.hasNext();) {
		State childElement = (State) it.next();
		int visualID = StatemachineVisualIDRegistry.getNodeVisualID(view,
				childElement);
		if (visualID == StateEditPart.VISUAL_ID) {
			result.add(new StatemachineNodeDescriptor(childElement,
					visualID));
			continue;
		}
	}
	return result;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:23,代码来源:StatemachineDiagramUpdater.java

示例2: validate

import org.eclipse.gmf.runtime.notation.View; //导入方法依赖的package包/类
/**
 * @generated
 */
private static void validate(DiagramEditPart diagramEditPart, View view) {
	IFile target = view.eResource() != null ? WorkspaceSynchronizer
			.getFile(view.eResource()) : null;
	if (target != null) {
		StatemachineMarkerNavigationProvider.deleteMarkers(target);
	}
	Diagnostic diagnostic = runEMFValidator(view);
	createMarkers(target, diagnostic, diagramEditPart);
	IBatchValidator validator = (IBatchValidator) ModelValidationService
			.getInstance().newValidator(EvaluationMode.BATCH);
	validator.setIncludeLiveConstraints(true);
	if (view.isSetElement() && view.getElement() != null) {
		IStatus status = validator.validate(view.getElement());
		createMarkers(target, status, diagramEditPart);
	}
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:20,代码来源:ValidateAction.java

示例3: buildElement2ViewMap

import org.eclipse.gmf.runtime.notation.View; //导入方法依赖的package包/类
/**
 * @generated
 */
private static boolean buildElement2ViewMap(View parentView,
		Map<EObject, View> element2ViewMap,
		Set<? extends EObject> elements) {
	if (elements.size() == element2ViewMap.size()) {
		return true;
	}

	if (parentView.isSetElement()
			&& !element2ViewMap.containsKey(parentView.getElement())
			&& elements.contains(parentView.getElement())) {
		element2ViewMap.put(parentView.getElement(), parentView);
		if (elements.size() == element2ViewMap.size()) {
			return true;
		}
	}
	boolean complete = false;
	for (Iterator<?> it = parentView.getChildren().iterator(); it
			.hasNext() && !complete;) {
		complete = buildElement2ViewMap((View) it.next(),
				element2ViewMap, elements);
	}
	for (Iterator<?> it = parentView.getSourceEdges().iterator(); it
			.hasNext() && !complete;) {
		complete = buildElement2ViewMap((View) it.next(),
				element2ViewMap, elements);
	}
	for (Iterator<?> it = parentView.getTargetEdges().iterator(); it
			.hasNext() && !complete;) {
		complete = buildElement2ViewMap((View) it.next(),
				element2ViewMap, elements);
	}
	return complete;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:37,代码来源:StatemachineDiagramEditorUtil.java

示例4: runEMFValidator

import org.eclipse.gmf.runtime.notation.View; //导入方法依赖的package包/类
/**
 * @generated
 */
private static Diagnostic runEMFValidator(View target) {
	if (target.isSetElement() && target.getElement() != null) {
		return new Diagnostician() {

			public String getObjectLabel(EObject eObject) {
				return EMFCoreUtil.getQualifiedName(eObject, true);
			}
		}.validate(target.getElement());
	}
	return Diagnostic.OK_INSTANCE;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:15,代码来源:ValidateAction.java


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