Package org.eclipse.emf.transaction

Examples of org.eclipse.emf.transaction.RecordingCommand


        final EObject container = baseElement.eContainer();
        final Object eGet = container.eGet(baseElement.eContainingFeature());
        TransactionalEditingDomain domain = diagramEditor.getEditingDomain();

        domain.getCommandStack().execute(new RecordingCommand(domain) {
          @SuppressWarnings("rawtypes")
          @Override
          protected void doExecute() {
            List<PictogramElement> pictogramElements = GraphitiUi.getLinkService().getPictogramElements(
                diagramEditor.getDiagramTypeProvider().getDiagram(), baseElement);
View Full Code Here


      @Override
      public void handleValueChange(final ValueChangeEvent e) {

        if (!text.getText().equals(be.eGet(a))) {
          TransactionalEditingDomain editingDomain = bpmn2Editor.getEditingDomain();
          editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
            @Override
            protected void doExecute() {
              be.eSet(a, e.diff.getNewValue());
            }
          });
View Full Code Here

      @Override
      public void handleValueChange(ValueChangeEvent event) {

        if (!object.eGet(a).equals(button.getSelection())) {
          TransactionalEditingDomain editingDomain = bpmn2Editor.getEditingDomain();
          editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
            @Override
            protected void doExecute() {
              object.eSet(a, button.getSelection());
            }
          });
View Full Code Here

        }
      }

      @SuppressWarnings("restriction")
      private void setFeatureValue(final int i) {
        RecordingCommand command = new RecordingCommand(bpmn2Editor.getEditingDomain()) {
          @Override
          protected void doExecute() {
            be.eSet(a, i);
          }
        };
View Full Code Here

        }
      }

      public void updateEObject(final List<EObject> refs, final EList<EObject> result) {
        TransactionalEditingDomain domain = bpmn2Editor.getEditingDomain();
        domain.getCommandStack().execute(new RecordingCommand(domain) {
          @Override
          protected void doExecute() {

            if (result == null) {
              refs.clear();
View Full Code Here

        }
      }

      public void updateEObject(final Object result) {
        TransactionalEditingDomain domain = bpmn2Editor.getEditingDomain();
        domain.getCommandStack().execute(new RecordingCommand(domain) {
          @Override
          protected void doExecute() {
            be.eSet(reference, result);
          }
        });
      }
     
      public void updateGatewayDirection(final Object result) {
        TransactionalEditingDomain domain = bpmn2Editor.getEditingDomain();
        domain.getCommandStack().execute(new RecordingCommand(domain) {
          @Override
          protected void doExecute() {
            GatewayDirection direction = (GatewayDirection) result;
            be.eSet(reference, direction);
          }
View Full Code Here

    final TransactionalEditingDomain editingDomain = DiagramEditorFactory.createResourceSetAndEditingDomain();
    final ResourceSet resourceSet = editingDomain.getResourceSet();
    // Create a resource for this file.
    final Resource resource = resourceSet.createResource(diagramResourceUri);
    final CommandStack commandStack = editingDomain.getCommandStack();
    commandStack.execute(new RecordingCommand(editingDomain) {

      @Override
      protected void doExecute() {
        resource.setTrackingModification(true);
        resource.getContents().add(diagram);
View Full Code Here

   */
  public void generateFromDI() {
    final List<BPMNDiagram> diagrams = modelHandler.getAll(BPMNDiagram.class);
   
    elements = new HashMap<BaseElement, PictogramElement>();
    domain.getCommandStack().execute(new RecordingCommand(domain) {
      @Override
      protected void doExecute() {

        if (diagrams.size() == 0) {
          BPMNPlane plane = BpmnDiFactory.eINSTANCE.createBPMNPlane();
View Full Code Here

        ModelUtil.setID(participant,resource);
        participant.setName("Internal");
        collaboration.getParticipants().add(participant);
        definitions.getRootElements().add(collaboration);

        domain.getCommandStack().execute(new RecordingCommand(domain) {
          @Override
          protected void doExecute() {
            docRoot.setDefinitions(definitions);
            resource.getContents().add(docRoot);
          }
View Full Code Here

    TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(resource);
    final Collaboration collaboration = FACTORY.createCollaboration();
//    collaboration.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(collaboration,resource);
    if (domain != null) {
      domain.getCommandStack().execute(new RecordingCommand(domain) {

        @Override
        protected void doExecute() {
          addCollaborationToRootElements(rootElements, collaboration);
        }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.transaction.RecordingCommand

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.