congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JCTree$JCIdent.getEndPosition
Code IndexAdd Tabnine to your IDE (free)

How to use
getEndPosition
method
in
com.sun.tools.javac.tree.JCTree$JCIdent

Best Java code snippets using com.sun.tools.javac.tree.JCTree$JCIdent.getEndPosition (Showing top 3 results out of 315)

origin: mopemope/meghanada-server

private static void analyzePackageName(
  CompilationUnitTree cut, Source src, EndPosTable endPosTable) {
 ExpressionTree packageExpr = cut.getPackageName();
 if (isNull(packageExpr)) {
  src.setPackageName("");
 } else {
  src.setPackageName(packageExpr.toString());
 }
 if (packageExpr instanceof JCTree.JCIdent) {
  JCTree.JCIdent ident = (JCTree.JCIdent) packageExpr;
  int startPos = ident.getPreferredPosition();
  int endPos = ident.getEndPosition(endPosTable);
  Range range = Range.create(src, startPos + 1, endPos);
  long pkgLine = range.begin.line;
  src.setPackageStartLine(pkgLine);
  addPackageIndex(src, pkgLine, 8, src.getPackageName());
 }
}
origin: mopemope/meghanada-server

Symbol owner = sym.owner;
int nameBegin = ident.getStartPosition();
int nameEnd = ident.getEndPosition(endPosTable);
Range nameRange = Range.create(src, nameBegin, nameEnd);
Range range = Range.create(src, nameBegin, endPos);
origin: mopemope/meghanada-server

private static void addVariable(
  SourceContext context,
  Source src,
  JCTree.JCExpression selected,
  String selectScope,
  String fqcn) {
 if (selected instanceof JCTree.JCIdent) {
  JCTree.JCIdent ident = (JCTree.JCIdent) selected;
  int vStart = ident.getStartPosition();
  int vEnd = ident.getEndPosition(context.endPosTable);
  Range vRange = Range.create(src, vStart, vEnd);
  Variable variable = new Variable(selectScope, ident.pos, vRange);
  variable.fqcn = fqcn;
  src.getCurrentScope()
    .ifPresent(
      scope -> {
       scope.addVariable(variable);
       addSymbolIndex(src, scope, variable);
      });
 }
}
com.sun.tools.javac.treeJCTree$JCIdentgetEndPosition

Popular methods of JCTree$JCIdent

  • getName
  • <init>
  • pos
  • setPos
  • setType
  • toString
  • getPreferredPosition
  • getStartPosition

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • IsNull (org.hamcrest.core)
    Is the value null?
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now