本文整理汇总了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));
}
}
示例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));
}
}
示例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));
}
}
示例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));
}
}
示例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));
}
}
示例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));
}
}
示例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));
}
}
示例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));
}
}
示例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;
}
示例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));
}
}
}
示例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());
}
示例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));
}
}
}
示例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;
}