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


Java IPrimaryEditPart类代码示例

本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart的典型用法代码示例。如果您正苦于以下问题:Java IPrimaryEditPart类的具体用法?Java IPrimaryEditPart怎么用?Java IPrimaryEditPart使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPrimaryEditPart类属于org.eclipse.gmf.runtime.diagram.ui.editparts包,在下文中一共展示了IPrimaryEditPart类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public static void selectElementsInDiagram(
		IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
	diagramPart.getDiagramGraphicalViewer().deselectAll();

	EditPart firstPrimary = null;
	for (EditPart nextPart : editParts) {
		diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
		if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
			firstPrimary = nextPart;
		}
	}

	if (!editParts.isEmpty()) {
		diagramPart.getDiagramGraphicalViewer().reveal(
				firstPrimary != null ? firstPrimary : (EditPart) editParts
						.get(0));
	}
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:22,代码来源:StatemachineDiagramEditorUtil.java

示例2: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
	diagramPart.getDiagramGraphicalViewer().deselectAll();

	EditPart firstPrimary = null;
	for (Iterator<EditPart> it = editParts.iterator(); it.hasNext();) {
		EditPart nextPart = it.next();
		diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
		if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
			firstPrimary = nextPart;
		}
	}
	if (!editParts.isEmpty()) {
		diagramPart.getDiagramGraphicalViewer()
				.reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:17,代码来源:DiagramPartitioningUtil.java

示例3: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public static void selectElementsInDiagram(
		IDiagramWorkbenchPart diagramPart, List/*EditPart*/editParts) {
	diagramPart.getDiagramGraphicalViewer().deselectAll();

	EditPart firstPrimary = null;
	for (Iterator it = editParts.iterator(); it.hasNext();) {
		EditPart nextPart = (EditPart) it.next();
		diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
		if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
			firstPrimary = nextPart;
		}
	}

	if (!editParts.isEmpty()) {
		diagramPart.getDiagramGraphicalViewer().reveal(
				firstPrimary != null ? firstPrimary : (EditPart) editParts
						.get(0));
	}
}
 
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:23,代码来源:SmcDiagramEditorUtil.java

示例4: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
/**
* @generated
*/
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
	diagramPart.getDiagramGraphicalViewer().deselectAll();

	EditPart firstPrimary = null;
	for (EditPart nextPart : editParts) {
		diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
		if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
			firstPrimary = nextPart;
		}
	}

	if (!editParts.isEmpty()) {
		diagramPart.getDiagramGraphicalViewer()
				.reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:ICSE15_SequenceDiagram_MAVODiagramEditorUtil.java

示例5: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
	diagramPart.getDiagramGraphicalViewer().deselectAll();

	EditPart firstPrimary = null;
	for (EditPart nextPart : editParts) {
		diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
		if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
			firstPrimary = nextPart;
		}
	}

	if (!editParts.isEmpty()) {
		diagramPart
			.getDiagramGraphicalViewer()
			.reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:21,代码来源:MIDDiagramEditorUtil.java

示例6: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
/**
* @generated
*/
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
	diagramPart.getDiagramGraphicalViewer().deselectAll();

	EditPart firstPrimary = null;
	for (EditPart nextPart : editParts) {
		diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
		if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
			firstPrimary = nextPart;
		}
	}

	if (!editParts.isEmpty()) {
		diagramPart
			.getDiagramGraphicalViewer()
			.reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:21,代码来源:ClassDiagramDiagramEditorUtil.java

示例7: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public static void selectElementsInDiagram(
        IDiagramWorkbenchPart diagramPart, List/*EditPart*/editParts) {
    diagramPart.getDiagramGraphicalViewer().deselectAll();

    EditPart firstPrimary = null;
    for (Iterator it = editParts.iterator(); it.hasNext();) {
        EditPart nextPart = (EditPart) it.next();
        diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
        if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
            firstPrimary = nextPart;
        }
    }

    if (!editParts.isEmpty()) {
        diagramPart.getDiagramGraphicalViewer().reveal(
                firstPrimary != null ? firstPrimary : (EditPart) editParts
                        .get(0));
    }
}
 
开发者ID:d-case,项目名称:d-case_editor,代码行数:23,代码来源:DcaseDiagramEditorUtil.java

示例8: selectElementsInDiagram

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
	diagramPart.getDiagramGraphicalViewer().deselectAll();

	EditPart firstPrimary = null;
	for (EditPart nextPart : editParts) {
		diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
		if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
			firstPrimary = nextPart;
		}
	}

	if (!editParts.isEmpty()) {
		diagramPart.getDiagramGraphicalViewer().reveal(
				firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
	}
}
 
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:20,代码来源:TransformationDependencyDiagramEditorUtil.java

示例9: shouldDecorate

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
@Override
protected boolean shouldDecorate(EObject element) {
	if (preferenceStore.getBoolean(StatechartPreferenceConstants.PREF_DEFINITION_SECTION)) {
		if (getDecoratorTarget().getAdapter(IPrimaryEditPart.class) instanceof StatechartTextEditPart) {
			StatechartTextEditPart adapter = (StatechartTextEditPart) getDecoratorTarget()
					.getAdapter(IPrimaryEditPart.class);
			BooleanValueStyle style = GMFNotationUtil.getBooleanValueStyle(adapter.getNotationView(),
					DiagramPartitioningUtil.INLINE_DEFINITION_SECTION_STYLE);
			return style == null ? true : style.isBooleanValue();
		}
	}
	return false;
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:14,代码来源:DefinitionSectionDecorationProvider.java

示例10: createDecorators

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof BorderItemEditPart)
		return;
	if (editPart instanceof IPrimaryEditPart
			&& (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart)) {
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (shouldInstall(((DiagramEditDomain) ed).getEditorPart())) {
			decoratorTarget.installDecorator(getDecoratorKey(), createStatusDecorator(decoratorTarget, issueStore));
		}
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:16,代码来源:StatechartValidationDecorationProvider.java

示例11: refresh

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
public void refresh() {
	Optional<EObject> element = getTargetEObject();
	if (!element.isPresent()) {
		return;
	}
	semanticID = element.get().eResource().getURIFragment(element.get());
	removeDecoration();
	EditPart editPart = (EditPart) getDecoratorTarget().getAdapter(EditPart.class);
	if (editPart == null || editPart.getViewer() == null || !(editPart instanceof IPrimaryEditPart)) {
		return;
	}
	decorate(getTargetView().get());
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:14,代码来源:StatechartValidationDecorationProvider.java

示例12: refresh

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
public void refresh() {
	disposeDecoration();
	if (getDecoratorTarget().getAdapter(EditPart.class) instanceof IPrimaryEditPart) {
		final EObject semanticElement = getSemanticElement();
		if (shouldDecorate(getSemanticElement())) {
			setDecoration(createDecoration(semanticElement));
		}
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:10,代码来源:InteractiveDecorator.java

示例13: lockEditorInternal

import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart; //导入依赖的package包/类
private void lockEditorInternal() {
	setSanityCheckEnablementState(false);
	for (Object editPart : diagramWorkbenchPart.getDiagramGraphicalViewer().getEditPartRegistry().values()) {
		if (editPart instanceof IPrimaryEditPart) {
			IGraphicalEditPart graphicalEditPart = (IGraphicalEditPart) editPart;
			IFigure figure = getTargetFigure(graphicalEditPart);
			figureStates.put(figure, new ColorMemento(figure));
		}
	}
	locked = true;
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:12,代码来源:HighlightingSupportAdapter.java


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