本文整理汇总了Java中org.eclipse.graphiti.dt.IDiagramTypeProvider类的典型用法代码示例。如果您正苦于以下问题:Java IDiagramTypeProvider类的具体用法?Java IDiagramTypeProvider怎么用?Java IDiagramTypeProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDiagramTypeProvider类属于org.eclipse.graphiti.dt包,在下文中一共展示了IDiagramTypeProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doExecute
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
@Override
protected void doExecute() {
// Create the diagram and its file
diagram = Graphiti.getPeCreateService().createDiagram("BPMNdiagram", diagramName, true); //$NON-NLS-1$
IFile diagramFile = targetFolder.getFile(new Path(diagramName + ".activiti")); //$NON-NLS-1$
URI uri = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);
createdResource = editingDomain.getResourceSet().createResource(uri);
createdResource.getContents().add(diagram);
IDiagramTypeProvider dtp = GraphitiUi.getExtensionManager().createDiagramTypeProvider(diagram,
"org.activiti.designer.diagram.ActivitiBPMNDiagramTypeProvider"); //$NON-NLS-1$
IFeatureProvider featureProvider = dtp.getFeatureProvider();
BpmnFileReader bpmnFileReader = new BpmnFileReader(bpmnFileName, diagram, featureProvider);
bpmnFileReader.openStream();
bpmnFileReader.readBpmn();
}
示例2: initialize
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public void initialize(IDiagramTypeProvider diagramTypeProvider){
TreeIterator<EObject> iter = EcoreUtil.getAllContents(diagramTypeProvider.getDiagram(), true);
while(iter.hasNext()){
EObject eobject = iter.next();
Object bo = null;
if(eobject instanceof PictogramElement){
bo = diagramTypeProvider.getFeatureProvider().getBusinessObjectForPictogramElement((PictogramElement)eobject);
}
if(bo instanceof StatusNode){
StatusNode node = (StatusNode)bo;
nodes.put(node.getId(), node);
}
}
this.editingDomain = diagramTypeProvider.getDiagramBehavior().getEditingDomain();
for(IValidationStatus status : new ArrayList<IValidationStatus>(statusBindings.values())){
bindStatus(status);
}
}
示例3: PatternFeatureProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public PatternFeatureProvider(IDiagramTypeProvider dtp) {
super(dtp);
//Temporary hack
//TODO: dependency to eu.cloudscaleproject.env.common should be removed!
/*
for(StatusManager.Tool t : StatusManager.Tool.values()){
addPattern(new SectionPattern(t.getDefaultName(), t.getID()));
}
*/
//
addPattern(new CommandPattern());
addPattern(new RequirementPattern());
addPattern(new ActionPattern());
addPattern(new SectionPattern());
addPattern(new ContainerPattern());
addPattern(new NodePattern());
addConnectionPattern(new ConnectorPattern(true));
addConnectionPattern(new ConnectorPattern(false));
}
示例4: ArchitectureDiagramFeatureProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public ArchitectureDiagramFeatureProvider(IDiagramTypeProvider dtp) {
super(dtp);
addPattern(new CpuPattern());
addPattern(new DspPattern());
addPattern(new FpgaPattern());
addPattern(new MediumPattern());
addConnectionPattern(new LinkPattern());
updateFeature = new UpdateDiagramFeature(this);
layoutFeatures = new AutoLayoutFeauture(this);
}
示例5: TriqPaletteRoot
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
/**
*
* @param diagramTypeProvider
* the diagram type provider
*/
public TriqPaletteRoot(IDiagramTypeProvider diagramTypeProvider) {
super();
if (diagramTypeProvider == null) {
throw new IllegalArgumentException("diagramTypeProvider must be specified");
}
this.diagramTypeProvider = diagramTypeProvider;
}
示例6: syncDiagram
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
private void syncDiagram() {
if (diagram == null) {
System.out.println("diagram cannot be null");
return;
}
if (bpmnStorage == null) {
System.out.println("bpmnStorage cannot be null");
return;
}
IDiagramTypeProvider dtp = GraphitiUi.getExtensionManager().createDiagramTypeProvider(diagram,
GraphitiUi.getExtensionManager().getDiagramTypeProviderId(diagram.getDiagramTypeId())); //$NON-NLS-1$
IFeatureProvider featureProvider = dtp.getFeatureProvider();
BpmnParser bpmnParser = readBpmn(bpmnStorage);
if (bpmnParser.process != null) {
updateProcessInDiagram(diagram, bpmnParser.process);
}
if (bpmnParser.bpmnList == null || bpmnParser.bpmnList.size() == 0)
return;
updateFlowElementsInDiagram(diagram, bpmnParser.bpmnList, featureProvider);
if (bpmnParser.sequenceFlowList == null || bpmnParser.sequenceFlowList.size() == 0)
return;
updateSequenceFlowsInDiagram(diagram, bpmnParser.sequenceFlowList);
}
示例7: ActivitiToolBehaviorProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public ActivitiToolBehaviorProvider(IDiagramTypeProvider dtp) {
super(dtp);
// Setup tool mappings to palette entries
toolMapping.put(CreateStartEventFeature.class, PaletteEntry.START_EVENT);
toolMapping.put(CreateTimerStartEventFeature.class, PaletteEntry.TIMER_START_EVENT);
toolMapping.put(CreateAlfrescoStartEventFeature.class, PaletteEntry.ALFRESCO_START_EVENT);
toolMapping.put(CreateEndEventFeature.class, PaletteEntry.END_EVENT);
toolMapping.put(CreateErrorEndEventFeature.class, PaletteEntry.ERROR_END_EVENT);
toolMapping.put(CreateExclusiveGatewayFeature.class, PaletteEntry.EXCLUSIVE_GATEWAY);
toolMapping.put(CreateInclusiveGatewayFeature.class, PaletteEntry.INCLUSIVE_GATEWAY);
toolMapping.put(CreateMailTaskFeature.class, PaletteEntry.MAIL_TASK);
toolMapping.put(CreateManualTaskFeature.class, PaletteEntry.MANUAL_TASK);
toolMapping.put(CreateReceiveTaskFeature.class, PaletteEntry.RECEIVE_TASK);
toolMapping.put(CreateParallelGatewayFeature.class, PaletteEntry.PARALLEL_GATEWAY);
toolMapping.put(CreateScriptTaskFeature.class, PaletteEntry.SCRIPT_TASK);
toolMapping.put(CreateServiceTaskFeature.class, PaletteEntry.SERVICE_TASK);
toolMapping.put(CreateCallActivityFeature.class, PaletteEntry.CALL_ACTIVITY);
toolMapping.put(CreateEmbeddedSubProcessFeature.class, PaletteEntry.SUBPROCESS);
toolMapping.put(CreateUserTaskFeature.class, PaletteEntry.USER_TASK);
toolMapping.put(CreateAlfrescoUserTaskFeature.class, PaletteEntry.ALFRESCO_USER_TASK);
toolMapping.put(CreateBoundaryTimerFeature.class, PaletteEntry.BOUNDARY_TIMER);
toolMapping.put(CreateBoundaryErrorFeature.class, PaletteEntry.ERROR_END_EVENT);
toolMapping.put(CreateTimerCatchingEventFeature.class, PaletteEntry.BOUNDARY_TIMER);
toolMapping.put(CreateBusinessRuleTaskFeature.class, PaletteEntry.BUSINESSRULE_TASK);
toolMapping.put(CreateAlfrescoScriptTaskFeature.class, PaletteEntry.ALFRESCO_SCRIPT_TASK);
toolMapping.put(CreateAlfrescoMailTaskFeature.class, PaletteEntry.ALFRESCO_MAIL_TASK);
// <SecureBPMN>
toolMapping.put(CreateSecurityBodFeature.class, PaletteEntry.SECURITY_BOD);
toolMapping.put(CreateSecuritySodFeature.class, PaletteEntry.SECURITY_SOD);
// </SecureBPMN>
}
示例8: PatternFeatureProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public PatternFeatureProvider(IDiagramTypeProvider dtp) {
super(dtp);
addPattern(new CommandPattern());
addPattern(new RequirementPattern());
addPattern(new ActionPattern());
addPattern(new SectionPattern());
addPattern(new ContainerPattern());
addPattern(new NodePattern());
addConnectionPattern(new ConnectorPattern(true));
addConnectionPattern(new ConnectorPattern(false));
}
示例9: ArchitectureDiagramToolBehaviorProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public ArchitectureDiagramToolBehaviorProvider(IDiagramTypeProvider diagramTypeProvider) {
super(diagramTypeProvider);
}
示例10: getDiagramTypeProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public IDiagramTypeProvider getDiagramTypeProvider() {
return diagramTypeProvider;
}
示例11: execute
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public void execute() {
IDiagramTypeProvider dtp = GraphitiUi.getExtensionManager().createDiagramTypeProvider(diagram, TriqDiagramTypeProvider.ID);
IFeatureProvider featureProvider = dtp.getFeatureProvider();
// get the root compositeactor of the diagram, where we must add the extra ptolemy element
CompositeActor model = (CompositeActor) featureProvider.getBusinessObjectForPictogramElement(diagram);
// if (ptolemyElement instanceof ptolemy.actor.CompositeActor) {
// ptolemy.actor.CompositeActor compPtElem = (ptolemy.actor.CompositeActor) ptolemyElement;
// // Get the director as a first trial to add a new diagram element from ptolemy model elements
// Director director = compPtElem.getDirector();
// createModelElement(model, featureProvider, director, model);
//
//
// for (IORelation rel : (List<IORelation>) compPtElem.relationList()) {
// relationMap.put(rel.getFullName(), createRelation(model, featureProvider, rel));
// }
//
// for (IOPort p : (List<IOPort>) compPtElem.portList()) {
// createModelElement(model, featureProvider, p, model);
// }
//
// for (Entity entity : compPtElem.entityList(Entity.class)) {
// createModelElement(model, featureProvider, entity, model);
// }
//
// // we don't import all attributes as lots of them are ptolemy-internal
// // TODO find something to resolve errors related to the order of adding parameters
// // that contain expressions with references to other parameters that may be later in the list.
//
// // First we take parameters ...
// for (Parameter p : ptolemyElement.attributeList(Parameter.class)) {
// createModelElement(model, featureProvider, p, model);
// }
// // ... and annotations (i.e. TextAttributes)
// for (TextAttribute a : ptolemyElement.attributeList(TextAttribute.class)) {
// createModelElement(model, featureProvider, a, model);
// }
//
// linkRelations(compPtElem, model, featureProvider);
// } else {
createModelElement(model, featureProvider, ptolemyElement, model);
// }
}
示例12: TriqFeatureProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
/**
* @param dtp
*/
public TriqFeatureProvider(IDiagramTypeProvider dtp) {
super(dtp);
}
示例13: StatemachineFeatureProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public StatemachineFeatureProvider(final IDiagramTypeProvider dtp) {
super(dtp);
}
示例14: ActivitiBPMNFeatureProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public ActivitiBPMNFeatureProvider(IDiagramTypeProvider dtp) {
super(dtp);
}
示例15: ToolBehaviorProvider
import org.eclipse.graphiti.dt.IDiagramTypeProvider; //导入依赖的package包/类
public ToolBehaviorProvider(IDiagramTypeProvider diagramTypeProvider) {
super(diagramTypeProvider);
}