Skip to content

Commit

Permalink
Fixes JAVA files parsing & font size change
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue1 committed Jun 28, 2015
1 parent d2539e4 commit 78d1636
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import org.fife.ui.rsyntaxtextarea.Token
import java.awt.*
import java.awt.event.MouseAdapter
import java.awt.event.MouseEvent
import java.awt.event.MouseWheelEvent

@CompileStatic
abstract class HyperlinkPage extends TextPage {
Expand Down Expand Up @@ -69,18 +68,10 @@ abstract class HyperlinkPage extends TextPage {
}
}
}

void mouseWheelMoved(MouseWheelEvent e) {
if (e.modifiers == 0) {
mouseMoved(e)
textArea.parent.dispatchEvent(e)
}
}
}

textArea.addMouseListener(listener)
textArea.addMouseMotionListener(listener)
textArea.addMouseWheelListener(listener)
}

protected RSyntaxTextArea newRSyntaxTextArea() { new HyperlinkSyntaxTextArea() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ public static void parse(CharStream input, JavaListener listener) {
JavaLexer lexer = new JavaLexer(input);
CommonTokenStream tokens = new CommonTokenStream(lexer);
JavaParser parser = new JavaParser(tokens);

ParseTree tree = parser.compilationUnit();
ParseTreeWalker walker = new ParseTreeWalker();

walker.walk(listener, tree);
ParseTreeWalker.DEFAULT.walk(listener, tree);
} catch (StackOverflowError ignore) {
// Too complex source file, probably not written by a human.
// This error may happen on Java file generated by ANTLR for example.
Expand Down

0 comments on commit 78d1636

Please sign in to comment.