Examples of PackageParser


Examples of com.googlecode.goclipse.go.lang.parser.PackageParser

   
    final IProject project = codeContext.project;

    Lexer         lexer         = new Lexer();
    Tokenizer     tokenizer     = new Tokenizer(lexer);
    PackageParser packageParser = new PackageParser(tokenizer, file);
    ImportParser  importParser  = new ImportParser(tokenizer, file);
    ScopeParser   scopeParser   = new ScopeParser(tokenizer, file);

    FunctionParser functionParser = new FunctionParser(false, tokenizer, file);
    functionParser.setScopeParser(scopeParser);

    TypeParser typeParser = new TypeParser(false, tokenizer, file);
    typeParser.setScopeParser(scopeParser);

    VariableParser variableParser = new VariableParser(tokenizer, file, functionParser);
    variableParser.setScopeParser(scopeParser);

    // InterfaceParser interfaceParser = new InterfaceParser(tokenizer);

    lexer.scan(fileText);

    if (!packagePeer) {
      codeContext.page = new TokenizedPage(tokenizer.getTokenizedStream());
      codeContext.pkg = packageParser.getPckg();
      codeContext.imports.addAll(importParser.getImports());
    }

    codeContext.methods.addAll(functionParser.getMethods());
    codeContext.functions.addAll(functionParser.getFunctions());
View Full Code Here

Examples of com.googlecode.goclipse.go.lang.parser.PackageParser

    File[] files = pkgdir.listFiles();

    for (File file : files) {
      Lexer          lexer          = new Lexer();
      Tokenizer      tokenizer      = new Tokenizer(lexer);
      PackageParser  packageParser  = new PackageParser(tokenizer, file);
      FunctionParser functionParser = new FunctionParser(true, tokenizer, file);
      TypeParser     typeParser     = new TypeParser(true, tokenizer, file);

      if (file.canRead() && file.getName().endsWith(".go") && !file.getName().endsWith("_test.go")) {

        lexer.reset();
        lexer.scan(file);

        codeContext.pkg = packageParser.getPckg();
        codeContext.methods.addAll(functionParser.getMethods());
        for (Method method : functionParser.getMethods()) {
          if (method.getFile() == null) {
            method.setFile(file);
          }
View Full Code Here

Examples of net.riccardocossu.autodoc.parsers.PackageParser

public class HtmlOutputPluginTest {

  @Test
  public void testOutput() {
    PackageParser parser = new PackageParser();
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    PackageContainer pack = parser.parse(
        "net.riccardocossu.autodoc.test.model", factory);
    List<PackageContainer> packages = new ArrayList<PackageContainer>();
    packages.add(pack);
    HtmlOutputPlugin outPlugin = new HtmlOutputPlugin();
    outPlugin.process(packages, new File("/tmp"));
View Full Code Here

Examples of net.riccardocossu.autodoc.parsers.PackageParser

        log.error("Error including input plugin " + p, e);
      }
    }
    String[] packages = configuration.getStringArray(CONFIG_PACKAGES);
    log.info("Scanning packages: {}", (Object) packages);
    PackageParser parser = new PackageParser();
    List<PackageContainer> parsedPackages = new ArrayList<PackageContainer>();
    for (String p : packages) {
      PackageContainer pk = parser.parse(p, factory);
      parsedPackages.add(pk);
    }
    String confOutputDir = configuration.getString(CONFIG_BASE_OUTPUT_DIR);
    if (confOutputDir == null) {
      confOutputDir = System.getProperty("java.io.tmpdir");
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.