Package org.eclipse.jdt.internal.ui.text

Examples of org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner


        try {
            IRegion startLine = document.getLineInformationOfOffset(offset);
            IRegion endLine = document.getLineInformationOfOffset(offset + length);

            JavaHeuristicScanner scanner = new JavaHeuristicScanner(document);
            int nextToken = scanner.nextToken(offset + length, endLine.getOffset() + endLine.getLength());
            String next =
                    nextToken == Symbols.TokenEOF ? null : document.get(offset, scanner.getPosition() - offset).trim();
            int prevToken = scanner.previousToken(offset - 1, startLine.getOffset());
            int prevTokenOffset = scanner.getPosition() + 1;
            String previous =
                    prevToken == Symbols.TokenEOF ? null : document.get(prevTokenOffset, offset - prevTokenOffset)
                            .trim();

            switch (event.character) {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner

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.