Examples of EOEntity


Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

    }
    if (!"None".equals(_pluginName) && !"".equals(_pluginName)) {
      IEclipseFramework pluginFramework = frameworkAdapter.getPluginFrameworks().get(_pluginName);
      frameworkAdapter.addFrameworks(pluginFramework);
      String selectedPrototypeEntityName = "EO" + _adaptorName + _pluginName + "Prototypes";
      EOEntity selectedPrototypeEntity = modelGroup.getEntityNamed(selectedPrototypeEntityName);
      if (selectedPrototypeEntity != null) {
        EODatabaseConfig activeConfig = model.getActiveDatabaseConfig();
        if (activeConfig != null) {
          activeConfig.setPrototype(selectedPrototypeEntity);
        }
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

  public String getText(Object _element) {
    String text = null;
    if (EOEntityListContentProvider.BLANK_ENTITY.equals(_element)) {
      // DO NOTHING
    } else if (_element instanceof EOEntity) {
      EOEntity entity = (EOEntity) _element;
      text = entity.getName();
    }
    return text;
  }
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

      // sourceEntityPickerData.horizontalSpan = 2;
      sourceEntityPickerData.verticalIndent = 15;
      sourceEntityPicker.setLayoutData(sourceEntityPickerData);
      sourceEntityPicker.addSelectionChangedListener(new ISelectionChangedListener() {
        public void selectionChanged(SelectionChangedEvent event) {
          EOEntity entity = (EOEntity) ((IStructuredSelection) event.getSelection()).getFirstElement();
          setSourceEntity(entity);
        }
      });

      EntityPicker destinationEntityPicker = new EntityPicker(relationshipDialogArea, SWT.NONE, false);
      destinationEntityPicker.setModelGroup(_modelGroup);
      destinationEntityPicker.setEntity(_destinationEntity);
      if (_destinationEntity == null && _sourceEntity != null) {
        destinationEntityPicker.setModel(_sourceEntity.getModel());
      }
      GridData destinationEntityPickerData = new GridData(GridData.FILL_HORIZONTAL);
      // destinationEntityPickerData.horizontalSpan = 2;
      destinationEntityPickerData.verticalIndent = 15;
      destinationEntityPicker.setLayoutData(destinationEntityPickerData);
      destinationEntityPicker.addSelectionChangedListener(new ISelectionChangedListener() {
        public void selectionChanged(SelectionChangedEvent event) {
          EOEntity entity = (EOEntity) ((IStructuredSelection) event.getSelection()).getFirstElement();
          setDestinationEntity(entity);
        }
      });
    }
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

import org.objectstyle.wolips.eomodeler.core.utils.EOModelUtils;
import org.objectstyle.wolips.eomodeler.editors.entity.CreateRelationshipDialog;

public class NewRelationshipAction extends EMAction {
  public void run(IAction action) {
    EOEntity entity1 = null;
    EOEntity entity2 = null;
    Object[] selectedObjects = getSelectedObjects();
    if (selectedObjects != null) {
      if (selectedObjects.length == 1) {
        entity1 = EOModelUtils.getRelatedEntity(selectedObjects[0]);
      } else if (selectedObjects.length == 2) {
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

    // EOAttribute attribute = (EOAttribute) _element;
    // if (attribute.isInherited()) {
    // canModify = false;
    // }
    if (EOAttribute.PROTOTYPE.equals(_property)) {
      EOEntity entity = (EOEntity) getTableViewer().getInput();
      myPrototypeNames = new LinkedList<String>(entity.getModel().getPrototypeAttributeNames());
      myPrototypeNames.add(0, EOAttributesCellModifier.NO_PROTOYPE_VALUE);
      String[] prototypeNames = myPrototypeNames.toArray(new String[myPrototypeNames.size()]);
      int columnNumber = TableUtils.getColumnNumberForTablePropertyNamed(EOAttribute.class.getName(), _property);
      if (columnNumber != -1) {
        KeyComboBoxCellEditor cellEditor = (KeyComboBoxCellEditor) myCellEditors[columnNumber];
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

        _relationship.addPropertyChangeListener(EORelationship.JOINS, _joinsListener);
        _relationship.addPropertyChangeListener(EORelationship.DEFINITION, _joinsListener);
        _joinsTableEditor.setRelationship(_relationship);
        _modelComboViewer.setInput(_relationship);
        _entityComboViewer.setInput(_relationship);
        EOEntity destinationEntity = _relationship.getDestination();
        if (destinationEntity != null) {
          _modelComboViewer.setSelection(new StructuredSelection(destinationEntity.getModel()));
        }

        _bindingContext = new DataBindingContext();
        _bindingContext.bindValue(SWTObservables.observeText(_nameText, SWT.Modify), BeansObservables.observeValue(_relationship, EORelationship.NAME), null, null);
        _bindingContext.bindValue(SWTObservables.observeText(_definitionText, SWT.Modify), BeansObservables.observeValue(_relationship, EORelationship.DEFINITION), null, null);
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

      for (Iterator it = files.iterator(); it.hasNext();) {
        IResource resource = (IResource)it.next();
        IFile file = null;
        if (!"eomodeld".equals(resource.getFileExtension()) && resource instanceof IFile) {
          if (modelEditor != null) {
            EOEntity entity = modelEditor.getModel().getModelGroup().getEntityNamed(ResourceUtilities.getFileNameWithoutExtension(resource));
            if (entity != null) {
              modelEditor.setSelection(new StructuredSelection(entity));
            }
          }
          else {
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

    for (EOModel model : _modelGroup.getModels()) {
      for (EOEntity entity : model.getEntities()) {
        if (entity.isPrototype()) {
          continue;
        }
        EOEntity parentEntity = entity.getParent();
        if (parentEntity != null) {
          _context.put("id", _ids.get(entity.getName() + "Parent"));
          _context.put("fromID", _ids.get(entity));
          _context.put("toID", _ids.get(parentEntity));
          _outputWriter.append(WOLipsVelocityUtils.writeTemplateToString(_velocityEngine, _context, "graffle/subEntity.vm"));
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

          if (entity.isPrototype()) {
            continue;
          }
          _ids.put(entity, nextID());
          _ids.put(entity.getName() + "Group", nextID());
          EOEntity parentEntity = entity.getParent();
          if (parentEntity != null) {
            _ids.put(entity.getName() + "Parent", nextID());
          }
          for (EOAttribute attribute : entity.getAttributes()) {
            _ids.put(attribute, nextID());
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EOEntity

import org.objectstyle.wolips.eomodeler.core.model.EOAttribute;
import org.objectstyle.wolips.eomodeler.core.model.EOEntity;

public class EOAttributesContentProvider implements IStructuredContentProvider {
  public Object[] getElements(Object _inputElement) {
    EOEntity entity = (EOEntity) _inputElement;
    Set<EOAttribute> attributesList = entity.getAttributes();
    EOAttribute[] attributes = attributesList.toArray(new EOAttribute[attributesList.size()]);
    return attributes;
  }
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.