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