Package com.twosigma.beaker.autocomplete.java.JavaParser

Examples of com.twosigma.beaker.autocomplete.java.JavaParser.VariableDeclaratorIdContext


    List<VariableDeclaratorsContext> vars = ctx.getRuleContexts(VariableDeclaratorsContext.class);
    VariableDeclaratorContext v;
    for(VariableDeclaratorsContext vc : vars) {
      v = vc.getRuleContext(VariableDeclaratorContext.class, 0);
      if(v!=null) {
        VariableDeclaratorIdContext vi = v.getRuleContext(VariableDeclaratorIdContext.class, 0);
        if(vi.getChildCount()>0) {
          //System.out.println("VAR "+vi.getChild(0).getText()+" of type "+type);
          AutocompleteCandidate c = new AutocompleteCandidate(JavaCompletionTypes.NAME, vi.getChild(0).getText());
          registry.addCandidate(c);
          if(type!=null) {
            classUtils.defineVariable(vi.getChild(0).getText(), type);
          }
        }
      }
    }
  }
View Full Code Here


    List<VariableDeclaratorsContext> vars = ctx.getRuleContexts(VariableDeclaratorsContext.class);
    for(VariableDeclaratorsContext vc : vars) {
      List<VariableDeclaratorContext> v = vc.getRuleContexts(VariableDeclaratorContext.class);
      if(v!=null) {
        for(VariableDeclaratorContext v2 : v) {
          VariableDeclaratorIdContext vi = v2.getRuleContext(VariableDeclaratorIdContext.class, 0);
          if(vi.getChildCount()>0) {
            //System.out.println("VAR "+vi.getChild(0).getText()+" of type "+type);
            AutocompleteCandidate c = new AutocompleteCandidate(JavaCompletionTypes.NAME, vi.getChild(0).getText());
            registry.addCandidate(c);
            if(type!=null) {
              classUtils.defineVariable(vi.getChild(0).getText(), type);
            }
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.twosigma.beaker.autocomplete.java.JavaParser.VariableDeclaratorIdContext

Copyright © 2018 www.massapicom. 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.