Examples of Import


Examples of com.github.jknack.antlr4ide.lang.Import

    EList<Import> importList = new BasicEList<Import>();

    EList<Rule> rules = new BasicEList<Rule>();

    Imports imports = createMock(Imports.class);
    Import delegate = createMock(Import.class);
    Grammar grammar = createMock(Grammar.class);
    Rule r1 = createMock(ParserRule.class);
    Rule r2 = createMock(LexerRule.class);

    expect(imports.getImports()).andReturn(importList).times(3);

    expect(delegate.getImportURI()).andReturn(grammar).times(3);

    expect(grammar.getRules()).andReturn(rules).times(3);

    importList.add(delegate);
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.Import

    }
    return result;
  }

  public Import handleImport(HiddenTokenAwareTree token) {
    Import result = new Import(token);
    switch (token.getType()) {
    case LessLexer.IMPORT_SYM:
      result.setMultiplicity(Import.ImportMultiplicity.IMPORT);
      break;
    case LessLexer.IMPORT_ONCE_SYM:
      result.setMultiplicity(Import.ImportMultiplicity.IMPORT_ONCE);
      problemsHandler.deprecatedImportOnce(result);
      break;
    case LessLexer.IMPORT_MULTIPLE_SYM:
      result.setMultiplicity(Import.ImportMultiplicity.IMPORT_MULTIPLE);
      problemsHandler.deprecatedImportMultiple(result);
      break;
    default:
      throw new BugHappened(GRAMMAR_MISMATCH, token);
    }
    Iterator<HiddenTokenAwareTree> children = token.getChildren().iterator();
    HiddenTokenAwareTree nextChild = children.next();
    if (nextChild.getType() == LessLexer.IMPORT_OPTIONS) {
      configureImportOptions(result, nextChild.getChildren());
      nextChild = children.next();
    }

    result.setUrlExpression(handleTerm(nextChild));
    while (children.hasNext()) {
      HiddenTokenAwareTree kid = children.next();
      if (kid.getType() == LessLexer.COMMA) {
        kid.pushHiddenToSiblings();
      } else if (kid.getType() == LessLexer.MEDIA_QUERY) {
        result.add(handleMediaQuery(kid));
      } else {
        throw new BugHappened(GRAMMAR_MISMATCH, token);
      }
    }
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.Import

  // syntax = "proto2";
  //
  // import 'google/protobuf/descriptor.proto';
  @Test public void should_return_label_for_import() {
    Import anImport = xtext.findFirst(Import.class);
    Object label = labels.labelFor(anImport);
    assertThat(label, instanceOf(String.class));
    String labelText = (String) label;
    assertThat(labelText, equalTo("google/protobuf/descriptor.proto"));
  }
View Full Code Here

Examples of com.google.gwt.libideas.resources.client.CssResource.Import

    assert cssResourceSubtype != null;
    Map<String, Map<JMethod, String>> replacementsWithPrefix = new HashMap<String, Map<JMethod, String>>();

    replacementsWithPrefix.put("",
        computeReplacementsForType(cssResourceSubtype));
    Import imp = method.getAnnotation(Import.class);
    if (imp != null) {
      boolean fail = false;
      for (Class<? extends CssResource> clazz : imp.value()) {
        JClassType importType = context.getGeneratorContext().getTypeOracle().findType(
            clazz.getName().replace('$', '.'));
        String prefix = importType.getSimpleSourceName();
        ImportedWithPrefix exp = importType.getAnnotation(ImportedWithPrefix.class);
        if (exp != null) {
View Full Code Here

Examples of com.google.gwt.resources.client.CssResource.Import

    assert cssResourceSubtype != null;
    Map<String, Map<JMethod, String>> replacementsWithPrefix = new HashMap<String, Map<JMethod, String>>();

    replacementsWithPrefix.put("",
        computeReplacementsForType(cssResourceSubtype));
    Import imp = method.getAnnotation(Import.class);
    if (imp != null) {
      boolean fail = false;
      for (Class<? extends CssResource> clazz : imp.value()) {
        JClassType importType = typeOracle.findType(clazz.getName().replace(
            '$', '.'));
        assert importType != null : "TypeOracle does not have type "
            + clazz.getName();
View Full Code Here

Examples of com.google.gxp.compiler.base.Import

    expectedAlerts.add(new BadNodePlacementError(value1, FROM_NODE));
    expectedAlerts.add(new BadNodePlacementError(value2, FROM_NODE));
  }

  private Import injectImport(String s) {
    Import node = classImport(s);
    parts.accumulate(node);
    return node;
  }
View Full Code Here

Examples of com.google.gxp.compiler.base.Import

    parts.accumulate(node);
    return node;
  }

  public void testWithImport() {
    Import imp = injectImport("com.google.Foo");
    assertContentsInOrder(parts.getImports(), imp);
  }
View Full Code Here

Examples of com.google.gxp.compiler.base.Import

    Import imp = injectImport("com.google.Foo");
    assertContentsInOrder(parts.getImports(), imp);
  }

  public void testWithImports() {
    Import imp1 = injectImport("com.google.Foo");
    Import imp2 = injectImport("com.google.Bar");
    assertContentsInOrder(parts.getImports(), imp1, imp2);
  }
View Full Code Here

Examples of com.google.gxp.compiler.base.Import

    Import imp2 = injectImport("com.google.Bar");
    assertContentsInOrder(parts.getImports(), imp1, imp2);
  }

  public void testUnusedImports() {
    Import node = injectImport("com.google.Foo");
    expectedAlerts.add(new BadNodePlacementError(node, FROM_NODE));
  }
View Full Code Here

Examples of com.googlecode.goclipse.go.lang.model.Import

     
      // imported function call or method call
      if (word.contains(".")) {
       
        String[] parts = word.split("\\.");
        Import   i     = cc1.getImportForName(parts[0]);
       
        if (i != null) {
       
          Node node = cc1.getLocationForPkgAndName(i.path, parts[1]);
          if (node == null) {
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.