Examples of ElementDefinition


Examples of at.bestsolution.efxclipse.tooling.css.cssext.cssExtDsl.ElementDefinition

   * <!-- end-user-doc -->
   * @generated
   */
  public void setElement(ElementDefinition newElement)
  {
    ElementDefinition oldElement = element;
    element = newElement;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, CssExtDslPackage.SUBSTRUCTURE_STYLECLASS__ELEMENT, oldElement, element));
  }
View Full Code Here

Examples of com.volantis.mcs.build.parser.ElementDefinition

            if ((value = pi.getValue("name")) != null) {
                info.setProtocolName(value);
            }

        } else if (object instanceof ElementDefinition) {
            ElementDefinition definition = (ElementDefinition) object;
            parser.println("Element " + definition.getName()
                    + " is deprecated");
        } else {
            throw new IllegalStateException("Unhandled object " + object);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.xml.schema.ElementDefinition

                                    null);
                        }
                    } else {
                        // We are trying to complete something other than the
                        // close element markup
                        ElementDefinition element =
                            schema.getElementDefinition(elementName);
                        matchName = localMatchName(matchName,
                                                   ic.isAttribute(),
                                                   prefix);

                        // If an element definition cannot be found for the
                        // containing element, or we can't derive a local match
                        // name from the input context we can't do completions
                        if ((element != null) && (matchName != null)) {
                            List options = new ArrayList();

                            if (ic.isAttribute()) {
                                List attributes =
                                    element.getAttributeDefinitions(matchName);
                                AttributeDefinition attribute;

                                for (int i = 0;
                                     i < attributes.size();
                                     i++) {
                                    attribute =
                                        (AttributeDefinition)attributes.get(i);

                                    options.add(attribute.getName());
                                }
                            } else {
                                List subElements =
                                    element.getSubElementNames(matchName);

                                options.addAll(subElements);
                            }

                            if (options.size() != 0) {
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.xml.schema.ElementDefinition

            if (attributes) {
                replace = option + "=\"\""; //$NON-NLS-1$
                cursorPos = option.length() + 2;
            } else {
                // Firstly, find out if there are any (mandatory) attributes
                ElementDefinition element =
                    schema.getElementDefinition(option);
                List attrs = element.getAttributeDefinitions(null);
                String prefixedName = qName(prefix, option);
                StringBuffer sb = new StringBuffer(prefixedName.length() * 4);
                boolean hasMandatoryAttributes = false;

                // Determine if the element may have content.
                // NOTE: This assumes content is sub-elements only and doesn't
                // account for textual content.
                boolean hasContent = element.hasSubElements();

                // The replacement will always start with the prefixed name
                sb.append(prefixedName);

                for (int j = 0;
View Full Code Here

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition

        action.setSourceElement("e1");
        action.setTargetElement("e2");
        action.setResultType("Test");
        action.setActionType(ActionType.CREATE_LINK);
       
        ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
        accessLayer.addElement(project, e1);
        accessLayer.addElement(project, e2);
        e1.setAlias("e1");
        e2.setAlias("e2");
        e1.setType("Concern");
        e2.setType("Concern");
       
        rule.getElements().add(e1);
        rule.getElements().add(e2);
        rule.setRuleID("TestRule");
       
View Full Code Here

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition

        action.setSourceElement("e1");
        action.setImpactedElement("e2");
        action.setResultType("Test");
        action.setActionType(ActionType.REPORT_IMPACT);
       
        ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e3 = RuleModelFactory.eINSTANCE.createElementDefinition();
        accessLayer.addElement(project, e1);
        accessLayer.addElement(project, e2);
        accessLayer.addElement(project, e3);
        e1.setAlias("e1");
        e2.setAlias("e2");
        e3.setAlias("e3");
        e1.setType("Concern");
        e2.setType("Concern");
        e3.setType("AtomicChangeType");
       
        rule.getElements().add(e1);
        rule.getElements().add(e2);
        rule.getElements().add(e3);
        rule.setRuleID("TestRule");
View Full Code Here

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition

        rule.setConditions(cnd1);
        cnd1.getBaseConditions().add(cnd2);
        cnd2.setSource("e1::Id");
        cnd2.setTarget("e2::Id");
       
        ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
        accessLayer.addElement(project, e1);
        accessLayer.addElement(project, e2);
        e1.setAlias("e1");
        e2.setAlias("e2");
        e1.setType("Concern");
        e2.setType("Actor");
       
        rule.getElements().add(e1);
        rule.getElements().add(e2);
       
        LinkType l1 = LinkModelFactory.eINSTANCE.createLinkType();
View Full Code Here

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition

        rule.setConditions(cnd1);
        cnd1.getBaseConditions().add(cnd2);
        cnd2.setSource("Test");
        cnd2.setTarget("Test");
       
        ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
        accessLayer.addElement(project, e1);
        accessLayer.addElement(project, e2);
        e1.setAlias("e1");
        e2.setAlias("e2");
        e1.setType("Concern");
        e2.setType("Concern");
       
        rule.getElements().add(e1);
        rule.getElements().add(e2);
        rule.setRuleID("TestRule");
       
View Full Code Here

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition

        bc2.setValue("test");
       
        bc3.setSource("e1::name");
        bc3.setValue("test2");
       
        ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
        ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
        accessLayer.addElement(project, e1);
        accessLayer.addElement(project, e2);
        e1.setAlias("e1");
        e2.setAlias("e2");
        e1.setType("Concern");
        e2.setType("Concern");
       
        rule.getElements().add(e1);
        rule.getElements().add(e2);
       
        LinkType l1 = LinkModelFactory.eINSTANCE.createLinkType();
View Full Code Here

Examples of org.emftrace.metamodel.RuleModel.ElementDefinition

    }

    @Test
    public void testCheckElementDefinition()
    {
        ElementDefinition elemDef = RuleModelFactory.eINSTANCE.createElementDefinition();
        List<String> elements = new ArrayList<String>();
       
        assertFalse(ruleValidator.checkElementDefinition(elemDef, elements));
        elemDef.setAlias("");
        assertFalse(ruleValidator.checkElementDefinition(elemDef, elements));
        assertTrue(elements.isEmpty());
        elemDef.setAlias("e1");
        assertFalse(ruleValidator.checkElementDefinition(elemDef, elements));
        assertTrue(elements.isEmpty());
        elemDef.setType("");
        assertFalse(ruleValidator.checkElementDefinition(elemDef, elements));
        assertTrue(elements.isEmpty());
        elemDef.setType("Concern");
        assertTrue(ruleValidator.checkElementDefinition(elemDef, elements));
        assertFalse(elements.isEmpty());
    }
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.