本文整理汇总了Java中org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest类的典型用法代码示例。如果您正苦于以下问题:Java CreateConnectionViewRequest类的具体用法?Java CreateConnectionViewRequest怎么用?Java CreateConnectionViewRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CreateConnectionViewRequest类属于org.eclipse.gmf.runtime.diagram.ui.requests包,在下文中一共展示了CreateConnectionViewRequest类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<StatemachineLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (StatemachineLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor,
domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor,
domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
StatemachineVisualIDRegistry.getType(nextLinkDescriptor
.getVisualID()), ViewUtil.APPEND, false,
((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:40,代码来源:StatemachineCanonicalEditPolicy.java
示例2: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection createConnections(Collection linkDescriptors,
Map domain2NotationMap) {
List adapters = new LinkedList();
for (Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator
.hasNext();) {
final SmcLinkDescriptor nextLinkDescriptor = (SmcLinkDescriptor) linkDescriptorsIterator
.next();
EditPart sourceEditPart = getEditPart(nextLinkDescriptor
.getSource(), domain2NotationMap);
EditPart targetEditPart = getEditPart(nextLinkDescriptor
.getDestination(), domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(), String
.valueOf(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:41,代码来源:SystemCanonicalEditPolicy.java
示例3: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<Wc2014LinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (Wc2014LinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor,
domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor,
domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
Wc2014VisualIDRegistry.getType(nextLinkDescriptor
.getVisualID()), ViewUtil.APPEND, false,
((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:40,代码来源:WorldCupCanonicalEditPolicy.java
示例4: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<SimpleBPMN.diagram.part.SimpleBPMNLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (SimpleBPMN.diagram.part.SimpleBPMNLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor,
domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor,
domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
SimpleBPMN.diagram.part.SimpleBPMNVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false,
((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:41,代码来源:BusinessProcessDiagramCanonicalEditPolicy.java
示例5: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVOVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:SequenceDiagramCanonicalEditPolicy.java
示例6: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor,
domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor,
domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:40,代码来源:ClassDiagramCanonicalEditPolicy.java
示例7: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<MIDLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (MIDLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
MIDVisualIDRegistry.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND,
false,
((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:MIDCanonicalEditPolicy.java
示例8: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(Collection<MIDLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (MIDLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
MIDVisualIDRegistry.getType(nextLinkDescriptor.getVisualID()), ViewUtil.APPEND, false,
((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:34,代码来源:ModelRelCanonicalEditPolicy.java
示例9: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVOVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:RelationalDatabaseCanonicalEditPolicy.java
示例10: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<RelationalDatabaseLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (RelationalDatabaseLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor,
domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor,
domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
RelationalDatabaseVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false,
((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:41,代码来源:RelationalDatabaseCanonicalEditPolicy.java
示例11: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVOVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:IStarCanonicalEditPolicy.java
示例12: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<IStarLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (IStarLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor,
domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor,
domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
IStarVisualIDRegistry.getType(nextLinkDescriptor
.getVisualID()), ViewUtil.APPEND, false,
((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:40,代码来源:IStarCanonicalEditPolicy.java
示例13: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<StateMachineLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (StateMachineLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor,
domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor,
domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
StateMachineVisualIDRegistry.getType(nextLinkDescriptor
.getVisualID()), ViewUtil.APPEND, false,
((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:40,代码来源:StateMachineCanonicalEditPolicy.java
示例14: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
edu.toronto.cs.se.modelepedia.statemachine_mavo.diagram.part.StateMachine_MAVOVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:StateMachineCanonicalEditPolicy.java
示例15: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<ClassDiagramLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (ClassDiagramLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
ClassDiagramVisualIDRegistry.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND,
false,
((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:ClassDiagramCanonicalEditPolicy.java
示例16: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<edu.toronto.cs.se.modelepedia.classdiagram_mavo.diagram.part.ClassDiagram_MAVOLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (edu.toronto.cs.se.modelepedia.classdiagram_mavo.diagram.part.ClassDiagram_MAVOLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
edu.toronto.cs.se.modelepedia.classdiagram_mavo.diagram.part.ClassDiagram_MAVOVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:ClassDiagramCanonicalEditPolicy.java
示例17: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<edu.toronto.cs.se.modelepedia.graph_mavo.diagram.part.Graph_MAVOLinkDescriptor> linkDescriptors,
Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (edu.toronto.cs.se.modelepedia.graph_mavo.diagram.part.Graph_MAVOLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
edu.toronto.cs.se.modelepedia.graph_mavo.diagram.part.Graph_MAVOVisualIDRegistry
.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:adisandro,项目名称:MMINT,代码行数:36,代码来源:GraphCanonicalEditPolicy.java
示例18: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection createConnections(Collection linkDescriptors,
Map domain2NotationMap) {
List adapters = new LinkedList();
for (Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator
.hasNext();) {
final DcaseLinkDescriptor nextLinkDescriptor = (DcaseLinkDescriptor) linkDescriptorsIterator
.next();
EditPart sourceEditPart = getEditPart(nextLinkDescriptor
.getSource(), domain2NotationMap);
EditPart targetEditPart = getEditPart(nextLinkDescriptor
.getDestination(), domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(), String
.valueOf(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost())
.getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(
descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:d-case,项目名称:d-case_editor,代码行数:41,代码来源:ArgumentCanonicalEditPolicy.java
示例19: createConnections
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest; //导入依赖的package包/类
/**
* @generated
*/
private Collection<IAdaptable> createConnections(
Collection<TransformationDependencyLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (TransformationDependencyLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
continue;
}
CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(
nextLinkDescriptor.getSemanticAdapter(),
TransformationDependencyVisualIDRegistry.getType(nextLinkDescriptor.getVisualID()),
ViewUtil.APPEND, false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
ccr.setType(RequestConstants.REQ_CONNECTION_START);
ccr.setSourceEditPart(sourceEditPart);
sourceEditPart.getCommand(ccr);
ccr.setTargetEditPart(targetEditPart);
ccr.setType(RequestConstants.REQ_CONNECTION_END);
Command cmd = targetEditPart.getCommand(ccr);
if (cmd != null && cmd.canExecute()) {
executeCommand(cmd);
IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
if (viewAdapter != null) {
adapters.add(viewAdapter);
}
}
}
return adapters;
}
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:34,代码来源:TransformationSetsCanonicalEditPolicy.java
注:本文中的org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论