Package org.eclipse.graphiti.features.context.impl

Examples of org.eclipse.graphiti.features.context.impl.CreateContext


                  if (ic instanceof CreatePEFeature) {
                    peFeat = (CreatePEFeature) ic;
                  }
                }
                assertNotNull(peFeat);
                CreateContext cc = new CreateContext();
                cc.setTargetContainer(d);
               
                assertTrue(peFeat.canCreate(cc));
                peFeat.execute(cc);
              }
            });
View Full Code Here


                    litFeat =
                        (CreateStringLiteralFeature) ic;
                  }
                }
                assertNotNull(litFeat);
                CreateContext cc = new CreateContext();
                cc.setTargetContainer(d);
               
                assertTrue(litFeat.canCreate(cc));
                litFeat.execute(cc);
              }
            });
View Full Code Here

                  if (ic instanceof CreateStringLiteralFeature) {
                    litFeat = (CreateStringLiteralFeature) ic;
                  }
                }
                assertNotNull(litFeat);
                CreateContext cc = new CreateContext();
                cc.setTargetContainer(d);
               
                assertTrue(litFeat.canCreate(cc));
                litFeat.execute(cc);
              }
            });
View Full Code Here

    Shape element = (Shape) context.getProperty("org.activiti.designer.changetype.pictogram");
    GraphicsAlgorithm elementGraphics = element.getGraphicsAlgorithm();
    int x = elementGraphics.getX();
    int y = elementGraphics.getY();
   
    CreateContext taskContext = new CreateContext();
    ContainerShape targetContainer = (ContainerShape) element.getContainer();
    taskContext.setTargetContainer(targetContainer);
    taskContext.setLocation(x, y);
    taskContext.setHeight(elementGraphics.getHeight());
    taskContext.setWidth(elementGraphics.getWidth());
   
    FlowNode oldObject = (FlowNode) getFeatureProvider().getBusinessObjectForPictogramElement(element);
    if (oldObject instanceof BoundaryEvent) {
      BoundaryEvent boundaryEvent = (BoundaryEvent) oldObject;
      ContainerShape parentShape = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(boundaryEvent.getAttachedToRef());
      taskContext.setTargetContainer(parentShape);
      taskContext.setLocation(x - parentShape.getGraphicsAlgorithm().getX(), y - parentShape.getGraphicsAlgorithm().getY());
    }
   
    List<SequenceFlow> sourceList = oldObject.getOutgoingFlows();
    List<SequenceFlow> targetList = oldObject.getIncomingFlows();
   
    taskContext.putProperty("org.activiti.designer.changetype.sourceflows", sourceList);
    taskContext.putProperty("org.activiti.designer.changetype.targetflows", targetList);
    taskContext.putProperty("org.activiti.designer.changetype.name", oldObject.getName());
   
    targetContainer.getChildren().remove(element);
    List<Process> processes = ModelHandler.getModel(EcoreUtil.getURI(getDiagram())).getBpmnModel().getProcesses();
    for (Process process : processes) {
      process.removeFlowElement(oldObject.getId());
View Full Code Here

    if (pe.eContainer() instanceof ContainerShape == false) {
      return data;
    }

    CreateContext taskContext = new CreateContext();
    taskContext.setTargetContainer((ContainerShape) pe.eContainer());
    taskContext.putProperty("org.activiti.designer.connectionContext", connectionContext);

    if (bo instanceof StartEvent || bo instanceof Task || bo instanceof CallActivity || bo instanceof Gateway) {

      CreateUserTaskFeature userTaskfeature = new CreateUserTaskFeature(getFeatureProvider());
      ContextButtonEntry newUserTaskButton = new ContextButtonEntry(userTaskfeature, taskContext);
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.features.context.impl.CreateContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.