Examples of eClass()


Examples of at.bestsolution.efxclipse.formats.fxg.fxg.FXGElement.eClass()

            }

            for (int i = 0; i < attributes.getLength(); i++) {
              if (FXG_NS.equals(attributes.getURI(i)) || "".equals(attributes.getURI(i))) {
                String name = attributes.getLocalName(i);
                EStructuralFeature f = element.eClass().getEStructuralFeature(name);
                if (f != null) {
                  Object o = EcoreUtil.createFromString((EDataType) f.getEType(), attributes.getValue(i));
                  element.eSet(f, o);
                } else {
                  System.err.println("Could not find feature '" + name + "' in " + element.eClass().getName());
View Full Code Here

Examples of at.bestsolution.efxclipse.formats.svg.svg.SvgElement.eClass()

          SvgElement e = (SvgElement) EcoreUtil.create(ec);
         
          for (int i = 0; i < attributes.getLength(); i++) {
            if (SVG_NS.equals(attributes.getURI(i)) || "".equals(attributes.getURI(i))) {
              String name = attributes.getLocalName(i).replaceAll("-", "_");
              EStructuralFeature f = e.eClass().getEStructuralFeature(name);
              if (f != null) {
                Object o = EcoreUtil.createFromString((EDataType) f.getEType(), attributes.getValue(i));
                e.eSet(f, o);
              } else {
                System.err.println("Could not find feature '" + name + "' in " + e.eClass().getName());
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.ElementOption.eClass()

    expect(option.getQualifiedId()).andReturn(null);
    expect(option.getId()).andReturn("some");
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("id")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass };
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.Grammar.eClass()

    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "error");

    expect(grammar.getType()).andReturn(GrammarType.LEXER);
    expect(grammar.getRules()).andReturn(rules);
    expect(grammar.getName()).andReturn("G");
    expect(grammar.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("name")).andReturn(feature);

    PowerMock.expectPrivate(validator, "error", "grammar 'G' has no rules",
        grammar, feature);
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.GrammarAction.eClass()

    expect(action1.getScope()).andReturn(null);
    expect(action1.getName()).andReturn("members");

    expect(action2.getScope()).andReturn(null);
    expect(action2.getName()).andReturn("members");
    expect(action2.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("name")).andReturn(feature);

    PowerMock.expectPrivate(validator, "error", "redefinition of 'members' action",
        action2, feature);
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.LabeledAlt.eClass()

    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);

    expect(label.eContainer()).andReturn(grammar);
    expect(label.getLabel()).andReturn("div");
    expect(label.eClass()).andReturn(eClass);

    expect(grammar.getRules()).andReturn(rules);
    expect(grammar.eContainer()).andReturn(null);

    expect(rule.getName()).andReturn("div");
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.LexerCommand.eClass()

    expect(eClass.getEStructuralFeature("name")).andReturn(feature);

    LexerCommand command = createMock(LexerCommand.class);
    expect(command.getName()).andReturn(commandName);
    expect(command.getArgs()).andReturn(null);
    expect(command.eClass()).andReturn(eClass);

    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "error");

    PowerMock.expectPrivate(validator, "error", "missing argument for lexer command '"
        + commandName + "' ", command, feature);
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.LexerCommandExpr.eClass()

    EClass eClass = createMock(EClass.class);
    expect(eClass.getEStructuralFeature("ref")).andReturn(feature);

    LexerCommandExpr args = createMock(LexerCommandExpr.class);
    expect(args.getRef()).andReturn(ref);
    expect(args.eClass()).andReturn(eClass);

    LexerCommand command = createMock(LexerCommand.class);
    expect(command.getArgs()).andReturn(args);
    expect(command.eContainer()).andReturn(rule);
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.LexerRule.eClass()

    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "error");

    expect(grammar.getType()).andReturn(GrammarType.PARSER);

    expect(rule.eContainer()).andReturn(grammar);
    expect(rule.eClass()).andReturn(eClass);
    expect(rule.getName()).andReturn("RULE");
    expect(eClass.getEStructuralFeature("name")).andReturn(feature);

    PowerMock.expectPrivate(validator, "error", "lexer rule 'RULE' not allowed in parser",
        rule, feature);
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.Mode.eClass()

    expect(mode.eContainer()).andReturn(grammar);

    expect(grammar.getType()).andReturn(GrammarType.DEFAULT);

    expect(mode.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("id")).andReturn(feature);

    PowerMock.expectPrivate(validator, "error", "lexical modes are only allowed in lexer grammars",
        mode, feature);
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.