Package org.objectstyle.wolips.eomodeler.core.model

Examples of org.objectstyle.wolips.eomodeler.core.model.EOModelObject$PropertyChangeRepeater


      groupFailureLabelData.horizontalIndent = 3;
      groupFailureComposite.setLayoutData(groupFailureLabelData);
     
      Label failedObjectLabel = new Label(groupFailureComposite, SWT.NONE);
      failedObjectLabel.setBackground(failuresComposite.getBackground());
      EOModelObject failedObject = failure.getFailedObject();
      if (failedObject != null) {
        failedObjectLabel.setText(failedObject.getFullyQualifiedName());
      }
      else {
        failedObjectLabel.setText("General Failure");
      }
      failedObjectLabel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
View Full Code Here


      }
    }

    protected void doubleSelectionOccurred(ISelection _selection) {
      EORelationship relationship = (EORelationship) ((IStructuredSelection) _selection).getFirstElement();
      EOModelObject jumpToModelObject = null;
      EORelationship inverseRelationship = relationship.getInverseRelationship();
      if (inverseRelationship != null) {
        jumpToModelObject = inverseRelationship;
      } else {
        EOEntity destination = relationship.getDestination();
View Full Code Here

  public static Set<EOModelObject> getRecommendedDeletions(Object[] selectedObjects) {
    Set<EOModelReferenceFailure> beforeReferenceFailures = EOModelUtils.getReferenceFailures(selectedObjects);
    Set<EOModelObject> allRecommendedObjectsSet = new HashSet<EOModelObject>();
    for (Object selectedObject : selectedObjects) {
      if (selectedObject instanceof EOModelObject) {
        EOModelObject modelObject = (EOModelObject) selectedObject;
        allRecommendedObjectsSet.add(modelObject);
      }
    }
    for (EOModelReferenceFailure referenceFailure : beforeReferenceFailures) {
      Set<EOModelObject> recommendedDeletions = referenceFailure.getRecommendedDeletions();
View Full Code Here

  public static Set<EOModelReferenceFailure> getReferenceFailures(Object[] selectedObjects) {
    Set<EOModelObject> deletedObjects = new HashSet<EOModelObject>();
    Set<EOModelReferenceFailure> referenceFailures = new HashSet<EOModelReferenceFailure>();
    for (Object selectedObject : selectedObjects) {
      if (selectedObject instanceof EOModelObject) {
        EOModelObject modelObject = (EOModelObject) selectedObject;
        deletedObjects.add(modelObject);
        referenceFailures.addAll(modelObject.getReferenceFailures());
      }
    }
   
    for (EOModelObject deletedObject : deletedObjects) {
      for (EOModelReferenceFailure referenceFailure : new HashSet<EOModelReferenceFailure>(referenceFailures)) {
View Full Code Here

        if (delete) {
          try {
            SimpleCompositeOperation compositeOperation = new SimpleCompositeOperation(EOModelUtils.getOperationLabel("Delete", Arrays.asList(selectedObjects)));
            for (Object obj : selectedObjects) {
              if (obj instanceof EOModelObject) {
                EOModelObject eoModelObject = (EOModelObject) obj;
                DeleteOperation operation = new DeleteOperation(eoModelObject);
                compositeOperation.add(operation);
              }
            }
            compositeOperation.addContext(EOModelUtils.getUndoContext(selectedObjects));
View Full Code Here

    String label = model == null ? "No Model" : model.getName();
    return new ObjectUndoContext(model, label);
  }

  public static EOModelObject getRelated(Class<? extends EOModelObject> type, EOModelObject obj) {
    EOModelObject relatedObj;
    if (EOModel.class.isAssignableFrom(type)) {
      relatedObj = EOModelUtils.getRelatedModel(obj);
    } else if (EOEntity.class.isAssignableFrom(type)) {
      relatedObj = EOModelUtils.getRelatedEntity(obj);
    } else if (EOStoredProcedure.class.isAssignableFrom(type)) {
View Full Code Here

      } else if (focusControl instanceof StyledText) {
        ((StyledText) focusControl).paste();
        return;
      }

      EOModelObject selectedObject = (EOModelObject) getSelectedObject();
      ISelection pastedSelection = LocalSelectionTransfer.getTransfer().getSelection();
      if (pastedSelection != null) {
        Object[] clipboardObjects = ((IStructuredSelection) pastedSelection).toArray();
        Arrays.sort(clipboardObjects, new PasteOrderComparator());

        SimpleCompositeOperation pasteOperation = new SimpleCompositeOperation(EOModelUtils.getOperationLabel("Paste", Arrays.asList(clipboardObjects)));
        for (Object clipboardObject : clipboardObjects) {
          if (clipboardObject instanceof EOModelObject) {
            EOModelObject eoModelObject = (EOModelObject) clipboardObject;
            Class<EOModelObject> modelParentClass = eoModelObject._getModelParentType();
            EOModelObject pasteIntoObject = EOModelUtils.getRelated(modelParentClass, selectedObject);
            if (pasteIntoObject != null) {
              EOModelObject clonedPasteObject = eoModelObject._cloneModelObject();
              pasteOperation.add(new AddOperation(pasteIntoObject, clonedPasteObject));
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.objectstyle.wolips.eomodeler.core.model.EOModelObject$PropertyChangeRepeater

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.