Examples of canAdd()


Examples of com.cburch.logisim.proj.Dependencies.canAdd()

      return;
    }
    if (factory instanceof SubcircuitFactory) {
      SubcircuitFactory circFact = (SubcircuitFactory) factory;
      Dependencies depends = canvas.getProject().getDependencies();
      if (!depends.canAdd(circ, circFact.getSubcircuit())) {
        canvas.setErrorMessage(Strings.getter("circularError"));
        return;
      }
    }
View Full Code Here

Examples of com.cburch.logisim.proj.Dependencies.canAdd()

            return;
        }
        if (factory instanceof SubcircuitFactory) {
            SubcircuitFactory circFact = (SubcircuitFactory) factory;
            Dependencies depends = canvas.getProject().getDependencies();
            if (!depends.canAdd(circ, circFact.getSubcircuit())) {
                canvas.setErrorMessage(getFromLocale("circularError"), 0, 0);
                return;
            }
        }
View Full Code Here

Examples of com.cloudhopper.commons.util.BeanProperty.canAdd()

                    throw new PropertyPermissionException(propertyName, node.getPath(), obj.getClass(), "Not permitted to add or set property [" + propertyName + "]");
                }

                // if we can "add" this property, then turn off checkForDuplicates
                // we also don't check for duplicates in the case of a collection
                if (ch != null || property.canAdd()) {
                    checkForDuplicates = false;
                }
               
                // was this property already previously set?
                // only use this check if an "add" method doesn't exist for the bean
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

    addContext.setX(x);
    addContext.setY(y);
    y += 100;

    IAddFeature addFeature = featureProvider.getAddFeature(addContext);
    if (addFeature.canAdd(addContext)) {
      PictogramElement destState = null;
      if (processedNodes.contains(node) == false) {
        destState = addFeature.add(addContext);
      } else {
        destState = featureProvider.getPictogramElementForBusinessObject(node);
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

    addContext.setTargetContainer(getDiagram());

    // execute the add to diagram action
    IAddFeature addFeature = getFeatureProvider().getAddFeature(addContext);
    PictogramElement newNode = null;
    if (addFeature.canAdd(addContext)) {
      newNode = addFeature.add(addContext);
      if (newNode != null) {
        RouteSupport selectedRoute = Activator.getDiagramEditor().getSelectedRoute();
        if (selectedRoute != null) {
          selectedRoute.addChild(node);
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

    } else {
      context.setTargetContainer(diagram);
      context.setLocation((int) shape.getBounds().getX(), (int) shape.getBounds().getY());
    }

    if (addFeature.canAdd(context)) {
      PictogramElement newContainer = addFeature.add(context);
      featureProvider.link(newContainer, new Object[] { bpmnElement, shape });
      if (bpmnElement instanceof Participant) {
        elements.put(((Participant) bpmnElement).getProcessRef(), newContainer);
      }
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

        AddContext context = new AddContext();
        context.setTargetContainer((ContainerShape) newContainer);
        context.setNewObject(obj);

        IAddFeature aFeat = featureProvider.getAddFeature(context);
        if (aFeat != null && aFeat.canAdd(context)) {
          aFeat.add(context);
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

    AddConnectionContext context = new AddConnectionContext(sourceAnchor, targetAnchor);
    context.setNewObject(bpmnEdge.getBpmnElement());

    IAddFeature addFeature = featureProvider.getAddFeature(context);
    if (addFeature != null && addFeature.canAdd(context)) {
      context.putProperty(IMPORT_PROPERTY, true);
      Connection connection = (Connection) addFeature.add(context);

      if (connection instanceof FreeFormConnectionImpl) {
        FreeFormConnectionImpl freeForm = (FreeFormConnectionImpl) connection;
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

    IAddFeature addFeature = getFeatureProvider().getAddFeature(laneContext);
    laneContext.setNewObject(lane);
    laneContext.setSize(poolElement.getGraphicsAlgorithm().getWidth() - 20, poolElement.getGraphicsAlgorithm().getHeight());
    laneContext.setTargetContainer((ContainerShape) poolElement);
    laneContext.setLocation(20, 0);
    if (addFeature.canAdd(laneContext)) {
      PictogramElement laneContainer = addFeature.add(laneContext);
      getFeatureProvider().link(laneContainer, new Object[] { lane });
    }

    // return newly created business object(s)
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

    }

    context.setLocation(x, y);

    PictogramElement pictElement = null;
    if (addFeature.canAdd(context)) {
      pictElement = addFeature.add(context);
      featureProvider.link(pictElement, new Object[] { element });
    }

    return pictElement;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.