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

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


              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();

                final DeleteContext dc = new DeleteContext(
                    deleteShape);
                final IDeleteFeature df =
                    de.getDiagramTypeProvider(
                    ).getFeatureProvider().getDeleteFeature(
                        dc);
View Full Code Here


        //Not supposed to use MultiDelete, but otherwise the user gets
        //multiple requests
        MultiDeleteInfo mi = new MultiDeleteInfo(
            false, false, toBeDeleted.size());
        for (Connection c : toBeDeleted) {
          DeleteContext dc = new DeleteContext(c);
          dc.setMultiDeleteInfo(mi);
          IDeleteFeature del = getFeatureProvider().getDeleteFeature(dc);
          if (del.canDelete(dc)) {
            del.delete(dc);
          }
        }
View Full Code Here

              protected void doExecute() {
                IDiagramTypeProvider dtp =
                    de.getDiagramTypeProvider();
                IFeatureProvider fp = dtp.getFeatureProvider();

                final DeleteContext dc = new DeleteContext(
                    deleteShape);
                final IDeleteFeature df =
                    de.getDiagramTypeProvider(
                    ).getFeatureProvider().getDeleteFeature(
                        dc);
View Full Code Here

          toDelete.add(c);
        }
      }
     
      for (PictogramElement pe : toDelete) {
      DeleteContext dc = new DeleteContext(pe);
      IDeleteFeature del = getFeatureProvider().getDeleteFeature(dc);
      if (del.canDelete(dc)) {
        del.delete(dc);
        ret = true;
      }
View Full Code Here

      //Not supposed to use MultiDelete, but otherwise the user gets
      //multiple requests
      MultiDeleteInfo mi = new MultiDeleteInfo(
          false, false, toBeDeleted.size());
      for (Connection c : toBeDeleted) {
        DeleteContext dc = new DeleteContext(c);
        dc.setMultiDeleteInfo(mi);
        IDeleteFeature del = getFeatureProvider().getDeleteFeature(dc);
        if (del.canDelete(dc)) {
          del.delete(dc);
        }
      }
View Full Code Here

  protected void doExecute() {
    if (selectedNode != null) {
      PictogramElement[] pes = designEditor.getDiagramTypeProvider().getFeatureProvider().getAllPictogramElementsForBusinessObject(selectedNode);
      if (pes != null && pes.length>0) {
        for (PictogramElement pe : pes) {
          DeleteContext ctx = new DeleteContext(pe);
          IDeleteFeature f = designEditor.getFeatureProvider().getDeleteFeature(ctx);
          if (f.canDelete(ctx)) {
            f.delete(ctx);
          }
        }
View Full Code Here

        Activity activity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
            Activity.class);
        new AbstractBoundaryEventOperation() {
          @Override
          protected void doWorkInternal(ContainerShape container) {
            IDeleteContext delete = new DeleteContext(container);
            getFeatureProvider().getDeleteFeature(delete).delete(delete);
          }
        }.doWork(activity, getDiagram());
        super.delete(context);
      }
View Full Code Here

  private void deleteContainer(IFeatureProvider fp, ContainerShape cShape) {
    Object[] children = cShape.getChildren().toArray();
    for (Object shape : children) {
      if (shape instanceof ContainerShape) {
        DeleteContext context = new DeleteContext((PictogramElement) shape);
        fp.getDeleteFeature(context).delete(context);
      }
    }
  }
View Full Code Here

  private void deleteConnections(IFeatureProvider fp, EList<Connection> connections) {
    List<Connection> con = new ArrayList<Connection>();
    con.addAll(connections);
    for (Connection connection : con) {
      IDeleteContext conDelete = new DeleteContext(connection);
      fp.getDeleteFeature(conDelete).delete(conDelete);
    }
  }
View Full Code Here

TOP

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

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.