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

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


      return;
    }

    super.setInput(part, selection);
    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    EOEntity entity = (EOEntity) selectedObject;
    if (!ComparisonUtils.equals(entity, myEntity)) {
      disposeBindings();

      myEntity = entity;
      if (myEntity != null) {
View Full Code Here


import org.eclipse.jface.viewers.Viewer;
import org.objectstyle.wolips.eomodeler.core.model.EOEntity;

public class EOFetchSpecsContentProvider implements IStructuredContentProvider {
  public Object[] getElements(Object _inputElement) {
    EOEntity entity = (EOEntity) _inputElement;
    Object[] fetchSpecs = entity.getFetchSpecs().toArray();
    return fetchSpecs;
  }
View Full Code Here

      return;
    }
   
    super.setInput(part, selection);
    Object selectedObject = ((IStructuredSelection) selection).getFirstElement();
    EOEntity entity = (EOEntity) selectedObject;
    if (!ComparisonUtils.equals(entity, myEntity)) {
      disposeBindings();

      myEntity = entity;
      if (myEntity != null) {
View Full Code Here

    }
    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

  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

      // 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

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

    // 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

        _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

      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

TOP

Related Classes of org.objectstyle.wolips.eomodeler.core.model.EOEntity

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.