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

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


   
    DiagramEditor de = (DiagramEditor) ep;
    Diagram d = di.getDiagram();
   
    de.getDiagramTypeProvider().getFeatureProvider(
        ).updateIfPossible(new UpdateContext(d));
   
    return de;
  }
View Full Code Here


  @Override
  public void updatePictogramElements(PictogramElement[] dirtyPes) {
    final IDiagramTypeProvider dtp = getDiagramTypeProvider();
    final IFeatureProvider fp = dtp.getFeatureProvider();
    for (PictogramElement pe : dirtyPes) {
      final UpdateContext updateContext = new UpdateContext(pe);
      // fp.updateIfPossible(updateContext);
      fp.updateIfPossibleAndNeeded(updateContext);
    }
  }
View Full Code Here

    }
    PictogramElement pe = selectedNode instanceof RouteSupport ? designEditor.getDiagram() : designEditor.getFeatureProvider().getPictogramElementForBusinessObject(selectedNode);
    if (pe == null) {
      Activator.getLogger().debug("Warning could not find PictogramElement for selectedNode: " + selectedNode);
    }
    UpdateContext ctx = new UpdateContext(pe);
    IUpdateFeature updateFeature = designEditor.getFeatureProvider().getUpdateFeature(ctx);
    updateFeature.update(ctx);
  }
View Full Code Here

      IFeatureProvider featureProvider = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();

      ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
      for (Anchor anchor : gatewayShape.getAnchors()) {
        for (Connection connection : anchor.getIncomingConnections() ) {
          IUpdateContext updateCtx = new UpdateContext(connection);
          IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
          if (updateFeature != null) {
            boolean ret = updateFeature.canUpdate(updateCtx);
            if (ret)
              return ret;
          }
        }
        for (Connection connection : anchor.getOutgoingConnections() ) {
          IUpdateContext updateCtx = new UpdateContext(connection);
          IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
          if (updateFeature != null) {
            boolean ret = updateFeature.canUpdate(updateCtx);
            if (ret)
              return ret;
View Full Code Here

      IFeatureProvider featureProvider = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();

      ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
      for (Anchor anchor : gatewayShape.getAnchors()) {
        for (Connection connection : anchor.getIncomingConnections() ) {
          IUpdateContext updateCtx = new UpdateContext(connection);
          IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
          if (updateFeature != null) {
            IReason ret = updateFeature.updateNeeded(updateCtx);
            if (ret.toBoolean())
              return ret;
          }
        }
        for (Connection connection : anchor.getOutgoingConnections() ) {
          IUpdateContext updateCtx = new UpdateContext(connection);
          IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
          if (updateFeature != null) {
            IReason ret = updateFeature.updateNeeded(updateCtx);
            if (ret.toBoolean())
              return ret;
View Full Code Here

      IFeatureProvider featureProvider = getDiagramEditor().getDiagramTypeProvider().getFeatureProvider();

      ContainerShape gatewayShape = (ContainerShape) context.getPictogramElement();
      for (Anchor anchor : gatewayShape.getAnchors()) {
        for (Connection connection : anchor.getIncomingConnections() ) {
          IUpdateContext updateCtx = new UpdateContext(connection);
          IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
          if (updateFeature != null) {
            updateFeature.update(updateCtx);
          }
        }
        for (Connection connection : anchor.getOutgoingConnections() ) {
          IUpdateContext updateCtx = new UpdateContext(connection);
          IUpdateFeature updateFeature = featureProvider.getUpdateFeature(updateCtx);
          if (updateFeature != null) {
            updateFeature.update(updateCtx);
          }
        }
View Full Code Here

  @Override
  public void updatePictogramElements(PictogramElement[] pes) {
    final IFeatureProvider fp = diagramTypeProvider.getFeatureProvider();

    for (PictogramElement pe : pes) {
      final UpdateContext updateContext = new UpdateContext(pe);

      fp.updateIfPossibleAndNeeded(updateContext);
    }
  }
View Full Code Here

TOP

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

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.