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


Java EditDomain类代码示例

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


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

示例1: getAdapter

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
public Object getAdapter(Class adapter) {

		if (adapter == GraphicalViewer.class || adapter == EditPartViewer.class)
			return getGraphicalViewer();
		else if (adapter == CommandStack.class)
			return getCommandStack();
		else if (adapter == EditDomain.class)
			return getEditDomain();
		else if (adapter == ActionRegistry.class)
			return getActionRegistry();
		else if (adapter == IPropertySheetPage.class)
			return new PropertiesView(true);
		else if (adapter == IContentOutlinePage.class) {
			return new GW4EOutlinePage();
		} else if (adapter == ZoomManager.class)
			return ((ScalableRootEditPart) getGraphicalViewer().getRootEditPart()).getZoomManager();
		return super.getAdapter(adapter);
	}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:19,代码来源:GW4EEditor.java

示例2: ActivityCreateContainerNodeCommand

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @param editDomain
 * @param parentNodeModel
 * @param request
 * @param location
 */
public ActivityCreateContainerNodeCommand(EditDomain editDomain, EditPart parentEditPart, CreateRequest request,
Point location) {
    super(editDomain, parentEditPart.getModel(), request, location);
    this.parentEditPart = parentEditPart;
    this.parentNodeModel = (AbstractNode) parentEditPart.getModel();
    if( this.parentNodeModel instanceof Diagram ) {
        this.diagram = (Diagram) this.parentNodeModel;
    }

    IDialogSettings dialogSetting = ActivityDiagramUtil.getDialogSetting();
    String partitionDirection = AnalysisConstant.EMPTY_STRING;
    
    partitionDirection = dialogSetting.get(AnalysisConstant.DIRECTION);
    if( null == partitionDirection ) {
        isHorizontal = false;
        dialogSetting.put(AnalysisConstant.DIRECTION, AnalysisConstant.VERTICAL);
    }
    if( AnalysisConstant.HORIZONTAL.equals(partitionDirection) ) {
        isHorizontal = true;
    } else if( AnalysisConstant.VERTICAL.equals(partitionDirection) ) {
        isHorizontal = false;
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:30,代码来源:ActivityCreateContainerNodeCommand.java

示例3: getAdapter

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
	if (EditDomain.class == adapter) {
		return getEditDomain();
	} else if (TimelineMarkerManager.class == adapter) {
		return getTimelineMarkerManager();
	} else if (Page.class == adapter) {
		return getPage();
	} else if (TickManager.class == adapter) {
		return getTickManager();
	} else if (ZoomManager.class == adapter) {
		return getZoomManager();
	}
	return null;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:17,代码来源:Timeline.java

示例4: eraseTargetFeedback

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
@Override
public void eraseTargetFeedback(Request request) {
	super.eraseTargetFeedback(request);
	if (request instanceof LocationRequest 
			&& tooltipShell != null
			&& !tooltipShell.isDisposed()) {
		Timeline activeEditPart = TimelineUtils.getTimeline(this);
		if (activeEditPart != null) {
			EditDomain editDomain = activeEditPart.getEditDomain();
			Tool tool = editDomain.getActiveTool();
			if(tool instanceof TimelineTool) {
				TimelineTool timelineTool = (TimelineTool)tool;
				if(timelineTool != null
						&& timelineTool.getTargetUnderMouse() != null
						&& !timelineTool.getTargetUnderMouse().equals(this.getHost())) {
					tooltipShell.dispose();
					tooltipShell = null;
				}
			}
		}
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:23,代码来源:HeatMapDataEditPartHoverEditPolicy.java

示例5: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof SimpleBPMN.diagram.part.SimpleBPMNDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:26,代码来源:SimpleBPMNValidationDecoratorProvider.java

示例6: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed)
				.getEditorPart() instanceof edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:ICSE15_SequenceDiagram_MAVOValidationDecoratorProvider.java

示例7: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:NECSIS14_ClassDiagramValidationDecoratorProvider.java

示例8: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:NECSIS14_DatabaseSchemaValidationDecoratorProvider.java

示例9: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof MIDDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:MIDValidationDecoratorProvider.java

示例10: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof MIDDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:MIDValidationDecoratorProvider.java

示例11: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed)
				.getEditorPart() instanceof edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVODiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:RelationalDatabase_MAVOValidationDecoratorProvider.java

示例12: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof RelationalDatabaseDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:RelationalDatabaseValidationDecoratorProvider.java

示例13: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed)
				.getEditorPart() instanceof edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:IStar_MAVOValidationDecoratorProvider.java

示例14: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof IStarDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:IStarValidationDecoratorProvider.java

示例15: createDecorators

import org.eclipse.gef.EditDomain; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof StateMachineDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:StateMachineValidationDecoratorProvider.java


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