Examples of ModelElement


Examples of com.volantis.mcs.protocols.menu.model.ModelElement

                builder.setElementDetails(elementName, id, styles);
            }

            // javadoc inherited
            public void verify() throws Exception {
                ModelElement modelElement = (ModelElement)getCurrentEntity();

                ElementDetails elementDetails =
                        modelElement.getElementDetails();

                assertEquals((Object)elementName,
                             elementDetails.getElementName());
                assertEquals((Object)id,
                             elementDetails.getId());
View Full Code Here

Examples of de.hpi.eworld.model.db.data.ModelElement

  private void addModelElements(int n, ModelManager instance)
  {
    Random rand = new Random();
    for(int i = 0 ; i < n; i++)
    {
      ModelElement e = new NodeModel(rand.nextDouble(), rand.nextDouble());
      instance.addModelElement(e);
    }
  }
View Full Code Here

Examples of de.hpi.eworld.model.db.data.ModelElement

      modelManager.setChanged();
      modelManager.notifyObservers(new ObserverNotification(NotificationType.startBatchProcess));
      modelManager.clearChanged();

      for (final Object obj : items) {
        final ModelElement me = (ModelElement) obj;
        modelManager.addModelElement(me);
      }

      modelManager.setSimulationStartTime(ppcModel.getSimulationStartTime());
      modelManager.setSimulationEndTime(ppcModel.getSimulationEndTime());
View Full Code Here

Examples of de.hpi.eworld.model.db.data.ModelElement

     * The Items method getAdjustedAssociatedElement() creates and
     * initializes a new ModelElement.getAdjustedAssociatedElement()
     * computes the location and all necessary attributes of the
     * ModelElement.
     */
    ModelElement model = item.getAdjustedAssociatedElement(globalPoint, this);
    if (!ModelManager.getInstance().addModelElement(model)) {
      logger.error("ModelElement could not be added to the ModelManager");
    } else {
      getGraphModel().getGraph().repaint();
    }
View Full Code Here

Examples of org.andromda.core.cartridge.template.ModelElement

        // - handle the templates WITH model elements
        if (templateModelElements != null && !templateModelElements.isEmpty())
        {
            for (final Iterator iterator = templateModelElements.getModelElements().iterator(); iterator.hasNext();)
            {
                final ModelElement templateModelElement = (ModelElement)iterator.next();

                // - if the template model element has a stereotype
                //   defined, then we filter the metafacades based
                //   on that stereotype, otherwise we get all metafacades
                //   and let the templateModelElement perform filtering on the
                //   metafacades by type and properties
                if (templateModelElement.hasStereotype())
                {
                    templateModelElement.setMetafacades(
                        factory.getMetafacadesByStereotype(templateModelElement.getStereotype()));
                }
                else if (templateModelElement.hasTypes())
                {
                    templateModelElement.setMetafacades(factory.getAllMetafacades());
                }
            }
            this.processTemplateWithMetafacades(
                factory,
                template);
View Full Code Here

Examples of org.andromda.core.cartridge.template.ModelElement

                    // - now place the collections of elements by the given variable names.
                    //   (skip if the variable is NOT defined)
                    for (final Iterator iterator = modelElements.getModelElements().iterator(); iterator.hasNext();)
                    {
                        final ModelElement modelElement = (ModelElement)iterator.next();
                        final String modelElementVariable = modelElement.getVariable();
                        if (modelElementVariable != null && modelElementVariable.trim().length() > 0)
                        {
                            // - if a modelElement has the same variable defined
                            //   more than one time, then get the existing
                            //   model elements added from the last iteration
                            //   and add the new ones to that collection
                            Collection metafacades = (Collection)templateContext.get(modelElementVariable);
                            if (metafacades != null)
                            {
                                metafacades.addAll(modelElement.getMetafacades());
                            }
                            else
                            {
                                metafacades = modelElement.getMetafacades();
                                templateContext.put(
                                    modelElementVariable,
                                    new LinkedHashSet(metafacades));
                            }
                        }
                    }
                    this.processWithTemplate(
                        template,
                        templateContext,
                        null,
                        null);
                }
                else
                {
                    // - if outputToSingleFile isn't true, then
                    //   we just place the model element with the default
                    //   variable defined on the <modelElements/> into the
                    //   template.
                    for (final Iterator iterator = allMetafacades.iterator(); iterator.hasNext();)
                    {
                        final Map templateContext = new LinkedHashMap();
                        final Object metafacade = iterator.next();
                        final ModelAccessFacade model = factory.getModel();
                        for (final Iterator elements = modelElements.getModelElements().iterator(); elements.hasNext();)
                        {
                            final ModelElement modelElement = (ModelElement)elements.next();
                            String variable = modelElement.getVariable();

                            // - if the variable isn't defined on the <modelElement/>, try
                            //   the <modelElements/>
                            if (variable == null || variable.trim().length() == 0)
                            {
View Full Code Here

Examples of org.andromda.core.cartridge.template.ModelElement

        Collection modelElements = template.getSupportedModeElements().getModelElements();
        assertNotNull(modelElements);
        assertEquals(
            1,
            modelElements.size());
        ModelElement element = (ModelElement)modelElements.iterator().next();
        assertEquals(
            "Entity",
            element.getStereotype());

        // second template
        template = (Template)templateIterator.next();
        assertEquals(
            "templates/webservice/axis/server-config.wsdd.vsl",
            template.getPath());
        assertEquals(
            "WEB-INF/server-config.wsdd",
            template.getOutputPattern());
        assertEquals(
            "axis-configuration",
            template.getOutlet());
        assertEquals("$viewType.equals('jsp')", template.getOutputCondition());
        assertTrue(template.isOverwrite());
        assertTrue(template.isOutputToSingleFile());
        assertFalse(template.isOutputOnEmptyElements());
        assertNotNull(template.getSupportedModeElements());
        assertEquals(
            "services",
            template.getSupportedModeElements().getVariable());
        modelElements = template.getSupportedModeElements().getModelElements();
        assertNotNull(modelElements);
        assertEquals(
            1,
            modelElements.size());
        element = (ModelElement)modelElements.iterator().next();
        assertNull(element.getVariable());
        assertNull(element.getStereotype());
       
        final Collection types = element.getTypes();
        assertNotNull(types);
        assertEquals(1, types.size());
        final Type type = (Type)types.iterator().next();
        final Collection properties = type.getProperties();
        assertEquals(2, properties.size());
View Full Code Here

Examples of org.antlr.v4.codegen.model.ModelElement

    // COMPUTE STs FOR EACH NESTED MODEL OBJECT MARKED WITH @ModelElement AND MAKE ST ATTRIBUTE
    Set<String> usedFieldNames = new HashSet<String>();
    Field fields[] = cl.getFields();
    for (Field fi : fields) {
      ModelElement annotation = fi.getAnnotation(ModelElement.class);
      if (annotation == null) {
        continue;
      }

      String fieldName = fi.getName();
View Full Code Here

Examples of org.eclipse.dltk.internal.core.ModelElement

  }

  protected void sortElements(IModelElement[] elements) {
    Comparer comparer = new Comparer() {
      public int compare(Object a, Object b) {
        ModelElement elementA = (ModelElement) a;
        ModelElement elementB = (ModelElement) b;
        // char[] tempJCLPath = "<externalJCLPath>".toCharArray();
        // String idA = new String(CharOperation.replace(
        // elementA.toStringWithAncestors().toCharArray(),
        // getExternalJCLPathString().toCharArray(),
        // tempJCLPath));
        // String idB = new String(CharOperation.replace(
        // elementB.toStringWithAncestors().toCharArray(),
        // getExternalJCLPathString().toCharArray(),
        // tempJCLPath));
        return elementA.toStringWithAncestors().compareTo(
            elementB.toStringWithAncestors().toString());
        // return idA.compareTo(idB);
      }
    };
    org.eclipse.dltk.internal.core.util.Util.sort(elements, comparer);
  }
View Full Code Here

Examples of org.eclipse.dltk.internal.core.ModelElement

  protected void assertElementsEqual(String message, String expected,
      IModelElement[] elements, boolean showResolvedInfo) {
    StringBuffer buffer = new StringBuffer();
    if (elements != null) {
      for (int i = 0, length = elements.length; i < length; i++) {
        ModelElement element = (ModelElement) elements[i];
        if (element == null) {
          buffer.append("<null>");
        } else {
          buffer.append(element
              .toStringWithAncestors(showResolvedInfo));
        }
        if (i != length - 1)
          buffer.append("\n");
      }
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.